Commit 1c633ffd LN

1

1 个父辈 b5cb8691
...@@ -588,29 +588,24 @@ namespace OnlineStore.ACPackingStore ...@@ -588,29 +588,24 @@ namespace OnlineStore.ACPackingStore
{ {
if (BoxBean.AutoInout.autoNext) if (BoxBean.AutoInout.autoNext)
{ {
BoxBean.AutoInout.autoNext = false; BoxBean.AutoInout.StopAuto();
btnStartAuTo.Text = "开始自动出入库"; btnStartAuTo.Text = "开始自动出入库";
} }
else else
{ {
DialogResult res = MessageBox.Show("确定开始自动出入库?", "提示", MessageBoxButtons.YesNo); DialogResult res = MessageBox.Show("确定开始自动出入库?", "提示", MessageBoxButtons.YesNo);
if (res.Equals(DialogResult.Yes)) if (res.Equals(DialogResult.Yes) && cmbPosition.SelectedIndex >= 0)
{ {
BoxBean.AutoInout.autoNext = true;
int jiange = FormUtil.GetIntValue(txtJiange); int jiange = FormUtil.GetIntValue(txtJiange);
BoxBean.AutoInout.Jiange = jiange; int currIndex = cmbPosition.SelectedIndex;
if (cmbPosition.SelectedIndex >= 0) BoxBean.AutoInout.StartAuto(jiange, currIndex, cmbShelfPosition.Text);
{
int currIndex = cmbPosition.SelectedIndex; string poText = cmbPosition.Text;
BoxBean.AutoInout.positionIndex = currIndex; BoxBean.AutoInout.autoMsg = "自动出库:" + poText;
BoxBean.AutoInout.startIndex = currIndex; LogUtil.info(LOGGER, BoxBean.Name + "开启自动出入库模式,开始位置【" + poText + "】(索引=" + currIndex + "),间隔=" + jiange + ",入库开始!");
BoxBean.AutoInout.shelfPosId = cmbShelfPosition.Text; //BoxBean.StartOutStoreMove(new InOutStoreParam("", poText));
string poText = cmbPosition.Text; BoxBean.StartInStoreMove(new InOutParam("", poText, cmbShelfPosition.Text));
BoxBean.AutoInout.autoMsg = "自动出库:" + poText;
LogUtil.info(LOGGER, BoxBean.Name + "开启自动出入库模式,开始位置【" + poText + "】(索引=" + currIndex + "),间隔=" + jiange + ",入库开始!");
//BoxBean.StartOutStoreMove(new InOutStoreParam("", poText));
BoxBean.StartInStoreMove(new InOutParam("", poText, BoxBean.AutoInout.shelfPosId));
}
btnStartAuTo.Text = "停止自动出入库"; btnStartAuTo.Text = "停止自动出入库";
} }
} }
......
...@@ -121,6 +121,7 @@ ...@@ -121,6 +121,7 @@
this.chkDebug.TabIndex = 194; this.chkDebug.TabIndex = 194;
this.chkDebug.Text = "开启DEBUG日志"; this.chkDebug.Text = "开启DEBUG日志";
this.chkDebug.UseVisualStyleBackColor = true; this.chkDebug.UseVisualStyleBackColor = true;
this.chkDebug.CheckedChanged += new System.EventHandler(this.chkDebug_CheckedChanged);
// //
// chbAutoRun // chbAutoRun
// //
......
...@@ -408,5 +408,11 @@ namespace OnlineStore.ACPackingStore ...@@ -408,5 +408,11 @@ namespace OnlineStore.ACPackingStore
LogUtil.info("去掉:启用蜂鸣器"); LogUtil.info("去掉:启用蜂鸣器");
} }
} }
private void chkDebug_CheckedChanged(object sender, EventArgs e)
{
LogUtil.debug_opened = chkDebug.Checked;
LogUtil.info("debug_opened:" + chkDebug.Checked);
}
} }
} }
...@@ -34,7 +34,7 @@ namespace OnlineStore.ACPackingStore ...@@ -34,7 +34,7 @@ namespace OnlineStore.ACPackingStore
this.SlvAddr = slvAddr; this.SlvAddr = slvAddr;
this.IoIp = ioIp; this.IoIp = ioIp;
this.IoIndex = ioIndex; this.IoIndex = ioIndex;
boxName = boxName.Trim().Replace("料仓", ""); boxName = text.Trim().Replace("料仓", "");
this.Text = boxName + "_升降轴位置调试"; this.Text = boxName + "_升降轴位置调试";
LogName = boxName + "_升降轴调试:"; LogName = boxName + "_升降轴调试:";
toolTimer.Enabled = false; toolTimer.Enabled = false;
......
...@@ -6,7 +6,5 @@ ...@@ -6,7 +6,5 @@
//温湿度超限报警中 亮 闪 灭 //温湿度超限报警中 亮 闪 灭
//温湿度超限报警中超过30分钟 亮 闪 闪 //温湿度超限报警中超过30分钟 亮 闪 闪
//机器未启动 灭 灭 灭 //机器未启动 灭 灭 灭
//机器设备故障(非温湿度)报警 亮 灭 闪 //机器设备故障(非温湿度)报警 亮 灭 闪
新建分支RC1250-ACPackingStore,作为佳世达流水线单台包装料料仓软件
在RC1246-ACPackingStore 项目基础上,
新建分支RC1250-ACPackingStore,作为佳世达流水线单台料仓软件
...@@ -27,7 +27,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -27,7 +27,7 @@ namespace OnlineStore.DeviceLibrary
public string lastPosId = ""; public string lastPosId = "";
public StoreStatus lastPosIdStatus = StoreStatus.StoreOnline; public StoreStatus lastPosIdStatus = StoreStatus.StoreOnline;
public List<ConfigMoveAxis> moveAxisList = new List<ConfigMoveAxis>(); public List<ConfigMoveAxis> moveAxisList = new List<ConfigMoveAxis>();
private Dictionary<string, AxisAlarmInfo> AxisAlarmCodeMap = new Dictionary<string, AxisAlarmInfo>(); // private Dictionary<string, AxisAlarmInfo> AxisAlarmCodeMap = new Dictionary<string, AxisAlarmInfo>();
public List<string> PositionNumList = new List<string>(); public List<string> PositionNumList = new List<string>();
public List<string> ShelfPosList = new List<string>(); public List<string> ShelfPosList = new List<string>();
/// <summary> /// <summary>
...@@ -121,14 +121,14 @@ namespace OnlineStore.DeviceLibrary ...@@ -121,14 +121,14 @@ namespace OnlineStore.DeviceLibrary
moveAxisList.Add(Config.Middle_Axis); moveAxisList.Add(Config.Middle_Axis);
moveAxisList.Add(Config.UpDown_Axis); moveAxisList.Add(Config.UpDown_Axis);
moveAxisList.Add(Config.InOut_Axis); moveAxisList.Add(Config.InOut_Axis);
moveAxisList.Add(Config.Comp_Axis);
this.AxisAlarmCodeMap = new Dictionary<string, AxisAlarmInfo>(); //this.AxisAlarmCodeMap = new Dictionary<string, AxisAlarmInfo>();
this.AxisAlarmCodeMap.Add(Config.UpDown_Axis.GetNameStr(), new AxisAlarmInfo()); //this.AxisAlarmCodeMap.Add(Config.UpDown_Axis.GetNameStr(), new AxisAlarmInfo());
this.AxisAlarmCodeMap.Add(Config.InOut_Axis.GetNameStr(), new AxisAlarmInfo()); //this.AxisAlarmCodeMap.Add(Config.InOut_Axis.GetNameStr(), new AxisAlarmInfo());
this.AxisAlarmCodeMap.Add(this.Config.Middle_Axis.GetNameStr(), new AxisAlarmInfo()); //this.AxisAlarmCodeMap.Add(this.Config.Middle_Axis.GetNameStr(), new AxisAlarmInfo());
moveAxisList.Add(Config.Comp_Axis); //this.AxisAlarmCodeMap.Add(this.Config.Comp_Axis.GetNameStr(), new AxisAlarmInfo());
this.AxisAlarmCodeMap.Add(this.Config.Comp_Axis.GetNameStr(), new AxisAlarmInfo());
} }
/// <summary> /// <summary>
...@@ -138,7 +138,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -138,7 +138,7 @@ namespace OnlineStore.DeviceLibrary
{ {
LogInfo("开始启动,启动时间:" + StartTime.ToString()); LogInfo("开始启动,启动时间:" + StartTime.ToString());
AutoInout.autoNext = false; AutoInout.StopAuto();
mainTimer.Enabled = false; mainTimer.Enabled = false;
alarmType = StoreAlarmType.None; alarmType = StoreAlarmType.None;
...@@ -205,10 +205,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -205,10 +205,7 @@ namespace OnlineStore.DeviceLibrary
MoveInfo.NewMove(StoreMoveType.StoreReset); MoveInfo.NewMove(StoreMoveType.StoreReset);
MoveInfo.NextMoveStep(StoreMoveStep.BOX_M_H_TOP1_InOutToP1); MoveInfo.NextMoveStep(StoreMoveStep.BOX_M_H_TOP1_InOutToP1);
LogInfo("到待机状态,进出轴到P1,判断叉子没有料盘"); LogInfo("到待机状态,进出轴到P1,判断叉子没有料盘");
ACAxisMove(Config.InOut_Axis, Config.InOutAxis_P1_Position, Config.InOutAxis_P1_Speed); ACAxisMove(Config.InOut_Axis, Config.InOutAxis_P1_Position, Config.InOutAxis_P1_Speed);
//ComBeforeHomeMove();
//判断叉子没有料盘
//StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.TrayCheck_Fixture, IO_VALUE.LOW));
} }
public override void Reset(bool isNeedClearAuto = true) public override void Reset(bool isNeedClearAuto = true)
...@@ -220,13 +217,13 @@ namespace OnlineStore.DeviceLibrary ...@@ -220,13 +217,13 @@ namespace OnlineStore.DeviceLibrary
//复位之前先停止运行 //复位之前先停止运行
if (isNeedClearAuto) if (isNeedClearAuto)
{ {
AutoInout.autoNext = false; AutoInout.StopAuto();
} }
ACServerManager.SuddenStop(Config.Middle_Axis.DeviceName, Config.Middle_Axis.GetAxisValue()); //ACServerManager.SuddenStop(Config.Middle_Axis.DeviceName, Config.Middle_Axis.GetAxisValue());
ACServerManager.SuddenStop(Config.UpDown_Axis.DeviceName, Config.UpDown_Axis.GetAxisValue()); //ACServerManager.SuddenStop(Config.UpDown_Axis.DeviceName, Config.UpDown_Axis.GetAxisValue());
ACServerManager.SuddenStop(Config.InOut_Axis.DeviceName, Config.InOut_Axis.GetAxisValue()); //ACServerManager.SuddenStop(Config.InOut_Axis.DeviceName, Config.InOut_Axis.GetAxisValue());
ACServerManager.SuddenStop(Config.Comp_Axis.DeviceName, Config.Comp_Axis.GetAxisValue()); //ACServerManager.SuddenStop(Config.Comp_Axis.DeviceName, Config.Comp_Axis.GetAxisValue());
isInSuddenDown = false; isInSuddenDown = false;
isNoAirCheck = false; isNoAirCheck = false;
alarmType = StoreAlarmType.None; alarmType = StoreAlarmType.None;
...@@ -283,8 +280,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -283,8 +280,7 @@ namespace OnlineStore.DeviceLibrary
AxisCountClear(Config.InOut_Axis); AxisCountClear(Config.InOut_Axis);
ACAxisMove(Config.InOut_Axis, Config.InOutAxis_P1_Position, Config.InOutAxis_P1_Speed); ACAxisMove(Config.InOut_Axis, Config.InOutAxis_P1_Position, Config.InOutAxis_P1_Speed);
//判断叉子没有料盘 //判断叉子没有料盘
//StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.TrayCheck_Fixture, IO_VALUE.LOW)); //StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.TrayCheck_Fixture, IO_VALUE.LOW));
CloseDoor();
break; break;
case StoreMoveStep.BOX_H_InOutToP1: case StoreMoveStep.BOX_H_InOutToP1:
//如果此时轴三还在报警,需要提示错误并等待 //如果此时轴三还在报警,需要提示错误并等待
...@@ -305,7 +301,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -305,7 +301,7 @@ namespace OnlineStore.DeviceLibrary
LogInfo(MoveInfo.MoveType + ": 旋转轴运动到P1,上下轴走到P1,压紧轴到P1!"); LogInfo(MoveInfo.MoveType + ": 旋转轴运动到P1,上下轴走到P1,压紧轴到P1!");
ACAxisMove(Config.Middle_Axis, Config.MiddleAxis_P1, Config.MiddleAxis_P1_Speed); ACAxisMove(Config.Middle_Axis, Config.MiddleAxis_P1, Config.MiddleAxis_P1_Speed);
ACAxisMove(Config.UpDown_Axis, Config.UpDownAxis_P1, Config.UpDownAxis_P1_Speed); ACAxisMove(Config.UpDown_Axis, Config.UpDownAxis_P1, Config.UpDownAxis_P1_Speed);
ComMoveToPosition(Config.CompAxis_P1_Position, Config.CompAxis_P1_Speed); ACAxisMove(Config.Comp_Axis,Config.CompAxis_P1_Position, Config.CompAxis_P1_Speed);
break; break;
case StoreMoveStep.BOX_H_MiddleAxisToP1: case StoreMoveStep.BOX_H_MiddleAxisToP1:
...@@ -322,16 +318,14 @@ namespace OnlineStore.DeviceLibrary ...@@ -322,16 +318,14 @@ namespace OnlineStore.DeviceLibrary
case StoreMoveStep.BOX_M_H_TOP1_InOutToP1: case StoreMoveStep.BOX_M_H_TOP1_InOutToP1:
MoveInfo.NextMoveStep(StoreMoveStep.BOX_M_H_TOP1_CompressHome); MoveInfo.NextMoveStep(StoreMoveStep.BOX_M_H_TOP1_CompressHome);
LogInfo("到待机状态,压紧轴回原点,关闭舱门"); LogInfo("到待机状态,压紧轴回原点,关闭舱门");
ACAxisHomeMove(Config.Comp_Axis); ACAxisHomeMove(Config.Comp_Axis);
//关闭舱门
CloseDoor();
break; break;
case StoreMoveStep.BOX_M_H_TOP1_CompressHome: case StoreMoveStep.BOX_M_H_TOP1_CompressHome:
MoveInfo.NextMoveStep(StoreMoveStep.BOX_M_H_TOP1_OtherAxisToP1); MoveInfo.NextMoveStep(StoreMoveStep.BOX_M_H_TOP1_OtherAxisToP1);
LogInfo(MoveInfo.MoveType + ": 旋转轴运动到P1,上下轴走到P1,压紧轴到P1!"); LogInfo(MoveInfo.MoveType + ": 旋转轴运动到P1,上下轴走到P1,压紧轴到P1!");
ACAxisMove(Config.Middle_Axis, Config.MiddleAxis_P1, Config.MiddleAxis_P1_Speed); ACAxisMove(Config.Middle_Axis, Config.MiddleAxis_P1, Config.MiddleAxis_P1_Speed);
ACAxisMove(Config.UpDown_Axis, Config.UpDownAxis_P1, Config.UpDownAxis_P1_Speed); ACAxisMove(Config.UpDown_Axis, Config.UpDownAxis_P1, Config.UpDownAxis_P1_Speed);
ComMoveToPosition(Config.CompAxis_P1_Position, Config.CompAxis_P1_Speed); ACAxisMove(Config.Comp_Axis,Config.CompAxis_P1_Position, Config.CompAxis_P1_Speed);
break; break;
case StoreMoveStep.BOX_M_H_TOP1_OtherAxisToP1: case StoreMoveStep.BOX_M_H_TOP1_OtherAxisToP1:
LogInfo("到待机状态完成"); LogInfo("到待机状态完成");
...@@ -347,18 +341,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -347,18 +341,7 @@ namespace OnlineStore.DeviceLibrary
default: break; default: break;
} }
} }
private void ComMoveToPosition(int targetPosition, int targetSpeed)
{
ACAxisMove(Config.Comp_Axis, targetPosition, targetSpeed);
}
public void OpenDoor(bool IsWait = true)
{
}
public void CloseDoor(bool IsWait = true)
{
}
/// <summary> /// <summary>
/// 原点返回处理 /// 原点返回处理
/// </summary> /// </summary>
...@@ -448,9 +431,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -448,9 +431,7 @@ namespace OnlineStore.DeviceLibrary
IOMove(IO_Type.Axis_Brake, IO_VALUE.LOW); IOMove(IO_Type.Axis_Brake, IO_VALUE.LOW);
foreach (ConfigMoveAxis axis in moveAxisList) foreach (ConfigMoveAxis axis in moveAxisList)
{ {
ACServerManager.ServoOff(axis.DeviceName, axis.GetAxisValue()); ACServerManager.ServoOff(axis.DeviceName, axis.GetAxisValue());
//关闭串口,等下次重新打开
// ACServerManager.ColsePort(axis.DeviceName);
} }
Thread.Sleep(100); Thread.Sleep(100);
IOMove(IO_Type.Run_Signal, IO_VALUE.LOW); IOMove(IO_Type.Run_Signal, IO_VALUE.LOW);
...@@ -463,7 +444,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -463,7 +444,7 @@ namespace OnlineStore.DeviceLibrary
public override void StopRun() public override void StopRun()
{ {
WarnMsg = ""; WarnMsg = "";
AutoInout.autoNext = false; AutoInout.StopAuto();
IoCheckTimer.Enabled = false; IoCheckTimer.Enabled = false;
serverConnectTimer.Enabled = false; serverConnectTimer.Enabled = false;
StopMove(); StopMove();
...@@ -474,7 +455,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -474,7 +455,7 @@ namespace OnlineStore.DeviceLibrary
IsRun = false; IsRun = false;
//LineConnect.StopConnect(); //LineConnect.StopConnect();
IOManager.instance.CloseAllDO(); // IOManager.instance.CloseAllDO();
LogInfo(",停止运行,总运行时间:" + span.ToString()); LogInfo(",停止运行,总运行时间:" + span.ToString());
} }
...@@ -482,7 +463,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -482,7 +463,7 @@ namespace OnlineStore.DeviceLibrary
public override void Alarm(StoreAlarmType alarmType, string alarmDetial, string alarmMsg, StoreMoveType storeMoveType) public override void Alarm(StoreAlarmType alarmType, string alarmDetial, string alarmMsg, StoreMoveType storeMoveType)
{ {
SaveAlarmInfo(alarmType, alarmDetial, alarmMsg, storeMoveType); SaveAlarmInfo(alarmType, alarmDetial, alarmMsg, storeMoveType);
AutoInout.autoNext = false; AutoInout.StopAuto();
if (this.alarmType.Equals(alarmType) && alarmType != StoreAlarmType.SuddenStop && alarmType != StoreAlarmType.NoAirCheck) if (this.alarmType.Equals(alarmType) && alarmType != StoreAlarmType.SuddenStop && alarmType != StoreAlarmType.NoAirCheck)
{ {
...@@ -493,25 +474,21 @@ namespace OnlineStore.DeviceLibrary ...@@ -493,25 +474,21 @@ namespace OnlineStore.DeviceLibrary
this.alarmType = alarmType; this.alarmType = alarmType;
if (alarmType.Equals(StoreAlarmType.AxisAlarm) | alarmType.Equals(StoreAlarmType.AxisMoveError)) if (alarmType.Equals(StoreAlarmType.AxisAlarm) | alarmType.Equals(StoreAlarmType.AxisMoveError))
{ {
LogUtil.error(Name + "轴报警,关闭刹车,停止运动,关闭轴,打开报警灯"); LogUtil.error(Name + "轴报警, 停止运动, 打开报警灯");
IOMove(IO_Type.Axis_Brake, IO_VALUE.LOW);
StopMove(); StopMove();
} }
else if (alarmType == StoreAlarmType.SuddenStop) else if (alarmType == StoreAlarmType.SuddenStop)
{ {
isInSuddenDown = true; isInSuddenDown = true;
LogUtil.error(Name + "收到急停信号,关闭刹车,停止运动,关闭轴,打开报警灯 "); LogUtil.error(Name + "收到急停信号,停止运动, 打开报警灯 ");
IOMove(IO_Type.Axis_Brake, IO_VALUE.LOW);
MoveInfo.EndMove();
StopMove(); StopMove();
storeStatus = StoreStatus.SuddenStop; storeStatus = StoreStatus.SuddenStop;
} }
else if (alarmType.Equals(StoreAlarmType.NoAirCheck)) else if (alarmType.Equals(StoreAlarmType.NoAirCheck))
{ {
isNoAirCheck = true; isNoAirCheck = true;
LogUtil.error(Name + " 未检测到气压信号 ,打开刹车,停止运动,关闭轴,打开报警灯 "); LogUtil.error(Name + " 未检测到气压信号 ,停止运动, 打开报警灯 ");
IOMove(IO_Type.Axis_Brake, IO_VALUE.LOW);
MoveInfo.EndMove();
StopMove(); StopMove();
storeStatus = StoreStatus.SuddenStop; storeStatus = StoreStatus.SuddenStop;
} }
...@@ -713,14 +690,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -713,14 +690,10 @@ namespace OnlineStore.DeviceLibrary
{ {
return; return;
} }
if (storeRunStatus < StoreRunStatus.Runing) if (storeRunStatus < StoreRunStatus.Runing|| isInSuddenDown || isNoAirCheck)
{ {
return; return;
} }
if (isInSuddenDown || isNoAirCheck)
{
return;
}
//若BOX和移栽都没有在等待Io的过程中则此Io超时异常可能已经处理过 //若BOX和移栽都没有在等待Io的过程中则此Io超时异常可能已经处理过
if (MoveInfo.IsInWait == false) if (MoveInfo.IsInWait == false)
{ {
...@@ -812,50 +785,25 @@ namespace OnlineStore.DeviceLibrary ...@@ -812,50 +785,25 @@ namespace OnlineStore.DeviceLibrary
} }
TimeSpan span = DateTime.Now - checkAlarmTime; TimeSpan span = DateTime.Now - checkAlarmTime;
//在回原点,复位,出入库时,检测报警间隔减小 //在回原点,复位,出入库时,检测报警间隔减小
if (storeRunStatus.Equals(StoreRunStatus.Busy) || storeRunStatus.Equals(StoreRunStatus.HomeMoving) || storeRunStatus.Equals(StoreRunStatus.Reset)) if ((storeRunStatus.Equals(StoreRunStatus.Runing) && span.TotalSeconds < 3) || span.TotalSeconds < 1)
{
if (span.TotalSeconds < 1)
{
return false;
}
}
else
{ {
if (span.TotalSeconds < 3) return false;
{
return false;
}
} }
checkAlarmTime = DateTime.Now; checkAlarmTime = DateTime.Now;
bool isInAlarm = false; bool isInAlarm = false;
//Task.Factory.StartNew(delegate
// {
foreach (ConfigMoveAxis axisInfo in moveAxisList) foreach (ConfigMoveAxis axisInfo in moveAxisList)
{ {
short axis = axisInfo.GetAxisValue(); short axis = axisInfo.GetAxisValue();
string deviceName = axisInfo.GetNameStr(); string deviceName = axisInfo.GetNameStr();
AxisAlarmInfo info = AxisAlarmCodeMap[deviceName];
int alarmIo = ACServerManager.GetAlarmStatus(deviceName, axis); if (ACServerManager.GetAlarmStatus(deviceName, axis) == 1)
if (alarmIo == 1)
{ {
WarnMsg = Name + " 运动轴" + axisInfo.Explain + "报警"; WarnMsg = Name + " 运动轴" + axisInfo.Explain + "报警";
info.AlarmIoValue = alarmIo;
Alarm(StoreAlarmType.AxisAlarm, GetAlarmCodeByAxis(axisInfo).ToString(), WarnMsg, StoreMoveType.None); Alarm(StoreAlarmType.AxisAlarm, GetAlarmCodeByAxis(axisInfo).ToString(), WarnMsg, StoreMoveType.None);
isInAlarm = true; isInAlarm = true;
} }
else
{
if (!info.AlarmIoValue.Equals(alarmIo))
{
LogUtil.error(Name + " 运动轴 " + axisInfo.Explain + ",报警已解除!");
info.AlarmIoValue = alarmIo;
}
}
AxisAlarmCodeMap[deviceName] = info;
} }
//});
//判断报警状态 //判断报警状态
return isInAlarm; return isInAlarm;
} }
...@@ -864,7 +812,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -864,7 +812,8 @@ namespace OnlineStore.DeviceLibrary
/// </summary> /// </summary>
public override void StopMove() public override void StopMove()
{ {
IOMove(IO_Type.Axis_Brake, IO_VALUE.LOW);
MoveInfo.EndMove();
IOMove(IO_Type.Axis_Brake, IO_VALUE.LOW); IOMove(IO_Type.Axis_Brake, IO_VALUE.LOW);
//运动版停止 //运动版停止
ACServerManager.SuddenStop(Config.Middle_Axis.DeviceName, Config.Middle_Axis.GetAxisValue()); ACServerManager.SuddenStop(Config.Middle_Axis.DeviceName, Config.Middle_Axis.GetAxisValue());
...@@ -906,27 +855,20 @@ namespace OnlineStore.DeviceLibrary ...@@ -906,27 +855,20 @@ namespace OnlineStore.DeviceLibrary
return; return;
} }
isInProcess = true; isInProcess = true;
try
//HumitureController.QueryData();
humBean.HumidityProcess(this);
if (StoreManager.IsConnectServer)
{ {
if (StoreManager.IsConnectServer) try
{ {
try SendLineStatus();
{
SendLineStatus();
}
catch (Exception ex)
{
LogUtil.error(Name + "定时给服务器发送消息出错:" + ex.ToString());
}
} }
catch (Exception ex)
//HumitureController.QueryData(); {
humBean.HumidityProcess(this); LogUtil.error(Name + "定时SendLineStatus出错:" + ex.ToString());
} }
catch (Exception ex) }
{
LogUtil.error(Name + "server_connect_timer_Tick出错:" + ex.ToString());
}
isInProcess = false; isInProcess = false;
} }
...@@ -1034,7 +976,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -1034,7 +976,7 @@ namespace OnlineStore.DeviceLibrary
} }
if (resultOperation.op.Equals(1)) if (resultOperation.op.Equals(1))
{ {
// ReviceInStoreProcess("", resultOperation); // ReviceInStoreProcess("", resultOperation);
} }
else if (resultOperation.op.Equals(2)) else if (resultOperation.op.Equals(2))
{ {
...@@ -1042,7 +984,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -1042,7 +984,7 @@ namespace OnlineStore.DeviceLibrary
} }
else if (resultOperation.op.Equals(5)) else if (resultOperation.op.Equals(5))
{ {
humBean. ProcessHumidityCMD(resultOperation); humBean.ProcessHumidityCMD(resultOperation);
} }
else else
{ {
...@@ -1159,8 +1101,6 @@ namespace OnlineStore.DeviceLibrary ...@@ -1159,8 +1101,6 @@ namespace OnlineStore.DeviceLibrary
} }
} }
#endregion #endregion
} }
} }
\ No newline at end of file \ No newline at end of file
...@@ -142,12 +142,11 @@ namespace OnlineStore.DeviceLibrary ...@@ -142,12 +142,11 @@ namespace OnlineStore.DeviceLibrary
private static DateTime lastComRHomeTime = DateTime.Now; private static DateTime lastComRHomeTime = DateTime.Now;
private void InOutBackToP1(int InOut_P1) private void InOutBackToP1(int InOut_P1)
{ {
//判断是否在P1,如果是,不需要运行
int outCount = ACServerManager.GetActualtPosition(Config.InOut_Axis.DeviceName, Config.InOut_Axis.GetAxisValue()); //判断是否在P1,如果是,不需要运行
int errorCount = Math.Abs(outCount - InOut_P1); if (ACServerManager.isInPosition(Config.InOut_Axis, InOut_P1))
if (errorCount <= Config.InOut_Axis.CanErrorCountMin)
{ {
LogInfo("进出轴当前位置:" + outCount + ",已经在P1,不需要再回P1"); LogInfo("进出轴当前已经在P1,不需要再回P1");
} }
else else
{ {
...@@ -155,14 +154,24 @@ namespace OnlineStore.DeviceLibrary ...@@ -155,14 +154,24 @@ namespace OnlineStore.DeviceLibrary
} }
//StoreMove.WaitList.Add(WaitResultInfo.WaitAxisOrg(Config.InOut_Axis,IO_VALUE.HIGH)); //StoreMove.WaitList.Add(WaitResultInfo.WaitAxisOrg(Config.InOut_Axis,IO_VALUE.HIGH));
} }
#endregion #endregion
#region 入库 #region 入库
protected override void InStoreProcess()
{
LineMoveP moveP = MoveInfo.MoveParam.MoveP;
if (MoveInfo.IsInWait)
{
CheckWait();
}
if (MoveInfo.IsInWait)
{
return;
}
ShelfInStoreProcess();
}
private DateTime startInStoreTime = DateTime.Now; private DateTime startInStoreTime = DateTime.Now;
/// <summary> /// <summary>
/// 开始入库移动移动 /// 开始入库移动移动
...@@ -188,7 +197,12 @@ namespace OnlineStore.DeviceLibrary ...@@ -188,7 +197,12 @@ namespace OnlineStore.DeviceLibrary
storeStatus = StoreStatus.InStoreExecute; storeStatus = StoreStatus.InStoreExecute;
MoveInfo.NewMove(StoreMoveType.InStore, param); MoveInfo.NewMove(StoreMoveType.InStore, param);
SI_02_Move(param.MoveP); //新的料架库位
MoveInfo.NextMoveStep(StoreMoveStep.BI_11_InoutToP1);
MoveInfo.SingleInstore = true ;
InOutStoreLog("料架取料:叉子后退到待机点P1, 重置盘信息");
ACAxisMove(Config.InOut_Axis, Config.InOutAxis_P1_Position, Config.InOutAxis_P1_Speed);
ClearLastTrayInfo();
} }
else else
...@@ -196,148 +210,148 @@ namespace OnlineStore.DeviceLibrary ...@@ -196,148 +210,148 @@ namespace OnlineStore.DeviceLibrary
LogUtil.error(Name + " 启动【" + posId + "】入库出错,当前状态,storeStatus=" + storeRunStatus); LogUtil.error(Name + " 启动【" + posId + "】入库出错,当前状态,storeStatus=" + storeRunStatus);
} }
} }
private void SI_02_Move(LineMoveP moveP)
{
MoveInfo.NextMoveStep(StoreMoveStep.SI_02_InOutAxisHome);
InOutStoreLog("入库:SI_02_ 进出轴(叉子)动作至P1,打开舱门");
OpenDoor();
InOutBackToP1(moveP.InOut_P1);
}
private void SI_05_DeviceToDoor()
{
MoveInfo.NextMoveStep(StoreMoveStep.SI_05_DeviceToDoor);
InOutStoreLog("入库:SI_05 叉子进入入料口,进出轴至P2(进料口取料点) ");
ACAxisMove(Config.InOut_Axis, MoveInfo.MoveParam.MoveP.InOut_P2, Config.InOutAxis_P2_Speed);
//NeedCheckSafetyLight = 1;
}
protected override void InStoreProcess()
{
LineMoveP moveP = MoveInfo.MoveParam.MoveP;
if (MoveInfo.IsInWait)
{
CheckWait();
}
if (MoveInfo.IsInWait)
{
return;
}
if (MoveInfo.MoveStep == StoreMoveStep.SI_00_TrayCheck)
{
SI_02_Move(moveP);
}
if (MoveInfo.MoveStep == StoreMoveStep.SI_01_LocationCylinderDown)
{
SI_02_Move(moveP);
}
else if (MoveInfo.MoveStep == StoreMoveStep.SI_02_InOutAxisHome)
{
MoveInfo.NextMoveStep(StoreMoveStep.SI_03_ReturnHome);
InOutStoreLog("入库:SI_03 所有轴回到待机点,轴2、轴1 动作到P1,,轴4动作至P3");
ComMoveToPosition(moveP.ComPress_P3, Config.CompAxis_P3_Speed);
ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P1, Config.UpDownAxis_P1_Speed);
ACAxisMove(Config.Middle_Axis, moveP.Middle_P1, Config.MiddleAxis_P1_Speed);
}
else if (MoveInfo.MoveStep == StoreMoveStep.SI_03_ReturnHome)
{
MoveInfo.NextMoveStep(StoreMoveStep.SI_04_CompressWare);
InOutStoreLog("入库:SI_04_CompressWare 压紧物品(有压紧轴的才需要此步骤),压紧轴至P3(压紧前点) 开始");
ComMoveToPosition(moveP.ComPress_P3, Config.CompAxis_P3_Speed);
}
else if (MoveInfo.MoveStep == StoreMoveStep.SI_04_CompressWare)
{
SI_05_DeviceToDoor();
}
else if (MoveInfo.MoveStep == StoreMoveStep.SI_05_DeviceToDoor)
{
//NeedCheckSafetyLight = 0;
MoveInfo.NextMoveStep(StoreMoveStep.SI_06_DoorWarToDevice);
InOutStoreLog("入库:SI_06 拿物品,压紧轴至P2(压紧点)) 升降轴至P7(进料口取料缓冲点) ");
ComMoveToPosition(moveP.ComPress_P2, Config.CompAxis_P2_Speed);
// ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P7, Config.UpDownAxis_P7_Speed);
}
else if (MoveInfo.MoveStep == StoreMoveStep.SI_06_DoorWarToDevice)
{
MoveInfo.NextMoveStep(StoreMoveStep.SI_07_DeviceBackFromDoor);
InOutStoreLog("入库:SI_07 叉子 从入料口抽出,进出轴至P1(待机点) ");
InOutBackToP1(moveP.InOut_P1);
}
else if (MoveInfo.MoveStep == StoreMoveStep.SI_07_DeviceBackFromDoor)
{
MoveInfo.NextMoveStep(StoreMoveStep.SI_09_MoveToBag);
InOutStoreLog("入库:SI_09 移动到库位点,旋转轴至P2(库位点),升降轴至P3(库位入库前点) ");
ACAxisMove(Config.Middle_Axis, moveP.Middle_P2, Config.MiddleAxis_P2_Speed);
ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P3, Config.UpDownAxis_P3_Speed);
CloseDoor(false);
}
else if (MoveInfo.MoveStep == StoreMoveStep.SI_08_LocationCylinder_Up)
{
MoveInfo.NextMoveStep(StoreMoveStep.SI_09_MoveToBag);
InOutStoreLog("入库:SI_09 移动到库位点,旋转轴至P2(库位点),升降轴至P3(库位入库前点)),关闭舱门 ");
ACAxisMove(Config.Middle_Axis, moveP.Middle_P2, Config.MiddleAxis_P1_Speed);
ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P3, Config.UpDownAxis_P3_Speed);
CloseDoor(false);
}
else if (MoveInfo.MoveStep == StoreMoveStep.SI_09_MoveToBag)
{
MoveInfo.NextMoveStep(StoreMoveStep.SI_11_DeviceToBag);
InOutStoreLog("入库:SI_11 叉子进入库位中,进出轴至P3(库位取放料点) ");
ACAxisMove(Config.InOut_Axis, moveP.InOut_P3, Config.InOutAxis_P3_Speed);
}
else if (MoveInfo.MoveStep == StoreMoveStep.SI_10_LocationCylinder_Down)
{
MoveInfo.NextMoveStep(StoreMoveStep.SI_11_DeviceToBag);
InOutStoreLog("入库:SI_11 叉子进入库位中,进出轴至P3(库位取放料点) ");
ACAxisMove(Config.InOut_Axis, moveP.InOut_P3, Config.InOutAxis_P3_Speed);
}
else if (MoveInfo.MoveStep == StoreMoveStep.SI_11_DeviceToBag)
{
// 5= 入仓位完成(料仓Box把料盘放入对应的库位中,装置还未恢复原始状态)
string posId = MoveInfo.MoveParam != null ? MoveInfo.MoveParam.PosID : "";
lastPosId = posId;
lastPosIdStatus = StoreStatus.InStoreEnd;
storeStatus = StoreStatus.InStoreEnd;
//手动发给服务器状态,防止没有手动
//SendLineStatus(StoreID, posId, StoreStatus.InStoreEnd);
MoveInfo.NextMoveStep(StoreMoveStep.SI_12_PutWareToBag);
InOutStoreLog("入库:SI_12 放下物品,升降轴至P4(库位入料缓冲点),压紧轴至P3(压紧前点) ");
ComMoveToPosition(moveP.ComPress_P3, Config.CompAxis_P3_Speed);
ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P4, Config.UpDownAxis_P4_Speed);
} //private void SI_02_Move(LineMoveP moveP)
else if (MoveInfo.MoveStep == StoreMoveStep.SI_12_PutWareToBag) //{
{ // MoveInfo.NextMoveStep(StoreMoveStep.SI_02_InOutAxisHome);
MoveInfo.NextMoveStep(StoreMoveStep.SI_13_DeviceBackFromBag); // InOutStoreLog("入库:SI_02_ 进出轴(叉子)动作至P1,打开舱门");
InOutStoreLog("入库:SI_13 叉子从库位中返回,进出轴动作至P1(待机点) "); // OpenDoor();
InOutBackToP1(moveP.InOut_P1); // InOutBackToP1(moveP.InOut_P1);
} //}
else if (MoveInfo.MoveStep == StoreMoveStep.SI_13_DeviceBackFromBag) //private void SI_05_DeviceToDoor()
{ //{
MoveInfo.NextMoveStep(StoreMoveStep.SI_14_GoBack); // MoveInfo.NextMoveStep(StoreMoveStep.SI_05_DeviceToDoor);
InOutStoreLog("入库:SI_14 返回待机点,轴2/轴1/轴4动作至P1(待机点)),检测门关闭"); // InOutStoreLog("入库:SI_05 叉子进入入料口,进出轴至P2(进料口取料点) ");
ComMoveToPosition(moveP.ComPress_P1, Config.CompAxis_P1_Speed); // ACAxisMove(Config.InOut_Axis, MoveInfo.MoveParam.MoveP.InOut_P2, Config.InOutAxis_P2_Speed);
ACAxisMove(Config.Middle_Axis, moveP.Middle_P1, Config.MiddleAxis_P1_Speed); // //NeedCheckSafetyLight = 1;
ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P1, Config.UpDownAxis_P1_Speed); //}
CloseDoor(); //protected override void InStoreProcess()
} //{
else if (MoveInfo.MoveStep == StoreMoveStep.SI_14_GoBack) // LineMoveP moveP = MoveInfo.MoveParam.MoveP;
{ // if (MoveInfo.IsInWait)
TimeSpan span = DateTime.Now - startInStoreTime; // {
string posId = MoveInfo.MoveParam != null ? MoveInfo.MoveParam.PosID : ""; // CheckWait();
LogInfo(" 【" + posId + "】 整个入库流程结束,耗时【" + FormUtil.GetSpanStr(span) + "】!"); // }
MoveInfo.EndMove(); // if (MoveInfo.IsInWait)
storeRunStatus = StoreRunStatus.Runing; // {
//设备连接,入库后,BOX恢复原始状态 // return;
storeStatus = StoreStatus.StoreOnline; // }
AutoInout.InOutEndProcess(this, StoreMoveType.InStore); //if (MoveInfo.MoveStep == StoreMoveStep.SI_00_TrayCheck)
} //{
else // SI_02_Move(moveP);
{ //}
ShelfInStoreProcess(); //if (MoveInfo.MoveStep == StoreMoveStep.SI_01_LocationCylinderDown)
} //{
} // SI_02_Move(moveP);
//}
//else if (MoveInfo.MoveStep == StoreMoveStep.SI_02_InOutAxisHome)
//{
// MoveInfo.NextMoveStep(StoreMoveStep.SI_03_ReturnHome);
// InOutStoreLog("入库:SI_03 所有轴回到待机点,轴2、轴1 动作到P1,,轴4动作至P3");
// ACAxisMove(Config.Comp_Axis,moveP.ComPress_P3, Config.CompAxis_P3_Speed);
// ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P1, Config.UpDownAxis_P1_Speed);
// ACAxisMove(Config.Middle_Axis, moveP.Middle_P1, Config.MiddleAxis_P1_Speed);
//}
//else if (MoveInfo.MoveStep == StoreMoveStep.SI_03_ReturnHome)
//{
// MoveInfo.NextMoveStep(StoreMoveStep.SI_04_CompressWare);
// InOutStoreLog("入库:SI_04_CompressWare 压紧物品(有压紧轴的才需要此步骤),压紧轴至P3(压紧前点) 开始");
// ACAxisMove(Config.Comp_Axis,moveP.ComPress_P3, Config.CompAxis_P3_Speed);
//}
//else if (MoveInfo.MoveStep == StoreMoveStep.SI_04_CompressWare)
//{
// SI_05_DeviceToDoor();
//}
//else if (MoveInfo.MoveStep == StoreMoveStep.SI_05_DeviceToDoor)
//{
// //NeedCheckSafetyLight = 0;
// MoveInfo.NextMoveStep(StoreMoveStep.SI_06_DoorWarToDevice);
// InOutStoreLog("入库:SI_06 拿物品,压紧轴至P2(压紧点)) 升降轴至P7(进料口取料缓冲点) ");
// ACAxisMove(Config.Comp_Axis,moveP.ComPress_P2, Config.CompAxis_P2_Speed);
// // ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P7, Config.UpDownAxis_P7_Speed);
//}
//else if (MoveInfo.MoveStep == StoreMoveStep.SI_06_DoorWarToDevice)
//{
// MoveInfo.NextMoveStep(StoreMoveStep.SI_07_DeviceBackFromDoor);
// InOutStoreLog("入库:SI_07 叉子 从入料口抽出,进出轴至P1(待机点) ");
// InOutBackToP1(moveP.InOut_P1);
//}
//else if (MoveInfo.MoveStep == StoreMoveStep.SI_07_DeviceBackFromDoor)
//{
// MoveInfo.NextMoveStep(StoreMoveStep.SI_09_MoveToBag);
// InOutStoreLog("入库:SI_09 移动到库位点,旋转轴至P2(库位点),升降轴至P3(库位入库前点) ");
// ACAxisMove(Config.Middle_Axis, moveP.Middle_P2, Config.MiddleAxis_P2_Speed);
// ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P3, Config.UpDownAxis_P3_Speed);
// CloseDoor(false);
//}
//else if (MoveInfo.MoveStep == StoreMoveStep.SI_08_LocationCylinder_Up)
//{
// MoveInfo.NextMoveStep(StoreMoveStep.SI_09_MoveToBag);
// InOutStoreLog("入库:SI_09 移动到库位点,旋转轴至P2(库位点),升降轴至P3(库位入库前点)),关闭舱门 ");
// ACAxisMove(Config.Middle_Axis, moveP.Middle_P2, Config.MiddleAxis_P1_Speed);
// ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P3, Config.UpDownAxis_P3_Speed);
// CloseDoor(false);
//}
//else if (MoveInfo.MoveStep == StoreMoveStep.SI_09_MoveToBag)
//{
// MoveInfo.NextMoveStep(StoreMoveStep.SI_11_DeviceToBag);
// InOutStoreLog("入库:SI_11 叉子进入库位中,进出轴至P3(库位取放料点) ");
// ACAxisMove(Config.InOut_Axis, moveP.InOut_P3, Config.InOutAxis_P3_Speed);
//}
//else if (MoveInfo.MoveStep == StoreMoveStep.SI_10_LocationCylinder_Down)
//{
// MoveInfo.NextMoveStep(StoreMoveStep.SI_11_DeviceToBag);
// InOutStoreLog("入库:SI_11 叉子进入库位中,进出轴至P3(库位取放料点) ");
// ACAxisMove(Config.InOut_Axis, moveP.InOut_P3, Config.InOutAxis_P3_Speed);
//}
//else if (MoveInfo.MoveStep == StoreMoveStep.SI_11_DeviceToBag)
//{
// // 5= 入仓位完成(料仓Box把料盘放入对应的库位中,装置还未恢复原始状态)
// string posId = MoveInfo.MoveParam != null ? MoveInfo.MoveParam.PosID : "";
// lastPosId = posId;
// lastPosIdStatus = StoreStatus.InStoreEnd;
// storeStatus = StoreStatus.InStoreEnd;
// //手动发给服务器状态,防止没有手动
// //SendLineStatus(StoreID, posId, StoreStatus.InStoreEnd);
// MoveInfo.NextMoveStep(StoreMoveStep.SI_12_PutWareToBag);
// InOutStoreLog("入库:SI_12 放下物品,升降轴至P4(库位入料缓冲点),压紧轴至P3(压紧前点) ");
// ACAxisMove(Config.Comp_Axis,moveP.ComPress_P3, Config.CompAxis_P3_Speed);
// ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P4, Config.UpDownAxis_P4_Speed);
//}
//else if (MoveInfo.MoveStep == StoreMoveStep.SI_12_PutWareToBag)
//{
// MoveInfo.NextMoveStep(StoreMoveStep.SI_13_DeviceBackFromBag);
// InOutStoreLog("入库:SI_13 叉子从库位中返回,进出轴动作至P1(待机点) ");
// InOutBackToP1(moveP.InOut_P1);
//}
//else if (MoveInfo.MoveStep == StoreMoveStep.SI_13_DeviceBackFromBag)
//{
// MoveInfo.NextMoveStep(StoreMoveStep.SI_14_GoBack);
// InOutStoreLog("入库:SI_14 返回待机点,轴2/轴1/轴4动作至P1(待机点)),检测门关闭");
// ACAxisMove(Config.Comp_Axis,moveP.ComPress_P1, Config.CompAxis_P1_Speed);
// ACAxisMove(Config.Middle_Axis, moveP.Middle_P1, Config.MiddleAxis_P1_Speed);
// ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P1, Config.UpDownAxis_P1_Speed);
// CloseDoor();
//}
//else if (MoveInfo.MoveStep == StoreMoveStep.SI_14_GoBack)
//{
// TimeSpan span = DateTime.Now - startInStoreTime;
// string posId = MoveInfo.MoveParam != null ? MoveInfo.MoveParam.PosID : "";
// LogInfo(" 【" + posId + "】 整个入库流程结束,耗时【" + FormUtil.GetSpanStr(span) + "】!");
// MoveInfo.EndMove();
// storeRunStatus = StoreRunStatus.Runing;
// //设备连接,入库后,BOX恢复原始状态
// storeStatus = StoreStatus.StoreOnline;
// AutoInout.InOutEndProcess(this, StoreMoveType.InStore);
//}
//else
// {
// ShelfInStoreProcess();
// }
//}
#endregion #endregion
...@@ -401,7 +415,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -401,7 +415,7 @@ namespace OnlineStore.DeviceLibrary
{ {
MoveInfo.NextMoveStep(StoreMoveStep.SO_03_ToBagPosition); MoveInfo.NextMoveStep(StoreMoveStep.SO_03_ToBagPosition);
InOutStoreLog("出库:SO_03 走到库位,压紧轴至P3(压紧前点) ,旋转轴至P2(库位点),升降轴至P5(库位出库前点)"); InOutStoreLog("出库:SO_03 走到库位,压紧轴至P3(压紧前点) ,旋转轴至P2(库位点),升降轴至P5(库位出库前点)");
ComMoveToPosition(moveP.ComPress_P3, Config.CompAxis_P3_Speed); ACAxisMove(Config.Comp_Axis,moveP.ComPress_P3, Config.CompAxis_P3_Speed);
ACAxisMove(Config.Middle_Axis, MoveInfo.MoveParam.MoveP.Middle_P2, Config.MiddleAxis_P2_Speed); ACAxisMove(Config.Middle_Axis, MoveInfo.MoveParam.MoveP.Middle_P2, Config.MiddleAxis_P2_Speed);
ACAxisMove(Config.UpDown_Axis, MoveInfo.MoveParam.MoveP.UpDown_P5, Config.UpDownAxis_P5_Speed); ACAxisMove(Config.UpDown_Axis, MoveInfo.MoveParam.MoveP.UpDown_P5, Config.UpDownAxis_P5_Speed);
} }
...@@ -416,7 +430,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -416,7 +430,7 @@ namespace OnlineStore.DeviceLibrary
MoveInfo.NextMoveStep(StoreMoveStep.SO_05_BagWareToDevice); MoveInfo.NextMoveStep(StoreMoveStep.SO_05_BagWareToDevice);
InOutStoreLog("出库:SO_05 拿起物品,升降轴至P6(库位出料缓冲点),压紧轴至P2(压紧点) "); InOutStoreLog("出库:SO_05 拿起物品,升降轴至P6(库位出料缓冲点),压紧轴至P2(压紧点) ");
ComMoveToPosition(moveP.ComPress_P2, Config.CompAxis_P2_Speed); ACAxisMove(Config.Comp_Axis,moveP.ComPress_P2, Config.CompAxis_P2_Speed);
ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P6, Config.UpDownAxis_P6_Speed); ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P6, Config.UpDownAxis_P6_Speed);
} }
else if (MoveInfo.MoveStep == StoreMoveStep.SO_05_BagWareToDevice) else if (MoveInfo.MoveStep == StoreMoveStep.SO_05_BagWareToDevice)
...@@ -476,7 +490,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -476,7 +490,7 @@ namespace OnlineStore.DeviceLibrary
{ {
MoveInfo.NextMoveStep(StoreMoveStep.SO_11_DevicePutWare); MoveInfo.NextMoveStep(StoreMoveStep.SO_11_DevicePutWare);
InOutStoreLog("出库:SO_11 放下物品,压紧轴到P1,升降轴至P101 "); InOutStoreLog("出库:SO_11 放下物品,压紧轴到P1,升降轴至P101 ");
ComMoveToPosition(moveP.ComPress_P1, Config.CompAxis_P1_Speed); ACAxisMove(Config.Comp_Axis,moveP.ComPress_P1, Config.CompAxis_P1_Speed);
ACAxisMove(Config.UpDown_Axis, moveP.UpDown_LP101, Config.UpDownAxis_P101_Speed); ACAxisMove(Config.UpDown_Axis, moveP.UpDown_LP101, Config.UpDownAxis_P101_Speed);
} }
else if (MoveInfo.MoveStep == StoreMoveStep.SO_11_DevicePutWare) else if (MoveInfo.MoveStep == StoreMoveStep.SO_11_DevicePutWare)
......
...@@ -40,13 +40,19 @@ namespace OnlineStore.DeviceLibrary ...@@ -40,13 +40,19 @@ namespace OnlineStore.DeviceLibrary
storeRunStatus = StoreRunStatus.Busy; storeRunStatus = StoreRunStatus.Busy;
storeStatus = StoreStatus.InStoreExecute; storeStatus = StoreStatus.InStoreExecute;
EmprtShelfList = new Queue<string>(); EmprtShelfList = new Queue<string>();
//读取RFID
RFIDData data = RFIDManager.ReadData(Config.RFID_IP);
//TODO 判断料架是否正确
MoveInfo.NewMove(StoreMoveType.InStore, new InOutParam()); MoveInfo.NewMove(StoreMoveType.InStore, new InOutParam());
MoveInfo.MoveParam.MoveP = new LineMoveP(); MoveInfo.MoveParam.MoveP = new LineMoveP();
MoveInfo.MoveParam.MoveP.ComPress_P1 = Config.CompAxis_P1_Position; MoveInfo.MoveParam.MoveP.ComPress_P1 = Config.CompAxis_P1_Position;
MoveInfo.MoveParam.MoveP.InOut_P1 = Config.InOutAxis_P1_Position; MoveInfo.MoveParam.MoveP.InOut_P1 = Config.InOutAxis_P1_Position;
MoveInfo.MoveParam.MoveP.Middle_P1 = Config.MiddleAxis_P1; MoveInfo.MoveParam.MoveP.Middle_P1 = Config.MiddleAxis_P1;
MoveInfo.MoveParam.MoveP.UpDown_P1 = Config.UpDownAxis_P1; MoveInfo.MoveParam.MoveP.UpDown_P1 = Config.UpDownAxis_P1;
MoveInfo.MoveParam.MoveP.UpDown_P2 = Config.UpDownAxis_P2; MoveInfo.MoveParam.MoveP.UpDown_P2 = Config.UpDownAxis_P2;
MoveInfo.ShelfPositionList = new List<string>(ShelfPosList); MoveInfo.ShelfPositionList = new List<string>(ShelfPosList);
...@@ -129,7 +135,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -129,7 +135,8 @@ namespace OnlineStore.DeviceLibrary
} }
else else
{ {
//所有料盘已取料完成 //所有料盘已取料完成,送出料架
StartSendShelfOut();
} }
} }
else if (MoveInfo.MoveStep.Equals(StoreMoveStep.BI_11_InoutToP1)) else if (MoveInfo.MoveStep.Equals(StoreMoveStep.BI_11_InoutToP1))
...@@ -179,18 +186,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -179,18 +186,7 @@ namespace OnlineStore.DeviceLibrary
ACAxisMove(Config.InOut_Axis, Config.InOutAxis_P1_Position, Config.CompAxis_P1_Speed); ACAxisMove(Config.InOut_Axis, Config.InOutAxis_P1_Position, Config.CompAxis_P1_Speed);
} }
else if (MoveInfo.MoveStep.Equals(StoreMoveStep.BI_17_InoutBack)) else if (MoveInfo.MoveStep.Equals(StoreMoveStep.BI_17_InoutBack))
{ {
MoveInfo.NextMoveStep(StoreMoveStep.BI_18_ScanCode);
InOutStoreLog("料架取料:记录宽度,开始扫码");
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(5000));
MoveInfo.WaitList.Add(WaitResultInfo.WaitCode());
Task.Factory.StartNew(delegate
{
IOMove(IO_Type.Camera_Led, IO_VALUE.HIGH);
LastScanCodes = CodeManager.CameraScan();
IOMove(IO_Type.Camera_Led, IO_VALUE.LOW);
});
if (IOValue(IO_Type.TrayCheck_3).Equals(IO_VALUE.HIGH) && IOValue(IO_Type.TrayCheck_4).Equals(IO_VALUE.HIGH)) if (IOValue(IO_Type.TrayCheck_3).Equals(IO_VALUE.HIGH) && IOValue(IO_Type.TrayCheck_4).Equals(IO_VALUE.HIGH))
{ {
LastWidth = 13; LastWidth = 13;
...@@ -203,6 +199,26 @@ namespace OnlineStore.DeviceLibrary ...@@ -203,6 +199,26 @@ namespace OnlineStore.DeviceLibrary
{ {
LogUtil.info("未检测到识别区料盘检测信号, 默认高度为7"); LogUtil.info("未检测到识别区料盘检测信号, 默认高度为7");
} }
if (MoveInfo.SingleInstore)
{
//单盘入库,不需要扫码
StartMoveToBag();
}
else
{
MoveInfo.NextMoveStep(StoreMoveStep.BI_18_ScanCode);
InOutStoreLog("料架取料:记录宽度,开始扫码");
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(5000));
MoveInfo.WaitList.Add(WaitResultInfo.WaitCode());
Task.Factory.StartNew(delegate
{
IOMove(IO_Type.Camera_Led, IO_VALUE.HIGH);
LastScanCodes = CodeManager.CameraScan();
IOMove(IO_Type.Camera_Led, IO_VALUE.LOW);
});
}
} }
else if (MoveInfo.MoveStep.Equals(StoreMoveStep.BI_18_ScanCode)) else if (MoveInfo.MoveStep.Equals(StoreMoveStep.BI_18_ScanCode))
{ {
...@@ -238,10 +254,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -238,10 +254,7 @@ namespace OnlineStore.DeviceLibrary
#region 入库逻辑 #region 入库逻辑
else if (MoveInfo.MoveStep.Equals(StoreMoveStep.BI_20_SetInstoreParam)) else if (MoveInfo.MoveStep.Equals(StoreMoveStep.BI_20_SetInstoreParam))
{ {
MoveInfo.NextMoveStep(StoreMoveStep.BI_21_MoveToBag); StartMoveToBag();
InOutStoreLog("入库:移动到库位点,轴1( 转盘) 至P2( 库位点)轴2(上下) 至P3(库位入库前点)");
ACAxisMove(Config.Middle_Axis, moveP.Middle_P2, Config.MiddleAxis_P2_Speed);
ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P3, Config.UpDownAxis_P3_Speed);
} }
else if (MoveInfo.MoveStep.Equals(StoreMoveStep.BI_21_MoveToBag)) else if (MoveInfo.MoveStep.Equals(StoreMoveStep.BI_21_MoveToBag))
{ {
...@@ -261,8 +274,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -261,8 +274,8 @@ namespace OnlineStore.DeviceLibrary
storeStatus = StoreStatus.InStoreEnd; storeStatus = StoreStatus.InStoreEnd;
//手动发给服务器状态,防止没有手动 //手动发给服务器状态,防止没有手动
//SendLineStatus(StoreID, posId, StoreStatus.InStoreEnd); //SendLineStatus(StoreID, posId, StoreStatus.InStoreEnd);
ComMoveToPosition(moveP.ComPress_P3, Config.CompAxis_P3_Speed); ACAxisMove(Config.Comp_Axis, moveP.ComPress_P3, Config.CompAxis_P3_Speed);
ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P4, Config.UpDownAxis_P4_Speed); ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P4, Config.UpDownAxis_P4_Speed);
} }
else if (MoveInfo.MoveStep.Equals(StoreMoveStep.BI_23_PutWareToBag)) else if (MoveInfo.MoveStep.Equals(StoreMoveStep.BI_23_PutWareToBag))
...@@ -275,7 +288,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -275,7 +288,7 @@ namespace OnlineStore.DeviceLibrary
{ {
MoveInfo.NextMoveStep(StoreMoveStep.BI_25_GoBack); MoveInfo.NextMoveStep(StoreMoveStep.BI_25_GoBack);
InOutStoreLog("入库:返回待机点,轴2/轴1/轴4动作至P1( 待机点))开始"); InOutStoreLog("入库:返回待机点,轴2/轴1/轴4动作至P1( 待机点))开始");
ComMoveToPosition(moveP.ComPress_P1, Config.CompAxis_P1_Speed); ACAxisMove(Config.Comp_Axis, moveP.ComPress_P1, Config.CompAxis_P1_Speed);
ACAxisMove(Config.Middle_Axis, moveP.Middle_P1, Config.MiddleAxis_P1_Speed); ACAxisMove(Config.Middle_Axis, moveP.Middle_P1, Config.MiddleAxis_P1_Speed);
ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P1, Config.UpDownAxis_P1_Speed); ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P1, Config.UpDownAxis_P1_Speed);
} }
...@@ -326,12 +339,26 @@ namespace OnlineStore.DeviceLibrary ...@@ -326,12 +339,26 @@ namespace OnlineStore.DeviceLibrary
InOutStoreLog("料架入库:开始循环逐个取料盘,扫码入库"); InOutStoreLog("料架入库:开始循环逐个取料盘,扫码入库");
} }
#endregion #endregion
else
//料架送出逻辑
else if(MoveInfo.MoveStep>= StoreMoveStep.BS_01_TopCylinder_Down&&MoveInfo.MoveStep >= StoreMoveStep. BS_09_CloseDoor)
{
SendShelfProcess();
}
else
{ {
LogInfo(" 入库,moveStatus=" + MoveInfo.MoveStep + ",没有对应的处理!"); LogInfo(" 入库,moveStatus=" + MoveInfo.MoveStep + ",没有对应的处理!");
} }
} }
private void StartMoveToBag()
{
MoveInfo.NextMoveStep(StoreMoveStep.BI_21_MoveToBag);
InOutStoreLog("入库:移动到库位点,轴1( 转盘) 至P2( 库位点)轴2(上下) 至P3(库位入库前点)");
ACAxisMove(Config.Middle_Axis, MoveInfo.MoveParam.MoveP.Middle_P2, Config.MiddleAxis_P2_Speed);
ACAxisMove(Config.UpDown_Axis, MoveInfo.MoveParam.MoveP.UpDown_P3, Config.UpDownAxis_P3_Speed);
}
private void StartSendTray( string str="扫码失败") private void StartSendTray( string str="扫码失败")
{ {
MoveInfo.NextMoveStep(StoreMoveStep.BI_31_ToNGDoor); MoveInfo.NextMoveStep(StoreMoveStep.BI_31_ToNGDoor);
...@@ -353,44 +380,56 @@ namespace OnlineStore.DeviceLibrary ...@@ -353,44 +380,56 @@ namespace OnlineStore.DeviceLibrary
{ {
MoveInfo.NextMoveStep(StoreMoveStep.BS_02_LocatinCylinder_Down); MoveInfo.NextMoveStep(StoreMoveStep.BS_02_LocatinCylinder_Down);
InOutStoreLog("送出料架:定位气缸下降"); InOutStoreLog("送出料架:定位气缸下降");
CylinderMove(MoveInfo, IO_Type.LocationCylinder_Up, IO_Type.LocationCylinder_Down);
} }
else if (MoveInfo.MoveStep.Equals(StoreMoveStep.BS_02_LocatinCylinder_Down)) else if (MoveInfo.MoveStep.Equals(StoreMoveStep.BS_02_LocatinCylinder_Down))
{ {
MoveInfo.NextMoveStep(StoreMoveStep.BS_03_DoorOpen); MoveInfo.NextMoveStep(StoreMoveStep.BS_03_DoorOpen);
InOutStoreLog("送出料架:打开仓门"); InOutStoreLog("送出料架:打开仓门");
CylinderMove(MoveInfo, IO_Type.EntranceDoor_Close, IO_Type.EntranceDoor_Open);
} }
else if (MoveInfo.MoveStep.Equals(StoreMoveStep.BS_03_DoorOpen)) else if (MoveInfo.MoveStep.Equals(StoreMoveStep.BS_03_DoorOpen))
{ {
MoveInfo.NextMoveStep(StoreMoveStep.BS_04_LineBack); MoveInfo.NextMoveStep(StoreMoveStep.BS_04_LineBack);
InOutStoreLog("送出料架:线体反转"); InOutStoreLog("送出料架:线体反转");
IOMove(IO_Type.Line_Run, IO_VALUE.LOW);
IOMove(IO_Type.Line_BackRun, IO_VALUE.HIGH);
} }
else if (MoveInfo.MoveStep.Equals(StoreMoveStep.BS_04_LineBack)) else if (MoveInfo.MoveStep.Equals(StoreMoveStep.BS_04_LineBack))
{ {
MoveInfo.NextMoveStep(StoreMoveStep.BS_05_WaitInLineSingle); MoveInfo.NextMoveStep(StoreMoveStep.BS_05_WaitInLineSingle);
InOutStoreLog("送出料架:等待取料工位无信号,入料口有信号"); InOutStoreLog("送出料架:等待取料工位无信号,入料口有信号");
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.LineTake_Check, IO_VALUE.LOW));
MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.LineIn_Check, IO_VALUE.HIGH));
} }
else if (MoveInfo.MoveStep.Equals(StoreMoveStep.BS_05_WaitInLineSingle)) else if (MoveInfo.MoveStep.Equals(StoreMoveStep.BS_05_WaitInLineSingle))
{ {
MoveInfo.NextMoveStep(StoreMoveStep.BS_06_WaitTime); MoveInfo.NextMoveStep(StoreMoveStep.BS_06_WaitTime);
InOutStoreLog("送出料架:再转动300时间"); InOutStoreLog("送出料架:再转动300时间");
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(300));
} }
else if (MoveInfo.MoveStep.Equals(StoreMoveStep.BS_06_WaitTime)) else if (MoveInfo.MoveStep.Equals(StoreMoveStep.BS_06_WaitTime))
{ {
MoveInfo.NextMoveStep(StoreMoveStep.BS_07_LineStop); MoveInfo.NextMoveStep(StoreMoveStep.BS_07_LineStop);
InOutStoreLog("送出料架:停止转动"); InOutStoreLog("送出料架:停止转动");
IOMove(IO_Type.Line_Run, IO_VALUE.LOW);
IOMove(IO_Type.Line_BackRun, IO_VALUE.LOW);
} }
else if (MoveInfo.MoveStep.Equals(StoreMoveStep.BS_07_LineStop)) else if (MoveInfo.MoveStep.Equals(StoreMoveStep.BS_07_LineStop))
{ {
MoveInfo.NextMoveStep(StoreMoveStep.BS_08_CallAGV); MoveInfo.NextMoveStep(StoreMoveStep.BS_08_CallAGV);
InOutStoreLog("送出料架:通知调度系统拿走"); InOutStoreLog("送出料架:通知调度系统拿走");
//TODO
} }
else if (MoveInfo.MoveStep.Equals(StoreMoveStep.BS_08_CallAGV)) else if (MoveInfo.MoveStep.Equals(StoreMoveStep.BS_08_CallAGV))
{ {
MoveInfo.NextMoveStep(StoreMoveStep.BS_09_CloseDoor); MoveInfo.NextMoveStep(StoreMoveStep.BS_09_CloseDoor);
InOutStoreLog("送出料架:关闭仓门"); InOutStoreLog("送出料架:关闭仓门");
CylinderMove(MoveInfo, IO_Type.EntranceDoor_Open, IO_Type.EntranceDoor_Close);
} }
else if (MoveInfo.MoveStep.Equals(StoreMoveStep.BS_09_CloseDoor)) else if (MoveInfo.MoveStep.Equals(StoreMoveStep.BS_09_CloseDoor))
{ {
} }
} }
......
...@@ -52,6 +52,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -52,6 +52,8 @@ namespace OnlineStore.DeviceLibrary
List<string> ioList = new List<string>(); List<string> ioList = new List<string>();
AddDeviceName(ioList, Config.DIODeviceNameList); AddDeviceName(ioList, Config.DIODeviceNameList);
List<string> rfidList = new List<string>();
foreach (AC_BOX_Config config in configList.Values) foreach (AC_BOX_Config config in configList.Values)
{ {
AC_BOX_Bean equip = new AC_BOX_Bean(config); AC_BOX_Bean equip = new AC_BOX_Bean(config);
...@@ -59,6 +61,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -59,6 +61,8 @@ namespace OnlineStore.DeviceLibrary
AddDeviceName(ioList, config.DIODeviceNameList); AddDeviceName(ioList, config.DIODeviceNameList);
BoxMap.Add(config.DeviceID, equip); BoxMap.Add(config.DeviceID, equip);
BoxConfigMap.Add(config.DeviceID, config); BoxConfigMap.Add(config.DeviceID, config);
rfidList.Add(config.RFID_IP);
} }
IOManager.Init(); IOManager.Init();
...@@ -69,6 +73,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -69,6 +73,7 @@ namespace OnlineStore.DeviceLibrary
Task.Factory.StartNew(delegate Task.Factory.StartNew(delegate
{ {
RFIDManager.ConnectRFIOList(rfidList);
IOManager.instance.ConnectionIOList(ioList); IOManager.instance.ConnectionIOList(ioList);
addLastDI(IO_Type.Airpressure_Check, IOValue(IO_Type.Airpressure_Check)); addLastDI(IO_Type.Airpressure_Check, IOValue(IO_Type.Airpressure_Check));
addLastDI(IO_Type.SuddenStop_BTN, IOValue(IO_Type.SuddenStop_BTN)); addLastDI(IO_Type.SuddenStop_BTN, IOValue(IO_Type.SuddenStop_BTN));
......
...@@ -44,8 +44,6 @@ AXIS,(轴三)进出轴,InOut_Axis,3,COM1,0,,,,, ...@@ -44,8 +44,6 @@ AXIS,(轴三)进出轴,InOut_Axis,3,COM1,0,,,,,
AXIS,(轴四)压紧轴,Comp_Axis,4,COM1,0,,,,, AXIS,(轴四)压紧轴,Comp_Axis,4,COM1,0,,,,,
PRO,升降轴 进料口取料点 P1,UpDownAxis_P1,403000,,,,,,, PRO,升降轴 进料口取料点 P1,UpDownAxis_P1,403000,,,,,,,
PRO,升降轴 进料口出料前点 P2,UpDownAxis_P2,415000,,,,,,, PRO,升降轴 进料口出料前点 P2,UpDownAxis_P2,415000,,,,,,,
PRO,升降轴 进料口取料缓冲点 P7,UpDownAxis_DoorOBPosition_P7,415000,,,,,,,
PRO,升降轴 进料口出料缓冲点 P8,UpDownAxis_DoorIBPosition_P8,403000,,,,,,,
PRO,旋转轴(轴1)P1 待机原位点,MiddleAxis_P1,268093,,,,,,, PRO,旋转轴(轴1)P1 待机原位点,MiddleAxis_P1,268093,,,,,,,
PRO,进出轴(轴3)P1待机原位点,InOutAxis_P1_Position,1000,,,,,,, PRO,进出轴(轴3)P1待机原位点,InOutAxis_P1_Position,1000,,,,,,,
PRO,压紧轴(轴4)P1待机原位点,CompAxis_P1_Position,10000,,,,,,, PRO,压紧轴(轴4)P1待机原位点,CompAxis_P1_Position,10000,,,,,,,
...@@ -110,8 +108,7 @@ PRO,(轴二)升降轴轴停止时可误差的脉冲数的最大值,UpdownAxis_ErrorCountMax,1000,, ...@@ -110,8 +108,7 @@ PRO,(轴二)升降轴轴停止时可误差的脉冲数的最大值,UpdownAxis_ErrorCountMax,1000,,
PRO,(轴三)进出轴停止时可误差的脉冲数的最大值,InoutAxis_ErrorCountMax,1000,,,,,,, PRO,(轴三)进出轴停止时可误差的脉冲数的最大值,InoutAxis_ErrorCountMax,1000,,,,,,,
PRO,出入库多少次,会自动重置旋转轴,Box_ResetMCount,1000,,,,,,, PRO,出入库多少次,会自动重置旋转轴,Box_ResetMCount,1000,,,,,,,
PRO,出入库多少次,会自动重置所有轴操作,Box_ResetACount,100,,,,,,, PRO,出入库多少次,会自动重置所有轴操作,Box_ResetACount,100,,,,,,,
PRO,IO信号超时时间(毫秒),IOSingle_TimerOut,10000,,,,,,, PRO,IO信号超时时间(毫秒),IOSingle_TimerOut,10000,,,,,,,
PRO,是否使用料盘检测信号,IsUse_Tray_Check,0,,,,,, ,
PRO,(轴一)旋转轴最小限位,MiddleAxis_PositionMin,0,,,,,,, PRO,(轴一)旋转轴最小限位,MiddleAxis_PositionMin,0,,,,,,,
PRO,(轴二)升降轴最小限位,UpdownAxis_PositionMin,0,,,,,,, PRO,(轴二)升降轴最小限位,UpdownAxis_PositionMin,0,,,,,,,
PRO,(轴三)进出轴最小限位,InoutAxis_PositionMin,0,,,,,,, PRO,(轴三)进出轴最小限位,InoutAxis_PositionMin,0,,,,,,,
......
...@@ -16,11 +16,11 @@ namespace OnlineStore.DeviceLibrary ...@@ -16,11 +16,11 @@ namespace OnlineStore.DeviceLibrary
/// <summary> /// <summary>
/// 自动出入库间隔 /// 自动出入库间隔
/// </summary> /// </summary>
public int Jiange = 3; private int Jiange = 3;
public int positionIndex = 0; private int positionIndex = 0;
public string autoMsg = ""; public string autoMsg = "";
public int startIndex = -1; private int startIndex = -1;
public string shelfPosId = ""; private string shelfPosId = "";
#region 出入库参数 #region 出入库参数
/// <summary> /// <summary>
/// 当前出入库的次数,超过配置的数量时,需要自动重置一下,再进行出入库 /// 当前出入库的次数,超过配置的数量时,需要自动重置一下,再进行出入库
...@@ -29,6 +29,21 @@ namespace OnlineStore.DeviceLibrary ...@@ -29,6 +29,21 @@ namespace OnlineStore.DeviceLibrary
internal int CurrInOutACount = 0; internal int CurrInOutACount = 0;
#endregion #endregion
public void StartAuto(int jiange, int currIndex, string shelfPosId)
{
autoNext = true;
Jiange = jiange;
positionIndex = currIndex;
startIndex = currIndex;
this.shelfPosId = shelfPosId;
}
public void StopAuto()
{
autoNext = false;
}
internal void InOutEndProcess(AC_BOX_Bean boxBean, StoreMoveType storeMoveType) internal void InOutEndProcess(AC_BOX_Bean boxBean, StoreMoveType storeMoveType)
{ {
try try
...@@ -69,14 +84,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -69,14 +84,7 @@ namespace OnlineStore.DeviceLibrary
boxBean.Reset(false); boxBean.Reset(false);
autoMsg = "自动出库:" + posid; autoMsg = "自动出库:" + posid;
boxBean.AddWaitOutInfo(new InOutParam("", posid, shelfPosId)); boxBean.AddWaitOutInfo(new InOutParam("", posid, shelfPosId));
} }
else if (CurrInOutCount >= boxBean.Config.Box_ResetMCount)
{
boxBean.LogInfo("自动进入下一个出库:posid=" + posid + ",当时已经出入库" + CurrInOutCount + "次,需要重置BOX旋转轴,先把出库信息存入排队列表中");
//ResetMiddleAxis(false);
autoMsg = "自动出库:" + posid;
boxBean.AddWaitOutInfo(new InOutParam("", posid, shelfPosId));
}
else else
{ {
boxBean.LogInfo("自动进入下一个出库:posid=" + posid); boxBean.LogInfo("自动进入下一个出库:posid=" + posid);
...@@ -112,14 +120,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -112,14 +120,7 @@ namespace OnlineStore.DeviceLibrary
boxBean.Reset(false); boxBean.Reset(false);
autoMsg = "自动入库:" + posid; autoMsg = "自动入库:" + posid;
boxBean.AddWaitOutInfo(new InOutParam("AAAA", posid, shelfPosId)); boxBean.AddWaitOutInfo(new InOutParam("AAAA", posid, shelfPosId));
} }
else if (CurrInOutCount >= boxBean.Config.Box_ResetMCount)
{
boxBean.LogInfo("自动进入下一个出库:posid=" + posid + ",当时已经出入库" + CurrInOutCount + "次,需要重置BOX旋转轴,先把出库信息存入排队列表中");
//ResetMiddleAxis(false);
autoMsg = "自动入库:" + posid;
boxBean.AddWaitOutInfo(new InOutParam("AAAA", posid, shelfPosId));
}
else else
{ {
boxBean.LogInfo("自动进入下一个入库:posid=" + posid); boxBean.LogInfo("自动进入下一个入库:posid=" + posid);
......
...@@ -248,67 +248,67 @@ namespace OnlineStore.DeviceLibrary ...@@ -248,67 +248,67 @@ namespace OnlineStore.DeviceLibrary
#endregion #endregion
#region 料仓内部入库步骤 20500 #region 料仓内部入库步骤 20500
/// <summary> ///// <summary>
/// 入库检测 ///// 入库检测
/// </summary> ///// </summary>
SI_00_TrayCheck = 20500, //SI_00_TrayCheck = 20500,
/// <summary> ///// <summary>
/// 入库,。定位气缸下降 ///// 入库,。定位气缸下降
/// </summary> ///// </summary>
SI_01_LocationCylinderDown =20501, //SI_01_LocationCylinderDown =20501,
/// <summary> ///// <summary>
/// 入库。。进出轴(叉子)先返回P1 ///// 入库。。进出轴(叉子)先返回P1
/// </summary> ///// </summary>
SI_02_InOutAxisHome =20502, //SI_02_InOutAxisHome =20502,
/// <summary> ///// <summary>
/// 入库。。所有轴先回到待机点,轴2、轴1 动作到P1,,轴4动作至P3 ///// 入库。。所有轴先回到待机点,轴2、轴1 动作到P1,,轴4动作至P3
/// </summary> ///// </summary>
SI_03_ReturnHome =20503, //SI_03_ReturnHome =20503,
/// <summary> ///// <summary>
/// 入库。。压紧物品(有压紧轴的才需要此步骤),轴4( 压紧) 至P3(压紧前点) ///// 入库。。压紧物品(有压紧轴的才需要此步骤),轴4( 压紧) 至P3(压紧前点)
/// </summary> ///// </summary>
SI_04_CompressWare =20504, //SI_04_CompressWare =20504,
/// <summary> ///// <summary>
/// 入库。。叉子进入入料口,轴3( 叉子) 至P2( 进料口取料点) ///// 入库。。叉子进入入料口,轴3( 叉子) 至P2( 进料口取料点)
/// </summary> ///// </summary>
SI_05_DeviceToDoor =20505, //SI_05_DeviceToDoor =20505,
/// <summary> ///// <summary>
/// 入库。。把物品放入叉子上,轴2( 上下) 至P7( 进料口取料缓冲点),压紧物品(有压紧轴的才需要此步骤),轴4( 压紧) 至P2(压紧点) ///// 入库。。把物品放入叉子上,轴2( 上下) 至P7( 进料口取料缓冲点),压紧物品(有压紧轴的才需要此步骤),轴4( 压紧) 至P2(压紧点)
/// </summary> ///// </summary>
SI_06_DoorWarToDevice =20506, //SI_06_DoorWarToDevice =20506,
/// <summary> ///// <summary>
/// 入库。。叉子 从入料口抽出,轴3( 叉子) 至P1( 待机点) ///// 入库。。叉子 从入料口抽出,轴3( 叉子) 至P1( 待机点)
/// </summary> ///// </summary>
SI_07_DeviceBackFromDoor =20507, //SI_07_DeviceBackFromDoor =20507,
/// <summary> ///// <summary>
/// 入库。。,定位气缸伸出 (有压紧轴的不需要此步骤) ///// 入库。。,定位气缸伸出 (有压紧轴的不需要此步骤)
/// </summary> ///// </summary>
SI_08_LocationCylinder_Up =20508, //SI_08_LocationCylinder_Up =20508,
/// <summary> ///// <summary>
/// 入库。。移动到库位点,轴1( 转盘) 至P2( 库位点)轴2(上下) 至P3(库位入库前点) ///// 入库。。移动到库位点,轴1( 转盘) 至P2( 库位点)轴2(上下) 至P3(库位入库前点)
/// </summary> ///// </summary>
SI_09_MoveToBag =20509, //SI_09_MoveToBag =20509,
/// <summary> ///// <summary>
/// 入库。。定位气缸退回 (有压紧轴的不需要此步骤) ///// 入库。。定位气缸退回 (有压紧轴的不需要此步骤)
/// </summary> ///// </summary>
SI_10_LocationCylinder_Down =20510, //SI_10_LocationCylinder_Down =20510,
/// <summary> ///// <summary>
/// 入库。。叉子进入库位中,轴3( 叉子) 至P3(库位取放料点) ///// 入库。。叉子进入库位中,轴3( 叉子) 至P3(库位取放料点)
/// </summary> ///// </summary>
SI_11_DeviceToBag =20511, //SI_11_DeviceToBag =20511,
/// <summary> ///// <summary>
/// 入库。。放下物品,轴2( 上下) 至P4( 库位入料缓冲点)轴4( 压紧) 至P3( 压紧前点) ///// 入库。。放下物品,轴2( 上下) 至P4( 库位入料缓冲点)轴4( 压紧) 至P3( 压紧前点)
/// </summary> ///// </summary>
SI_12_PutWareToBag =20512, //SI_12_PutWareToBag =20512,
/// <summary> ///// <summary>
/// 入库。。叉子从库位中返回,轴3( 叉子) 动作至P1( 待机点) ///// 入库。。叉子从库位中返回,轴3( 叉子) 动作至P1( 待机点)
/// </summary> ///// </summary>
SI_13_DeviceBackFromBag =20513, //SI_13_DeviceBackFromBag =20513,
/// <summary> ///// <summary>
/// 入库。。返回待机点,轴2/轴1/轴4动作至P1( 待机点))开始 ///// 入库。。返回待机点,轴2/轴1/轴4动作至P1( 待机点))开始
/// </summary> ///// </summary>
SI_14_GoBack =20514, //SI_14_GoBack =20514,
#endregion #endregion
......
...@@ -76,6 +76,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -76,6 +76,8 @@ namespace OnlineStore.DeviceLibrary
{ {
get { return moveStep; } get { return moveStep; }
} }
public bool SingleInstore = false;
public void NextMoveStep(StoreMoveStep step) public void NextMoveStep(StoreMoveStep step)
{ {
...@@ -132,8 +134,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -132,8 +134,8 @@ namespace OnlineStore.DeviceLibrary
/// 入库时,需要循环料架的料盘取出 /// 入库时,需要循环料架的料盘取出
/// </summary> /// </summary>
public List<string> ShelfPositionList = new List<string>(); public List<string> ShelfPositionList = new List<string>();
public string currShelfPosId = ""; private string currShelfPosId = "";
public int currShelfIndex = -1; private int currShelfIndex = -1;
public bool NextShelfPos() public bool NextShelfPos()
{ {
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!