Commit ac07ba06 LN

过板模式问题修改

1 个父辈 4195e73d
...@@ -309,6 +309,19 @@ namespace TSA_V.DeviceLibrary ...@@ -309,6 +309,19 @@ namespace TSA_V.DeviceLibrary
} }
} }
public static void RemoveNode()
{
foreach (Dictionary<int, NodeInfo> map in RotateMap.Values)
{
foreach (NodeInfo nodeid in map.Values)
{
PUSICANControl.RemoveNode(nodeid.NodeId);
}
}
}
private static void XYHomeMove_3() private static void XYHomeMove_3()
{ {
...@@ -415,6 +428,12 @@ namespace TSA_V.DeviceLibrary ...@@ -415,6 +428,12 @@ namespace TSA_V.DeviceLibrary
if (WorkModeUtil.OnlyGuoBan) if (WorkModeUtil.OnlyGuoBan)
{ {
if (!IOBase.NoLine)
{
PUSICANControl.InitRNodeConfig(LWidthManager.Line_NodeAddr, true);
Thread.Sleep(10);
}
if (lineOk) if (lineOk)
{ {
ToRunning("当前为过板模式,转盘不需要复位,复位完成,进入运行状态"); ToRunning("当前为过板模式,转盘不需要复位,复位完成,进入运行状态");
...@@ -795,21 +814,28 @@ namespace TSA_V.DeviceLibrary ...@@ -795,21 +814,28 @@ namespace TSA_V.DeviceLibrary
LogUtil.info("StopMove,停止所有运动"); LogUtil.info("StopMove,停止所有运动");
BottomCylinderDown(false); BottomCylinderDown(false);
CylinderMove(IOManager.StopCylinder_Down, IOManager.StopCylinder_Up, false); CylinderMove(IOManager.StopCylinder_Down, IOManager.StopCylinder_Up, false);
SideCyliderBack(false ); SideCyliderBack(false);
Work.StopWork(); Work.StopWork();
LineStep.EndMove(); LineStep.EndMove();
IOManager.IOMove(IOManager.Line_FStart, IO_VALUE.LOW); IOManager.IOMove(IOManager.Line_FStart, IO_VALUE.LOW);
LogUtil.info("StopMove,开始停止所有旋转轴"); LogUtil.info("StopMove,开始停止所有旋转轴");
foreach (Dictionary<int, NodeInfo> map in RotateMap.Values) if (WorkModeUtil.OnlyGuoBan)
{ {
foreach (NodeInfo nodeid in map.Values) LogUtil.info("StopMove,仅过板模式,不需要停止旋转轴");
}
else
{
foreach (Dictionary<int, NodeInfo> map in RotateMap.Values)
{ {
if (PUSICANControl.IsBusy(nodeid.NodeId)) foreach (NodeInfo nodeid in map.Values)
{ {
PUSICANControl.StopMove(nodeid.NodeId); if (PUSICANControl.IsBusy(nodeid.NodeId))
Thread.Sleep(PUSICANControl.SleepMS); {
PUSICANControl.StopMove(nodeid.NodeId);
Thread.Sleep(PUSICANControl.SleepMS);
}
} }
} }
} }
......
using System; using PUSICANLibrary;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using System.Text; using System.Text;
...@@ -64,7 +65,9 @@ namespace TSA_V.DeviceLibrary ...@@ -64,7 +65,9 @@ namespace TSA_V.DeviceLibrary
if (result.Equals(DialogResult.OK)) if (result.Equals(DialogResult.OK))
{ {
OnlyGuoBan = true; OnlyGuoBan = true;
LogUtil.info(Name + " 选择过板模式,不需要复位料塔"); LogUtil.info(Name + " 选择过板模式,不需要复位料塔 ");
TSAVBean.RemoveNode();
} }
else else
{ {
......
...@@ -170,6 +170,7 @@ namespace PUSICANLibrary ...@@ -170,6 +170,7 @@ namespace PUSICANLibrary
int port = 4001; int port = 4001;
Ip = ConfigAppSettings.GetValue(Setting_Init.PUSICAN_Ip); Ip = ConfigAppSettings.GetValue(Setting_Init.PUSICAN_Ip);
port = ConfigAppSettings.GetIntValue(Setting_Init.PUSICAN_Port); port = ConfigAppSettings.GetIntValue(Setting_Init.PUSICAN_Port);
LogUtil.info("PUSICANControl Open");
return Open(adapterIndex, baudIndex, Ip, port); return Open(adapterIndex, baudIndex, Ip, port);
} }
...@@ -179,6 +180,7 @@ namespace PUSICANLibrary ...@@ -179,6 +180,7 @@ namespace PUSICANLibrary
{ {
if (ISOpen) if (ISOpen)
{ {
LogUtil.info("PUSICANControl Close");
PUSICO_Close(); PUSICO_Close();
ISOpen = false; ISOpen = false;
} }
...@@ -269,6 +271,13 @@ namespace PUSICANLibrary ...@@ -269,6 +271,13 @@ namespace PUSICANLibrary
result = PUSICANControl.PUSICO_SetNodeState(nodeid, SLAVE_MANAGEMENT.SLAVE_START); result = PUSICANControl.PUSICO_SetNodeState(nodeid, SLAVE_MANAGEMENT.SLAVE_START);
return SetOutStopType(nodeid); return SetOutStopType(nodeid);
} }
public static bool RemoveNode(uint nodeid)
{
LogUtil.info("RemoveNode " + nodeid);
//删除节点
PUSIResult result = PUSICANControl.PUSICO_RemoveNode(Convert.ToUInt32(nodeid));
return true;
}
public static bool InitRNodeConfig(uint nodeId, bool isLineSlv = false) public static bool InitRNodeConfig(uint nodeId, bool isLineSlv = false)
{ {
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!