Commit f2230197 LN

设备照明增加验证

1 个父辈 84f6140c
......@@ -178,6 +178,16 @@ namespace OnlineStore.ACSingleStore
private void FrmStoreIOStatus_Load(object sender, EventArgs e)
{
AIManager.Instance.NeedShow = true;
if (boxBean.Config.StoreDOList.ContainsKey(IO_Type.Device_Led))
{
btnDevideLed.Visible = true;
btnCDLed.Visible = true;
}
else
{
btnDevideLed.Visible = false;
btnCDLed.Visible = false;
}
}
private void cmbWriteIO_DrawItem(object sender, DrawItemEventArgs e)
......
......@@ -45,7 +45,7 @@ namespace OnlineStore.ACSingleStore
LogUtil.error(LOGGER, "找不到对应的料仓");
return;
}
ACStorePosition ktkPosition = null;
if (store.PositionNumList.Count > 0)
......@@ -83,7 +83,16 @@ namespace OnlineStore.ACSingleStore
txtInOutP2.Text = ktkPosition.InOutAxis_DoorPosition_P2.ToString();
//txtUpDownP1.Text = ktkPosition.UpDownAxis_DoorOPosition_P1.ToString();
}
if (store.Config.StoreDOList.ContainsKey(IO_Type.Device_Led))
{
btnOpenDLed.Visible = true;
btnCloseDLed.Visible = true;
}
else
{
btnOpenDLed.Visible = false;
btnCloseDLed.Visible = false;
}
timer1.Enabled = true;
}
#endregion
......
......@@ -911,36 +911,39 @@ namespace OnlineStore.DeviceLibrary
//仓门打开,打开照明
bool doorIsOpen = false;
if (IOManager.IOValue(IO_Type.Door_Limit).Equals(IO_VALUE.LOW))
if (Config.StoreDOList.ContainsKey(IO_Type.Device_Led))
{
doorIsOpen = true;
}
else if (Config.StoreDIList.ContainsKey(IO_Type.Door_LeftLimit) && IOManager.IOValue(IO_Type.Door_LeftLimit).Equals(IO_VALUE.LOW))
{
doorIsOpen = true;
}
else if (Config.StoreDIList.ContainsKey(IO_Type.Door_RightLimit) && IOManager.IOValue(IO_Type.Door_RightLimit).Equals(IO_VALUE.LOW))
{
doorIsOpen = true;
}
else if (!doorIsOpen)
{
doorIsOpen = true;
}
bool doorIsOpen = false;
if (IOManager.IOValue(IO_Type.Door_Limit).Equals(IO_VALUE.LOW))
{
doorIsOpen = true;
}
else if (Config.StoreDIList.ContainsKey(IO_Type.Door_LeftLimit) && IOManager.IOValue(IO_Type.Door_LeftLimit).Equals(IO_VALUE.LOW))
{
doorIsOpen = true;
}
else if (Config.StoreDIList.ContainsKey(IO_Type.Door_RightLimit) && IOManager.IOValue(IO_Type.Door_RightLimit).Equals(IO_VALUE.LOW))
{
doorIsOpen = true;
}
else if (!doorIsOpen)
{
doorIsOpen = true;
}
if (doorIsOpen)
{
if (IOManager.IOValue(IO_Type.Device_Led).Equals(IO_VALUE.LOW))
if (doorIsOpen)
{
IOManager.IOMove(IO_Type.Device_Led, IO_VALUE.HIGH);
if (IOManager.IOValue(IO_Type.Device_Led).Equals(IO_VALUE.LOW))
{
IOManager.IOMove(IO_Type.Device_Led, IO_VALUE.HIGH);
}
}
}
else
{
if (IOManager.IOValue(IO_Type.Device_Led).Equals(IO_VALUE.HIGH))
else
{
IOManager.IOMove(IO_Type.Device_Led, IO_VALUE.LOW);
if (IOManager.IOValue(IO_Type.Device_Led).Equals(IO_VALUE.HIGH))
{
IOManager.IOMove(IO_Type.Device_Led, IO_VALUE.LOW);
}
}
}
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!