Commit c3ec9f4a 刘韬

稳定版

1 个父辈 96d9983a
正在显示 38 个修改的文件 包含 1504 行增加196 行删除
...@@ -69,7 +69,10 @@ namespace OnlineStore.Common ...@@ -69,7 +69,10 @@ namespace OnlineStore.Common
[MyConfigComment("二维码扫码超时毫秒")] [MyConfigComment("二维码扫码超时毫秒")]
public static MyConfig<int> CameraScan_CodeTimeOut = 3000; public static MyConfig<int> CameraScan_CodeTimeOut = 3000;
[MyConfigComment("管理员密码")]
public static MyConfig<string> User_AdminPassword = "1";
[MyConfigComment("启用管理员密码")]
public static MyConfig<bool> User_Enable = false;
public static bool SimulateMode = false; public static bool SimulateMode = false;
} }
} }
...@@ -114,6 +114,7 @@ ...@@ -114,6 +114,7 @@
<Compile Include="DeviceLibrary\IOMonitor.cs" /> <Compile Include="DeviceLibrary\IOMonitor.cs" />
<Compile Include="DeviceLibrary\I_SafetyDevice.cs" /> <Compile Include="DeviceLibrary\I_SafetyDevice.cs" />
<Compile Include="DeviceLibrary\C8WeightSensor.cs" /> <Compile Include="DeviceLibrary\C8WeightSensor.cs" />
<Compile Include="DeviceLibrary\LiftMonitor.cs" />
<Compile Include="DeviceLibrary\OKLEController.cs" /> <Compile Include="DeviceLibrary\OKLEController.cs" />
<Compile Include="DeviceLibrary\ServerCommunication.cs" /> <Compile Include="DeviceLibrary\ServerCommunication.cs" />
<Compile Include="DeviceLibrary\AxisBean.cs" /> <Compile Include="DeviceLibrary\AxisBean.cs" />
...@@ -191,6 +192,9 @@ ...@@ -191,6 +192,9 @@
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None> </None>
<None Include="packages.config" /> <None Include="packages.config" />
<None Include="StoreConfig\Left\1fixPositions.csv" />
<None Include="StoreConfig\Left\linePositions - 副本.csv" />
<None Include="StoreConfig\Right\1fixPositions.csv" />
<None Include="StoreConfig\Right\fixPositions.csv"> <None Include="StoreConfig\Right\fixPositions.csv">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None> </None>
...@@ -200,6 +204,7 @@ ...@@ -200,6 +204,7 @@
<None Include="StoreConfig\Left\linePositions.csv"> <None Include="StoreConfig\Left\linePositions.csv">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None> </None>
<None Include="StoreConfig\Right\linePositions - 副本.csv" />
<None Include="StoreConfig\Right\linePositions.csv"> <None Include="StoreConfig\Right\linePositions.csv">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None> </None>
......
...@@ -35,24 +35,48 @@ namespace DeviceLibrary ...@@ -35,24 +35,48 @@ namespace DeviceLibrary
List[machineSide].Add(this); List[machineSide].Add(this);
} }
int openretry = 0;
public bool Open(bool isCheck, out string Msg) public bool Open(bool isCheck, out string Msg)
{ {
Msg = ""; Msg = "";
string portName = Config.DeviceName; string portName = Config.DeviceName;
short slvAddr = Config.GetAxisValue(); short slvAddr = Config.GetAxisValue();
AxisManager.AlarmClear(portName, slvAddr);
Thread.Sleep(50); if (AxisManager.IsServeoOn(portName, slvAddr))
AxisManager.ServoOn(portName, slvAddr); { openretry = 0; return true; }
Thread.Sleep(50);
//打开所有轴 openretry++;
if (isCheck)
{ {
if (!OpenAxis(out Msg)) Msg += string.Format("第{0}次尝试打开轴:{1}", openretry, Config.Explain);
if (AxisManager.GetBusyStatus(portName, slvAddr) == 1)
{ {
return false; AxisManager.SuddenStop(portName, slvAddr);
Msg += string.Format("...伺服忙碌,急停{0}次", openretry);
Thread.Sleep(100);
} }
//if (AxisManager.GetAlarmStatus(portName, slvAddr) != 0)
//{
// AxisManager.AlarmClear(portName, slvAddr);
// Msg += string.Format("...尝试清除报警第(0)次", openretry);
// Thread.Sleep(100);
//}
AxisManager.ServoOn(portName, slvAddr);
Thread.Sleep(200);
if (AxisManager.IsServeoOn(portName, slvAddr))
{
Msg += "...使能成功";
openretry = 0;
return true;
}
else
Msg += "...尝试使能失败";
Thread.Sleep(1000);
if (openretry < 5)
Msg = "伺服连接中...";
} }
return true; return false;
} }
/// <summary> /// <summary>
/// 打开所有轴 /// 打开所有轴
...@@ -72,8 +96,8 @@ namespace DeviceLibrary ...@@ -72,8 +96,8 @@ namespace DeviceLibrary
{ {
//清理报警,再重新打开一次 //清理报警,再重新打开一次
LogUtil.info(AxisName + "第一次打开失败,先清理一下报警,再重新打开一次"); LogUtil.info(AxisName + "第一次打开失败,先清理一下报警,再重新打开一次");
AxisManager.AlarmClear(portName, slvAddr); //AxisManager.AlarmClear(portName, slvAddr);
System.Threading.Thread.Sleep(1000); //System.Threading.Thread.Sleep(1000);
AxisManager.ServoOn(portName, slvAddr); AxisManager.ServoOn(portName, slvAddr);
System.Threading.Thread.Sleep(100); System.Threading.Thread.Sleep(100);
if (AxisManager.IsServeoOn(portName, slvAddr)) if (AxisManager.IsServeoOn(portName, slvAddr))
...@@ -221,26 +245,25 @@ namespace DeviceLibrary ...@@ -221,26 +245,25 @@ namespace DeviceLibrary
msg = ""; msg = "";
if (AxisManager.IsHomeMoveEnd(axis.DeviceName, axis.GetAxisValue()))// || AxisManager.AxisStsINP(axis.DeviceName, axis.GetAxisValue()).Equals(1)) if (AxisManager.IsHomeMoveEnd(axis.DeviceName, axis.GetAxisValue()))// || AxisManager.AxisStsINP(axis.DeviceName, axis.GetAxisValue()).Equals(1))
{ {
//原点完成并且位置=0 return true;
int outCount = AxisManager.GetActualtPosition(axis.DeviceName, axis.GetAxisValue()); }
int errorCount = Math.Abs(outCount); else if (AxisManager.GetBusyStatus(axis.DeviceName, axis.GetAxisValue()) == 1)
if (errorCount <= axis.CanErrorCountMax) {
{ return false;
return true; }
} else if (MoveInfo.CanWhileCount > 0 && AxisManager.GetBusyStatus(axis.DeviceName, axis.GetAxisValue()) == 0)
//判断是否需要重新运动 {
if (MoveInfo.CanWhileCount > 0) var HomeLowSpeed = axis.HomeLowSpeed > 0 ? axis.HomeLowSpeed : axis.HomeHighSpeed / 10;
{ var HomeAddSpeed = axis.HomeAddSpeed > 0 ? axis.HomeAddSpeed : axis.HomeHighSpeed * 5;
MoveInfo.error(MoveInfo.Name + axis.DisplayStr + "收到原点完成信号,当前位置[" + outCount + "],重新回原点,剩余[" + MoveInfo.CanWhileCount + "]次");
//LogUtil.error( StoreName + moveAxis.DisplayStr + "重新回原点"); AxisManager.HomeMove(axis.DeviceName, axis.GetAxisValue(), axis.HomeHighSpeed, HomeLowSpeed, HomeAddSpeed);
AxisManager.HomeMove(axis.DeviceName, axis.GetAxisValue(), axis.HomeHighSpeed, axis.HomeLowSpeed, axis.HomeAddSpeed); MoveInfo.log(axis.DisplayStr + ",返回原点失败,重新回原");
MoveInfo.CanWhileCount--; MoveInfo.CanWhileCount--;
} Thread.Sleep(1000);
else }
{ else if (MoveInfo.CanWhileCount <= 0)
msg = MoveInfo.Name + " " + MoveInfo.MoveStep + axis.DisplayStr + ",收到原点完成信号,当前位置[" + outCount + "],误差过大,需要报警"; {
MoveInfo.error(msg); msg = axis.DisplayStr + ",返回原点失败";
}
} }
return false; return false;
} }
...@@ -406,16 +429,39 @@ namespace DeviceLibrary ...@@ -406,16 +429,39 @@ namespace DeviceLibrary
foreach (AxisBean axis in axisArray) foreach (AxisBean axis in axisArray)
{ {
bool result = axis.Open(false, out msg); bool result = axis.Open(false, out msg);
if (!result || (!String.IsNullOrEmpty(msg))) if (!result)
{ {
//SetWarnMsg(Name + msg); LogUtil.error(msg);
//Alarm(AlarmType.AxisAlarm);
return false; return false;
} }
} }
Thread.Sleep(50); Thread.Sleep(50);
return true; return true;
} }
public static bool ClearMultiAlarm(out string msg, List<AxisBean> axisArray)
{
msg = "";
bool isok = true;
foreach (AxisBean axis in axisArray)
{
string portName = axis.Config.DeviceName;
short slvAddr = axis.Config.GetAxisValue();
if (AxisManager.GetAlarmStatus(portName, slvAddr) != 0)
{
AxisManager.AlarmClear(portName, slvAddr);
Thread.Sleep(200);
if (AxisManager.GetAlarmStatus(portName, slvAddr) != 0)
{
msg += string.Format("轴(0)存在报警,清除失败", axis.Config.Explain);
isok = false;
}
else
msg += string.Format("轴(0)存在报警,清除成功", axis.Config.Explain);
}
}
Thread.Sleep(50);
return isok;
}
public static void StopMultiAxis(List<AxisBean> axisArray) public static void StopMultiAxis(List<AxisBean> axisArray)
{ {
foreach (AxisBean axis in axisArray) foreach (AxisBean axis in axisArray)
......
...@@ -10,7 +10,7 @@ using System.Threading.Tasks; ...@@ -10,7 +10,7 @@ using System.Threading.Tasks;
namespace DeviceLibrary namespace DeviceLibrary
{ {
public class LiftMonitor public class LiftMonitor : ISafetyDevice
{ {
string up; string up;
string down; string down;
...@@ -19,79 +19,136 @@ namespace DeviceLibrary ...@@ -19,79 +19,136 @@ namespace DeviceLibrary
int upspeed; int upspeed;
int downspeed; int downspeed;
int StrokeLength = 270000; int StrokeLength = 270000;
public LiftMonitor(string _up, string _down,string _break, AxisBean _axisBean,int _upspeed, int _downspeed= 0) { Store_ConfigBase Config;
bool paused = false;
public LiftMonitor(string _up, string _down, string _break, Store_ConfigBase _Config, AxisBean _axisBean, int _StrokeLength, int _upspeed, int _downspeed = 0)
{
up = _up; up = _up;
down = _down; down = _down;
axisBean = _axisBean; axisBean = _axisBean;
upspeed = _upspeed; upspeed = _upspeed;
axisbreak = _break; axisbreak = _break;
downspeed = _downspeed; downspeed = _downspeed;
if (downspeed == 0) { StrokeLength = _StrokeLength;
Config = _Config;
if (downspeed == 0)
{
downspeed = upspeed; downspeed = upspeed;
} }
SafetyDevice.AddDevice(this);
} }
public bool isAtTOP { public bool isAtTOP
get { {
return IOManager.IOValue(up.ToString()).Equals(IO_VALUE.HIGH); get
{
return IOManager.IOValue(up.ToString(),Config).Equals(IO_VALUE.HIGH);
} }
} }
public bool isAtBOTTOM public bool isAtBOTTOM
{ {
get get
{ {
return IOManager.IOValue(down.ToString()).Equals(IO_VALUE.HIGH); return IOManager.IOValue(down.ToString(), Config).Equals(IO_VALUE.HIGH);
} }
} }
public void LiftUp(MoveInfo moveInfo) { public void LiftUp(MoveInfo moveInfo)
{
if (moveInfo == null) if (moveInfo == null)
moveInfo = new MoveInfo(crc.GetString("Res0120","界面"),false); moveInfo = new MoveInfo(crc.GetString("Res0001","升降机构"),MachineSideE.Left,"", false);
if (IOManager.IOValue(up.ToString()).Equals(IO_VALUE.HIGH)) { if (IOManager.IOValue(IO_Type.SuddenStop_BTN, RobotManage.Config).Equals(IO_VALUE.LOW))
{
moveInfo.log($"急停未解除");
return;
}
paused = false;
if (IOManager.IOValue(up.ToString(), Config).Equals(IO_VALUE.HIGH))
{
moveInfo.log($"{axisBean.AxisName},已在位置,无需上升"); moveInfo.log($"{axisBean.AxisName},已在位置,无需上升");
return; return;
} }
IOManager.IOMove(axisbreak,IO_VALUE.HIGH); if (!axisBean.IsServeoOn)
Thread.Sleep(200); axisBean.Open(true, out string msg);
if (!string.IsNullOrEmpty(axisbreak))
{
IOManager.IOMove(axisbreak, IO_VALUE.HIGH, Config);
Thread.Sleep(200);
}
axisBean.RelMove(StrokeLength, (double)upspeed); axisBean.RelMove(StrokeLength, (double)upspeed);
DateTime d = DateTime.Now; DateTime d = DateTime.Now;
moveInfo.log($"{axisBean.AxisName},LiftUp"); moveInfo.log($"{axisBean.AxisName},LiftUp");
if(moveInfo!=null) if (moveInfo != null)
moveInfo.WaitList.Add(WaitResultInfo.WaitAction(new Func<WaitResultInfo, bool>(WaitUp), $"等待顶升[{axisBean.Config.Explain}]机构上升")); moveInfo.WaitList.Add(WaitResultInfo.WaitAction(new Func<WaitResultInfo, bool>(WaitUp), $"等待顶升[{axisBean.Config.Explain}]机构上升"));
Task.Run(()=> { Task.Run(() => {
while (!IOManager.IOValue(up.ToString()).Equals(IO_VALUE.HIGH)) { while (!IOManager.IOValue(up.ToString(), Config).Equals(IO_VALUE.HIGH))
{
Task.Delay(30); Task.Delay(30);
if (paused)
{
paused = false;
return;
}
if (IOManager.IOValue(IO_Type.SuddenStop_BTN,RobotManage.Config).Equals(IO_VALUE.LOW))
{
LogUtil.info("设备急停");
Pause();
return;
}
} }
axisBean.SuddenStop(); axisBean.SuddenStop();
IOManager.IOMove(axisbreak, IO_VALUE.LOW); if (!string.IsNullOrEmpty(axisbreak))
{
IOManager.IOMove(axisbreak, IO_VALUE.LOW, Config);
axisBean.ServoOff();
}
var t = (DateTime.Now - d).TotalSeconds; var t = (DateTime.Now - d).TotalSeconds;
moveInfo.log($"{axisBean.AxisName},上升到位,s:{t}"); moveInfo.log($"{axisBean.AxisName},上升到位,s:{t}");
}); });
} }
bool WaitUp(WaitResultInfo w) bool WaitUp(WaitResultInfo w)
{ {
if (IOManager.IOValue(up.ToString()).Equals(IO_VALUE.HIGH)) if (IOManager.IOValue(up.ToString(), Config).Equals(IO_VALUE.HIGH))
{ {
axisBean.SuddenStop(); axisBean.SuddenStop();
IOManager.IOMove(axisbreak, IO_VALUE.LOW);
return true; if (!string.IsNullOrEmpty(axisbreak))
{
IOManager.IOMove(axisbreak, IO_VALUE.LOW, Config);
axisBean.ServoOff();
}
return true;
} }
if (!axisBean.IsBusy) { if (!axisBean.IsBusy)
axisBean.RelMove(StrokeLength, (double)upspeed); {
LogUtil.info("恢复继续上升");
LiftUp(null);
} }
return false; return false;
} }
public void LiftDown(MoveInfo moveInfo) public void LiftDown(MoveInfo moveInfo)
{ {
if (moveInfo == null) if (moveInfo == null)
moveInfo = new MoveInfo(crc.GetString("Res0120","界面"), false); moveInfo = new MoveInfo(crc.GetString("Res0001","升降机构"), MachineSideE.Left, "", false);
if (IOManager.IOValue(down.ToString()).Equals(IO_VALUE.HIGH)) if (IOManager.IOValue(IO_Type.SuddenStop_BTN,RobotManage.Config).Equals(IO_VALUE.LOW))
{
moveInfo.log($"急停未解除");
return;
}
paused = false;
if (IOManager.IOValue(down.ToString(), Config).Equals(IO_VALUE.HIGH))
{ {
moveInfo.log($"{axisBean.AxisName},已在位置,无需下降"); moveInfo.log($"{axisBean.AxisName},已在位置,无需下降");
return; return;
} }
IOManager.IOMove(axisbreak, IO_VALUE.HIGH); if (!axisBean.IsServeoOn)
Thread.Sleep(200); axisBean.Open(true, out string msg);
if (!string.IsNullOrEmpty(axisbreak))
{
IOManager.IOMove(axisbreak, IO_VALUE.HIGH, Config);
Thread.Sleep(200);
}
axisBean.RelMove(-StrokeLength, (double)downspeed); axisBean.RelMove(-StrokeLength, (double)downspeed);
DateTime d = DateTime.Now; DateTime d = DateTime.Now;
moveInfo.log($"{axisBean.AxisName},LiftDown"); moveInfo.log($"{axisBean.AxisName},LiftDown");
...@@ -99,30 +156,68 @@ namespace DeviceLibrary ...@@ -99,30 +156,68 @@ namespace DeviceLibrary
moveInfo.WaitList.Add(WaitResultInfo.WaitAction(new Func<WaitResultInfo, bool>(WaitDown), $"等待顶升[{axisBean.Config.Explain}]机构下降")); moveInfo.WaitList.Add(WaitResultInfo.WaitAction(new Func<WaitResultInfo, bool>(WaitDown), $"等待顶升[{axisBean.Config.Explain}]机构下降"));
Task.Run(() => { Task.Run(() => {
while (!IOManager.IOValue(down.ToString()).Equals(IO_VALUE.HIGH)) while (!IOManager.IOValue(down.ToString(), Config).Equals(IO_VALUE.HIGH))
{ {
Task.Delay(30); Task.Delay(30);
if (paused)
{
paused = false;
return;
}
if (IOManager.IOValue(IO_Type.SuddenStop_BTN,RobotManage.Config).Equals(IO_VALUE.LOW))
{
LogUtil.info("设备急停");
Pause();
return;
}
} }
axisBean.SuddenStop(); axisBean.SuddenStop();
IOManager.IOMove(axisbreak, IO_VALUE.LOW); if (!string.IsNullOrEmpty(axisbreak))
{
IOManager.IOMove(axisbreak, IO_VALUE.LOW, Config);
axisBean.ServoOff();
}
var t = (DateTime.Now - d).TotalSeconds; var t = (DateTime.Now - d).TotalSeconds;
moveInfo.log($"{axisBean.AxisName},下降到位,s:{t}"); moveInfo.log($"{axisBean.AxisName},下降到位,s:{t}");
}); });
} }
bool WaitDown(WaitResultInfo w) bool WaitDown(WaitResultInfo w)
{ {
if (IOManager.IOValue(down.ToString()).Equals(IO_VALUE.HIGH)) if (IOManager.IOValue(down.ToString(), Config).Equals(IO_VALUE.HIGH))
{ {
axisBean.SuddenStop(); axisBean.SuddenStop();
IOManager.IOMove(axisbreak, IO_VALUE.LOW);
if (!string.IsNullOrEmpty(axisbreak))
{
IOManager.IOMove(axisbreak, IO_VALUE.LOW, Config);
axisBean.ServoOff();
}
return true; return true;
} }
if (!axisBean.IsBusy) if (!axisBean.IsBusy)
{ {
axisBean.RelMove(-StrokeLength, (double)downspeed); LogUtil.info("恢复继续下降");
LiftDown(null);
} }
return false; return false;
} }
public void Pause()
{
paused = true;
axisBean.SuddenStop();
if (!string.IsNullOrEmpty(axisbreak))
{
IOManager.IOMove(axisbreak, IO_VALUE.LOW, Config);
axisBean.ServoOff();
}
}
public void Resume()
{
//throw new NotImplementedException();
}
} }
} }
\ No newline at end of file \ No newline at end of file
...@@ -11,9 +11,9 @@ using System.Threading.Tasks; ...@@ -11,9 +11,9 @@ using System.Threading.Tasks;
namespace DeviceLibrary namespace DeviceLibrary
{ {
class ServerCommunication :IDisposable public class ServerCommunication :IDisposable
{ {
volatile StoreStatus _storeStatus = StoreStatus.Debugging; volatile StoreStatus _storeStatus = StoreStatus.None;
public delegate bool InStoreInfoDelegate(JobInfo jobInfo, bool ng, string msg); public delegate bool InStoreInfoDelegate(JobInfo jobInfo, bool ng, string msg);
public event InStoreInfoDelegate InStoreEvent; public event InStoreInfoDelegate InStoreEvent;
public delegate void OutStoreInfoDelegate(JobInfo jobInfo); public delegate void OutStoreInfoDelegate(JobInfo jobInfo);
...@@ -56,7 +56,7 @@ namespace DeviceLibrary ...@@ -56,7 +56,7 @@ namespace DeviceLibrary
{ {
if (Machine.runStatus!= RunStatus.Stop) if (Machine.runStatus!= RunStatus.Stop)
ProcessMsg(Machine.Msg.msg); ProcessMsg(Machine.Msg.msg);
if (!string.IsNullOrEmpty(server)) if (!string.IsNullOrEmpty(server) && storeStatus!= StoreStatus.None)
SendLineStatus(); SendLineStatus();
} }
catch (Exception ex) catch (Exception ex)
......
位置,优先级,高度,宽度,料仓ID,旋转轴位置P2,升降轴库位入料高点P3,升降轴库位入料低点P4,进出轴库位点取料点P3
fix#7,1,24,7,1,139000,85635,76635,216000
fix#13,2,24,13,1,139000,114988,105988,216000
位置,优先级,高度,宽度,料仓ID,旋转轴位置P2,升降轴库位入料高点P3,升降轴库位入料低点P4,进出轴库位点取料点P3
SBDH1-A_0_1_1,167,70,400,1,167437,38641,26141,236079
SBDH1-A_0_1_2,166,70,400,1,167437,128122,115622,236079
SBDH1-A_0_1_3,165,70,400,1,167437,217859,205359,236079
SBDH1-A_0_1_4,164,70,400,1,167437,308066,295566,236079
SBDH1-A_0_1_5,163,70,400,1,167437,398080,385580,236079
SBDH1-A_0_2_1,162,70,400,1,167437,1296670,1284170,236079
SBDH1-A_0_2_2,161,70,400,1,167437,1385803,1373303,236079
SBDH1-A_0_2_3,160,70,400,1,167437,1476070,1463570,236079
SBDH1-A_0_2_4,159,70,400,1,167437,1565548,1553048,236079
SBDH1-A_0_3_1,158,70,400,1,167437,1655419,1642919,236079
SBDH1-A_0_3_2,157,70,400,1,167437,1745134,1732634,236079
SBDH1-A_0_3_3,156,70,400,1,167437,1835143,1822643,236079
SBDH1-A_0_3_4,155,70,400,1,167437,1924729,1912229,236079
SBDH1-A_1_1_1,154,70,400,1,212423,38641,26141,236079
SBDH1-A_1_1_2,153,70,400,1,212423,128122,115622,236079
SBDH1-A_1_1_3,152,70,400,1,212423,217859,205359,236079
SBDH1-A_1_1_4,151,70,400,1,212423,308066,295566,236079
SBDH1-A_1_1_5,150,70,400,1,212423,398080,385580,236079
SBDH1-A_1_2_1,149,70,400,1,212423,488833,474333,236079
SBDH1-A_1_2_2,148,70,400,1,212423,577355,562855,236079
SBDH1-A_1_2_3,147,70,400,1,212423,668273,655773,236079
SBDH1-A_1_2_4,146,70,400,1,212423,758092,745592,236079
SBDH1-A_1_2_5,145,70,400,1,212423,847654,835154,236079
SBDH1-A_1_3_1,144,70,400,1,212423,937086,924586,236079
SBDH1-A_1_3_2,143,70,400,1,212423,1027062,1014562,236079
SBDH1-A_1_3_3,142,70,400,1,212423,1117186,1104686,236079
SBDH1-A_1_3_4,141,70,400,1,212423,1206951,1194451,236079
SBDH1-A_1_3_5,140,70,400,1,212423,1296670,1284170,236079
SBDH1-A_1_3_6,139,70,400,1,212423,1385803,1373303,236079
SBDH1-A_1_4_1,138,70,400,1,212423,1476070,1463570,236079
SBDH1-A_1_4_2,137,70,400,1,212423,1565548,1553048,236079
SBDH1-A_1_4_3,136,70,400,1,212423,1655419,1642919,236079
SBDH1-A_1_4_4,135,70,400,1,212423,1745134,1732634,236079
SBDH1-A_1_4_5,134,70,400,1,212423,1835143,1822643,236079
SBDH1-A_1_4_6,133,70,400,1,212423,1924729,1912229,236079
SBDH1-A_2_1_1,132,70,400,1,257580,38641,26141,236079
SBDH1-A_2_1_2,131,70,400,1,257580,128122,115622,236079
SBDH1-A_2_1_3,130,70,400,1,257580,217859,205359,236079
SBDH1-A_2_1_4,129,70,400,1,257580,308066,295566,236079
SBDH1-A_2_1_5,128,70,400,1,257580,398080,385580,236079
SBDH1-A_2_2_1,127,70,400,1,257580,488833,476333,236079
SBDH1-A_2_2_2,126,70,400,1,257580,577355,564855,236079
SBDH1-A_2_2_3,125,70,400,1,257580,668273,655773,236079
SBDH1-A_2_2_4,124,70,400,1,257580,758092,745592,236079
SBDH1-A_2_2_5,123,70,400,1,257580,847654,835154,236079
SBDH1-A_2_3_1,122,70,400,1,257580,937086,924586,236079
SBDH1-A_2_3_2,121,70,400,1,257580,1027062,1014562,236079
SBDH1-A_2_3_3,120,70,400,1,257580,1117186,1104686,236079
SBDH1-A_2_3_4,119,70,400,1,257580,1206951,1194451,236079
SBDH1-A_2_3_5,118,70,400,1,257580,1296670,1284170,236079
SBDH1-A_2_3_6,117,70,400,1,257580,1385803,1373303,236079
SBDH1-A_2_4_1,116,70,400,1,257580,1476070,1463570,236079
SBDH1-A_2_4_2,115,70,400,1,257580,1565548,1553048,236079
SBDH1-A_2_4_3,114,70,400,1,257580,1655419,1642919,236079
SBDH1-A_2_4_4,113,70,400,1,257580,1745134,1732634,236079
SBDH1-A_2_4_5,112,70,400,1,257580,1835143,1822643,236079
SBDH1-A_2_4_6,111,70,400,1,257580,1924729,1912229,236079
SBDH1-A_3_1_1,110,70,400,1,302609,38641,26141,236079
SBDH1-A_3_1_2,109,70,400,1,302609,128122,115622,236079
SBDH1-A_3_1_3,108,70,400,1,302609,217859,205359,236079
SBDH1-A_3_1_4,107,70,400,1,302609,308066,295566,236079
SBDH1-A_3_1_5,106,70,400,1,302609,398080,385580,236079
SBDH1-A_3_2_1,105,70,400,1,302609,488833,476333,236079
SBDH1-A_3_2_2,104,70,400,1,302609,577355,564855,236079
SBDH1-A_3_2_3,103,70,400,1,302609,668273,655773,236079
SBDH1-A_3_2_4,102,70,400,1,302609,758092,745592,236079
SBDH1-A_3_2_5,101,70,400,1,302609,847654,835154,236079
SBDH1-A_3_3_1,100,70,400,1,302609,937086,924586,236079
SBDH1-A_3_3_2,99,70,400,1,302609,1027062,1014562,236079
SBDH1-A_3_3_3,98,70,400,1,302609,1117186,1104686,236079
SBDH1-A_3_3_4,97,70,400,1,302609,1206951,1194451,236079
SBDH1-A_3_3_5,96,70,400,1,302609,1296670,1284170,236079
SBDH1-A_3_3_6,95,70,400,1,302609,1385803,1373303,236079
SBDH1-A_3_4_1,94,70,400,1,302609,1476070,1463570,236079
SBDH1-A_3_4_2,93,70,400,1,302609,1565548,1553048,236079
SBDH1-A_3_4_3,92,70,400,1,302609,1655419,1642919,236079
SBDH1-A_3_4_4,91,70,400,1,302609,1745134,1732634,236079
SBDH1-A_3_4_5,90,70,400,1,302609,1835143,1822643,236079
SBDH1-A_3_4_6,89,70,400,1,302609,1924729,1912229,236079
SBDH1-A_4_1_1,88,70,400,1,347622,38641,26141,236079
SBDH1-A_4_1_2,87,70,400,1,347622,128122,115622,236079
SBDH1-A_4_1_3,86,70,400,1,347622,217859,205359,236079
SBDH1-A_4_1_4,85,70,400,1,347622,308066,295566,236079
SBDH1-A_4_1_5,84,70,400,1,347622,398080,385580,236079
SBDH1-A_4_2_1,83,70,400,1,347622,488833,476333,236079
SBDH1-A_4_2_2,82,70,400,1,347622,577355,564855,236079
SBDH1-A_4_2_3,81,70,400,1,347622,668273,655773,236079
SBDH1-A_4_2_4,80,70,400,1,347622,758092,745592,236079
SBDH1-A_4_2_5,79,70,400,1,347622,847654,835154,236079
SBDH1-A_4_3_1,78,70,400,1,347622,937086,924586,236079
SBDH1-A_4_3_2,77,70,400,1,347622,1027062,1014562,236079
SBDH1-A_4_3_3,76,70,400,1,347622,1117186,1104686,236079
SBDH1-A_4_3_4,75,70,400,1,347622,1206951,1194451,236079
SBDH1-A_4_3_5,74,70,400,1,347622,1296670,1284170,236079
SBDH1-A_4_3_6,73,70,400,1,347622,1385803,1373303,236079
SBDH1-A_4_4_1,72,70,400,1,347622,1476070,1463570,236079
SBDH1-A_4_4_2,71,70,400,1,347622,1565548,1553048,236079
SBDH1-A_4_4_3,70,70,400,1,347622,1655419,1642919,236079
SBDH1-A_4_4_4,69,70,400,1,347622,1745134,1732634,236079
SBDH1-A_4_4_5,68,70,400,1,347622,1835143,1822643,236079
SBDH1-A_4_4_6,67,70,400,1,347622,1924729,1912229,236079
SBDH1-A_5_1_1,66,70,400,1,32695,38641,26141,236079
SBDH1-A_5_1_2,65,70,400,1,32695,128122,115622,236079
SBDH1-A_5_1_3,64,70,400,1,32695,217859,205359,236079
SBDH1-A_5_1_4,63,70,400,1,32695,308066,295566,236079
SBDH1-A_5_1_5,62,70,400,1,32695,398080,385580,236079
SBDH1-A_5_2_1,61,70,400,1,32695,488833,476333,236079
SBDH1-A_5_2_2,60,70,400,1,32695,577355,564855,236079
SBDH1-A_5_2_3,59,70,400,1,32695,668273,655773,236079
SBDH1-A_5_2_4,58,70,400,1,32695,758092,745592,236079
SBDH1-A_5_2_5,57,70,400,1,32695,847654,835154,236079
SBDH1-A_5_3_1,56,70,400,1,32695,937086,924586,236079
SBDH1-A_5_3_2,55,70,400,1,32695,1027062,1014562,236079
SBDH1-A_5_3_3,54,70,400,1,32695,1117186,1104686,236079
SBDH1-A_5_3_4,53,70,400,1,32695,1206951,1194451,236079
SBDH1-A_5_3_5,52,70,400,1,32695,1296670,1284170,236079
SBDH1-A_5_3_6,51,70,400,1,32695,1385803,1373303,236079
SBDH1-A_5_4_1,50,70,400,1,32695,1476070,1463570,236079
SBDH1-A_5_4_2,49,70,400,1,32695,1565548,1553048,236079
SBDH1-A_5_4_3,48,70,400,1,32695,1655419,1642919,236079
SBDH1-A_5_4_4,47,70,400,1,32695,1745134,1732634,236079
SBDH1-A_5_4_5,46,70,400,1,32695,1835143,1822643,236079
SBDH1-A_5_4_6,45,70,400,1,32695,1924729,1912229,236079
SBDH1-A_6_1_1,44,70,400,1,77558,38641,26141,236079
SBDH1-A_6_1_2,43,70,400,1,77558,128122,115622,236079
SBDH1-A_6_1_3,42,70,400,1,77558,217859,205359,236079
SBDH1-A_6_1_4,41,70,400,1,77558,308066,295566,236079
SBDH1-A_6_1_5,40,70,400,1,77558,398080,385580,236079
SBDH1-A_6_2_1,39,70,400,1,77558,488833,476333,236079
SBDH1-A_6_2_2,38,70,400,1,77558,577355,564855,236079
SBDH1-A_6_2_3,37,70,400,1,77558,668273,655773,236079
SBDH1-A_6_2_4,36,70,400,1,77558,758092,745592,236079
SBDH1-A_6_2_5,35,70,400,1,77558,847654,835154,236079
SBDH1-A_6_3_1,34,70,400,1,77558,937086,924586,236079
SBDH1-A_6_3_2,33,70,400,1,77558,1027062,1014562,236079
SBDH1-A_6_3_3,32,70,400,1,77558,1117186,1104686,236079
SBDH1-A_6_3_4,31,70,400,1,77558,1206951,1194451,236079
SBDH1-A_6_3_5,30,70,400,1,77558,1296670,1284170,236079
SBDH1-A_6_3_6,29,70,400,1,77558,1385803,1373303,236079
SBDH1-A_6_4_1,28,70,400,1,77558,1476070,1463570,236079
SBDH1-A_6_4_2,27,70,400,1,77558,1565548,1553048,236079
SBDH1-A_6_4_3,26,70,400,1,77558,1655419,1642919,236079
SBDH1-A_6_4_4,25,70,400,1,77558,1745134,1732634,236079
SBDH1-A_6_4_5,24,70,400,1,77558,1835143,1822643,236079
SBDH1-A_6_4_6,23,70,400,1,77558,1924729,1912229,236079
SBDH1-A_7_1_1,22,70,400,1,122707,38641,26141,236079
SBDH1-A_7_1_2,21,70,400,1,122707,128122,115622,236079
SBDH1-A_7_1_3,20,70,400,1,122707,217859,205359,236079
SBDH1-A_7_1_4,19,70,400,1,122707,308066,295566,236079
SBDH1-A_7_1_5,18,70,400,1,122707,398080,385580,236079
SBDH1-A_7_2_1,17,70,400,1,122707,488833,476333,236079
SBDH1-A_7_2_2,16,70,400,1,122707,577355,564855,236079
SBDH1-A_7_2_3,15,70,400,1,122707,668273,655773,236079
SBDH1-A_7_2_4,14,70,400,1,122707,758092,745592,236079
SBDH1-A_7_2_5,13,70,400,1,122707,847654,835154,236079
SBDH1-A_7_3_1,12,70,400,1,122707,937086,924586,236079
SBDH1-A_7_3_2,11,70,400,1,122707,1027062,1014562,236079
SBDH1-A_7_3_3,10,70,400,1,122707,1117186,1104686,236079
SBDH1-A_7_3_4,9,70,400,1,122707,1206951,1194451,236079
SBDH1-A_7_3_5,8,70,400,1,122707,1296670,1284170,236079
SBDH1-A_7_3_6,7,70,400,1,122707,1385803,1373303,236079
SBDH1-A_7_4_1,6,70,400,1,122707,1476070,1463570,236079
SBDH1-A_7_4_2,5,70,400,1,122707,1565548,1553048,236079
SBDH1-A_7_4_3,4,70,400,1,122707,1655419,1642919,236079
SBDH1-A_7_4_4,3,70,400,1,122707,1745134,1732634,236079
SBDH1-A_7_4_5,2,70,400,1,122707,1835143,1822643,236079
SBDH1-A_7_4_6,1,70,400,1,122707,1924729,1912229,236079
位置,优先级,高度,宽度,料仓ID,旋转轴位置P2,升降轴库位入料高点P3,升降轴库位入料低点P4,进出轴库位点取料点P3
fix#7,1,24,7,1,139000,85635,76635,216000
fix#13,2,24,13,1,139000,114988,105988,216000
位置,优先级,高度,宽度,料仓ID,旋转轴位置P2,升降轴库位入料高点P3,升降轴库位入料低点P4,进出轴库位点取料点P3
SBDH1-B_0_1_1,167,70,400,1,166801,40492,25701,237161
SBDH1-B_0_1_2,166,70,400,1,166801,129310,114590,237161
SBDH1-B_0_1_3,165,70,400,1,166801,220168,205493,237161
SBDH1-B_0_1_4,164,70,400,1,166801,309536,294909,237161
SBDH1-B_0_1_5,163,70,400,1,166801,399125,384705,237161
SBDH1-B_0_2_1,162,70,400,1,166801,1300562,1284206,237161
SBDH1-B_0_2_2,161,70,400,1,166801,1389764,1373408,237161
SBDH1-B_0_2_3,160,70,400,1,166801,1480391,1461035,237161
SBDH1-B_0_2_4,159,70,400,1,166801,1570324,1550968,237161
SBDH1-B_0_3_1,158,70,400,1,166801,1660317,1640961,237161
SBDH1-B_0_3_2,157,70,400,1,166801,1749985,1730629,237161
SBDH1-B_0_3_3,156,70,400,1,166801,1840489,1821133,237161
SBDH1-B_0_3_4,155,70,400,1,166801,1925274,1910118,237161
SBDH1-B_1_1_1,154,70,400,1,211692,42057,25701,237161
SBDH1-B_1_1_2,153,70,400,1,211692,130946,114590,237161
SBDH1-B_1_1_3,152,70,400,1,211692,221849,205493,237161
SBDH1-B_1_1_4,151,70,400,1,211692,311265,294909,237161
SBDH1-B_1_1_5,150,70,400,1,211692,401061,384705,237161
SBDH1-B_1_2_1,149,70,400,1,211692,490875,474519,237161
SBDH1-B_1_2_2,148,70,400,1,211692,580036,563680,237161
SBDH1-B_1_2_3,147,70,400,1,211692,669991,653635,237161
SBDH1-B_1_2_4,146,70,400,1,211692,760306,743950,237161
SBDH1-B_1_2_5,145,70,400,1,211692,850802,834446,237161
SBDH1-B_1_3_1,144,70,400,1,211692,940586,924230,237161
SBDH1-B_1_3_2,143,70,400,1,211692,1030246,1013890,237161
SBDH1-B_1_3_3,142,70,400,1,211692,1121097,1104741,237161
SBDH1-B_1_3_4,141,70,400,1,211692,1210232,1193876,237161
SBDH1-B_1_3_5,140,70,400,1,211692,1300562,1284206,237161
SBDH1-B_1_3_6,139,70,400,1,211692,1389764,1373408,237161
SBDH1-B_1_4_1,138,70,400,1,211692,1480391,1461035,237161
SBDH1-B_1_4_2,137,70,400,1,211692,1570324,1550968,237161
SBDH1-B_1_4_3,136,70,400,1,211692,1660317,1640961,237161
SBDH1-B_1_4_4,135,70,400,1,211692,1749985,1730629,237161
SBDH1-B_1_4_5,134,70,400,1,211692,1840489,1821133,237161
SBDH1-B_1_4_6,133,70,400,1,211692,1925274,1910118,237161
SBDH1-B_2_1_1,132,70,400,1,256789,42057,25701,237161
SBDH1-B_2_1_2,131,70,400,1,256789,130946,114590,237161
SBDH1-B_2_1_3,130,70,400,1,256789,221849,205493,237161
SBDH1-B_2_1_4,129,70,400,1,256789,311265,294909,237161
SBDH1-B_2_1_5,128,70,400,1,256789,401061,384705,237161
SBDH1-B_2_2_1,127,70,400,1,256789,490875,474519,237161
SBDH1-B_2_2_2,126,70,400,1,256789,580036,563680,237161
SBDH1-B_2_2_3,125,70,400,1,256789,669991,653635,237161
SBDH1-B_2_2_4,124,70,400,1,256789,760306,743950,237161
SBDH1-B_2_2_5,123,70,400,1,256789,850802,834446,237161
SBDH1-B_2_3_1,122,70,400,1,256789,940586,924230,237161
SBDH1-B_2_3_2,121,70,400,1,256789,1030246,1013890,237161
SBDH1-B_2_3_3,120,70,400,1,256789,1121097,1104741,237161
SBDH1-B_2_3_4,119,70,400,1,256789,1210232,1193876,237161
SBDH1-B_2_3_5,118,70,400,1,256789,1300562,1284206,237161
SBDH1-B_2_3_6,117,70,400,1,256789,1389764,1373408,237161
SBDH1-B_2_4_1,116,70,400,1,256789,1480391,1461035,237161
SBDH1-B_2_4_2,115,70,400,1,256789,1570324,1550968,237161
SBDH1-B_2_4_3,114,70,400,1,256789,1660317,1640961,237161
SBDH1-B_2_4_4,113,70,400,1,256789,1749985,1730629,237161
SBDH1-B_2_4_5,112,70,400,1,256789,1840489,1821133,237161
SBDH1-B_2_4_6,111,70,400,1,256789,1925274,1910118,237161
SBDH1-B_3_1_1,110,70,400,1,301878,42057,25701,237161
SBDH1-B_3_1_2,109,70,400,1,301825,130946,114590,237161
SBDH1-B_3_1_3,108,70,400,1,301825,221849,205493,237161
SBDH1-B_3_1_4,107,70,400,1,301825,311265,294909,237161
SBDH1-B_3_1_5,106,70,400,1,301825,401061,384705,237161
SBDH1-B_3_2_1,105,70,400,1,301825,490875,474519,237161
SBDH1-B_3_2_2,104,70,400,1,301825,580036,563680,237161
SBDH1-B_3_2_3,103,70,400,1,301825,669991,653635,237161
SBDH1-B_3_2_4,102,70,400,1,301825,760306,743950,237161
SBDH1-B_3_2_5,101,70,400,1,301825,850802,834446,237161
SBDH1-B_3_3_1,100,70,400,1,301825,940586,924230,237161
SBDH1-B_3_3_2,99,70,400,1,301825,1030246,1013890,237161
SBDH1-B_3_3_3,98,70,400,1,301825,1121097,1104741,237161
SBDH1-B_3_3_4,97,70,400,1,301825,1210232,1193876,237161
SBDH1-B_3_3_5,96,70,400,1,301825,1300562,1284206,237161
SBDH1-B_3_3_6,95,70,400,1,301825,1389764,1373408,237161
SBDH1-B_3_4_1,94,70,400,1,301825,1480391,1461035,237161
SBDH1-B_3_4_2,93,70,400,1,301825,1570324,1550968,237161
SBDH1-B_3_4_3,92,70,400,1,301825,1660317,1640961,237161
SBDH1-B_3_4_4,91,70,400,1,301825,1749985,1730629,237161
SBDH1-B_3_4_5,90,70,400,1,301825,1840489,1821133,237161
SBDH1-B_3_4_6,89,70,400,1,301825,1925274,1910118,237161
SBDH1-B_4_1_1,88,70,400,1,346670,42057,22701,237161
SBDH1-B_4_1_2,87,70,400,1,346670,130946,111590,237161
SBDH1-B_4_1_3,86,70,400,1,346670,221849,202493,237161
SBDH1-B_4_1_4,85,70,400,1,346670,311265,291909,237161
SBDH1-B_4_1_5,84,70,400,1,346670,401061,381705,237161
SBDH1-B_4_2_1,83,70,400,1,346670,490875,471519,237161
SBDH1-B_4_2_2,82,70,400,1,346670,580036,560680,237161
SBDH1-B_4_2_3,81,70,400,1,346670,669991,650635,237161
SBDH1-B_4_2_4,80,70,400,1,346670,760306,740950,237161
SBDH1-B_4_2_5,79,70,400,1,346670,850802,831446,237161
SBDH1-B_4_3_1,78,70,400,1,346670,940586,921230,237161
SBDH1-B_4_3_2,77,70,400,1,346670,1030246,1010890,237161
SBDH1-B_4_3_3,76,70,400,1,346670,1121097,1101741,237161
SBDH1-B_4_3_4,75,70,400,1,346670,1210232,1190876,237161
SBDH1-B_4_3_5,74,70,400,1,346670,1300562,1281206,237161
SBDH1-B_4_3_6,73,70,400,1,346670,1389764,1370408,237161
SBDH1-B_4_4_1,72,70,400,1,346670,1480391,1461035,237161
SBDH1-B_4_4_2,71,70,400,1,346670,1570324,1550968,237161
SBDH1-B_4_4_3,70,70,400,1,346670,1660317,1640961,237161
SBDH1-B_4_4_4,69,70,400,1,346670,1749985,1730629,237161
SBDH1-B_4_4_5,68,70,400,1,346670,1840489,1821133,237161
SBDH1-B_4_4_6,67,70,400,1,346670,1925274,1910118,237161
SBDH1-B_5_1_1,66,70,400,1,31856,44577,25221,237161
SBDH1-B_5_1_2,65,70,400,1,31856,133091,113735,237161
SBDH1-B_5_1_3,64,70,400,1,31856,224093,204737,237161
SBDH1-B_5_1_4,63,70,400,1,31856,313822,294466,237161
SBDH1-B_5_1_5,62,70,400,1,31856,404120,384764,237161
SBDH1-B_5_2_1,61,70,400,1,31856,494170,474814,237161
SBDH1-B_5_2_2,60,70,400,1,31856,583524,564168,237161
SBDH1-B_5_2_3,59,70,400,1,31856,673278,653922,237161
SBDH1-B_5_2_4,58,70,400,1,31856,763990,744634,237161
SBDH1-B_5_2_5,57,70,400,1,31856,853986,834630,237161
SBDH1-B_5_3_1,56,70,400,1,31856,943102,923746,237161
SBDH1-B_5_3_2,55,70,400,1,31856,1033388,1014032,237161
SBDH1-B_5_3_3,54,70,400,1,31856,1123392,1104036,237161
SBDH1-B_5_3_4,53,70,400,1,31856,1213153,1193797,237161
SBDH1-B_5_3_5,52,70,400,1,31856,1303366,1284010,237161
SBDH1-B_5_3_6,51,70,400,1,31856,1393586,1374230,237161
SBDH1-B_5_4_1,50,70,400,1,31856,1482939,1463583,237161
SBDH1-B_5_4_2,49,70,400,1,31856,1572979,1553623,237161
SBDH1-B_5_4_3,48,70,400,1,31856,1662948,1643592,237161
SBDH1-B_5_4_4,47,70,400,1,31856,1752379,1733023,237161
SBDH1-B_5_4_5,46,70,400,1,31856,1843226,1823870,237161
SBDH1-B_5_4_6,45,70,400,1,31856,1925274,1913293,237161
SBDH1-B_6_1_1,44,70,400,1,76877,42642,23286,237161
SBDH1-B_6_1_2,43,70,400,1,76877,132698,113342,237161
SBDH1-B_6_1_3,42,70,400,1,76877,223900,204544,237161
SBDH1-B_6_1_4,41,70,400,1,76877,313263,293907,237161
SBDH1-B_6_1_5,40,70,400,1,76877,402875,383519,237161
SBDH1-B_6_2_1,39,70,400,1,76877,493152,473796,237161
SBDH1-B_6_2_2,38,70,400,1,76877,582259,562903,237161
SBDH1-B_6_2_3,37,70,400,1,76877,672225,652869,237161
SBDH1-B_6_2_4,36,70,400,1,76877,763064,743708,237161
SBDH1-B_6_2_5,35,70,400,1,76877,852866,833510,237161
SBDH1-B_6_3_1,34,70,400,1,76877,942828,923472,237161
SBDH1-B_6_3_2,33,70,400,1,76877,1032731,1013375,237161
SBDH1-B_6_3_3,32,70,400,1,76877,1123000,1103644,237161
SBDH1-B_6_3_4,31,70,400,1,76877,1213350,1193994,237161
SBDH1-B_6_3_5,30,70,400,1,76877,1302496,1283140,237161
SBDH1-B_6_3_6,29,70,400,1,76877,1392781,1373425,237161
SBDH1-B_6_4_1,28,70,400,1,76877,1482775,1463419,237161
SBDH1-B_6_4_2,27,70,400,1,76877,1571379,1552023,237161
SBDH1-B_6_4_3,26,70,400,1,76877,1662470,1643114,237161
SBDH1-B_6_4_4,25,70,400,1,76877,1743305,1723949,237161
SBDH1-B_6_4_5,24,70,400,1,76877,1842674,1823318,237161
SBDH1-B_6_4_6,23,70,400,1,76877,1925274,1913143,237161
SBDH1-B_7_1_1,22,70,400,1,121575,42037,22681,237161
SBDH1-B_7_1_2,21,70,400,1,121575,131074,111718,237161
SBDH1-B_7_1_3,20,70,400,1,121575,222469,203113,237161
SBDH1-B_7_1_4,19,70,400,1,121575,311552,292196,237161
SBDH1-B_7_1_5,18,70,400,1,121575,401364,382008,237161
SBDH1-B_7_2_1,17,70,400,1,121575,491562,472206,237161
SBDH1-B_7_2_2,16,70,400,1,121575,581330,561974,237161
SBDH1-B_7_2_3,15,70,400,1,121575,672515,653159,237161
SBDH1-B_7_2_4,14,70,400,1,121575,762223,742867,237161
SBDH1-B_7_2_5,13,70,400,1,121575,851191,831835,237161
SBDH1-B_7_3_1,12,70,400,1,121575,941451,922095,237161
SBDH1-B_7_3_2,11,70,400,1,121575,1031157,1011801,237161
SBDH1-B_7_3_3,10,70,400,1,121575,1122003,1102647,237161
SBDH1-B_7_3_4,9,70,400,1,121575,1211210,1191854,237161
SBDH1-B_7_3_5,8,70,400,1,121575,1302389,1283033,237161
SBDH1-B_7_3_6,7,70,400,1,121575,1392075,1372719,237161
SBDH1-B_7_4_1,6,70,400,1,121575,1481255,1461899,237161
SBDH1-B_7_4_2,5,70,400,1,121575,1570364,1551008,237161
SBDH1-B_7_4_3,4,70,400,1,121575,1661000,1641644,237161
SBDH1-B_7_4_4,3,70,400,1,121575,1751188,1731832,237161
SBDH1-B_7_4_5,2,70,400,1,121575,1841435,1822079,237161
SBDH1-B_7_4_6,1,70,400,1,121575,1925274,1911695,237161
...@@ -32,6 +32,7 @@ namespace DeviceLibrary ...@@ -32,6 +32,7 @@ namespace DeviceLibrary
public bool IsComplateOrFree { get => MoveInfo.MoveStep == MoveStep.Wait && !movelock; } public bool IsComplateOrFree { get => MoveInfo.MoveStep == MoveStep.Wait && !movelock; }
public bool IsTakedReel { get => MoveInfo.MoveStep >= MoveStep.StoreTS10; } public bool IsTakedReel { get => MoveInfo.MoveStep >= MoveStep.StoreTS10; }
public bool IsPutOnOut {get=> MoveInfo.MoveStep >= MoveStep.StoreTS16; } public bool IsPutOnOut {get=> MoveInfo.MoveStep >= MoveStep.StoreTS16; }
public bool IsPutIn {get=> MoveInfo.MoveStep >= MoveStep.StoreTS14; }
MsgService Msg; MsgService Msg;
...@@ -131,7 +132,7 @@ namespace DeviceLibrary ...@@ -131,7 +132,7 @@ namespace DeviceLibrary
if (!IgnoreX09 && !MoveInfo.MoveParam.ReelOnFixture && IOManager.IOValue(SIO_Type.TrayCheck_Fixture,Config).Equals(IO_VALUE.HIGH)) if (!IgnoreX09 && !MoveInfo.MoveParam.ReelOnFixture && IOManager.IOValue(SIO_Type.TrayCheck_Fixture,Config).Equals(IO_VALUE.HIGH))
{ {
if (!IgnoreX09 && IOMonitor.IODebound(SIO_Type.TrayCheck_Fixture, Config, IO_VALUE.HIGH, 5000)) if (!IgnoreX09 && IOMonitor.IODebound(SIO_Type.TrayCheck_Fixture, Config, IO_VALUE.HIGH, 5000))
Msg.add(string.Format("取料时料叉{0}检测到有物料无法继续,请检查.",Config.DIList[SIO_Type.TrayCheck_Fixture].ElectricalDefinition), MsgLevel.alarm, ErrInfo.X09_BoxNotDetect); Msg.add(string.Format(crc.GetString("Res0002","取料时料叉{0}检测到有物料无法继续,请检查."),Config.DIList[SIO_Type.TrayCheck_Fixture].ElectricalDefinition), MsgLevel.alarm, ErrInfo.X09_BoxNotDetect);
} }
else else
{ {
...@@ -196,13 +197,15 @@ namespace DeviceLibrary ...@@ -196,13 +197,15 @@ namespace DeviceLibrary
DoorControl.Invoke(false); DoorControl.Invoke(false);
if (!IgnoreX09 && IOManager.IOValue(SIO_Type.TrayCheck_Fixture,Config).Equals(IO_VALUE.LOW)) if (!IgnoreX09 && IOManager.IOValue(SIO_Type.TrayCheck_Fixture,Config).Equals(IO_VALUE.LOW))
{ {
Msg.add(string.Format("取料后料叉{0}没有检测到物料无法继续,请检查.", Config.DIList[SIO_Type.TrayCheck_Fixture].ElectricalDefinition), MsgLevel.alarm, ErrInfo.X09_BoxNotDetect); Msg.add(string.Format(crc.GetString("Res0003","取料后料叉{0}没有检测到物料无法继续,请检查."), Config.DIList[SIO_Type.TrayCheck_Fixture].ElectricalDefinition), MsgLevel.alarm, ErrInfo.X09_BoxNotDetect);
MoveInfo.log($"{storeMoveType}:"+ string.Format("取料后料叉{0}没有检测到物料无法继续,请检查.", Config.DIList[SIO_Type.TrayCheck_Fixture].ElectricalDefinition));
} }
else else
{ {
Msg.add("", MsgLevel.info, ErrInfo.X09_Clear); Msg.add("", MsgLevel.info, ErrInfo.X09_Clear);
IgnoreX09 = false; IgnoreX09 = false;
if (To.posid == BoxStorePosition.ngdoor && ConfigHelper.Config.Get($"Device_{mainMachine.MachineSide}_Use_Fixpos",false) && Fix != null) if (To.posid == BoxStorePosition.ngdoor && ConfigHelper.Config.Get($"Device_{mainMachine.MachineSide}_Use_Fixpos", false)
&& Fix != null && From != null && From.posid != Fix.posid)
MoveInfo.NextMoveStep(MoveStep.StoreFIX01); MoveInfo.NextMoveStep(MoveStep.StoreFIX01);
else else
MoveInfo.NextMoveStep(MoveStep.StoreTS10); MoveInfo.NextMoveStep(MoveStep.StoreTS10);
...@@ -288,7 +291,8 @@ namespace DeviceLibrary ...@@ -288,7 +291,8 @@ namespace DeviceLibrary
RobotManage.CameraA.CameraGrabOne(RobotManage.CameraA.GetFixtureStateFilename(To.posid, WareCode, storeMoveType, FixtureState.ToOut)); RobotManage.CameraA.CameraGrabOne(RobotManage.CameraA.GetFixtureStateFilename(To.posid, WareCode, storeMoveType, FixtureState.ToOut));
if (!IgnoreX09 && IOManager.IOValue(SIO_Type.TrayCheck_Fixture,Config).Equals(IO_VALUE.HIGH)) if (!IgnoreX09 && IOManager.IOValue(SIO_Type.TrayCheck_Fixture,Config).Equals(IO_VALUE.HIGH))
{ {
Msg.add(string.Format("放料后料叉{0}上任然检测到物料,请检查.", Config.DIList[SIO_Type.TrayCheck_Fixture].ElectricalDefinition), MsgLevel.alarm, ErrInfo.X09_BoxNotDetect); Msg.add(string.Format(crc.GetString("Res0004","放料后料叉{0}上任然检测到物料,请检查."), Config.DIList[SIO_Type.TrayCheck_Fixture].ElectricalDefinition), MsgLevel.alarm, ErrInfo.X09_BoxNotDetect);
MoveInfo.log($"{storeMoveType}:"+ string.Format("放料后料叉{0}上任然检测到物料,请检查.", Config.DIList[SIO_Type.TrayCheck_Fixture].ElectricalDefinition));
} }
else else
{ {
......
...@@ -47,9 +47,28 @@ namespace DeviceLibrary ...@@ -47,9 +47,28 @@ namespace DeviceLibrary
get => jobInfos.Count; get => jobInfos.Count;
} }
public void ClearLastPosid(string posid) { public void ClearLastPosid(string posid) {
LogUtil.info($"[{jobname}] 清除正在执行的任务:cur:" + posid+",last:"+ lastoutpos); LogUtil.info($"[{jobname}] 清除正在执行的任务:cur:" + posid + ",last:" + lastoutpos);
if (lastoutpos == posid) if (lastoutpos == posid)
lastoutpos = ""; lastoutpos = "";
lock (jobInfos)
{
List<JobInfo> tempList = new List<JobInfo>();
JobInfo item;
while (jobInfos.TryDequeue(out item))
{
if (item.PosId != posid)
{
tempList.Add(item);
}
}
// 重新将剩余的元素加入队列中
foreach (JobInfo i in tempList)
{
jobInfos.Enqueue(i);
}
}
} }
} }
......
...@@ -23,15 +23,38 @@ namespace DeviceLibrary ...@@ -23,15 +23,38 @@ namespace DeviceLibrary
if (IOValue(IO_Type.SuddenStop_BTN, Config).Equals(IO_VALUE.HIGH)) if (IOValue(IO_Type.SuddenStop_BTN, Config).Equals(IO_VALUE.HIGH))
{ {
MsgService.Add(crc.GetString("Res0131","按下复位按钮."), MsgLevel.info, ErrInfo.ResetBtn); MsgService.Add(crc.GetString("Res0131","按下复位按钮."), MsgLevel.info, ErrInfo.ResetBtn);
if (!RobotManage.isRunning) //if (!RobotManage.isRunning)
RobotManage.Start(MachineSideE.Left | MachineSideE.Right); RobotManage.Start(MachineSideE.Left | MachineSideE.Right);
} }
else else
{ {
MsgService.Add(crc.GetString("Res0132","急停未解除,按下复位按钮尝试复位安全继电器."), MsgLevel.info, ErrInfo.SuddenStop); MsgService.Add(crc.GetString("Res0132","急停未解除,按下复位按钮尝试复位安全继电器."), MsgLevel.info);
} }
LogUtil.info("按下复位按钮"); LogUtil.info("按下复位按钮");
} }
void HomeReset_BTN()
{
if (IOValue(IO_Type.SuddenStop_BTN, Config).Equals(IO_VALUE.HIGH))
{
MsgService.Add(crc.GetString("Res0131", "按下复位按钮."), MsgLevel.info, ErrInfo.ResetBtn);
}
else
{
MsgService.Add(crc.GetString("Res0132", "急停未解除,按下复位按钮尝试复位安全继电器."), MsgLevel.info, ErrInfo.SuddenStop);
}
LogUtil.info("长按下复位按钮,系统正在运行,开始复位");
RobotManage.Stores.ForEach(s => {
if (s.isRunning)
{
LogUtil.info($"{s.MachineSide}侧回原");
s.BeginHomeReset();
}
});
//ProcessMsgEvent?.Invoke(Msg.get());
}
} }
} }
\ No newline at end of file \ No newline at end of file
...@@ -16,7 +16,29 @@ namespace DeviceLibrary ...@@ -16,7 +16,29 @@ namespace DeviceLibrary
{ {
void ioMonitor() void ioMonitor()
{ {
airprocess();
}
void airprocess()
{
//var temp = HumitureController.QueryData();
var temp = HumitureController.LastData;
var Current_Humidity = temp.Humidity;
var Current_Temperate = temp.Temperate;
//var tempIsOK = Current_Temperate < ServerCM.Max_Temperature;
var humiNeedStart = Current_Humidity > RobotManage.rightMachine.ServerCM.Max_Humidity - Setting_Init.Device_HumidityStartOffser;
var humiNeedStop = Current_Humidity < RobotManage.rightMachine.ServerCM.Max_Humidity - Setting_Init.Device_HumidityEndOffser;
} if (humiNeedStart && IOValue(IO_Type.NitrogenValve, Config).Equals(IO_VALUE.LOW))
{
IOMove(IO_Type.NitrogenValve, IO_VALUE.HIGH, Config);
LogUtil.info($"开始吹气,当前最大湿度:{Current_Humidity} > {RobotManage.rightMachine.ServerCM.Max_Humidity}-{Setting_Init.Device_HumidityStartOffser}.");
}
else if (humiNeedStop && IOValue(IO_Type.NitrogenValve, Config).Equals(IO_VALUE.HIGH))
{
IOMove(IO_Type.NitrogenValve, IO_VALUE.LOW, Config);
LogUtil.info($"关闭吹气,当前最大湿度:{Current_Humidity} < {RobotManage.rightMachine.ServerCM.Max_Humidity}-{Setting_Init.Device_HumidityEndOffser}.");
}
}
} }
} }
...@@ -86,7 +86,7 @@ namespace DeviceLibrary ...@@ -86,7 +86,7 @@ namespace DeviceLibrary
//MachineLedStateName[MachineLedStateE.THoutRangeOver30m] = "温湿度超限30分钟"; //MachineLedStateName[MachineLedStateE.THoutRangeOver30m] = "温湿度超限30分钟";
//MachineLedState.Add(MachineLedStateE.THoutRangeOver30m, nls(LedState.blink, LedState.blink, LedState.none)); //MachineLedState.Add(MachineLedStateE.THoutRangeOver30m, nls(LedState.blink, LedState.blink, LedState.none));
//温湿度超限 绿闪黄闪 //温湿度超限 绿闪黄闪
// MachineLedStateName[MachineLedStateE.THoutRange] = "温湿度超限"; //MachineLedStateName[MachineLedStateE.THoutRange] = "温湿度超限";
//MachineLedState.Add(MachineLedStateE.THoutRange, nls(LedState.none, LedState.blink, LedState.blink)); //MachineLedState.Add(MachineLedStateE.THoutRange, nls(LedState.none, LedState.blink, LedState.blink));
//进出库, 绿亮,黄闪 //进出库, 绿亮,黄闪
MachineLedStateName[MachineLedStateE.InOut] = crc.GetString("ledstate_InOut","出入库中"); MachineLedStateName[MachineLedStateE.InOut] = crc.GetString("ledstate_InOut","出入库中");
......
...@@ -57,6 +57,8 @@ namespace DeviceLibrary ...@@ -57,6 +57,8 @@ namespace DeviceLibrary
AlarmBuzzer.SetOnOffAction(() =>{ IOMove(IO_Type.Alarm_Buzzer, IO_VALUE.HIGH,Config); }, () => { IOMove(IO_Type.Alarm_Buzzer, IO_VALUE.LOW, Config); }); AlarmBuzzer.SetOnOffAction(() =>{ IOMove(IO_Type.Alarm_Buzzer, IO_VALUE.HIGH,Config); }, () => { IOMove(IO_Type.Alarm_Buzzer, IO_VALUE.LOW, Config); });
IOMonitor.RegisterIO(IO_Type.Reset_BTN, Config, IO_VALUE.HIGH, Reset_BTN, 2500, 100); IOMonitor.RegisterIO(IO_Type.Reset_BTN, Config, IO_VALUE.HIGH, Reset_BTN, 2500, 100);
IOMonitor.RegisterIO(IO_Type.Reset_BTN, Config, IO_VALUE.HIGH, HomeReset_BTN, 2500, 3000);
LedProcessInit(); LedProcessInit();
...@@ -101,18 +103,21 @@ namespace DeviceLibrary ...@@ -101,18 +103,21 @@ namespace DeviceLibrary
MsgService.Add(ex.ToString(), MsgLevel.warning); MsgService.Add(ex.ToString(), MsgLevel.warning);
} }
finally { finally {
if (isAlarm) if (isAlarm)
{ {
AlarmBuzzer.OFF();
}
else {
AlarmBuzzer.ON(); AlarmBuzzer.ON();
} }
else
{
AlarmBuzzer.OFF();
}
} }
} }
LogUtil.info("主线程已退出."); LogUtil.info("主线程已退出.");
} }
public void Start() { public void Start() {
runStatus = RunStatus.Running;
Run(); Run();
} }
public void Stop() { public void Stop() {
......
...@@ -129,21 +129,29 @@ namespace DeviceLibrary ...@@ -129,21 +129,29 @@ namespace DeviceLibrary
leftThread.Start(); leftThread.Start();
GC.KeepAlive(leftThread); GC.KeepAlive(leftThread);
} }
Thread.Sleep(500);
Task.Run(()=> { Stores.ForEach(s => {
Task.Delay(1000).Wait(); if ((machineSide & s.MachineSide) == s.MachineSide && s.isRunning)
if (mainMachine.DeviceCheck()) {
{ LogUtil.info($"{machineSide}侧回原");
Stores.ForEach(s=> { //AxisBean.List[s.MachineSide].ForEach((x) => { AxisManager.AlarmClear(x.Config.DeviceName, x.Config.GetAxisValue()); });
if ((machineSide & s.MachineSide) == s.MachineSide && s.isRunning) s.BeginHomeReset();
{
LogUtil.info($"{machineSide}侧回原");
AxisBean.List[s.MachineSide].ForEach((x) => { AxisManager.AlarmClear(x.Config.DeviceName, x.Config.GetAxisValue()); });
s.BeginHomeReset();
}
});
} }
}); });
//Task.Run(()=> {
// Task.Delay(1000).Wait();
// if (mainMachine.DeviceCheck())
// {
// Stores.ForEach(s=> {
// if ((machineSide & s.MachineSide) == s.MachineSide && s.isRunning)
// {
// LogUtil.info($"{machineSide}侧回原");
// AxisBean.List[s.MachineSide].ForEach((x) => { AxisManager.AlarmClear(x.Config.DeviceName, x.Config.GetAxisValue()); });
// s.BeginHomeReset();
// }
// });
// }
//});
Thread.Sleep(100); Thread.Sleep(100);
} }
......
...@@ -21,13 +21,15 @@ namespace DeviceLibrary ...@@ -21,13 +21,15 @@ namespace DeviceLibrary
void Reset_BTN() void Reset_BTN()
{ {
if (IOValue(IO_Type.SuddenStop_BTN, Config).Equals(IO_VALUE.HIGH)) if (IOValue(IO_Type.SuddenStop_BTN, RobotManage.Config).Equals(IO_VALUE.HIGH))
{ {
if (!AxisBean.ClearMultiAlarm(out string msg, AxisBean.List[MachineSide]))
Msg.add(msg, MsgLevel.warning);
MsgService.Add(crc.GetString("Res0131","按下复位按钮."), MsgLevel.info, ErrInfo.ResetBtn); MsgService.Add(crc.GetString("Res0131","按下复位按钮."), MsgLevel.info, ErrInfo.ResetBtn);
} }
else else
{ {
MsgService.Add(crc.GetString("Res0132","急停未解除,按下复位按钮尝试复位安全继电器."), MsgLevel.info, ErrInfo.SuddenStop); MsgService.Add(crc.GetString("Res0132","急停未解除,按下复位按钮尝试复位安全继电器."), MsgLevel.info);
} }
LogUtil.info("按下复位按钮"); LogUtil.info("按下复位按钮");
......
using CodeLibrary; using CodeLibrary;
using Newtonsoft.Json;
using OnlineStore; using OnlineStore;
using OnlineStore.Common; using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary; using OnlineStore.LoadCSVLibrary;
using RemoteSheardObject;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Drawing; using System.Drawing;
...@@ -33,17 +35,25 @@ namespace DeviceLibrary ...@@ -33,17 +35,25 @@ namespace DeviceLibrary
else { else {
StoreMoveInfo.NextMoveStep(MoveStep.StoreIn01); StoreMoveInfo.NextMoveStep(MoveStep.StoreIn01);
StoreMoveInfo.MoveParam = requestLoadInfo.LoadParam.clone(); StoreMoveInfo.MoveParam = requestLoadInfo.LoadParam.clone();
StoreMoveInfo.MoveParam.IsInStore = true;
ConfigHelper.Config.Set($"Runtime_{MachineSide}_DoorInfo", JsonConvert.SerializeObject(StoreMoveInfo.MoveParam));
ConfigHelper.Config.Set($"Runtime_{MachineSide}_IsInStore", true);
ConfigHelper.Config.Set($"Runtime_{MachineSide}_PosID", StoreMoveInfo.MoveParam.PosID);
ConfigHelper.Config.Set($"Runtime_{MachineSide}_PlateH", StoreMoveInfo.MoveParam.PlateH);
ConfigHelper.Config.Set($"Runtime_{MachineSide}_PlateW", StoreMoveInfo.MoveParam.PlateW);
ConfigHelper.Config.Set($"Runtime_{MachineSide}_WareCode", StoreMoveInfo.MoveParam.WareCode);
StoreMoveInfo.log("写入舱门口信息:" + StoreMoveInfo.MoveParam.ToStr());
} }
return true; return true;
} }
public bool DoorLock(RequestLoadInfo requestLoadInfo) { public bool DoorLock(RequestLoadInfo requestLoadInfo) {
if (StoreMoveInfo.MoveStep == MoveStep.Wait && !requestLoadInfo.IsEmpty) if (runStatus== RunStatus.Running && StoreMoveInfo.MoveStep == MoveStep.Wait && !requestLoadInfo.IsEmpty)
{ {
var s = IOValue(SIO_Type.Door_Tray_Check,Config); var s = IOValue(SIO_Type.Door_Tray_Check,Config);
if (s.Equals(IO_VALUE.LOW)) if (s.Equals(IO_VALUE.LOW))
{ {
StoreMoveInfo.NextMoveStep(MoveStep.WaitInStore); StoreMoveInfo.NextMoveStep(MoveStep.WaitInStore);
StoreMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
LogUtil.info("锁定料仓等待入库"); LogUtil.info("锁定料仓等待入库");
return true; return true;
} }
...@@ -62,7 +72,7 @@ namespace DeviceLibrary ...@@ -62,7 +72,7 @@ namespace DeviceLibrary
else { else {
StoreMoveInfo.log("料仓忙碌中,不可锁定"); StoreMoveInfo.log("料仓忙碌中,不可锁定");
return false; return false;
} }
} }
void StoreProcess() void StoreProcess()
{ {
...@@ -71,6 +81,17 @@ namespace DeviceLibrary ...@@ -71,6 +81,17 @@ namespace DeviceLibrary
//常规上料扫码流程 //常规上料扫码流程
switch (StoreMoveInfo.MoveStep) switch (StoreMoveInfo.MoveStep)
{ {
case MoveStep.WaitInStore:
StoreMoveInfo.NextMoveStep(MoveStep.WaitInStore);
StoreMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(1000));
if (IsLineFree() == RemoteResult.True)
{
StoreMoveInfo.log($"MT已经不在入库模式");
StoreMoveInfo.EndMove();
}
else
Msg.add(crc.GetString("Res0020","等待入库物料"), MsgLevel.info);
break;
case MoveStep.Wait: case MoveStep.Wait:
//判断有没有出库任务, 需要入库空闲, 出口空闲 //判断有没有出库任务, 需要入库空闲, 出口空闲
...@@ -96,6 +117,12 @@ namespace DeviceLibrary ...@@ -96,6 +117,12 @@ namespace DeviceLibrary
StoreMoveInfo.MoveParam.PlateH = jobInfo.plateH; StoreMoveInfo.MoveParam.PlateH = jobInfo.plateH;
StoreMoveInfo.MoveParam.PlateW = jobInfo.plateW; StoreMoveInfo.MoveParam.PlateW = jobInfo.plateW;
StoreMoveInfo.log($"开始出库任务:" + jobInfo.ToStr()); StoreMoveInfo.log($"开始出库任务:" + jobInfo.ToStr());
ConfigHelper.Config.Set($"Runtime_{MachineSide}_IsInStore", false);
ConfigHelper.Config.Set($"Runtime_{MachineSide}_PosID", StoreMoveInfo.MoveParam.PosID);
ConfigHelper.Config.Set($"Runtime_{MachineSide}_PlateH", StoreMoveInfo.MoveParam.PlateH);
ConfigHelper.Config.Set($"Runtime_{MachineSide}_PlateW", StoreMoveInfo.MoveParam.PlateW);
ConfigHelper.Config.Set($"Runtime_{MachineSide}_WareCode", StoreMoveInfo.MoveParam.WareCode);
ServerCM.storeStatus = StoreStatus.OutStoreExecute; ServerCM.storeStatus = StoreStatus.OutStoreExecute;
return; return;
} }
...@@ -111,7 +138,9 @@ namespace DeviceLibrary ...@@ -111,7 +138,9 @@ namespace DeviceLibrary
if (StoreMoveInfo.IsTimeOut(10)) if (StoreMoveInfo.IsTimeOut(10))
{ {
StoreMoveInfo.log("入口料盘,获取库位失败"); StoreMoveInfo.log("入口料盘,获取库位失败");
StoreMoveInfo.NewMove(MoveStep.Wait); StoreMoveInfo.MoveParam.IsNg = true;
StoreMoveInfo.MoveParam.NgMsg = $"[{CID}]" + crc.GetString("Res0009","无信息物料");
StoreMoveInfo.NextMoveStep(MoveStep.StoreOut_WaitMT);
} }
break; break;
case MoveStep.StoreIn01: case MoveStep.StoreIn01:
...@@ -120,7 +149,7 @@ namespace DeviceLibrary ...@@ -120,7 +149,7 @@ namespace DeviceLibrary
Msg.add(crc.GetString("Res0156","服务器连接异常"), MsgLevel.warning); Msg.add(crc.GetString("Res0156","服务器连接异常"), MsgLevel.warning);
return; return;
} }
SRec.info(CID, MachineSide == MachineSideE.Left ? "A侧" : "B侧", "开始入库", StoreMoveInfo.MoveParam.PosID); SRec.info(CID, MachineSide == MachineSideE.Left ? crc.GetString("Res0010","A侧") : crc.GetString("Res0011","B侧"), crc.GetString("Res0012","开始入库"), StoreMoveInfo.MoveParam.PosID);
StoreMoveInfo.NextMoveStep(MoveStep.StoreIn02); StoreMoveInfo.NextMoveStep(MoveStep.StoreIn02);
break; break;
...@@ -145,7 +174,7 @@ namespace DeviceLibrary ...@@ -145,7 +174,7 @@ namespace DeviceLibrary
} }
break; break;
case MoveStep.StoreIn04: case MoveStep.StoreIn04:
if (boxTransport.IsPutOnOut) if (boxTransport.IsPutIn)
{ {
if (!ServerCM.SendStoreState(StoreMoveInfo.MoveParam.PosID, StoreStatus.InStoreEnd)) if (!ServerCM.SendStoreState(StoreMoveInfo.MoveParam.PosID, StoreStatus.InStoreEnd))
{ {
...@@ -164,7 +193,7 @@ namespace DeviceLibrary ...@@ -164,7 +193,7 @@ namespace DeviceLibrary
case MoveStep.StoreIn05: case MoveStep.StoreIn05:
if (boxTransport.IsComplateOrFree) if (boxTransport.IsComplateOrFree)
{ {
SRec.info(CID, MachineSide == MachineSideE.Left ? "A侧" : "B侧", "完成入库", StoreMoveInfo.MoveParam.PosID); SRec.info(CID, MachineSide == MachineSideE.Left ? crc.GetString("Res0010","A侧") : crc.GetString("Res0011","B侧"), crc.GetString("Res0013","完成入库"), StoreMoveInfo.MoveParam.PosID);
StoreMoveInfo.log($"料盘已到达目的地"); StoreMoveInfo.log($"料盘已到达目的地");
StoreMoveInfo.EndMove(); StoreMoveInfo.EndMove();
...@@ -182,7 +211,7 @@ namespace DeviceLibrary ...@@ -182,7 +211,7 @@ namespace DeviceLibrary
BoxStorePosition outTo = new BoxStorePosition(Config, StoreSide.NGDoor, StoreMoveInfo.MoveParam); BoxStorePosition outTo = new BoxStorePosition(Config, StoreSide.NGDoor, StoreMoveInfo.MoveParam);
boxTransport.Start(outFrom == null ? null : new BoxStorePosition(Config, outFrom, StoreMoveInfo.MoveParam), outTo, StoreMoveType.OutStore); boxTransport.Start(outFrom == null ? null : new BoxStorePosition(Config, outFrom, StoreMoveInfo.MoveParam), outTo, StoreMoveType.OutStore);
StoreMoveInfo.log($"开始转运料盘"); StoreMoveInfo.log($"开始转运料盘");
SRec.info(CID, MachineSide == MachineSideE.Left ? "A侧" : "B侧", "开始出库", StoreMoveInfo.MoveParam.PosID); SRec.info(CID, MachineSide == MachineSideE.Left ? crc.GetString("Res0010","A侧") : crc.GetString("Res0011","B侧"), crc.GetString("Res0014","开始出库"), StoreMoveInfo.MoveParam.PosID);
break; break;
case MoveStep.StoreOut11: case MoveStep.StoreOut11:
...@@ -219,6 +248,7 @@ namespace DeviceLibrary ...@@ -219,6 +248,7 @@ namespace DeviceLibrary
} }
StoreMoveInfo.NextMoveStep(MoveStep.StoreOut_WaitMT); StoreMoveInfo.NextMoveStep(MoveStep.StoreOut_WaitMT);
StoreMoveInfo.log($"料盘已到达目的地"); StoreMoveInfo.log($"料盘已到达目的地");
TheLine.UpdateLocInfo("", StoreMoveInfo.MoveParam.WareCode, TheLine.LineStatusE.BOXDOOR, CID);
OutStoreJobList.ClearLastPosid(StoreMoveInfo.MoveParam.PosID); OutStoreJobList.ClearLastPosid(StoreMoveInfo.MoveParam.PosID);
} }
...@@ -229,19 +259,19 @@ namespace DeviceLibrary ...@@ -229,19 +259,19 @@ namespace DeviceLibrary
if (StoreMoveInfo.MoveParam.PlateW<=15) if (StoreMoveInfo.MoveParam.PlateW<=15)
tt = TrayTypeE.MTP1.ToString(); tt = TrayTypeE.MTP1.ToString();
if (SendTrayRequest(tt, StoreMoveInfo.MoveParam) >RemoteResult.Timeout) { if (SendTrayRequest(tt, StoreMoveInfo.MoveParam) >RemoteResult.Timeout) {
SRec.info(CID, MachineSide == MachineSideE.Left ? "A侧" : "B侧", "完成出库", StoreMoveInfo.MoveParam.PosID); SRec.info(CID, MachineSide == MachineSideE.Left ? crc.GetString("Res0010","A侧") : crc.GetString("Res0011","B侧"), crc.GetString("Res0015","完成出库"), StoreMoveInfo.MoveParam.PosID);
StoreMoveInfo.WaitList.Add(WaitResultInfo.WaitMsg(crc.GetString("Res0161", "等聊单料门料盘被取走"), MsgLevel.warning)); StoreMoveInfo.WaitList.Add(WaitResultInfo.WaitMsg(crc.GetString("Res0161", "等聊单料门料盘被取走"), MsgLevel.warning));
} }
else else
{ {
StoreMoveInfo.WaitList.Add(WaitResultInfo.WaitMsg("请求环形线空托盘失败", MsgLevel.warning)); StoreMoveInfo.WaitList.Add(WaitResultInfo.WaitMsg(crc.GetString("Res0016","请求环形线空托盘失败"), MsgLevel.warning));
} }
StoreMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(10000)); StoreMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(10000));
break; break;
case MoveStep.StoreOut14: case MoveStep.StoreOut14:
Msg.add("等待环形线取走料盘", MsgLevel.warning); Msg.add(crc.GetString("Res0017","等待环形线取走料盘"), MsgLevel.warning);
if (IOValue(SIO_Type.Door_Tray_Check, Config).Equals(IO_VALUE.LOW)) if (IOValue(SIO_Type.Door_Tray_Check, Config).Equals(IO_VALUE.LOW))
{ {
if (IsLineFree() == RemoteResult.True) if (IsLineFree() == RemoteResult.True)
...@@ -258,7 +288,11 @@ namespace DeviceLibrary ...@@ -258,7 +288,11 @@ namespace DeviceLibrary
} }
string StoreState() { string StoreState() {
string state = crc.GetString("Res0162","空闲中"); string state = crc.GetString("Res0162","空闲中");
if (StoreMoveInfo.MoveStep >= MoveStep.StoreOut10) if (StoreMoveInfo.MoveStep == MoveStep.WaitInStore)
{
state = crc.GetString("Res0020","等待入库物料") + ":" + StoreMoveInfo.MoveParam.PosID;
}
else if (StoreMoveInfo.MoveStep >= MoveStep.StoreOut10)
{ {
state = crc.GetString("Res0163","出库中")+":"+StoreMoveInfo.MoveParam.PosID; state = crc.GetString("Res0163","出库中")+":"+StoreMoveInfo.MoveParam.PosID;
} }
......
...@@ -53,7 +53,7 @@ namespace DeviceLibrary ...@@ -53,7 +53,7 @@ namespace DeviceLibrary
currentAxis = axisList[0]; currentAxis = axisList[0];
PortName = axisList[0].Config.DeviceName; PortName = axisList[0].Config.DeviceName;
SlvAddr = axisList[0].Config.GetAxisValue(); SlvAddr = axisList[0].Config.GetAxisValue();
txtAxisDeviceName.Text = PortName; //txtAxisDeviceName.Text = PortName;
txtAxisValue.Text = SlvAddr.ToString(); txtAxisValue.Text = SlvAddr.ToString();
} }
btnAddMove.BackColor = Color.White; btnAddMove.BackColor = Color.White;
...@@ -224,7 +224,7 @@ namespace DeviceLibrary ...@@ -224,7 +224,7 @@ namespace DeviceLibrary
axis = axisList[cmbAxis.SelectedIndex].Config; axis = axisList[cmbAxis.SelectedIndex].Config;
PortName = axis.DeviceName; PortName = axis.DeviceName;
SlvAddr = axis.GetAxisValue(); SlvAddr = axis.GetAxisValue();
txtAxisDeviceName.Text = PortName; //txtAxisDeviceName.Text = PortName;
txtAxisValue.Text = SlvAddr.ToString(); txtAxisValue.Text = SlvAddr.ToString();
Color color = Color.Black; Color color = Color.Black;
...@@ -353,7 +353,7 @@ namespace DeviceLibrary ...@@ -353,7 +353,7 @@ namespace DeviceLibrary
} }
private void ReadAxisStatus() private void ReadAxisStatus()
{ {
groupBox2.Text = cmbAxis.Text + "-"+crc.GetString("Res0169","状态监控"); groupBox2.Text = cmbAxis.Text + "-" + crc.GetString("Res0169","状态监控");
//【1】更新轴号 //【1】更新轴号
short axisNo = SlvAddr; short axisNo = SlvAddr;
if (axisNo < 0) if (axisNo < 0)
...@@ -393,9 +393,9 @@ namespace DeviceLibrary ...@@ -393,9 +393,9 @@ namespace DeviceLibrary
{ {
return; return;
} }
ShowlbSts(lblPEL, sts.PEL); //正限位信号 //ShowlbSts(lblPEL, sts.PEL); //正限位信号
ShowlbSts(lblORG, sts.ORG); //原点信号 ShowlbSts(lblORG, sts.ORG); //原点信号
ShowlbSts(lblNEL, sts.NEL); //负限位信号 //ShowlbSts(lblNEL, sts.NEL); //负限位信号
//label59.Text = ConvertDecimalToBinary(nTimerAxSts[0]); //轴状态是按bit进行解读,因此这里将AxSts转换为二进制bit进行显示 //label59.Text = ConvertDecimalToBinary(nTimerAxSts[0]); //轴状态是按bit进行解读,因此这里将AxSts转换为二进制bit进行显示
lblAxPrfPos.Text = HCBoardManager.GetAxisPrfPos(axisNo).ToString(); lblAxPrfPos.Text = HCBoardManager.GetAxisPrfPos(axisNo).ToString();
......
...@@ -57,7 +57,14 @@ namespace TheMachine ...@@ -57,7 +57,14 @@ namespace TheMachine
{ {
e.Cancel = true; e.Cancel = true;
this.WindowState = FormWindowState.Minimized; this.WindowState = FormWindowState.Minimized;
return;
} }
LogUtil.info("系统强制退出应用 step1");
btn_stop_Click(sender, EventArgs.Empty);
Thread.Sleep(2000);
LogUtil.info("系统强制退出应用 step2");
Application.Exit();
LogUtil.info("系统强制退出应用 step3");
} }
LogControl lc = new LogControl(); LogControl lc = new LogControl();
...@@ -69,20 +76,20 @@ namespace TheMachine ...@@ -69,20 +76,20 @@ namespace TheMachine
readonly System.Windows.Forms.Timer t1 = new System.Windows.Forms.Timer(); readonly System.Windows.Forms.Timer t1 = new System.Windows.Forms.Timer();
private void Form1_Load(object sender, EventArgs e) private void Form1_Load(object sender, EventArgs e)
{ {
this.Width = Screen.PrimaryScreen.WorkingArea.Width;//获取主显⽰设备的桌⾯宽度 //this.Width = Screen.PrimaryScreen.WorkingArea.Width;//获取主显⽰设备的桌⾯宽度
this.Height = Screen.PrimaryScreen.WorkingArea.Height;//获取主显⽰设备的桌⾯⾼度 //this.Height = Screen.PrimaryScreen.WorkingArea.Height;//获取主显⽰设备的桌⾯⾼度
if (this.Width > 1366) //if (this.Width > 1366)
this.Width = 1366; // this.Width = 1366;
if (this.Height > 900) //if (this.Height > 900)
this.Height = 900; // this.Height = 900;
List<CodeInfo> codeInfos = new List<CodeInfo>(); List<CodeInfo> codeInfos = new List<CodeInfo>();
//codeInfos.Add(new CodeInfo("", 528, 406)); //codeInfos.Add(new CodeInfo("", 528, 406));
codeInfos.Add(new CodeInfo("", 925, 520)); codeInfos.Add(new CodeInfo("", 925, 520));
//codeInfos.Add(new CodeInfo("", 564, 684)); //codeInfos.Add(new CodeInfo("", 564, 684));
btn_run.Enabled = false; 全部启动ToolStripMenuItem.Enabled = false;
//btn_run.Text = crc.GetString("Res0001","全部启动"); //btn_run.Text = crc.GetString("Res0001","全部启动");
//btn_stop.Enabled = false; //btn_stop.Enabled = false;
#region 报警信息listview初始化 #region 报警信息listview初始化
...@@ -96,7 +103,6 @@ namespace TheMachine ...@@ -96,7 +103,6 @@ namespace TheMachine
#endregion #endregion
LogUtil.info("开始初始化"); LogUtil.info("开始初始化");
cb_EnableBuzzer.Checked = Setting_Init.Device_EnableBuzzer;
AlarmBuzzer.BuzzerStateChange += AlarmBuzzer_BuzzerStateChange; AlarmBuzzer.BuzzerStateChange += AlarmBuzzer_BuzzerStateChange;
RobotManage.LoadFinishEvent += RobotManage_LoadFinishEvent; RobotManage.LoadFinishEvent += RobotManage_LoadFinishEvent;
if (!Setting_Init.Device_DisableLogWindow) if (!Setting_Init.Device_DisableLogWindow)
...@@ -130,6 +136,21 @@ namespace TheMachine ...@@ -130,6 +136,21 @@ namespace TheMachine
// Application.DoEvents(); // Application.DoEvents();
//} //}
pnl.Enabled = false; pnl.Enabled = false;
禁用蜂鸣器ToolStripMenuItem_Click(this, EventArgs.Empty);
tabc.Selecting += Tabc_Selecting;
}
private void Tabc_Selecting(object sender, TabControlCancelEventArgs e)
{
if (e.TabPageIndex > 0)
{
if (configpass)
return;
if (!FrmPassCheck.CheckPassword())
e.Cancel = true;
else
configpass = true;
}
} }
private void LeftMachine_UpdateStatusList(object sender, ListView.ListViewItemCollection e) private void LeftMachine_UpdateStatusList(object sender, ListView.ListViewItemCollection e)
...@@ -172,8 +193,8 @@ namespace TheMachine ...@@ -172,8 +193,8 @@ namespace TheMachine
const int tabpagecount = 4; const int tabpagecount = 4;
void addTablePage() { void addTablePage() {
AddForm("tab_io",crc.GetString("Form1_tabc_tab_io_Text","IO调试"), ioc); AddForm("tab_io",crc.GetString("Form1_tabc_tab_io_Text","IO调试"), ioc);
AddForm("tab_leftMachine", crc.GetString("Form1_tabc_tabP1_pnl_gb_left_Text","侧料仓"), leftMachine); AddForm("tab_leftMachine", crc.GetString("Form1_tabc_tabP1_pnl_gb_left_Text","B侧料仓"), leftMachine);
AddForm("tab_rightMachine", crc.GetString("Form1_tabc_tabP1_pnl_gb_right_Text","侧料仓"), rightMachine); AddForm("tab_rightMachine", crc.GetString("Form1_tabc_tabP1_pnl_gb_right_Text","A侧料仓"), rightMachine);
AddForm("tab_sc",crc.GetString("Form1_tabc_tab_sc_Text","通用设置"), sc); AddForm("tab_sc",crc.GetString("Form1_tabc_tab_sc_Text","通用设置"), sc);
crc.LanguageProcess(this); crc.LanguageProcess(this);
} }
...@@ -210,7 +231,10 @@ namespace TheMachine ...@@ -210,7 +231,10 @@ namespace TheMachine
{ {
continue; continue;
} }
ListViewItem lvi = new ListViewItem(new string[] { "", moveInfo.Name, moveInfo.MoveStep.ToString(),moveInfo.GetStateStr() }); var stateinfo = moveInfo.GetStateStr();
if (!RobotManage.isRunning)
stateinfo = crc.GetString("Res0018","未启动");
ListViewItem lvi = new ListViewItem(new string[] { "", moveInfo.Name, moveInfo.MoveStep.ToString(), stateinfo });
listView.Items.Add(lvi); listView.Items.Add(lvi);
} }
this.ResumeLayout(true); this.ResumeLayout(true);
...@@ -243,6 +267,8 @@ namespace TheMachine ...@@ -243,6 +267,8 @@ namespace TheMachine
private void 启用调试模式ToolStripMenuItem_Click(object sender, EventArgs e) private void 启用调试模式ToolStripMenuItem_Click(object sender, EventArgs e)
{ {
RobotManage.IsConfigMode = RobotManage.IsConfigMode ? false : true; RobotManage.IsConfigMode = RobotManage.IsConfigMode ? false : true;
(sender as ToolStripMenuItem).Text = !RobotManage.IsConfigMode ? crc.GetString("Res0180","启用配置模式") : crc.GetString("Res0181","停用配置模式"); (sender as ToolStripMenuItem).Text = !RobotManage.IsConfigMode ? crc.GetString("Res0180","启用配置模式") : crc.GetString("Res0181","停用配置模式");
...@@ -295,10 +321,7 @@ namespace TheMachine ...@@ -295,10 +321,7 @@ namespace TheMachine
if (state) if (state)
{ {
全部启动ToolStripMenuItem.Enabled = true;
btn_run.Enabled = true;
//btn_stop.Enabled = true;
//RobotManage.mainMachine.ProcessMsgEvent += MainMachine_ProcessMsgEvent;
} }
ioc.Config = RobotManage.Config; ioc.Config = RobotManage.Config;
...@@ -321,9 +344,15 @@ namespace TheMachine ...@@ -321,9 +344,15 @@ namespace TheMachine
{ {
Task.Delay(1000).Wait(); Task.Delay(1000).Wait();
启用调试模式ToolStripMenuItem_Click(启用调试模式ToolStripMenuItem, EventArgs.Empty); 启用调试模式ToolStripMenuItem_Click(启用调试模式ToolStripMenuItem, EventArgs.Empty);
全部启动ToolStripMenuItem_Click(this, EventArgs.Empty);
}); });
}); });
} }
//if (!RobotManage.isRunning && RobotManage.leftMachine.IOValue(SIO_Type.).Equals(IO_VALUE.HIGH))
//{
// this.BeginInvoke((EventHandler)delegate { btn_run_Click(this, EventArgs.Empty); });
//}
} }
void SetMsg(Dictionary<MachineSideE, List<Msg>> msgss) void SetMsg(Dictionary<MachineSideE, List<Msg>> msgss)
{ {
...@@ -335,11 +364,15 @@ namespace TheMachine ...@@ -335,11 +364,15 @@ namespace TheMachine
listView.Items.Clear(); listView.Items.Clear();
msgs.Sort((a, b) => msgs.Sort((a, b) =>
{ {
if (a == null)
return 4;
if (b == null)
return 4;
if (a.msgLevel == MsgLevel.alarm) if (a.msgLevel == MsgLevel.alarm)
return -1; return 1;
if (a.msgLevel != MsgLevel.info) if (a.msgLevel == MsgLevel.warning)
return -1; return 2;
return 0; return 3;
}); });
foreach (Msg msg in msgs) foreach (Msg msg in msgs)
{ {
...@@ -386,12 +419,6 @@ namespace TheMachine ...@@ -386,12 +419,6 @@ namespace TheMachine
{ {
if (!RobotManage.isRunning) if (!RobotManage.isRunning)
{ {
if (RobotManage.mainMachine.IOValue(IO_Type.SuddenStop_BTN,RobotManage.Config).Equals(IO_VALUE.LOW))
{
MsgService.Add(crc.GetString("Res0182","急停中,无法启动"), MsgLevel.warning);
MainMachine_ProcessMsgEvent(MsgService.Get());
return;
}
RobotManage.Start(MachineSideE.Left | MachineSideE.Right); RobotManage.Start(MachineSideE.Left | MachineSideE.Right);
if (RobotManage.isRunning) if (RobotManage.isRunning)
{ {
...@@ -412,9 +439,6 @@ namespace TheMachine ...@@ -412,9 +439,6 @@ namespace TheMachine
return; return;
} }
Task.Run(() => { RobotManage.Stop(); }); Task.Run(() => { RobotManage.Stop(); });
//btn_stop.Enabled = false;
//btn_run.Enabled = true;
cb_IgnoreSafecheck.Enabled = true;
} }
private void 退出ToolStripMenuItem_Click(object sender, EventArgs e) private void 退出ToolStripMenuItem_Click(object sender, EventArgs e)
...@@ -473,11 +497,6 @@ namespace TheMachine ...@@ -473,11 +497,6 @@ namespace TheMachine
aboutBox1.ShowDialog(); aboutBox1.ShowDialog();
} }
private void cb_EnableBuzzer_CheckedChanged(object sender, EventArgs e)
{
Setting_Init.Device_EnableBuzzer= cb_EnableBuzzer.Checked;
AlarmBuzzer.Enable = cb_EnableBuzzer.Checked;
}
private void btn_PauseBuzzer_Click(object sender, EventArgs e) private void btn_PauseBuzzer_Click(object sender, EventArgs e)
{ {
...@@ -555,5 +574,54 @@ namespace TheMachine ...@@ -555,5 +574,54 @@ namespace TheMachine
Setting_Init.Device_Default_Language = "en-US"; Setting_Init.Device_Default_Language = "en-US";
crc.LanguageChange(); crc.LanguageChange();
} }
private void 全部启动ToolStripMenuItem_Click(object sender, EventArgs e)
{
if (!RobotManage.isRunning)
{
RobotManage.Start(MachineSideE.Left | MachineSideE.Right);
if (RobotManage.isRunning)
{
//btn_stop.Enabled = true;
//btn_run.Enabled = false;
}
LogUtil.info("用户按下启动");
}
}
private void 全部停止ToolStripMenuItem_Click(object sender, EventArgs e)
{
if (this.InvokeRequired)
{
this.Invoke((EventHandler)delegate
{
btn_stop_Click(sender, e);
}, sender, e);
return;
}
Task.Run(() => { RobotManage.Stop(); });
}
private void 禁用蜂鸣器ToolStripMenuItem_Click(object sender, EventArgs e)
{
if (e == EventArgs.Empty)
{
AlarmBuzzer.Enable = !Setting_Init.Device_EnableBuzzer;
}
AlarmBuzzer.Enable = !AlarmBuzzer.Enable;
if (AlarmBuzzer.Enable)
{
禁用蜂鸣器ToolStripMenuItem.Text = crc.GetString("设备操作ToolStripMenuItem_禁用蜂鸣器ToolStripMenuItem_Text","禁用蜂鸣器");
}
else
禁用蜂鸣器ToolStripMenuItem.Text = crc.GetString("Res0019","起用蜂鸣器");
Setting_Init.Device_EnableBuzzer = AlarmBuzzer.Enable;
}
bool configpass = false;
private void 启用调试模式ToolStripMenuItem_Click_1(object sender, EventArgs e)
{
configpass = false;
}
} }
} }
\ No newline at end of file \ No newline at end of file
using ConfigHelper; using ConfigHelper;
using DeviceLibrary; using DeviceLibrary;
using log4net.Config; using log4net.Config;
using Microsoft.Win32.TaskScheduler;
using OnlineStore.Common; using OnlineStore.Common;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Diagnostics; using System.Diagnostics;
using System.Drawing; using System.Drawing;
using System.Drawing.Drawing2D; using System.Drawing.Drawing2D;
using System.IO;
using System.Linq; using System.Linq;
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using System.Threading; using System.Threading;
...@@ -23,7 +25,7 @@ namespace TheMachine ...@@ -23,7 +25,7 @@ namespace TheMachine
[STAThread] [STAThread]
static void Main(string[] args) static void Main(string[] args)
{ {
Debug.WriteLine("1");
_ = new Mutex(true, Application.ProductName, out bool ret); _ = new Mutex(true, Application.ProductName, out bool ret);
if (!ret) if (!ret)
{ {
...@@ -33,10 +35,10 @@ namespace TheMachine ...@@ -33,10 +35,10 @@ namespace TheMachine
//MessageBox.Show("该程序已经启动", "提示信息", MessageBoxButtons.OK, MessageBoxIcon.Information); //MessageBox.Show("该程序已经启动", "提示信息", MessageBoxButtons.OK, MessageBoxIcon.Information);
return; return;
} }
Debug.WriteLine("2");
if (args.Length > 0) if (args.Length > 0)
Setting_Init.SimulateMode = true; Setting_Init.SimulateMode = true;
Debug.WriteLine("3");
var currnetdrive = System.IO.Path.GetPathRoot(Application.StartupPath); var currnetdrive = System.IO.Path.GetPathRoot(Application.StartupPath);
var drives = System.IO.DriveInfo.GetDrives(); var drives = System.IO.DriveInfo.GetDrives();
foreach (var drive in drives) { foreach (var drive in drives) {
...@@ -51,16 +53,16 @@ namespace TheMachine ...@@ -51,16 +53,16 @@ namespace TheMachine
} }
} }
} }
AddOrUpdateStartupTask();
Config.LoadMyConfig(new Setting_Init().GetType()); Config.LoadMyConfig(new Setting_Init().GetType());
Debug.WriteLine("6");
Application.ThreadException += Application_ThreadException; Application.ThreadException += Application_ThreadException;
Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException); Application.SetUnhandledExceptionMode(UnhandledExceptionMode.CatchException);
AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException; AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
Environment.CurrentDirectory = Application.StartupPath; Environment.CurrentDirectory = Application.StartupPath;
XmlConfigurator.Configure(); XmlConfigurator.Configure();
Debug.WriteLine("7");
Application.EnableVisualStyles(); Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false); Application.SetCompatibleTextRenderingDefault(false);
Application.Run(new Form1()); Application.Run(new Form1());
...@@ -109,6 +111,43 @@ namespace TheMachine ...@@ -109,6 +111,43 @@ namespace TheMachine
#endregion #endregion
public static void AddOrUpdateStartupTask()
{
// 获取当前程序的路径和名称
string appPath = Process.GetCurrentProcess().MainModule.FileName;
string TaskName = "AutoStartup_" + Process.GetCurrentProcess().MainModule.ModuleName;
// 创建或更新计划任务
using (TaskService taskService = new TaskService())
{
// 获取任务定义,如果不存在则创建新的任务定义
TaskDefinition taskDefinition;
if (taskService.GetTask(TaskName) != null)
{
taskDefinition = taskService.GetTask(TaskName).Definition;
}
else
{
taskDefinition = taskService.NewTask();
taskDefinition.RegistrationInfo.Description = TaskName;
}
if (taskDefinition.Triggers.Count == 0 || taskDefinition.Triggers[0].TriggerType != TaskTriggerType.Logon)
{
// 设置触发器为用户登录后启动
LogonTrigger logonTrigger = (LogonTrigger)taskDefinition.Triggers.Add(new LogonTrigger());
logonTrigger.Delay = TimeSpan.FromSeconds(5);
}
// 设置操作为启动应用程序
taskDefinition.Actions.Clear();
taskDefinition.Actions.Add(new ExecAction(appPath, null, Path.GetDirectoryName(appPath)));
// 设置任务的运行权限为管理员权限
taskDefinition.Principal.RunLevel = TaskRunLevel.Highest;
// 保存任务
taskService.RootFolder.RegisterTaskDefinition(TaskName, taskDefinition, TaskCreation.CreateOrUpdate, null, null, TaskLogonType.InteractiveToken, null);
}
}
} }
} }
...@@ -41,12 +41,12 @@ namespace TheMachine ...@@ -41,12 +41,12 @@ namespace TheMachine
private void button1_Click(object sender, EventArgs e) private void button1_Click(object sender, EventArgs e)
{ {
Machine.door.OpenDoor(null); Machine.door.LiftUp(null);
} }
private void button2_Click(object sender, EventArgs e) private void button2_Click(object sender, EventArgs e)
{ {
Machine.door.CloseDoor(null); Machine.door.LiftDown(null);
} }
} }
} }
...@@ -38,12 +38,9 @@ namespace TheMachine ...@@ -38,12 +38,9 @@ namespace TheMachine
this.tp = new System.Windows.Forms.TableLayoutPanel(); this.tp = new System.Windows.Forms.TableLayoutPanel();
this.tabControl1 = new System.Windows.Forms.TabControl(); this.tabControl1 = new System.Windows.Forms.TabControl();
this.tabPage_set = new System.Windows.Forms.TabPage(); this.tabPage_set = new System.Windows.Forms.TabPage();
this.tabPage_fix = new System.Windows.Forms.TabPage();
this.fixtureSizeConfigControl1 = new DeviceLibrary.FixtureSizeConfigControl();
this.tp.SuspendLayout(); this.tp.SuspendLayout();
this.tabControl1.SuspendLayout(); this.tabControl1.SuspendLayout();
this.tabPage_set.SuspendLayout(); this.tabPage_set.SuspendLayout();
this.tabPage_fix.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
// //
// chbAutoRun // chbAutoRun
...@@ -127,7 +124,6 @@ namespace TheMachine ...@@ -127,7 +124,6 @@ namespace TheMachine
// tabControl1 // tabControl1
// //
this.tabControl1.Controls.Add(this.tabPage_set); this.tabControl1.Controls.Add(this.tabPage_set);
this.tabControl1.Controls.Add(this.tabPage_fix);
this.tabControl1.Dock = System.Windows.Forms.DockStyle.Fill; this.tabControl1.Dock = System.Windows.Forms.DockStyle.Fill;
this.tabControl1.Location = new System.Drawing.Point(0, 0); this.tabControl1.Location = new System.Drawing.Point(0, 0);
this.tabControl1.Name = "tabControl1"; this.tabControl1.Name = "tabControl1";
...@@ -146,25 +142,6 @@ namespace TheMachine ...@@ -146,25 +142,6 @@ namespace TheMachine
this.tabPage_set.Text = "常规设置"; this.tabPage_set.Text = "常规设置";
this.tabPage_set.UseVisualStyleBackColor = true; this.tabPage_set.UseVisualStyleBackColor = true;
// //
// tabPage_fix
//
this.tabPage_fix.Controls.Add(this.fixtureSizeConfigControl1);
this.tabPage_fix.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.tabPage_fix.Location = new System.Drawing.Point(4, 22);
this.tabPage_fix.Name = "tabPage_fix";
this.tabPage_fix.Padding = new System.Windows.Forms.Padding(3);
this.tabPage_fix.Size = new System.Drawing.Size(1016, 714);
this.tabPage_fix.TabIndex = 2;
this.tabPage_fix.Text = "治具设置";
this.tabPage_fix.UseVisualStyleBackColor = true;
//
// fixtureSizeConfigControl1
//
this.fixtureSizeConfigControl1.Location = new System.Drawing.Point(6, 6);
this.fixtureSizeConfigControl1.Name = "fixtureSizeConfigControl1";
this.fixtureSizeConfigControl1.Size = new System.Drawing.Size(602, 565);
this.fixtureSizeConfigControl1.TabIndex = 0;
//
// SettingControl // SettingControl
// //
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
...@@ -177,7 +154,6 @@ namespace TheMachine ...@@ -177,7 +154,6 @@ namespace TheMachine
this.tabControl1.ResumeLayout(false); this.tabControl1.ResumeLayout(false);
this.tabPage_set.ResumeLayout(false); this.tabPage_set.ResumeLayout(false);
this.tabPage_set.PerformLayout(); this.tabPage_set.PerformLayout();
this.tabPage_fix.ResumeLayout(false);
this.ResumeLayout(false); this.ResumeLayout(false);
} }
...@@ -192,7 +168,5 @@ namespace TheMachine ...@@ -192,7 +168,5 @@ namespace TheMachine
private UC.UC_LedConfig uC_LedConfig1; private UC.UC_LedConfig uC_LedConfig1;
private System.Windows.Forms.TabControl tabControl1; private System.Windows.Forms.TabControl tabControl1;
private System.Windows.Forms.TabPage tabPage_set; private System.Windows.Forms.TabPage tabPage_set;
private System.Windows.Forms.TabPage tabPage_fix;
private DeviceLibrary.FixtureSizeConfigControl fixtureSizeConfigControl1;
} }
} }
...@@ -56,11 +56,15 @@ ...@@ -56,11 +56,15 @@
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
<HintPath>..\..\增广夹爪\Rmaxis\bin\Debug\log4net.dll</HintPath> <HintPath>..\..\增广夹爪\Rmaxis\bin\Debug\log4net.dll</HintPath>
</Reference> </Reference>
<Reference Include="Microsoft.Win32.TaskScheduler, Version=2.10.1.0, Culture=neutral, PublicKeyToken=e25603a88b3aa7da, processorArchitecture=MSIL">
<HintPath>..\packages\TaskScheduler.2.10.1\lib\net452\Microsoft.Win32.TaskScheduler.dll</HintPath>
</Reference>
<Reference Include="Neotel.Rmaxis"> <Reference Include="Neotel.Rmaxis">
<HintPath>..\..\增广夹爪\Rmaxis\bin\Debug\Neotel.Rmaxis.dll</HintPath> <HintPath>..\..\增广夹爪\Rmaxis\bin\Debug\Neotel.Rmaxis.dll</HintPath>
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Core" /> <Reference Include="System.Core" />
<Reference Include="System.IO.Compression" />
<Reference Include="System.Xml.Linq" /> <Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" /> <Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" /> <Reference Include="Microsoft.CSharp" />
...@@ -138,6 +142,12 @@ ...@@ -138,6 +142,12 @@
<Compile Include="UCStoreMachine.Designer.cs"> <Compile Include="UCStoreMachine.Designer.cs">
<DependentUpon>UCStoreMachine.cs</DependentUpon> <DependentUpon>UCStoreMachine.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="UC\FrmPassCheck.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="UC\FrmPassCheck.designer.cs">
<DependentUpon>FrmPassCheck.cs</DependentUpon>
</Compile>
<Compile Include="UC\StorePosControl.cs"> <Compile Include="UC\StorePosControl.cs">
<SubType>UserControl</SubType> <SubType>UserControl</SubType>
</Compile> </Compile>
...@@ -171,6 +181,12 @@ ...@@ -171,6 +181,12 @@
<Compile Include="UC\UC_LedConfig.Designer.cs"> <Compile Include="UC\UC_LedConfig.Designer.cs">
<DependentUpon>UC_LedConfig.cs</DependentUpon> <DependentUpon>UC_LedConfig.cs</DependentUpon>
</Compile> </Compile>
<Compile Include="UC\UC_SetUserPassword.cs">
<SubType>UserControl</SubType>
</Compile>
<Compile Include="UC\UC_SetUserPassword.designer.cs">
<DependentUpon>UC_SetUserPassword.cs</DependentUpon>
</Compile>
<EmbeddedResource Include="AboutBox1.resx"> <EmbeddedResource Include="AboutBox1.resx">
<DependentUpon>AboutBox1.cs</DependentUpon> <DependentUpon>AboutBox1.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
...@@ -213,6 +229,9 @@ ...@@ -213,6 +229,9 @@
<EmbeddedResource Include="UCStoreMachine.resx"> <EmbeddedResource Include="UCStoreMachine.resx">
<DependentUpon>UCStoreMachine.cs</DependentUpon> <DependentUpon>UCStoreMachine.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="UC\FrmPassCheck.resx">
<DependentUpon>FrmPassCheck.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="UC\StorePosControl.resx"> <EmbeddedResource Include="UC\StorePosControl.resx">
<DependentUpon>StorePosControl.cs</DependentUpon> <DependentUpon>StorePosControl.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
...@@ -228,7 +247,11 @@ ...@@ -228,7 +247,11 @@
<EmbeddedResource Include="UC\UC_LedConfig.resx"> <EmbeddedResource Include="UC\UC_LedConfig.resx">
<DependentUpon>UC_LedConfig.cs</DependentUpon> <DependentUpon>UC_LedConfig.cs</DependentUpon>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="UC\UC_SetUserPassword.resx">
<DependentUpon>UC_SetUserPassword.cs</DependentUpon>
</EmbeddedResource>
<None Include="app.manifest" /> <None Include="app.manifest" />
<None Include="packages.config" />
<None Include="Properties\Settings.settings"> <None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator> <Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput> <LastGenOutput>Settings.Designer.cs</LastGenOutput>
......
using OnlineStore;
using OnlineStore.Common;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace TheMachine
{
public partial class FrmPassCheck : Form
{
public FrmPassCheck()
{
InitializeComponent();
}
public static bool CheckPassword() {
if (!Setting_Init.User_Enable)
return true;
FrmPassCheck frmPassCheck = new FrmPassCheck();
var result = frmPassCheck.ShowDialog();
return (result == DialogResult.OK);
}
private void btn_cancel_Click(object sender, EventArgs e)
{
DialogResult = DialogResult.Cancel;
this.Close();
}
private void btn_ok_Click(object sender, EventArgs e)
{
if (textBox1.Text.Trim() == Setting_Init.User_AdminPassword.Val.Trim())
{
DialogResult = DialogResult.OK;
this.Close();
}
else
MessageBox.Show(crc.GetString("Res0057","密码不正确请重新输入!"));
}
}
}
\ No newline at end of file \ No newline at end of file

