Commit 8ed3b9e5 几米阳光

自动出入库界面修改

1 个父辈 a63a8a86
......@@ -1661,15 +1661,26 @@ namespace OnlineStore.AutoInOutStore
}
groupAxis.Enabled = status;
groupComAxis.Enabled = status;
groupInout.Enabled = status;
//groupInout.Enabled = status;
if (!status)
{
checkBox1.Checked = false;
}
if ( store.autoNext)
{
groupAuto.Enabled = true;
cmbJianGe.Enabled = false;
cmbJianGe.Enabled = false ;
btnSave.Enabled =false ;
checkBox1.Enabled =false ;
btnOutStore.Enabled = false;
btnBatchOutTest.Enabled = false;
}
else
{
{
groupAuto.Enabled = status;
btnOutStore.Enabled = status;
btnBatchOutTest.Enabled = status;
cmbJianGe.Enabled = status;
}
}
......@@ -1728,5 +1739,13 @@ namespace OnlineStore.AutoInOutStore
MessageBox.Show("请先启动料仓!");
}
}
private void checkBox1_CheckedChanged(object sender, EventArgs e)
{
if (!groupInout.Enabled.Equals(checkBox1.Checked))
{
groupInout.Enabled = checkBox1.Checked;
}
}
}
}
......@@ -120,9 +120,6 @@
<metadata name="timer1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 16</value>
</metadata>
<metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>107, 16</value>
</metadata>
<metadata name="contextMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>227, 16</value>
</metadata>
......@@ -1262,6 +1259,9 @@
AD//////////////////AB////////////8=
</value>
</data>
<metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>107, 16</value>
</metadata>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>78</value>
</metadata>
......
......@@ -22,7 +22,13 @@ namespace OnlineStore.DeviceLibrary
if (StoreManager.Config.StoreDOList.ContainsKey(ioType))
{
ConfigIO configIo = StoreManager.Config.StoreDOList[ioType];
//DateTime time = DateTime.Now;
instance.WriteSingleDO(configIo.DeviceName, configIo.SlaveID, configIo.GetIOAddr(), ioValue);
//TimeSpan span = DateTime.Now - time;
//if (span.TotalMilliseconds > 100)
//{
// LogUtil.error("IOMove [" + ioType + "] ["+ioValue+"]耗时" + span.TotalMilliseconds);
//}
Thread.Sleep(60);
}
else
......
......@@ -315,14 +315,27 @@ namespace OnlineStore.DeviceLibrary
{
return GetActualtPosition(axis.DeviceName, axis.GetAxisValue());
}
public static int GetActualtPosition(string portName, int slvAddr)
public static int GetActualtPosition(string portName, int slvAddr)
{
PreReadAddr = ACCMDManager.ActualPosition;
byte[] dataArray = ACCMDManager.GetWriteData(slvAddr, ACCMDManager.CMD_ReadRegisters, ACCMDManager.ActualPosition, "0000", 2);
// SendData(portName,dataArray);
byte[] reviceData = SendCommand(portName, dataArray, 100, 9);
return GetRegisterData(portName, reviceData, ACCMDManager.ActualPosition);
int result = -1;
for (int i = 1; i <= 3; i++)
{
result = GetRegisterData(portName, reviceData, ACCMDManager.ActualPosition);
if (!result.Equals(-1))
{
break;
}
else
{
LogUtil.error("第" + i + "次获取" + portName + "_" + slvAddr + "的实时位置" + result);
}
}
return result;
}
public static int GetCoilData(string portName, byte[] reviceData, string Address)
......
......@@ -1208,7 +1208,7 @@ namespace OnlineStore.DeviceLibrary
//在回原点,复位,出入库时,检测报警间隔减小
if (storeRunStatus.Equals(StoreRunStatus.Busy) || storeRunStatus.Equals(StoreRunStatus.HomeMoving) || storeRunStatus.Equals(StoreRunStatus.Reset))
{
if (span.TotalSeconds < 1)
if (span.TotalSeconds < 2)
{
return false;
}
......
......@@ -1013,7 +1013,7 @@ namespace OnlineStore.DeviceLibrary
{
string posid = PositionNumList[autoPositionIndex];
autoMsg = "自动库:" + posid;
autoMsg = "自动库:" + posid;
//自动出入口,入库结束把出库加入队列
FixtureCodeInfo currInOutFixture = new FixtureCodeInfo(0, "", posid);
AddWaitOutInfo(currInOutFixture);
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!