Commit 24df0f91 LN

C1 SL横移

1 个父辈 46f0da7e
正在显示 37 个修改的文件 包含 680 行增加229 行删除
...@@ -44,12 +44,10 @@ namespace OnlineStore.AssemblyLine ...@@ -44,12 +44,10 @@ namespace OnlineStore.AssemblyLine
cmbSizeList.Items.Add(heigth); cmbSizeList.Items.Add(heigth);
} }
cmbSizeList.SelectedIndex = 0; cmbSizeList.SelectedIndex = 0;
btnUpDownUpbtnTopCylinder_Down.Visible = false;
} }
else else
{ {
tabControl1.TabPages.Remove(tabPage2); tabControl1.TabPages.Remove(tabPage2);
btnUpDownUpbtnTopCylinder_Down.Visible = true;
} }
LoadDP2(); LoadDP2();
chbDebug.Checked = equipBean.IsDebug; chbDebug.Checked = equipBean.IsDebug;
...@@ -59,6 +57,7 @@ namespace OnlineStore.AssemblyLine ...@@ -59,6 +57,7 @@ namespace OnlineStore.AssemblyLine
lblName.Text = equipBean.Name; lblName.Text = equipBean.Name;
this.Text = equipBean.Name; this.Text = equipBean.Name;
txtP1.Text = equipBean.Config.UpDownAxisP1.ToString(); txtP1.Text = equipBean.Config.UpDownAxisP1.ToString();
lblHyInfo.Text = equipBean.GetHYDesc();
IsLoad = true; IsLoad = true;
} }
...@@ -334,13 +333,10 @@ namespace OnlineStore.AssemblyLine ...@@ -334,13 +333,10 @@ namespace OnlineStore.AssemblyLine
{ {
BtnMove(btnLineBackRun, "横移电机反转<<", "横移电机停止", IO_Type.HY_LineBackRun); BtnMove(btnLineBackRun, "横移电机反转<<", "横移电机停止", IO_Type.HY_LineBackRun);
} }
private void btnUpDownUp_Click(object sender, EventArgs e)
{ private void btnTopCylinder_Up_Click(object sender, EventArgs e)
BtnMove(btnUpDownUpbtnTopCylinder_Down, "升降上升", "升降下降", IO_Type.UpDownCylinder_Down, IO_Type.UpDownCylinder_Up);
}
private void btnTopCylinder_UP_Click(object sender, EventArgs e)
{ {
BtnMove(btnTopCylinder_UP, "横移顶升上升", "横移顶升下降", IO_Type.HY_TopCylinder_Down, IO_Type.HY_TopCylinder_UP); BtnMove(btnTopCylinder_Up, "横移顶升上升", "横移顶升下降", IO_Type.HY_TopCylinder_Down, IO_Type.HY_TopCylinder_Up);
} }
private void btnFrontStopDown_Click(object sender, EventArgs e) private void btnFrontStopDown_Click(object sender, EventArgs e)
{ {
...@@ -349,7 +345,7 @@ namespace OnlineStore.AssemblyLine ...@@ -349,7 +345,7 @@ namespace OnlineStore.AssemblyLine
private void btnLocation_Up_Click(object sender, EventArgs e) private void btnLocation_Up_Click(object sender, EventArgs e)
{ {
BtnMove(btnLocation_Up, "横移定位上升", "横移定位下降", IO_Type.HY_LocationCylinder_Down, IO_Type.HY_LocationCylinder_UP); BtnMove(btnLocation_Up, "横移定位上升", "横移定位下降", IO_Type.HY_LocationCylinder_Down, IO_Type.HY_LocationCylinder_Up);
} }
private void btnMoveTake_Click(object sender, EventArgs e) private void btnMoveTake_Click(object sender, EventArgs e)
......
...@@ -28,7 +28,7 @@ namespace OnlineStore.AssemblyLine ...@@ -28,7 +28,7 @@ namespace OnlineStore.AssemblyLine
InitializeComponent(); InitializeComponent();
} }
private void LoadIOList(int subType) private void LoadIOList(int subType,Label lblDI,Label lblDO,Label lblDes)
{ {
List<ConfigIO> DIList = new List<ConfigIO>(); List<ConfigIO> DIList = new List<ConfigIO>();
List<ConfigIO> DOList = new List<ConfigIO>(); List<ConfigIO> DOList = new List<ConfigIO>();
...@@ -36,43 +36,32 @@ namespace OnlineStore.AssemblyLine ...@@ -36,43 +36,32 @@ namespace OnlineStore.AssemblyLine
DOList = new List<ConfigIO>(DeviceConfig.SubDOList[subType].Values); DOList = new List<ConfigIO>(DeviceConfig.SubDOList[subType].Values);
label1.Text = ""; lblDI.Text = "";
label2.Text = ""; lblDO.Text = "";
foreach (ConfigIO ioValue in DIList) foreach (ConfigIO ioValue in DIList)
{ {
label1.Text+= ioValue.ElectricalDefinition + "_" + ioValue.Explain +"_"+ioValue.ProName+"\r\n"; lblDI.Text+= ioValue.ElectricalDefinition + "_" + ioValue.Explain +"_"+ioValue.ProName+"\r\n";
} }
foreach (ConfigIO ioValue in DOList) foreach (ConfigIO ioValue in DOList)
{ {
label2.Text += ioValue.ElectricalDefinition + "_" + ioValue.Explain + "_" + ioValue.ProName + "\r\n"; lblDO.Text += ioValue.ElectricalDefinition + "_" + ioValue.Explain + "_" + ioValue.ProName + "\r\n";
} }
this.SuspendLayout(); //此处为不闪屏,一定要有的!
}
private void LoadIOList2(int subType)
{
List<ConfigIO> DIList = new List<ConfigIO>();
List<ConfigIO> DOList = new List<ConfigIO>();
DIList = new List<ConfigIO>(DeviceConfig.SubDIList[subType].Values);
DOList = new List<ConfigIO>(DeviceConfig.SubDOList[subType].Values);
label3.Text = ""; if (LineManager.Line.HYEquipMap.ContainsKey(subType))
label4.Text = "";
foreach (ConfigIO ioValue in DIList)
{ {
label4.Text += ioValue.ElectricalDefinition + "_" + ioValue.Explain + "_" + ioValue.ProName + "\r\n"; lblDes.Text = LineManager.Line.HYEquipMap[subType].GetHYDesc();
} }
else
foreach (ConfigIO ioValue in DOList)
{ {
label3.Text += ioValue.ElectricalDefinition + "_" + ioValue.Explain + "_" + ioValue.ProName + "\r\n"; lblDes.Text = "";
} }
this.SuspendLayout(); //此处为不闪屏,一定要有的! this.SuspendLayout(); //此处为不闪屏,一定要有的!
} }
private void FrmTest_FormClosing(object sender, FormClosingEventArgs e) private void FrmTest_FormClosing(object sender, FormClosingEventArgs e)
{ {
// KNDAIManager.NeedShow = false; // KNDAIManager.NeedShow = false;
...@@ -132,12 +121,18 @@ namespace OnlineStore.AssemblyLine ...@@ -132,12 +121,18 @@ namespace OnlineStore.AssemblyLine
{ {
comboBox1.Items.Add(key); comboBox1.Items.Add(key);
comboBox2.Items.Add(key); comboBox2.Items.Add(key);
comboBox3.Items.Add(key);
comboBox4.Items.Add(key);
} }
comboBox1.SelectedIndex = 0; comboBox1.SelectedIndex = 0;
LoadIOList(0); comboBox2.SelectedIndex = 1;
comboBox3.SelectedIndex = 2;
comboBox4.SelectedIndex = 3;
comboBox2.SelectedIndex = 0; LoadIOList(0,lblDI1,lblDO1,lblDes1);
LoadIOList2(0); LoadIOList(1, lblDI2, lblDO2,lblDes2);
LoadIOList(2, lblDI3, lblDO3,lblDes3);
LoadIOList(3, lblDI4, lblDO4,lblDes4);
} }
...@@ -153,7 +148,7 @@ namespace OnlineStore.AssemblyLine ...@@ -153,7 +148,7 @@ namespace OnlineStore.AssemblyLine
{ {
List<int> list = new List<int>(deviceList.Keys); List<int> list = new List<int>(deviceList.Keys);
int subType = list[comboBox1.SelectedIndex]; int subType = list[comboBox1.SelectedIndex];
LoadIOList(subType); LoadIOList(subType,lblDI1,lblDO1, lblDes1);
} }
} }
...@@ -163,8 +158,29 @@ namespace OnlineStore.AssemblyLine ...@@ -163,8 +158,29 @@ namespace OnlineStore.AssemblyLine
{ {
List<int> list = new List<int>(deviceList.Keys); List<int> list = new List<int>(deviceList.Keys);
int subType = list[comboBox2.SelectedIndex]; int subType = list[comboBox2.SelectedIndex];
LoadIOList2(subType); LoadIOList(subType,lblDI2,lblDO2, lblDes2);
} }
} }
private void comboBox4_SelectedIndexChanged(object sender, EventArgs e)
{
if (comboBox4.SelectedIndex >= 0)
{
List<int> list = new List<int>(deviceList.Keys);
int subType = list[comboBox4.SelectedIndex];
LoadIOList(subType, lblDI4, lblDO4, lblDes4);
}
}
private void comboBox3_SelectedIndexChanged(object sender, EventArgs e)
{
if (comboBox3.SelectedIndex >= 0)
{
List<int> list = new List<int>(deviceList.Keys);
int subType = list[comboBox3.SelectedIndex];
LoadIOList(subType, lblDI3, lblDO3, lblDes3);
}
}
} }
} }
...@@ -289,7 +289,7 @@ namespace OnlineStore.AssemblyLine ...@@ -289,7 +289,7 @@ namespace OnlineStore.AssemblyLine
private void btnSWRun_Click(object sender, EventArgs e) private void btnSWRun_Click(object sender, EventArgs e)
{ {
BtnMove(btnTopDown, "T3-C1顶升上升", "T3-C1顶升下降", IO_Type.HY_TopCylinder_Down,IO_Type.HY_TopCylinder_UP ); BtnMove(btnTopDown, "T3-C1顶升上升", "T3-C1顶升下降", IO_Type.HY_TopCylinder_Down,IO_Type.HY_TopCylinder_Up );
} }
......
...@@ -423,7 +423,7 @@ ...@@ -423,7 +423,7 @@
this.lblThisSta.ImageAlign = System.Drawing.ContentAlignment.MiddleRight; this.lblThisSta.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.lblThisSta.Location = new System.Drawing.Point(274, 64); this.lblThisSta.Location = new System.Drawing.Point(274, 64);
this.lblThisSta.Name = "lblThisSta"; this.lblThisSta.Name = "lblThisSta";
this.lblThisSta.Size = new System.Drawing.Size(378, 132); this.lblThisSta.Size = new System.Drawing.Size(372, 132);
this.lblThisSta.TabIndex = 246; this.lblThisSta.TabIndex = 246;
this.lblThisSta.Text = "等待启动"; this.lblThisSta.Text = "等待启动";
this.lblThisSta.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; this.lblThisSta.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
...@@ -532,7 +532,7 @@ ...@@ -532,7 +532,7 @@
this.groupBox6.Controls.Add(this.lblThisSta); this.groupBox6.Controls.Add(this.lblThisSta);
this.groupBox6.Location = new System.Drawing.Point(498, 161); this.groupBox6.Location = new System.Drawing.Point(498, 161);
this.groupBox6.Name = "groupBox6"; this.groupBox6.Name = "groupBox6";
this.groupBox6.Size = new System.Drawing.Size(658, 352); this.groupBox6.Size = new System.Drawing.Size(652, 352);
this.groupBox6.TabIndex = 278; this.groupBox6.TabIndex = 278;
this.groupBox6.TabStop = false; this.groupBox6.TabStop = false;
this.groupBox6.Text = "消息"; this.groupBox6.Text = "消息";
...@@ -544,7 +544,7 @@ ...@@ -544,7 +544,7 @@
this.lblInoutInfo.ForeColor = System.Drawing.Color.Green; this.lblInoutInfo.ForeColor = System.Drawing.Color.Green;
this.lblInoutInfo.Location = new System.Drawing.Point(13, 16); this.lblInoutInfo.Location = new System.Drawing.Point(13, 16);
this.lblInoutInfo.Name = "lblInoutInfo"; this.lblInoutInfo.Name = "lblInoutInfo";
this.lblInoutInfo.Size = new System.Drawing.Size(639, 42); this.lblInoutInfo.Size = new System.Drawing.Size(633, 42);
this.lblInoutInfo.TabIndex = 281; this.lblInoutInfo.TabIndex = 281;
this.lblInoutInfo.Text = "当前出入库:"; this.lblInoutInfo.Text = "当前出入库:";
// //
...@@ -568,7 +568,7 @@ ...@@ -568,7 +568,7 @@
this.lblInstoreList.ImageAlign = System.Drawing.ContentAlignment.MiddleRight; this.lblInstoreList.ImageAlign = System.Drawing.ContentAlignment.MiddleRight;
this.lblInstoreList.Location = new System.Drawing.Point(274, 180); this.lblInstoreList.Location = new System.Drawing.Point(274, 180);
this.lblInstoreList.Name = "lblInstoreList"; this.lblInstoreList.Name = "lblInstoreList";
this.lblInstoreList.Size = new System.Drawing.Size(378, 115); this.lblInstoreList.Size = new System.Drawing.Size(372, 115);
this.lblInstoreList.TabIndex = 277; this.lblInstoreList.TabIndex = 277;
// //
// tabPage2 // tabPage2
......
...@@ -401,7 +401,7 @@ namespace OnlineStore.AssemblyLine ...@@ -401,7 +401,7 @@ namespace OnlineStore.AssemblyLine
private void btnTopUp_Click(object sender, EventArgs e) private void btnTopUp_Click(object sender, EventArgs e)
{ {
BtnMove(btnTopUp, "顶升上升", "顶升下降", IO_Type.TopCylinder_Down, IO_Type.TopCylinder_UP); BtnMove(btnTopUp, "顶升上升", "顶升下降", IO_Type.TopCylinder_Down, IO_Type.TopCylinder_Up);
} }
private void btnBeforeAfterBefore_Click(object sender, EventArgs e) private void btnBeforeAfterBefore_Click(object sender, EventArgs e)
......
...@@ -21,19 +21,65 @@ ...@@ -21,19 +21,65 @@
上料机构,入料判断托盘是否到位,放行托盘,从lineBean里调用 上料机构,入料判断托盘是否到位,放行托盘,从lineBean里调用
紧急出料,开始紧急出库横移主动调用开始 托盘出库方法。放行从lineBean里调用 紧急出料,开始紧急出库横移主动调用开始 托盘出库方法。放行从lineBean里调用
HY,T3C1,只使用MoveInfo,SecondMoveInfo暂不使用,托盘处理MoveType=CheckFixture;
出料与托盘关联
四楼环形线问题:
移栽入库过程中报警,导致托盘信息未清除。
托盘 [35] [23:36:12] [有料] [入料: [35] [R00922020101502653] [4D1206CC0018] [7x8],InStoreNg [False],urgentReel [False],cutReel [False],smallReel [False],rfid [B25],rfidLoc [0]]
[2020-11-04 23:39:41,242][167]ERROR [_进仓_12-Move][InStore][MI_06_CylinderDown]等待 [X434-进仓12升降下降端-UpDownCylinder_Down=HIGH]超时[151.5]秒[2020-11-04 23:39:42,024][1]INFO _进仓_12 点击:复位
[2020-11-04 23:39:42,024][1]INFO _进仓_12 点击 :复位
[2020-11-04 23:39:42,024][1]INFO _进仓_12 停止运动:上下气缸上升端,阻挡气缸上升
[2020-11-04 23:39:42,133][1]INFO _进仓_12 开始重置: 升降轴回原点,阻挡气缸上升
[2020-11-05 11:45:14,568][1]INFO 托盘 [36] [23:40:59] [有料] [入料: [36] [R0080820200910E1123] [4D0117CC0019] [7x8],InStoreNg [False],urgentReel [False],cutReel [False],smallReel [False],rfid [B7],rfidLoc [0]]
[2020-11-04 23:41:36,352][159]ERROR [_进仓_01-Move][_进仓_01-Move][InStore][MI_11_CylinderDown] 等待 [X284-进仓1升降下降端-UpDownCylinder_Down=HIGH] 超时 986.3秒
[2020-11-04 23:41:44,016][1]INFO _进仓_01 点击:复位
[2020-11-04 23:41:44,016][1]INFO _进仓_01 点击 :复位
[2020-11-04 23:41:44,016][1]INFO _进仓_01 停止运动:上下气缸上升端,阻挡气缸上升
[2020-11-04 23:41:44,110][150]INFO _入料_2 [3256] IP [192.168.210.110] [33] 当前托盘 [23]
[2020-11-04 23:41:44,126][1]INFO _进仓_01 开始重置: 升降轴回原点,阻挡气缸上升
[2020-11-05 11:45:14,537][1]INFO 托盘 [2] [16:59:10] [有料] [入料: [2] [R04192020092750364] [4D1704CC0020] [7x8],InStoreNg [False],urgentReel [False],cutReel [False],smallReel [False],rfid [B16],rfidLoc [0]]
[2020-11-05 11:45:14,537][1]INFO 托盘 [3] [18:21:53] [有料] [入料: [3] [R04192020083152252] [4D1403AA0023] [7x8],InStoreNg [False],urgentReel [False],cutReel [False],smallReel [False],rfid [B14],rfidLoc [0]]
[2020-11-05 11:45:14,537][1]INFO 托盘 [15] [8:18:43] [有料] [入料: [15] [R008062020082601596] [4D0808BB0003] [7x8],InStoreNg [False],urgentReel [False],cutReel [False],smallReel [False],rfid [B24],rfidLoc [0]]
[2020-11-04 17:01:17,688][169]INFO _进仓_17 *******托盘2需要入库【 [2] [R04192020092750364] [4D1704CC0020] [7x8],InStoreNg [False],urgentReel [False],cutReel [False],smallReel [False],rfid [B16],rfidLoc [0]】 ,开始入库移栽
[2020-11-04 17:03:16,242][124]ERROR [_进仓_17-Move][_进仓_17-Move][InStore][MI_06_CylinderDown] 等待 [X540-进仓17升降下降端-UpDownCylinder_Down=HIGH] 超时 117秒
[2020-11-04 17:03:17,792][1]INFO _进仓_17 点击:复位
[2020-11-04 17:03:17,792][1]INFO _进仓_17 点击 :复位
[2020-11-04 17:03:17,792][1]INFO _进仓_17 停止运动:上下气缸上升端,阻挡气缸上升
[2020-11-04 18:23:39,676][152]INFO _进仓_14 *******托盘3需要入库【 [3] [R04192020083152252] [4D1403AA0023] [7x8],InStoreNg [False],urgentReel [False],cutReel [False],smallReel [False],rfid [B14],rfidLoc [0]】 ,开始入库移栽
[2020-11-04 18:23:39,679][152]INFO _进仓_14 23980*************** 托盘【3】,有对应的入库任务,等待移栽
[2020-11-04 18:25:38,330][162]ERROR [_进仓_14-Move][_进仓_14-Move][InStore][MI_11_CylinderDown] 等待 [X474-进仓14升降下降端-UpDownCylinder_Down=HIGH] 超时 322.6秒
[2020-11-04 18:25:38,330][162]ERROR [_进仓_14-Move][InStore][MI_11_CylinderDown]等待 [X474-进仓14升降下降端-UpDownCylinder_Down=HIGH]超时[322.6]秒
Line 467047: [2020-11-04 18:30:49,333][1]INFO _进仓_14 点击:复位
Line 467048: [2020-11-04 18:30:49,333][1]INFO _进仓_14 点击 :复位
Line 467049: [2020-11-04 18:30:49,333][1]INFO _进仓_14 停止运动:上下气缸上升端,阻挡气缸上升
Line 467050: [2020-11-04 18:30:49,420][1]INFO _进仓_14 开始重置: 升降轴回原点,阻挡气缸上升
Line 219740: [2020-11-05 08:19:09,983][139]INFO _进仓_08 *******托盘15需要入库【 [15] [R008062020082601596] [4D0808BB0003] [7x8],InStoreNg [False],urgentReel [False],cutReel [False],smallReel [False],rfid [B24],rfidLoc [0]】 ,开始入库移栽
Line 220403: [2020-11-05 08:21:08,589][139]ERROR [_进仓_08-Move][_进仓_08-Move][InStore][MI_06_CylinderDown] 等待 [X376-进仓8升降下降端-UpDownCylinder_Down=HIGH] 超时 117秒
Line 220403: [2020-11-05 08:21:08,589][139]ERROR [_进仓_08-Move][_进仓_08-Move][InStore][MI_06_CylinderDown] 等待 [X376-进仓8升降下降端-UpDownCylinder_Down=HIGH] 超时 117秒
Line 220427: [2020-11-05 08:21:18,680][1]INFO _进仓_08 点击:复位
Line 220428: [2020-11-05 08:21:18,680][1]INFO _进仓_08 点击 :复位
Line 220429: [2020-11-05 08:21:18,680][1]INFO _进仓_08 停止运动:上下气缸上升端,阻挡气缸上升
......
...@@ -3,8 +3,8 @@ PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,0,, ...@@ -3,8 +3,8 @@ PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,0,,
PRO,0,是否使用伺服,UpDownUseAxis,0,, PRO,0,是否使用伺服,UpDownUseAxis,0,,
PRO,0,HY所在流水线,LineName,C1,, PRO,0,HY所在流水线,LineName,C1,,
PRO,0,HY工位对应的取放料设备,WorkDevice,101,, PRO,0,HY工位对应的取放料设备,WorkDevice,101,,
PRO,0,HY是否是托盘横移入口,IsSideWayIn,1,, PRO,0,HY是否是托盘横移入口,IsSideWayIn,0,,
PRO,0,HY是否是托盘横移出口,IsSideWayOut,0,, PRO,0,HY是否是托盘横移出口,IsSideWayOut,1,,
PRO,0,HY是否是托盘进入出料线入口,IsOutLineIn,0,, PRO,0,HY是否是托盘进入出料线入口,IsOutLineIn,0,,
PRO,0,HY是否是托盘离开出料线出口,IsOutLineOut,0,, PRO,0,HY是否是托盘离开出料线出口,IsOutLineOut,0,,
,,,,,, ,,,,,,
......
...@@ -3,8 +3,8 @@ PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,0,, ...@@ -3,8 +3,8 @@ PRO,0,设备是否处于调试状态(1=调试,0=正常),IsDebug,0,,
PRO,0,是否使用伺服,UpDownUseAxis,0,, PRO,0,是否使用伺服,UpDownUseAxis,0,,
PRO,0,HY所在流水线,LineName,C1,, PRO,0,HY所在流水线,LineName,C1,,
PRO,0,HY工位对应的取放料设备,WorkDevice,102,, PRO,0,HY工位对应的取放料设备,WorkDevice,102,,
PRO,0,HY是否是托盘横移入口,IsSideWayIn,0,, PRO,0,HY是否是托盘横移入口,IsSideWayIn,1,,
PRO,0,HY是否是托盘横移出口,IsSideWayOut,1,, PRO,0,HY是否是托盘横移出口,IsSideWayOut,0,,
PRO,0,HY是否是托盘进入出料线入口,IsOutLineIn,0,, PRO,0,HY是否是托盘进入出料线入口,IsOutLineIn,0,,
PRO,0,HY是否是托盘离开出料线出口,IsOutLineOut,0,, PRO,0,HY是否是托盘离开出料线出口,IsOutLineOut,0,,
,,,,,, ,,,,,,
......
...@@ -249,13 +249,11 @@ namespace OnlineStore.DeviceLibrary ...@@ -249,13 +249,11 @@ namespace OnlineStore.DeviceLibrary
} }
} }
/// <summary>
/// 下降所有阻挡气缸
/// </summary>
internal virtual void OpenStopCylinder() internal virtual void OpenStopCylinder()
{ {
preRWTime = DateTime.Now; preRWTime = DateTime.Now;
if (baseConfig.DType.Equals(DeviceType.MoveEquip) || baseConfig.DType.Equals(DeviceType.HYEquip)) if (baseConfig.DType.Equals(DeviceType.MoveEquip) )
{ {
LogInfo("OpenStopCylinder: 下降阻挡气缸,上下气缸上升,顶升气缸下降"); LogInfo("OpenStopCylinder: 下降阻挡气缸,上下气缸上升,顶升气缸下降");
IOMove(IO_Type.StopDown1, IO_VALUE.HIGH); IOMove(IO_Type.StopDown1, IO_VALUE.HIGH);
...@@ -266,14 +264,17 @@ namespace OnlineStore.DeviceLibrary ...@@ -266,14 +264,17 @@ namespace OnlineStore.DeviceLibrary
CylinderMove(null, IO_Type.UpDownCylinder_Down, IO_Type.UpDownCylinder_Up); CylinderMove(null, IO_Type.UpDownCylinder_Down, IO_Type.UpDownCylinder_Up);
} }
//顶升气缸下降 //顶升气缸下降
CylinderMove(null, IO_Type.TopCylinder_UP, IO_Type.TopCylinder_Down); CylinderMove(null, IO_Type.TopCylinder_Up, IO_Type.TopCylinder_Down);
Thread.Sleep(30); Thread.Sleep(30);
} else if (baseConfig.DType.Equals(DeviceType.FeedingEquip))
{
} }
} }
internal virtual bool OpenStopCylinderOk(TimeSpan span) internal virtual bool OpenStopCylinderOk(TimeSpan span)
{ {
TimeSpan rwSpan = DateTime.Now - preRWTime; TimeSpan rwSpan = DateTime.Now - preRWTime;
if (baseConfig.DType.Equals(DeviceType.MoveEquip) || baseConfig.DType.Equals(DeviceType.HYEquip)) if (baseConfig.DType.Equals(DeviceType.MoveEquip) )
{ {
if (IOValue(IO_Type.StopDown1).Equals(IO_VALUE.HIGH) && if (IOValue(IO_Type.StopDown1).Equals(IO_VALUE.HIGH) &&
IOValue(IO_Type.StopDown2).Equals(IO_VALUE.HIGH)) IOValue(IO_Type.StopDown2).Equals(IO_VALUE.HIGH))
...@@ -287,32 +288,15 @@ namespace OnlineStore.DeviceLibrary ...@@ -287,32 +288,15 @@ namespace OnlineStore.DeviceLibrary
IOMove(IO_Type.StopDown2, IO_VALUE.HIGH); IOMove(IO_Type.StopDown2, IO_VALUE.HIGH);
} }
} }
else if (baseConfig.DType.Equals(DeviceType.FeedingEquip)) else if (baseConfig.DType.Equals(DeviceType.FeedingEquip))
{ {
if (DeviceID.Equals(102))
{
// if (IOValue(IO_Type.FL_StopCylinder_Down1).Equals(IO_VALUE.HIGH) &&
//IOValue(IO_Type.FL_StopCylinder_Down2).Equals(IO_VALUE.HIGH))
// {
// return true;
// }
// else if (rwSpan.TotalSeconds > 5 && span.TotalSeconds > 6 && span.TotalSeconds < LineManager.Config.IOSingle_TimerOut * 2)
// {
// IOMove(IO_Type.FL_StopCylinder_Down1, IO_VALUE.HIGH);
// IOMove(IO_Type.FL_StopCylinder_Down2, IO_VALUE.HIGH);
// }
}
else
{
return true; return true;
} }
}
return false; return false;
} }
internal virtual void CloseCylinderStop() internal virtual void CloseCylinderStop()
{ {
if (baseConfig.DType.Equals(DeviceType.MoveEquip) || baseConfig.DType.Equals(DeviceType.HYEquip)) if (baseConfig.DType.Equals(DeviceType.MoveEquip) )
{ {
LogInfo("CloseCylinderStop: 上升阻挡气缸,关闭上下气缸,顶升气缸IO"); LogInfo("CloseCylinderStop: 上升阻挡气缸,关闭上下气缸,顶升气缸IO");
...@@ -325,10 +309,14 @@ namespace OnlineStore.DeviceLibrary ...@@ -325,10 +309,14 @@ namespace OnlineStore.DeviceLibrary
IOMove(IO_Type.UpDownCylinder_Up, IO_VALUE.LOW); IOMove(IO_Type.UpDownCylinder_Up, IO_VALUE.LOW);
} }
//顶升气缸下降 //顶升气缸下降
IOMove(IO_Type.TopCylinder_UP, IO_VALUE.LOW); IOMove(IO_Type.TopCylinder_Up, IO_VALUE.LOW);
IOMove(IO_Type.TopCylinder_Down, IO_VALUE.LOW); IOMove(IO_Type.TopCylinder_Down, IO_VALUE.LOW);
Thread.Sleep(30); Thread.Sleep(30);
} }
else if (baseConfig.DType.Equals(DeviceType.FeedingEquip))
{
}
} }
internal bool UpdateTrayNum() internal bool UpdateTrayNum()
......
...@@ -7,10 +7,18 @@ using System.Threading.Tasks; ...@@ -7,10 +7,18 @@ using System.Threading.Tasks;
namespace OnlineStore.DeviceLibrary namespace OnlineStore.DeviceLibrary
{ {
public class HYEquipBase : EquipBase public abstract class HYEquipBase : EquipBase
{ {
public HYEquip_Config Config; public HYEquip_Config Config;
/// <summary>
/// 当前设备对应的横移出口的设备ID
/// </summary>
private int HyOutDeviceId = 0;
/// <summary>
/// 当前设备对应的横移入口的设备ID
/// </summary>
private int HyInDeviceId = 0;
public static HYEquipBase GetHY(string cid, HYEquip_Config config) public static HYEquipBase GetHY(string cid, HYEquip_Config config)
{ {
int hynum = (config.Id % 100); int hynum = (config.Id % 100);
...@@ -43,62 +51,150 @@ namespace OnlineStore.DeviceLibrary ...@@ -43,62 +51,150 @@ namespace OnlineStore.DeviceLibrary
this.Config = config; this.Config = config;
baseConfig = config; baseConfig = config;
IsDebug = config.IsDebug.Equals(1); IsDebug = config.IsDebug.Equals(1);
Name = ( "_HY" + (DeviceID%100).ToString().PadLeft(2, '0') + "_").ToUpper(); Name = ("_HY" + (DeviceID % 100).ToString().PadLeft(2, '0') + "_").ToUpper();
Init(); Init();
MoveInfo = new LineMoveInfo(DeviceID, "[" + Name.Trim() + "-Move]"); MoveInfo = new LineMoveInfo(DeviceID, "[" + Name.Trim() + "-Move]");
SecondMoveInfo = new LineMoveInfo(DeviceID, "[" + Name.Trim() + "-SMove]"); SecondMoveInfo = new LineMoveInfo(DeviceID, "[" + Name.Trim() + "-SMove]");
UseAxis = config.UpDownUseAxis.Equals(1); UseAxis = config.UpDownUseAxis.Equals(1);
//if (UseAxis) if (UseAxis)
//{ {
// Config.UpDown_Axis.ServerOnDO = IO_Type.UpDownAxis_ServoOn;
// Config.UpDown_Axis.BreakOnDO = IO_Type.UpDownAxis_BreakOn;
//}
UpdownAxis = new AxisBean(config.UpDown_Axis, Name); UpdownAxis = new AxisBean(config.UpDown_Axis, Name);
} }
HyOutDeviceId = 0;
HyInDeviceId = 0;
if (DeviceID.Equals(201))
{
HyInDeviceId = 202;
}
else if (DeviceID.Equals(202))
{
HyOutDeviceId = 201;
}
else if (DeviceID.Equals(220))
{
HyOutDeviceId = 221;
}
else if (DeviceID.Equals(221))
{
HyInDeviceId = 220;
}
public override bool StartRun(bool isDebug = false) else if (DeviceID.Equals(204))
{ {
return false; HyOutDeviceId = 203;
} }
public override bool Reset() else if (DeviceID.Equals(203))
{ {
return false; HyInDeviceId = 204;
} }
protected override void ResetProcess()
else if (DeviceID.Equals(209))
{
HyOutDeviceId = 208;
}
else if (DeviceID.Equals(208))
{ {
HyInDeviceId = 209;
} }
internal override void StopMove() else if (DeviceID.Equals(215))
{
HyOutDeviceId = 216;
}
else if (DeviceID.Equals(216))
{
HyInDeviceId = 215;
}
else if (DeviceID.Equals(218))
{ {
HyOutDeviceId = 219;
} }
public override void StopRun() else if (DeviceID.Equals(219))
{ {
HyInDeviceId = 218;
}
} }
protected override void BaseTimerProcess()
public string GetHYDesc()
{
StringBuilder buf = new StringBuilder();
buf.Append(" 所在流水线:" + Config.LineName+"\r\n");
string dName = "暂无";
if (Config.WorkDevice>0&&LineManager.Line.AllEquipMap.ContainsKey(Config.WorkDevice))
{
dName = LineManager.Line.AllEquipMap[Config.WorkDevice].Name;
}
buf.Append(" 取放料设备:" + dName + "\r\n");
if (Config.IsSideWayIn.Equals(1))
{ {
buf.Append("C1线横移入口:✔" + "\r\n");
}
if (Config.IsSideWayOut.Equals(1))
{
buf.Append("C1线横移出口:✔" + "\r\n");
}
if (Config.IsOutLineIn.Equals(1))
{
buf.Append(" 出料托盘入口:✔" + "\r\n");
}
if (Config.IsOutLineOut.Equals(1))
{
buf.Append(" 出料托盘出口:✔" + "\r\n");
}
int hynum = (this.Config.Id % 100);
List<int> jNumList = new List<int>() { 10, 12, 17 };
if (hynum.Equals(17))
{
buf.Append(" NG料工位:✔" + "\r\n");
}
else if (jNumList.Contains(hynum))
{
buf.Append(" 接驳台工位:✔" + "\r\n");
}
return buf.ToString();
} }
public override bool StartInStoreMove(InOutParam param) protected HYEquipBase GetHyOutEquip()
{ {
return false; if (HyOutDeviceId > 0)
{
return LineManager.Line.HYEquipMap[HyOutDeviceId];
}
return null;
}
protected HYEquipBase GetHyInEquip()
{
if (HyInDeviceId > 0)
{
return LineManager.Line.HYEquipMap[HyInDeviceId];
}
return null;
} }
public override bool StartOutStoreMove(InOutParam param) internal virtual bool TrayIsReady()
{ {
return false; return false;
} }
protected override void CheckFixtureProcess()
internal virtual void TrayCanLeave()
{
}
public override bool StartInStoreMove(InOutParam param)
{ {
return false;
} }
public override bool StartOutStoreMove(InOutParam param)
{
return false;
}
protected override void InStoreProcess() protected override void InStoreProcess()
{ {
} }
......
...@@ -14,48 +14,198 @@ namespace OnlineStore.DeviceLibrary ...@@ -14,48 +14,198 @@ namespace OnlineStore.DeviceLibrary
Name = ("_接驳台HY" + (DeviceID % 100).ToString().PadLeft(2, '0') + "_").ToUpper(); Name = ("_接驳台HY" + (DeviceID % 100).ToString().PadLeft(2, '0') + "_").ToUpper();
} }
public override bool StartRun(bool isDebug = false) public override bool StartRun(bool isDebug = false)
{ {
if (CanStartRun().Equals(false))
{
return false;
}
if (!RunAxis(true, UpdownAxis))
{
return false; return false;
} }
mainTimer.Enabled = false;
MoveInfo.EndMove();
SecondMoveInfo.EndMove();
runStatus = LineRunStatus.HomeMoving;
LogInfo("开始 原点返回 ");
MoveInfo.NewMove(LineMoveType.ReturnHome);
StartReset();
if (isDebug)
{
mainTimer.Enabled = true;
}
return true;
}
public override bool Reset() public override bool Reset()
{ {
StopMove();
if (!RunAxis(true, UpdownAxis))
{
return false; return false;
} }
LogInfo("开始重置: 升降轴回原点,阻挡气缸上升 ");
runStatus = LineRunStatus.Reset;
SecondMoveInfo.EndMove();
MoveInfo.NewMove(LineMoveType.Reset);
StartReset();
return true;
}
private void StartReset()
{
ResetClearData();
lineStatus = LineStatus.ResetMove;
MoveInfo.NextMoveStep(LineMoveStep.HY_R_01StopMove);
if (IsDebug)
{
IOMove(IO_Type.StopDown1, IO_VALUE.HIGH);
IOMove(IO_Type.StopDown2, IO_VALUE.HIGH);
}
else
{
IOMove(IO_Type.StopDown1, IO_VALUE.LOW);
IOMove(IO_Type.StopDown2, IO_VALUE.LOW);
}
if (IsDebug)
{
IOMove(IO_Type.HY_FrontStopDown, IO_VALUE.HIGH);
IOMove(IO_Type.HY_SideStopDown, IO_VALUE.HIGH);
IOMove(IO_Type.HY_StopDown, IO_VALUE.HIGH);
}
else
{
IOMove(IO_Type.HY_FrontStopDown, IO_VALUE.LOW);
IOMove(IO_Type.HY_SideStopDown, IO_VALUE.LOW);
IOMove(IO_Type.HY_StopDown, IO_VALUE.LOW);
}
IOMove(IO_Type.HY_LineRun, IO_VALUE.LOW);
CylinderMove(MoveInfo, IO_Type.HY_TopCylinder_Up, IO_Type.HY_TopCylinder_Down);
CylinderMove(MoveInfo, IO_Type.HY_LocationCylinder_Up, IO_Type.HY_LocationCylinder_Down);
CylinderMove(MoveInfo, IO_Type.HY_StopCylinder_Down, IO_Type.HY_StopCylinder_Up);
isInPro = false;
}
protected override void ResetProcess() protected override void ResetProcess()
{ {
if (MoveInfo.IsInWait)
{
CheckWait(MoveInfo);
} }
else if (SecondMoveInfo.IsInWait)
{
CheckWait(SecondMoveInfo);
}
if (!MoveInfo.IsInWait && !SecondMoveInfo.IsInWait)
{
//流水线各装置复原位,夹料气缸状态不变
//阻挡气缸全部=0
//上下气缸上升,、
//上升到位,顶升气缸下降,前后气缸回退
//复位时夹紧气缸需要发送,不然后面出入库会有问题
switch (MoveInfo.MoveStep)
{
case LineMoveStep.HY_R_01StopMove:
internal override void StopMove()
LogInfo(MoveInfo.MoveType + " 完成!");
runStatus = LineRunStatus.Runing;
MoveInfo.EndMove();
SecondMoveInfo.EndMove();
if (IsDebug)
{ {
lineStatus = LineStatus.Debugging;
} }
public override void StopRun() else
{ {
lineStatus = LineStatus.StoreOnline;
}
break;
default: break;
}
}
} }
protected override void BaseTimerProcess() /// <summary>
/// 停止运动
/// </summary>
internal override void StopMove()
{ {
//trayCheck2LowWait.Stop();
//trayCheckWait.Stop();
//如果正在出库中,需要减去托盘号
if (MoveInfo.MoveType.Equals(LineMoveType.OutStore))
{
DebugInfo("停止运动时出库执行中,减去托盘数;");
//减去需要的盘数
// TrayManager.DelNeedEmptyTrayNum();
MoveInfo.EndMove();
} }
runStatus = LineRunStatus.Busy;
SecondMoveInfo.EndMove();
LogInfo("停止运动:上下气缸上升端,阻挡气缸上升 ");
public override bool StartInStoreMove(InOutParam param) //UpdownUpMove();
{ CylinderMove(MoveInfo, IO_Type.TopCylinder_Up, IO_Type.TopCylinder_Down);
return false; IOMove(IO_Type.StopDown1, IO_VALUE.LOW);
IOMove(IO_Type.StopDown2, IO_VALUE.LOW);
} }
public override bool StartOutStoreMove(InOutParam param)
public override void StopRun()
{ {
return false; if (mainTimer != null)
{
mainTimer.Enabled = false;
} }
protected override void CheckFixtureProcess() StopMove();
//停止运行时,把所有IO 置零
CheckAndMove(IO_Type.StopDown1, IO_VALUE.LOW);
CheckAndMove(IO_Type.StopDown2, IO_VALUE.LOW);
CheckAndMove(IO_Type.TopCylinder_Up, IO_VALUE.LOW);
CheckAndMove(IO_Type.TopCylinder_Down, IO_VALUE.LOW);
CheckAndMove(IO_Type.BeforeAfterCylinder_Before, IO_VALUE.LOW);
CheckAndMove(IO_Type.BeforeAfterCylinder_After, IO_VALUE.LOW);
if (UseAxis.Equals(false))
{ {
CheckAndMove(IO_Type.UpDownCylinder_Up, IO_VALUE.LOW);
CheckAndMove(IO_Type.UpDownCylinder_Down, IO_VALUE.LOW);
}
CheckAndMove(IO_Type.ClampCylinder_Work, IO_VALUE.LOW);
CheckAndMove(IO_Type.ClampCylinder_Relax, IO_VALUE.LOW);
runStatus = LineRunStatus.Wait;
} }
protected override void InStoreProcess()
protected override void BaseTimerProcess()
{
if (isInSuddenDown || isNoAirCheck)
{
return;
}
BusyMoveProcess();
IOTimeOutProcess();
//判断流水线打开了才可以运行
if (SecondMoveInfo.MoveType.Equals(LineMoveType.None))
{ {
if (LineManager.Line.CanProcessLine())
{
// LogUtil.info("StartCheckFixture");
StartCheckFixture();
}
}
//OutStoreListPro();
} }
protected override void OutStoreProcess() private void StartCheckFixture()
{
}
protected override void CheckFixtureProcess()
{ {
} }
......
...@@ -37,27 +37,9 @@ namespace OnlineStore.DeviceLibrary ...@@ -37,27 +37,9 @@ namespace OnlineStore.DeviceLibrary
{ {
} }
public override bool StartInStoreMove(InOutParam param)
{
return false;
}
public override bool StartOutStoreMove(InOutParam param)
{
return false;
}
protected override void CheckFixtureProcess() protected override void CheckFixtureProcess()
{ {
} }
protected override void InStoreProcess()
{
}
protected override void OutStoreProcess()
{
}
} }
} }
...@@ -20,7 +20,6 @@ namespace OnlineStore.DeviceLibrary ...@@ -20,7 +20,6 @@ namespace OnlineStore.DeviceLibrary
public partial class LineBean : KTK_Store public partial class LineBean : KTK_Store
{ {
public bool IsDebug = false; public bool IsDebug = false;
// public bool UseAgvClient = false;
/// <summary> /// <summary>
/// 灯闪烁定时器 /// 灯闪烁定时器
/// </summary> /// </summary>
...@@ -39,7 +38,6 @@ namespace OnlineStore.DeviceLibrary ...@@ -39,7 +38,6 @@ namespace OnlineStore.DeviceLibrary
public Dictionary<int, FeedingEquip> FeedingEquipMap { get; set; } public Dictionary<int, FeedingEquip> FeedingEquipMap { get; set; }
public Dictionary<int, HYEquipBase> HYEquipMap { get; set; } public Dictionary<int, HYEquipBase> HYEquipMap { get; set; }
//public Dictionary<int, DischargeLine> DisLineMap { get; set; }
public Dictionary<int, EquipBase> AllEquipMap { get; set; } public Dictionary<int, EquipBase> AllEquipMap { get; set; }
/// <summary> /// <summary>
...@@ -49,7 +47,6 @@ namespace OnlineStore.DeviceLibrary ...@@ -49,7 +47,6 @@ namespace OnlineStore.DeviceLibrary
#region 初始化 #region 初始化
public List<string> cioList = new List<string>(); public List<string> cioList = new List<string>();
// public List<string> rfidList = new List<string>();
private bool canStart = false; private bool canStart = false;
public LineBean(Line_Config lineConfig, Dictionary<int, MoveEquip_Config> configList, Dictionary<int, FeedingEquip_Config> feedMap, public LineBean(Line_Config lineConfig, Dictionary<int, MoveEquip_Config> configList, Dictionary<int, FeedingEquip_Config> feedMap,
...@@ -111,14 +108,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -111,14 +108,7 @@ namespace OnlineStore.DeviceLibrary
AllEquipMap.Add(config.Id, equip); AllEquipMap.Add(config.Id, equip);
//equip.TrayPEndEvent += Equip_TrayPEndEvent; //equip.TrayPEndEvent += Equip_TrayPEndEvent;
} }
//foreach (DischargeLine_Config config in disLineMap.Values)
//{
// DischargeLine equip = new DischargeLine(lineConfig.CID, config);
// AddDeviceName(ioList, config.IOIPList);
// DisLineMap.Add(config.Id, equip);
// AllEquipMap.Add(config.Id, equip);
//}
//先初始化设备 //先初始化设备
IOManager.Init(); IOManager.Init();
AxisManager.Init(); AxisManager.Init();
...@@ -149,11 +139,6 @@ namespace OnlineStore.DeviceLibrary ...@@ -149,11 +139,6 @@ namespace OnlineStore.DeviceLibrary
HYEquipBase feed = HYEquipMap[id]; HYEquipBase feed = HYEquipMap[id];
cioList.AddRange(feed.Config.IOIPList); cioList.AddRange(feed.Config.IOIPList);
} }
//else if (DisLineMap.ContainsKey(id))
//{
// DischargeLine feed = DisLineMap[id];
// cioList.AddRange(feed.Config.IOIPList);
//}
else if (MoveEquipMap.ContainsKey(id)) else if (MoveEquipMap.ContainsKey(id))
{ {
MoveEquip equip = MoveEquipMap[id]; MoveEquip equip = MoveEquipMap[id];
...@@ -903,7 +888,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -903,7 +888,7 @@ namespace OnlineStore.DeviceLibrary
} }
#endregion #endregion
internal override void StopMove( ) internal override void StopMove()
{ {
foreach (EquipBase equip in this.AllEquipMap.Values) foreach (EquipBase equip in this.AllEquipMap.Values)
...@@ -941,48 +926,48 @@ namespace OnlineStore.DeviceLibrary ...@@ -941,48 +926,48 @@ namespace OnlineStore.DeviceLibrary
string msg = ""; string msg = "";
//判断是否所有的已经返回完成 //判断是否所有的已经返回完成
TimeSpan span = DateTime.Now - MoveInfo.LastSetpTime; TimeSpan span = DateTime.Now - MoveInfo.LastSetpTime;
foreach (EquipBase moveEquip in this.AllEquipMap.Values) foreach (EquipBase equip in this.AllEquipMap.Values)
{ {
if (moveEquip.IsDebug) if (equip.IsDebug)
{ {
if (!moveEquip.OpenStopCylinderOk(span)) if (!equip.OpenStopCylinderOk(span))
{ {
msg = moveEquip.Name + "下降阻挡气缸"; msg = equip.Name + "下降阻挡气缸";
TimeSpan rwSpan = DateTime.Now - preRWTime; TimeSpan rwSpan = DateTime.Now - preRWTime;
if (span.TotalSeconds > LineManager.Config.IOSingle_TimerOut * 2) if (span.TotalSeconds > LineManager.Config.IOSingle_TimerOut * 2)
{ {
SetWarnMsg(moveEquip.Name + "下降阻挡气缸超时,已等待" + FormUtil.GetSpanStr(span)); SetWarnMsg(equip.Name + "下降阻挡气缸超时,已等待" + FormUtil.GetSpanStr(span));
LogUtil.error(moveEquip.Name + "下降阻挡气缸超时,已等待" + FormUtil.GetSpanStr(span), 902); LogUtil.error(equip.Name + "下降阻挡气缸超时,已等待" + FormUtil.GetSpanStr(span), 902);
} }
else if (rwSpan.TotalSeconds > 5 && span.TotalSeconds > 6 && span.TotalSeconds < LineManager.Config.IOSingle_TimerOut * 2) else if (rwSpan.TotalSeconds > 5 && span.TotalSeconds > 6 && span.TotalSeconds < LineManager.Config.IOSingle_TimerOut * 2)
{ {
preRWTime = DateTime.Now; preRWTime = DateTime.Now;
LogUtil.error(Name + "复位中:等待" + msg + "已【" + FormUtil.GetSpanStr(span) + "】重新调用OpenStopCylinder方法"); LogUtil.error(Name + "复位中:等待" + msg + "已【" + FormUtil.GetSpanStr(span) + "】重新调用OpenStopCylinder方法");
moveEquip.OpenStopCylinder(); equip.OpenStopCylinder();
} }
isOk = false; isOk = false;
break; break;
} }
continue; continue;
} }
if (moveEquip.runStatus.Equals(LineRunStatus.HomeMoving) || moveEquip.runStatus.Equals(LineRunStatus.Reset) || moveEquip.runStatus.Equals(LineRunStatus.Wait)) if (equip.runStatus.Equals(LineRunStatus.HomeMoving) || equip.runStatus.Equals(LineRunStatus.Reset) || equip.runStatus.Equals(LineRunStatus.Wait))
{ {
if (moveEquip.NoAlarm()) if (equip.NoAlarm())
{ {
if (moveEquip.baseConfig.DType.Equals(DeviceType.FeedingEquip) && moveEquip.MoveInfo.MoveStep >= LineMoveStep.FR_11_BatchAxisHome) if (equip.baseConfig.DType.Equals(DeviceType.FeedingEquip) && equip.MoveInfo.MoveStep >= LineMoveStep.FR_11_BatchAxisHome)
{ {
continue; continue;
} }
msg = moveEquip.Name + "复位结束"; msg = equip.Name + "复位结束";
isOk = false; isOk = false;
break; break;
} }
else else
{ {
//SetWarnMsg(moveEquip.Name + "在复位过程中报警,需要重新复位"); //SetWarnMsg(moveEquip.Name + "在复位过程中报警,需要重新复位");
LogUtil.error(Name + " " + moveEquip.Name + "在复位过程中报警,需要重新复位,调用 moveEquip.Reset();"); LogUtil.error(Name + " " + equip.Name + "在复位过程中报警,需要重新复位,调用 moveEquip.Reset();");
moveEquip.Reset(); equip.Reset();
//如果小于80秒,继续等待 //如果小于80秒,继续等待
if (span.TotalSeconds < 80) if (span.TotalSeconds < 80)
{ {
......
...@@ -210,7 +210,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -210,7 +210,7 @@ namespace OnlineStore.DeviceLibrary
#endregion #endregion
#region 出库 #region
public override bool StartOutStoreMove(InOutParam param) public override bool StartOutStoreMove(InOutParam param)
{ {
...@@ -219,10 +219,6 @@ namespace OnlineStore.DeviceLibrary ...@@ -219,10 +219,6 @@ namespace OnlineStore.DeviceLibrary
protected override void OutStoreProcess() protected override void OutStoreProcess()
{ {
} }
#endregion
#region 入库
public override bool StartInStoreMove(InOutParam param) public override bool StartInStoreMove(InOutParam param)
{ {
return true; return true;
...@@ -384,19 +380,32 @@ namespace OnlineStore.DeviceLibrary ...@@ -384,19 +380,32 @@ namespace OnlineStore.DeviceLibrary
/// 上料机构,判断对应的空托盘是否准备完成 /// 上料机构,判断对应的空托盘是否准备完成
/// </summary> /// </summary>
/// <param name="deviceID">上料机构ID</param> /// <param name="deviceID">上料机构ID</param>
/// <param name="currTrayNum">空托盘号</param> /// <param name="trayNum">空托盘号</param>
/// <returns></returns> /// <returns></returns>
internal bool TrayIsReady(int deviceID,out int currTrayNum) internal bool TrayIsReady(int deviceID,out int trayNum)
{ {
currTrayNum = -1; trayNum = -1;
if (deviceID.Equals(103)) if (deviceID.Equals(103))
{ {
if (T3C1_MoveInfo.MoveType.Equals(LineMoveType.CheckFixture) && T3C1_MoveInfo.IsStep(LineMoveStep.MO_11_CodeRember)) if (T3C1_MoveInfo.MoveType.Equals(LineMoveType.CheckFixture) && T3C1_MoveInfo.IsStep(LineMoveStep.MO_11_CodeRember))
{ {
currTrayNum = T3C1_TrayNum; trayNum = T3C1_TrayNum;
return true;
}
}else
{
foreach(HYEquipBase hy in HYEquipMap.Values)
{
if (hy.Config.WorkDevice.Equals(deviceID))
{
if(hy.TrayIsReady())
{
trayNum = hy.currTrayNum;
return true; return true;
} }
} }
}
}
return false; return false;
} }
/// <summary> /// <summary>
...@@ -409,6 +418,17 @@ namespace OnlineStore.DeviceLibrary ...@@ -409,6 +418,17 @@ namespace OnlineStore.DeviceLibrary
{ {
MO_16_Stop2Down(); MO_16_Stop2Down();
} }
else
{
foreach (HYEquipBase hy in HYEquipMap.Values)
{
if (hy.Config.WorkDevice.Equals(deviceID))
{
hy.TrayCanLeave();
break;
}
}
}
} }
#endregion #endregion
......
...@@ -28,7 +28,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -28,7 +28,7 @@ namespace OnlineStore.DeviceLibrary
T3C1_MoveInfo.EndMove(); T3C1_MoveInfo.EndMove();
IOMove(IO_Type.HY_FrontStopDown, IO_VALUE.LOW); IOMove(IO_Type.HY_FrontStopDown, IO_VALUE.LOW);
IOMove(IO_Type.HY_StopDown, IO_VALUE.LOW); IOMove(IO_Type.HY_StopDown, IO_VALUE.LOW);
CylinderMove(moveInfo, IO_Type.HY_TopCylinder_UP, IO_Type.HY_TopCylinder_Down); CylinderMove(moveInfo, IO_Type.HY_TopCylinder_Up, IO_Type.HY_TopCylinder_Down);
} }
private void T3C1_TimerProcess() private void T3C1_TimerProcess()
...@@ -54,6 +54,14 @@ namespace OnlineStore.DeviceLibrary ...@@ -54,6 +54,14 @@ namespace OnlineStore.DeviceLibrary
} }
else else
{ {
if (IOValue(IO_Type.HY_TrayCheck).Equals(IO_VALUE.HIGH))
{
trayCheck2LowWait.Stop();
}
else
{
TrayManager.checkWatch(trayCheck2LowWait, 30000, false);
}
T3C1_BusyProcess(); T3C1_BusyProcess();
} }
} }
...@@ -75,14 +83,6 @@ namespace OnlineStore.DeviceLibrary ...@@ -75,14 +83,6 @@ namespace OnlineStore.DeviceLibrary
{ {
if (T3C1_MoveInfo.MoveType.Equals(LineMoveType.None).Equals(false)) if (T3C1_MoveInfo.MoveType.Equals(LineMoveType.None).Equals(false))
{ {
if (IOValue(IO_Type.HY_TrayCheck).Equals(IO_VALUE.HIGH))
{
trayCheck2LowWait.Stop();
}
else
{
TrayManager.checkWatch(trayCheck2LowWait, 30000, false);
}
LogUtil.error(Name + " T3C1_CheckFixture " + " 不在空闲中,直接返回 "); LogUtil.error(Name + " T3C1_CheckFixture " + " 不在空闲中,直接返回 ");
return; return;
} }
...@@ -161,6 +161,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -161,6 +161,7 @@ namespace OnlineStore.DeviceLibrary
{ {
T3C1_MoveInfo.NextMoveStep(LineMoveStep.MIO_01_TrayCheck); T3C1_MoveInfo.NextMoveStep(LineMoveStep.MIO_01_TrayCheck);
T3C1_Log("托盘阻挡" + T3C1_MoveInfo.SLog + " 前阻挡上升,等待 阻挡托盘检测=1"); T3C1_Log("托盘阻挡" + T3C1_MoveInfo.SLog + " 前阻挡上升,等待 阻挡托盘检测=1");
IOMove(IO_Type.HY_FrontStopCheck, IO_VALUE.LOW);
T3C1_MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.HY_TrayCheck, IO_VALUE.HIGH)); T3C1_MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.HY_TrayCheck, IO_VALUE.HIGH));
} }
else if (T3C1_MoveInfo.IsStep(LineMoveStep.MIO_01_TrayCheck)) else if (T3C1_MoveInfo.IsStep(LineMoveStep.MIO_01_TrayCheck))
...@@ -173,7 +174,6 @@ namespace OnlineStore.DeviceLibrary ...@@ -173,7 +174,6 @@ namespace OnlineStore.DeviceLibrary
{ {
T3C1_MoveInfo.NextMoveStep(LineMoveStep.MIO_04_Wait); T3C1_MoveInfo.NextMoveStep(LineMoveStep.MIO_04_Wait);
T3C1_Log("托盘阻挡" + T3C1_MoveInfo.SLog + " ,等待编码信号稳定 HY_TrayCheck=1"); T3C1_Log("托盘阻挡" + T3C1_MoveInfo.SLog + " ,等待编码信号稳定 HY_TrayCheck=1");
CheckAndMove(IO_Type.HY_FrontStopDown, IO_VALUE.LOW);
T3C1_MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.HY_TrayCheck, IO_VALUE.HIGH)); T3C1_MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.HY_TrayCheck, IO_VALUE.HIGH));
} }
else if (T3C1_MoveInfo.IsStep(LineMoveStep.MIO_04_Wait)) else if (T3C1_MoveInfo.IsStep(LineMoveStep.MIO_04_Wait))
...@@ -205,7 +205,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -205,7 +205,7 @@ namespace OnlineStore.DeviceLibrary
//如果是出库,且盘高大于30,暂不顶升 //如果是出库,且盘高大于30,暂不顶升
T3C1_MoveInfo.NextMoveStep(LineMoveStep.MIO_06_TopUp); T3C1_MoveInfo.NextMoveStep(LineMoveStep.MIO_06_TopUp);
T3C1_Log("托盘阻挡" + T3C1_MoveInfo.SLog + " 顶升气缸上 升 )"); T3C1_Log("托盘阻挡" + T3C1_MoveInfo.SLog + " 顶升气缸上 升 )");
CylinderMove(T3C1_MoveInfo, IO_Type.TopCylinder_Down, IO_Type.TopCylinder_UP); CylinderMove(T3C1_MoveInfo, IO_Type.HY_TopCylinder_Down, IO_Type.HY_TopCylinder_Up);
} }
else if (T3C1_MoveInfo.IsStep(LineMoveStep.MIO_06_TopUp)) else if (T3C1_MoveInfo.IsStep(LineMoveStep.MIO_06_TopUp))
{ {
...@@ -223,7 +223,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -223,7 +223,7 @@ namespace OnlineStore.DeviceLibrary
{ {
T3C1_MoveInfo.NextMoveStep(LineMoveStep.MO_14_TopDown); T3C1_MoveInfo.NextMoveStep(LineMoveStep.MO_14_TopDown);
T3C1_Log("托盘检测" + T3C1_MoveInfo.SLog + " ,托盘号【" + T3C1_TrayNum + "】,直接放盘通过,顶升气缸下降 "); T3C1_Log("托盘检测" + T3C1_MoveInfo.SLog + " ,托盘号【" + T3C1_TrayNum + "】,直接放盘通过,顶升气缸下降 ");
CylinderMove(T3C1_MoveInfo, IO_Type.TopCylinder_UP, IO_Type.TopCylinder_Down); CylinderMove(T3C1_MoveInfo, IO_Type.HY_TopCylinder_Up, IO_Type.HY_TopCylinder_Down);
} }
} }
...@@ -254,9 +254,9 @@ namespace OnlineStore.DeviceLibrary ...@@ -254,9 +254,9 @@ namespace OnlineStore.DeviceLibrary
{ {
T3C1_MoveInfo.NextMoveStep(LineMoveStep.MO_19_StopUp); T3C1_MoveInfo.NextMoveStep(LineMoveStep.MO_19_StopUp);
T3C1_Log("托盘放行" + T3C1_MoveInfo.SLog + " , 阻挡气缸1-2上升 )"); T3C1_Log("托盘放行" + T3C1_MoveInfo.SLog + " , 阻挡气缸1-2上升 )");
IOMove(IO_Type.StopDown2, IO_VALUE.LOW); IOMove(IO_Type.HY_StopDown, IO_VALUE.LOW);
T3C1_MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(100)); T3C1_MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(100));
T3C1_MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.StopDown2, IO_VALUE.LOW)); T3C1_MoveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.HY_StopDown, IO_VALUE.LOW));
} }
else if (T3C1_MoveInfo.IsStep(LineMoveStep.MO_19_StopUp)) else if (T3C1_MoveInfo.IsStep(LineMoveStep.MO_19_StopUp))
{ {
......
...@@ -149,7 +149,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -149,7 +149,7 @@ namespace OnlineStore.DeviceLibrary
MoveInfo.NextMoveStep(LineMoveStep.MH_03_OtherBack); MoveInfo.NextMoveStep(LineMoveStep.MH_03_OtherBack);
DebugInfo(MoveInfo.MoveType + " : 上升气缸到位,顶升气缸下降,前后气缸后退,夹紧气缸放松"); DebugInfo(MoveInfo.MoveType + " : 上升气缸到位,顶升气缸下降,前后气缸后退,夹紧气缸放松");
CylinderMove(MoveInfo, IO_Type.TopCylinder_UP, IO_Type.TopCylinder_Down); CylinderMove(MoveInfo, IO_Type.TopCylinder_Up, IO_Type.TopCylinder_Down);
CylinderMove(MoveInfo, IO_Type.BeforeAfterCylinder_Before, IO_Type.BeforeAfterCylinder_After); CylinderMove(MoveInfo, IO_Type.BeforeAfterCylinder_Before, IO_Type.BeforeAfterCylinder_After);
CylinderMove(MoveInfo, IO_Type.ClampCylinder_Work, IO_Type.ClampCylinder_Relax); CylinderMove(MoveInfo, IO_Type.ClampCylinder_Work, IO_Type.ClampCylinder_Relax);
break; break;
...@@ -200,7 +200,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -200,7 +200,7 @@ namespace OnlineStore.DeviceLibrary
LogInfo("停止运动:上下气缸上升端,阻挡气缸上升 "); LogInfo("停止运动:上下气缸上升端,阻挡气缸上升 ");
UpdownUpMove(); UpdownUpMove();
CylinderMove(MoveInfo, IO_Type.TopCylinder_UP, IO_Type.TopCylinder_Down); CylinderMove(MoveInfo, IO_Type.TopCylinder_Up, IO_Type.TopCylinder_Down);
IOMove(IO_Type.StopDown1, IO_VALUE.LOW); IOMove(IO_Type.StopDown1, IO_VALUE.LOW);
IOMove(IO_Type.StopDown2, IO_VALUE.LOW); IOMove(IO_Type.StopDown2, IO_VALUE.LOW);
} }
...@@ -216,7 +216,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -216,7 +216,7 @@ namespace OnlineStore.DeviceLibrary
//停止运行时,把所有IO 置零 //停止运行时,把所有IO 置零
CheckAndMove(IO_Type.StopDown1, IO_VALUE.LOW); CheckAndMove(IO_Type.StopDown1, IO_VALUE.LOW);
CheckAndMove(IO_Type.StopDown2, IO_VALUE.LOW); CheckAndMove(IO_Type.StopDown2, IO_VALUE.LOW);
CheckAndMove(IO_Type.TopCylinder_UP, IO_VALUE.LOW); CheckAndMove(IO_Type.TopCylinder_Up, IO_VALUE.LOW);
CheckAndMove(IO_Type.TopCylinder_Down, IO_VALUE.LOW); CheckAndMove(IO_Type.TopCylinder_Down, IO_VALUE.LOW);
CheckAndMove(IO_Type.BeforeAfterCylinder_Before, IO_VALUE.LOW); CheckAndMove(IO_Type.BeforeAfterCylinder_Before, IO_VALUE.LOW);
CheckAndMove(IO_Type.BeforeAfterCylinder_After, IO_VALUE.LOW); CheckAndMove(IO_Type.BeforeAfterCylinder_After, IO_VALUE.LOW);
......
...@@ -177,7 +177,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -177,7 +177,7 @@ namespace OnlineStore.DeviceLibrary
//更新料盘位置 //更新料盘位置
SServerManager.UpdateTrayLoc(Name, MoveInfo.MoveParam.WareCode, LocStatus.INLINE, "E" + trayNum.ToString().PadLeft(2, '0')); SServerManager.UpdateTrayLoc(Name, MoveInfo.MoveParam.WareCode, LocStatus.INLINE, "E" + trayNum.ToString().PadLeft(2, '0'));
UpdownDownP2Move(MoveInfo.MoveParam.PlateH, MoveInfo.MoveParam.PlateW); UpdownDownP2Move(MoveInfo.MoveParam.PlateH, MoveInfo.MoveParam.PlateW);
CylinderMove(MoveInfo, IO_Type.TopCylinder_Down, IO_Type.TopCylinder_UP); CylinderMove(MoveInfo, IO_Type.TopCylinder_Down, IO_Type.TopCylinder_Up);
} }
} }
} }
...@@ -196,7 +196,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -196,7 +196,7 @@ namespace OnlineStore.DeviceLibrary
this.MoveInfo.NextMoveStep(LineMoveStep.MO_60_CylinderUp); this.MoveInfo.NextMoveStep(LineMoveStep.MO_60_CylinderUp);
OutLog("出库 " + MoveInfo.SLog + ": 上下气缸上升,同时顶升气缸先下降"); OutLog("出库 " + MoveInfo.SLog + ": 上下气缸上升,同时顶升气缸先下降");
UpdownUpMove(); UpdownUpMove();
CylinderMove(null, IO_Type.TopCylinder_UP, IO_Type.TopCylinder_Down); CylinderMove(null, IO_Type.TopCylinder_Up, IO_Type.TopCylinder_Down);
} }
else if (MoveInfo.IsStep(LineMoveStep.MO_60_CylinderUp)) else if (MoveInfo.IsStep(LineMoveStep.MO_60_CylinderUp))
{ {
...@@ -205,7 +205,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -205,7 +205,7 @@ namespace OnlineStore.DeviceLibrary
SOutLog("出库 :移栽完成,放行托盘"); SOutLog("出库 :移栽完成,放行托盘");
SecondMoveInfo.NewMove(LineMoveType.CheckFixture); SecondMoveInfo.NewMove(LineMoveType.CheckFixture);
SecondMoveInfo.NextMoveStep(LineMoveStep.MO_14_TopDown); SecondMoveInfo.NextMoveStep(LineMoveStep.MO_14_TopDown);
CylinderMove(SecondMoveInfo, IO_Type.TopCylinder_UP, IO_Type.TopCylinder_Down); CylinderMove(SecondMoveInfo, IO_Type.TopCylinder_Up, IO_Type.TopCylinder_Down);
OutLog("出库处理结束!"); OutLog("出库处理结束!");
MoveEndS(); MoveEndS();
...@@ -301,7 +301,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -301,7 +301,7 @@ namespace OnlineStore.DeviceLibrary
InLog("入库 " + MoveInfo.SLog + ": 升降下降,顶升上升"); InLog("入库 " + MoveInfo.SLog + ": 升降下降,顶升上升");
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(200)); MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(200));
UpdownDownP2Move(MoveInfo.MoveParam.PlateH, MoveInfo.MoveParam.PlateW); UpdownDownP2Move(MoveInfo.MoveParam.PlateH, MoveInfo.MoveParam.PlateW);
CylinderMove(MoveInfo, IO_Type.TopCylinder_Down, IO_Type.TopCylinder_UP); CylinderMove(MoveInfo, IO_Type.TopCylinder_Down, IO_Type.TopCylinder_Up);
} }
else if (MoveInfo.IsStep(LineMoveStep.MI_03_CylinderDown)) else if (MoveInfo.IsStep(LineMoveStep.MI_03_CylinderDown))
{ {
...@@ -321,7 +321,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -321,7 +321,7 @@ namespace OnlineStore.DeviceLibrary
MoveInfo.NextMoveStep(LineMoveStep.MI_06_CylinderUp); MoveInfo.NextMoveStep(LineMoveStep.MI_06_CylinderUp);
InLog("入库 " + MoveInfo.SLog + ": 上下气缸上升"); InLog("入库 " + MoveInfo.SLog + ": 上下气缸上升");
UpdownUpMove(); UpdownUpMove();
CylinderMove(null, IO_Type.TopCylinder_UP, IO_Type.TopCylinder_Down); CylinderMove(null, IO_Type.TopCylinder_Up, IO_Type.TopCylinder_Down);
} }
else if (MoveInfo.IsStep(LineMoveStep.MI_06_CylinderUp)) else if (MoveInfo.IsStep(LineMoveStep.MI_06_CylinderUp))
{ {
...@@ -339,7 +339,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -339,7 +339,7 @@ namespace OnlineStore.DeviceLibrary
InLog("放托盘(放开阻挡): " + MoveInfo.SLog + " 物品已移走,顶升气缸1下降"); InLog("放托盘(放开阻挡): " + MoveInfo.SLog + " 物品已移走,顶升气缸1下降");
SecondMoveInfo.NextMoveStep(LineMoveStep.MO_14_TopDown); SecondMoveInfo.NextMoveStep(LineMoveStep.MO_14_TopDown);
CylinderMove(SecondMoveInfo, IO_Type.TopCylinder_UP, IO_Type.TopCylinder_Down); CylinderMove(SecondMoveInfo, IO_Type.TopCylinder_Up, IO_Type.TopCylinder_Down);
} }
else if (MoveInfo.IsStep(LineMoveStep.MI_10_WaitBox)) else if (MoveInfo.IsStep(LineMoveStep.MI_10_WaitBox))
{ {
...@@ -792,7 +792,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -792,7 +792,7 @@ namespace OnlineStore.DeviceLibrary
else else
{ {
CheckLog("托盘阻挡" + SecondMoveInfo.SLog + " 顶升气缸上 升 )"); CheckLog("托盘阻挡" + SecondMoveInfo.SLog + " 顶升气缸上 升 )");
CylinderMove(SecondMoveInfo, IO_Type.TopCylinder_Down, IO_Type.TopCylinder_UP); CylinderMove(SecondMoveInfo, IO_Type.TopCylinder_Down, IO_Type.TopCylinder_Up);
} }
} }
else if (SecondMoveInfo.IsStep(LineMoveStep.MIO_06_TopUp)) else if (SecondMoveInfo.IsStep(LineMoveStep.MIO_06_TopUp))
...@@ -831,7 +831,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -831,7 +831,7 @@ namespace OnlineStore.DeviceLibrary
} }
SecondMoveInfo.NextMoveStep(LineMoveStep.MO_14_TopDown); SecondMoveInfo.NextMoveStep(LineMoveStep.MO_14_TopDown);
CheckLog("托盘检测" + SecondMoveInfo.SLog + " ,托盘号【" + currTrayNum + "】,直接放盘通过,顶升气缸下降 "); CheckLog("托盘检测" + SecondMoveInfo.SLog + " ,托盘号【" + currTrayNum + "】,直接放盘通过,顶升气缸下降 ");
CylinderMove(SecondMoveInfo, IO_Type.TopCylinder_UP, IO_Type.TopCylinder_Down); CylinderMove(SecondMoveInfo, IO_Type.TopCylinder_Up, IO_Type.TopCylinder_Down);
} }
} }
......
...@@ -572,11 +572,18 @@ namespace OnlineStore.DeviceLibrary ...@@ -572,11 +572,18 @@ namespace OnlineStore.DeviceLibrary
/// 重置 /// 重置
/// </summary> /// </summary>
Reset = 4, Reset = 4,
/// <summary>
/// 夹具检测处理
/// </summary>
CheckFixture = 5, CheckFixture = 5,
/// <summary> /// <summary>
/// 移栽装置的停止,需要先远点返回,然后停止 /// 移栽装置的停止,需要先远点返回,然后停止
/// </summary> /// </summary>
StopMove = 5, StopMove = 6,
/// <summary>
/// 夹具横移处理
/// </summary>
HY=7,
///// <summary> ///// <summary>
///// 移栽检测托盘 ///// 移栽检测托盘
///// </summary> ///// </summary>
......
...@@ -202,12 +202,12 @@ namespace OnlineStore.DeviceLibrary ...@@ -202,12 +202,12 @@ namespace OnlineStore.DeviceLibrary
/// <summary> /// <summary>
///移载装置入库处理,横移气缸到流水线上方 ///移载装置入库处理,横移气缸到流水线上方
/// </summary> /// </summary>
MI_02_ToLineUp , MI_02_ToLineUp,
/// <summary> /// <summary>
///移载装置入库处理,编码与仓位一致,上下气缸1下降 ///移载装置入库处理,编码与仓位一致,上下气缸1下降
/// </summary> /// </summary>
MI_03_CylinderDown , MI_03_CylinderDown,
/// <summary> /// <summary>
///移载装置入库处理,编码与仓位一致,上下气缸1下降后,等待0.3秒,防止没有 下降到位就夹紧 ///移载装置入库处理,编码与仓位一致,上下气缸1下降后,等待0.3秒,防止没有 下降到位就夹紧
/// </summary> /// </summary>
...@@ -635,7 +635,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -635,7 +635,7 @@ namespace OnlineStore.DeviceLibrary
/// <summary> /// <summary>
/// 入料流程:升降盘定位气缸后退 /// 入料流程:升降盘定位气缸后退
/// </summary> /// </summary>
FI_02_TrayLocation_After , FI_02_TrayLocation_After,
/// <summary> /// <summary>
/// 入料流程:定位气缸下降 /// 入料流程:定位气缸下降
/// </summary> /// </summary>
...@@ -896,7 +896,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -896,7 +896,7 @@ namespace OnlineStore.DeviceLibrary
/// <summary> /// <summary>
/// 紧急出料移栽:上料轴下降指定的高度,同时升降轴回待机点 /// 紧急出料移栽:上料轴下降指定的高度,同时升降轴回待机点
/// </summary> /// </summary>
FO_21_AxisDownMove=12021, FO_21_AxisDownMove = 12021,
/// <summary> /// <summary>
/// 紧急出料移栽:上料横移机构取料端 /// 紧急出料移栽:上料横移机构取料端
...@@ -1251,8 +1251,179 @@ namespace OnlineStore.DeviceLibrary ...@@ -1251,8 +1251,179 @@ namespace OnlineStore.DeviceLibrary
#endregion #endregion
#region MyRegion 80000开始 #region 横移模块 50000开始
HY_R_01StopMove = 80001,
#region 横移模块复位,50001
/// <summary>
/// 横移模块复位:横移线体 停止,全部阻挡上升
/// </summary>
HY_R_01StopMove = 50001,
/// <summary>
/// 横移模块复位:顶升气缸下降,定位气缸下降
/// </summary>
HY_R_02StopMove,
#endregion
#region 上料横移入口(HY2 ,HY20)托盘处理,51001
HY01_Wait = 51001,
/// <summary>
/// 横移入口托盘处理:检测到前阻挡托盘检测,前阻挡下降
/// </summary>
HY02_FrontStopDown,
/// <summary>
/// 横移入口托盘处理:托盘检测到信号,前阻挡上升
/// </summary>
HY03_FrontStopUp,
/// <summary>
/// 横移入口托盘处理:等待横移托盘检测信号,需要持续一段时间
/// </summary>
HY04_WaitTime,
/// <summary>
/// 横移入口托盘处理:托盘已到位,判断是否需要使用托盘, 是否开始横移
/// </summary>
HY05_TrayCheck,
/// <summary>
/// 横移入口托盘处理:是入库需要的空托盘,顶升上升
/// </summary>
HY06_TopUp,
/// <summary>
/// 横移入口托盘处理:是入库需要的空托盘,定位上升
/// </summary>
HY07_LocationUp,
/// <summary>
/// 横移入口托盘处理:等待料盘放入或料盘离开
/// </summary>
HY08_WaitProcessReel,
/// <summary>
/// 横移入口托盘处理:料盘处理完成,开始横移或放行
/// </summary>
HY09_ReelProEnd,
/// <summary>
/// 横移入口托盘处理:开始横移,顶升上升,定位下降
/// </summary>
HY11_TopUpToHY,
/// <summary>
/// 横移入口托盘处理:开始横移,等待HY2空闲,可以开始横移
/// </summary>
HY12_WaitHY2Free,
/// <summary>
/// 横移入口托盘处理:开始横移,等待HY2准备完成(顶升上升,定位下降)
/// </summary>
HY13_WaitHY2Ready,
/// <summary>
/// 横移入口托盘处理:横移电机转动
/// </summary>
HY14_HYLineRun,
/// <summary>
/// 横移入口托盘处理:等待托盘到达HY2
/// </summary>
HY15_WaitOutCheck,
/// <summary>
/// 横移入口托盘处理:等待托盘到达HY2持续一段时间
/// </summary>
HY16_WatOutFixture2,
/// <summary>
/// 横移入口托盘处理:横移电机停止,顶升下降,定位下降
/// </summary>
HY17_TopDown,
/// <summary>
/// 横移入口托盘处理:结束横移处理
/// </summary>
HY18_HYEnd,
#endregion
#region 上料横移出口(HY1 ,HY21)托盘处理,51051
/// <summary>
/// 横移出口托盘处理:当前无托盘
/// </summary>
HY51_WaitFree = 51051,
/// <summary>
/// 横移出口托盘处理:顶升上升,定位下降
/// </summary>
HY52_TopUp,
/// <summary>
/// 横移出口托盘处理:横移电机开始转动
/// </summary>
HY53_LineRun,
/// <summary>
/// 横移出口托盘处理:准备接收横移托盘完成
/// </summary>
HY54_HY2Ready,
/// <summary>
/// 横移出口托盘处理:等待检测到托盘信号
/// </summary>
HY55_WaitTrayCheck,
/// <summary>
/// 横移出口托盘处理:再次等待托盘信号,并持续 一段时间
/// </summary>
HY56_CheckWait,
/// <summary>
/// 横移出口托盘处理:是入库需要的空托盘,顶升上升
/// </summary>
HY57_TopUp,
/// <summary>
/// 横移出口托盘处理:是入库需要的空托盘,定位上升
/// </summary>
HY58_LocationUp,
/// <summary>
/// 横移出口托盘处理:等待料盘放入或料盘离开
/// </summary>
HY59_WaitProcessReel,
/// <summary>
/// 横移出口托盘处理:料盘处理完成,开始横移或放行
/// </summary>
HY60_ReelProEnd,
/// <summary>
/// 横移出口托盘处理:托盘可以离开,定位下降
/// </summary>
HY61_TopDown,
/// <summary>
/// 横移出口托盘处理:托盘可以离开,顶升下降
/// </summary>
HY62_LocationDown,
/// <summary>
/// 横移出口托盘处理:等待托盘检测信号消失
/// </summary>
HY63_WaitTrayGo,
/// <summary>
/// 横移出口托盘处理:再次检测托盘检测信号消失,持续一段时间
/// </summary>
HY64_CheckWait,
/// <summary>
/// 横移出口托盘处理:托盘已离开,顶升默认上升
/// </summary>
HY65_TopUp,
/// <summary>
/// 横移出口托盘处理:结束横移处理
/// </summary>
HY66_HYEnd,
#endregion
#endregion #endregion
} }
......
...@@ -62,22 +62,22 @@ ...@@ -62,22 +62,22 @@
<Content Include="device_config.xml"> <Content Include="device_config.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content> </Content>
<Content Include="huichuan\x64\IMC_API_x64.dll"> <Content Include="huichuan_x64\IMC_API_x64.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content> </Content>
<Content Include="huichuan\x64\msvcr100.dll"> <Content Include="huichuan_x64\msvcr100.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content> </Content>
<Content Include="huichuan\x64\msvcr100d.dll"> <Content Include="huichuan_x64\msvcr100d.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content> </Content>
<Content Include="huichuan\x86\IMC_API_x86.dll"> <Content Include="huichuan_x86\IMC_API_x86.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content> </Content>
<Content Include="huichuan\x86\msvcr100.dll"> <Content Include="huichuan_x86\msvcr100.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content> </Content>
<Content Include="huichuan\x86\msvcr100d.dll"> <Content Include="huichuan_x86\msvcr100d.dll">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content> </Content>
<Content Include="system_config.xml"> <Content Include="system_config.xml">
...@@ -85,12 +85,12 @@ ...@@ -85,12 +85,12 @@
</Content> </Content>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Content Include="huichuan\x64\IMC_API_x64.lib"> <Content Include="huichuan_x64\IMC_API_x64.lib">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content> </Content>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Content Include="huichuan\x86\IMC_API_x86.lib"> <Content Include="huichuan_x86\IMC_API_x86.lib">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content> </Content>
</ItemGroup> </ItemGroup>
......
...@@ -24,9 +24,9 @@ namespace HuichuanLibrary ...@@ -24,9 +24,9 @@ namespace HuichuanLibrary
{ {
#region STATIC #region STATIC
#if MACHINE_X86 #if MACHINE_X86
public const string EtherCATConfigApiDllName = @"\huichuan\x86\IMC_API_x86.dll"; public const string EtherCATConfigApiDllName = @"\huichuan_x86\IMC_API_x86.dll";
#else #else
public const string EtherCATConfigApiDllName = @"\huichuan\x64\IMC_API_x64.dll"; public const string EtherCATConfigApiDllName = @"\huichuan_x64\IMC_API_x64.dll";
#endif #endif
#endregion #endregion
......
...@@ -41,7 +41,7 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -41,7 +41,7 @@ namespace OnlineStore.LoadCSVLibrary
/// PRO,0,HY工位对应的取放料设备,WorkDevice,105,, /// PRO,0,HY工位对应的取放料设备,WorkDevice,105,,
/// </summary> /// </summary>
[ConfigProAttribute("WorkDevice")] [ConfigProAttribute("WorkDevice")]
public string WorkDevice { get; set; } public int WorkDevice { get; set; }
/// <summary> /// <summary>
/// PRO,0,HY是否是托盘横移入口,IsSideWayIn,0,, /// PRO,0,HY是否是托盘横移入口,IsSideWayIn,0,,
/// </summary> /// </summary>
......
...@@ -49,25 +49,25 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -49,25 +49,25 @@ namespace OnlineStore.LoadCSVLibrary
/// </summary> /// </summary>
public static string HY_TrayCheck = "HY_TrayCheck"; public static string HY_TrayCheck = "HY_TrayCheck";
/// <summary> /// <summary>
/// DI,217,HY17横移顶升上升端,HY_TopCylinder_UP,5,HC,X05 /// DI,217,HY17横移顶升上升端,HY_TopCylinder_Up,5,HC,X05
/// </summary> /// </summary>
public static string HY_TopCylinder_UP = "HY_TopCylinder_UP"; public static string HY_TopCylinder_Up = "HY_TopCylinder_Up";
/// <summary> /// <summary>
/// DI,217,HY17横移顶升下降端,HY_TopCylinder_Down,6,HC,X06 /// DI,217,HY17横移顶升下降端,HY_TopCylinder_Down,6,HC,X06
/// </summary> /// </summary>
public static string HY_TopCylinder_Down = "HY_TopCylinder_Down"; public static string HY_TopCylinder_Down = "HY_TopCylinder_Down";
/// <summary> /// <summary>
/// DI,217,HY17横移定位1上升端,HY_LocationCylinder_UP1,7,HC,X07 /// DI,217,HY17横移定位1上升端,HY_LocationCylinder_Up1,7,HC,X07
/// </summary> /// </summary>
public static string HY_LocationCylinder_UP1 = "HY_LocationCylinder_UP1"; public static string HY_LocationCylinder_Up1 = "HY_LocationCylinder_Up1";
/// <summary> /// <summary>
/// DI,217,HY17横移定位1下降端,HY_LocationCylinder_Down1,8,HC,X08 /// DI,217,HY17横移定位1下降端,HY_LocationCylinder_Down1,8,HC,X08
/// </summary> /// </summary>
public static string HY_LocationCylinder_Down1 = "HY_LocationCylinder_Down1"; public static string HY_LocationCylinder_Down1 = "HY_LocationCylinder_Down1";
/// <summary> /// <summary>
/// DI,217,HY17横移定位2上升端,HY_LocationCylinder_UP2,9,HC,X09 /// DI,217,HY17横移定位2上升端,HY_LocationCylinder_Up2,9,HC,X09
/// </summary> /// </summary>
public static string HY_LocationCylinder_UP2 = "HY_LocationCylinder_UP2"; public static string HY_LocationCylinder_Up2 = "HY_LocationCylinder_Up2";
/// <summary> /// <summary>
/// DI,217,HY17横移定位2下降端,HY_LocationCylinder_Down2,10,HC,X10 /// DI,217,HY17横移定位2下降端,HY_LocationCylinder_Down2,10,HC,X10
/// </summary> /// </summary>
...@@ -117,9 +117,9 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -117,9 +117,9 @@ namespace OnlineStore.LoadCSVLibrary
/// </summary> /// </summary>
public static string HY_StopDown = "HY_StopDown"; public static string HY_StopDown = "HY_StopDown";
/// <summary> /// <summary>
/// DO,217,HY17横移定位上升,HY_LocationCylinder_UP,9,HC,Y09 /// DO,217,HY17横移定位上升,HY_LocationCylinder_Up,9,HC,Y09
/// </summary> /// </summary>
public static string HY_LocationCylinder_UP = "HY_LocationCylinder_UP"; public static string HY_LocationCylinder_Up = "HY_LocationCylinder_Up";
/// <summary> /// <summary>
/// DO,217,HY17横移定位下降,HY_LocationCylinder_Down,10,HC,Y10 /// DO,217,HY17横移定位下降,HY_LocationCylinder_Down,10,HC,Y10
/// </summary> /// </summary>
...@@ -137,9 +137,9 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -137,9 +137,9 @@ namespace OnlineStore.LoadCSVLibrary
/// </summary> /// </summary>
public static string StopCheck2 = "StopCheck2"; public static string StopCheck2 = "StopCheck2";
/// <summary> /// <summary>
/// DI,22,D11-1顶升上升端,TopCylinder_UP,18,HC,X18 /// DI,22,D11-1顶升上升端,TopCylinder_Up,18,HC,X18
/// </summary> /// </summary>
public static string TopCylinder_UP = "TopCylinder_UP"; public static string TopCylinder_Up = "TopCylinder_Up";
/// <summary> /// <summary>
/// DI,22,D11-1顶升下降端,TopCylinder_Down,19,HC,X19 /// DI,22,D11-1顶升下降端,TopCylinder_Down,19,HC,X19
/// </summary> /// </summary>
...@@ -428,10 +428,10 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -428,10 +428,10 @@ namespace OnlineStore.LoadCSVLibrary
/// DO,207,C8-HY7阻挡下降,HY_SideStopDown,426,HC,Y426 /// DO,207,C8-HY7阻挡下降,HY_SideStopDown,426,HC,Y426
/// </summary> /// </summary>
public static string HY_SideStopDown = "HY_SideStopDown"; public static string HY_SideStopDown = "HY_SideStopDown";
/// <summary> ///// <summary>
/// DI,20,D10-1顶升上升端,TopCylinder_Up,532,HC,X532 ///// DI,20,D10-1顶升上升端,TopCylinder_Up,532,HC,X532
/// </summary> ///// </summary>
public static string TopCylinder_Up = "TopCylinder_Up"; //public static string TopCylinder_Up = "TopCylinder_Up";
......
...@@ -17,13 +17,7 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -17,13 +17,7 @@ namespace OnlineStore.LoadCSVLibrary
: base() : base()
{ {
} }
/// <summary>
/// 流水线配置
/// </summary>
/// <param name="id">ID</param>
/// <param name="cid">CID</param>
/// <param name="type">类型</param>
/// <param name="filepath">配置文件</param>
public Line_Config(int id, string cid, string type, string filepath) public Line_Config(int id, string cid, string type, string filepath)
: base(id, cid, LoadCSVLibrary.DeviceType.Line, filepath) : base(id, cid, LoadCSVLibrary.DeviceType.Line, filepath)
{ {
...@@ -57,12 +51,12 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -57,12 +51,12 @@ namespace OnlineStore.LoadCSVLibrary
/// <summary> /// <summary>
/// PRO IO模块对应的DI数量 IO_DILength 192.168.200.10#16;192.168.200.11#4 /// PRO IO模块对应的DI数量 IO_DILength 192.168.200.10#16;192.168.200.11#4
/// </summary> /// </summary>
[ConfigProAttribute("IO_DILength")] [ConfigProAttribute("IO_DILength",false )]
public string IO_DILength { get; set; } public string IO_DILength { get; set; }
/// <summary> /// <summary>
/// PRO 模块对应的DO数量 IO_DOLength 192.168.200.10#16;192.168.200.11#4 /// PRO 模块对应的DO数量 IO_DOLength 192.168.200.10#16;192.168.200.11#4
/// </summary> /// </summary>
[ConfigProAttribute("IO_DOLength")] [ConfigProAttribute("IO_DOLength",false )]
public string IO_DOLength { get; set; } public string IO_DOLength { get; set; }
...@@ -142,7 +136,7 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -142,7 +136,7 @@ namespace OnlineStore.LoadCSVLibrary
MustHaveDIList.Add(IO_Type.Airpressure_Check); MustHaveDIList.Add(IO_Type.Airpressure_Check);
//MustHaveDIList.Add(IO_Type.NGCylinder_Before); //MustHaveDIList.Add(IO_Type.NGCylinder_Before);
//MustHaveDIList.Add(IO_Type.NGCylinder_After); //MustHaveDIList.Add(IO_Type.NGCylinder_After);
MustHaveDIList.Add(IO_Type.TopCylinder_UP); MustHaveDIList.Add(IO_Type.TopCylinder_Up);
MustHaveDIList.Add(IO_Type.TopCylinder_Down); MustHaveDIList.Add(IO_Type.TopCylinder_Down);
...@@ -157,7 +151,7 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -157,7 +151,7 @@ namespace OnlineStore.LoadCSVLibrary
//MustHaveDOList.Add(IO_Type.SW4_MotorRun); //MustHaveDOList.Add(IO_Type.SW4_MotorRun);
//MustHaveDOList.Add(IO_Type.NGCylinder_Before); //MustHaveDOList.Add(IO_Type.NGCylinder_Before);
//MustHaveDOList.Add(IO_Type.NGCylinder_After); //MustHaveDOList.Add(IO_Type.NGCylinder_After);
MustHaveDOList.Add(IO_Type.TopCylinder_UP); MustHaveDOList.Add(IO_Type.TopCylinder_Up);
MustHaveDOList.Add(IO_Type.TopCylinder_Down); MustHaveDOList.Add(IO_Type.TopCylinder_Down);
} }
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!