Commit 09f50bed LN

增加 Addr_arriveRobotLocation = "/rest/api/qisda/device/arriveRobotLocation"; 接口。。托盘号增加日志

1 个父辈 8642956f
...@@ -222,11 +222,12 @@ PRO,0,移栽上下轴流水线取放料详细位置P2,UpDownP2DetialList,0X0=800 ...@@ -222,11 +222,12 @@ PRO,0,移栽上下轴流水线取放料详细位置P2,UpDownP2DetialList,0X0=800
托盘检测入口加锁处理。 托盘检测入口加锁处理。
皮带线转动间隔时间减半。 皮带线转动间隔时间减半。
待解决:
托盘放两个问题
修改:料架进入入料装置时中途链条停止转动的现象。 修改:料架进入入料装置时中途链条停止转动的现象。
GetDIValue 方法循环查找三次防止报错引起急停。 GetDIValue 方法循环查找三次防止报错引起急停。
增加 Addr_arriveRobotLocation = "/rest/api/qisda/device/arriveRobotLocation"; 接口,待料盘到达接驳台后通知服务器。
......
类型,分类编号,说明,名称,属性值,设备名称,默认值,描述,电器定义,代码定义 类型,分类编号,说明,名称,属性值,设备名称,默认值,描述,电器定义,代码定义
PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,0,,,,, PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,0,,,,,
PRO,0,是否存放的大料盘,IsBigTray,1,,,,,
,,,,,,,,, ,,,,,,,,,
PRO,0,移栽上下运动是否使用伺服,UpDownUseAxis,1,,,,, PRO,0,移栽上下运动是否使用伺服,UpDownUseAxis,1,,,,,
AXIS,0,移栽上下轴,UpDown_Axis,13,COM6,0,,, AXIS,0,移栽上下轴,UpDown_Axis,13,COM6,0,,,
......
类型,分类编号,说明,名称,属性值,设备名称,默认值,描述,电器定义,代码定义 类型,分类编号,说明,名称,属性值,设备名称,默认值,描述,电器定义,代码定义
PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,1,,,,, PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,0,,,,,
,,,,,,,,, ,,,,,,,,,
PRO,0,移栽上下运动是否使用伺服,UpDownUseAxis,0,,,,, PRO,0,移栽上下运动是否使用伺服,UpDownUseAxis,0,,,,,
AXIS,0,移栽上下轴,UpDown_Axis,1,COM6,1,,, AXIS,0,移栽上下轴,UpDown_Axis,1,COM6,1,,,
......
类型,分类编号,说明,名称,属性值,设备名称,默认值,描述,电器定义,代码定义 类型,分类编号,说明,名称,属性值,设备名称,默认值,描述,电器定义,代码定义
PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,1,,,,, PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,0,,,,,
,,,,,,,,, ,,,,,,,,,
PRO,0,移栽上下运动是否使用伺服,UpDownUseAxis,0,,,,, PRO,0,移栽上下运动是否使用伺服,UpDownUseAxis,0,,,,,
AXIS,0,移栽上下轴,UpDown_Axis,1,COM6,1,,, AXIS,0,移栽上下轴,UpDown_Axis,1,COM6,1,,,
......
...@@ -192,7 +192,21 @@ namespace OnlineStore.DeviceLibrary ...@@ -192,7 +192,21 @@ namespace OnlineStore.DeviceLibrary
else if (MoveInfo.MoveStep.Equals(LineMoveStep.DO_06_SeparateCheck)) else if (MoveInfo.MoveStep.Equals(LineMoveStep.DO_06_SeparateCheck))
{ {
MoveInfo.NextMoveStep(LineMoveStep.DO_07_CRun); MoveInfo.NextMoveStep(LineMoveStep.DO_07_CRun);
LogInfo(hengyiName + "出口有料,最多等待2000"); if (IOValue(IO_Type.SeparateDevice_Check).Equals(IO_VALUE.HIGH))
{
int robotIndex = 1;
if (DeviceID.Equals(301))
{
robotIndex = 2;
}
LogInfo(hengyiName + "出口有料,转动接驳台皮带线2000 , 收到SeparateDevice_Check信号,调用arriveRobotLocation="+ robotIndex);
SServerManager.arriveRobotLocation(Name, robotIndex);
}
else
{
LogInfo(hengyiName + "出口有料,转动接驳台皮带线2000 ,未收到SeparateDevice_Check信号");
}
IOMove(IO_Type.SeparateDevice_Run, IO_VALUE.HIGH); IOMove(IO_Type.SeparateDevice_Run, IO_VALUE.HIGH);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(2000)); MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(2000));
} }
......
...@@ -317,7 +317,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -317,7 +317,7 @@ namespace OnlineStore.DeviceLibrary
if (preTrayNum.Equals(currTrayNum)&&currTrayNum>0) if (preTrayNum.Equals(currTrayNum)&&currTrayNum>0)
{ {
TrayManager.TrayErrorMsg =DateTime.Now.ToLongTimeString()+" "+ Name + "托盘号出现错乱:上一个托盘[" + preTrayNum + "] 当前托盘 [" + currTrayNum + "],连续两个托盘号一样"; TrayManager.TrayErrorMsg =DateTime.Now.ToLongTimeString()+" "+ Name + "托盘号出现错乱:上一个托盘[" + preTrayNum + "] 当前托盘 [" + currTrayNum + "],连续两个托盘号一样";
LogUtil.error(Name + "托盘号出现错乱:上一个托盘[" + preTrayNum + "] 当前托盘 [" + currTrayNum + "],连续两个托盘号一样"); LogUtil.error(Name + "托盘号错乱:上一个托盘[" + preTrayNum + "] 当前托盘 [" + currTrayNum + "],连续两个托盘号一样");
} }
return true; return true;
} }
......
...@@ -63,6 +63,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -63,6 +63,7 @@ namespace OnlineStore.DeviceLibrary
{ {
if (SecondMoveInfo.MoveType.Equals(LineMoveType.None).Equals(false)) if (SecondMoveInfo.MoveType.Equals(LineMoveType.None).Equals(false))
{ {
LogUtil.error(Name + " StartCheckFixture " + " 不在空闲中,直接返回 ");
return; return;
} }
if (!LineManager.Line.CanProcessLine()) if (!LineManager.Line.CanProcessLine())
...@@ -85,7 +86,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -85,7 +86,8 @@ namespace OnlineStore.DeviceLibrary
{ {
SecondMoveInfo.NewMove(LineMoveType.CheckFixture, CheckParam); SecondMoveInfo.NewMove(LineMoveType.CheckFixture, CheckParam);
SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_06_TopUp); SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_06_TopUp);
CheckLog("检测到SW_TrayCheck:" + SecondMoveInfo.SLog + "横移顶升气缸上升 )"); IOMove(IO_Type.SW_StopDown, IO_VALUE.LOW);
LogUtil.info(Name + " [" + trayCount + "] 检测到SW_TrayCheck:" + SecondMoveInfo.SLog + "横移顶升气缸上升 )");
CylinderMove(SecondMoveInfo, IO_Type.SW_TopCylinder_Down, IO_Type.SW_TopCylinder_Up); CylinderMove(SecondMoveInfo, IO_Type.SW_TopCylinder_Down, IO_Type.SW_TopCylinder_Up);
} }
else else
...@@ -102,6 +104,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -102,6 +104,7 @@ namespace OnlineStore.DeviceLibrary
swWaitWatch.Stop(); swWaitWatch.Stop();
SecondMoveInfo.NewMove(LineMoveType.CheckFixture, CheckParam); SecondMoveInfo.NewMove(LineMoveType.CheckFixture, CheckParam);
SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_00_Stop1Down); SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_00_Stop1Down);
SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(200));
LogUtil.info(Name + " [" + trayCount + "] 检测到SW_StopCheck:" + SecondMoveInfo.SLog + "阻挡气缸下降 ,等待 SW_StopCheck=0"); LogUtil.info(Name + " [" + trayCount + "] 检测到SW_StopCheck:" + SecondMoveInfo.SLog + "阻挡气缸下降 ,等待 SW_StopCheck=0");
//CheckLog("检测到SW_StopCheck:" + SecondMoveInfo.SLog + "阻挡气缸下降 ,等待 SW_StopCheck=0" ); //CheckLog("检测到SW_StopCheck:" + SecondMoveInfo.SLog + "阻挡气缸下降 ,等待 SW_StopCheck=0" );
IOMove(IO_Type.SW_StopDown, IO_VALUE.HIGH); IOMove(IO_Type.SW_StopDown, IO_VALUE.HIGH);
...@@ -203,7 +206,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -203,7 +206,7 @@ namespace OnlineStore.DeviceLibrary
else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MIO_01_FixtureCheck)) else if (SecondMoveInfo.MoveStep.Equals(LineMoveStep.MIO_01_FixtureCheck))
{ {
SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_02_WaitFixture); SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_02_WaitFixture);
CheckLog("托盘检测:" + SecondMoveInfo.SLog + "再次等待SW_TrayCheck=1 :" ); CheckLog("托盘检测:" + SecondMoveInfo.SLog + "再次等待SW_TrayCheck=1 :");
//CheckLog("托盘检测:" + SecondMoveInfo.SLog + "再次等待SW_TrayCheck=1并需要持续:" + TrayManager.SwTrayWaitTime); //CheckLog("托盘检测:" + SecondMoveInfo.SLog + "再次等待SW_TrayCheck=1并需要持续:" + TrayManager.SwTrayWaitTime);
CheckAndMove(IO_Type.SW_StopDown, IO_VALUE.LOW); CheckAndMove(IO_Type.SW_StopDown, IO_VALUE.LOW);
SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SW_TrayCheck, IO_VALUE.HIGH)); SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.SW_TrayCheck, IO_VALUE.HIGH));
......
...@@ -4,6 +4,7 @@ using System; ...@@ -4,6 +4,7 @@ using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Timers; using System.Timers;
...@@ -462,13 +463,23 @@ namespace OnlineStore.DeviceLibrary ...@@ -462,13 +463,23 @@ namespace OnlineStore.DeviceLibrary
#endregion #endregion
#region 托盘检测 #region 托盘检测
private object lockObj = "";
private void StartCheckFixture() private void StartCheckFixture()
{ {
if (Monitor.TryEnter(lockObj, 100))
{
try
{
if (SecondMoveInfo.MoveType.Equals(LineMoveType.None).Equals(false))
{
LogUtil.error(Name + " StartCheckFixture " + " 不在空闲中,直接返回 " );
return;
}
if (IOValue(IO_Type.StopCylinder_Check2).Equals(IO_VALUE.HIGH)) if (IOValue(IO_Type.StopCylinder_Check2).Equals(IO_VALUE.HIGH))
{ {
SecondMoveInfo.NewMove(LineMoveType.CheckFixture); SecondMoveInfo.NewMove(LineMoveType.CheckFixture);
CheckLog("托盘阻挡" + SecondMoveInfo.SLog + " 阻挡气缸1-1上升)");
SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_03_Stop2Down); SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_03_Stop2Down);
CheckLog("托盘阻挡" + SecondMoveInfo.SLog + " 阻挡气缸1-1上升)");
IOMove(IO_Type.StopCylinder_Down1, IO_VALUE.LOW); IOMove(IO_Type.StopCylinder_Down1, IO_VALUE.LOW);
SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.StopCylinder_Down1, IO_VALUE.LOW)); SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.StopCylinder_Down1, IO_VALUE.LOW));
} }
...@@ -477,13 +488,28 @@ namespace OnlineStore.DeviceLibrary ...@@ -477,13 +488,28 @@ namespace OnlineStore.DeviceLibrary
//托盘在第一个阻挡处 //托盘在第一个阻挡处
SecondMoveInfo.NewMove(LineMoveType.CheckFixture); SecondMoveInfo.NewMove(LineMoveType.CheckFixture);
SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_00_Stop1Down); SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_00_Stop1Down);
CheckLog(" 托盘检测:料盘检测StopCylinder_Check1 " + SecondMoveInfo.SLog + "阻挡气缸1-1下降 , 等待 StopCylinder_Check1=0" ); SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(200));
CheckLog(" 托盘检测:料盘检测StopCylinder_Check1 " + SecondMoveInfo.SLog + "阻挡气缸1-1下降 , 等待 StopCylinder_Check1=0");
IOMove(IO_Type.StopCylinder_Down1, IO_VALUE.HIGH); IOMove(IO_Type.StopCylinder_Down1, IO_VALUE.HIGH);
SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.StopCylinder_Down1, IO_VALUE.HIGH)); SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.StopCylinder_Down1, IO_VALUE.HIGH));
SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.StopCylinder_Check1, IO_VALUE.LOW)); SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.StopCylinder_Check1, IO_VALUE.LOW));
// SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(TrayManager.StopDownWaitTime)); // SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(TrayManager.StopDownWaitTime));
} }
} }
catch (Exception ex)
{
LogUtil.error(Name + " StartCheckFixture " + " 出错:" + ex.ToString());
}
finally
{
Monitor.Exit(lockObj);
}
}
else
{
LogUtil.error(Name + " StartCheckFixture " + "失败,未得到锁");
}
}
protected override void CheckFixtureProcess() protected override void CheckFixtureProcess()
{ {
if (!LineManager.Line.LineCanRun()) if (!LineManager.Line.LineCanRun())
...@@ -519,6 +545,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -519,6 +545,7 @@ namespace OnlineStore.DeviceLibrary
{ {
SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_04_Wait); SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_04_Wait);
CheckLog("托盘阻挡" + SecondMoveInfo.SLog + " ,等待编码信号稳定StopCylinder_Check2=1"); CheckLog("托盘阻挡" + SecondMoveInfo.SLog + " ,等待编码信号稳定StopCylinder_Check2=1");
CheckAndMove(IO_Type.StopCylinder_Down1, IO_VALUE.LOW);
//SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(500)); //SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(500));
SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.StopCylinder_Check2, IO_VALUE.HIGH)); SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.StopCylinder_Check2, IO_VALUE.HIGH));
} }
......
...@@ -43,6 +43,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -43,6 +43,7 @@ namespace OnlineStore.DeviceLibrary
{ {
if (SecondMoveInfo.MoveType.Equals(LineMoveType.None).Equals(false)) if (SecondMoveInfo.MoveType.Equals(LineMoveType.None).Equals(false))
{ {
LogUtil.error(Name + " StartCheckFixture " + " 不在空闲中,直接返回 ");
return; return;
} }
bool canProcess = (LineManager.Line.SwNoProcess(Config.SidesWayNum)); bool canProcess = (LineManager.Line.SwNoProcess(Config.SidesWayNum));
...@@ -53,8 +54,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -53,8 +54,8 @@ namespace OnlineStore.DeviceLibrary
{ {
trayCheckWait.Stop(); trayCheckWait.Stop();
SecondMoveInfo.NewMove(LineMoveType.CheckFixture); SecondMoveInfo.NewMove(LineMoveType.CheckFixture);
CheckLog("托盘阻挡" + SecondMoveInfo.SLog + "阻挡气缸1-1上升)");
SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_03_Stop2Down); SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_03_Stop2Down);
LogUtil.info(Name + " [" + trayCount + "] 托盘阻挡" + SecondMoveInfo.SLog + "阻挡气缸1-1上升)");
IOMove(IO_Type.StopCylinder_Down1, IO_VALUE.LOW); IOMove(IO_Type.StopCylinder_Down1, IO_VALUE.LOW);
SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.StopCylinder_Down1, IO_VALUE.LOW)); SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.StopCylinder_Down1, IO_VALUE.LOW));
} }
...@@ -69,6 +70,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -69,6 +70,7 @@ namespace OnlineStore.DeviceLibrary
//托盘在第一个阻挡处 //托盘在第一个阻挡处
SecondMoveInfo.NewMove(LineMoveType.CheckFixture); SecondMoveInfo.NewMove(LineMoveType.CheckFixture);
SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_00_Stop1Down); SecondMoveInfo.NextMoveStep(LineMoveStep.MIO_00_Stop1Down);
SecondMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(200));
LogUtil.info(Name + " [" + trayCount + "] 托盘检测:" + SecondMoveInfo.SLog + "阻挡气缸1-1下降 ,等待 StopCylinder_Check1=0"); LogUtil.info(Name + " [" + trayCount + "] 托盘检测:" + SecondMoveInfo.SLog + "阻挡气缸1-1下降 ,等待 StopCylinder_Check1=0");
//CheckLog(" 托盘检测:" + SecondMoveInfo.SLog + "阻挡气缸1-1下降 ,等待 StopCylinder_Check1=0" ); //CheckLog(" 托盘检测:" + SecondMoveInfo.SLog + "阻挡气缸1-1下降 ,等待 StopCylinder_Check1=0" );
IOMove(IO_Type.StopCylinder_Down1, IO_VALUE.HIGH); IOMove(IO_Type.StopCylinder_Down1, IO_VALUE.HIGH);
......
...@@ -47,7 +47,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -47,7 +47,7 @@ namespace OnlineStore.DeviceLibrary
} }
//## //##
private static string spiltStr = "##"; private static string spiltStr = "##";
public static string CodeReceived(string deviceName, int trayNum, List<string> codeList, int height, int width,string rfid,int feedEquipId) public static string CodeReceived(string deviceName, int trayNum, List<string> codeList, int height, int width, string rfid, int feedEquipId)
{ {
string msg = ""; string msg = "";
try try
...@@ -80,7 +80,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -80,7 +80,7 @@ namespace OnlineStore.DeviceLibrary
string server = GetAddr(Addr_PosForPutin, paramMap); string server = GetAddr(Addr_PosForPutin, paramMap);
//string server = GetAddr(Addr_PosForPutin) + "?cids=" + LineServer.GetAllCID() + "&code=%3D" + codeStr; //string server = GetAddr(Addr_PosForPutin) + "?cids=" + LineServer.GetAllCID() + "&code=%3D" + codeStr;
LogUtil.info(deviceName + "托盘【" + trayNum + "】 条码【 " + codeStr + "】料串【"+rfid+"】,获取入库库位:"); LogUtil.info(deviceName + "托盘【" + trayNum + "】 条码【 " + codeStr + "】料串【" + rfid + "】,获取入库库位:");
string resultStr = HttpHelper.Post(server, ""); string resultStr = HttpHelper.Post(server, "");
LogUtil.info("CodeReceived 【" + server + "】【" + resultStr + "】"); LogUtil.info("CodeReceived 【" + server + "】【" + resultStr + "】");
...@@ -307,6 +307,42 @@ namespace OnlineStore.DeviceLibrary ...@@ -307,6 +307,42 @@ namespace OnlineStore.DeviceLibrary
} }
return msg; return msg;
} }
//皮带线获取尺寸后,料盘到达机器人取料位置进调用,如果未扫到码,或者没等到取料位置信号亮,可以不用调用
//> 地址:
//>>/rest/api/qisda/device/arriveRobotLocation
//>
//> 参数:
//>> - robotIndex=机器人编号,IP为51的机器人为1, 52的机器人为2, 53的机器人为3
//>
//> 返回:
//>>``
private static string Addr_arriveRobotLocation = "/rest/api/qisda/device/arriveRobotLocation";
public static string arriveRobotLocation(string deviceName, int robotIndex)
{
string msg = "";
try
{
if (robotIndex <= 0)
{
return msg;
}
Dictionary<string, string> paramMap = new Dictionary<string, string>();
paramMap.Add("robotIndex", robotIndex.ToString());//rfid
string server = GetAddr(Addr_arriveRobotLocation, paramMap);
string resultStr = HttpHelper.Post(server, "");
LogUtil.info(deviceName + "arriveRobotLocation 【" + server + "】【" + resultStr + "】");
}
catch (Exception ex)
{
LogUtil.error(deviceName + " " + ex.ToString());
}
return msg;
}
} }
public class LocStatus public class LocStatus
{ {
......
...@@ -17,17 +17,29 @@ namespace OnlineStore.DeviceLibrary ...@@ -17,17 +17,29 @@ namespace OnlineStore.DeviceLibrary
#region KNDIO #region KNDIO
public static void IOMove(string ioType, IO_VALUE ioValue,int subType = 0) public static void IOMove(string ioType, IO_VALUE ioValue, int subType = 0)
{ {
ConfigIO configIo = GetDO(ioType, subType); ConfigIO configIo = GetDO(ioType, subType);
if (configIo!=null) if (configIo != null)
{ {
instance.WriteSingleDO(configIo.IO_IP, configIo.SlaveID, configIo.GetIOAddr(), ioValue); instance.WriteSingleDO(configIo.IO_IP, configIo.SlaveID, configIo.GetIOAddr(), ioValue);
//如果是出料四阻挡下降,添加日志
if (ioValue.Equals(IO_VALUE.HIGH))
{
if (configIo.IO_IP.Equals("192.168.101.49") && configIo.GetIOAddr().Equals(4))
{
LogUtil.info("IOMove: ioValue= " + ioValue + ", [ " + subType + "] [" + ioType + "] [192.168.101.49][4]");
}
else if (configIo.IO_IP.Equals("192.168.101.41") && configIo.GetIOAddr().Equals(4))
{
LogUtil.info("IOMove: ioValue= " + ioValue + ", [ " + subType + "] [" + ioType + "] [192.168.101.41][4]");
}
}
Thread.Sleep(10); Thread.Sleep(10);
} }
else else
{ {
LogUtil.error("未找到DO,[" + ioType+"]["+subType+"]"); LogUtil.error("未找到DO,[" + ioType + "][" + subType + "]");
} }
} }
......
...@@ -436,9 +436,9 @@ namespace OnlineStore.DeviceLibrary ...@@ -436,9 +436,9 @@ namespace OnlineStore.DeviceLibrary
{ {
Task.Factory.StartNew(delegate Task.Factory.StartNew(delegate
{ {
LogUtil.info("定时会写IO: ["+ IoType + "]=["+ value + "],msTime="+msTime);
IOManager.IOMove(IoType, value, baseConfig.Id); IOManager.IOMove(IoType, value, baseConfig.Id);
Thread.Sleep(msTime); Thread.Sleep(msTime);
LogUtil.info("定时回写IO: [" + IoType + "]=[" + value + "],["+baseConfig.Id+"],msTime=" + msTime);
IO_VALUE tValue = value.Equals(IO_VALUE.HIGH) ? IO_VALUE.LOW : IO_VALUE.HIGH; IO_VALUE tValue = value.Equals(IO_VALUE.HIGH) ? IO_VALUE.LOW : IO_VALUE.HIGH;
IOManager.IOMove(IoType, tValue, baseConfig.Id); IOManager.IOMove(IoType, tValue, baseConfig.Id);
}); });
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!