Commit 6d6f260e 刘韬

1

1 个父辈 1b1649f4
...@@ -11,6 +11,11 @@ namespace DeviceLibrary ...@@ -11,6 +11,11 @@ namespace DeviceLibrary
{ {
public class LiftMonitor:ISafetyDevice public class LiftMonitor:ISafetyDevice
{ {
/// <summary>
/// 关闭端延时
/// </summary>
public int DownOverTimeMS = 0;
public int UpOverTimeMS = 0;
string up; string up;
string down; string down;
string axisbreak; string axisbreak;
...@@ -84,6 +89,8 @@ namespace DeviceLibrary ...@@ -84,6 +89,8 @@ namespace DeviceLibrary
return; return;
} }
} }
if (UpOverTimeMS > 0)
Task.Delay(UpOverTimeMS).Wait();
axisBean.SuddenStop(); axisBean.SuddenStop();
if (!string.IsNullOrEmpty(axisbreak)) if (!string.IsNullOrEmpty(axisbreak))
{ {
...@@ -99,6 +106,8 @@ namespace DeviceLibrary ...@@ -99,6 +106,8 @@ namespace DeviceLibrary
{ {
if (IOManager.IOValue(up.ToString()).Equals(IO_VALUE.HIGH)) if (IOManager.IOValue(up.ToString()).Equals(IO_VALUE.HIGH))
{ {
if (UpOverTimeMS > 0)
Task.Delay(UpOverTimeMS).Wait();
axisBean.SuddenStop(); axisBean.SuddenStop();
if (!string.IsNullOrEmpty(axisbreak)) if (!string.IsNullOrEmpty(axisbreak))
...@@ -159,6 +168,8 @@ namespace DeviceLibrary ...@@ -159,6 +168,8 @@ namespace DeviceLibrary
return; return;
} }
} }
if (DownOverTimeMS > 0)
Task.Delay(DownOverTimeMS).Wait();
axisBean.SuddenStop(); axisBean.SuddenStop();
if (!string.IsNullOrEmpty(axisbreak)) if (!string.IsNullOrEmpty(axisbreak))
{ {
...@@ -173,6 +184,8 @@ namespace DeviceLibrary ...@@ -173,6 +184,8 @@ namespace DeviceLibrary
{ {
if (IOManager.IOValue(down.ToString()).Equals(IO_VALUE.HIGH)) if (IOManager.IOValue(down.ToString()).Equals(IO_VALUE.HIGH))
{ {
if (DownOverTimeMS > 0)
Task.Delay(DownOverTimeMS).Wait();
axisBean.SuddenStop(); axisBean.SuddenStop();
if (!string.IsNullOrEmpty(axisbreak)) if (!string.IsNullOrEmpty(axisbreak))
......
...@@ -136,6 +136,8 @@ namespace DeviceLibrary ...@@ -136,6 +136,8 @@ namespace DeviceLibrary
RobotManage.Config.DOList.Remove(IO_Type.StringDoor_Open); RobotManage.Config.DOList.Remove(IO_Type.StringDoor_Open);
RobotManage.Config.DOList.Remove(IO_Type.StringDoor_Close); RobotManage.Config.DOList.Remove(IO_Type.StringDoor_Close);
StringDoor = new LiftMonitor(IO_Type.StringDoor_Open, IO_Type.StringDoor_Close, IO_Type.StringDoor_Axis_Break, new AxisBean(Config.StringDoor_Axis, Name), Config.StringDoorLength, Config.StringDoorLength_speed); StringDoor = new LiftMonitor(IO_Type.StringDoor_Open, IO_Type.StringDoor_Close, IO_Type.StringDoor_Axis_Break, new AxisBean(Config.StringDoor_Axis, Name), Config.StringDoorLength, Config.StringDoorLength_speed);
StringDoor.DownOverTimeMS = 300;
StringDoor.UpOverTimeMS = 100;
LogUtil.info("加载料串门类型为:步进"); LogUtil.info("加载料串门类型为:步进");
//此版本同步删除其他IO //此版本同步删除其他IO
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!