|
|
|
@ -12,8 +12,8 @@ namespace ProductionSystem.Untils.Tool
|
|
|
|
|
{
|
|
|
|
|
public class ExvTool:IDisposable
|
|
|
|
|
{
|
|
|
|
|
string com;
|
|
|
|
|
int mo;
|
|
|
|
|
readonly string com;
|
|
|
|
|
readonly int mo;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
///
|
|
|
|
@ -47,13 +47,9 @@ namespace ProductionSystem.Untils.Tool
|
|
|
|
|
var by = me.GetByteDat();
|
|
|
|
|
var sendMes = by.ToHex(" ");
|
|
|
|
|
|
|
|
|
|
XTrace.WriteLine($"膨胀阀[{mo}-{com}]发送报文:{sendMes}");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mfSerialInfo = new MfSerialInfo(0x13, 0x23, com, "19200");
|
|
|
|
|
|
|
|
|
|
XTrace.WriteLine($"膨胀阀[{mo}-{com}]发送报文:{sendMes}");
|
|
|
|
|
mfSerialInfo = new MfSerialInfo(0x13, 0x23, com, "19200");
|
|
|
|
|
var b = false;
|
|
|
|
|
|
|
|
|
|
mfSerialInfo.MsgFunc += (x) =>
|
|
|
|
|
{
|
|
|
|
|
XTrace.WriteLine($"膨胀阀[{mo}-{com}]收到返回报文{x.ToJson()}");
|
|
|
|
@ -102,7 +98,7 @@ namespace ProductionSystem.Untils.Tool
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
mfSerialInfo.SendMsg(sendMes, 60, 500);
|
|
|
|
|
mfSerialInfo.SendMsg(sendMes, 60, 100);
|
|
|
|
|
|
|
|
|
|
return b;
|
|
|
|
|
}
|
|
|
|
|