丰富日志

dep_yangw
我叫锄头 11 months ago
parent 9e2b560894
commit 943ea654d8

@ -47,7 +47,7 @@ namespace ProductionSystem.Untils.Tool
var by = me.GetByteDat();
var sendMes = by.ToHex(" ");
XTrace.WriteLine($"膨胀阀[{com}]发送报文:{0}", sendMes);
XTrace.WriteLine($"膨胀阀[{mo}-{com}]发送报文:{0}", sendMes);
mfSerialInfo = new MfSerialInfo(0x13, 0x23, com, "19200");
@ -56,7 +56,7 @@ namespace ProductionSystem.Untils.Tool
mfSerialInfo.MsgFunc += (x) =>
{
XTrace.WriteLine($"膨胀阀[{com}]收到返回报文{x.ToJson()}");
XTrace.WriteLine($"膨胀阀[{mo}-{com}]收到返回报文{x.ToJson()}");
if (x.Id.Contains("23") && x.Err == "0")
{
var bytes = x.Dat.ToHex();
@ -82,12 +82,12 @@ namespace ProductionSystem.Untils.Tool
intelLsb = me.GetIntelLsb(16, 16);
XTrace.WriteLine(intelLsb.ToString());
Val = intelLsb.ToString();
XTrace.WriteLine($"膨胀阀[{com}]收到返回报文 解析开度{Val}");
XTrace.WriteLine($"膨胀阀[{mo}-{com}]收到返回报文 解析开度{Val}");
double errorMargin = Math.Abs(intelLsb.ToInt() - mo);
if (errorMargin<=10 && !b)
{
XTrace.WriteLine($"膨胀阀[{com}] 逻辑结束");
XTrace.WriteLine($"膨胀阀[{mo}-{com}] 逻辑结束");
Val = intelLsb.ToString();
mfSerialInfo.MsgFunc = null;

@ -68,13 +68,13 @@ namespace ProductionSystem.Untils.Tool
}
int cou = 0;
XTrace.WriteLine($"四通阀[{com}]发送报文:{0}", sendMes);
XTrace.WriteLine($"四通阀[{mo}-{com}]发送报文:{0}", sendMes);
bool b = false;
mfSerialInfo.MsgFunc += (x) =>
{
cou++;
XTrace.WriteLine($"四通阀[{com}]收到返回报文{x.ToJson()}");
XTrace.WriteLine($"四通阀[{mo}-{com}]收到返回报文{x.ToJson()}");
if (x.Id.Contains("2e") && x.Err=="0")
{
var bytes = x.Dat.ToHex();
@ -87,7 +87,7 @@ namespace ProductionSystem.Untils.Tool
//获取最后返回的模式
Val = intelLsb.ToInt().ToString();
XTrace.WriteLine($"四通阀[{com}]收到返回报文 解析模式[{Val}]");
XTrace.WriteLine($"四通阀[{mo}-{com}]收到返回报文 解析模式[{Val}]");
if (intelLsb.ToInt() == mo && !b)
{
@ -95,7 +95,7 @@ namespace ProductionSystem.Untils.Tool
mfSerialInfo.Exit = true;
mfSerialInfo.MsgFunc = null;
Val = intelLsb.ToInt().ToString();
XTrace.WriteLine($"四通阀[{com}] 逻辑结束");
XTrace.WriteLine($"四通阀[{mo}-{com}] 逻辑结束");
return;
}

@ -40,7 +40,7 @@ namespace ProductionSystem.Untils.Tool
uint seep = uint.Parse((mo * 0.4).ToString());
Write = seep.ToString();
XTrace.WriteLine($"水泵Ux 第[{com}]个 写入真实速度:{seep}");
XTrace.WriteLine($"水泵Ux 第[{mo}-{com}]个 写入真实速度:{seep}");
MFMsgVariable me = new MFMsgVariable(8);
me.AddMotoralaLsb(0, 8, seep);
@ -48,7 +48,7 @@ namespace ProductionSystem.Untils.Tool
var by = me.GetByteDat();
var sendMes = by.ToHex(" ");
XTrace.WriteLine($"水泵Ux 第[{com}]个 写入设备报文:{sendMes}");
XTrace.WriteLine($"水泵Ux 第[{mo}-{com}]个 写入设备报文:{sendMes}");
bool b = false;
@ -59,7 +59,7 @@ namespace ProductionSystem.Untils.Tool
mfSerialInfo.MsgFunc += (x) =>
{
XTrace.WriteLine($"水泵Ux 第[{com}]个 收到反馈报文:{x.ToJson()}");
XTrace.WriteLine($"水泵Ux 第[{mo}-{com}]个 收到反馈报文:{x.ToJson()}");
if (x.Id.Contains("29") && x.Err == "0")
{
var bytes = x.Dat.ToHex();
@ -74,12 +74,12 @@ namespace ProductionSystem.Untils.Tool
intelLsb = me.GetMotoralaLsb(24, 8);
XTrace.WriteLine("RealRPM: {0}", intelLsb);
Val = intelLsb.ToString();
XTrace.WriteLine($"水泵Ux 第[{com}]个 收到反馈速度:{Val}");
XTrace.WriteLine($"水泵Ux 第[{mo}-{com}]个 收到反馈速度:{Val}");
double errorMargin = Math.Abs(intelLsb.ToInt() - Write.ToInt());
if(!b && errorMargin<=5)
{
XTrace.WriteLine($"水泵Ux[{com}] 逻辑结束");
XTrace.WriteLine($"水泵Ux[{mo}-{com}] 逻辑结束");
mfSerialInfo.MsgFunc = null;
mfSerialInfo.Exit = true;
b = true;

@ -38,7 +38,7 @@ namespace ProductionSystem.Untils.Tool
uint seep = uint.Parse((mo * 0.4).ToString());
Write = seep.ToString();
XTrace.WriteLine($"水泵Uy 第[{com}]个 写入真实速度:{seep}");
XTrace.WriteLine($"水泵Uy 第[{mo}-{com}]个 写入真实速度:{seep}");
MFMsgVariable me = new MFMsgVariable(8);
me.AddMotoralaLsb(8, 8, seep);
@ -46,7 +46,7 @@ namespace ProductionSystem.Untils.Tool
var by = me.GetByteDat();
var sendMes = by.ToHex(" ");
XTrace.WriteLine($"水泵Uy 第[{com}]个 写入设备报文:{sendMes}");
XTrace.WriteLine($"水泵Uy 第[{mo}-{com}]个 写入设备报文:{sendMes}");
bool b = false;
@ -57,7 +57,7 @@ namespace ProductionSystem.Untils.Tool
mfSerialInfo.MsgFunc += (x) =>
{
XTrace.WriteLine($"水泵Uy 第[{com}]个 收到反馈报文:{sendMes}");
XTrace.WriteLine($"水泵Uy 第[{mo}-{com}]个 收到反馈报文:{sendMes}");
if (x.Id.Contains("26") && x.Err == "0")
{
var bytes = x.Dat.ToHex();
@ -74,12 +74,12 @@ namespace ProductionSystem.Untils.Tool
Val = intelLsb.ToString();
XTrace.WriteLine($"水泵Uy 第[{com}]个 收到反馈速度:{Val}");
XTrace.WriteLine($"水泵Uy 第[{mo}-{com}]个 收到反馈速度:{Val}");
double errorMargin = Math.Abs(intelLsb.ToInt() - Write.ToInt());
if(!b && errorMargin<=5)
{
XTrace.WriteLine($"水泵Uy[{com}] 逻辑结束");
XTrace.WriteLine($"水泵Uy[{mo}-{com}] 逻辑结束");
mfSerialInfo.MsgFunc = null;
mfSerialInfo.Exit = true;
b = true;

Loading…
Cancel
Save