Commit 18693286 LN

复位修改。料架入库修改。

1 个父辈 c9bb277f
此文件类型无法预览
...@@ -30,6 +30,8 @@ ...@@ -30,6 +30,8 @@
<add key="Config_Pwd" value="123456"/> <add key="Config_Pwd" value="123456"/>
<!--二维码类型列表配置,用#分割,一维码=Barcode 二维码: QR Code#Data Matrix ECC 200#Micro QR Code--> <!--二维码类型列表配置,用#分割,一维码=Barcode 二维码: QR Code#Data Matrix ECC 200#Micro QR Code-->
<add key="CodeType" value="QR Code" /> <add key="CodeType" value="QR Code" />
<!--二维码参数文件所在路径,文件名与二维码类型名一样-->
<add key="CodeParamPath" value="\CodeParam\" />
<!--出库等待料盘拿走的时间,秒--> <!--出库等待料盘拿走的时间,秒-->
<add key="OutStoreWaitSeconds" value="10"/> <add key="OutStoreWaitSeconds" value="10"/>
<!--温控器类型,0=壁挂王字壳温湿度变送器,1=妙昕温湿度记录仪--> <!--温控器类型,0=壁挂王字壳温湿度变送器,1=妙昕温湿度记录仪-->
...@@ -47,7 +49,7 @@ ...@@ -47,7 +49,7 @@
<add key ="AIOAutoUpload" value ="0"/> <add key ="AIOAutoUpload" value ="0"/>
<!--AGV调度服务器地址--> <!--AGV调度服务器地址-->
<add key="AgvServerIp" value="192.168.103.22" /> <add key="AgvServerIp" value="192.168.103.22" />
<add key ="CodeCount" value ="1"/> <add key ="CodeCount" value ="2"/>
</appSettings> </appSettings>
<log4net> <log4net>
<appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender"> <appender name="RollingLogFileAppender" type="log4net.Appender.RollingFileAppender">
......
...@@ -338,6 +338,7 @@ ...@@ -338,6 +338,7 @@
this.btnLocationDown.TabIndex = 251; this.btnLocationDown.TabIndex = 251;
this.btnLocationDown.Text = "定位装置下降"; this.btnLocationDown.Text = "定位装置下降";
this.btnLocationDown.UseVisualStyleBackColor = false; this.btnLocationDown.UseVisualStyleBackColor = false;
this.btnLocationDown.Visible = false;
this.btnLocationDown.Click += new System.EventHandler(this.btnLocationDown_Click); this.btnLocationDown.Click += new System.EventHandler(this.btnLocationDown_Click);
// //
// label5 // label5
...@@ -362,6 +363,7 @@ ...@@ -362,6 +363,7 @@
this.btnLocationUp.TabIndex = 250; this.btnLocationUp.TabIndex = 250;
this.btnLocationUp.Text = "定位装置上升"; this.btnLocationUp.Text = "定位装置上升";
this.btnLocationUp.UseVisualStyleBackColor = false; this.btnLocationUp.UseVisualStyleBackColor = false;
this.btnLocationUp.Visible = false;
this.btnLocationUp.Click += new System.EventHandler(this.btnLocationUp_Click); this.btnLocationUp.Click += new System.EventHandler(this.btnLocationUp_Click);
// //
// cmbWriteIO // cmbWriteIO
......
...@@ -324,8 +324,8 @@ namespace OnlineStore.ACPackingStore ...@@ -324,8 +324,8 @@ namespace OnlineStore.ACPackingStore
boxBean.IOMove(IO_Type.TopCylinder_Up, IO_VALUE.LOW); boxBean.IOMove(IO_Type.TopCylinder_Up, IO_VALUE.LOW);
boxBean.IOMove(IO_Type.NGDoorCylinder_Down, IO_VALUE.LOW); boxBean.IOMove(IO_Type.NGDoorCylinder_Down, IO_VALUE.LOW);
boxBean.IOMove(IO_Type.NGDoowCylinder_Up, IO_VALUE.LOW); boxBean.IOMove(IO_Type.NGDoowCylinder_Up, IO_VALUE.LOW);
boxBean.IOMove(IO_Type.LocationCylinder_Down, IO_VALUE.LOW); // boxBean.IOMove(IO_Type.LocationCylinder_Down, IO_VALUE.LOW);
boxBean.IOMove(IO_Type.LocationCylinder_Up, IO_VALUE.LOW); // boxBean.IOMove(IO_Type.LocationCylinder_Up, IO_VALUE.LOW);
} }
private void btnOpenDoor_Click(object sender, EventArgs e) private void btnOpenDoor_Click(object sender, EventArgs e)
......
...@@ -124,9 +124,20 @@ namespace OnlineStore.ACPackingStore ...@@ -124,9 +124,20 @@ namespace OnlineStore.ACPackingStore
//如果料仓还在运行状态,先关闭料仓 //如果料仓还在运行状态,先关闭料仓
if (!store.storeRunStatus.Equals(StoreRunStatus.Wait)) if (!store.storeRunStatus.Equals(StoreRunStatus.Wait))
{ {
LogUtil.info(LOGGER, "退出程序之前先停止运行 "); LogUtil.info(LOGGER, "ExitApp 停止"+store.Name+"运行 ");
store.StopRun(); store.StopRun();
} }
else
{
foreach(AC_BOX_Bean bean in store.BoxMap.Values)
{
if (bean.storeRunStatus.Equals(StoreRunStatus.Wait).Equals(false))
{
LogUtil.info(LOGGER, "ExitApp 停止" + bean.Name + "运行 ");
bean.StopRun();
}
}
}
IOManager.instance.CloseAllDO(); IOManager.instance.CloseAllDO();
IOManager.instance.CloseAllConnection(); IOManager.instance.CloseAllConnection();
......
...@@ -258,13 +258,14 @@ namespace OnlineStore.DeviceLibrary ...@@ -258,13 +258,14 @@ namespace OnlineStore.DeviceLibrary
DoorBean.Stop(); DoorBean.Stop();
//开始复位动作 //开始复位动作
MoveInfo.NextMoveStep(StoreMoveStep.BOX_H01_DoorClose); MoveInfo.NextMoveStep(StoreMoveStep.BOX_H01_InOutBack);
LogInfo(MoveInfo.MoveType + ": 线体停止,入口移门关闭,NG升降门下降");
LogInfo(MoveInfo.MoveType + ": 开始料架入库,线体停止,进出轴先原点返回");
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(2000));
IOMove(IO_Type.Line_BackRun, IO_VALUE.LOW); IOMove(IO_Type.Line_BackRun, IO_VALUE.LOW);
IOMove(IO_Type.Line_Run, IO_VALUE.LOW); IOMove(IO_Type.Line_Run, IO_VALUE.LOW);
CylinderMove(MoveInfo, IO_Type.NGDoowCylinder_Up, IO_Type.NGDoorCylinder_Down); ACAxisHomeMove(Config.InOut_Axis);
//CylinderMove(null, IO_Type.EntranceDoor_Open, IO_Type.EntranceDoor_Close);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(300));
} }
/// <summary> /// <summary>
/// 复位处理 /// 复位处理
...@@ -281,30 +282,51 @@ namespace OnlineStore.DeviceLibrary ...@@ -281,30 +282,51 @@ namespace OnlineStore.DeviceLibrary
} }
switch (MoveInfo.MoveStep) switch (MoveInfo.MoveStep)
{ {
case StoreMoveStep.BOX_H01_InOutBack:
case StoreMoveStep.BOX_H01_DoorClose:
MoveInfo.NextMoveStep(StoreMoveStep.BOX_H03_InOutBack);
LogInfo(MoveInfo.MoveType + ": 进出轴开始原点返回");
ACAxisHomeMove(Config.InOut_Axis);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(2000));
break;
case StoreMoveStep.BOX_H03_InOutBack:
Thread.Sleep(200); Thread.Sleep(200);
MoveInfo.NextMoveStep(StoreMoveStep.BOX_H04_InOutToP1); MoveInfo.NextMoveStep(StoreMoveStep.BOX_H02_InoutTOP1_TopDown);
LogInfo(MoveInfo.MoveType + ": 进出轴到待机点P1,关闭舱门"); LogInfo(MoveInfo.MoveType + ": ,线体停止,进出轴到待机点P1,顶升气缸下降,NG门下降,入料移门关闭");
//进出轴原点返回完成,将进出轴的位置设置=0 IOMove(IO_Type.Line_BackRun, IO_VALUE.LOW);
IOMove(IO_Type.Line_Run, IO_VALUE.LOW);
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);
//判断叉子没有料盘 CylinderMove(MoveInfo, IO_Type.NGDoowCylinder_Up, IO_Type.NGDoorCylinder_Down);
//StoreMove.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.TrayCheck_Fixture, IO_VALUE.LOW)); CylinderMove(MoveInfo, IO_Type.TopCylinder_Up, IO_Type.TopCylinder_Down);
DoorBean.StartClose(MoveInfo);
break; break;
case StoreMoveStep.BOX_H04_InOutToP1: case StoreMoveStep.BOX_H02_InoutTOP1_TopDown:
MoveInfo.NextMoveStep(StoreMoveStep.BOX_H03_LineRun);
if (IOValue(IO_Type.LineTake_Check).Equals(IO_VALUE.HIGH))
{
LogInfo(MoveInfo.MoveType + ":取料工位有料架,线体停止 ");
IOMove(IO_Type.Line_BackRun, IO_VALUE.LOW);
IOMove(IO_Type.Line_Run, IO_VALUE.LOW);
}
else
{
LogInfo(MoveInfo.MoveType + ":取料工位无料架, 线体先正转3000");
IOMove(IO_Type.Line_BackRun, IO_VALUE.LOW);
IOMove(IO_Type.Line_Run, IO_VALUE.HIGH);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(3000));
}
break;
// Thread.Sleep(200);
// MoveInfo.NextMoveStep(StoreMoveStep.BOX_H04_InOutToP1);
// LogInfo(MoveInfo.MoveType + ": 进出轴到待机点P1,关闭舱门,关闭入料移门");
// //进出轴原点返回完成,将进出轴的位置设置=0
// AxisCountClear(Config.InOut_Axis);
// ACAxisMove(Config.InOut_Axis, Config.InOutAxis_P1_Position, Config.InOutAxis_P1_Speed);
// CylinderMove(MoveInfo, IO_Type.NGDoowCylinder_Up, IO_Type.NGDoorCylinder_Down);
// DoorBean.StartClose(MoveInfo);
// break;
//case StoreMoveStep.BOX_H04_InOutToP1:
case StoreMoveStep.BOX_H03_LineRun:
//如果此时轴三还在报警,需要提示错误并等待 //如果此时轴三还在报警,需要提示错误并等待
if (ACServerManager.GetAlarmStatus(Config.InOut_Axis.DeviceName, Config.InOut_Axis.GetAxisValue()) > 0) if (ACServerManager.GetAlarmStatus(Config.InOut_Axis.DeviceName, Config.InOut_Axis.GetAxisValue()) > 0)
{ {
LogUtil.error(Name + MoveInfo.MoveType + "复位失败: " + Config.InOut_Axis.Explain + "报警"); LogUtil.error(Name + MoveInfo.MoveType + "复位失败: " + Config.InOut_Axis.Explain + "报警");
WarnMsg = Name + "复位失败: " + Config.InOut_Axis.Explain + "报警"; WarnMsg = Name + "复位失败: " + Config.InOut_Axis.Explain + "报警";
Alarm(StoreAlarmType.AxisAlarm, GetAlarmCodeByAxis(Config.InOut_Axis).ToString(), WarnMsg, StoreMoveType.None); Alarm(StoreAlarmType.AxisAlarm, GetAlarmCodeByAxis(Config.InOut_Axis).ToString(), WarnMsg, StoreMoveType.None);
return; return;
} }
//复位和回原点要等轴3进出轴ORG亮了以后才能返回其他轴 //复位和回原点要等轴3进出轴ORG亮了以后才能返回其他轴
...@@ -322,8 +344,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -322,8 +344,8 @@ namespace OnlineStore.DeviceLibrary
ACAxisMove(Config.Comp_Axis, 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_H06_MiddleAxisToP1: case StoreMoveStep.BOX_H06_MiddleAxisToP1:
LogInfo(MoveInfo.MoveType + ": 完成"); LogInfo(MoveInfo.MoveType + ": 完成");
MoveEndToRuningStatus(); MoveEndToRuningStatus();
break; break;
case StoreMoveStep.BOX_H54_TOP1_InOutToP1: case StoreMoveStep.BOX_H54_TOP1_InOutToP1:
...@@ -339,8 +361,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -339,8 +361,8 @@ namespace OnlineStore.DeviceLibrary
ACAxisMove(Config.Comp_Axis, 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_H56_TOP1_OtherAxisToP1: case StoreMoveStep.BOX_H56_TOP1_OtherAxisToP1:
LogInfo("到待机状态完成"); LogInfo("到待机状态完成");
MoveEndToRuningStatus(); MoveEndToRuningStatus();
break; break;
default: break; default: break;
...@@ -661,6 +683,13 @@ namespace OnlineStore.DeviceLibrary ...@@ -661,6 +683,13 @@ namespace OnlineStore.DeviceLibrary
ShowTimeLog("AutoResetProcess"); ShowTimeLog("AutoResetProcess");
IOTimeOutProcess(); IOTimeOutProcess();
ShowTimeLog("IOTimeOutProcess"); ShowTimeLog("IOTimeOutProcess");
//如果入口有料架需要入库
if (MoveInfo.MoveType.Equals(StoreMoveType.None)
&& (IOValue(IO_Type.LineIn_Check).Equals(IO_VALUE.HIGH) || IOValue(IO_Type.LineTake_Check).Equals(IO_VALUE.HIGH)))
{
StartShelfInStore();
}
} }
} }
catch (Exception ex) catch (Exception ex)
......
...@@ -61,7 +61,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -61,7 +61,7 @@ namespace OnlineStore.DeviceLibrary
wait.IsEnd = IOValue(wait.IoType).Equals(wait.IoValue); wait.IsEnd = IOValue(wait.IoType).Equals(wait.IoValue);
int timeOutMs = Config.IOSingle_TimerOut; int timeOutMs = Config.IOSingle_TimerOut;
if ((!wait.IsEnd) && span.TotalMilliseconds > timeOutMs) if ((!wait.IsEnd) && span.TotalMilliseconds > timeOutMs&&NoAlarm())
{ {
ConfigIO io = Config.getWaitIO(wait.IoType); ConfigIO io = Config.getWaitIO(wait.IoType);
WarnMsg = Name + " 等待信号" + io.DisplayStr + "=" + wait.IoValue + "超时!"; WarnMsg = Name + " 等待信号" + io.DisplayStr + "=" + wait.IoValue + "超时!";
...@@ -214,13 +214,47 @@ namespace OnlineStore.DeviceLibrary ...@@ -214,13 +214,47 @@ namespace OnlineStore.DeviceLibrary
{ {
bool canStart = (storeRunStatus.Equals(StoreRunStatus.Runing) bool canStart = (storeRunStatus.Equals(StoreRunStatus.Runing)
&& MoveInfo.MoveType.Equals(StoreMoveType.None) && MoveInfo.MoveType.Equals(StoreMoveType.None) );
&& IOValue(IO_Type.LineIn_Check).Equals(IO_VALUE.HIGH)); if (!canStart || isInSuddenDown || isNoAirCheck || (alarmType.Equals(StoreAlarmType.None).Equals(false)))
if (!canStart)
{ {
return; return;
} }
storeRunStatus = StoreRunStatus.Busy;
storeStatus = StoreStatus.InStoreExecute;
EmprtShelfList = new ConcurrentQueue<string>();
if (IOValue(IO_Type.LineIn_Check).Equals(IO_VALUE.HIGH))
{
MoveInfo.NewMove(StoreMoveType.InStore, new InOutParam());
MoveInfo.MoveParam.MoveP = new LineMoveP(Config);
MoveInfo.ShelfPositionList = new List<string>(ShelfPosList);
MoveInfo.NextMoveStep(StoreMoveStep.BI_02_DoorOpen);
LogInfo(" 空闲中,检测到入料口有料架,启动料架入库 " + MoveInfo.SLog + "");
// CylinderMove(MoveInfo, IO_Type.EntranceDoor_Close, IO_Type.EntranceDoor_Open);
// DoorBean.StartOpen(MoveInfo);
}
else if (IOValue(IO_Type.LineTake_Check).Equals(IO_VALUE.HIGH))
{
MoveInfo.NewMove(StoreMoveType.InStore, new InOutParam());
MoveInfo.MoveParam.MoveP = new LineMoveP(Config);
MoveInfo.ShelfPositionList = new List<string>(ShelfPosList);
MoveInfo.NextMoveStep(StoreMoveStep.BI_05_DoorClose);
LogInfo(" 空闲中,检测到入料口有料架,启动料架入库 " + MoveInfo.SLog + "");
}
else
{
LogInfo(" 空闲中,需要料架入库,料架入库 " + MoveInfo.SLog + ":入料口移门打开,");
MoveInfo.NewMove(StoreMoveType.InStore, new InOutParam());
MoveInfo.MoveParam.MoveP = new LineMoveP(Config);
MoveInfo.ShelfPositionList = new List<string>(ShelfPosList);
MoveInfo.NextMoveStep(StoreMoveStep.BI_02_DoorOpen);
// CylinderMove(MoveInfo, IO_Type.EntranceDoor_Close, IO_Type.EntranceDoor_Open);
DoorBean.StartOpen(MoveInfo);
}
}
private void UpdateShelfId()
{
//读取RFID //读取RFID
RFIDData data = RFIDManager.ReadData(Config.RFID_IP); RFIDData data = RFIDManager.ReadData(Config.RFID_IP);
//TODO 判断料架是否正确 //TODO 判断料架是否正确
...@@ -232,24 +266,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -232,24 +266,10 @@ namespace OnlineStore.DeviceLibrary
else else
{ {
LogUtil.error(Name + "检测到入料口有料架,读取RFID数据错误:" + data.ToStr()); LogUtil.error(Name + "检测到入料口有料架,读取RFID数据错误:" + data.ToStr());
// return; // return;
} }
storeRunStatus = StoreRunStatus.Busy;
storeStatus = StoreStatus.InStoreExecute;
EmprtShelfList = new ConcurrentQueue<string>();
LogInfo(" 空闲中,读取到料架" + data.ToStr() + ",料架入库 " + MoveInfo.SLog + ":入料口移门打开,");
MoveInfo.NewMove(StoreMoveType.InStore, new InOutParam());
MoveInfo.MoveParam.MoveP = new LineMoveP(Config);
MoveInfo.ShelfPositionList = new List<string>(ShelfPosList);
MoveInfo.NextMoveStep(StoreMoveStep.BI_02_DoorOpen);
// CylinderMove(MoveInfo, IO_Type.EntranceDoor_Close, IO_Type.EntranceDoor_Open);
DoorBean.StartOpen(MoveInfo);
} }
private void StartMoveToBag() private void StartMoveToBag()
{ {
MoveInfo.NextMoveStep(StoreMoveStep.BI_51_MoveToBag); MoveInfo.NextMoveStep(StoreMoveStep.BI_51_MoveToBag);
...@@ -335,6 +355,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -335,6 +355,7 @@ namespace OnlineStore.DeviceLibrary
int targetP = currPosition + Config.CompAxis_Down_Position; int targetP = currPosition + Config.CompAxis_Down_Position;
LastHeight = Config.GetComP2PlateH(targetP); LastHeight = Config.GetComP2PlateH(targetP);
InOutStoreLog("料架取料 " + MoveInfo.SLog + ":检测到料叉压紧确认信号,向下压紧【" + ComTargetPosition + "】目标【" + targetP + "】,记录料盘高度【" + LastHeight + "】"); InOutStoreLog("料架取料 " + MoveInfo.SLog + ":检测到料叉压紧确认信号,向下压紧【" + ComTargetPosition + "】目标【" + targetP + "】,记录料盘高度【" + LastHeight + "】");
MoveInfo.MoveParam.MoveP.ComPress_P2 = ComTargetPosition;
ACAxisMove(Config.Comp_Axis, targetP, Config.CompAxis_P1_Speed); ACAxisMove(Config.Comp_Axis, targetP, Config.CompAxis_P1_Speed);
} }
...@@ -369,14 +390,14 @@ namespace OnlineStore.DeviceLibrary ...@@ -369,14 +390,14 @@ namespace OnlineStore.DeviceLibrary
else if (MoveInfo.MoveStep.Equals(StoreMoveStep.BI_22_InOutToP2)) else if (MoveInfo.MoveStep.Equals(StoreMoveStep.BI_22_InOutToP2))
{ {
MoveInfo.NextMoveStep(StoreMoveStep.BI_23_PutTrayDown); MoveInfo.NextMoveStep(StoreMoveStep.BI_23_PutTrayDown);
InOutStoreLog("扫码 " + MoveInfo.SLog + ":升降轴缓慢下降到P1,压紧轴返回压紧前点"); InOutStoreLog("扫码 " + MoveInfo.SLog + ":升降轴缓慢下降到P1,压紧轴返回压紧前点P3");
ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P1, Config.UpDownAxis_P1_Speed); ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P1, Config.UpDownAxis_P1_Speed);
ACAxisMove(Config.Comp_Axis, moveP.ComPress_P3, Config.CompAxis_P3_Speed); ACAxisMove(Config.Comp_Axis, moveP.ComPress_P3, Config.CompAxis_P3_Speed);
} }
else if (MoveInfo.MoveStep.Equals(StoreMoveStep.BI_23_PutTrayDown)) else if (MoveInfo.MoveStep.Equals(StoreMoveStep.BI_23_PutTrayDown))
{ {
MoveInfo.NextMoveStep(StoreMoveStep.BI_24_InOutToP1); MoveInfo.NextMoveStep(StoreMoveStep.BI_24_InOutToP1);
InOutStoreLog("扫码 " + MoveInfo.SLog + ":进出轴返回待机点"); InOutStoreLog("扫码 " + MoveInfo.SLog + ":进出轴返回待机点P1");
ACAxisMove(Config.InOut_Axis, moveP.InOut_P1, Config.CompAxis_P1_Speed); ACAxisMove(Config.InOut_Axis, moveP.InOut_P1, Config.CompAxis_P1_Speed);
} }
else if (MoveInfo.MoveStep.Equals(StoreMoveStep.BI_24_InOutToP1)) else if (MoveInfo.MoveStep.Equals(StoreMoveStep.BI_24_InOutToP1))
...@@ -396,7 +417,8 @@ namespace OnlineStore.DeviceLibrary ...@@ -396,7 +417,8 @@ namespace OnlineStore.DeviceLibrary
MoveInfo.NextMoveStep(StoreMoveStep.BI_25_ScanCode); MoveInfo.NextMoveStep(StoreMoveStep.BI_25_ScanCode);
InOutStoreLog("扫码 " + MoveInfo.SLog + ":记录宽度,开始扫码"); InOutStoreLog("扫码 " + MoveInfo.SLog + ":记录宽度,开始扫码");
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(5000)); MoveInfo.OneWaitCanEndStep = true;
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(6000));
MoveInfo.WaitList.Add(WaitResultInfo.WaitCode()); MoveInfo.WaitList.Add(WaitResultInfo.WaitCode());
Task.Factory.StartNew(delegate Task.Factory.StartNew(delegate
{ {
...@@ -441,6 +463,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -441,6 +463,10 @@ namespace OnlineStore.DeviceLibrary
MoveInfo.MoveParam.PosID = ""; MoveInfo.MoveParam.PosID = "";
StartSendTray("获取入库库位失败"); StartSendTray("获取入库库位失败");
} }
else
{
MoveInfo.EndStepWait();
}
} }
} }
...@@ -523,7 +549,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -523,7 +549,7 @@ namespace OnlineStore.DeviceLibrary
else if (MoveInfo.MoveStep.Equals(StoreMoveStep.BI_73_InoutToNGDoor)) else if (MoveInfo.MoveStep.Equals(StoreMoveStep.BI_73_InoutToNGDoor))
{ {
MoveInfo.NextMoveStep(StoreMoveStep.BI_74_UpdownDown); MoveInfo.NextMoveStep(StoreMoveStep.BI_74_UpdownDown);
InOutStoreLog("送出料盘 " + MoveInfo.SLog + ":升降轴缓慢下降,放下料盘"); InOutStoreLog("送出料盘 " + MoveInfo.SLog + ":升降轴到P12,压紧轴到P3,放下料盘");
ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P12, Config.UpDownAxis_P2_Speed); ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P12, Config.UpDownAxis_P2_Speed);
ACAxisMove(Config.Comp_Axis, moveP.ComPress_P3, Config.CompAxis_P3_Speed); ACAxisMove(Config.Comp_Axis, moveP.ComPress_P3, Config.CompAxis_P3_Speed);
} }
...@@ -540,16 +566,25 @@ namespace OnlineStore.DeviceLibrary ...@@ -540,16 +566,25 @@ namespace OnlineStore.DeviceLibrary
CylinderMove(MoveInfo, IO_Type.NGDoowCylinder_Up, IO_Type.NGDoorCylinder_Down); CylinderMove(MoveInfo, IO_Type.NGDoowCylinder_Up, IO_Type.NGDoorCylinder_Down);
} }
else if (MoveInfo.MoveStep.Equals(StoreMoveStep.BI_76_NGDoorDown)) else if (MoveInfo.MoveStep.Equals(StoreMoveStep.BI_76_NGDoorDown))
{ {
MoveInfo.NextMoveStep(StoreMoveStep.BI_77_NGLineRun);
InOutStoreLog("料架入库 " + MoveInfo.SLog + ":NG流水线转动3000");
IOMove(IO_Type.NGLine_Run, IO_VALUE.HIGH);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(3000));
}
else if (MoveInfo.MoveStep.Equals(StoreMoveStep.BI_77_NGLineRun))
{
IOMove(IO_Type.NGLine_Run, IO_VALUE.LOW);
MoveInfo.NextMoveStep(StoreMoveStep.BI_08_StartGetTray); MoveInfo.NextMoveStep(StoreMoveStep.BI_08_StartGetTray);
InOutStoreLog("料架入库 " + MoveInfo.SLog + ":开始循环逐个取料盘,扫码入库"); InOutStoreLog("料架入库 " + MoveInfo.SLog + ":停止NG线体转动,开始循环逐个取料盘,扫码入库");
} }
#endregion #endregion
//料架进入逻辑 //料架进入逻辑
else if (MoveInfo.MoveStep < StoreMoveStep.BI_08_StartGetTray) else if (MoveInfo.MoveStep < StoreMoveStep.BI_08_StartGetTray)
{ {
ShelfOutProcess(); ShelfEnterProcess();
} }
//料架送出逻辑 //料架送出逻辑
else if (MoveInfo.MoveStep >= StoreMoveStep.BS_01_TopCylinder_Down) else if (MoveInfo.MoveStep >= StoreMoveStep.BS_01_TopCylinder_Down)
...@@ -698,12 +733,11 @@ namespace OnlineStore.DeviceLibrary ...@@ -698,12 +733,11 @@ namespace OnlineStore.DeviceLibrary
} }
if (MoveInfo.MoveStep.Equals(StoreMoveStep.BI_01_ReadyShelf)) if (MoveInfo.MoveStep.Equals(StoreMoveStep.BI_01_ReadyShelf))
{ {
MoveInfo.ShelfPositionList = new List<string>(ShelfPosList); // MoveInfo.ShelfPositionList = new List<string>(ShelfPosList);
InOutStoreLog(moveName + MoveInfo.SLog + "调用AgvClient.MayEnter,小车已到达,打开入料口移门"); InOutStoreLog(moveName + MoveInfo.SLog + "调用AgvClient.MayEnter,小车已到达,打开入料口移门");
MoveInfo.NextMoveStep(StoreMoveStep.BI_02_DoorOpen); MoveInfo.NextMoveStep(StoreMoveStep.BI_02_DoorOpen);
DoorBean.StartOpen(MoveInfo); DoorBean.StartOpen(MoveInfo);
//CylinderMove(MoveInfo, IO_Type.EntranceDoor_Close, IO_Type.EntranceDoor_Open);
} }
else if (MoveInfo.MoveStep.Equals(StoreMoveStep.BI_02_DoorOpen)) else if (MoveInfo.MoveStep.Equals(StoreMoveStep.BI_02_DoorOpen))
{ {
...@@ -935,7 +969,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -935,7 +969,7 @@ namespace OnlineStore.DeviceLibrary
IsInProcess = true; IsInProcess = true;
if (IOValue(TargetIoType).Equals(TargetIoValue)) if (IOValue(TargetIoType).Equals(TargetIoValue))
{ {
LogUtil.info(Name + "上料轴,检测到 " + TargetIoType + "=" + TargetIoValue + ",可以停止运动"); LogUtil.info(Name + "压紧轴运动:检测到 " + TargetIoType + "=" + TargetIoValue + ",停止运动");
ACServerManager.SuddenStop(Config.Comp_Axis.DeviceName, Config.Comp_Axis.GetAxisValue()); ACServerManager.SuddenStop(Config.Comp_Axis.DeviceName, Config.Comp_Axis.GetAxisValue());
ComAxisStopCheck(); ComAxisStopCheck();
} }
......
...@@ -430,8 +430,33 @@ namespace OnlineStore.DeviceLibrary ...@@ -430,8 +430,33 @@ namespace OnlineStore.DeviceLibrary
private void SetWarnMsg(string msg) private void SetWarnMsg(string msg)
{ {
if (String.IsNullOrEmpty(WarnMsg).Equals(false))
{
if (WarnMsg.Equals(msg))
{
if (msg.StartsWith(Name))
{
LogUtil.error(msg, 105);
}
else
{
LogUtil.error(Name + msg, 105);
}
}
else
{
if (msg.StartsWith(Name))
{
LogUtil.error(msg);
}
else
{
LogUtil.error(Name + msg);
}
}
}
WarnMsg = msg; WarnMsg = msg;
LogUtil.error(Name + WarnMsg);
} }
internal bool AGVProcess(string name, Actions action) internal bool AGVProcess(string name, Actions action)
......
...@@ -3,6 +3,7 @@ DI,急停,SuddenStop_BTN,0,PRO_AOI_IP_1,0,急停,X01,DI-01,0, ...@@ -3,6 +3,7 @@ DI,急停,SuddenStop_BTN,0,PRO_AOI_IP_1,0,急停,X01,DI-01,0,
DI,复位,Reset_BTN,1,PRO_AOI_IP_1,0,复位,X02,DI-02,0, DI,复位,Reset_BTN,1,PRO_AOI_IP_1,0,复位,X02,DI-02,0,
DI,气压检测,Airpressure_Check,2,PRO_AOI_IP_1,0,门禁,X03,DI-03,0, DI,气压检测,Airpressure_Check,2,PRO_AOI_IP_1,0,门禁,X03,DI-03,0,
DI,L侧门禁,DoorLimit,3,PRO_AOI_IP_1,0,料盘检测1(进料口),X04,DI-04,0, DI,L侧门禁,DoorLimit,3,PRO_AOI_IP_1,0,料盘检测1(进料口),X04,DI-04,0,
DO,NG料线体电机运转,NGLine_Run,4,PRO_AOI_IP_1,0,NG料线体电机运转,Y05,DO-05,0,
,,,,,,,,,, ,,,,,,,,,,
DI,L侧料盘检测1(识别区),TrayCheck_1,0,PRO_AOI_IP_2,0,L侧料盘检测1(识别区),X21,DI-21,0, DI,L侧料盘检测1(识别区),TrayCheck_1,0,PRO_AOI_IP_2,0,L侧料盘检测1(识别区),X21,DI-21,0,
DI,L侧料盘检测2(识别区),TrayCheck_2,1,PRO_AOI_IP_2,0,L侧料盘检测2(识别区),X22,DI-22,0, DI,L侧料盘检测2(识别区),TrayCheck_2,1,PRO_AOI_IP_2,0,L侧料盘检测2(识别区),X22,DI-22,0,
...@@ -42,19 +43,17 @@ AXIS,(轴一)旋转轴,Middle_Axis,1,COM3,0,,,,, ...@@ -42,19 +43,17 @@ AXIS,(轴一)旋转轴,Middle_Axis,1,COM3,0,,,,,
AXIS,(轴二)升降轴轴,UpDown_Axis,2,COM3,0,,,,, AXIS,(轴二)升降轴轴,UpDown_Axis,2,COM3,0,,,,,
AXIS,(轴三)进出轴,InOut_Axis,3,COM3,0,,,,, AXIS,(轴三)进出轴,InOut_Axis,3,COM3,0,,,,,
AXIS,(轴四)压紧轴,Comp_Axis,4,COM3,0,,,,, AXIS,(轴四)压紧轴,Comp_Axis,4,COM3,0,,,,,
PRO,升降轴 NG料口放料点 P1,UpDownAxis_P1,1002150,,,,,,,
PRO,升降轴 NG料口放料缓冲点 P2,UpDownAxis_P2,1021600,,,,,,,
,,,,,,,,,, ,,,,,,,,,,
,,,,,,,,,, ,,,,,,,,,,
PRO,升降轴(轴2)P11-NG放料低点,UpDownAxis_P11,403000,,,,,,, PRO,升降轴(轴2)P11-NG放料低点,UpDownAxis_P11,1002150,,,,,,,
PRO,升降轴(轴2)P12-NG放料高点缓冲点,UpDownAxis_P12,415000,,,,,,, PRO,升降轴(轴2)P12-NG放料高点缓冲点,UpDownAxis_P12,1021600,,,,,,,
PRO,旋转轴(轴1)P11-NG放料点,MiddleAxis_P11,268093,,,,,,, PRO,旋转轴(轴1)P11-NG放料点,MiddleAxis_P11,309900,,,,,,,
PRO,进出轴(轴3)P2-扫码放料点,InOutAxis_P2_Position,1000,,,,,,, PRO,进出轴(轴3)P2-扫码放料点,InOutAxis_P2_Position,110000,,,,,,,
PRO,进出轴(轴3)P11-NG放料点,InOutAxis_P11_Position,1000,,,,,,, PRO,进出轴(轴3)P11-NG放料点,InOutAxis_P11_Position,142000,,,,,,,
,,,,,,,,,, ,,,,,,,,,,
PRO,升降轴(轴2)P1待机点/扫码放料低点,UpDownAxis_P1,309300,,,,,,, PRO,升降轴(轴2)P1待机点/扫码放料低点,UpDownAxis_P1,588000,,,,,,,
PRO,升降轴(轴2)P2扫码放料高点缓冲点,UpDownAxis_P2,415000,,,,,,, PRO,升降轴(轴2)P2扫码放料高点缓冲点,UpDownAxis_P2,600000,,,,,,,
PRO,旋转轴(轴1)P1待机点/扫码放料点,MiddleAxis_P1,268093,,,,,,, PRO,旋转轴(轴1)P1待机点/扫码放料点,MiddleAxis_P1,310700,,,,,,,
PRO,进出轴(轴3)P1待机点,InOutAxis_P1_Position,1000,,,,,,, PRO,进出轴(轴3)P1待机点,InOutAxis_P1_Position,1000,,,,,,,
PRO,压紧轴(轴4)P1待机点,CompAxis_P1_Position,97900,,,,,,, PRO,压紧轴(轴4)P1待机点,CompAxis_P1_Position,97900,,,,,,,
PRO,压紧轴(轴4)P3压紧前点,CompAxis_P3_Position,97900,,,,,,, PRO,压紧轴(轴4)P3压紧前点,CompAxis_P3_Position,97900,,,,,,,
...@@ -87,28 +86,28 @@ PRO,(轴四)压紧轴原点低速,CompAxis_HomeLowSpeed,20,,,,,,, ...@@ -87,28 +86,28 @@ PRO,(轴四)压紧轴原点低速,CompAxis_HomeLowSpeed,20,,,,,,,
PRO,(轴四)压紧轴原点高速,CompAxis_HomeHighSpeed,60,,,,,,, PRO,(轴四)压紧轴原点高速,CompAxis_HomeHighSpeed,60,,,,,,,
PRO,(轴四)压紧轴原点加速度,CompAxis_HomeAddSpeed,200,,,,,,, PRO,(轴四)压紧轴原点加速度,CompAxis_HomeAddSpeed,200,,,,,,,
,,,,,,,,,, ,,,,,,,,,,
PRO,升降轴(轴2)P1速度,UpDownAxis_P1_Speed,250,,,,,,, PRO,升降轴(轴2)P1速度,UpDownAxis_P1_Speed,300,,,,,,,
PRO,升降轴(轴2)P2速度,UpDownAxis_P2_Speed,250,,,,,,, PRO,升降轴(轴2)P2速度,UpDownAxis_P2_Speed,300,,,,,,,
PRO,升降轴(轴2)P3速度,UpDownAxis_P3_Speed,250,,,,,,, PRO,升降轴(轴2)P3速度,UpDownAxis_P3_Speed,300,,,,,,,
PRO,升降轴(轴2)P4速度,UpDownAxis_P4_Speed,150,,,,,,, PRO,升降轴(轴2)P4速度,UpDownAxis_P4_Speed,300,,,,,,,
PRO,升降轴(轴2)P5速度,UpDownAxis_P5_Speed,250,,,,,,, PRO,升降轴(轴2)P5速度,UpDownAxis_P5_Speed,300,,,,,,,
PRO,升降轴(轴2)P6速度,UpDownAxis_P6_Speed,200,,,,,,, PRO,升降轴(轴2)P6速度,UpDownAxis_P6_Speed,300,,,,,,,
PRO,升降轴(轴2)P7速度,UpDownAxis_P7_Speed,200,,,,,, , PRO,升降轴(轴2)P7速度,UpDownAxis_P7_Speed,300,,,,,, ,
PRO,升降轴(轴2)P8速度,UpDownAxis_P8_Speed,200,,,,,,, PRO,升降轴(轴2)P8速度,UpDownAxis_P8_Speed,300,,,,,,,
PRO,旋转轴(轴1)P1速度,MiddleAxis_P1_Speed,120,,,,,,, PRO,旋转轴(轴1)P1速度,MiddleAxis_P1_Speed,300,,,,,,,
PRO,旋转轴(轴1)P2速度,MiddleAxis_P2_Speed,120,,,,,,, PRO,旋转轴(轴1)P2速度,MiddleAxis_P2_Speed,300,,,,,,,
PRO,进出轴(轴3)P1速度,InOutAxis_P1_Speed,200,,,,,,, PRO,进出轴(轴3)P1速度,InOutAxis_P1_Speed,300,,,,,,,
PRO,进出轴(轴3)P2速度,InOutAxis_P2_Speed,200,,,,,,, PRO,进出轴(轴3)P2速度,InOutAxis_P2_Speed,300,,,,,,,
PRO,进出轴(轴3)P3速度,InOutAxis_P3_Speed,200,,,,,,, PRO,进出轴(轴3)P3速度,InOutAxis_P3_Speed,300,,,,,,,
PRO,压紧轴(轴4)P1速度,CompAxis_P1_Speed,300,,,,,,, PRO,压紧轴(轴4)P1速度,CompAxis_P1_Speed,400,,,,,,,
PRO,压紧轴(轴4)P2速度,CompAxis_P2_Speed,300,,,,,,, PRO,压紧轴(轴4)P2速度,CompAxis_P2_Speed,400,,,,,,,
PRO,压紧轴(轴4)P3速度,CompAxis_P3_Speed,300,,,,,,, PRO,压紧轴(轴4)P3速度,CompAxis_P3_Speed,400,,,,,,,
,,,,,,,,,, ,,,,,,,,,,
PRO,升降轴(轴2)P101速度,UpDownAxis_P101_Speed,100,,,,,, , PRO,升降轴(轴2)P101速度,UpDownAxis_P101_Speed,300,,,,,, ,
PRO,升降轴(轴2)P102速度,UpDownAxis_P102_Speed,100,,,,,,, PRO,升降轴(轴2)P102速度,UpDownAxis_P102_Speed,300,,,,,,,
PRO,进出轴(轴3)P101速度,InOutAxis_P101_Speed,100,,,,,,, PRO,进出轴(轴3)P101速度,InOutAxis_P101_Speed,300,,,,,,,
PRO,旋转轴(轴1)P101速度,MiddleAxis_P101_Speed,120,,,,,,, PRO,旋转轴(轴1)P101速度,MiddleAxis_P101_Speed,300,,,,,,,
PRO,压紧轴(轴4)P4速度,CompAxis_P4_Speed,100,,,,,,, PRO,压紧轴(轴4)P4速度,CompAxis_P4_Speed,300,,,,,,,
,,,,,,,,,, ,,,,,,,,,,
PRO,(轴一)旋转轴停止时可误差的脉冲数的最小值,MiddleAxis_ErrorCountMin,10,,,,,,, PRO,(轴一)旋转轴停止时可误差的脉冲数的最小值,MiddleAxis_ErrorCountMin,10,,,,,,,
PRO,(轴二)升降轴轴停止时可误差的脉冲数的最小值,UpdownAxis_ErrorCountMin,10,,,,,, , PRO,(轴二)升降轴轴停止时可误差的脉冲数的最小值,UpdownAxis_ErrorCountMin,10,,,,,, ,
......
...@@ -3,6 +3,7 @@ DI,急停,SuddenStop_BTN,0,PRO_AOI_IP_1,0,急停,X01,DI-01,0, ...@@ -3,6 +3,7 @@ DI,急停,SuddenStop_BTN,0,PRO_AOI_IP_1,0,急停,X01,DI-01,0,
DI,复位,Reset_BTN,1,PRO_AOI_IP_1,0,复位,X02,DI-02,0, DI,复位,Reset_BTN,1,PRO_AOI_IP_1,0,复位,X02,DI-02,0,
DI,气压检测,Airpressure_Check,2,PRO_AOI_IP_1,0,门禁,X03,DI-03,0, DI,气压检测,Airpressure_Check,2,PRO_AOI_IP_1,0,门禁,X03,DI-03,0,
DI,R侧门禁,DoorLimit,4,PRO_AOI_IP_1,0,料盘检测2(料叉),X05,DI-05,0, DI,R侧门禁,DoorLimit,4,PRO_AOI_IP_1,0,料盘检测2(料叉),X05,DI-05,0,
DO,NG料线体电机运转,NGLine_Run,4,PRO_AOI_IP_1,0,NG料线体电机运转,Y05,DO-05,0,
,,,,,,,,,, ,,,,,,,,,,
DI,R侧料盘检测1(识别区),TrayCheck_1,0,PRO_AOI_IP_3,0,R侧料盘检测1(识别区),X41,DI-41,0, DI,R侧料盘检测1(识别区),TrayCheck_1,0,PRO_AOI_IP_3,0,R侧料盘检测1(识别区),X41,DI-41,0,
DI,R侧料盘检测2(识别区),TrayCheck_2,1,PRO_AOI_IP_3,0,R侧料盘检测2(识别区),X42,DI-42,0, DI,R侧料盘检测2(识别区),TrayCheck_2,1,PRO_AOI_IP_3,0,R侧料盘检测2(识别区),X42,DI-42,0,
...@@ -43,19 +44,19 @@ AXIS,(轴二)升降轴轴,UpDown_Axis,2,COM4,0,,,,, ...@@ -43,19 +44,19 @@ AXIS,(轴二)升降轴轴,UpDown_Axis,2,COM4,0,,,,,
AXIS,(轴三)进出轴,InOut_Axis,3,COM4,0,,,,, AXIS,(轴三)进出轴,InOut_Axis,3,COM4,0,,,,,
AXIS,(轴四)压紧轴,Comp_Axis,4,COM4,0,,,,, AXIS,(轴四)压紧轴,Comp_Axis,4,COM4,0,,,,,
,,,,,,,,,, ,,,,,,,,,,
PRO,升降轴(轴2)P11-NG放料低点,UpDownAxis_P11,403000,,,,,,, PRO,升降轴(轴2)P11-NG放料低点,UpDownAxis_P11,1021600,,,,,,,
PRO,升降轴(轴2)P12-NG放料高点缓冲点,UpDownAxis_P12,415000,,,,,,, PRO,升降轴(轴2)P12-NG放料高点缓冲点,UpDownAxis_P12,1002150,,,,,,,
PRO,旋转轴(轴1)P11-NG放料点,MiddleAxis_P11,268093,,,,,,, PRO,旋转轴(轴1)P11-NG放料点,MiddleAxis_P11,308300,,,,,,,
PRO,进出轴(轴3)P2-扫码放料点,InOutAxis_P2_Position,1000,,,,,,, PRO,进出轴(轴3)P2-扫码放料点,InOutAxis_P2_Position,130000,,,,,,,
PRO,进出轴(轴3)P11-NG放料点,InOutAxis_P11_Position,1000,,,,,,, PRO,进出轴(轴3)P11-NG放料点,InOutAxis_P11_Position,140800,,,,,,,
,,,,,,,,,, ,,,,,,,,,,
PRO,升降轴(轴2)P1待机点/扫码放料低点,UpDownAxis_P1,403000,,,,,,, PRO,升降轴(轴2)P1待机点/扫码放料低点,UpDownAxis_P1,591000,,,,,,,
PRO,升降轴(轴2)P2扫码放料高点缓冲点,UpDownAxis_P2,415000,,,,,,, PRO,升降轴(轴2)P2扫码放料高点缓冲点,UpDownAxis_P2,602500,,,,,,,
PRO,旋转轴(轴1)P1待机点/扫码放料点,MiddleAxis_P1,268093,,,,,,, PRO,旋转轴(轴1)P1待机点/扫码放料点,MiddleAxis_P1,308300,,,,,,,
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,30000,,,,,,,
PRO,压紧轴(轴4)P3压紧前点,CompAxis_P3_Position,10000,,,,,,, PRO,压紧轴(轴4)P3压紧前点,CompAxis_P3_Position,93900,,,,,,,
PRO,压紧轴(轴4)P4目标压紧点,CompAxis_P4_Position,10000,,,,,,, PRO,压紧轴(轴4)P4目标压紧点,CompAxis_P4_Position,110000,,,,,,,
PRO,压紧轴(轴4)压紧确认信号收到之后下降的位置,CompAxis_Down_Position,2000,,,,,,, PRO,压紧轴(轴4)压紧确认信号收到之后下降的位置,CompAxis_Down_Position,2000,,,,,,,
PRO,压紧轴(轴4)P2压紧点范围对应值(8=1000;2000#),CompAxis_P2_List,8=1000;2000#12=2001;3000#16=3001;4000#20=4001;5000#22=5001;6000#24=6001;7000# ,,,,,,, PRO,压紧轴(轴4)P2压紧点范围对应值(8=1000;2000#),CompAxis_P2_List,8=1000;2000#12=2001;3000#16=3001;4000#20=4001;5000#22=5001;6000#24=6001;7000# ,,,,,,,
,,,,,,,,,, ,,,,,,,,,,
...@@ -84,28 +85,28 @@ PRO,(轴四)压紧轴原点低速,CompAxis_HomeLowSpeed,20,,,,,,, ...@@ -84,28 +85,28 @@ PRO,(轴四)压紧轴原点低速,CompAxis_HomeLowSpeed,20,,,,,,,
PRO,(轴四)压紧轴原点高速,CompAxis_HomeHighSpeed,60,,,,,,, PRO,(轴四)压紧轴原点高速,CompAxis_HomeHighSpeed,60,,,,,,,
PRO,(轴四)压紧轴原点加速度,CompAxis_HomeAddSpeed,200,,,,,,, PRO,(轴四)压紧轴原点加速度,CompAxis_HomeAddSpeed,200,,,,,,,
,,,,,,,,,, ,,,,,,,,,,
PRO,升降轴(轴2)P1速度,UpDownAxis_P1_Speed,250,,,,,,, PRO,升降轴(轴2)P1速度,UpDownAxis_P1_Speed,300,,,,,,,
PRO,升降轴(轴2)P2速度,UpDownAxis_P2_Speed,250,,,,,,, PRO,升降轴(轴2)P2速度,UpDownAxis_P2_Speed,300,,,,,,,
PRO,升降轴(轴2)P3速度,UpDownAxis_P3_Speed,250,,,,,,, PRO,升降轴(轴2)P3速度,UpDownAxis_P3_Speed,300,,,,,,,
PRO,升降轴(轴2)P4速度,UpDownAxis_P4_Speed,150,,,,,,, PRO,升降轴(轴2)P4速度,UpDownAxis_P4_Speed,300,,,,,,,
PRO,升降轴(轴2)P5速度,UpDownAxis_P5_Speed,250,,,,,,, PRO,升降轴(轴2)P5速度,UpDownAxis_P5_Speed,300,,,,,,,
PRO,升降轴(轴2)P6速度,UpDownAxis_P6_Speed,100,,,,,,, PRO,升降轴(轴2)P6速度,UpDownAxis_P6_Speed,300,,,,,,,
PRO,升降轴(轴2)P7速度,UpDownAxis_P7_Speed,100,,,,,, , PRO,升降轴(轴2)P7速度,UpDownAxis_P7_Speed,300,,,,,, ,
PRO,升降轴(轴2)P8速度,UpDownAxis_P8_Speed,100,,,,,,, PRO,升降轴(轴2)P8速度,UpDownAxis_P8_Speed,300,,,,,,,
PRO,旋转轴(轴1)P1速度,MiddleAxis_P1_Speed,120,,,,,,, PRO,旋转轴(轴1)P1速度,MiddleAxis_P1_Speed,200,,,,,,,
PRO,旋转轴(轴1)P2速度,MiddleAxis_P2_Speed,120,,,,,,, PRO,旋转轴(轴1)P2速度,MiddleAxis_P2_Speed,200,,,,,,,
PRO,进出轴(轴3)P1速度,InOutAxis_P1_Speed,100,,,,,,, PRO,进出轴(轴3)P1速度,InOutAxis_P1_Speed,300,,,,,,,
PRO,进出轴(轴3)P2速度,InOutAxis_P2_Speed,100,,,,,,, PRO,进出轴(轴3)P2速度,InOutAxis_P2_Speed,300,,,,,,,
PRO,进出轴(轴3)P3速度,InOutAxis_P3_Speed,100,,,,,,, PRO,进出轴(轴3)P3速度,InOutAxis_P3_Speed,300,,,,,,,
PRO,压紧轴(轴4)P1速度,CompAxis_P1_Speed,100,,,,,,, PRO,压紧轴(轴4)P1速度,CompAxis_P1_Speed,300,,,,,,,
PRO,压紧轴(轴4)P2速度,CompAxis_P2_Speed,100,,,,,,, PRO,压紧轴(轴4)P2速度,CompAxis_P2_Speed,300,,,,,,,
PRO,压紧轴(轴4)P3速度,CompAxis_P3_Speed,100,,,,,,, PRO,压紧轴(轴4)P3速度,CompAxis_P3_Speed,300,,,,,,,
,,,,,,,,,, ,,,,,,,,,,
PRO,升降轴(轴2)P101速度,UpDownAxis_P101_Speed,100,,,,,, , PRO,升降轴(轴2)P101速度,UpDownAxis_P101_Speed,200,,,,,, ,
PRO,升降轴(轴2)P102速度,UpDownAxis_P102_Speed,100,,,,,,, PRO,升降轴(轴2)P102速度,UpDownAxis_P102_Speed,200,,,,,,,
PRO,进出轴(轴3)P101速度,InOutAxis_P101_Speed,100,,,,,,, PRO,进出轴(轴3)P101速度,InOutAxis_P101_Speed,200,,,,,,,
PRO,旋转轴(轴1)P101速度,MiddleAxis_P101_Speed,120,,,,,,, PRO,旋转轴(轴1)P101速度,MiddleAxis_P101_Speed,120,,,,,,,
PRO,压紧轴(轴4)P4速度,CompAxis_P4_Speed,100,,,,,,, PRO,压紧轴(轴4)P4速度,CompAxis_P4_Speed,300,,,,,,,
,,,,,,,,,, ,,,,,,,,,,
PRO,(轴一)旋转轴停止时可误差的脉冲数的最小值,MiddleAxis_ErrorCountMin,10,,,,,,, PRO,(轴一)旋转轴停止时可误差的脉冲数的最小值,MiddleAxis_ErrorCountMin,10,,,,,,,
PRO,(轴二)升降轴轴停止时可误差的脉冲数的最小值,UpdownAxis_ErrorCountMin,10,,,,,, , PRO,(轴二)升降轴轴停止时可误差的脉冲数的最小值,UpdownAxis_ErrorCountMin,10,,,,,, ,
...@@ -135,7 +136,6 @@ PRO,每次吹气的时间(分钟),BlowAir_Time,10,,,,,,, ...@@ -135,7 +136,6 @@ PRO,每次吹气的时间(分钟),BlowAir_Time,10,,,,,,,
PRO,两次吹气间隔(分钟),BlowAir_Interval,10,,,,,,, PRO,两次吹气间隔(分钟),BlowAir_Interval,10,,,,,,,
PRO,温湿度端口号,Humiture_Port,COM1,,,,,,, PRO,温湿度端口号,Humiture_Port,COM1,,,,,,,
,,,,,,,,,, ,,,,,,,,,,
PRO,扫码的相机名称(多个用#分隔),CameraNameList,#,,,,,,, PRO,扫码的相机名称(多个用#分隔),CameraNameList,GigE:MV-CE200-10GC (00D77519098),,,,,,,
PRO,RFID读卡器IP,RFID_IP,192.168.106.102,,,,,,, PRO,RFID读卡器IP,RFID_IP,192.168.106.102,,,,,,,
PRO,是否是调试状态,IsInDebug,1,,,,,,, PRO,是否是调试状态,IsInDebug,1,,,,,,,
...@@ -23,7 +23,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -23,7 +23,7 @@ namespace OnlineStore.DeviceLibrary
if (configIo != null) if (configIo != null)
{ {
instance.WriteSingleDO(configIo.IO_IP, configIo.SlaveID, configIo.GetIOAddr(), ioValue); instance.WriteSingleDO(configIo.IO_IP, configIo.SlaveID, configIo.GetIOAddr(), ioValue);
Thread.Sleep(10); Thread.Sleep(1);
} }
else else
{ {
......
...@@ -75,7 +75,14 @@ namespace OnlineStore.DeviceLibrary ...@@ -75,7 +75,14 @@ namespace OnlineStore.DeviceLibrary
if (names != null) if (names != null)
{ {
hikNameList.AddRange(names); foreach (string n in names)
{
if (!hikNameList.Contains(n))
{
hikNameList.Add(n);
}
}
// hikNameList.AddRange(names);
foreach (string name in hikNameList) foreach (string name in hikNameList)
{ {
LogUtil.info("加载到HIK相机:" + name); LogUtil.info("加载到HIK相机:" + name);
...@@ -84,7 +91,14 @@ namespace OnlineStore.DeviceLibrary ...@@ -84,7 +91,14 @@ namespace OnlineStore.DeviceLibrary
names = CodeLibrary.BaslerCamera.Instance.CameraName; names = CodeLibrary.BaslerCamera.Instance.CameraName;
if (names != null) if (names != null)
{ {
balserNameList.AddRange(names); foreach (string n in names)
{
if (!balserNameList.Contains(n))
{
balserNameList.Add(n);
}
}
// balserNameList.AddRange(names);
foreach (string name in balserNameList) foreach (string name in balserNameList)
{ {
LogUtil.info("加载到Balser相机:" + name); LogUtil.info("加载到Balser相机:" + name);
......
...@@ -508,7 +508,18 @@ namespace OnlineStore.DeviceLibrary ...@@ -508,7 +508,18 @@ namespace OnlineStore.DeviceLibrary
} }
return alarmCode; return alarmCode;
} }
internal bool NoAlarm()
{
if (isInSuddenDown || isNoAirCheck)
{
return false;
}
if (alarmType.Equals(StoreAlarmType.None))
{
return true;
}
return false;
}
} }
} }
...@@ -116,25 +116,30 @@ namespace OnlineStore.DeviceLibrary ...@@ -116,25 +116,30 @@ namespace OnlineStore.DeviceLibrary
/// </summary> /// </summary>
Wait = 0, Wait = 0,
#region 料仓原点返回和重置步骤 0010开始 #region 料仓原点返回和重置步骤 0010开始
/// <summary>
/// BOX复位:线体停止,入料移门关闭,NG料口关闭
/// </summary>
BOX_H01_DoorClose = 010,
/// <summary> /// <summary>
/// BOX复位:轴三进出轴先返回原点 /// BOX复位:轴三进出轴先返回原点
/// </summary> /// </summary>
BOX_H03_InOutBack = 012, BOX_H01_InOutBack = 011,
/// <summary> /// <summary>
/// BOX复位:轴三返回P1点 /// 顶升下降
/// </summary> /// </summary>
BOX_H04_InOutToP1 = 013, BOX_H02_InoutTOP1_TopDown = 012,
/// <summary>
/// BOX复位:线体停止, ,流水线先转动3000
/// </summary>
BOX_H03_LineRun = 013,
///// <summary>
///// BOX复位:轴三返回P1点,入料门关闭NG门下降
///// </summary>
//BOX_H04_InOutToP1 = 014,
/// <summary> /// <summary>
/// BOX复位:升降轴,旋转轴,压紧轴原点返回 /// BOX复位:升降轴,旋转轴,压紧轴原点返回
/// </summary> /// </summary>
BOX_H05_OtherAxisBack = 014, BOX_H05_OtherAxisBack = 015,
/// <summary> /// <summary>
///BOX复位: 旋转轴返回P1 ///BOX复位: 旋转轴返回P1
/// </summary> /// </summary>
...@@ -173,7 +178,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -173,7 +178,7 @@ namespace OnlineStore.DeviceLibrary
/// </summary> /// </summary>
BI_04_LineStop = 1004, BI_04_LineStop = 1004,
/// <summary> /// <summary>
/// 料架入库:入料口移门关闭 /// 料架入库:入料口移门关闭,等待1000
/// </summary> /// </summary>
BI_05_DoorClose = 1005, BI_05_DoorClose = 1005,
/// <summary> /// <summary>
...@@ -389,6 +394,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -389,6 +394,10 @@ namespace OnlineStore.DeviceLibrary
/// 送出料盘:关门NG料门,送出料盘结束 /// 送出料盘:关门NG料门,送出料盘结束
/// </summary> /// </summary>
BI_76_NGDoorDown = 3076, BI_76_NGDoorDown = 3076,
/// <summary>
/// NG流水线转动指定的时间3000
/// </summary>
BI_77_NGLineRun=3078,
#endregion #endregion
#region 把料架送出步骤 4000开始 #region 把料架送出步骤 4000开始
......
...@@ -26,10 +26,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -26,10 +26,10 @@ namespace OnlineStore.DeviceLibrary
this.storeId = storeId; this.storeId = storeId;
this.moveStep = StoreMoveStep.Wait; this.moveStep = StoreMoveStep.Wait;
IsInWait = false; IsInWait = false;
MoveNum = 0; // MoveNum = 0;
} }
public int MoveNum { get; set; } // public int MoveNum { get; set; }
public DateTime LastSetpTime { get; set; } public DateTime LastSetpTime { get; set; }
...@@ -103,21 +103,27 @@ namespace OnlineStore.DeviceLibrary ...@@ -103,21 +103,27 @@ namespace OnlineStore.DeviceLibrary
IsInWait = false; IsInWait = false;
WaitList = new List<WaitResultInfo>(); WaitList = new List<WaitResultInfo>();
} }
public void NewMove(StoreMoveType type ) //public void NewMove(StoreMoveType type )
{ //{
moveStep = StoreMoveStep.Wait; // moveStep = StoreMoveStep.Wait;
this.moveType = type; // this.moveType = type;
LastSetpTime = DateTime.Now; // LastSetpTime = DateTime.Now;
WaitList = new List<WaitResultInfo>(); // WaitList = new List<WaitResultInfo>();
MoveNum++; // // MoveNum++;
} // currShelfIndex = -1;
public void NewMove(StoreMoveType type, InOutParam param) //}
public void NewMove(StoreMoveType type, InOutParam param = null)
{ {
moveStep = StoreMoveStep.Wait; moveStep = StoreMoveStep.Wait;
this.moveType = type; this.moveType = type;
if (param == null)
{
param = new InOutParam();
}
this.MoveParam = param; this.MoveParam = param;
LastSetpTime = DateTime.Now; LastSetpTime = DateTime.Now;
WaitList = new List<WaitResultInfo>(); WaitList = new List<WaitResultInfo>();
currShelfIndex = -1;
} }
public void EndMove() public void EndMove()
{ {
...@@ -146,7 +152,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -146,7 +152,7 @@ namespace OnlineStore.DeviceLibrary
public bool NextShelfPos() public bool NextShelfPos()
{ {
currShelfIndex++; currShelfIndex++;
if (ShelfPositionList.Count >= currShelfIndex) if (currShelfIndex >= ShelfPositionList.Count)
{ {
return false; return false;
} }
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!