..
This commit is contained in:
@@ -13,8 +13,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Test_Port", "Test_Port\Test
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Library", "Library", "{530A4517-6210-422B-8CB4-B7D194EE70BE}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BMS", "..\SubProject\BMS\BMS.csproj", "{7A94C30C-6772-4F71-BF9C-0DF071A1BC70}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CommData", "..\SubProject\CommData\CommData.csproj", "{14E8C9A5-013E-49BA-B435-EFEFC77DD623}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ENIGProtocol", "..\SubProject\EnigProtocol\enigprotocol\ENIGProtocol.csproj", "{9365803B-933D-4237-93C7-B502C855A71C}"
|
||||
@@ -43,10 +41,6 @@ Global
|
||||
{CCFA2CE7-A539-4ADC-B803-F759284C3463}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{CCFA2CE7-A539-4ADC-B803-F759284C3463}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{CCFA2CE7-A539-4ADC-B803-F759284C3463}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{7A94C30C-6772-4F71-BF9C-0DF071A1BC70}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{7A94C30C-6772-4F71-BF9C-0DF071A1BC70}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{7A94C30C-6772-4F71-BF9C-0DF071A1BC70}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{7A94C30C-6772-4F71-BF9C-0DF071A1BC70}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{14E8C9A5-013E-49BA-B435-EFEFC77DD623}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{14E8C9A5-013E-49BA-B435-EFEFC77DD623}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{14E8C9A5-013E-49BA-B435-EFEFC77DD623}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
@@ -64,7 +58,6 @@ Global
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(NestedProjects) = preSolution
|
||||
{7A94C30C-6772-4F71-BF9C-0DF071A1BC70} = {530A4517-6210-422B-8CB4-B7D194EE70BE}
|
||||
{14E8C9A5-013E-49BA-B435-EFEFC77DD623} = {530A4517-6210-422B-8CB4-B7D194EE70BE}
|
||||
{9365803B-933D-4237-93C7-B502C855A71C} = {530A4517-6210-422B-8CB4-B7D194EE70BE}
|
||||
{8BAE0EAC-3D25-402F-9A65-2BA1ECFE28B7} = {530A4517-6210-422B-8CB4-B7D194EE70BE}
|
||||
|
||||
2
Cs_HMI/TestProject/Test_BMS/Form1.Designer.cs
generated
2
Cs_HMI/TestProject/Test_BMS/Form1.Designer.cs
generated
@@ -47,7 +47,7 @@
|
||||
this.comboBox1.Name = "comboBox1";
|
||||
this.comboBox1.Size = new System.Drawing.Size(131, 20);
|
||||
this.comboBox1.TabIndex = 0;
|
||||
this.comboBox1.Text = "com15";
|
||||
this.comboBox1.Text = "com6";
|
||||
//
|
||||
// button1
|
||||
//
|
||||
|
||||
@@ -18,22 +18,15 @@ namespace Test_BMS
|
||||
InitializeComponent();
|
||||
bms = new arDev.BMS();
|
||||
bms.BMSDataReceive += Bms_BMSDataReceive;
|
||||
bms.BMSCellDataReceive += Bms_BMSCellDataReceive;
|
||||
bms.Message += Bms_Message;
|
||||
this.Text = $"{Application.ProductName} ver{Application.ProductVersion}";
|
||||
}
|
||||
|
||||
private void Bms_Message(object sender, arRS232.MessageEventArgs e)
|
||||
private void Bms_BMSCellDataReceive(object sender, arDev.BMSCelvoltageEventArgs e)
|
||||
{
|
||||
var sb = new System.Text.StringBuilder();
|
||||
if (e.Data != null)
|
||||
{
|
||||
foreach (var b in e.Data)
|
||||
sb.Append(" " + b.ToString("X2"));
|
||||
}
|
||||
else sb.Append(e.Message);
|
||||
if (e.MsgType == arRS232.MessageType.Error)
|
||||
addmsg(e.Message);
|
||||
else
|
||||
addmsg($"{e.MsgType}:{sb}");
|
||||
var valuestr = string.Join(" ", e.voltage.Select(t => t.ToString()));
|
||||
addmsg($"voltage:{valuestr}");
|
||||
}
|
||||
|
||||
private void Bms_BMSDataReceive(object sender, EventArgs e)
|
||||
@@ -43,7 +36,32 @@ namespace Test_BMS
|
||||
addmsg("Recv:" + msg);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
private void Bms_Message(object sender, arDev.arRS232.MessageEventArgs e)
|
||||
{
|
||||
var sb = new System.Text.StringBuilder();
|
||||
if (e.Data != null)
|
||||
{
|
||||
foreach (var b in e.Data)
|
||||
sb.Append(" " + b.ToString("X2"));
|
||||
}
|
||||
else sb.Append(e.Message);
|
||||
|
||||
if (e.MsgType == arDev.arRS232.MessageType.Error)
|
||||
addmsg(e.Message);
|
||||
else if(e.MsgType == arDev.arRS232.MessageType.Send)
|
||||
{
|
||||
addmsg($"Tx:{sb}");
|
||||
}
|
||||
else if(e.MsgType == arDev.arRS232.MessageType.Recv)
|
||||
{
|
||||
addmsg($"Rx:{sb}");
|
||||
}
|
||||
else
|
||||
addmsg($"{e.MsgType}:{sb}");
|
||||
}
|
||||
|
||||
void addmsg(string m)
|
||||
{
|
||||
if (logTextBox1.InvokeRequired)
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>..\..\..\..\..\..\Amkor\AGV4\Test\</OutputPath>
|
||||
<OutputPath>..\..\..\..\..\..\Amkor\AGV4\Test\BMS\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
@@ -50,6 +50,12 @@
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="..\..\Project\Device\BMS.cs">
|
||||
<Link>BMS.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="..\..\Project\Device\BMSInformationEventArgs.cs">
|
||||
<Link>BMSInformationEventArgs.cs</Link>
|
||||
</Compile>
|
||||
<Compile Include="Form1.cs">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
|
||||
Reference in New Issue
Block a user