Commit 419a02c5 刘韬

去除未使用IO及汇川轴不需要的伺服IO

1 个父辈 1c43d39d
......@@ -24,7 +24,6 @@ namespace OnlineStore.DUOStore
private short SlvAddr = 0;
private string IoIp = "";
private int IoIndex = 0;
public string Axis_Brake = IO_Type.UpdownAxis_Break;
private int subType = 0;
private System.Timers.Timer toolTimer = new System.Timers.Timer();
public int ptpAcc=0;
......@@ -123,14 +122,6 @@ namespace OnlineStore.DUOStore
Thread.Sleep(100);
AxisManager.instance.AlarmClear(PortName, SlvAddr);
AxisManager.instance.ServoOn(PortName, SlvAddr);
try
{
IOManager.IOMove(Axis_Brake, IO_VALUE.HIGH,subType);
}catch(Exception ex)
{
}
}
......@@ -140,14 +131,6 @@ namespace OnlineStore.DUOStore
// toolTimer.Stop();
AxisManager.instance.SuddenStop(PortName, SlvAddr);
Thread.Sleep(100);
try
{
IOManager.IOMove(Axis_Brake, IO_VALUE.LOW,subType);
}
catch (Exception ex)
{
}
AxisManager.instance.ServoOff(PortName, SlvAddr);
formStatus(false);
}
......
......@@ -90,7 +90,7 @@ namespace OnlineStore.DeviceLibrary
}
internal void MoveAxisConfig()
{
Config.UpDown_Axis.BreakOnDO = IO_Type.UpdownAxis_Break;
//Config.UpDown_Axis.BreakOnDO = IO_Type.UpdownAxis_Break;
moveAxisList = new List<ConfigMoveAxis>();
moveAxisList.Add(Config.Middle_Axis);
moveAxisList.Add(Config.UpDown_Axis);
......@@ -366,7 +366,7 @@ namespace OnlineStore.DeviceLibrary
public override void StopMove()
{
MoveInfo.EndMove();
IOMove(IO_Type.UpdownAxis_Break, IO_VALUE.LOW);
//IOMove(IO_Type.UpdownAxis_Break, IO_VALUE.LOW);
//运动版停止
MiddleAxis.SuddenStop();
UpdownAxis.SuddenStop();
......@@ -379,12 +379,12 @@ namespace OnlineStore.DeviceLibrary
public bool OpenAllAxis(bool isCheck)
{
return RunMultiAxis(true, IO_Type.Axis_Run, IO_Type.UpdownAxis_Break, new AxisBean[] { MiddleAxis, UpdownAxis, InoutAxis, ComAxis });
return RunMultiAxis(true,new AxisBean[] { MiddleAxis, UpdownAxis, InoutAxis, ComAxis });
}
public void CloseAllAxis()
{
LogUtil.info(Name + "关闭刹车,关闭伺服");
CloseMultiAxis(IO_Type.Axis_Run, IO_Type.UpdownAxis_Break, new AxisBean[] { MiddleAxis, UpdownAxis, InoutAxis, ComAxis });
CloseMultiAxis(new AxisBean[] { MiddleAxis, UpdownAxis, InoutAxis, ComAxis });
}
......
......@@ -63,8 +63,7 @@ namespace OnlineStore.DeviceLibrary
BoxMap.Add(config.Id, equip);
BoxConfigMap.Add(config.Id, config);
}
Config.T3_Updown_Axis.BreakOnDO = IO_Type.MoveAxis_Break;
Config.T1_Batch_Axis.BreakOnDO = IO_Type.BatchAxis_Break;
//Config.T1_Batch_Axis.BreakOnDO = IO_Type.BatchAxis_Break;
T1_BatchAxis = new AxisBean(Config.T1_Batch_Axis, Name);
T2_MiddleAxis = new AxisBean(Config.T2_Middle_Axis,Name);
T3_UpdownAxis = new AxisBean(Config.T3_Updown_Axis,Name);
......@@ -654,7 +653,7 @@ namespace OnlineStore.DeviceLibrary
public bool OpenAllAxis(bool isCheck = true)
{
if (RunMultiAxis(isCheck, IO_Type.MoveAxis_Run, IO_Type.MoveAxis_Break, new AxisBean []{ T3_UpdownAxis,T2_MiddleAxis}))
if (RunMultiAxis(isCheck, new AxisBean []{ T3_UpdownAxis,T2_MiddleAxis}))
{
if (RunAxis(isCheck, T1_BatchAxis) )
{
......@@ -666,10 +665,7 @@ namespace OnlineStore.DeviceLibrary
public void CloseAllAxis()
{
IOMove(IO_Type.MoveAxis_Break, IO_VALUE.LOW);
IOMove(IO_Type.BatchAxis_Break, IO_VALUE.LOW);
CloseMultiAxis(IO_Type.MoveAxis_Run, IO_Type.MoveAxis_Break, new AxisBean[] { T3_UpdownAxis, T2_MiddleAxis });
CloseMultiAxis(new AxisBean[] { T3_UpdownAxis, T2_MiddleAxis });
CloseAxis(T1_BatchAxis);
}
}
......
......@@ -459,7 +459,6 @@ namespace OnlineStore.DeviceLibrary
public bool RunMultiAxis(bool isCheck, params AxisBean[] axisArray)
{
IOManager.IOMove(serverOnDO, IO_VALUE.HIGH, baseConfig.Id);
string msg = "";
foreach (AxisBean axis in axisArray)
{
......@@ -485,19 +484,15 @@ namespace OnlineStore.DeviceLibrary
// }
// }
//}
IOManager.IOMove(breakOnDO, IO_VALUE.HIGH, baseConfig.Id);
return true;
}
public void CloseMultiAxis(string serverOnDO, string breakOnDO, params AxisBean[] axisArray)
public void CloseMultiAxis(params AxisBean[] axisArray)
{
IOManager.IOMove(breakOnDO, IO_VALUE.LOW, baseConfig.Id);
foreach (AxisBean axis in axisArray)
{
axis.ServoOff();
}
Thread.Sleep(100);
IOManager.IOMove(serverOnDO, IO_VALUE.LOW, baseConfig.Id);
}
public bool RunAxis(bool isCheck, AxisBean axis)
......
......@@ -184,7 +184,7 @@ namespace OnlineStore.LoadCSVLibrary
/// <summary>
/// DO,0,取料机构伺服ON,MoveAxis_Run,1,PRO_AOI_IP_2,Y22,
/// </summary>
public static string MoveAxis_Run = "MoveAxis_Run";
//public static string MoveAxis_Run = "MoveAxis_Run";
/// <summary>
/// DO,0,线体皮带正转,Line_Run,2,PRO_AOI_IP_2,Y23,
/// </summary>
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!