Commit 3adb03ef LN

增机物料显示和操作按钮。修改与环形线交互逻辑。

1 个父辈 056990ed
类型,分类编号,说明,名称,属性值,设备名称,电器定义,目标速度,加速度,减速度,回零低速,回零高速,回零加速度,脉冲最小误差,脉冲最大误差,脉冲最小限位,脉冲最大限位 类型,分类编号,说明,名称,属性值,设备名称,电器定义,目标速度,加速度,减速度,回零低速,回零高速,回零加速度,脉冲最小误差,脉冲最大误差,脉冲最小限位,脉冲最大限位
AXIS,0,(轴一)旋转轴,Middle_Axis,0,HC,,100,1000,1000,5,50,3000,10,100,0,0 AXIS,0,(轴一)旋转轴,Middle_Axis,0,HC,,100,1000,1000,20,100,3000,10,100,0,0
AXIS,0,(轴二)升降轴轴,UpDown_Axis,1,HC,,200,2000,2000,20,250,3000,10,100,0,0 AXIS,0,(轴二)升降轴,UpDown_Axis,1,HC,,100,1000,1000,20,150,3000,10,100,0,0
AXIS,0,(轴三)进出轴,InOut_Axis,2,HC,,5000,5000,5000,100,400,3000,10,100,0,0 AXIS,0,(轴三)进出轴,InOut_Axis,2,HC,,3000,3000,3000,100,400,3000,10,100,0,0
AXIS,0,(轴四)压紧轴,Comp_Axis,3,HC,,30000,15000,15000,3000,5000,10000,10,100,0,0 AXIS,0,(轴四)压紧轴,Comp_Axis,3,HC,,30000,15000,15000,3000,5000,10000,10,100,0,0
,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,
PRO,0,升降轴(轴2)进料口取料低点 P1,UpDownAxis_DoorL_P1,2914,,,,,,,,,,,, PRO,0,升降轴(轴2)进料口取料低点 P1,UpDownAxis_DoorL_P1,2914,,,,,,,,,,,,
PRO,0,升降轴(轴2)进料口取料高点 P2,UpDownAxis_DoorH_P2,3200,,,,,,,,,,,, PRO,0,升降轴(轴2)进料口取料高点 P2,UpDownAxis_DoorH_P2,3200,,,,,,,,,,,,
PRO,0,升降轴(轴2)NG口放料高点 P5,UpDownAxis_DoorH_P5,3050,,,,,,,,,,,, PRO,0,升降轴(轴2)NG口放料高点 P5,UpDownAxis_DoorH_P5,4900,,,,,,,,,,,,
PRO,0,升降轴(轴2)NG口放料低点 P6,UpDownAxis_DoorH_P6,3050,,,,,,,,,,,, PRO,0,升降轴(轴2)NG口放料低点 P6,UpDownAxis_DoorH_P6,4900,,,,,,,,,,,,
PRO,0,旋转轴(轴1)P1/取料点/待机原位点,MiddleAxis_P1,4771,,,,,,,,,,,, PRO,0,旋转轴(轴1)P1/取料点/待机原位点,MiddleAxis_P1,4760,,,,,,,,,,,,
PRO,0,旋转轴(轴1)P3/NG口放料点,MiddleAxis_P3,891,,,,,,,,,,,, PRO,0,旋转轴(轴1)P3/NG口放料点,MiddleAxis_P3,2450,,,,,,,,,,,,
PRO,0,进出轴(轴3)P1/待机原位点,InOutAxis_P1,200,,,,,,,,,,,, PRO,0,进出轴(轴3)P1/待机原位点,InOutAxis_P1,200,,,,,,,,,,,,
PRO,0,进出轴(轴3)P4/NG口放料点,InOutAxis_P4,100,,,,,,,,,,,, PRO,0,进出轴(轴3)P4/NG口放料点,InOutAxis_P4,100,,,,,,,,,,,,
PRO,0,压紧轴(轴4)P1待机原位点,CompressAxis_P1,10000,,,,,,,,,,,, PRO,0,压紧轴(轴4)P1待机原位点,CompressAxis_P1,4760,,,,,,,,,,,,
PRO,0,压紧轴(轴4)P2压紧点列表,CompAxis_P2_List,8=9400,,,,,,,,,,,, PRO,0,压紧轴(轴4)P2压紧点列表,CompAxis_P2_List,8=74800,12=71300,28=59300,36=46800,48=40400,,,,,,,,
,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,
PRO,0,升降轴(轴2)P1速度,UpDownAxis_P1_Speed,1000,,,,,,,,,,,, PRO,0,升降轴(轴2)P1速度,UpDownAxis_P1_Speed,1000,,,,,,,,,,,,
PRO,0,升降轴(轴2)P2速度,UpDownAxis_P2_Speed,500,,,,,,,,,,,, PRO,0,升降轴(轴2)P2速度,UpDownAxis_P2_Speed,500,,,,,,,,,,,,
...@@ -42,8 +42,8 @@ PRO,0,出出料多少次,会自动重置旋转轴,Box_ResetMCount,1000,,,,,,,, ...@@ -42,8 +42,8 @@ PRO,0,出出料多少次,会自动重置旋转轴,Box_ResetMCount,1000,,,,,,,,
PRO,0,出出料多少次,会自动重置所有轴操作,Box_ResetACount,100,,,,,,,,,,,, PRO,0,出出料多少次,会自动重置所有轴操作,Box_ResetACount,100,,,,,,,,,,,,
PRO,0,气压检测IO关闭需要持续的时间,AirCheckSeconds,3,,,,,,,,,,,, PRO,0,气压检测IO关闭需要持续的时间,AirCheckSeconds,3,,,,,,,,,,,,
PRO,0,IO信号超时时间(毫秒),IOSingle_TimerOut,10000,,,,,,,,,,,, PRO,0,IO信号超时时间(毫秒),IOSingle_TimerOut,10000,,,,,,,,,,,,
PRO,0,是否使用料盘检测信号,IsUse_Tray_Check,1,,,,,,,,,,,, PRO,0,是否使用料盘检测信号,IsUse_Tray_Check,0,,,,,,,,,,,,
PRO,0,是否调试状态,ISDebug,1,,,,,,,,,,,, PRO,0,是否调试状态,ISDebug,0,,,,,,,,,,,,
,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,
,,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,,,
DI,0,急停,SuddenStop_BTN,0,HC,X00,,,,,,,,,, DI,0,急停,SuddenStop_BTN,0,HC,X00,,,,,,,,,,
......
...@@ -869,15 +869,15 @@ namespace OnlineStore.DeviceLibrary ...@@ -869,15 +869,15 @@ namespace OnlineStore.DeviceLibrary
} }
private void StartMove() private void StartMove()
{ {
LogInfo("开始执行料仓门口的料【" + LineConnect.DoorPosInfo.ToStr() + "】"); LogInfo("开始移栽【" + LineConnect.DoorPosInfo.ToStr() + "】");
bool result = StartOutMove(new InOutParam(LineConnect.DoorPosInfo)); bool result = StartOutMove(new InOutParam(LineConnect.DoorPosInfo));
if (!result) if (!result)
{ {
LogInfo(" 执行料仓门口的料【" + LineConnect.DoorPosInfo.ToStr() + "】失败"); LogInfo(" 移栽【" + LineConnect.DoorPosInfo.ToStr() + "】失败");
} }
else else
{ {
LogInfo(" 执行料仓门口的料【" + LineConnect.DoorPosInfo.ToStr() + "】成功,清理料仓门口数据"); LogInfo(" 移栽【" + LineConnect.DoorPosInfo.ToStr() + "】成功,清理门口数据");
LineConnect.DoorPosInfo = null; LineConnect.DoorPosInfo = null;
} }
} }
...@@ -976,14 +976,22 @@ namespace OnlineStore.DeviceLibrary ...@@ -976,14 +976,22 @@ namespace OnlineStore.DeviceLibrary
} }
public string GetMoveStr() public string GetMoveStr()
{ {
string msg = ""; string msg = LineConnect.DoorPosInfo?.ToStr();
msg += "状态: " + storeRunStatus + "\t " + " " + storeStatus + "\n";
msg += "alarm: " + alarmType + "\n"; foreach (WorkStation shelf in StationMap.Values)
msg += "Move:" + MoveInfo.MoveType + " " + MoveInfo.MoveStep + "\n";
foreach(WorkStation shelf in StationMap.Values)
{ {
msg += shelf.Name + ": " + shelf.CurrShelf.ToStr()+"\r\n"; msg += shelf.Name + ": " + shelf.CurrShelf.ToStr()+"\r\n";
} }
if (alarmType.Equals(StoreAlarmType.None))
{
msg += "状态: " + storeRunStatus + "\t " + " " + storeStatus + "\t " + "\n";
}
else
{
msg += "状态: " + storeRunStatus + "\t " + " " + storeStatus + "\t " + " " + "报警:" + alarmType + "\n";
}
//msg += "alarm: " + alarmType + "\n";
msg += "Move:" + MoveInfo.MoveType + " " + MoveInfo.MoveStep + "\n";
return msg; return msg;
} }
......
...@@ -56,7 +56,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -56,7 +56,7 @@ namespace OnlineStore.DeviceLibrary
p.InOut_P1 = Config.InOutAxis_P1; p.InOut_P1 = Config.InOutAxis_P1;
p.InOut_P2 = position.InOutAxis_P2; p.InOut_P2 = position.InOutAxis_P2;
p.InOut_P3 = position.InOutAxis_P3; p.InOut_P3 = position.InOutAxis_P3;
p.InOut_P3 = Config.InOutAxis_P4; p.InOut_P4 = Config.InOutAxis_P4;
p.Middle_P1 = Config.MiddleAxis_P1; p.Middle_P1 = Config.MiddleAxis_P1;
p.Middle_P2 = position.MiddleAxis_P2; p.Middle_P2 = position.MiddleAxis_P2;
...@@ -78,7 +78,6 @@ namespace OnlineStore.DeviceLibrary ...@@ -78,7 +78,6 @@ namespace OnlineStore.DeviceLibrary
{ {
param.PosInfo.PlateW = position.BagWidth; param.PosInfo.PlateW = position.BagWidth;
} }
return true;
} }
else if ((param.PosInfo.PlateH <= 0) || (param.PosInfo.PlateW <= 0)) else if ((param.PosInfo.PlateH <= 0) || (param.PosInfo.PlateW <= 0))
{ {
...@@ -96,7 +95,6 @@ namespace OnlineStore.DeviceLibrary ...@@ -96,7 +95,6 @@ namespace OnlineStore.DeviceLibrary
{ {
param.PosInfo.PlateW = position.BagWidth; param.PosInfo.PlateW = position.BagWidth;
} }
return true;
} }
int v = Config.GetCompP2(param.PosInfo.PlateH); int v = Config.GetCompP2(param.PosInfo.PlateH);
if (v > 0 && (!param.MoveP.ComPress_P2.Equals(v))) if (v > 0 && (!param.MoveP.ComPress_P2.Equals(v)))
...@@ -275,15 +273,15 @@ namespace OnlineStore.DeviceLibrary ...@@ -275,15 +273,15 @@ namespace OnlineStore.DeviceLibrary
{ {
if (!LoadParamPosition(param)) if (!LoadParamPosition(param))
{ {
LogUtil.error(Name + " 启动出料【" + posId + "】出错,找不到库位信息"); LogUtil.error(Name + " 启动出料【" + param.PosInfo.ToStr() + "】出错,找不到库位");
return false ; return false ;
} }
if (IOValue(IO_Type.TrayCheck_Fixture).Equals(IO_VALUE.HIGH)) if (IOValue(IO_Type.TrayCheck_Fixture).Equals(IO_VALUE.HIGH))
{ {
LogUtil.error(Name + " 启动出料【" + posId + "】出错,叉子料盘检测有料"); LogUtil.error(Name + " 启动出料【" + param.PosInfo.ToStr() + "】出错,叉子料盘检测有料");
return false ; return false ;
} }
LogInfo( " 启动出料【" + posId + "】"); LogInfo( " 启动出料【" + param.PosInfo.ToStr() + "】");
storeRunStatus = StoreRunStatus.Busy; storeRunStatus = StoreRunStatus.Busy;
storeStatus = StoreStatus.OutStoreExecute; storeStatus = StoreStatus.OutStoreExecute;
MoveInfo.NewMove(StoreMoveType.OutStore, param); MoveInfo.NewMove(StoreMoveType.OutStore, param);
...@@ -350,7 +348,20 @@ namespace OnlineStore.DeviceLibrary ...@@ -350,7 +348,20 @@ namespace OnlineStore.DeviceLibrary
MoveLog(" 叉子进入出料口,进出轴至P2(进料口取料点) "+ movep.InOut_P2); MoveLog(" 叉子进入出料口,进出轴至P2(进料口取料点) "+ movep.InOut_P2);
ACAxisMove(Config.InOut_Axis, movep.InOut_P2, Config.InOutAxis_P2_Speed); ACAxisMove(Config.InOut_Axis, movep.InOut_P2, Config.InOutAxis_P2_Speed);
} }
private void MoveToPosition(LineMoveP moveP)
{
if (MoveInfo.MoveParam.PosInfo.IsNg)
{
MoveInfo.NextMoveStep(MoveStep.SO_31_MoveToNG);
MoveLog("移动到NG箱,旋转轴至P3[" + moveP.Middle_P3 + "], 升降轴至P5[" + moveP.UpDown_P5 + "] ");
ACAxisMove(Config.Middle_Axis, moveP.Middle_P3, Config.MiddleAxis_P3_Speed);
ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P5, Config.UpDownAxis_P5_Speed);
}
else
{
SO_21_MoveToBag();
}
}
private void SO_21_MoveToBag() private void SO_21_MoveToBag()
{ {
LineMoveP moveP = MoveInfo.MoveParam.MoveP; LineMoveP moveP = MoveInfo.MoveParam.MoveP;
...@@ -443,22 +454,12 @@ namespace OnlineStore.DeviceLibrary ...@@ -443,22 +454,12 @@ namespace OnlineStore.DeviceLibrary
} }
else else
{ {
SO_21_MoveToBag(); MoveToPosition(moveP);
} }
} }
else if (MoveInfo.IsStep(MoveStep.SO_17_TrayCheck)) else if (MoveInfo.IsStep(MoveStep.SO_17_TrayCheck))
{ {
if (MoveInfo.MoveParam.PosInfo.IsNg) MoveToPosition(moveP);
{
MoveInfo.NextMoveStep(MoveStep.SO_31_MoveToNG);
MoveLog("移动到NG箱,旋转轴至P3[" + moveP.Middle_P3 + "], 升降轴至P5[" + moveP.UpDown_P5 + "] ");
ACAxisMove(Config.Middle_Axis, moveP.Middle_P3, Config.MiddleAxis_P3_Speed);
ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P5, Config.UpDownAxis_P5_Speed);
}
else
{
SO_21_MoveToBag();
}
} }
#region ->料架 #region ->料架
else if (MoveInfo.IsStep(MoveStep.SO_21_MoveToBag)) else if (MoveInfo.IsStep(MoveStep.SO_21_MoveToBag))
......
...@@ -131,7 +131,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -131,7 +131,7 @@ namespace OnlineStore.DeviceLibrary
if (cmd.Equals(cmd_startIn)) if (cmd.Equals(cmd_startIn))
{ {
LogUtil.info("[" + CID + "]收到流水线消息:" + message); LogUtil.info("[" + CID + "]收到流水线消息:" + message);
InOutPosInfo inout = new InOutPosInfo(reviceInfo.WareCode, "", reviceInfo.PlateH, reviceInfo.PlateW, reviceInfo.IsNg, reviceInfo.PosId, reviceInfo.rfid); InOutPosInfo inout = new InOutPosInfo(reviceInfo.WareCode, "", reviceInfo.PlateW, reviceInfo.PlateH, reviceInfo.IsNg, reviceInfo.PosId, reviceInfo.rfid);
string logName = "收到流水线命令【 " + inout.ToStr() + "】:"; string logName = "收到流水线命令【 " + inout.ToStr() + "】:";
if (DoorPosInfo != null) if (DoorPosInfo != null)
......
...@@ -274,9 +274,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -274,9 +274,7 @@ namespace OnlineStore.DeviceLibrary
public abstract bool StartOutMove(InOutParam param); public abstract bool StartOutMove(InOutParam param);
protected abstract void OutProcess(); protected abstract void OutProcess();
#endregion #endregion
public string GetRunStr() public string GetRunStr()
{ {
string sta = "运行中"; string sta = "运行中";
...@@ -366,9 +364,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -366,9 +364,7 @@ namespace OnlineStore.DeviceLibrary
return sta + " " + MoveInfo.MoveType + "_" + MoveInfo.MoveStep; return sta + " " + MoveInfo.MoveType + "_" + MoveInfo.MoveStep;
} }
} }
public void IOMove(string IoType, IO_VALUE value) public void IOMove(string IoType, IO_VALUE value)
{ {
IOManager.IOMove(IoType, value, baseConfig.DeviceID); IOManager.IOMove(IoType, value, baseConfig.DeviceID);
......
...@@ -118,11 +118,11 @@ namespace OnlineStore.DeviceLibrary ...@@ -118,11 +118,11 @@ namespace OnlineStore.DeviceLibrary
{ {
if (IsNg) if (IsNg)
{ {
return $" 门口NG料 [{ barcode }] [{ ShelfPosId }] [{PlateW }x{ PlateH }],boxPos[{ BoxPosId }],rfid [{ rfid}]"; return $" 门口NG料 [{ barcode }] [{ ShelfPosId }] [{PlateW }x{ PlateH }],boxPos[{ BoxPosId }],rfid [{ rfid}]";
} }
else else
{ {
return $" 门口物料 [{ barcode }] [{ ShelfPosId }] [{PlateW }x{ PlateH }],boxPos[{ BoxPosId }],rfid [{ rfid}]"; return $" 门口物料 [{ barcode }] [{ ShelfPosId }] [{PlateW }x{ PlateH }],boxPos[{ BoxPosId }],rfid [{ rfid}]";
} }
} }
} }
......
...@@ -234,7 +234,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -234,7 +234,7 @@ namespace OnlineStore.DeviceLibrary
} }
else if (WaitType == 2) else if (WaitType == 2)
{ {
return $"IO信号等待,IO类型【{ IoType }】,等待值【{ IoValue }】"; return $"IO信号【{ IoType }】=【{ IoValue }】";
} }
else if (WaitType == 3) else if (WaitType == 3)
{ {
......
...@@ -168,10 +168,7 @@ namespace OnlineStore.ACSingleStore ...@@ -168,10 +168,7 @@ namespace OnlineStore.ACSingleStore
chbDebug.Checked = equip.IsDebug; chbDebug.Checked = equip.IsDebug;
LoadOk = true; LoadOk = true;
} }
//lblHeartMsg.Text = LineConnect.HeartMsg; lblMoveEquipInfo.Text = "移栽状态:" + (equip.lineConn.CanStartOut() ? "可出库" : "不可出库") + " " + equip.lineConn.LastUpdateTime.ToLongTimeString() + "";
lblHeartMsg.Text = LineConnect.DoorPosInfo?.ToStr();
lblThisSta.Text = equip.GetRunStr(); lblThisSta.Text = equip.GetRunStr();
lblMoveStr.Text = equip.GetMoveStr(); lblMoveStr.Text = equip.GetMoveStr();
//ReadPosistion(); //ReadPosistion();
...@@ -1127,8 +1124,26 @@ namespace OnlineStore.ACSingleStore ...@@ -1127,8 +1124,26 @@ namespace OnlineStore.ACSingleStore
{ {
equip.IOMove(IO_Type.Device_Led, IO_VALUE.LOW); equip.IOMove(IO_Type.Device_Led, IO_VALUE.LOW);
} }
private void btnMoni_Click(object sender, EventArgs e)
{
string text = txtMoni.Text.Trim();
LogUtil.info("点击模拟按钮:" + text);
equip.lineConn.HandlerMsg(text);
}
private void 工位1复位ToolStripMenuItem_Click(object sender, EventArgs e) private void btnClearDoor_Click(object sender, EventArgs e)
{
DialogResult resul = MessageBox.Show("确定清除:" + LineConnect.DoorPosInfo?.ToStr() + "", "提示", MessageBoxButtons.OKCancel);
if (resul.Equals(DialogResult.OK))
{
LogUtil.info(equip.Name + "点击:清理门口料盘:" + LineConnect.DoorPosInfo?.ToStr());
LineConnect.DoorPosInfo = null;
}
}
private void btnS1Reset_Click(object sender, EventArgs e)
{ {
LogUtil.info(equip.Name + "点击:S1复位"); LogUtil.info(equip.Name + "点击:S1复位");
if (equip.storeRunStatus.Equals(StoreRunStatus.Wait)) if (equip.storeRunStatus.Equals(StoreRunStatus.Wait))
...@@ -1139,7 +1154,7 @@ namespace OnlineStore.ACSingleStore ...@@ -1139,7 +1154,7 @@ namespace OnlineStore.ACSingleStore
equip.StationMap[1].Reset(); equip.StationMap[1].Reset();
} }
private void s2复位ToolStripMenuItem_Click(object sender, EventArgs e) private void btnS2Reset_Click(object sender, EventArgs e)
{ {
LogUtil.info(equip.Name + "点击:S2复位"); LogUtil.info(equip.Name + "点击:S2复位");
if (equip.storeRunStatus.Equals(StoreRunStatus.Wait)) if (equip.storeRunStatus.Equals(StoreRunStatus.Wait))
...@@ -1150,7 +1165,7 @@ namespace OnlineStore.ACSingleStore ...@@ -1150,7 +1165,7 @@ namespace OnlineStore.ACSingleStore
equip.StationMap[2].Reset(); equip.StationMap[2].Reset();
} }
private void s3复位ToolStripMenuItem_Click(object sender, EventArgs e) private void btnS3Reset_Click(object sender, EventArgs e)
{ {
LogUtil.info(equip.Name + "点击:S3复位"); LogUtil.info(equip.Name + "点击:S3复位");
if (equip.storeRunStatus.Equals(StoreRunStatus.Wait)) if (equip.storeRunStatus.Equals(StoreRunStatus.Wait))
...@@ -1160,12 +1175,5 @@ namespace OnlineStore.ACSingleStore ...@@ -1160,12 +1175,5 @@ namespace OnlineStore.ACSingleStore
} }
equip.StationMap[3].Reset(); equip.StationMap[3].Reset();
} }
private void btnMoni_Click(object sender, EventArgs e)
{
string text = txtMoni.Text.Trim();
LogUtil.info("点击模拟按钮:" + text);
equip.lineConn.HandlerMsg(text);
}
} }
} }
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!