Commit 57efebb1 LN

门已经打开不重复打开

1 个父辈 b07881a1
......@@ -22,8 +22,8 @@
<add key="BOX_ConfigPath" value="\StoreConfig\BoxConfig.csv"/>
<add key="Store_Type" value="RC_AC_PA"/>
<add key="Store_CID" value="packing-store"/>
<add key="Store_CID_1" value="packing-store1"/>
<add key="Store_CID_2" value="packing-store2"/>
<add key="Store_CID_1" value="packing-21"/>
<add key="Store_CID_2" value="packing-22"/>
<!--end one store config-->
<add key="ACBaudRate" value="115200" />
<add key="InOutDefaultPosition" value="8000"/>
......
......@@ -80,6 +80,7 @@
this.groupBox1.Controls.Add(this.btnNGlineStop);
this.groupBox1.Controls.Add(this.btnNgLine);
this.groupBox1.Controls.Add(this.btnDoorStop);
this.groupBox1.Controls.Add(this.btnOpenAxisBreak);
this.groupBox1.Controls.Add(this.btnBlow);
this.groupBox1.Controls.Add(this.btnStoreOn);
this.groupBox1.Controls.Add(this.btnStopMove);
......@@ -95,7 +96,6 @@
this.groupBox1.Controls.Add(this.txtDOIndex);
this.groupBox1.Controls.Add(this.txtDoName);
this.groupBox1.Controls.Add(this.label17);
this.groupBox1.Controls.Add(this.btnOpenAxisBreak);
this.groupBox1.Controls.Add(this.label14);
this.groupBox1.Controls.Add(this.txtWriteTime);
this.groupBox1.Controls.Add(this.btnLocationDown);
......@@ -107,7 +107,7 @@
this.groupBox1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.groupBox1.Location = new System.Drawing.Point(485, 8);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(320, 527);
this.groupBox1.Size = new System.Drawing.Size(323, 541);
this.groupBox1.TabIndex = 105;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "DO写入";
......@@ -116,7 +116,7 @@
//
this.btnNGlineStop.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnNGlineStop.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnNGlineStop.Location = new System.Drawing.Point(175, 210);
this.btnNGlineStop.Location = new System.Drawing.Point(14, 316);
this.btnNGlineStop.Name = "btnNGlineStop";
this.btnNGlineStop.Size = new System.Drawing.Size(125, 34);
this.btnNGlineStop.TabIndex = 298;
......@@ -128,7 +128,7 @@
//
this.btnNgLine.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnNgLine.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnNgLine.Location = new System.Drawing.Point(12, 210);
this.btnNgLine.Location = new System.Drawing.Point(14, 280);
this.btnNgLine.Name = "btnNgLine";
this.btnNgLine.Size = new System.Drawing.Size(125, 34);
this.btnNgLine.TabIndex = 297;
......@@ -140,9 +140,9 @@
//
this.btnDoorStop.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnDoorStop.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnDoorStop.Location = new System.Drawing.Point(208, 168);
this.btnDoorStop.Location = new System.Drawing.Point(217, 163);
this.btnDoorStop.Name = "btnDoorStop";
this.btnDoorStop.Size = new System.Drawing.Size(92, 34);
this.btnDoorStop.Size = new System.Drawing.Size(96, 45);
this.btnDoorStop.TabIndex = 296;
this.btnDoorStop.Text = "移门停止";
this.btnDoorStop.UseVisualStyleBackColor = false;
......@@ -152,7 +152,7 @@
//
this.btnBlow.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnBlow.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnBlow.Location = new System.Drawing.Point(175, 472);
this.btnBlow.Location = new System.Drawing.Point(188, 447);
this.btnBlow.Name = "btnBlow";
this.btnBlow.Size = new System.Drawing.Size(125, 34);
this.btnBlow.TabIndex = 294;
......@@ -164,7 +164,7 @@
//
this.btnStoreOn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnStoreOn.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnStoreOn.Location = new System.Drawing.Point(175, 386);
this.btnStoreOn.Location = new System.Drawing.Point(188, 495);
this.btnStoreOn.Name = "btnStoreOn";
this.btnStoreOn.Size = new System.Drawing.Size(125, 34);
this.btnStoreOn.TabIndex = 293;
......@@ -176,9 +176,9 @@
//
this.btnStopMove.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnStopMove.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnStopMove.Location = new System.Drawing.Point(208, 428);
this.btnStopMove.Location = new System.Drawing.Point(217, 221);
this.btnStopMove.Name = "btnStopMove";
this.btnStopMove.Size = new System.Drawing.Size(92, 34);
this.btnStopMove.Size = new System.Drawing.Size(96, 45);
this.btnStopMove.TabIndex = 292;
this.btnStopMove.Text = "线体停止";
this.btnStopMove.UseVisualStyleBackColor = false;
......@@ -188,9 +188,9 @@
//
this.button4.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.button4.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.button4.Location = new System.Drawing.Point(12, 428);
this.button4.Location = new System.Drawing.Point(14, 221);
this.button4.Name = "button4";
this.button4.Size = new System.Drawing.Size(92, 34);
this.button4.Size = new System.Drawing.Size(96, 45);
this.button4.TabIndex = 291;
this.button4.Text = "线体正转";
this.button4.UseVisualStyleBackColor = false;
......@@ -200,7 +200,7 @@
//
this.btnCamerLed.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnCamerLed.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnCamerLed.Location = new System.Drawing.Point(12, 472);
this.btnCamerLed.Location = new System.Drawing.Point(14, 495);
this.btnCamerLed.Name = "btnCamerLed";
this.btnCamerLed.Size = new System.Drawing.Size(125, 34);
this.btnCamerLed.TabIndex = 290;
......@@ -212,7 +212,7 @@
//
this.btnTopDown.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnTopDown.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnTopDown.Location = new System.Drawing.Point(175, 296);
this.btnTopDown.Location = new System.Drawing.Point(14, 401);
this.btnTopDown.Name = "btnTopDown";
this.btnTopDown.Size = new System.Drawing.Size(125, 34);
this.btnTopDown.TabIndex = 289;
......@@ -224,7 +224,7 @@
//
this.btnTopUp.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnTopUp.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnTopUp.Location = new System.Drawing.Point(12, 296);
this.btnTopUp.Location = new System.Drawing.Point(14, 364);
this.btnTopUp.Name = "btnTopUp";
this.btnTopUp.Size = new System.Drawing.Size(125, 34);
this.btnTopUp.TabIndex = 288;
......@@ -236,7 +236,7 @@
//
this.btnNGDoorDown.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnNGDoorDown.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnNGDoorDown.Location = new System.Drawing.Point(175, 251);
this.btnNGDoorDown.Location = new System.Drawing.Point(188, 316);
this.btnNGDoorDown.Name = "btnNGDoorDown";
this.btnNGDoorDown.Size = new System.Drawing.Size(125, 34);
this.btnNGDoorDown.TabIndex = 287;
......@@ -248,7 +248,7 @@
//
this.btnNGDoorUp.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnNGDoorUp.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnNGDoorUp.Location = new System.Drawing.Point(12, 251);
this.btnNGDoorUp.Location = new System.Drawing.Point(188, 280);
this.btnNGDoorUp.Name = "btnNGDoorUp";
this.btnNGDoorUp.Size = new System.Drawing.Size(125, 34);
this.btnNGDoorUp.TabIndex = 286;
......@@ -328,7 +328,7 @@
//
this.btnOpenAxisBreak.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnOpenAxisBreak.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnOpenAxisBreak.Location = new System.Drawing.Point(12, 386);
this.btnOpenAxisBreak.Location = new System.Drawing.Point(14, 447);
this.btnOpenAxisBreak.Name = "btnOpenAxisBreak";
this.btnOpenAxisBreak.Size = new System.Drawing.Size(125, 34);
this.btnOpenAxisBreak.TabIndex = 252;
......@@ -362,7 +362,7 @@
//
this.btnLocationDown.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnLocationDown.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnLocationDown.Location = new System.Drawing.Point(175, 341);
this.btnLocationDown.Location = new System.Drawing.Point(188, 401);
this.btnLocationDown.Name = "btnLocationDown";
this.btnLocationDown.Size = new System.Drawing.Size(125, 34);
this.btnLocationDown.TabIndex = 251;
......@@ -387,7 +387,7 @@
//
this.btnLocationUp.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnLocationUp.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnLocationUp.Location = new System.Drawing.Point(12, 341);
this.btnLocationUp.Location = new System.Drawing.Point(188, 364);
this.btnLocationUp.Name = "btnLocationUp";
this.btnLocationUp.Size = new System.Drawing.Size(125, 34);
this.btnLocationUp.TabIndex = 250;
......@@ -415,9 +415,9 @@
//
this.btnCloseDoor.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnCloseDoor.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnCloseDoor.Location = new System.Drawing.Point(110, 168);
this.btnCloseDoor.Location = new System.Drawing.Point(115, 163);
this.btnCloseDoor.Name = "btnCloseDoor";
this.btnCloseDoor.Size = new System.Drawing.Size(92, 34);
this.btnCloseDoor.Size = new System.Drawing.Size(96, 45);
this.btnCloseDoor.TabIndex = 249;
this.btnCloseDoor.Text = "入口移门关闭";
this.btnCloseDoor.UseVisualStyleBackColor = false;
......@@ -427,9 +427,9 @@
//
this.btnOpenDoor.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnOpenDoor.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnOpenDoor.Location = new System.Drawing.Point(12, 168);
this.btnOpenDoor.Location = new System.Drawing.Point(14, 163);
this.btnOpenDoor.Name = "btnOpenDoor";
this.btnOpenDoor.Size = new System.Drawing.Size(92, 34);
this.btnOpenDoor.Size = new System.Drawing.Size(96, 45);
this.btnOpenDoor.TabIndex = 248;
this.btnOpenDoor.Text = "入口移门打开";
this.btnOpenDoor.UseVisualStyleBackColor = false;
......@@ -493,9 +493,9 @@
//
this.btnLineBack.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnLineBack.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnLineBack.Location = new System.Drawing.Point(110, 428);
this.btnLineBack.Location = new System.Drawing.Point(115, 221);
this.btnLineBack.Name = "btnLineBack";
this.btnLineBack.Size = new System.Drawing.Size(92, 34);
this.btnLineBack.Size = new System.Drawing.Size(96, 45);
this.btnLineBack.TabIndex = 299;
this.btnLineBack.Text = "线体反转";
this.btnLineBack.UseVisualStyleBackColor = false;
......@@ -505,7 +505,7 @@
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(818, 608);
this.ClientSize = new System.Drawing.Size(816, 608);
this.Controls.Add(this.button1);
this.Controls.Add(this.groupBox1);
this.Controls.Add(this.groupBox4);
......
......@@ -86,7 +86,7 @@ namespace OnlineStore.DeviceLibrary
{
if (result.Equals(""))
{
LogUtil.info("停止运动:" + result + " [" + moveDO + "] [" + checkDI + "] " );
LogUtil.info("停止运动:" + result + " [" + moveDO + "] [" + checkDI + "] ");
}
else
{
......@@ -101,13 +101,21 @@ namespace OnlineStore.DeviceLibrary
}
}
public bool StartOpen(StoreMoveInfo moveInfo)
public bool StartOpen(StoreMoveInfo moveInfo)
{
bool UseDoor = ConfigAppSettings.GetIntValue(Setting_Init.UseDoor).Equals(1);
if (!UseDoor)
{
return false;
}
//如果门已打开直接返回
if (IOManager.IOValue(IO_Type.EntranceDoor_Open, subType).Equals(IO_VALUE.HIGH) &&
IOManager.IOValue(IO_Type.EntranceDoor_Close, subType).Equals(IO_VALUE.LOW))
{
return true;
}
if (moveInfo != null)
{
moveInfo.WaitList.Add(WaitResultInfo.WaitIO(IO_Type.EntranceDoor_Open, IO_VALUE.HIGH));
......@@ -122,6 +130,13 @@ namespace OnlineStore.DeviceLibrary
if (!UseDoor)
{
return false;
}
//如果门已关闭直接返回
if (IOManager.IOValue(IO_Type.EntranceDoor_Close, subType).Equals(IO_VALUE.HIGH) &&
IOManager.IOValue(IO_Type.EntranceDoor_Open, subType).Equals(IO_VALUE.LOW))
{
return true;
}
if (moveInfo != null)
{
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!