namespace TheMachine
{
partial class FrmPassCheck
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.textBox1 = new System.Windows.Forms.TextBox();
this.btn_ok = new System.Windows.Forms.Button();
this.btn_cancel = new System.Windows.Forms.Button();
this.SuspendLayout();
//
// textBox1
//
this.textBox1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.textBox1.Location = new System.Drawing.Point(114, 88);
this.textBox1.Name = "textBox1";
this.textBox1.PasswordChar = '*';
this.textBox1.Size = new System.Drawing.Size(318, 29);
this.textBox1.TabIndex = 0;
//
// btn_ok
//
this.btn_ok.Location = new System.Drawing.Point(352, 189);
this.btn_ok.Name = "btn_ok";
this.btn_ok.Size = new System.Drawing.Size(129, 49);
this.btn_ok.TabIndex = 1;
this.btn_ok.Text = "确定";
this.btn_ok.UseVisualStyleBackColor = true;
this.btn_ok.Click += new System.EventHandler(this.btn_ok_Click);
//
// btn_cancel
//
this.btn_cancel.Location = new System.Drawing.Point(40, 189);
this.btn_cancel.Name = "btn_cancel";
this.btn_cancel.Size = new System.Drawing.Size(129, 49);
this.btn_cancel.TabIndex = 1;
this.btn_cancel.Text = "取消";
this.btn_cancel.UseVisualStyleBackColor = true;
this.btn_cancel.Click += new System.EventHandler(this.btn_cancel_Click);
//
// FrmPassCheck
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(548, 275);
this.Controls.Add(this.btn_cancel);
this.Controls.Add(this.btn_ok);
this.Controls.Add(this.textBox1);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "FrmPassCheck";
this.ShowIcon = false;
this.ShowInTaskbar = false;
this.Text = "请输入密码";
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.Button btn_ok;
private System.Windows.Forms.Button btn_cancel;
}
}
\ No newline at end of file \ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
\ No newline at end of file \ No newline at end of file
...@@ -107,7 +107,7 @@ namespace TheMachine ...@@ -107,7 +107,7 @@ namespace TheMachine
//if (ioValue.SubType.Equals(0)) //if (ioValue.SubType.Equals(0))
{ {
this.tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Absolute, 26)); this.tableLayoutPanel1.RowStyles.Add(new RowStyle(SizeType.Absolute, 26));
IOTextControl control = new IOTextControl(ioValue.ElectricalDefinition + "_" + crc.GetString(ioValue.ProName, ioValue.Explain), ioValue.ProName); IOTextControl control = new IOTextControl(ioValue.ElectricalDefinition + "_" + crc.GetString(ioValue.ProType + "_" + ioValue.ProName, ioValue.Explain), ioValue.ProName);
this.tableLayoutPanel1.Controls.Add(control, 0, roleindex); this.tableLayoutPanel1.Controls.Add(control, 0, roleindex);
roleindex++; roleindex++;
...@@ -123,7 +123,7 @@ namespace TheMachine ...@@ -123,7 +123,7 @@ namespace TheMachine
//if (ioValue.SubType.Equals(0)) //if (ioValue.SubType.Equals(0))
{ {
this.tableLayoutPanel2.RowStyles.Add(new RowStyle(SizeType.Absolute, 28)); this.tableLayoutPanel2.RowStyles.Add(new RowStyle(SizeType.Absolute, 28));
IOTextControl control = new IOTextControl(ioValue.ElectricalDefinition + "_" + crc.GetString(ioValue.ProName, ioValue.Explain), ioValue.ProName); IOTextControl control = new IOTextControl(ioValue.ElectricalDefinition + "_" + crc.GetString(ioValue.ProType + "_" + ioValue.ProName, ioValue.Explain), ioValue.ProName);
control.Click += Control_Click; control.Click += Control_Click;
this.tableLayoutPanel2.Controls.Add(control, 0, roleindex); this.tableLayoutPanel2.Controls.Add(control, 0, roleindex);
roleindex++; roleindex++;
......
using OnlineStore;
using OnlineStore.Common;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace TheMachine
{
public partial class UC_SetUserPassword : UserControl
{
public UC_SetUserPassword()
{
InitializeComponent();
}
private void button_ok_Click(object sender, EventArgs e)
{
if (textBox_oldpwd.Text != Setting_Init.User_AdminPassword)
{
MessageBox.Show(crc.GetString("Res0068","旧密码不正确!"));
textBox_oldpwd.Text = "";
return;
}
if (textBox_newpwd.Text != textBox_newpwd2.Text) {
MessageBox.Show(crc.GetString("Res0069","两次输入的新密码不一致,请确认!"));
//textBox_oldpwd.Text = "";
return;
}
if (string.IsNullOrWhiteSpace(textBox_newpwd.Text))
{
MessageBox.Show(crc.GetString("Res0070","新密码不能为空!"));
return;
}
Setting_Init.User_AdminPassword = textBox_newpwd.Text.Trim();
textBox_oldpwd.Text = "";
textBox_newpwd.Text = "";
textBox_newpwd2.Text = "";
MessageBox.Show(crc.GetString("Res0071","密码修改成功!"));
}
}
}
\ No newline at end of file \ No newline at end of file

namespace TheMachine
{
partial class UC_SetUserPassword
{
/// <summary>
/// 必需的设计器变量。
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// 清理所有正在使用的资源。
/// </summary>
/// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region 组件设计器生成的代码
/// <summary>
/// 设计器支持所需的方法 - 不要修改
/// 使用代码编辑器修改此方法的内容。
/// </summary>
private void InitializeComponent()
{
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.button_ok = new System.Windows.Forms.Button();
this.label_newpwd2 = new System.Windows.Forms.Label();
this.label_newpwd = new System.Windows.Forms.Label();
this.label_oldpwd = new System.Windows.Forms.Label();
this.textBox_newpwd2 = new System.Windows.Forms.TextBox();
this.textBox_newpwd = new System.Windows.Forms.TextBox();
this.textBox_oldpwd = new System.Windows.Forms.TextBox();
this.groupBox1.SuspendLayout();
this.SuspendLayout();
//
// groupBox1
//
this.groupBox1.Controls.Add(this.button_ok);
this.groupBox1.Controls.Add(this.label_newpwd2);
this.groupBox1.Controls.Add(this.label_newpwd);
this.groupBox1.Controls.Add(this.label_oldpwd);
this.groupBox1.Controls.Add(this.textBox_newpwd2);
this.groupBox1.Controls.Add(this.textBox_newpwd);
this.groupBox1.Controls.Add(this.textBox_oldpwd);
this.groupBox1.Location = new System.Drawing.Point(5, 5);
this.groupBox1.Margin = new System.Windows.Forms.Padding(5);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Padding = new System.Windows.Forms.Padding(5);
this.groupBox1.Size = new System.Drawing.Size(388, 258);
this.groupBox1.TabIndex = 0;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "管理密码设置";
//
// button_ok
//
this.button_ok.Location = new System.Drawing.Point(201, 188);
this.button_ok.Name = "button_ok";
this.button_ok.Size = new System.Drawing.Size(119, 33);
this.button_ok.TabIndex = 2;
this.button_ok.Text = "确认修改";
this.button_ok.UseVisualStyleBackColor = true;
this.button_ok.Click += new System.EventHandler(this.button_ok_Click);
//
// label_newpwd2
//
this.label_newpwd2.Location = new System.Drawing.Point(11, 134);
this.label_newpwd2.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
this.label_newpwd2.Name = "label_newpwd2";
this.label_newpwd2.Size = new System.Drawing.Size(134, 23);
this.label_newpwd2.TabIndex = 1;
this.label_newpwd2.Text = "重复新密码:";
this.label_newpwd2.TextAlign = System.Drawing.ContentAlignment.TopRight;
//
// label_newpwd
//
this.label_newpwd.Location = new System.Drawing.Point(11, 88);
this.label_newpwd.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
this.label_newpwd.Name = "label_newpwd";
this.label_newpwd.Size = new System.Drawing.Size(134, 23);
this.label_newpwd.TabIndex = 1;
this.label_newpwd.Text = "新密码:";
this.label_newpwd.TextAlign = System.Drawing.ContentAlignment.TopRight;
//
// label_oldpwd
//
this.label_oldpwd.Location = new System.Drawing.Point(11, 43);
this.label_oldpwd.Margin = new System.Windows.Forms.Padding(5, 0, 5, 0);
this.label_oldpwd.Name = "label_oldpwd";
this.label_oldpwd.Size = new System.Drawing.Size(134, 23);
this.label_oldpwd.TabIndex = 1;
this.label_oldpwd.Text = "旧密码:";
this.label_oldpwd.TextAlign = System.Drawing.ContentAlignment.TopRight;
//
// textBox_newpwd2
//
this.textBox_newpwd2.Location = new System.Drawing.Point(155, 131);
this.textBox_newpwd2.Margin = new System.Windows.Forms.Padding(5);
this.textBox_newpwd2.Name = "textBox_newpwd2";
this.textBox_newpwd2.PasswordChar = '*';
this.textBox_newpwd2.Size = new System.Drawing.Size(165, 26);
this.textBox_newpwd2.TabIndex = 0;
//
// textBox_newpwd
//
this.textBox_newpwd.Location = new System.Drawing.Point(155, 85);
this.textBox_newpwd.Margin = new System.Windows.Forms.Padding(5);
this.textBox_newpwd.Name = "textBox_newpwd";
this.textBox_newpwd.PasswordChar = '*';
this.textBox_newpwd.Size = new System.Drawing.Size(165, 26);
this.textBox_newpwd.TabIndex = 0;
//
// textBox_oldpwd
//
this.textBox_oldpwd.Location = new System.Drawing.Point(155, 40);
this.textBox_oldpwd.Margin = new System.Windows.Forms.Padding(5);
this.textBox_oldpwd.Name = "textBox_oldpwd";
this.textBox_oldpwd.PasswordChar = '*';
this.textBox_oldpwd.Size = new System.Drawing.Size(165, 26);
this.textBox_oldpwd.TabIndex = 0;
//
// UC_SetUserPassword
//
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.Controls.Add(this.groupBox1);
this.Font = new System.Drawing.Font("微软雅黑", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.Margin = new System.Windows.Forms.Padding(5);
this.Name = "UC_SetUserPassword";
this.Size = new System.Drawing.Size(405, 272);
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.Label label_newpwd2;
private System.Windows.Forms.Label label_newpwd;
private System.Windows.Forms.Label label_oldpwd;
private System.Windows.Forms.TextBox textBox_newpwd2;
private System.Windows.Forms.TextBox textBox_newpwd;
private System.Windows.Forms.TextBox textBox_oldpwd;
private System.Windows.Forms.Button button_ok;
}
}
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
\ No newline at end of file \ No newline at end of file
...@@ -69,15 +69,19 @@ namespace TheMachine ...@@ -69,15 +69,19 @@ namespace TheMachine
void SetMsg(List<Msg> msgs) void SetMsg(List<Msg> msgs)
{ {
this.SuspendLayout(); //this.SuspendLayout();
listView.Items.Clear(); listView.Items.Clear();
msgs.Sort((a, b) => msgs.Sort((a, b) =>
{ {
if (a == null)
return 4;
if (b == null)
return 4;
if (a.msgLevel == MsgLevel.alarm) if (a.msgLevel == MsgLevel.alarm)
return -1; return 1;
if (a.msgLevel != MsgLevel.info) if (a.msgLevel == MsgLevel.warning)
return -1; return 2;
return 0; return 3;
}); });
foreach (Msg msg in msgs) foreach (Msg msg in msgs)
{ {
...@@ -98,7 +102,7 @@ namespace TheMachine ...@@ -98,7 +102,7 @@ namespace TheMachine
{ {
//btn_IgnoreX09.Visible = false; //btn_IgnoreX09.Visible = false;
} }
else if (msg.errInfo == ErrInfo.RunBtn) else if (msg.errInfo == ErrInfo.RunBtn || msg.errInfo == ErrInfo.ResetBtn)
{ {
Task.Run(() => { Task.Run(() => {
if (!RobotManage.isRunning) if (!RobotManage.isRunning)
...@@ -116,8 +120,9 @@ namespace TheMachine ...@@ -116,8 +120,9 @@ namespace TheMachine
} }
} }
this.ResumeLayout(true); //this.ResumeLayout(true);
UpdateStatusList?.Invoke(Machine.MachineSide, listView.Items); UpdateStatusList?.Invoke(Machine.MachineSide, listView.Items);
Machine_PauseEvent(this, Machine.UserPause);
} }
private void RobotManage_LoadFinishEvent(bool state, string msg) private void RobotManage_LoadFinishEvent(bool state, string msg)
{ {
...@@ -188,6 +193,7 @@ namespace TheMachine ...@@ -188,6 +193,7 @@ namespace TheMachine
//Machine.UserPause = false; //Machine.UserPause = false;
(btn_run as Button).Text = crc.GetString("Res0197","暂停运行"); (btn_run as Button).Text = crc.GetString("Res0197","暂停运行");
(btn_run as Button).BackColor = Color.Yellow; (btn_run as Button).BackColor = Color.Yellow;
btn_stop.Enabled = true;
} }
} }
...@@ -195,12 +201,12 @@ namespace TheMachine ...@@ -195,12 +201,12 @@ namespace TheMachine
{ {
if (!Machine.isRunning) if (!Machine.isRunning)
{ {
if (Machine.IOValue(IO_Type.SuddenStop_BTN, RobotManage.Config).Equals(IO_VALUE.LOW)) //if (Machine.IOValue(IO_Type.SuddenStop_BTN, RobotManage.Config).Equals(IO_VALUE.LOW))
{ //{
Machine.Msg.add(crc.GetString("Res0182","急停中,无法启动"), MsgLevel.warning); // Machine.Msg.add(crc.GetString("Res0182","急停中,无法启动"), MsgLevel.warning);
Machine_ProcessMsgEvent(Machine.Msg.get()[Machine.MachineSide]); // Machine_ProcessMsgEvent(Machine.Msg.get()[Machine.MachineSide]);
return; // return;
} //}
RobotManage.Start(Machine.MachineSide); RobotManage.Start(Machine.MachineSide);
if (Machine.isRunning) if (Machine.isRunning)
{ {
......
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="TaskScheduler" version="2.10.1" targetFramework="net471" />
</packages>
\ No newline at end of file \ No newline at end of file
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!