Commit 98426437 LN

1

1 个父辈 a5f815a4
......@@ -92,8 +92,8 @@ namespace OnlineStore.DeviceLibrary
AgvClient.NodeList.Add(config.AgvName3);
ShelfMap = new Dictionary<int, WorkStation>();
ShelfMap.Add(1, new WorkStation("S1_", config.AgvName1,config.RFID_IP1));
ShelfMap.Add(1, new WorkStation("S2_", config.AgvName2,config.RFID_IP2));
ShelfMap.Add(1, new WorkStation("S3_", config.AgvName3,config.RFID_IP3));
ShelfMap.Add(2, new WorkStation("S2_", config.AgvName2,config.RFID_IP2));
ShelfMap.Add(3, new WorkStation("S3_", config.AgvName3,config.RFID_IP3));
HCBoardManager.InitConfig();
IOManager.Init();
......@@ -193,7 +193,6 @@ namespace OnlineStore.DeviceLibrary
isNoAirCheck = false;
isInSuddenDown = false;
WarnMsg = "";
CurrInOutACount = 0;
CurrInOutCount = 0;
storeRunStatus = StoreRunStatus.HomeMoving;
......@@ -215,7 +214,6 @@ namespace OnlineStore.DeviceLibrary
public override void Reset(bool isNeedClearAuto = true)
{
CurrInOutCount = 0;
CurrInOutACount = 0;
//复位之前先停止运行
if (isNeedClearAuto)
......@@ -349,6 +347,53 @@ namespace OnlineStore.DeviceLibrary
#endregion
#region 伺服开关操作
public bool CheckAxisAlarm()
{
if (alarmType.Equals(StoreAlarmType.AxisAlarm) || alarmType.Equals(StoreAlarmType.AxisMoveError))
{
return true;
}
TimeSpan span = DateTime.Now - checkAlarmTime;
//1秒钟检测一次轴报警
if (span.TotalSeconds < 1)
{
return false;
}
checkAlarmTime = DateTime.Now;
bool isInAlarm = false;
foreach (ConfigMoveAxis axisInfo in moveAxisList)
{
short axis = axisInfo.GetAxisValue();
string deviceName = axisInfo.GetNameStr();
AxisAlarmInfo info = AxisAlarmCodeMap[deviceName];
int alarmIo = AxisManager.instance.GetAlarmStatus(deviceName, axis);
if (alarmIo == 1)
{
WarnMsg = Name + " 运动轴" + axisInfo.Explain + "报警";
info.AlarmIoValue = alarmIo;
Alarm(StoreAlarmType.AxisAlarm, GetAlarmCodeByAxis(axisInfo).ToString(), WarnMsg, StoreMoveType.None);
isInAlarm = true;
}
else
{
if (!info.AlarmIoValue.Equals(alarmIo))
{
LogUtil.error(Name + " 运动轴 " + axisInfo.Explain + ",报警已解除!");
info.AlarmIoValue = alarmIo;
}
}
AxisAlarmCodeMap[deviceName] = info;
}
//判断报警状态
return isInAlarm;
}
private void ComMoveToPosition(int targetPosition, int targetSpeed)
{
if (UseCompress_Axis)
......@@ -450,60 +495,8 @@ namespace OnlineStore.DeviceLibrary
#endregion
public override void StopRun()
{
WarnMsg = "";
autoNext = false;
IoCheckTimer.Enabled = false;
serverConnectTimer.Enabled = false;
StopMove();
storeRunStatus = StoreRunStatus.Wait;
mainTimer.Enabled = false;
TimeSpan span = DateTime.Now - StartTime;
IsRun = false;
lineConn.StopConnect();
IOManager.instance.CloseAllDO();
LogInfo( ",停止运行,总运行时间:" + span.ToString());
}
public override void Alarm(StoreAlarmType alarmType, string alarmDetial, string alarmMsg, StoreMoveType storeMoveType)
{
SaveAlarmInfo(alarmType, alarmDetial, alarmMsg, storeMoveType);
autoNext = false;
if (this.alarmType.Equals(alarmType) && alarmType != StoreAlarmType.SuddenStop && alarmType != StoreAlarmType.NoAirCheck)
{
return;
}
LogUtil.error(Name + " 报警,报警类型:" + alarmType);
this.alarmType = alarmType;
if (alarmType.Equals(StoreAlarmType.AxisAlarm) | alarmType.Equals(StoreAlarmType.AxisMoveError))
{
LogUtil.error(Name + "轴报警,关闭刹车,停止运动,关闭轴,打开报警灯");
StopMove();
}
else if (alarmType == StoreAlarmType.SuddenStop)
{
isInSuddenDown = true;
LogUtil.error(Name + "收到急停信号,关闭刹车,停止运动,关闭轴,打开报警灯 ");
StopMove();
storeStatus = StoreStatus.SuddenStop;
}
else if (alarmType.Equals(StoreAlarmType.NoAirCheck))
{
isNoAirCheck = true;
LogUtil.error(Name + " 未检测到气压信号 ,打开刹车,停止运动,关闭轴,打开报警灯 ");
StopMove();
storeStatus = StoreStatus.SuddenStop;
}
}
#region 急停,复位,气压检测
#region 信号定时检测处理
private void IoCheckTimer_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
{
......@@ -600,8 +593,68 @@ namespace OnlineStore.DeviceLibrary
preAirValue = currAirValue;
}
private void IOTimeOutProcess()
{
try
{
TimeSpan span = DateTime.Now - preIoTimerOutTime;
if (span.TotalSeconds > 1)
{
preIoTimerOutTime = DateTime.Now;
if (!alarmType.Equals(StoreAlarmType.IoSingleTimeOut))
{
return;
}
if (storeRunStatus < StoreRunStatus.Runing)
{
return;
}
if (isInSuddenDown || isNoAirCheck)
{
return;
}
if (MoveInfo.IsInWait == false)
{
LogInfo("之前有IO超时异常【" + alarmInfo.alarmDetail + "】,但是当前已经没有在等待中,清理信号超时异常!");
alarmType = StoreAlarmType.None;
WarnMsg = "";
}
}
}
catch (Exception ex)
{
LogUtil.error(Name + "IOTimeOutProcess出错:" + ex.ToString());
}
}
private void AutoResetProcess()
{
try
{
//bool noInStore = lineConnect.WaitInStoreList.Count <= 0;
bool noInStore = (LineConnect.DoorPosInfo == null);
if (storeRunStatus.Equals(StoreRunStatus.Runing) && MoveInfo.MoveType.Equals(StoreMoveType.None))
{
if (CurrInOutCount >= this.Config.Box_ResetACount && noInStore)
{
LogInfo("累积放料" + CurrInOutCount + "次,自动复位");
Reset();
}
}
}
catch (Exception ex)
{
LogUtil.error(Name + "自动复位处理出错:" + ex.ToString());
}
}
#endregion
#region 主定时器
private DateTime preIoTimerOutTime = DateTime.Now;
private DateTime checkAlarmTime = DateTime.Now;
private IO_VALUE lastAutoRun = IO_VALUE.LOW;
private bool InProcess = false;
private bool IsChongfu = false;
private Stopwatch stopwatch = new Stopwatch();
......@@ -616,7 +669,7 @@ namespace OnlineStore.DeviceLibrary
}
else
{
LogUtil.error(Name+ "主定时器:InProcess已等待" + stopwatch.Elapsed.ToString() + "重新处理");
LogUtil.error(Name + "主定时器:InProcess已等待" + stopwatch.Elapsed.ToString() + "重新处理");
IsChongfu = true;
}
}
......@@ -638,12 +691,11 @@ namespace OnlineStore.DeviceLibrary
{
if (IsChongfu)
{
LogInfo( "【" + info + "】 处理完成,耗时:" + stopwatch.Elapsed.ToString());
LogInfo("【" + info + "】 处理完成,耗时:" + stopwatch.Elapsed.ToString());
}
}
private IO_VALUE lastAutoRun = IO_VALUE.LOW;
public void TimerProcess()
{
try
......@@ -692,6 +744,7 @@ namespace OnlineStore.DeviceLibrary
ShowTimeLog("IOTimeOutProcess");
InShelfProcess();
AutoResetProcess();
}
//检查运动轴报警
......@@ -701,7 +754,7 @@ namespace OnlineStore.DeviceLibrary
ShowTimeLog("轴报警检测完成");
}
foreach(WorkStation shelf in ShelfMap.Values)
foreach (WorkStation shelf in ShelfMap.Values)
{
shelf.TimerProcess();
}
......@@ -712,12 +765,16 @@ namespace OnlineStore.DeviceLibrary
LogUtil.error(Name + "定时处理出错:" + ex.ToString());
}
}
private TrayInfo CurrTray = null;
public TrayInfo CurrTray = null;
private void InShelfProcess()
{
try
{
if ((!CanStarInOut()) || (LineConnect.DoorPosInfo == null))
if ((!CanStarInOut()))
{
return;
}
if ((LineConnect.DoorPosInfo == null))
{
return;
}
......@@ -737,7 +794,7 @@ namespace OnlineStore.DeviceLibrary
{
WarnMsg = "";
}
string targetP = GetShelfPosId(CurrTray);
string targetP = GetShelfPosId();
if (!String.IsNullOrEmpty(targetP))
{
LineConnect.DoorPosInfo.ShelfPosId = targetP;
......@@ -748,20 +805,18 @@ namespace OnlineStore.DeviceLibrary
WarnMsg = " getLocation " + outMsg;
}
}
else
{
if (!outMsg.Equals(""))
else if (!outMsg.Equals(""))
{
WarnMsg = " getLocation " + outMsg;
}
}
}
catch (Exception ex)
{
LogUtil.error(Name + "处理出入库排队列表出错:" + ex.ToString());
}
}
internal string GetShelfPosId(TrayInfo CurrTray)
internal string GetShelfPosId()
{
string str = "";
......@@ -769,53 +824,20 @@ namespace OnlineStore.DeviceLibrary
{
foreach (WorkStation obj in ShelfMap.Values)
{
if (obj.IsReady())
{
if (obj.CurrShelf.RealShelf.Equals(CurrTray.realRFID))
{
str = obj.Name + CurrTray.shelfP;
obj.CurrShelf.IsBusy = true;
LogUtil.info(Name + " " + CurrTray.ToStr() + " 使用料架:" + str + ",更改料架为忙碌状态");
break;
}
else if (String.IsNullOrEmpty(CurrTray.realRFID))
{
if ((!obj.CurrShelf.XNShelf.Equals("")) && obj.CurrShelf.XNShelf.Equals(CurrTray.rfid))
{
CurrTray.realRFID = obj.CurrShelf.RealShelf;
str = obj.Name + CurrTray.shelfP;
obj.CurrShelf.IsBusy = true;
LogUtil.info(Name + " " + CurrTray.ToStr() + " 使用料架:" + str + ",更改料架为忙碌状态");
break;
}
if (!String.IsNullOrEmpty(CurrTray.usedRfidList))
{
string[] array = CurrTray.usedRfidList.Split(',');
//若料架已使用过,直接返回false
if (array.Contains(obj.CurrShelf.XNShelf))
if (obj.IsRightShelf(CurrTray, out str))
{
continue;
}
}
if (obj.CurrShelf.XNShelf.Equals(""))
{
CurrTray.realRFID = obj.CurrShelf.RealShelf;
str = obj.Name + CurrTray.shelfP;
obj.CurrShelf.IsBusy = true;
LogUtil.info(Name + " " + CurrTray.ToStr() + " 使用料架:" + str + ",更改料架为忙碌状态");
break;
}
}
}
}
}
return str;
}
private string ReadyShelf()
{
string str = "";
foreach(WorkStation shelf in ShelfMap.Values)
foreach (WorkStation shelf in ShelfMap.Values)
{
if (shelf.IsReady())
{
......@@ -839,145 +861,59 @@ namespace OnlineStore.DeviceLibrary
}
}
private DateTime preIoTimerOutTime = DateTime.Now;
private void IOTimeOutProcess()
{
try
{
TimeSpan span = DateTime.Now - preIoTimerOutTime;
if (span.TotalSeconds > 1)
{
preIoTimerOutTime = DateTime.Now;
if (!alarmType.Equals(StoreAlarmType.IoSingleTimeOut))
{
return;
}
if (storeRunStatus < StoreRunStatus.Runing)
{
return;
}
if (isInSuddenDown || isNoAirCheck)
{
return;
}
if (MoveInfo.IsInWait == false)
#endregion
public override void StopRun()
{
LogInfo( "之前有IO超时异常【" + alarmInfo.alarmDetail + "】,但是当前已经没有在等待中,清理信号超时异常!");
alarmType = StoreAlarmType.None;
WarnMsg = "";
}
}
}
catch (Exception ex)
{
LogUtil.error(Name+ "IOTimeOutProcess出错:" + ex.ToString());
}
}
autoNext = false;
IoCheckTimer.Enabled = false;
serverConnectTimer.Enabled = false;
StopMove();
private void AutoResetProcess()
{
//try
//{
// //bool noInStore = lineConnect.WaitInStoreList.Count <= 0;
// bool noInStore = (LineConnect. DoorPosInfo == null);
// if (CurrInOutACount >= this.Config.Box_ResetACount && noInStore)
// {
// if (storeRunStatus < StoreRunStatus.Runing || MoveInfo.MoveType == StoreMoveType.InStore )
// {
// LogInfo( "已经累计出入库" + CurrInOutACount + "次,当时当前正在忙碌中暂不复位");
// }
// else
// {
// LogInfo( "已经累计出入库" + CurrInOutACount + "次,需要复位一下");
// Reset();
// }
// }
// else if (CurrInOutCount >= this.Config.Box_ResetMCount && noInStore)
// {
// if (storeRunStatus < StoreRunStatus.Runing || MoveInfo.MoveType == StoreMoveType.InStore )
// {
// LogInfo( "已经累计出入库" + CurrInOutCount + "次,当时当前正在忙碌中暂不复位旋转轴");
// }
// else
// {
// LogInfo( "已经累计出入库" + CurrInOutCount + "次,需要复位一下旋转轴");
// }
// }
// else if (lineConnect.CanStartOut() || autoNext)
// {
// if (LineConnect.DoorPosInfo != null)
// { //出库
// LogInfo("开始执行料仓门口的料【" + LineConnect.DoorPosInfo.ToStr() + "】");
// bool result = StartInStoreMove(new InOutParam(LineConnect.DoorPosInfo));
// //bool result = StartOutStoreMove(new InOutParam("", currInOutFixture.PosId, currInOutFixture.plateH, currInOutFixture.plateW));
// if (!result)
// {
// LogInfo(" 执行料仓门口的料【" + LineConnect.DoorPosInfo.ToStr() + "】失败");
// }
// else
// {
// LogInfo(" 执行料仓门口的料【" + LineConnect.DoorPosInfo.ToStr() + "】成功,清理料仓门口数据");
// LineConnect.DoorPosInfo = null;
// }
// }
// }
//}
//catch (Exception ex)
//{
// LogUtil.error(Name+ "处理出入库排队列表出错:" + ex.ToString());
//}
}
storeRunStatus = StoreRunStatus.Wait;
mainTimer.Enabled = false;
TimeSpan span = DateTime.Now - StartTime;
IsRun = false;
private DateTime checkAlarmTime = DateTime.Now;
public bool CheckAxisAlarm()
{
if (alarmType.Equals(StoreAlarmType.AxisAlarm) || alarmType.Equals(StoreAlarmType.AxisMoveError))
{
return true;
}
TimeSpan span = DateTime.Now - checkAlarmTime;
//1秒钟检测一次轴报警
lineConn.StopConnect();
IOManager.instance.CloseAllDO();
if (span.TotalSeconds < 1)
{
return false;
LogInfo(",停止运行,总运行时间:" + span.ToString());
}
checkAlarmTime = DateTime.Now;
bool isInAlarm = false;
foreach (ConfigMoveAxis axisInfo in moveAxisList)
public override void Alarm(StoreAlarmType alarmType, string alarmDetial, string alarmMsg, StoreMoveType storeMoveType)
{
short axis = axisInfo.GetAxisValue();
string deviceName = axisInfo.GetNameStr();
AxisAlarmInfo info = AxisAlarmCodeMap[deviceName];
int alarmIo = AxisManager.instance.GetAlarmStatus(deviceName, axis);
SaveAlarmInfo(alarmType, alarmDetial, alarmMsg, storeMoveType);
autoNext = false;
if (alarmIo == 1)
if (this.alarmType.Equals(alarmType) && alarmType != StoreAlarmType.SuddenStop && alarmType != StoreAlarmType.NoAirCheck)
{
WarnMsg = Name + " 运动轴" + axisInfo.Explain + "报警";
info.AlarmIoValue = alarmIo;
Alarm(StoreAlarmType.AxisAlarm, GetAlarmCodeByAxis(axisInfo).ToString(), WarnMsg, StoreMoveType.None);
isInAlarm = true;
return;
}
else
{
if (!info.AlarmIoValue.Equals(alarmIo))
LogUtil.error(Name + " 报警,报警类型:" + alarmType);
this.alarmType = alarmType;
if (alarmType.Equals(StoreAlarmType.AxisAlarm) | alarmType.Equals(StoreAlarmType.AxisMoveError))
{
LogUtil.error(Name + " 运动轴 " + axisInfo.Explain + ",报警已解除!");
info.AlarmIoValue = alarmIo;
LogUtil.error(Name + "轴报警,关闭刹车,停止运动,关闭轴,打开报警灯");
StopMove();
}
else if (alarmType == StoreAlarmType.SuddenStop)
{
isInSuddenDown = true;
LogUtil.error(Name + "收到急停信号,关闭刹车,停止运动,关闭轴,打开报警灯 ");
StopMove();
storeStatus = StoreStatus.SuddenStop;
}
AxisAlarmCodeMap[deviceName] = info;
else if (alarmType.Equals(StoreAlarmType.NoAirCheck))
{
isNoAirCheck = true;
LogUtil.error(Name + " 未检测到气压信号 ,打开刹车,停止运动,关闭轴,打开报警灯 ");
StopMove();
storeStatus = StoreStatus.SuddenStop;
}
//判断报警状态
return isInAlarm;
}
public override void StopMove()
......@@ -1010,6 +946,18 @@ namespace OnlineStore.DeviceLibrary
}
return true;
}
public string GetMoveStr()
{
string msg = "";
msg += "状态: " + storeRunStatus + "\t " + " " + storeStatus + "\n";
msg += "alarm: " + alarmType + "\n";
msg += "Move:" + MoveInfo.MoveType + " " + MoveInfo.MoveStep + "\n";
foreach(WorkStation shelf in ShelfMap.Values)
{
msg += shelf.Name + ": " + shelf.CurrShelf.ToStr()+"\r\n";
}
return msg;
}
#region 入库命令处理
......
......@@ -24,7 +24,6 @@ namespace OnlineStore.DeviceLibrary
#region 入库参数
private int CurrInOutCount = 0;
private int CurrInOutACount = 0;
private bool LoadParamPosition(InOutParam param)
{
......@@ -307,30 +306,29 @@ namespace OnlineStore.DeviceLibrary
private void SI_14_InoutToP2()
{
ConfigMoveAxis updown = Config.UpDown_Axis;
if (!AxisManager.instance.isInPosition(updown.DeviceName, updown.GetAxisValue(), MoveInfo.MoveParam.MoveP.UpDown_P1, updown.CanErrorCountMax, true))
LineMoveP movep = MoveInfo.MoveParam.MoveP;
if (!AxisManager.instance.isInPosition(updown.DeviceName, updown.GetAxisValue(), movep.UpDown_P1, updown.CanErrorCountMax, true))
{
MoveInfo.NextMoveStep(MoveStep.SI_13_ComToP3);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(500));
InStoreLog(" 升降轴不在待机点,重新运动 升降轴到P1 [" + MoveInfo.MoveParam.MoveP.UpDown_P1 + "] ");
ACAxisMove(Config.UpDown_Axis, MoveInfo.MoveParam.MoveP.UpDown_P1, Config.UpDownAxis_P1_Speed);
InStoreLog(" 升降轴不在待机点,重新运动 升降轴到P1 [" + movep.UpDown_P1 + "] ");
ACAxisMove(Config.UpDown_Axis, movep.UpDown_P1, Config.UpDownAxis_P1_Speed);
return;
}
ConfigMoveAxis middle = Config.Middle_Axis;
if (!AxisManager.instance.isInPosition(middle.DeviceName, middle.GetAxisValue(), MoveInfo.MoveParam.MoveP.Middle_P1, middle.CanErrorCountMax, true))
if (!AxisManager.instance.isInPosition(middle.DeviceName, middle.GetAxisValue(), movep.Middle_P1, middle.CanErrorCountMax, true))
{
MoveInfo.NextMoveStep(MoveStep.SI_13_ComToP3);
MoveInfo.WaitList.Add(WaitResultInfo.WaitTime(500));
InStoreLog(" 旋转轴不在待机点,重新运动 旋转轴到P1 [" + MoveInfo.MoveParam.MoveP.Middle_P1 + "]");
ACAxisMove(Config.Middle_Axis, MoveInfo.MoveParam.MoveP.Middle_P1, Config.MiddleAxis_P1_Speed);
InStoreLog(" 旋转轴不在待机点,重新运动 旋转轴到P1 [" + movep.Middle_P1 + "]");
ACAxisMove(Config.Middle_Axis, movep.Middle_P1, Config.MiddleAxis_P1_Speed);
return;
}
//判断仓门是否打开
MoveInfo.NextMoveStep(MoveStep.SI_14_InoutToP2);
InStoreLog(" 叉子进入入料口,进出轴至P2(进料口取料点) ");
ACAxisMove(Config.InOut_Axis, MoveInfo.MoveParam.MoveP.InOut_P2, Config.InOutAxis_P2_Speed);
InStoreLog(" 叉子进入入料口,进出轴至P2(进料口取料点) "+ movep.InOut_P2);
ACAxisMove(Config.InOut_Axis, movep.InOut_P2, Config.InOutAxis_P2_Speed);
}
protected override void InStoreProcess()
{
......@@ -389,14 +387,14 @@ namespace OnlineStore.DeviceLibrary
else if (MoveInfo.IsStep(MoveStep.SI_14_InoutToP2))
{
MoveInfo.NextMoveStep(MoveStep.SI_15_GetReel);
InStoreLog(" 拿物品,压紧轴至P2(压紧点))[" + moveP.ComPress_P2 + "] 升降轴至P2[" + moveP.UpDown_P2 + "]");
InStoreLog(" 拿物品,压紧轴至P2[" + moveP.ComPress_P2 + "] 升降轴至P2[" + moveP.UpDown_P2 + "]");
ComMoveToPosition(moveP.ComPress_P2, Config.CompAxis_P2_Speed);
ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P2, Config.UpDownAxis_P2_Speed);
}
else if (MoveInfo.IsStep(MoveStep.SI_15_GetReel))
{
MoveInfo.NextMoveStep(MoveStep.SI_16_InoutBack);
InStoreLog("进出轴至P1(待机点)[" + moveP.InOut_P1 + "] ");
InStoreLog("进出轴至P1[" + moveP.InOut_P1 + "] ");
ACAxisMove(Config.InOut_Axis, moveP.InOut_P1, Config.InOutAxis_P1_Speed);
}
else if (MoveInfo.IsStep(MoveStep.SI_16_InoutBack))
......@@ -456,7 +454,7 @@ namespace OnlineStore.DeviceLibrary
MoveInfo.NextMoveStep(MoveStep.SI_23_PutReel);
InStoreLog(" 放下物品,升降轴至P4 [" + moveP.UpDown_P4 + "] ,压紧轴至P3(压紧前点) [" + moveP.ComPress_P3 + "]");
InStoreLog(" 放下物品,升降轴至P4 [" + moveP.UpDown_P4 + "] ,压紧轴至P3[" + moveP.ComPress_P3 + "]");
ComMoveToPosition(moveP.ComPress_P3, Config.CompAxis_P3_Speed);
ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P4, Config.UpDownAxis_P4_Speed);
......@@ -464,7 +462,7 @@ namespace OnlineStore.DeviceLibrary
else if (MoveInfo.IsStep(MoveStep.SI_23_PutReel))
{
MoveInfo.NextMoveStep(MoveStep.SI_24_InoutBack);
InStoreLog(" 进出轴动作至P1(待机点)[" + moveP.InOut_P1 + "],调用SheflFinish ");
InStoreLog(" 进出轴动作至P1[" + moveP.InOut_P1 + "],调用SheflFinish ");
HttpServer.ShelfFinish(CurrTray.realRFID, CurrTray.barcode, CurrTray.shelfP.ToString() );
......@@ -516,7 +514,7 @@ namespace OnlineStore.DeviceLibrary
else if (MoveInfo.IsStep(MoveStep.SI_32_InoutToP4))
{
MoveInfo.NextMoveStep(MoveStep.SI_33_PutReel);
InStoreLog(" 放下物品,升降轴至P6 [" + moveP.UpDown_P6 + "] ,压紧轴至P3(压紧前点) [" + moveP.ComPress_P3 + "]");
InStoreLog(" 放下物品,升降轴至P6 [" + moveP.UpDown_P6 + "] ,压紧轴至P3 [" + moveP.ComPress_P3 + "]");
ComMoveToPosition(moveP.ComPress_P3, Config.CompAxis_P3_Speed);
ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P6, Config.UpDownAxis_P6_Speed);
......@@ -524,13 +522,13 @@ namespace OnlineStore.DeviceLibrary
else if (MoveInfo.IsStep(MoveStep.SI_33_PutReel))
{
MoveInfo.NextMoveStep(MoveStep.SI_34_InoutToP1);
InStoreLog(" 进出轴动作至P1(待机点)[" + moveP.InOut_P1 + "] ");
InStoreLog(" 进出轴动作至P1[" + moveP.InOut_P1 + "] ");
ACAxisMove(Config.InOut_Axis, moveP.InOut_P1, Config.InOutAxis_P1_Speed);
}
else if (MoveInfo.IsStep(MoveStep.SI_34_InoutToP1))
{
MoveInfo.NextMoveStep(MoveStep.SI_35_GoBack);
InStoreLog(" 返回待机点,轴2/轴1/轴4动作至P1(待机点))");
InStoreLog(" 返回待机点,轴2/轴1/轴4动作至P1)");
ComMoveToPosition(moveP.ComPress_P1, Config.CompAxis_P1_Speed);
ACAxisMove(Config.Middle_Axis, moveP.Middle_P1, Config.MiddleAxis_P1_Speed);
ACAxisMove(Config.UpDown_Axis, moveP.UpDown_P1, Config.UpDownAxis_P1_Speed);
......@@ -561,13 +559,12 @@ namespace OnlineStore.DeviceLibrary
#endregion
private string autoInoutCode = "AUTOINOUT";
private string autoCode = "AUTOCODE";
private void InOutEndProcess(StoreMoveType storeMoveType)
{
try
{
CurrInOutCount++;
CurrInOutACount++;
//是否自动进入出库状态
if (!autoNext)
{
......@@ -593,7 +590,7 @@ namespace OnlineStore.DeviceLibrary
}
autoPositionIndex = newIndex;
string posid = PositionNumList[autoPositionIndex];
InOutPosInfo inoutinfo = new InOutPosInfo(autoInoutCode, posid);
InOutPosInfo inoutinfo = new InOutPosInfo(autoCode, posid);
LogInfo("自动进入下一个入库:posid=" + posid);
autoMsg = "自动入库:" + posid;
......
......@@ -72,24 +72,13 @@ namespace OnlineStore.DeviceLibrary
string moveEquipConfig = ConfigAppSettings.GetValue(Setting_Init.Box_ConfigPath);
//for (int i = 1; i <= count; i++)
//{
// string nameStr = i.ToString().PadLeft(1, '0');
// string config = appPath + moveEquipConfig.Replace(".csv", "_" + nameStr + ".csv");
// string storeIdConfig = Setting_Init.Store_CID + "_" + i;
// string boxCid = ConfigAppSettings.GetValue(storeIdConfig);
// BoxConfig boxConfig = CSVConfigReader.LoadBoxConfig(i, boxCid, "BOX", config);
// boxConfig.SetIO(0);
// boxConfig.SetIO(i);
// BoxList.Add(i, boxConfig);
// allConfigMap.Add(i, boxConfig);
//}
string positionConfigFile = appPath + ConfigAppSettings.GetValue(Setting_Init.Store_Position_Config);
CSVPositionReader<ShelfPosition>.AddCSVFile(positionConfigFile);
LogUtil.info("加载料仓完成!");
Equip = new EquipBean(Config );
Equip = new EquipBean(Config);
}
}
catch (Exception ex)
......
......@@ -20,12 +20,12 @@ namespace OnlineStore.DeviceLibrary
private string rfidIp = "";
public ShelfInfo CurrShelf = new ShelfInfo();
public ShelfTaskInfo MyTaskInfo = null;
public WorkStation(string name,string agvName,string rfidip)
{
this.rfidIp = rfidip;
MoveInfo = new StoreMoveInfo(1);
this.Name = "工位" + name;
this.Name = "" + name;
this.AgvName = agvName;
DI_FrontCheck += name;
DI_InCheck += name;
......@@ -54,13 +54,13 @@ namespace OnlineStore.DeviceLibrary
}
internal bool CheckNeedLeave(bool IsReset = true )
{
MyTaskInfo = HttpServer.ShelfFinish(CurrShelf.RealShelf);
CurrShelf.TaskInfo = HttpServer.ShelfFinish(CurrShelf.RealShelf);
string log = "";
//判断的当前料架是否无任务
if (MyTaskInfo.IsValid())
if (CurrShelf.TaskInfo.IsValid())
{
if (MyTaskInfo.bigEmpty <= 0 && MyTaskInfo.smallEmpty <= 0)
if (CurrShelf.TaskInfo.bigEmpty <= 0 && CurrShelf.TaskInfo.smallEmpty <= 0)
{
CurrShelf.IsNeedLeave = true;
LogUtil.info(Name + " " + CurrShelf.ToStr() + " 没有空位需要离开 ");
......@@ -208,6 +208,46 @@ namespace OnlineStore.DeviceLibrary
}
}
}
internal bool IsRightShelf(TrayInfo CurrTray, out string ShelfPosId)
{
ShelfPosId = "";
if (IsReady())
{
if (CurrShelf.RealShelf.Equals(CurrTray.realRFID))
{
ShelfPosId = Name + CurrTray.shelfP;
return true ;
}
else if (String.IsNullOrEmpty(CurrTray.realRFID))
{
if ((!CurrShelf.XNShelf.Equals("")) && CurrShelf.XNShelf.Equals(CurrTray.rfid))
{
CurrTray.realRFID = CurrShelf.RealShelf;
ShelfPosId = Name + CurrTray.shelfP;
return true ;
}
if (!String.IsNullOrEmpty(CurrTray.usedRfidList))
{
string[] array = CurrTray.usedRfidList.Split(',');
//若料架已使用过,直接返回false
if (array.Contains(CurrShelf.XNShelf))
{
return false ;
}
}
if (CurrShelf.XNShelf.Equals(""))
{
CurrTray.realRFID = CurrShelf.RealShelf;
ShelfPosId = Name + CurrTray.shelfP;
return true;
}
}
}
return false;
}
#region AGV
......@@ -543,6 +583,7 @@ namespace OnlineStore.DeviceLibrary
}
public class ShelfInfo
{
public ShelfTaskInfo TaskInfo = null;
public string RealShelf = "";
public string XNShelf = "";
public bool IsNeedLeave = false;
......@@ -557,7 +598,20 @@ namespace OnlineStore.DeviceLibrary
}
public string ToStr()
{
return "料架["+RealShelf+"]["+XNShelf+"]";
string result = "料架[" + RealShelf + "][" + XNShelf + "]";
if (TaskInfo != null && TaskInfo.IsValid())
{
result += "[空位:大料=" + TaskInfo.bigEmpty + ",小料=" + TaskInfo.smallEmpty + "]";
}
if (IsNeedLeave)
{
result += "[需离开]";
}
else if (IsBusy)
{
result += "[放料中]";
}
return result;
}
}
}
......@@ -131,8 +131,7 @@ namespace OnlineStore.DeviceLibrary
if (cmd.Equals(cmd_startIn))
{
LogUtil.info("[" + CID + "]收到流水线入库消息:" + message);
InOutPosInfo inout = new InOutPosInfo(reviceInfo.WareCode, "", reviceInfo.PlateH, reviceInfo.PlateW, reviceInfo.IsNg, reviceInfo.PosId);
inout.rfid = reviceInfo.rfid;
InOutPosInfo inout = new InOutPosInfo(reviceInfo.WareCode, "", reviceInfo.PlateH, reviceInfo.PlateW, reviceInfo.IsNg, reviceInfo.PosId,reviceInfo.rfid);
string logName = "收到流水线命令【 " + inout.ToStr() + "】:";
if (DoorPosInfo != null)
......
......@@ -10,19 +10,12 @@ namespace OnlineStore.DeviceLibrary
{
public class HttpServer
{
// private Asa.File.Log log = DoubleLine.Common.log;
public delegate void StatusEmptyEvent(string[] s);
public static event StatusEmptyEvent StatusEmpty;
public HttpServer()
{
}
private static string Addr_updateDeviceAlarmMsg = "/updateDeviceAlarmMsg";
/// <summary>
/// 异常看板
/// </summary>
/// <param name="msgList"></param>
/// <returns></returns>
public static string updateDeviceAlarmMsg(List<AlarmMsg> msgList)
{
string msg = "";
......@@ -85,14 +78,10 @@ namespace OnlineStore.DeviceLibrary
string url = httpAddr + api + "?barcode=" + barcode + "&rfid=" + rfid + "&rfidLoc=" + rfidLoc + "&robotIndex=" + robotIndex;
LogUtil.debug("http :URL:" + url);
// var client = new RestClient(url) { Timeout = -1 };
// var request = new RestRequest(Method.GET);
// IRestResponse response = client.Execute(request);
// string json = response.Content;
string json = HttpHelper.Post(url, "", 10000);
if (barcode != "")
{
LogUtil.info("http :URL:" + url + " :Response:" + json +" 耗时["+FormUtil.GetSpanStr(DateTime.Now-startTime)+"]");
LogUtil.info("http :URL:" + url + " :Response:" + json + " 耗时[" + FormUtil.GetSpanStr(DateTime.Now - startTime) + "]");
}
else
{
......@@ -106,7 +95,7 @@ namespace OnlineStore.DeviceLibrary
if (value.ToString() != "0")
{
if (obj.TryGetValue("msg", out value))
LogUtil.error ("http" + api + ": " + value.ToString());
LogUtil.error("http" + api + ": " + value.ToString());
return task;
}
if (!obj.TryGetValue("data", out value)) return task;
......@@ -121,8 +110,6 @@ namespace OnlineStore.DeviceLibrary
int.TryParse(value.ToString(), out task.bigEmpty);
if (dict.TryGetValue("smallEmpty", out value))
int.TryParse(value.ToString(), out task.smallEmpty);
if (dict.TryGetValue("packageEmpty", out value))
int.TryParse(value.ToString(), out task.packageEmpty);
if (dict.TryGetValue("usedRfidList", out value))
task.usedRfidList = value.ToString();
......@@ -142,13 +129,7 @@ namespace OnlineStore.DeviceLibrary
try
{
string url = httpAddr + api + "?barcode=" + barcode + "&rfid=" + rfid + "&rfidLoc=" + rfidLoc + "&robotIndex=" + robotIndex;
// LogUtil.info("http :URL:" + url);
string logName = "http :URL:" + url + " , ";
//var client = new RestClient(url) { Timeout = -1 };
//var request = new RestRequest(Method.GET);
//IRestResponse response = client.Execute(request);
//string json = response.Content;
string json = HttpHelper.Post(url, "", 10000);
if (string.IsNullOrWhiteSpace(json)) return task;
......@@ -172,24 +153,21 @@ namespace OnlineStore.DeviceLibrary
int.TryParse(value.ToString(), out task.bigTask);
if (dict.TryGetValue("smallTask", out value))
int.TryParse(value.ToString(), out task.smallTask);
if (dict.TryGetValue("packageTask", out value))
int.TryParse(value.ToString(), out task.packageTask);
StatusEmpty?.Invoke(new string[] { task.smallTask.ToString(), task.bigTask.ToString(), task.packageTask.ToString() });
if (task.bigTask > 0 || task.smallTask > 0 || task.packageTask > 0)
if (task.bigTask > 0 || task.smallTask > 0)
{
LogUtil.debug(logName + " Response:" + json);
}
else
{
LogUtil.debug (logName + " Response:" + json);
LogUtil.debug(logName + " Response:" + json);
}
}
catch (Exception ex)
{
LogUtil.error("http error : " + ex.ToString());
}
// task.bigTask = 1;
// task.smallTask = 1;
return task;
}
/// <summary>
......@@ -209,7 +187,7 @@ namespace OnlineStore.DeviceLibrary
string logName = "http :URL:" + url + " , ";
DateTime startTime = DateTime.Now;
string json = HttpHelper.Post(url, "", 10000);
LogUtil.debug(logName+",Response:" + json+",耗时【"+FormUtil.GetSpanStr(DateTime.Now-startTime)+"】");
LogUtil.debug(logName + ",Response:" + json + ",耗时【" + FormUtil.GetSpanStr(DateTime.Now - startTime) + "】");
if (string.IsNullOrWhiteSpace(json))
{
return tray;
......@@ -222,7 +200,7 @@ namespace OnlineStore.DeviceLibrary
if (obj.TryGetValue("msg", out value))
{
msg = value.ToString();
LogUtil.error(logName + ": " + value.ToString(),500+ robot);
LogUtil.error(logName + ": " + value.ToString(), 500 + robot);
}
return tray;
}
......@@ -264,101 +242,6 @@ namespace OnlineStore.DeviceLibrary
return tray;
}
/// <summary>
/// 包装料机器人获取取出和放置位置
/// </summary>
public static ResultBean GetPackInfo(string bigRfid, string packageRfid)
{
string api = "getPackageLocation";
//try
//{
// string url = httpAddr + api + "?bigRfid=" + bigRfid + "&packageRfid=" + packageRfid;
// LogUtil.debug("http :URL:" + url);
// var client = new RestClient(url) { Timeout = -1 };
// var request = new RestRequest(Method.GET);
// IRestResponse response = client.Execute(request);
// string json = response.Content;
// LogUtil.debug("http :Response:" + json);
// if (string.IsNullOrWhiteSpace(json)) return null;
// JavaScriptSerializer serializer = new JavaScriptSerializer();
// ResultBean resultBean = serializer.Deserialize<ResultBean>(json);
// return resultBean;
//}
//catch (Exception ex)
//{
// LogUtil.error("http error : " + ex.ToString());
//}
return null;
}
public class ResultBean
{
public ResultBean()
{
}
public int code;
public string msg;
public PackageRobotTaskBean data;
}
public class PackageRobotTaskBean
{
public PackageRobotTaskBean()
{
}
public string barcode = "";
public int emptyInBig = 0;
public int reelInPackage = 0;
public int packageTask = 0;
public string packageRfid = "";
public int packageLoc = 0;
public int bigLoc = 0;
public string bigRfid = "";
public string realBigRfid = "";
}
/// <summary>
/// 包料料机器人放置包装料完成
/// </summary>
/// <param name="barcode"></param>
/// <param name="packageRfid"></param>
/// <param name="packageLoc"></param>
/// <param name="bigRfid"></param>
/// <param name="bigLoc"></param>
public static void PackFinish(string barcode, string packageRfid, int packageLoc, string bigRfid, int bigLoc)
{
string api = "putPackageFinished";
//try
//{
// string url = httpAddr + api + "?barcode=" + barcode + "&packageRfid=" + packageRfid + "&packageLoc=" + packageLoc + "&bigRfid=" + bigRfid + "&bigLoc=" + bigLoc;
// LogUtil.info("http :URL:" + url);
// var client = new RestClient(url) { Timeout = -1 };
// var request = new RestRequest(Method.GET);
// IRestResponse response = client.Execute(request);
// string json = response.Content;
// LogUtil.info("http :Response:" + json);
// if (string.IsNullOrWhiteSpace(json)) return;
// JavaScriptSerializer serializer = new JavaScriptSerializer();
// Dictionary<string, object> obj = (Dictionary<string, object>)serializer.DeserializeObject(json);
// if (!obj.TryGetValue("code", out object value)) return;
// if (value.ToString() != "0")
// {
// if (obj.TryGetValue("msg", out value))
// LogUtil.info("http" + api + ": " + value.ToString());
// }
//}
//catch (Exception ex)
//{
// LogUtil.error("http error : " + ex.ToString());
//}
}
}
public class TrayInfo
......@@ -372,7 +255,7 @@ namespace OnlineStore.DeviceLibrary
public string usedRfidList = "";
public string ToStr()
{
return "[" + robotNum + "] [" + barcode + "] [" + getP + "] [" + shelfP + "] [" + rfid + "] [" + realRFID + "] ["+ usedRfidList + "] ["+updateTime.ToLongTimeString()+"]";
return "[" + robotNum + "] [" + barcode + "] [" + getP + "] [" + shelfP + "] [" + rfid + "] [" + realRFID + "] [" + usedRfidList + "] [" + updateTime.ToLongTimeString() + "]";
}
public DateTime updateTime = DateTime.Now;
......@@ -383,11 +266,11 @@ namespace OnlineStore.DeviceLibrary
public string rfid = "";
public int bigEmpty = -1;
public int smallEmpty = -1;
public int packageEmpty = -1;
//public int packageEmpty = -1;
public string usedRfidList = "";
public bool IsValid()
{
if (bigEmpty != -1 && smallEmpty != -1 && packageEmpty != -1)
if (bigEmpty != -1 && smallEmpty != -1)
{
return true;
}
......@@ -396,21 +279,21 @@ namespace OnlineStore.DeviceLibrary
public string ToStr()
{
return " " + rfid + "剩余位置: 小料=" + smallEmpty + ",大料=" + bigEmpty + ",包装料=" + packageEmpty + ",已使用料架=" + usedRfidList + " ";
return " " + rfid + "剩余位置: 小料=" + smallEmpty + ",大料=" + bigEmpty + ",已使用料架=" + usedRfidList + " ";
}
}
public class AllTaskInfo
{
public int smallTask = -1;
public int bigTask = -1;
public int packageTask = -1;
//public int packageTask = -1;
public string ToStr()
{
return " 剩余任务: 小料=" + smallTask + ",大料=" + bigTask + ",包装料=" + packageTask + " ";
return " 剩余任务: 小料=" + smallTask + ",大料=" + bigTask + " ";
}
public bool IsValid()
{
if (smallTask != -1 && bigTask != -1 && packageTask != -1)
if (smallTask != -1 && bigTask != -1)
{
return true;
}
......
......@@ -348,10 +348,7 @@ namespace OnlineStore.DeviceLibrary
{
inout = "_入库:"+MoveInfo.MoveParam.PosInfo.ToStr();
}
//else if (MoveInfo.MoveType.Equals(StoreMoveType.OutStore) && MoveInfo.MoveParam != null && MoveInfo.MoveParam.PosInfo != null)
//{
// inout = "_出库:" + MoveInfo.MoveParam.PosInfo.ToStr();
//}
else
{
inout = " " + MoveInfo.MoveType + "_" + MoveInfo.MoveStep;
......@@ -370,14 +367,6 @@ namespace OnlineStore.DeviceLibrary
}
public string GetMoveStr()
{
string msg = "";
msg += "状态: " + storeRunStatus + "\t "+ " " + storeStatus + "\n";
msg += "alarm: " + alarmType + "\n";
msg += "Move:" + MoveInfo.MoveType + " " + MoveInfo.MoveStep + "\n";
return msg;
}
public void IOMove(string IoType, IO_VALUE value)
{
......
......@@ -74,17 +74,13 @@ namespace OnlineStore.DeviceLibrary
}
public class InOutPosInfo
{
public InOutPosInfo(string barcode, string shelfPosId, int platew =0, int plateh =0,bool IsNg=false,string boxPosId="", bool urgentReel = false , bool cutReel = false, bool smallReel = false, string rfid = "", int rfidLoc = 0)
public InOutPosInfo(string barcode, string shelfPosId, int platew =0, int plateh =0,bool IsNg=false,string boxPosId="", string rfid = "" )
{
this.barcode = barcode;
this.ShelfPosId = shelfPosId;
this.PlateW = platew;
this.PlateH = plateh;
this.urgentReel = urgentReel;
this.cutReel = cutReel;
this.smallReel = smallReel;
this.rfid = rfid;
this.rfidLoc = rfidLoc;
this.IsNg = IsNg;
this.BoxPosId = boxPosId;
}
......@@ -111,37 +107,16 @@ namespace OnlineStore.DeviceLibrary
public int PlateH { get; set; }
/// <summary>
/// urgentReel: true 表示紧急料,需要出到料串上
/// </summary>
public bool urgentReel { get; set; }
/// <summary>
/// cutReel: true 表示分盘料,需要出到料串上
/// </summary>
public bool cutReel { get; set; }
/// <summary>
/// smallReel: true 小料(7x8),放置到小料架上
/// </summary>
public bool smallReel { get; set; }
/// <summary>
/// rfid: 分配的料架RFID
/// </summary>
public string rfid { get; set; }
/// <summary>
/// rfidLoc: 料架的架位,值为 - 1时,可以自由分配皮带线,
/// 小料时,架位为1 - 46优先走1 / 2号皮带线,47 - 92优先走3 / 4号皮带线,
/// 70,71,72时只能分配到3 / 4号皮带线;
/// 大料时,架位1 - 6优先走1 / 2号皮带线, 7 - 12优先走3/ 4号皮带线
/// </summary>
public int rfidLoc { get; set; }
/// <summary>
/// 是否是去NG箱的料
/// </summary>
public bool IsNg { get; set; }
public string ToStr()
{
return " [" + barcode + "] [" + ShelfPosId + "] [" + PlateW + "x" + PlateH + "],boxPos["+BoxPosId+"],urgentReel [" + urgentReel
+ "],cutReel [" + cutReel + "],smallReel [" + smallReel + "],rfid [" + rfid + "],rfidLoc [" + rfidLoc + "]";
return " [" + barcode + "] [" + ShelfPosId + "] [" + PlateW + "x" + PlateH + "],boxPos[" + BoxPosId + "],rfid [" + rfid + "]";
}
}
}
......@@ -68,7 +68,7 @@
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(325, 77);
this.label1.Location = new System.Drawing.Point(317, 77);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(92, 17);
this.label1.TabIndex = 0;
......@@ -77,7 +77,7 @@
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(325, 134);
this.label2.Location = new System.Drawing.Point(317, 134);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(92, 17);
this.label2.TabIndex = 1;
......@@ -86,7 +86,7 @@
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(325, 192);
this.label3.Location = new System.Drawing.Point(317, 192);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(92, 17);
this.label3.TabIndex = 2;
......@@ -97,7 +97,7 @@
this.btnMiddleMove.BackColor = System.Drawing.SystemColors.Control;
this.btnMiddleMove.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnMiddleMove.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnMiddleMove.Location = new System.Drawing.Point(503, 63);
this.btnMiddleMove.Location = new System.Drawing.Point(495, 63);
this.btnMiddleMove.Name = "btnMiddleMove";
this.btnMiddleMove.Size = new System.Drawing.Size(140, 45);
this.btnMiddleMove.TabIndex = 4;
......@@ -110,7 +110,7 @@
//
this.txtMiddleSpeed.Enabled = false;
this.txtMiddleSpeed.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtMiddleSpeed.Location = new System.Drawing.Point(419, 72);
this.txtMiddleSpeed.Location = new System.Drawing.Point(411, 72);
this.txtMiddleSpeed.MaxLength = 10;
this.txtMiddleSpeed.Name = "txtMiddleSpeed";
this.txtMiddleSpeed.Size = new System.Drawing.Size(81, 26);
......@@ -120,7 +120,7 @@
//
this.txtUpDownSpeed.Enabled = false;
this.txtUpDownSpeed.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtUpDownSpeed.Location = new System.Drawing.Point(419, 129);
this.txtUpDownSpeed.Location = new System.Drawing.Point(411, 129);
this.txtUpDownSpeed.MaxLength = 10;
this.txtUpDownSpeed.Name = "txtUpDownSpeed";
this.txtUpDownSpeed.Size = new System.Drawing.Size(81, 26);
......@@ -130,7 +130,7 @@
//
this.txtInOutSpeed.Enabled = false;
this.txtInOutSpeed.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtInOutSpeed.Location = new System.Drawing.Point(419, 187);
this.txtInOutSpeed.Location = new System.Drawing.Point(411, 187);
this.txtInOutSpeed.MaxLength = 10;
this.txtInOutSpeed.Name = "txtInOutSpeed";
this.txtInOutSpeed.Size = new System.Drawing.Size(81, 26);
......@@ -141,7 +141,7 @@
this.btnUpDownMove.BackColor = System.Drawing.SystemColors.Control;
this.btnUpDownMove.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnUpDownMove.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnUpDownMove.Location = new System.Drawing.Point(503, 120);
this.btnUpDownMove.Location = new System.Drawing.Point(495, 120);
this.btnUpDownMove.Name = "btnUpDownMove";
this.btnUpDownMove.Size = new System.Drawing.Size(140, 45);
this.btnUpDownMove.TabIndex = 9;
......@@ -155,7 +155,7 @@
this.btnInOutMove.BackColor = System.Drawing.SystemColors.Control;
this.btnInOutMove.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnInOutMove.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnInOutMove.Location = new System.Drawing.Point(503, 178);
this.btnInOutMove.Location = new System.Drawing.Point(495, 178);
this.btnInOutMove.Name = "btnInOutMove";
this.btnInOutMove.Size = new System.Drawing.Size(140, 45);
this.btnInOutMove.TabIndex = 10;
......@@ -169,7 +169,7 @@
this.btnInOutMovej.BackColor = System.Drawing.SystemColors.Control;
this.btnInOutMovej.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnInOutMovej.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnInOutMovej.Location = new System.Drawing.Point(646, 178);
this.btnInOutMovej.Location = new System.Drawing.Point(638, 178);
this.btnInOutMovej.Name = "btnInOutMovej";
this.btnInOutMovej.Size = new System.Drawing.Size(140, 45);
this.btnInOutMovej.TabIndex = 14;
......@@ -183,7 +183,7 @@
this.btnUpDownMovej.BackColor = System.Drawing.SystemColors.Control;
this.btnUpDownMovej.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnUpDownMovej.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnUpDownMovej.Location = new System.Drawing.Point(646, 120);
this.btnUpDownMovej.Location = new System.Drawing.Point(638, 120);
this.btnUpDownMovej.Name = "btnUpDownMovej";
this.btnUpDownMovej.Size = new System.Drawing.Size(140, 45);
this.btnUpDownMovej.TabIndex = 13;
......@@ -197,7 +197,7 @@
this.btnMiddleMovej.BackColor = System.Drawing.SystemColors.Control;
this.btnMiddleMovej.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnMiddleMovej.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnMiddleMovej.Location = new System.Drawing.Point(646, 63);
this.btnMiddleMovej.Location = new System.Drawing.Point(638, 63);
this.btnMiddleMovej.Name = "btnMiddleMovej";
this.btnMiddleMovej.Size = new System.Drawing.Size(140, 45);
this.btnMiddleMovej.TabIndex = 12;
......@@ -209,7 +209,7 @@
// button1
//
this.button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.button1.Location = new System.Drawing.Point(805, 358);
this.button1.Location = new System.Drawing.Point(797, 358);
this.button1.Name = "button1";
this.button1.Size = new System.Drawing.Size(126, 37);
this.button1.TabIndex = 16;
......@@ -221,7 +221,7 @@
//
this.txtInOutPosition.Enabled = false;
this.txtInOutPosition.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtInOutPosition.Location = new System.Drawing.Point(790, 187);
this.txtInOutPosition.Location = new System.Drawing.Point(782, 187);
this.txtInOutPosition.MaxLength = 20;
this.txtInOutPosition.Name = "txtInOutPosition";
this.txtInOutPosition.Size = new System.Drawing.Size(108, 26);
......@@ -231,7 +231,7 @@
//
this.txtUpdownPosition.Enabled = false;
this.txtUpdownPosition.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtUpdownPosition.Location = new System.Drawing.Point(790, 129);
this.txtUpdownPosition.Location = new System.Drawing.Point(782, 129);
this.txtUpdownPosition.MaxLength = 20;
this.txtUpdownPosition.Name = "txtUpdownPosition";
this.txtUpdownPosition.Size = new System.Drawing.Size(108, 26);
......@@ -241,7 +241,7 @@
//
this.txtMiddlePosition.Enabled = false;
this.txtMiddlePosition.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtMiddlePosition.Location = new System.Drawing.Point(790, 72);
this.txtMiddlePosition.Location = new System.Drawing.Point(782, 72);
this.txtMiddlePosition.MaxLength = 20;
this.txtMiddlePosition.Name = "txtMiddlePosition";
this.txtMiddlePosition.Size = new System.Drawing.Size(108, 26);
......@@ -250,7 +250,7 @@
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(429, 29);
this.label5.Location = new System.Drawing.Point(421, 29);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(56, 17);
this.label5.TabIndex = 20;
......@@ -259,7 +259,7 @@
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(812, 29);
this.label6.Location = new System.Drawing.Point(804, 29);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(56, 17);
this.label6.TabIndex = 21;
......@@ -274,7 +274,7 @@
//
this.txtComPosition.Enabled = false;
this.txtComPosition.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtComPosition.Location = new System.Drawing.Point(790, 247);
this.txtComPosition.Location = new System.Drawing.Point(782, 247);
this.txtComPosition.MaxLength = 20;
this.txtComPosition.Name = "txtComPosition";
this.txtComPosition.Size = new System.Drawing.Size(108, 26);
......@@ -285,7 +285,7 @@
this.btnComMovej.BackColor = System.Drawing.SystemColors.Control;
this.btnComMovej.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnComMovej.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnComMovej.Location = new System.Drawing.Point(646, 238);
this.btnComMovej.Location = new System.Drawing.Point(638, 238);
this.btnComMovej.Name = "btnComMovej";
this.btnComMovej.Size = new System.Drawing.Size(140, 45);
this.btnComMovej.TabIndex = 25;
......@@ -299,7 +299,7 @@
this.btnComMove.BackColor = System.Drawing.SystemColors.Control;
this.btnComMove.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnComMove.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnComMove.Location = new System.Drawing.Point(503, 238);
this.btnComMove.Location = new System.Drawing.Point(495, 238);
this.btnComMove.Name = "btnComMove";
this.btnComMove.Size = new System.Drawing.Size(140, 45);
this.btnComMove.TabIndex = 24;
......@@ -312,7 +312,7 @@
//
this.txtComSpeed.Enabled = false;
this.txtComSpeed.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.txtComSpeed.Location = new System.Drawing.Point(419, 247);
this.txtComSpeed.Location = new System.Drawing.Point(411, 247);
this.txtComSpeed.MaxLength = 10;
this.txtComSpeed.Name = "txtComSpeed";
this.txtComSpeed.Size = new System.Drawing.Size(81, 26);
......@@ -321,7 +321,7 @@
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(325, 252);
this.label4.Location = new System.Drawing.Point(317, 252);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(92, 17);
this.label4.TabIndex = 22;
......@@ -330,7 +330,7 @@
// lblSpeed
//
this.lblSpeed.AutoSize = true;
this.lblSpeed.Location = new System.Drawing.Point(599, 378);
this.lblSpeed.Location = new System.Drawing.Point(591, 378);
this.lblSpeed.Name = "lblSpeed";
this.lblSpeed.Size = new System.Drawing.Size(142, 17);
this.lblSpeed.TabIndex = 30;
......@@ -339,7 +339,7 @@
// trackBar1
//
this.trackBar1.LargeChange = 2;
this.trackBar1.Location = new System.Drawing.Point(328, 326);
this.trackBar1.Location = new System.Drawing.Point(320, 326);
this.trackBar1.Minimum = 1;
this.trackBar1.Name = "trackBar1";
this.trackBar1.Size = new System.Drawing.Size(366, 45);
......@@ -350,7 +350,7 @@
// btnMCopy
//
this.btnMCopy.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnMCopy.Location = new System.Drawing.Point(901, 71);
this.btnMCopy.Location = new System.Drawing.Point(893, 71);
this.btnMCopy.Name = "btnMCopy";
this.btnMCopy.Size = new System.Drawing.Size(69, 28);
this.btnMCopy.TabIndex = 31;
......@@ -361,7 +361,7 @@
// btnUCopy
//
this.btnUCopy.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnUCopy.Location = new System.Drawing.Point(901, 128);
this.btnUCopy.Location = new System.Drawing.Point(893, 128);
this.btnUCopy.Name = "btnUCopy";
this.btnUCopy.Size = new System.Drawing.Size(69, 28);
this.btnUCopy.TabIndex = 32;
......@@ -372,7 +372,7 @@
// btnICopy
//
this.btnICopy.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnICopy.Location = new System.Drawing.Point(901, 186);
this.btnICopy.Location = new System.Drawing.Point(893, 186);
this.btnICopy.Name = "btnICopy";
this.btnICopy.Size = new System.Drawing.Size(69, 28);
this.btnICopy.TabIndex = 33;
......@@ -383,7 +383,7 @@
// btnCCopy
//
this.btnCCopy.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnCCopy.Location = new System.Drawing.Point(901, 246);
this.btnCCopy.Location = new System.Drawing.Point(893, 246);
this.btnCCopy.Name = "btnCCopy";
this.btnCCopy.Size = new System.Drawing.Size(69, 28);
this.btnCCopy.TabIndex = 34;
......@@ -405,7 +405,7 @@
//
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 17F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(994, 481);
this.ClientSize = new System.Drawing.Size(975, 481);
this.Controls.Add(this.picAxis);
this.Controls.Add(this.btnCCopy);
this.Controls.Add(this.btnICopy);
......
......@@ -144,9 +144,9 @@
this.panel2.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.panel2.Location = new System.Drawing.Point(0, 47);
this.panel2.Location = new System.Drawing.Point(1056, 20);
this.panel2.Name = "panel2";
this.panel2.Size = new System.Drawing.Size(1154, 106);
this.panel2.Size = new System.Drawing.Size(53, 42);
this.panel2.TabIndex = 273;
//
// tabControl1
......@@ -156,10 +156,10 @@
| System.Windows.Forms.AnchorStyles.Right)));
this.tabControl1.Controls.Add(this.tabPage2);
this.tabControl1.Controls.Add(this.tabPage3);
this.tabControl1.Location = new System.Drawing.Point(5, 50);
this.tabControl1.Location = new System.Drawing.Point(5, 47);
this.tabControl1.Name = "tabControl1";
this.tabControl1.SelectedIndex = 0;
this.tabControl1.Size = new System.Drawing.Size(1149, 627);
this.tabControl1.Size = new System.Drawing.Size(1109, 627);
this.tabControl1.TabIndex = 272;
//
// tabPage2
......@@ -172,7 +172,7 @@
this.tabPage2.Controls.Add(this.lblWarnMsg);
this.tabPage2.Location = new System.Drawing.Point(4, 29);
this.tabPage2.Name = "tabPage2";
this.tabPage2.Size = new System.Drawing.Size(1141, 594);
this.tabPage2.Size = new System.Drawing.Size(1140, 594);
this.tabPage2.TabIndex = 3;
this.tabPage2.Text = " 设备状态 ";
this.tabPage2.UseVisualStyleBackColor = true;
......@@ -185,7 +185,7 @@
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, 127);
this.logBox.Name = "logBox";
this.logBox.Size = new System.Drawing.Size(1132, 454);
this.logBox.Size = new System.Drawing.Size(1131, 448);
this.logBox.TabIndex = 278;
this.logBox.Text = "";
this.logBox.VisibleChanged += new System.EventHandler(this.logBox_VisibleChanged);
......@@ -195,7 +195,7 @@
this.lblMoveStr.AutoSize = true;
this.lblMoveStr.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblMoveStr.ForeColor = System.Drawing.Color.Black;
this.lblMoveStr.Location = new System.Drawing.Point(931, 13);
this.lblMoveStr.Location = new System.Drawing.Point(825, 13);
this.lblMoveStr.Name = "lblMoveStr";
this.lblMoveStr.Size = new System.Drawing.Size(56, 17);
this.lblMoveStr.TabIndex = 277;
......@@ -264,7 +264,7 @@
//
this.chbDebug.AutoSize = true;
this.chbDebug.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.chbDebug.Location = new System.Drawing.Point(750, 9);
this.chbDebug.Location = new System.Drawing.Point(682, 8);
this.chbDebug.Name = "chbDebug";
this.chbDebug.Size = new System.Drawing.Size(93, 25);
this.chbDebug.TabIndex = 271;
......@@ -278,7 +278,7 @@
this.lblWarnMsg.ForeColor = System.Drawing.Color.Red;
this.lblWarnMsg.Location = new System.Drawing.Point(9, 44);
this.lblWarnMsg.Name = "lblWarnMsg";
this.lblWarnMsg.Size = new System.Drawing.Size(909, 77);
this.lblWarnMsg.Size = new System.Drawing.Size(766, 77);
this.lblWarnMsg.TabIndex = 224;
this.lblWarnMsg.TextAlign = System.Drawing.ContentAlignment.MiddleCenter;
//
......@@ -292,16 +292,16 @@
this.tabPage3.Controls.Add(this.btnAxisOff);
this.tabPage3.Location = new System.Drawing.Point(4, 29);
this.tabPage3.Name = "tabPage3";
this.tabPage3.Size = new System.Drawing.Size(1141, 594);
this.tabPage3.Size = new System.Drawing.Size(1101, 594);
this.tabPage3.TabIndex = 2;
this.tabPage3.Text = " 库位调试 ";
this.tabPage3.UseVisualStyleBackColor = true;
//
// axisMoveControl1
//
this.axisMoveControl1.Location = new System.Drawing.Point(536, 5);
this.axisMoveControl1.Location = new System.Drawing.Point(532, 5);
this.axisMoveControl1.Name = "axisMoveControl1";
this.axisMoveControl1.Size = new System.Drawing.Size(577, 404);
this.axisMoveControl1.Size = new System.Drawing.Size(561, 404);
this.axisMoveControl1.TabIndex = 218;
//
// btnAxisP
......@@ -309,7 +309,7 @@
this.btnAxisP.BackColor = System.Drawing.Color.White;
this.btnAxisP.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnAxisP.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnAxisP.Location = new System.Drawing.Point(724, 429);
this.btnAxisP.Location = new System.Drawing.Point(685, 415);
this.btnAxisP.Name = "btnAxisP";
this.btnAxisP.Size = new System.Drawing.Size(132, 39);
this.btnAxisP.TabIndex = 8;
......@@ -362,7 +362,7 @@
this.groupInout.Controls.Add(this.btnUpDownP3);
this.groupInout.Controls.Add(this.btnUpDownP4);
this.groupInout.Enabled = false;
this.groupInout.Location = new System.Drawing.Point(12, 6);
this.groupInout.Location = new System.Drawing.Point(8, 6);
this.groupInout.Name = "groupInout";
this.groupInout.Size = new System.Drawing.Size(516, 573);
this.groupInout.TabIndex = 100;
......@@ -1025,7 +1025,7 @@
this.btnUpdown.BackColor = System.Drawing.Color.White;
this.btnUpdown.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnUpdown.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnUpdown.Location = new System.Drawing.Point(724, 474);
this.btnUpdown.Location = new System.Drawing.Point(685, 460);
this.btnUpdown.Name = "btnUpdown";
this.btnUpdown.Size = new System.Drawing.Size(132, 39);
this.btnUpdown.TabIndex = 14;
......@@ -1038,7 +1038,7 @@
this.btnAxisOn.BackColor = System.Drawing.Color.White;
this.btnAxisOn.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnAxisOn.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnAxisOn.Location = new System.Drawing.Point(578, 429);
this.btnAxisOn.Location = new System.Drawing.Point(539, 415);
this.btnAxisOn.Name = "btnAxisOn";
this.btnAxisOn.Size = new System.Drawing.Size(132, 39);
this.btnAxisOn.TabIndex = 10;
......@@ -1051,7 +1051,7 @@
this.btnAxisOff.BackColor = System.Drawing.Color.White;
this.btnAxisOff.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnAxisOff.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.btnAxisOff.Location = new System.Drawing.Point(578, 473);
this.btnAxisOff.Location = new System.Drawing.Point(539, 459);
this.btnAxisOff.Name = "btnAxisOff";
this.btnAxisOff.Size = new System.Drawing.Size(132, 39);
this.btnAxisOff.TabIndex = 11;
......@@ -1070,7 +1070,7 @@
this.帮助ToolStripMenuItem});
this.menuStrip1.Location = new System.Drawing.Point(0, 0);
this.menuStrip1.Name = "menuStrip1";
this.menuStrip1.Size = new System.Drawing.Size(1159, 29);
this.menuStrip1.Size = new System.Drawing.Size(1114, 29);
this.menuStrip1.TabIndex = 275;
this.menuStrip1.Text = "menuStrip1";
//
......@@ -1346,7 +1346,7 @@
// FrmEquip
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
this.ClientSize = new System.Drawing.Size(1159, 683);
this.ClientSize = new System.Drawing.Size(1114, 683);
this.Controls.Add(this.tabControl1);
this.Controls.Add(this.menuStrip1);
this.Controls.Add(this.panel2);
......
......@@ -174,11 +174,7 @@ namespace OnlineStore.ACSingleStore
//ReadPosistion();
if (equip.storeRunStatus > StoreRunStatus.Wait)
{
lblWarnMsg.Text = equip.WarnMsg;
//如果不在入库中,且叉子上有信号,需要提示检查叉子
if (equip.storeRunStatus.Equals(StoreRunStatus.Runing) && equip.IOValue(IO_Type.TrayCheck_Fixture).Equals(IO_VALUE.HIGH))
{
......@@ -188,9 +184,9 @@ namespace OnlineStore.ACSingleStore
if (lblWarnMsg.Text.Equals(""))
{
if ( LineConnect.DoorPosInfo != null)
if (LineConnect.DoorPosInfo != null)
{
string msg = "D7门口料信息:"+LineConnect.DoorPosInfo.ToStr();
string msg = "出料口物料:" + LineConnect.DoorPosInfo.ToStr()+"\r\n"+"料架信息:"+equip.CurrTray.ToStr();
lblWarnMsg.Text = msg;
}
}
......
......@@ -108,7 +108,7 @@
this.S1_LineRun.Name = "S1_LineRun";
this.S1_LineRun.Size = new System.Drawing.Size(132, 39);
this.S1_LineRun.TabIndex = 242;
this.S1_LineRun.Text = "工位1-线体正转";
this.S1_LineRun.Text = "工位1-线体正转->>";
this.S1_LineRun.UseVisualStyleBackColor = false;
this.S1_LineRun.Click += new System.EventHandler(this.S1_LineRun_Click);
//
......@@ -121,7 +121,7 @@
this.S3_LineRun.Name = "S3_LineRun";
this.S3_LineRun.Size = new System.Drawing.Size(132, 39);
this.S3_LineRun.TabIndex = 252;
this.S3_LineRun.Text = "工位3-线体正转";
this.S3_LineRun.Text = "工位3-线体正转->>";
this.S3_LineRun.UseVisualStyleBackColor = false;
this.S3_LineRun.Click += new System.EventHandler(this.S3_LineRun_Click);
//
......@@ -134,7 +134,7 @@
this.S1_LocationCylinder_Up.Name = "S1_LocationCylinder_Up";
this.S1_LocationCylinder_Up.Size = new System.Drawing.Size(132, 39);
this.S1_LocationCylinder_Up.TabIndex = 244;
this.S1_LocationCylinder_Up.Text = "工位1-定位上升";
this.S1_LocationCylinder_Up.Text = "工位1-定位上升";
this.S1_LocationCylinder_Up.UseVisualStyleBackColor = false;
this.S1_LocationCylinder_Up.Click += new System.EventHandler(this.S1_LocationCylinder_Up_Click);
//
......@@ -160,7 +160,7 @@
this.S1_LocationCylinder_Down.Name = "S1_LocationCylinder_Down";
this.S1_LocationCylinder_Down.Size = new System.Drawing.Size(132, 39);
this.S1_LocationCylinder_Down.TabIndex = 245;
this.S1_LocationCylinder_Down.Text = "工位1-定位下降";
this.S1_LocationCylinder_Down.Text = "工位1-定位下降";
this.S1_LocationCylinder_Down.UseVisualStyleBackColor = false;
this.S1_LocationCylinder_Down.Click += new System.EventHandler(this.S1_LocationCylinder_Down_Click);
//
......@@ -173,7 +173,7 @@
this.S3_LineBackRun.Name = "S3_LineBackRun";
this.S3_LineBackRun.Size = new System.Drawing.Size(132, 39);
this.S3_LineBackRun.TabIndex = 253;
this.S3_LineBackRun.Text = "工位3-线体反转";
this.S3_LineBackRun.Text = "工位3-线体反转<<-";
this.S3_LineBackRun.UseVisualStyleBackColor = false;
this.S3_LineBackRun.Click += new System.EventHandler(this.S3_LineBackRun_Click);
//
......@@ -186,7 +186,7 @@
this.S1_LineBackRun.Name = "S1_LineBackRun";
this.S1_LineBackRun.Size = new System.Drawing.Size(132, 39);
this.S1_LineBackRun.TabIndex = 243;
this.S1_LineBackRun.Text = "工位1-线体反转";
this.S1_LineBackRun.Text = "工位1-线体反转<<-";
this.S1_LineBackRun.UseVisualStyleBackColor = false;
this.S1_LineBackRun.Click += new System.EventHandler(this.S1_LineBackRun_Click);
//
......@@ -199,7 +199,7 @@
this.S3_LocationCylinder_Down.Name = "S3_LocationCylinder_Down";
this.S3_LocationCylinder_Down.Size = new System.Drawing.Size(132, 39);
this.S3_LocationCylinder_Down.TabIndex = 255;
this.S3_LocationCylinder_Down.Text = "工位3-定位下降";
this.S3_LocationCylinder_Down.Text = "工位3-定位下降";
this.S3_LocationCylinder_Down.UseVisualStyleBackColor = false;
this.S3_LocationCylinder_Down.Click += new System.EventHandler(this.S3_LocationCylinder_Down_Click);
//
......@@ -225,7 +225,7 @@
this.S3_LocationCylinder_Up.Name = "S3_LocationCylinder_Up";
this.S3_LocationCylinder_Up.Size = new System.Drawing.Size(132, 39);
this.S3_LocationCylinder_Up.TabIndex = 254;
this.S3_LocationCylinder_Up.Text = "工位3-定位上升";
this.S3_LocationCylinder_Up.Text = "工位3-定位上升";
this.S3_LocationCylinder_Up.UseVisualStyleBackColor = false;
this.S3_LocationCylinder_Up.Click += new System.EventHandler(this.S3_LocationCylinder_Up_Click);
//
......@@ -238,7 +238,7 @@
this.S2_LocationCylinder_Up.Name = "S2_LocationCylinder_Up";
this.S2_LocationCylinder_Up.Size = new System.Drawing.Size(132, 39);
this.S2_LocationCylinder_Up.TabIndex = 249;
this.S2_LocationCylinder_Up.Text = "工位2-定位上升";
this.S2_LocationCylinder_Up.Text = "工位2-定位上升";
this.S2_LocationCylinder_Up.UseVisualStyleBackColor = false;
this.S2_LocationCylinder_Up.Click += new System.EventHandler(this.S2_LocationCylinder_Up_Click);
//
......@@ -251,7 +251,7 @@
this.S2_LineRun.Name = "S2_LineRun";
this.S2_LineRun.Size = new System.Drawing.Size(132, 39);
this.S2_LineRun.TabIndex = 247;
this.S2_LineRun.Text = "工位2-线体正转";
this.S2_LineRun.Text = "工位2-线体正转->>";
this.S2_LineRun.UseVisualStyleBackColor = false;
this.S2_LineRun.Click += new System.EventHandler(this.S2_LineRun_Click);
//
......@@ -264,7 +264,7 @@
this.S2_LocationCylinder_Down.Name = "S2_LocationCylinder_Down";
this.S2_LocationCylinder_Down.Size = new System.Drawing.Size(132, 39);
this.S2_LocationCylinder_Down.TabIndex = 250;
this.S2_LocationCylinder_Down.Text = "工位2-定位下降";
this.S2_LocationCylinder_Down.Text = "工位2-定位下降";
this.S2_LocationCylinder_Down.UseVisualStyleBackColor = false;
this.S2_LocationCylinder_Down.Click += new System.EventHandler(this.S2_LocationCylinder_Down_Click);
//
......@@ -290,7 +290,7 @@
this.S2_LineBackRun.Name = "S2_LineBackRun";
this.S2_LineBackRun.Size = new System.Drawing.Size(132, 39);
this.S2_LineBackRun.TabIndex = 248;
this.S2_LineBackRun.Text = "工位2-线体反转";
this.S2_LineBackRun.Text = "工位2-线体反转<<-";
this.S2_LineBackRun.UseVisualStyleBackColor = false;
this.S2_LineBackRun.Click += new System.EventHandler(this.S2_LineBackRun_Click);
//
......
......@@ -38,7 +38,7 @@ namespace OnlineStore.ACSingleStore
foreach (ConfigIO ioValue in EquipManager.Config.DIList.Values)
{
IOTextControl control = new IOTextControl(ioValue.ElectricalDefinition + "_" + ioValue.Explain, ioValue.ProName);
IOTextControl control = new IOTextControl(ioValue.ElectricalDefinition + "_" + ioValue.Explain, ioValue.ProName,230,28);
this.tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Absolute, 28));
this.tableLayoutPanel1.Controls.Add(control, 0, roleindex);
......@@ -52,7 +52,7 @@ namespace OnlineStore.ACSingleStore
roleindex = 0;
foreach (ConfigIO ioValue in EquipManager.Config.DOList.Values)
{
IOTextControl control = new IOTextControl(ioValue.ElectricalDefinition + "_" + ioValue.Explain, ioValue.ProName);
IOTextControl control = new IOTextControl(ioValue.ElectricalDefinition + "_" + ioValue.Explain, ioValue.ProName, 230, 28);
control.Click += Control_Click;
this.tableLayoutPanel2.RowStyles.Add(new RowStyle(SizeType.Absolute, 28));
......
......@@ -53,7 +53,6 @@
<ApplicationIcon>box.ico</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<Reference Include="HCSingleStore, Version=1.0.7629.30073, Culture=neutral, PublicKeyToken=null" />
<Reference Include="log4net">
<HintPath>..\..\dll\log4net.dll</HintPath>
</Reference>
......
......@@ -55,22 +55,6 @@
this.lblAxPrfPos = new System.Windows.Forms.Label();
this.lblAxisPrfMode = new System.Windows.Forms.Label();
this.label50 = new System.Windows.Forms.Label();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.txtBusyStatus = new System.Windows.Forms.TextBox();
this.label11 = new System.Windows.Forms.Label();
this.txtHomeStatus = new System.Windows.Forms.TextBox();
this.label10 = new System.Windows.Forms.Label();
this.label3 = new System.Windows.Forms.Label();
this.label24 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.btnGetAlarm = new System.Windows.Forms.Button();
this.txtAlarmStatus = new System.Windows.Forms.TextBox();
this.txtLimit2 = new System.Windows.Forms.TextBox();
this.txtServoStatue = new System.Windows.Forms.TextBox();
this.label22 = new System.Windows.Forms.Label();
this.txtLimit1 = new System.Windows.Forms.TextBox();
this.label6 = new System.Windows.Forms.Label();
this.txtHomeSingle = new System.Windows.Forms.TextBox();
this.panel1 = new System.Windows.Forms.Panel();
this.linkLabel1 = new System.Windows.Forms.LinkLabel();
this.comjSpeed = new System.Windows.Forms.ComboBox();
......@@ -100,7 +84,6 @@
this.timer1 = new System.Windows.Forms.Timer(this.components);
this.groupAxis.SuspendLayout();
this.groupBox2.SuspendLayout();
this.groupBox1.SuspendLayout();
this.panel1.SuspendLayout();
this.SuspendLayout();
//
......@@ -111,13 +94,12 @@
| System.Windows.Forms.AnchorStyles.Right)));
this.groupAxis.BackColor = System.Drawing.Color.White;
this.groupAxis.Controls.Add(this.groupBox2);
this.groupAxis.Controls.Add(this.groupBox1);
this.groupAxis.Controls.Add(this.panel1);
this.groupAxis.Controls.Add(this.lblServerOn);
this.groupAxis.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.groupAxis.Location = new System.Drawing.Point(4, 3);
this.groupAxis.Name = "groupAxis";
this.groupAxis.Size = new System.Drawing.Size(692, 395);
this.groupAxis.Size = new System.Drawing.Size(557, 395);
this.groupAxis.TabIndex = 218;
this.groupAxis.TabStop = false;
this.groupAxis.Text = "伺服运动";
......@@ -400,163 +382,6 @@
this.label50.TabIndex = 1;
this.label50.Text = "规划模式:";
//
// groupBox1
//
this.groupBox1.Controls.Add(this.txtBusyStatus);
this.groupBox1.Controls.Add(this.label11);
this.groupBox1.Controls.Add(this.txtHomeStatus);
this.groupBox1.Controls.Add(this.label10);
this.groupBox1.Controls.Add(this.label3);
this.groupBox1.Controls.Add(this.label24);
this.groupBox1.Controls.Add(this.label5);
this.groupBox1.Controls.Add(this.btnGetAlarm);
this.groupBox1.Controls.Add(this.txtAlarmStatus);
this.groupBox1.Controls.Add(this.txtLimit2);
this.groupBox1.Controls.Add(this.txtServoStatue);
this.groupBox1.Controls.Add(this.label22);
this.groupBox1.Controls.Add(this.txtLimit1);
this.groupBox1.Controls.Add(this.label6);
this.groupBox1.Controls.Add(this.txtHomeSingle);
this.groupBox1.Location = new System.Drawing.Point(553, 12);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(135, 260);
this.groupBox1.TabIndex = 302;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "状态";
//
// txtBusyStatus
//
this.txtBusyStatus.Enabled = false;
this.txtBusyStatus.Location = new System.Drawing.Point(99, 76);
this.txtBusyStatus.Name = "txtBusyStatus";
this.txtBusyStatus.Size = new System.Drawing.Size(25, 23);
this.txtBusyStatus.TabIndex = 288;
//
// label11
//
this.label11.AutoSize = true;
this.label11.Location = new System.Drawing.Point(31, 107);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(59, 17);
this.label11.TabIndex = 292;
this.label11.Text = "回零状态:";
//
// txtHomeStatus
//
this.txtHomeStatus.Enabled = false;
this.txtHomeStatus.Location = new System.Drawing.Point(99, 104);
this.txtHomeStatus.Name = "txtHomeStatus";
this.txtHomeStatus.Size = new System.Drawing.Size(25, 23);
this.txtHomeStatus.TabIndex = 291;
//
// label10
//
this.label10.AutoSize = true;
this.label10.Location = new System.Drawing.Point(24, 79);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(66, 17);
this.label10.TabIndex = 289;
this.label10.Text = "BUSY状态:";
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(31, 51);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(59, 17);
this.label3.TabIndex = 286;
this.label3.Text = "报警状态:";
//
// label24
//
this.label24.AutoSize = true;
this.label24.Location = new System.Drawing.Point(19, 191);
this.label24.Name = "label24";
this.label24.Size = new System.Drawing.Size(71, 17);
this.label24.TabIndex = 316;
this.label24.Text = "负极限信号:";
this.label24.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(31, 23);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(59, 17);
this.label5.TabIndex = 328;
this.label5.Text = "伺服状态:";
//
// btnGetAlarm
//
this.btnGetAlarm.BackColor = System.Drawing.Color.White;
this.btnGetAlarm.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnGetAlarm.Location = new System.Drawing.Point(14, 218);
this.btnGetAlarm.Name = "btnGetAlarm";
this.btnGetAlarm.Size = new System.Drawing.Size(110, 34);
this.btnGetAlarm.TabIndex = 284;
this.btnGetAlarm.Text = "读报状态";
this.btnGetAlarm.UseVisualStyleBackColor = false;
this.btnGetAlarm.Click += new System.EventHandler(this.btnGetAlarm_Click);
//
// txtAlarmStatus
//
this.txtAlarmStatus.Enabled = false;
this.txtAlarmStatus.Location = new System.Drawing.Point(99, 48);
this.txtAlarmStatus.Name = "txtAlarmStatus";
this.txtAlarmStatus.Size = new System.Drawing.Size(25, 23);
this.txtAlarmStatus.TabIndex = 285;
//
// txtLimit2
//
this.txtLimit2.Enabled = false;
this.txtLimit2.Location = new System.Drawing.Point(99, 188);
this.txtLimit2.Name = "txtLimit2";
this.txtLimit2.Size = new System.Drawing.Size(25, 23);
this.txtLimit2.TabIndex = 313;
//
// txtServoStatue
//
this.txtServoStatue.Enabled = false;
this.txtServoStatue.Location = new System.Drawing.Point(99, 20);
this.txtServoStatue.Name = "txtServoStatue";
this.txtServoStatue.Size = new System.Drawing.Size(25, 23);
this.txtServoStatue.TabIndex = 327;
//
// label22
//
this.label22.AutoSize = true;
this.label22.Location = new System.Drawing.Point(19, 163);
this.label22.Name = "label22";
this.label22.Size = new System.Drawing.Size(71, 17);
this.label22.TabIndex = 312;
this.label22.Text = "正极限信号:";
this.label22.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// txtLimit1
//
this.txtLimit1.Enabled = false;
this.txtLimit1.Location = new System.Drawing.Point(99, 160);
this.txtLimit1.Name = "txtLimit1";
this.txtLimit1.Size = new System.Drawing.Size(25, 23);
this.txtLimit1.TabIndex = 309;
//
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(31, 135);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(59, 17);
this.label6.TabIndex = 300;
this.label6.Text = "原点信号:";
//
// txtHomeSingle
//
this.txtHomeSingle.Enabled = false;
this.txtHomeSingle.Location = new System.Drawing.Point(99, 132);
this.txtHomeSingle.Name = "txtHomeSingle";
this.txtHomeSingle.Size = new System.Drawing.Size(25, 23);
this.txtHomeSingle.TabIndex = 297;
//
// panel1
//
this.panel1.Controls.Add(this.linkLabel1);
......@@ -921,13 +746,11 @@
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.Controls.Add(this.groupAxis);
this.Name = "AxisMoveControl";
this.Size = new System.Drawing.Size(699, 402);
this.Size = new System.Drawing.Size(564, 402);
this.groupAxis.ResumeLayout(false);
this.groupAxis.PerformLayout();
this.groupBox2.ResumeLayout(false);
this.groupBox2.PerformLayout();
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.panel1.ResumeLayout(false);
this.panel1.PerformLayout();
this.ResumeLayout(false);
......@@ -938,15 +761,6 @@
private System.Windows.Forms.GroupBox groupAxis;
private System.Windows.Forms.ComboBox cmbAxis;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.TextBox txtHomeSingle;
private System.Windows.Forms.Label label11;
private System.Windows.Forms.TextBox txtHomeStatus;
private System.Windows.Forms.Label label10;
private System.Windows.Forms.TextBox txtBusyStatus;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.TextBox txtAlarmStatus;
private System.Windows.Forms.Button btnGetAlarm;
private System.Windows.Forms.Label lblServerOn;
private System.Windows.Forms.Label label8;
internal System.Windows.Forms.Button btnOpenAxis;
......@@ -966,17 +780,10 @@
private System.Windows.Forms.Label label45;
private System.Windows.Forms.Label label46;
private System.Windows.Forms.Label label49;
private System.Windows.Forms.Label label24;
private System.Windows.Forms.TextBox txtLimit2;
private System.Windows.Forms.Label label22;
private System.Windows.Forms.TextBox txtLimit1;
private System.Windows.Forms.Panel panel1;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.TextBox txtServoStatue;
private System.Windows.Forms.Button btnDelMove;
private System.Windows.Forms.Button btnAddMove;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.ComboBox comjSpeed;
private System.Windows.Forms.LinkLabel linkLabel1;
private System.Windows.Forms.GroupBox groupBox2;
......
......@@ -51,13 +51,11 @@ namespace OnlineStore.AutoCountClient
this.IsHuiChuan = isHc;
if (IsHuiChuan)
{
groupBox1.Visible = false;
groupBox2.Visible = true;
timer1.Start();
}
else
{
groupBox1.Visible = true;
groupBox2.Visible = false;
}
}
......@@ -180,14 +178,14 @@ namespace OnlineStore.AutoCountClient
private void btnGetAlarm_Click(object sender, EventArgs e)
{
this.txtAlarmStatus.Text = AxisManager.instance.GetAlarmStatus(PortName, SlvAddr).ToString();
this.txtBusyStatus.Text = AxisManager.instance.GetBusyStatus(PortName, SlvAddr).ToString();
//this.txtStb.Text = AxisManager.instance.GetSTBState(PortName, SlvAddr).ToString();
this.txtHomeStatus.Text = AxisManager.instance.GetHomeEndStatus(PortName, SlvAddr).ToString();
this.txtHomeSingle.Text = AxisManager.instance.GetHomeSingle(PortName, SlvAddr).ToString();
this.txtLimit1.Text = AxisManager.instance.GetLimitPositiveSingle(PortName, SlvAddr).ToString();
this.txtLimit2.Text = AxisManager.instance.GetLimitNegativeSingle(PortName, SlvAddr).ToString();
txtServoStatue.Text = AxisManager.instance.IsServeoOn(PortName, SlvAddr) ? "✔" : "✘";
//this.txtAlarmStatus.Text = AxisManager.instance.GetAlarmStatus(PortName, SlvAddr).ToString();
//this.txtBusyStatus.Text = AxisManager.instance.GetBusyStatus(PortName, SlvAddr).ToString();
////this.txtStb.Text = AxisManager.instance.GetSTBState(PortName, SlvAddr).ToString();
//this.txtHomeStatus.Text = AxisManager.instance.GetHomeEndStatus(PortName, SlvAddr).ToString();
//this.txtHomeSingle.Text = AxisManager.instance.GetHomeSingle(PortName, SlvAddr).ToString();
//this.txtLimit1.Text = AxisManager.instance.GetLimitPositiveSingle(PortName, SlvAddr).ToString();
//this.txtLimit2.Text = AxisManager.instance.GetLimitNegativeSingle(PortName, SlvAddr).ToString();
//txtServoStatue.Text = AxisManager.instance.IsServeoOn(PortName, SlvAddr) ? "✔" : "✘";
}
......@@ -237,22 +235,20 @@ namespace OnlineStore.AutoCountClient
btnCloseAxis.ForeColor = color;
btnAxisAMove.ForeColor = color;
btnAxisRMove.ForeColor = color;
//btnAxisVMove.ForeColor = color;
btnAxisReturnHome.ForeColor = color;
btnAxisStop.ForeColor = color;
btnComAlarmClear.ForeColor = color;
//btnReadPosition.ForeColor = color;
btnGetAlarm.ForeColor = color;
btnAddMove.ForeColor = color;
btnDelMove.ForeColor = color;
this.txtAlarmStatus.Text = "";
this.txtBusyStatus.Text = "";
this.txtHomeStatus.Text = "";
this.txtHomeSingle.Text = "";
this.txtLimit1.Text = "";
this.txtLimit2.Text = "";
txtServoStatue.Text = "";
//btnGetAlarm.ForeColor = color;
//this.txtAlarmStatus.Text = "";
//this.txtBusyStatus.Text = "";
//this.txtHomeStatus.Text = "";
//this.txtHomeSingle.Text = "";
//this.txtLimit1.Text = "";
//this.txtLimit2.Text = "";
//txtServoStatue.Text = "";
}
}
private void AxisMove(int speed)
......
......@@ -76,10 +76,10 @@ namespace OnlineStore.LoadCSVLibrary
[CSVAttribute("加速度")]
public short AddSpeed { get; set; }
public int AddSpeed { get; set; }
[CSVAttribute("减速度")]
public short DelSpeed { get; set; }
public int DelSpeed { get; set; }
[CSVAttribute("回零低速")]
public int HomeLowSpeed { get; set; }
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!