Commit 84a6bac7 LN

增加工位禁用功能

1 个父辈 76c33b41
...@@ -92,9 +92,9 @@ namespace OnlineStore.DeviceLibrary ...@@ -92,9 +92,9 @@ namespace OnlineStore.DeviceLibrary
AgvClient.NodeList.Add(config.AgvName2); AgvClient.NodeList.Add(config.AgvName2);
AgvClient.NodeList.Add(config.AgvName3); AgvClient.NodeList.Add(config.AgvName3);
StationMap = new Dictionary<int, WorkStation>(); StationMap = new Dictionary<int, WorkStation>();
StationMap.Add(1, new WorkStation("S1_", config.AgvName1,config.RFID_IP1)); StationMap.Add(1, new WorkStation(1,"S1_", config.AgvName1,config.RFID_IP1));
StationMap.Add(2, new WorkStation("S2_", config.AgvName2,config.RFID_IP2)); StationMap.Add(2, new WorkStation(2,"S2_", config.AgvName2,config.RFID_IP2));
StationMap.Add(3, new WorkStation("S3_", config.AgvName3,config.RFID_IP3)); StationMap.Add(3, new WorkStation(3,"S3_", config.AgvName3,config.RFID_IP3));
HCBoardManager.InitConfig(); HCBoardManager.InitConfig();
IOManager.Init(); IOManager.Init();
...@@ -790,6 +790,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -790,6 +790,7 @@ namespace OnlineStore.DeviceLibrary
} }
if (LineConnect.DoorPosInfo.IsNg || LineConnect.DoorPosInfo.barcode.Equals("")) if (LineConnect.DoorPosInfo.IsNg || LineConnect.DoorPosInfo.barcode.Equals(""))
{ {
LineConnect.DoorPosInfo.IsNg = true;
StartMove(); StartMove();
return; return;
} }
...@@ -803,7 +804,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -803,7 +804,7 @@ namespace OnlineStore.DeviceLibrary
ClearWarnMsg("暂无可用料架"); ClearWarnMsg("暂无可用料架");
//获取库位号 //获取库位号
string outMsg = ""; string outMsg = "";
CurrTray = HttpServer.GetLocation(1, shelfRfid, out outMsg); CurrTray = HttpServer.GetLocation(LineConnect.DoorPosInfo.barcode, shelfRfid, out outMsg);
//需要取放料,且料架已准备好 //需要取放料,且料架已准备好
if (String.IsNullOrEmpty(CurrTray.getP).Equals(false) && outMsg.Equals("")) if (String.IsNullOrEmpty(CurrTray.getP).Equals(false) && outMsg.Equals(""))
{ {
...@@ -862,7 +863,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -862,7 +863,7 @@ namespace OnlineStore.DeviceLibrary
{ {
if (shelf.IsReady()) if (shelf.IsReady())
{ {
str += shelf.CurrShelf.RealShelf + ";"; str += shelf.CurrShelf.RealShelf + ",";
} }
} }
return str; return str;
...@@ -980,7 +981,14 @@ namespace OnlineStore.DeviceLibrary ...@@ -980,7 +981,14 @@ namespace OnlineStore.DeviceLibrary
foreach (WorkStation shelf in StationMap.Values) foreach (WorkStation shelf in StationMap.Values)
{ {
msg += shelf.Name + ": " + shelf.CurrShelf.ToStr()+"\r\n"; if (shelf.IsDis())
{
msg += shelf.Name + ": 已禁用\r\n";
}
else
{
msg += shelf.Name + ": " + shelf.CurrShelf.ToStr() + "\r\n";
}
} }
if (alarmType.Equals(StoreAlarmType.None)) if (alarmType.Equals(StoreAlarmType.None))
{ {
......
...@@ -20,7 +20,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -20,7 +20,10 @@ namespace OnlineStore.DeviceLibrary
public static EquipBean Equip = null; public static EquipBean Equip = null;
public static EquipConfig Config = null; public static EquipConfig Config = null;
private static bool isInit = false; private static bool isInit = false;
public static bool IsConnectServer = !ConfigAppSettings.GetValue(Setting_Init.http_server).Equals(""); public static bool IsConnectServer = !ConfigAppSettings.GetValue(Setting_Init.http_server).Equals("");
public static List<int> DisStationList = new List<int>();
public EquipManager() public EquipManager()
{ {
} }
......
...@@ -20,14 +20,14 @@ namespace OnlineStore.DeviceLibrary ...@@ -20,14 +20,14 @@ namespace OnlineStore.DeviceLibrary
internal string AgvName = ""; internal string AgvName = "";
private string rfidIp = ""; private string rfidIp = "";
public ShelfInfo CurrShelf = new ShelfInfo(); public ShelfInfo CurrShelf = new ShelfInfo();
public int StationId = 0;
public WorkStation(int id,string name,string agvName,string rfidip)
public WorkStation(string name,string agvName,string rfidip)
{ {
this.rfidIp = rfidip; this.rfidIp = rfidip;
MoveInfo = new StoreMoveInfo(1); MoveInfo = new StoreMoveInfo(1);
this.Name = "" + name; this.Name = "" + name;
this.AgvName = agvName; this.AgvName = agvName;
this.StationId = id;
DI_FrontCheck = name+ DI_FrontCheck; DI_FrontCheck = name+ DI_FrontCheck;
DI_InCheck = name+ DI_InCheck; DI_InCheck = name+ DI_InCheck;
DI_LocationCylinder_Up1 = name+ DI_LocationCylinder_Up1; DI_LocationCylinder_Up1 = name+ DI_LocationCylinder_Up1;
...@@ -43,6 +43,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -43,6 +43,10 @@ namespace OnlineStore.DeviceLibrary
internal bool IsReady() internal bool IsReady()
{ {
if (IsDis())
{
return false;
}
if (CheckShelf(IO_VALUE.HIGH)) if (CheckShelf(IO_VALUE.HIGH))
{ {
if (!CurrShelf.IsNeedLeave && (!String.IsNullOrEmpty(CurrShelf.RealShelf)) && LocationIsUp()) if (!CurrShelf.IsNeedLeave && (!String.IsNullOrEmpty(CurrShelf.RealShelf)) && LocationIsUp())
...@@ -55,6 +59,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -55,6 +59,10 @@ namespace OnlineStore.DeviceLibrary
} }
internal bool CheckNeedLeave(bool IsReset = true ) internal bool CheckNeedLeave(bool IsReset = true )
{ {
if (IsDis())
{
return false;
}
CurrShelf.TaskInfo = HttpServer.ShelfFinish(CurrShelf.RealShelf); CurrShelf.TaskInfo = HttpServer.ShelfFinish(CurrShelf.RealShelf);
string log = ""; string log = "";
...@@ -86,7 +94,11 @@ namespace OnlineStore.DeviceLibrary ...@@ -86,7 +94,11 @@ namespace OnlineStore.DeviceLibrary
} }
public void Reset() public void Reset()
{ {
if (IsDis())
{
return;
}
if (CurrShelf.IsBusy) if (CurrShelf.IsBusy)
{ {
LogUtil.error(Name + "复位失败,料架忙碌中"); LogUtil.error(Name + "复位失败,料架忙碌中");
...@@ -97,7 +109,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -97,7 +109,7 @@ namespace OnlineStore.DeviceLibrary
MoveInfo.NewMove(StoreMoveType.StoreReset); MoveInfo.NewMove(StoreMoveType.StoreReset);
MoveInfo.NextMoveStep(MoveStep.SR_01_LocationDown); MoveInfo.NextMoveStep(MoveStep.SR_01_LocationDown);
LogUtil.info(Name + " 开始复位:顶升下降"); LogUtil.info(Name + " 开始复位:顶升下降");
LocationDown(MoveInfo); LocationDown(MoveInfo);
} }
private void ResetProcess() private void ResetProcess()
...@@ -201,8 +213,20 @@ namespace OnlineStore.DeviceLibrary ...@@ -201,8 +213,20 @@ namespace OnlineStore.DeviceLibrary
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(5000)); MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(5000));
LogUtil.info(Name + "复位: 线体转动5秒 "); LogUtil.info(Name + "复位: 线体转动5秒 ");
} }
public bool IsDis()
{
if (EquipManager.DisStationList.Contains(StationId))
{
return true ;
}
return false;
}
public void TimerProcess() public void TimerProcess()
{ {
if (IsDis())
{
return;
}
if (MoveInfo.MoveType.Equals(StoreMoveType.StoreReset)) if (MoveInfo.MoveType.Equals(StoreMoveType.StoreReset))
{ {
ResetProcess(); ResetProcess();
...@@ -233,6 +257,10 @@ namespace OnlineStore.DeviceLibrary ...@@ -233,6 +257,10 @@ namespace OnlineStore.DeviceLibrary
internal bool IsRightShelf(TrayInfo CurrTray, out string ShelfPosId) internal bool IsRightShelf(TrayInfo CurrTray, out string ShelfPosId)
{ {
ShelfPosId = ""; ShelfPosId = "";
if (IsDis())
{
return false;
}
if (IsReady()) if (IsReady())
{ {
if (CurrShelf.RealShelf.Equals(CurrTray.realRFID)) if (CurrShelf.RealShelf.Equals(CurrTray.realRFID))
......
...@@ -173,16 +173,17 @@ namespace OnlineStore.DeviceLibrary ...@@ -173,16 +173,17 @@ namespace OnlineStore.DeviceLibrary
/// <summary> /// <summary>
/// 获取定位机构上的料盘信息 /// 获取定位机构上的料盘信息
/// </summary> /// </summary>
/// <param name="robot">ABB机器人索引号</param> /// <param name="barcode">条码信息</param>
/// <param name="currRFID">当前工位的RFID</param> /// <param name="currRFID">当前工位的RFID</param>
public static TrayInfo GetLocation(int robot, string currRFID, out string msg) public static TrayInfo GetLocation(string barcode, string currRFID, out string msg)
{ {
//getLocation这个接口传入barcode和rfid列表会分配料架
TrayInfo tray = new TrayInfo(); TrayInfo tray = new TrayInfo();
string api = "getLocation"; string api = "getLocation";
msg = ""; msg = "";
try try
{ {
string url = httpAddr + api + "?robotIndex=" + robot + "&rfid=" + currRFID; string url = httpAddr + api + "?barcode=" + barcode + "&rfid=" + currRFID;
string logName = "http :URL:" + url + " , "; string logName = "http :URL:" + url + " , ";
DateTime startTime = DateTime.Now; DateTime startTime = DateTime.Now;
...@@ -200,7 +201,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -200,7 +201,7 @@ namespace OnlineStore.DeviceLibrary
if (obj.TryGetValue("msg", out value)) if (obj.TryGetValue("msg", out value))
{ {
msg = value.ToString(); msg = value.ToString();
LogUtil.error(logName + ": " + value.ToString(), 500 + robot); LogUtil.error(logName + ": " + value.ToString(), 500 );
} }
return tray; return tray;
} }
...@@ -212,16 +213,16 @@ namespace OnlineStore.DeviceLibrary ...@@ -212,16 +213,16 @@ namespace OnlineStore.DeviceLibrary
return tray; return tray;
} }
if (dict.TryGetValue("w", out value)) //if (dict.TryGetValue("w", out value))
{ //{
switch (value) // switch (value)
{ // {
case "7": tray.getP = "p1"; break; // case "7": tray.getP = "p1"; break;
case "11": tray.getP = "p2"; break; // case "11": tray.getP = "p2"; break;
case "13": tray.getP = "p3"; break; // case "13": tray.getP = "p3"; break;
case "15": tray.getP = "p4"; break; // case "15": tray.getP = "p4"; break;
} // }
} //}
if (dict.TryGetValue("rfidLoc", out value)) if (dict.TryGetValue("rfidLoc", out value))
int.TryParse(value.ToString(), out tray.shelfP); int.TryParse(value.ToString(), out tray.shelfP);
if (dict.TryGetValue("rfid", out value)) if (dict.TryGetValue("rfid", out value))
...@@ -238,7 +239,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -238,7 +239,7 @@ namespace OnlineStore.DeviceLibrary
{ {
LogUtil.error("http error : " + ex.ToString()); LogUtil.error("http error : " + ex.ToString());
} }
tray.robotNum = robot; //tray.robotNum = robot;
return tray; return tray;
} }
...@@ -246,7 +247,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -246,7 +247,7 @@ namespace OnlineStore.DeviceLibrary
} }
public class TrayInfo public class TrayInfo
{ {
public int robotNum = 0; //public int robotNum = 0;
public string getP = ""; public string getP = "";
public int shelfP = 0; public int shelfP = 0;
public string rfid = ""; public string rfid = "";
...@@ -255,7 +256,7 @@ namespace OnlineStore.DeviceLibrary ...@@ -255,7 +256,7 @@ namespace OnlineStore.DeviceLibrary
public string usedRfidList = ""; public string usedRfidList = "";
public string ToStr() public string ToStr()
{ {
return "[" + robotNum + "] [" + barcode + "] [" + getP + "] [" + shelfP + "] [" + rfid + "] [" + realRFID + "] [" + usedRfidList + "] [" + updateTime.ToLongTimeString() + "]"; return " [" + barcode + "] [" + getP + "] [" + shelfP + "] [" + rfid + "] [" + realRFID + "] [" + usedRfidList + "] [" + updateTime.ToLongTimeString() + "]";
} }
public DateTime updateTime = DateTime.Now; public DateTime updateTime = DateTime.Now;
......
...@@ -28,6 +28,9 @@ ...@@ -28,6 +28,9 @@
this.panel2 = new System.Windows.Forms.Panel(); this.panel2 = new System.Windows.Forms.Panel();
this.tabControl1 = new System.Windows.Forms.TabControl(); this.tabControl1 = new System.Windows.Forms.TabControl();
this.tabPage2 = new System.Windows.Forms.TabPage(); this.tabPage2 = new System.Windows.Forms.TabPage();
this.checkBox3 = new System.Windows.Forms.CheckBox();
this.checkBox2 = new System.Windows.Forms.CheckBox();
this.checkBox1 = new System.Windows.Forms.CheckBox();
this.lblMoveEquipInfo = new System.Windows.Forms.Label(); this.lblMoveEquipInfo = new System.Windows.Forms.Label();
this.btnS3Reset = new System.Windows.Forms.Button(); this.btnS3Reset = new System.Windows.Forms.Button();
this.btnS2Reset = new System.Windows.Forms.Button(); this.btnS2Reset = new System.Windows.Forms.Button();
...@@ -172,6 +175,9 @@ ...@@ -172,6 +175,9 @@
// //
// tabPage2 // tabPage2
// //
this.tabPage2.Controls.Add(this.checkBox3);
this.tabPage2.Controls.Add(this.checkBox2);
this.tabPage2.Controls.Add(this.checkBox1);
this.tabPage2.Controls.Add(this.lblMoveEquipInfo); this.tabPage2.Controls.Add(this.lblMoveEquipInfo);
this.tabPage2.Controls.Add(this.btnS3Reset); this.tabPage2.Controls.Add(this.btnS3Reset);
this.tabPage2.Controls.Add(this.btnS2Reset); this.tabPage2.Controls.Add(this.btnS2Reset);
...@@ -190,13 +196,52 @@ ...@@ -190,13 +196,52 @@
this.tabPage2.Text = " 设备状态 "; this.tabPage2.Text = " 设备状态 ";
this.tabPage2.UseVisualStyleBackColor = true; this.tabPage2.UseVisualStyleBackColor = true;
// //
// checkBox3
//
this.checkBox3.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.checkBox3.AutoSize = true;
this.checkBox3.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.checkBox3.Location = new System.Drawing.Point(886, 116);
this.checkBox3.Name = "checkBox3";
this.checkBox3.Size = new System.Drawing.Size(89, 21);
this.checkBox3.TabIndex = 286;
this.checkBox3.Text = "禁用工位S3";
this.checkBox3.UseVisualStyleBackColor = true;
this.checkBox3.CheckedChanged += new System.EventHandler(this.checkBox3_CheckedChanged);
//
// checkBox2
//
this.checkBox2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.checkBox2.AutoSize = true;
this.checkBox2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.checkBox2.Location = new System.Drawing.Point(886, 82);
this.checkBox2.Name = "checkBox2";
this.checkBox2.Size = new System.Drawing.Size(89, 21);
this.checkBox2.TabIndex = 285;
this.checkBox2.Text = "禁用工位S2";
this.checkBox2.UseVisualStyleBackColor = true;
this.checkBox2.CheckedChanged += new System.EventHandler(this.checkBox2_CheckedChanged);
//
// checkBox1
//
this.checkBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.checkBox1.AutoSize = true;
this.checkBox1.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.checkBox1.Location = new System.Drawing.Point(886, 48);
this.checkBox1.Name = "checkBox1";
this.checkBox1.Size = new System.Drawing.Size(89, 21);
this.checkBox1.TabIndex = 284;
this.checkBox1.Text = "禁用工位S1";
this.checkBox1.UseVisualStyleBackColor = true;
this.checkBox1.CheckedChanged += new System.EventHandler(this.checkBox1_CheckedChanged);
//
// lblMoveEquipInfo // lblMoveEquipInfo
// //
this.lblMoveEquipInfo.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.lblMoveEquipInfo.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.lblMoveEquipInfo.AutoSize = true; this.lblMoveEquipInfo.AutoSize = true;
this.lblMoveEquipInfo.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.lblMoveEquipInfo.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblMoveEquipInfo.ForeColor = System.Drawing.Color.Green; this.lblMoveEquipInfo.ForeColor = System.Drawing.Color.Green;
this.lblMoveEquipInfo.Location = new System.Drawing.Point(714, 11); this.lblMoveEquipInfo.Location = new System.Drawing.Point(717, 15);
this.lblMoveEquipInfo.Name = "lblMoveEquipInfo"; this.lblMoveEquipInfo.Name = "lblMoveEquipInfo";
this.lblMoveEquipInfo.Size = new System.Drawing.Size(107, 17); this.lblMoveEquipInfo.Size = new System.Drawing.Size(107, 17);
this.lblMoveEquipInfo.TabIndex = 283; this.lblMoveEquipInfo.TabIndex = 283;
...@@ -262,7 +307,7 @@ ...@@ -262,7 +307,7 @@
this.logBox.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.logBox.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.logBox.Location = new System.Drawing.Point(4, 195); this.logBox.Location = new System.Drawing.Point(4, 195);
this.logBox.Name = "logBox"; this.logBox.Name = "logBox";
this.logBox.Size = new System.Drawing.Size(978, 386); this.logBox.Size = new System.Drawing.Size(978, 380);
this.logBox.TabIndex = 278; this.logBox.TabIndex = 278;
this.logBox.Text = ""; this.logBox.Text = "";
this.logBox.VisibleChanged += new System.EventHandler(this.logBox_VisibleChanged); this.logBox.VisibleChanged += new System.EventHandler(this.logBox_VisibleChanged);
...@@ -288,7 +333,7 @@ ...@@ -288,7 +333,7 @@
this.groupBox2.Controls.Add(this.button6); this.groupBox2.Controls.Add(this.button6);
this.groupBox2.Controls.Add(this.button3); this.groupBox2.Controls.Add(this.button3);
this.groupBox2.Controls.Add(this.button5); this.groupBox2.Controls.Add(this.button5);
this.groupBox2.Location = new System.Drawing.Point(6, 454); this.groupBox2.Location = new System.Drawing.Point(6, 448);
this.groupBox2.Name = "groupBox2"; this.groupBox2.Name = "groupBox2";
this.groupBox2.Size = new System.Drawing.Size(972, 78); this.groupBox2.Size = new System.Drawing.Size(972, 78);
this.groupBox2.TabIndex = 276; this.groupBox2.TabIndex = 276;
...@@ -372,7 +417,7 @@ ...@@ -372,7 +417,7 @@
this.chbDebug.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.chbDebug.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.chbDebug.AutoSize = true; this.chbDebug.AutoSize = true;
this.chbDebug.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.chbDebug.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.chbDebug.Location = new System.Drawing.Point(899, 7); this.chbDebug.Location = new System.Drawing.Point(886, 11);
this.chbDebug.Name = "chbDebug"; this.chbDebug.Name = "chbDebug";
this.chbDebug.Size = new System.Drawing.Size(84, 24); this.chbDebug.Size = new System.Drawing.Size(84, 24);
this.chbDebug.TabIndex = 271; this.chbDebug.TabIndex = 271;
...@@ -388,7 +433,7 @@ ...@@ -388,7 +433,7 @@
this.lblWarnMsg.ForeColor = System.Drawing.Color.Red; this.lblWarnMsg.ForeColor = System.Drawing.Color.Red;
this.lblWarnMsg.Location = new System.Drawing.Point(356, 46); this.lblWarnMsg.Location = new System.Drawing.Point(356, 46);
this.lblWarnMsg.Name = "lblWarnMsg"; this.lblWarnMsg.Name = "lblWarnMsg";
this.lblWarnMsg.Size = new System.Drawing.Size(625, 59); this.lblWarnMsg.Size = new System.Drawing.Size(534, 92);
this.lblWarnMsg.TabIndex = 224; this.lblWarnMsg.TabIndex = 224;
this.lblWarnMsg.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; this.lblWarnMsg.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
// //
...@@ -1605,6 +1650,9 @@ ...@@ -1605,6 +1650,9 @@
private System.Windows.Forms.Button btnS1Reset; private System.Windows.Forms.Button btnS1Reset;
private System.Windows.Forms.Button btnClearDoor; private System.Windows.Forms.Button btnClearDoor;
private System.Windows.Forms.Label lblMoveEquipInfo; private System.Windows.Forms.Label lblMoveEquipInfo;
private System.Windows.Forms.CheckBox checkBox3;
private System.Windows.Forms.CheckBox checkBox2;
private System.Windows.Forms.CheckBox checkBox1;
} }
} }
...@@ -1175,5 +1175,47 @@ namespace OnlineStore.ACSingleStore ...@@ -1175,5 +1175,47 @@ namespace OnlineStore.ACSingleStore
} }
equip.StationMap[3].Reset(); equip.StationMap[3].Reset();
} }
private void DisS(int num,CheckBox chebox)
{
if (!LoadOk)
{
return;
}
if (chebox.Checked)
{
if (!EquipManager.DisStationList.Contains(num))
{
EquipManager.DisStationList.Add(num);
LogUtil.info(equip.Name + "用户勾选禁用工位S" + num);
}
}
else
{
if (EquipManager.DisStationList.Contains(num))
{
EquipManager.DisStationList.Remove(num);
LogUtil.info(equip.Name + "用户取消禁用工位S" + num);
}
}
}
private void checkBox1_CheckedChanged(object sender, EventArgs e)
{
int num = 1;
DisS(num, checkBox1);
}
private void checkBox2_CheckedChanged(object sender, EventArgs e)
{
int num = 2;
DisS(num, checkBox2);
}
private void checkBox3_CheckedChanged(object sender, EventArgs e)
{
int num = 3;
DisS(num, checkBox3);
}
} }
} }
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!