Commit c8751624 刘韬

1

2 个父辈 d963e77d 31e61c1c
...@@ -13,7 +13,7 @@ namespace DeviceLibrary ...@@ -13,7 +13,7 @@ namespace DeviceLibrary
{ {
partial class ServerCommunication partial class ServerCommunication
{ {
volatile StoreStatus _storeStatus = StoreStatus.Debugging; volatile StoreStatus _storeStatus = StoreStatus.None;
public StoreStatus storeStatus public StoreStatus storeStatus
{ {
get => _storeStatus; get => _storeStatus;
...@@ -45,41 +45,34 @@ namespace DeviceLibrary ...@@ -45,41 +45,34 @@ namespace DeviceLibrary
int lockerrtime = 0; int lockerrtime = 0;
private void ServerConnectTimer_Elapsed(object sender, System.Timers.ElapsedEventArgs e) private void ServerConnectTimer_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
{ {
//if (!Monitor.TryEnter(serverConnectTimer)) if (!Monitor.TryEnter(serverConnectTimer))
//{
// LogUtil.error("ServerConnectTimer_Elapsed locked");
// lockerrtime++;
// if (lockerrtime > 3)
// {
// lockerrtime = 0;
// Monitor.Exit(serverConnectTimer);
// }
// return;
//}
try
{ {
if (!server.StartsWith("http")) try
return; {
if (!RobotManage.isRunning) if (!server.StartsWith("http"))
ProcessMsg(Msg.msg); return;
SendLineStatus(); if (!RobotManage.isRunning)
} ProcessMsg(Msg.msg);
catch (Exception ex) SendLineStatus();
{ }
LogUtil.info($"ServerConnectTimer_Elapsed:{ex}"); catch (Exception ex)
} {
finally LogUtil.info($"ServerConnectTimer_Elapsed:{ex}");
{ }
//Monitor.Exit(serverConnectTimer); finally
{
Monitor.Exit(serverConnectTimer);
}
} }
} }
public void StartConnectServer() public void StartConnectServer()
{ {
//serverConnectTimer.Enabled = true; serverConnectTimer.Enabled = true;
} }
public void StopConnectServer() public void StopConnectServer()
{ {
//serverConnectTimer.Enabled = false; serverConnectTimer.Enabled = false;
} }
public void ProcessMsg(List<Msg> msg) public void ProcessMsg(List<Msg> msg)
...@@ -443,14 +436,14 @@ namespace DeviceLibrary ...@@ -443,14 +436,14 @@ namespace DeviceLibrary
return map; return map;
if (//RobotManage.mainMachine.IOValue(IO_Type.StringDoor_Close).Equals(IO_VALUE.HIGH) && if (RobotManage.mainMachine.IOValue(IO_Type.StringDoor_Close).Equals(IO_VALUE.HIGH) &&
(RobotManage.mainMachine.StringMoveInfo.MoveStep == MoveStep.StringOut_Released (RobotManage.mainMachine.StringMoveInfo.MoveStep == MoveStep.StringOut_Released
|| RobotManage.mainMachine.StringMoveInfo.MoveStep == MoveStep.Wait)) || RobotManage.mainMachine.StringMoveInfo.MoveStep == MoveStep.Wait))
{ {
//map.Add(ParamDefine.doorStatus, "料串门关闭"); //map.Add(ParamDefine.doorStatus, "料串门关闭");
map[ParamDefine.openLock] = ParamDefine.enable; map[ParamDefine.openLock] = ParamDefine.enable;
} }
//else// if (RobotManage.mainMachine.IOValue(IO_Type.StringDoor_Open).Equals(IO_VALUE.HIGH)) else if (RobotManage.mainMachine.IOValue(IO_Type.StringDoor_Open).Equals(IO_VALUE.HIGH))
{ {
map[ParamDefine.closeLock] = ParamDefine.enable; map[ParamDefine.closeLock] = ParamDefine.enable;
//map.Add(ParamDefine.doorStatus, "料串门打开"); //map.Add(ParamDefine.doorStatus, "料串门打开");
...@@ -468,13 +461,13 @@ namespace DeviceLibrary ...@@ -468,13 +461,13 @@ namespace DeviceLibrary
{ {
map[ParamDefine.singleReelIn] = ParamDefine.enable; map[ParamDefine.singleReelIn] = ParamDefine.enable;
} }
map[ParamDefine.SendEmptyShelf]= ParamDefine.disable; map.Add(ParamDefine.SendEmptyShelf, ParamDefine.disable);
map[ParamDefine.SendFullShelf]= ParamDefine.disable; map.Add(ParamDefine.SendFullShelf, ParamDefine.disable);
map[ParamDefine.NeedEmptySHelf]= ParamDefine.disable; map.Add(ParamDefine.NeedEmptySHelf, ParamDefine.disable);
map[ParamDefine.NeedFullShelf]= ParamDefine.disable; map.Add(ParamDefine.NeedFullShelf, ParamDefine.disable);
if (RobotManage.mainMachine?.StringState == MainMachine.StringStateE.None) if (RobotManage.mainMachine?.StringState == MainMachine.StringStateE.None)
{ {
map[ParamDefine.NeedEmptySHelf] = ParamDefine.enable; //map[ParamDefine.NeedEmptySHelf] = ParamDefine.enable;
map[ParamDefine.NeedFullShelf] = ParamDefine.enable; map[ParamDefine.NeedFullShelf] = ParamDefine.enable;
} }
if (RobotManage.mainMachine?.StringMoveInfo.MoveStep == MoveStep.StringOut_Released) if (RobotManage.mainMachine?.StringMoveInfo.MoveStep == MoveStep.StringOut_Released)
......
...@@ -311,8 +311,8 @@ namespace DeviceLibrary ...@@ -311,8 +311,8 @@ namespace DeviceLibrary
//ProcessMoveinfoEvent?.Invoke(MoveInfo.List); //ProcessMoveinfoEvent?.Invoke(MoveInfo.List);
if (!UserPause) if (!UserPause)
Msg.clear(); Msg.clear();
else //else
currnetstoreStatus = StoreStatus.Debugging; // currnetstoreStatus = StoreStatus.Debugging;
if (currnetstoreStatus!=StoreStatus.None) if (currnetstoreStatus!=StoreStatus.None)
ServerCM.storeStatus = currnetstoreStatus; ServerCM.storeStatus = currnetstoreStatus;
......
...@@ -296,7 +296,7 @@ namespace DeviceLibrary ...@@ -296,7 +296,7 @@ namespace DeviceLibrary
// ClampMoveInfo.NextMoveStep(MoveStep.NGOUT_03); // ClampMoveInfo.NextMoveStep(MoveStep.NGOUT_03);
//} //}
//else //else
if (IOValue(IO_Type.SafetyLightCurtains).Equals(IO_VALUE.HIGH)) if (IOValue(IO_Type.SafetyLightCurtains).Equals(IO_VALUE.HIGH)&& !NGDoor_Tray_Test_Reel)
{ {
ClampMoveInfo.NextMoveStep(MoveStep.NGOUT_06); ClampMoveInfo.NextMoveStep(MoveStep.NGOUT_06);
ClampMoveInfo.log("关门NG口门"); ClampMoveInfo.log("关门NG口门");
......
...@@ -51,6 +51,18 @@ namespace DeviceLibrary ...@@ -51,6 +51,18 @@ namespace DeviceLibrary
ClampMoveInfo.NewMove(MoveStep.SingleInRun); ClampMoveInfo.NewMove(MoveStep.SingleInRun);
return crc.GetString(L.close_singledoor, "关闭单料门"); return crc.GetString(L.close_singledoor, "关闭单料门");
} }
else
{
if(NGDoor_Tray_Test_Reel)
{
RobotManage.UserPause(crc.GetString("please_take_ngdoor_reel", "等待取走单口料盘"));
return crc.GetString("please_take_ngdoor_reel", "等待取走单口料盘");
}
else
{
RobotManage.UserPause("",false);
}
}
LogUtil.info($"取料机构当前没有在等待单盘入库:{ClampMoveInfo.MoveStep}"); LogUtil.info($"取料机构当前没有在等待单盘入库:{ClampMoveInfo.MoveStep}");
return crc.GetString(L.not_in_single_prosses, "当前没有在等待单盘入库:")+ClampMoveInfo.MoveStep; return crc.GetString(L.not_in_single_prosses, "当前没有在等待单盘入库:")+ClampMoveInfo.MoveStep;
} }
......
...@@ -134,6 +134,8 @@ namespace DeviceLibrary ...@@ -134,6 +134,8 @@ namespace DeviceLibrary
{ {
StringMoveInfo.NextMoveStep(MoveStep.StringLoad_02a); StringMoveInfo.NextMoveStep(MoveStep.StringLoad_02a);
StringMoveInfo.log($"顶起料串固定顶升"); StringMoveInfo.log($"顶起料串固定顶升");
//if (!ConfigHelper.Config.Get("Device_Disable_StringDoor", false))
// StringDoorClose(StringMoveInfo);
CylinderMove(StringMoveInfo, IO_Type.StringFix_Bottom, IO_Type.StringFix_Top, IO_VALUE.HIGH); CylinderMove(StringMoveInfo, IO_Type.StringFix_Bottom, IO_Type.StringFix_Top, IO_VALUE.HIGH);
CylinderMove(StringMoveInfo, IO_Type.StringPosChecker_Home, IO_Type.StringPosChecker_Work, IO_VALUE.HIGH); CylinderMove(StringMoveInfo, IO_Type.StringPosChecker_Home, IO_Type.StringPosChecker_Work, IO_VALUE.HIGH);
} }
...@@ -395,7 +397,11 @@ namespace DeviceLibrary ...@@ -395,7 +397,11 @@ namespace DeviceLibrary
case MoveStep.StringOut_Released: case MoveStep.StringOut_Released:
ServerCM.storeStatus = StoreStatus.StoreOnline; ServerCM.storeStatus = StoreStatus.StoreOnline;
if (StringState == StringStateE.Full) if (StringState == StringStateE.Full)
Msg.add(crc.GetString(L.string_full_takeout, "料串已满请取出"), MsgLevel.warning);//0427 {
//if (ConfigHelper.Config.Get("OpenStringDoorAfterOutStoreEnd", true))
// StringDoorOpen(StringMoveInfo);
Msg.add(crc.GetString(L.string_full_takeout, "料串已满请取出"), MsgLevel.warning);//0427
}
else else
Msg.add(crc.GetString(L.wait_string_take, "等待料串被取走"), MsgLevel.warning); Msg.add(crc.GetString(L.wait_string_take, "等待料串被取走"), MsgLevel.warning);
if (IOValue(IO_Type.StringBack_Check).Equals(IO_VALUE.LOW) && IOValue(IO_Type.StringFront_Check).Equals(IO_VALUE.LOW)) if (IOValue(IO_Type.StringBack_Check).Equals(IO_VALUE.LOW) && IOValue(IO_Type.StringFront_Check).Equals(IO_VALUE.LOW))
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!