出站ng判定整理,传mes接口,
This commit is contained in:
@@ -262,14 +262,14 @@ namespace JinYuan.ControlCenters
|
||||
JYResult<byte[]> resByte = CommonMethods.PlcLink.ReadValue<JYResult<byte[]>>($"{pf.VarList[1].VarAddress}", Data_Type.ArrByte, Convert.ToUInt16(pf.VarList[1].OffsetOrLenght));
|
||||
sw1.Stop();
|
||||
CommonMethods.AddDataMonitorLog(0, $"{pf.GroupName},耗时:{sw1.Elapsed.TotalMilliseconds}ms");
|
||||
LogHelper.Instance.WriteLog("循环读取PLC工位", $"读取工位:{pf.GroupName},启动读取字节共耗时:" + sw1.Elapsed.TotalMilliseconds);
|
||||
LogHelper.Instance.WriteLog( $"读取工位:{pf.GroupName},启动读取字节共耗时:" + sw1.Elapsed.TotalMilliseconds, "循环读取PLC工位");
|
||||
//置位 PLC-防止重复读取
|
||||
CommonMethods.PlcLink.WriteInt16(pf.VarList[0].VarAddress, 2);//置位,读取进行中的标志
|
||||
|
||||
if (resByte == null)
|
||||
{
|
||||
CommonMethods.AddDataMonitorLog(0, $"上料工位:{pf.GroupName},起始地址:{pf.VarList[1].VarAddress},得到空字节数组");
|
||||
LogHelper.Instance.WriteLog("循环读取PLC上料工位", $"读取工位:{pf.GroupName},起始地址:{pf.VarList[1].VarAddress},得到空字节数组");
|
||||
LogHelper.Instance.WriteLog( $"读取工位:{pf.GroupName},起始地址:{pf.VarList[1].VarAddress},得到空字节数组", "循环读取PLC上料工位");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user