Commit 5df80339 LN

1

1 个父辈 fd03e0ff
...@@ -176,12 +176,12 @@ namespace OnlineStore.AssemblyLine ...@@ -176,12 +176,12 @@ namespace OnlineStore.AssemblyLine
chbDebug.Checked = feedEquip.IsDebug; chbDebug.Checked = feedEquip.IsDebug;
if (feedEquip.UpdownUseAxis) if (feedEquip.UpdownUseAxis)
{ {
portName = feedEquip.Config.UpDown_Axis.DeviceName; portName = feedEquip.Config.Batch_Axis.DeviceName;
SlvAddr = feedEquip.Config.UpDown_Axis.GetAxisValue(); SlvAddr = feedEquip.Config.Batch_Axis.GetAxisValue();
txtAxisDeviceName.Text = portName; txtAxisDeviceName.Text = portName;
txtSlaveId.Text = SlvAddr.ToString(); txtSlaveId.Text = SlvAddr.ToString();
comboBox1.Items.Clear(); comboBox1.Items.Clear();
comboBox1.Items.Add(feedEquip.Config.UpDown_Axis.Explain); comboBox1.Items.Add(feedEquip.Config.Batch_Axis.Explain);
comboBox1.SelectedIndex = 0; comboBox1.SelectedIndex = 0;
txtAxisValue.Text = SlvAddr.ToString(); txtAxisValue.Text = SlvAddr.ToString();
...@@ -200,7 +200,7 @@ namespace OnlineStore.AssemblyLine ...@@ -200,7 +200,7 @@ namespace OnlineStore.AssemblyLine
cmbSizeList.SelectedIndex = 0; cmbSizeList.SelectedIndex = 0;
lblStoreStatus.Text = KTK_Store.GetRunStr(feedEquip.lineStatus, feedEquip.runStatus); lblStoreStatus.Text = KTK_Store.GetRunStr(feedEquip.lineStatus, feedEquip.runStatus);
lblThisSta.Text = feedEquip.WarnMsg; lblThisSta.Text = feedEquip.WarnMsg;
txtP1.Text = feedEquip.Config.UpDownAxisP1.ToString(); txtP1.Text = feedEquip.Config.BatchAxisP1.ToString();
IsLoad = true; IsLoad = true;
} }
...@@ -584,7 +584,7 @@ namespace OnlineStore.AssemblyLine ...@@ -584,7 +584,7 @@ namespace OnlineStore.AssemblyLine
int position = FormUtil.GetIntValue(txtSizePosition); int position = FormUtil.GetIntValue(txtSizePosition);
if (position != -1) if (position != -1)
{ {
int speed = feedEquip.Config.UpdownAxis_DownSpeed; int speed = feedEquip.Config.BatchAxis_DownSpeed;
LogUtil.info("点击【移栽位置】,料盘高度【" + cmbSizeList.Text + "】 位置【" + position + "】速度【" + speed + "】"); LogUtil.info("点击【移栽位置】,料盘高度【" + cmbSizeList.Text + "】 位置【" + position + "】速度【" + speed + "】");
ACServerManager.AbsMove(portName, SlvAddr, position, speed); ACServerManager.AbsMove(portName, SlvAddr, position, speed);
} }
...@@ -614,7 +614,7 @@ namespace OnlineStore.AssemblyLine ...@@ -614,7 +614,7 @@ namespace OnlineStore.AssemblyLine
int position = FormUtil.GetIntValue(txtP1); int position = FormUtil.GetIntValue(txtP1);
if (position != -1) if (position != -1)
{ {
int speed =feedEquip.Config.UpdownAxis_P1Speed; int speed =feedEquip.Config.BatchAxis_P1Speed;
LogUtil.info("点击【P1点测试】, 位置【" + position + "】速度【" + speed + "】"); LogUtil.info("点击【P1点测试】, 位置【" + position + "】速度【" + speed + "】");
ACServerManager.AbsMove(portName, SlvAddr, position, speed); ACServerManager.AbsMove(portName, SlvAddr, position, speed);
} }
...@@ -623,7 +623,7 @@ namespace OnlineStore.AssemblyLine ...@@ -623,7 +623,7 @@ namespace OnlineStore.AssemblyLine
private void btnSave_Click(object sender, EventArgs e) private void btnSave_Click(object sender, EventArgs e)
{ {
int p1Position = FormUtil.GetIntValue(txtP1); int p1Position = FormUtil.GetIntValue(txtP1);
feedEquip.Config.UpDownAxisP1 = p1Position; feedEquip.Config.BatchAxisP1 = p1Position;
int size = 0; int size = 0;
try { size = Convert.ToInt32(cmbSizeList.Text); } catch (Exception ex) { } try { size = Convert.ToInt32(cmbSizeList.Text); } catch (Exception ex) { }
...@@ -640,7 +640,7 @@ namespace OnlineStore.AssemblyLine ...@@ -640,7 +640,7 @@ namespace OnlineStore.AssemblyLine
int position = FormUtil.GetIntValue(txtBoxP); int position = FormUtil.GetIntValue(txtBoxP);
if (position != -1) if (position != -1)
{ {
int speed = feedEquip.Config.UpdownAxis_DownSpeed; int speed = feedEquip.Config.BatchAxis_DownSpeed;
LogUtil.info("点击【料仓门口下降位置】,料盘高度【" + cmbSizeList.Text + "】 位置【" + position + "】速度【" + speed + "】"); LogUtil.info("点击【料仓门口下降位置】,料盘高度【" + cmbSizeList.Text + "】 位置【" + position + "】速度【" + speed + "】");
ACServerManager.AbsMove(portName, SlvAddr, position, speed); ACServerManager.AbsMove(portName, SlvAddr, position, speed);
} }
......
...@@ -3,7 +3,7 @@ PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,1,,,,, ...@@ -3,7 +3,7 @@ PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,1,,,,,
,,,,,,,,, ,,,,,,,,,
PRO,0,移栽上下运动是否使用伺服,UpDownUseAxis,0,,,,, PRO,0,移栽上下运动是否使用伺服,UpDownUseAxis,0,,,,,
PRO,0,移栽上下移动料盘高度对应的上升位置,UpDownPositions,12=1000;16=1300;20=2000;24=2000;36=3000;,,,,, PRO,0,移栽上下移动料盘高度对应的上升位置,UpDownPositions,12=1000;16=1300;20=2000;24=2000;36=3000;,,,,,
AXIS,0,批量上料轴,UpDown_Axis,2,COM1,0,,, AXIS,0,批量上料轴,Batch_Axis,2,COM1,0,,,
PRO,0,批量上料轴待机点 P1,BatchAxisP1,2000,,,,, PRO,0,批量上料轴待机点 P1,BatchAxisP1,2000,,,,,
PRO,0,批量上料轴目标速度,BatchAxis_TargetSpeed,150,,,,, PRO,0,批量上料轴目标速度,BatchAxis_TargetSpeed,150,,,,,
PRO,0,批量上料轴加速度,BatchAxis_AddSpeed,400,,,,, PRO,0,批量上料轴加速度,BatchAxis_AddSpeed,400,,,,,
......
...@@ -47,15 +47,15 @@ namespace OnlineStore.DeviceLibrary ...@@ -47,15 +47,15 @@ namespace OnlineStore.DeviceLibrary
UpdownUseAxis = config.UpDownUseAxis.Equals(1); UpdownUseAxis = config.UpDownUseAxis.Equals(1);
if (UpdownUseAxis) if (UpdownUseAxis)
{ {
Config.UpDown_Axis.TargetSpeed = Config.UpdownAxis_TargetSpeed; Config.Batch_Axis.TargetSpeed = Config.BatchAxis_TargetSpeed;
Config.UpDown_Axis.AddSpeed = Config.UpdownAxis_AddSpeed; Config.Batch_Axis.AddSpeed = Config.BatchAxis_AddSpeed;
Config.UpDown_Axis.DelSpeed = Config.UpdownAxis_DelSpeed; Config.Batch_Axis.DelSpeed = Config.BatchAxis_DelSpeed;
Config.UpDown_Axis.HomeAddSpeed = Config.UpdownAxis_HomeAddSpeed; Config.Batch_Axis.HomeAddSpeed = Config.BatchAxis_HomeAddSpeed;
Config.UpDown_Axis.HomeHighSpeed = Config.UpdownAxis_HomeHighSpeed; Config.Batch_Axis.HomeHighSpeed = Config.BatchAxis_HomeHighSpeed;
Config.UpDown_Axis.HomeLowSpeed = Config.UpdownAxis_HomeLowSpeed; Config.Batch_Axis.HomeLowSpeed = Config.BatchAxis_HomeLowSpeed;
portName = Config.UpDown_Axis.DeviceName; portName = Config.Batch_Axis.DeviceName;
slvAddr = config.UpDown_Axis.GetAxisValue(); slvAddr = config.Batch_Axis.GetAxisValue();
} }
} }
...@@ -424,7 +424,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -424,7 +424,7 @@ namespace OnlineStore.DeviceLibrary
if (UpdownUseAxis) if (UpdownUseAxis)
{ {
LogInfo("停止运动:停止伺服"); LogInfo("停止运动:停止伺服");
ACServerManager.SuddenStop(Config.UpDown_Axis); ACServerManager.SuddenStop(Config.Batch_Axis);
} }
runStatus = LineRunStatus.Runing; runStatus = LineRunStatus.Runing;
MoveInfo.EndMove(); MoveInfo.EndMove();
...@@ -522,7 +522,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -522,7 +522,7 @@ namespace OnlineStore.DeviceLibrary
{ {
return true; return true;
} }
IOMove(IO_Type.UpDownAxis_ServoOn, IO_VALUE.HIGH); IOMove(IO_Type.BatchAxis_ServoOn, IO_VALUE.HIGH);
Thread.Sleep(1000); Thread.Sleep(1000);
//打开所有轴 //打开所有轴
ACServerManager.OpenPort(portName); ACServerManager.OpenPort(portName);
...@@ -530,7 +530,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -530,7 +530,7 @@ namespace OnlineStore.DeviceLibrary
//初始化 //初始化
if (!IsIntSlvBlock) if (!IsIntSlvBlock)
{ {
ACServerManager.InitSlvAddr(portName, slvAddr, Config.UpDown_Axis.TargetSpeed, Config.UpDown_Axis.AddSpeed, Config.UpDown_Axis.DelSpeed); ACServerManager.InitSlvAddr(portName, slvAddr, Config.Batch_Axis.TargetSpeed, Config.Batch_Axis.AddSpeed, Config.Batch_Axis.DelSpeed);
Thread.Sleep(100); Thread.Sleep(100);
} }
ACServerManager.AlarmClear(portName, slvAddr); ACServerManager.AlarmClear(portName, slvAddr);
...@@ -547,9 +547,15 @@ namespace OnlineStore.DeviceLibrary ...@@ -547,9 +547,15 @@ namespace OnlineStore.DeviceLibrary
} }
} }
IsIntSlvBlock = true; IsIntSlvBlock = true;
IOMove(IO_Type.UpDownAxis_BreakOn, IO_VALUE.HIGH); IOMove(IO_Type.BatchAxis_BreakOn, IO_VALUE.HIGH);
return true; return true;
} }
private void IOMove(object batchAxis_ServoOn, IO_VALUE hIGH)
{
throw new NotImplementedException();
}
/// <summary> /// <summary>
/// 打开所有轴 /// 打开所有轴
/// </summary> /// </summary>
...@@ -560,24 +566,24 @@ namespace OnlineStore.DeviceLibrary ...@@ -560,24 +566,24 @@ namespace OnlineStore.DeviceLibrary
if (ACServerManager.ServerOnStatus(portName, slvAddr)) if (ACServerManager.ServerOnStatus(portName, slvAddr))
{ {
LogUtil.info( Name + "成功打开轴:" + Config.UpDown_Axis.Explain); LogUtil.info( Name + "成功打开轴:" + Config.Batch_Axis.Explain);
} }
else else
{ {
//清理报警,再重新打开一次 //清理报警,再重新打开一次
LogUtil.info( Name + "第一次打开轴" + Config.UpDown_Axis.Explain + "失败,先清理一下报警,再重新打开一次"); LogUtil.info( Name + "第一次打开轴" + Config.Batch_Axis.Explain + "失败,先清理一下报警,再重新打开一次");
ACServerManager.AlarmClear(portName, slvAddr); ACServerManager.AlarmClear(portName, slvAddr);
System.Threading.Thread.Sleep(1200); System.Threading.Thread.Sleep(1200);
ACServerManager.ServoOn(portName, slvAddr); ACServerManager.ServoOn(portName, slvAddr);
System.Threading.Thread.Sleep(100); System.Threading.Thread.Sleep(100);
if (ACServerManager.ServerOnStatus(portName, slvAddr)) if (ACServerManager.ServerOnStatus(portName, slvAddr))
{ {
LogUtil.info( Name + "清理报警后重新打卡轴成功:" + Config.UpDown_Axis.Explain); LogUtil.info( Name + "清理报警后重新打卡轴成功:" + Config.Batch_Axis.Explain);
} }
else else
{ {
ACServerManager.ServoOff(portName, slvAddr); ACServerManager.ServoOff(portName, slvAddr);
WarnMsg = Name + "打开轴" + Config.UpDown_Axis.Explain + "失败 "; WarnMsg = Name + "打开轴" + Config.Batch_Axis.Explain + "失败 ";
LogUtil.info( Name + WarnMsg); LogUtil.info( Name + WarnMsg);
Alarm(LineAlarmType.AxisAlarm, 5.ToString(), WarnMsg, MoveInfo.MoveType); Alarm(LineAlarmType.AxisAlarm, 5.ToString(), WarnMsg, MoveInfo.MoveType);
return false; return false;
...@@ -591,14 +597,14 @@ namespace OnlineStore.DeviceLibrary ...@@ -591,14 +597,14 @@ namespace OnlineStore.DeviceLibrary
public void CloseAxis() public void CloseAxis()
{ {
LogUtil.info(Name + "关闭刹车,关闭伺服"); LogUtil.info(Name + "关闭刹车,关闭伺服");
IOMove(IO_Type.UpDownAxis_BreakOn, IO_VALUE.LOW); IOMove(IO_Type.BatchAxis_BreakOn, IO_VALUE.LOW);
ACServerManager.ServoOff(portName, slvAddr); ACServerManager.ServoOff(portName, slvAddr);
//关闭串口,等下次重新打开 //关闭串口,等下次重新打开
ACServerManager.ColsePort(portName); ACServerManager.ColsePort(portName);
Thread.Sleep(100); Thread.Sleep(100);
IOMove(IO_Type.UpDownAxis_ServoOn, IO_VALUE.LOW); IOMove(IO_Type.BatchAxis_ServoOn, IO_VALUE.LOW);
} }
...@@ -690,7 +696,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -690,7 +696,7 @@ namespace OnlineStore.DeviceLibrary
{ {
if (UpdownUseAxis) if (UpdownUseAxis)
{ {
ACAxisMove(Config.UpDown_Axis, Config.UpDownAxisP1, Config.UpdownAxis_P1Speed); ACAxisMove(Config.Batch_Axis, Config.BatchAxisP1, Config.BatchAxis_P1Speed);
} }
else else
{ {
...@@ -703,7 +709,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -703,7 +709,7 @@ namespace OnlineStore.DeviceLibrary
if (UpdownUseAxis) if (UpdownUseAxis)
{ {
int position = Config.GetUpdownPosition(trayHeight); int position = Config.GetUpdownPosition(trayHeight);
ACAxisMove(Config.UpDown_Axis, position, Config.UpdownAxis_DownSpeed); ACAxisMove(Config.Batch_Axis, position, Config.BatchAxis_DownSpeed);
} }
else else
{ {
...@@ -715,7 +721,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -715,7 +721,7 @@ namespace OnlineStore.DeviceLibrary
if (UpdownUseAxis) if (UpdownUseAxis)
{ {
int position = Config.GetUpdownBoxPosition(trayHeight); int position = Config.GetUpdownBoxPosition(trayHeight);
ACAxisMove(Config.UpDown_Axis, position,Config.UpdownAxis_DownSpeed); ACAxisMove(Config.Batch_Axis, position,Config.BatchAxis_DownSpeed);
} }
else else
{ {
...@@ -727,7 +733,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -727,7 +733,7 @@ namespace OnlineStore.DeviceLibrary
if (UpdownUseAxis) if (UpdownUseAxis)
{ {
MoveInfo.NextMoveStep(LineMoveStep.MH_UpDownHomeMove); MoveInfo.NextMoveStep(LineMoveStep.MH_UpDownHomeMove);
ACAxisHomeMove(Config.UpDown_Axis); ACAxisHomeMove(Config.Batch_Axis);
} }
else else
{ {
......
...@@ -596,22 +596,22 @@ namespace OnlineStore.DeviceLibrary ...@@ -596,22 +596,22 @@ namespace OnlineStore.DeviceLibrary
// FeederProcess(); // FeederProcess();
//如果驱动电机正转过程中,驱动电机INV1状态 驱动电机INV2状态 有信号,需要报警 //如果驱动电机正转过程中,驱动电机INV1状态 驱动电机INV2状态 有信号,需要报警
if (IOValue(IO_Type.DriveMotor_Run).Equals(IO_VALUE.HIGH)) //if (IOValue(IO_Type.DriveMotor_Run).Equals(IO_VALUE.HIGH))
{ //{
if (IOValue(IO_Type.DriveMotor_INV1).Equals(IO_VALUE.LOW)) // if (IOValue(IO_Type.DriveMotor_INV1).Equals(IO_VALUE.LOW))
{ // {
WarnMsg = "驱动电机INV1状态异常"; // WarnMsg = "驱动电机INV1状态异常";
LogUtil.error("驱动电机正转过程中,DriveMotor_INV1信号LOW,需要报警", 300); // LogUtil.error("驱动电机正转过程中,DriveMotor_INV1 信号LOW,需要报警", 300);
Alarm(LineAlarmType.SuddenStop, "1", WarnMsg, LineMoveType.None); // //Alarm(LineAlarmType.SuddenStop, "1", WarnMsg, LineMoveType.None);
} // }
else if (IOValue(IO_Type.DriveMotor_INV2).Equals(IO_VALUE.LOW)) // else if (IOValue(IO_Type.DriveMotor_INV2).Equals(IO_VALUE.LOW))
{ // {
WarnMsg = "驱动电机INV2状态异常"; // WarnMsg = "驱动电机INV2状态异常";
LogUtil.error("驱动电机正转过程中,DriveMotor_INV2信号LOW,需要报警", 301); // LogUtil.error("驱动电机正转过程中,DriveMotor_INV2 信号LOW,需要报警", 301);
Alarm(LineAlarmType.SuddenStop, "1", WarnMsg, LineMoveType.None); // // Alarm(LineAlarmType.SuddenStop, "1", WarnMsg, LineMoveType.None);
} // }
} //}
} }
} }
catch (Exception ex) catch (Exception ex)
...@@ -620,6 +620,21 @@ namespace OnlineStore.DeviceLibrary ...@@ -620,6 +620,21 @@ namespace OnlineStore.DeviceLibrary
} }
Thread.Sleep(1); Thread.Sleep(1);
} }
public string GetINVMsg()
{
if (IOValue(IO_Type.DriveMotor_Run).Equals(IO_VALUE.HIGH))
{
if (IOValue(IO_Type.DriveMotor_INV1).Equals(IO_VALUE.LOW))
{
return " 驱动电机INV1状态异常";
}
else if (IOValue(IO_Type.DriveMotor_INV2).Equals(IO_VALUE.LOW))
{
return " 驱动电机INV2状态异常";
}
}
return "";
}
/// <summary> /// <summary>
/// 定时处理,监听信号,监听IO /// 定时处理,监听信号,监听IO
/// </summary> /// </summary>
...@@ -882,15 +897,12 @@ namespace OnlineStore.DeviceLibrary ...@@ -882,15 +897,12 @@ namespace OnlineStore.DeviceLibrary
return; return;
} }
lock (moveEquip.waitInListLock)
{
// InOutParam param = new InOutParam(trayCode,wareNum, posId, plateH, plateW );
StartInStoreMove(param);
//如果当前正在出入库中,需要记录下来,等待空闲时执行
LogUtil.info( moveEquip.Name + " 收到服务器入库命令: " + param.ToStr() + " ,写入排队列表中等待!");
moveEquip.waitInStoreList.Add(param);
}
LineServer.CheckInStorePos(storeId, param); LineServer.CheckInStorePos(storeId, param);
StartInStoreMove(param);
} }
} }
} }
......
...@@ -489,13 +489,13 @@ namespace OnlineStore.DeviceLibrary ...@@ -489,13 +489,13 @@ namespace OnlineStore.DeviceLibrary
} }
case LineMoveStep.MH_OtherCylinder_Back: case LineMoveStep.MH_OtherCylinder_Back:
{ {
LogInfo("停止运行完成,停止伺服!"); LogInfo("停止运行完成!");
CloseAxis();
if (UpdownUseAxis) if (UpdownUseAxis)
{ {
LogInfo("停止运动:停止伺服"); LogInfo("停止运动:停止伺服");
ACServerManager.SuddenStop(Config.UpDown_Axis); ACServerManager.SuddenStop(Config.UpDown_Axis);
CloseAxis();
} }
runStatus = LineRunStatus.Runing; runStatus = LineRunStatus.Runing;
MoveInfo.EndMove(); MoveInfo.EndMove();
...@@ -660,14 +660,14 @@ namespace OnlineStore.DeviceLibrary ...@@ -660,14 +660,14 @@ namespace OnlineStore.DeviceLibrary
} }
public void CloseAxis() public void CloseAxis()
{ {
LogUtil.info(Name + "关闭刹车,关闭伺服"); LogUtil.info(Name + "关闭刹车,关闭伺服");
IOMove(IO_Type.UpDownAxis_BreakOn, IO_VALUE.LOW); IOMove(IO_Type.UpDownAxis_BreakOn, IO_VALUE.LOW);
ACServerManager.ServoOff(portName, slvAddr); ACServerManager.ServoOff(portName, slvAddr);
//关闭串口,等下次重新打开 //关闭串口,等下次重新打开
ACServerManager.ColsePort(portName); // ACServerManager.ColsePort(portName);
Thread.Sleep(100); Thread.Sleep(100);
IOMove(IO_Type.UpDownAxis_ServoOn, IO_VALUE.LOW); IOMove(IO_Type.UpDownAxis_ServoOn, IO_VALUE.LOW);
......
...@@ -90,6 +90,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -90,6 +90,7 @@ namespace OnlineStore.DeviceLibrary
LastSetpTime = DateTime.Now; LastSetpTime = DateTime.Now;
IsInWait = true; IsInWait = true;
WaitList = new List<WaitResultInfo>(); WaitList = new List<WaitResultInfo>();
WriteIoList = new List<WriteIOInfo>();
OneWaitCanEndStep = false; OneWaitCanEndStep = false;
CanWhileCount = 5; CanWhileCount = 5;
} }
...@@ -100,6 +101,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -100,6 +101,7 @@ namespace OnlineStore.DeviceLibrary
{ {
IsInWait = false; IsInWait = false;
WaitList = new List<WaitResultInfo>(); WaitList = new List<WaitResultInfo>();
WriteIoList = new List<WriteIOInfo>();
} }
public void NewMove(LineMoveType type ) public void NewMove(LineMoveType type )
{ {
...@@ -107,6 +109,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -107,6 +109,7 @@ namespace OnlineStore.DeviceLibrary
this.moveType = type; this.moveType = type;
LastSetpTime = DateTime.Now; LastSetpTime = DateTime.Now;
WaitList = new List<WaitResultInfo>(); WaitList = new List<WaitResultInfo>();
WriteIoList = new List<WriteIOInfo>();
MoveNum++; MoveNum++;
} }
public void NewMove(LineMoveType type, InOutParam param) public void NewMove(LineMoveType type, InOutParam param)
...@@ -116,6 +119,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -116,6 +119,7 @@ namespace OnlineStore.DeviceLibrary
this.MoveParam = param; this.MoveParam = param;
LastSetpTime = DateTime.Now; LastSetpTime = DateTime.Now;
WaitList = new List<WaitResultInfo>(); WaitList = new List<WaitResultInfo>();
WriteIoList = new List<WriteIOInfo>();
} }
public void EndMove() public void EndMove()
{ {
...@@ -125,6 +129,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -125,6 +129,7 @@ namespace OnlineStore.DeviceLibrary
LastSetpTime = DateTime.Now; LastSetpTime = DateTime.Now;
IsInWait = false; IsInWait = false;
WaitList = new List<WaitResultInfo>(); WaitList = new List<WaitResultInfo>();
WriteIoList = new List<WriteIOInfo>();
CanWhileCount = 0; CanWhileCount = 0;
} }
public LineMoveInfo clone() public LineMoveInfo clone()
...@@ -133,6 +138,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -133,6 +138,7 @@ namespace OnlineStore.DeviceLibrary
} }
public List<WaitResultInfo> WaitList = new List<WaitResultInfo>(); public List<WaitResultInfo> WaitList = new List<WaitResultInfo>();
public List<WriteIOInfo> WriteIoList = new List<WriteIOInfo>();
/// <summary> /// <summary>
/// 重置之后继续出入库时,退回上一个步骤执行 /// 重置之后继续出入库时,退回上一个步骤执行
/// </summary> /// </summary>
...@@ -142,7 +148,18 @@ namespace OnlineStore.DeviceLibrary ...@@ -142,7 +148,18 @@ namespace OnlineStore.DeviceLibrary
IsInWait = false; IsInWait = false;
} }
} }
public class WriteIOInfo
{
public static WriteIOInfo NInfo(string type,IO_VALUE value)
{
WriteIOInfo i = new WriteIOInfo();
i.IoType = type;
i.IoValue = value;
return i;
}
public string IoType = "";
public IO_VALUE IoValue = IO_VALUE.HIGH;
}
public class WaitResultInfo public class WaitResultInfo
{ {
private WaitResultInfo() private WaitResultInfo()
...@@ -256,6 +273,12 @@ namespace OnlineStore.DeviceLibrary ...@@ -256,6 +273,12 @@ namespace OnlineStore.DeviceLibrary
wait.WaitType = 9; wait.WaitType = 9;
return wait; return wait;
} }
public static WaitResultInfo WaitSideWay()
{
WaitResultInfo wait = new WaitResultInfo();
wait.WaitType = 10;
return wait;
}
public string ToStr() public string ToStr()
{ {
if (WaitType == 1) if (WaitType == 1)
...@@ -298,6 +321,9 @@ namespace OnlineStore.DeviceLibrary ...@@ -298,6 +321,9 @@ namespace OnlineStore.DeviceLibrary
else if (WaitType == 9) else if (WaitType == 9)
{ {
return "BOX可以开始入库"; return "BOX可以开始入库";
}else if (WaitType == 10)
{
return "等待横移34无托盘";
} }
else else
{ {
...@@ -354,7 +380,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -354,7 +380,7 @@ namespace OnlineStore.DeviceLibrary
/// </summary> /// </summary>
public int HeightValue { get; set; } public int HeightValue { get; set; }
} }
public enum LineMoveType public enum LineMoveType
{ {
......
...@@ -238,7 +238,11 @@ namespace OnlineStore.DeviceLibrary ...@@ -238,7 +238,11 @@ namespace OnlineStore.DeviceLibrary
/// <summary> /// <summary>
/// 移载(流水线)装置出库处理 ,顶升气缸1下降 /// 移载(流水线)装置出库处理 ,顶升气缸1下降
/// </summary> /// </summary>
MO_09_TopCylinder_Down = 3109, MO_06_TopCylinder_Down = 3106,
/// <summary>
/// 如果是移栽2需要等待托盘是否可以走
/// </summary>
MO_07_WaitCanGo=3107,
/// <summary> /// <summary>
/// 移载(流水线)装置出库处理, 阻挡气缸1-2下降 /// 移载(流水线)装置出库处理, 阻挡气缸1-2下降
/// </summary> /// </summary>
...@@ -374,6 +378,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -374,6 +378,7 @@ namespace OnlineStore.DeviceLibrary
#region 横移轨道处理 #region 横移轨道处理
SW00_Wait=5000,
/// <summary> /// <summary>
/// 阻挡气缸下降 /// 阻挡气缸下降
/// </summary> /// </summary>
...@@ -398,18 +403,22 @@ namespace OnlineStore.DeviceLibrary ...@@ -398,18 +403,22 @@ namespace OnlineStore.DeviceLibrary
/// </summary> /// </summary>
SW05_WaitOutFixtureCheck=5005, SW05_WaitOutFixtureCheck=5005,
/// <summary> /// <summary>
/// 等待出口信号持续一段时间
/// </summary>
SW06_WatOutFixture2=5006,
/// <summary>
/// 停止横移轨道转动,横移轨道顶升气缸下降 /// 停止横移轨道转动,横移轨道顶升气缸下降
/// </summary> /// </summary>
SW06_TopCylinderDown=5006, SW07_TopCylinderDown=5007,
/// <summary> /// <summary>
/// 阻挡2下降,等待托盘流出 /// 阻挡2下降,等待托盘流出
/// </summary> /// </summary>
SW07_StopDrive=5007, SW08_StopDrive=5008,
/// <summary> /// <summary>
/// 等待托盘流出,上升阻挡气缸 /// 等待托盘流出,上升阻挡气缸
/// </summary> /// </summary>
SW08_WaitTrayGo=5008, SW09_WaitTrayGo=5009,
#endregion #endregion
......
...@@ -113,6 +113,27 @@ namespace OnlineStore.DeviceLibrary ...@@ -113,6 +113,27 @@ namespace OnlineStore.DeviceLibrary
} }
return false; return false;
} }
public static bool IsInStorePro(int id)
{
BoxInfo box = GetBoxInfo(id);
TimeSpan span = DateTime.Now - box.LastMsgTime;
if (box != null && span.TotalSeconds < ClientKeepSecond)
{
LineStatus status = (LineStatus)box.SStatus;
LineRunStatus runs = (LineRunStatus)box.SRunStatus;
if (runs.Equals(LineRunStatus.Busy))
{
if (status.Equals(LineStatus.InStoreEnd) || status.Equals(LineStatus.InStoreExecute))
{
return true;
}
}
}
return false;
}
/// <summary> /// <summary>
/// 获取所有在线的CID /// 获取所有在线的CID
/// </summary> /// </summary>
......
...@@ -51,8 +51,8 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -51,8 +51,8 @@ namespace OnlineStore.LoadCSVLibrary
/// <summary> /// <summary>
/// AXIS 0 批量上料轴 UpDown_Axis 2 /// AXIS 0 批量上料轴 UpDown_Axis 2
/// </summary> /// </summary>
[ConfigProAttribute("UpDown_Axis", false)] [ConfigProAttribute("Batch_Axis", false)]
public ConfigMoveAxis UpDown_Axis { get; set; } public ConfigMoveAxis Batch_Axis { get; set; }
/// <summary> /// <summary>
/// PRO 0 批量上料轴待机点 P1 BatchAxisP1 403000 /// PRO 0 批量上料轴待机点 P1 BatchAxisP1 403000
/// </summary> /// </summary>
......
...@@ -287,11 +287,10 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -287,11 +287,10 @@ namespace OnlineStore.LoadCSVLibrary
/// DO 0 移载4升降轴伺服ON UpDownAxis_ServoOn 31 移载4升降轴伺服ON Y08 DO-08 /// DO 0 移载4升降轴伺服ON UpDownAxis_ServoOn 31 移载4升降轴伺服ON Y08 DO-08
/// </summary> /// </summary>
public static string UpDownAxis_ServoOn = "UpDownAxis_ServoOn"; public static string UpDownAxis_ServoOn = "UpDownAxis_ServoOn";
///// <summary>
/////
///// </summary>
//public static string Right_Door_LimitSingle = "Right_Door_LimitSingle";
public static string BatchAxis_BreakOn = "BatchAxis_BreakOn";
public static string BatchAxis_ServoOn = "BatchAxis_ServoOn";
} }
public enum IO_VALUE public enum IO_VALUE
{ {
......
...@@ -289,6 +289,15 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -289,6 +289,15 @@ namespace OnlineStore.LoadCSVLibrary
return DOList[ioType]; return DOList[ioType];
} }
return null; return null;
} }
public string GetDisplayName(string ioType)
{
ConfigIO io = getWaitIO(ioType);
if (io == null)
{
return ioType;
}
return io.DisplayStr;
}
} }
} }
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!