Commit 3233dcca 几米阳光

Merge branch 'AutoInOutStore' of https://gitee.com/ln0816/RC30-AutoInOutStore into AutoInOutStore

2 个父辈 03f793bf 8f46966d
......@@ -47,9 +47,9 @@ namespace Asa.IOModule
private Thread tLogOut; //日志输出
private Thread tReconn; //断开重连
private const int SEND_SLEEP = 10; //发送命令间隔
private const int NET_SLEEP = 10; //接收网络间隔
private const int TRIG_SLEEP = 20; //触发事件间隔
private const int SEND_SLEEP = 30; //发送命令间隔
private const int NET_SLEEP = 30; //接收网络间隔
private const int TRIG_SLEEP = 30; //触发事件间隔
/// <summary>
/// 自动读取DI委托
......@@ -483,7 +483,7 @@ namespace Asa.IOModule
bb[0] = buff[1];
bb[1] = buff[0];
ushort flag = BitConverter.ToUInt16(bb, 0);
string s = string.Format("{0:HH:mm:ss:fff} WriteDO {1} ({2},{3})", DateTime.Now, flag, add.ToString(), sta.ToString());
string s = string.Format("{0:HH:mm:ss.fff} WriteDO id={1} ({2},{3})", DateTime.Now, flag, add.ToString(), sta.ToString());
_log.Add(s);
}
......@@ -572,7 +572,7 @@ namespace Asa.IOModule
bb[0] = result[1];
bb[1] = result[0];
flag = BitConverter.ToUInt16(bb, 0);
s = string.Format("{0:HH:mm:ss:fff} Send {1}", DateTime.Now, flag);
s = string.Format("{0:HH:mm:ss:fff} Send id={1} fun={2} len={3}", DateTime.Now, flag, result[7], result.Length);
_log.Add(s);
_logRxTx.Add(flag + "," + result[7]);
}
......@@ -691,7 +691,7 @@ namespace Asa.IOModule
bb[0] = buff[1];
bb[1] = buff[0];
ushort flag = BitConverter.ToUInt16(bb, 0);
s = string.Format("{0:HH:mm:ss:fff} ReadDO {1} ", DateTime.Now, flag);
s = string.Format("{0:HH:mm:ss:fff} ReadDO id={1} fun={2} len={3}", DateTime.Now, flag, buff[7], buff.Length);
s += Convert.ToString(buff[9], 2);
if (buff[8] == 2)
s += "," + Convert.ToString(buff[10], 2);
......@@ -750,7 +750,7 @@ namespace Asa.IOModule
bb[0] = buff[1];
bb[1] = buff[0];
ushort flag = BitConverter.ToUInt16(bb, 0);
s = string.Format("{0:HH:mm:ss:fff} ReadDI {1} ", DateTime.Now, flag);
s = string.Format("{0:HH:mm:ss:fff} ReadDI id={1} fun={2} len={3}", DateTime.Now, flag, buff[7], buff.Length);
s += Convert.ToString(buff[9], 2);
if (buff[8] == 2)
s += "," + Convert.ToString(buff[10], 2);
......@@ -869,6 +869,7 @@ namespace Asa.IOModule
if (LogOut)
{
Log_RxTx_Event?.Invoke(this, _logRxTx.ToArray());
_logRxTx.Clear();
}
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!