Commit ad0410c7 刘韬

1

1 个父辈 2768259f
 using OnlineStore;
using log4net; using log4net;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
...@@ -38,7 +39,7 @@ namespace OnlineStore.Common ...@@ -38,7 +39,7 @@ namespace OnlineStore.Common
{ {
Release(); Release();
} }
LogName = "温湿度传感器[" + port + "]"; LogName = crc.GetString("Res0115","温湿度传感器")+ "[" + port + "]";
if (sb == null) if (sb == null)
{ {
...@@ -325,4 +326,4 @@ namespace OnlineStore.Common ...@@ -325,4 +326,4 @@ namespace OnlineStore.Common
} }
} }
} }
\ No newline at end of file \ No newline at end of file
using System; using OnlineStore;
using System;
using System.Text; using System.Text;
using System.Windows.Forms; using System.Windows.Forms;
...@@ -33,7 +34,7 @@ namespace OnlineStore.Common ...@@ -33,7 +34,7 @@ namespace OnlineStore.Common
private void logLocalIp() private void logLocalIp()
{ {
string[] addresses = GetLocalAddresses(); string[] addresses = GetLocalAddresses();
string iplist = "本机IP:["; string iplist = crc.GetString("Res0116","本机IP:")+"[";
if (addresses.Length > 0) if (addresses.Length > 0)
{ {
for (int i = 0; i < addresses.Length; i++) for (int i = 0; i < addresses.Length; i++)
...@@ -263,4 +264,4 @@ namespace OnlineStore.Common ...@@ -263,4 +264,4 @@ namespace OnlineStore.Common
} }
} }
} }
\ No newline at end of file \ No newline at end of file
 using OnlineStore;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
...@@ -26,7 +27,7 @@ namespace OnlineStore.Common ...@@ -26,7 +27,7 @@ namespace OnlineStore.Common
private void logLocalIp() private void logLocalIp()
{ {
string[] addresses = GetLocalAddresses(); string[] addresses = GetLocalAddresses();
string iplist = "本机IP:["; string iplist = crc.GetString("Res0116","本机IP:")+ "[";
if (addresses.Length > 0) if (addresses.Length > 0)
{ {
for (int i = 0; i < addresses.Length; i++) for (int i = 0; i < addresses.Length; i++)
...@@ -156,4 +157,4 @@ namespace OnlineStore.Common ...@@ -156,4 +157,4 @@ namespace OnlineStore.Common
return retval; return retval;
} }
} }
} }
\ No newline at end of file \ No newline at end of file
...@@ -115,7 +115,7 @@ namespace DeviceLibrary ...@@ -115,7 +115,7 @@ namespace DeviceLibrary
/// <summary> /// <summary>
/// 松下伺服电机运动 /// 松下伺服电机运动
/// </summary> /// </summary>
public void AbsMove(MoveInfo MoveInfo, int targetPosition, int targetSpeed) public void AbsMove(MoveInfo MoveInfo, int targetPosition, int targetSpeed, string proname="")
{ {
if (IsInPosition(targetPosition)) if (IsInPosition(targetPosition))
{ {
...@@ -137,10 +137,21 @@ namespace DeviceLibrary ...@@ -137,10 +137,21 @@ namespace DeviceLibrary
} }
else else
{ {
MoveInfo.WaitList.Add(WaitResultInfo.WaitAxis(Config, targetPosition, targetSpeed)); MoveInfo.WaitList.Add(WaitResultInfo.WaitAxis(Config, targetPosition, targetSpeed));
Config.TargetPosition = targetPosition; Config.TargetPosition = targetPosition;
var AddSpeed = Config.AddSpeed > 0 ? Config.AddSpeed : targetSpeed * 4; var AddSpeed = Config.AddSpeed > 0 ? Config.AddSpeed : targetSpeed * 4;
var DelSpeed = Config.DelSpeed > 0 ? Config.DelSpeed : targetSpeed * 4; var DelSpeed = Config.DelSpeed > 0 ? Config.DelSpeed : targetSpeed * 4;
//if (!string.IsNullOrEmpty(proname)) {
// var storeMachine = (machineSide == MachineSideE.Left) ? RobotManage.leftMachine : RobotManage.rightMachine;
// var c = storeMachine.Config.configList.Find(x => x.ProName == proname);
// if (c != null) {
// AddSpeed = AddSpeed*c.AddSpeed;
// }
//}
AxisManager.AbsMove(Config.DeviceName, Config.GetAxisValue(), targetPosition, targetSpeed, AddSpeed, DelSpeed);// Config.AddSpeed, Config.DelSpeed); AxisManager.AbsMove(Config.DeviceName, Config.GetAxisValue(), targetPosition, targetSpeed, AddSpeed, DelSpeed);// Config.AddSpeed, Config.DelSpeed);
} }
} }
......
using Asa.Camera; using Asa.Camera;
using DeviceLibrary; using DeviceLibrary;
using OnlineStore; using OnlineStore;
using OnlineStore.Common; using OnlineStore.Common;
...@@ -40,7 +40,7 @@ public class HIKCamera ...@@ -40,7 +40,7 @@ public class HIKCamera
string path = $".\\Config\\{CameraID}.json"; string path = $".\\Config\\{CameraID}.json";
if (!File.Exists(path)) if (!File.Exists(path))
{ {
msg = Name + "找不到监控相机配置文件"; msg = Name + crc.GetString("Res0117","找不到监控相机配置文件");
LogUtil.error(Name + "找不到监控相机配置文件" + path); LogUtil.error(Name + "找不到监控相机配置文件" + path);
return false; return false;
} }
...@@ -59,7 +59,7 @@ public class HIKCamera ...@@ -59,7 +59,7 @@ public class HIKCamera
} }
catch (Exception e) catch (Exception e)
{ {
msg = Name + "加载监控相机配置文件失败:" + e.ToString(); msg = Name + crc.GetString("Res0118","加载监控相机配置文件失败:") + e.ToString();
LogUtil.error(Name + "加载监控相机配置文件失败:" + e.ToString()); LogUtil.error(Name + "加载监控相机配置文件失败:" + e.ToString());
return false; return false;
} }
...@@ -67,7 +67,7 @@ public class HIKCamera ...@@ -67,7 +67,7 @@ public class HIKCamera
Bitmap bmp = camera.GetImage(DeviceName); Bitmap bmp = camera.GetImage(DeviceName);
if (bmp == null) if (bmp == null)
{ {
msg = Name + "监控相机打开失败"; msg = Name + crc.GetString("Res0119","监控相机打开失败");
LogUtil.error(Name + $"监控相机打开失败"); LogUtil.error(Name + $"监控相机打开失败");
return false; return false;
} }
...@@ -182,4 +182,4 @@ public enum FixtureState ...@@ -182,4 +182,4 @@ public enum FixtureState
ToInSide, ToInSide,
ToOutSide, ToOutSide,
ToFix, ToFix,
} }
\ No newline at end of file \ No newline at end of file
using OnlineStore.Common; using OnlineStore;
using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary; using OnlineStore.LoadCSVLibrary;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
...@@ -44,7 +45,7 @@ namespace DeviceLibrary ...@@ -44,7 +45,7 @@ namespace DeviceLibrary
public void LiftUp(MoveInfo moveInfo) { public void LiftUp(MoveInfo moveInfo) {
if (moveInfo == null) if (moveInfo == null)
moveInfo = new MoveInfo("界面",false); moveInfo = new MoveInfo(crc.GetString("Res0120","界面"),false);
if (IOManager.IOValue(up.ToString()).Equals(IO_VALUE.HIGH)) { if (IOManager.IOValue(up.ToString()).Equals(IO_VALUE.HIGH)) {
moveInfo.log($"{axisBean.AxisName},已在位置,无需上升"); moveInfo.log($"{axisBean.AxisName},已在位置,无需上升");
return; return;
...@@ -83,7 +84,7 @@ namespace DeviceLibrary ...@@ -83,7 +84,7 @@ namespace DeviceLibrary
public void LiftDown(MoveInfo moveInfo) public void LiftDown(MoveInfo moveInfo)
{ {
if (moveInfo == null) if (moveInfo == null)
moveInfo = new MoveInfo("界面", false); moveInfo = new MoveInfo(crc.GetString("Res0120","界面"), false);
if (IOManager.IOValue(down.ToString()).Equals(IO_VALUE.HIGH)) if (IOManager.IOValue(down.ToString()).Equals(IO_VALUE.HIGH))
{ {
moveInfo.log($"{axisBean.AxisName},已在位置,无需下降"); moveInfo.log($"{axisBean.AxisName},已在位置,无需下降");
...@@ -124,4 +125,4 @@ namespace DeviceLibrary ...@@ -124,4 +125,4 @@ namespace DeviceLibrary
return false; return false;
} }
} }
} }
\ No newline at end of file \ No newline at end of file
using OnlineStore; using OnlineStore;
using OnlineStore.Common; using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary; using OnlineStore.LoadCSVLibrary;
using System; using System;
...@@ -208,7 +208,7 @@ namespace DeviceLibrary ...@@ -208,7 +208,7 @@ namespace DeviceLibrary
sendmsg = string.Join(",", new string[] { WarnMsg }); sendmsg = string.Join(",", new string[] { WarnMsg });
} }
else if (Machine.runStatus== RunStatus.Stop){ else if (Machine.runStatus== RunStatus.Stop){
sendmsg = "设备未启动"; sendmsg = crc.GetString("Res0121","设备未启动");
} }
lineOperation.msg = sendmsg; lineOperation.msg = sendmsg;
...@@ -360,7 +360,7 @@ namespace DeviceLibrary ...@@ -360,7 +360,7 @@ namespace DeviceLibrary
{ {
//出入库没有找到服务器发送的库位,需要打印日志方便查询原因 //出入库没有找到服务器发送的库位,需要打印日志方便查询原因
//SetWarnMsg(ResourceControl.InStoreNoPosition, message, posId); //SetWarnMsg(ResourceControl.InStoreNoPosition, message, posId);
WarnMsg = "入库未找到库位:" + posId;//0505 WarnMsg = crc.GetString("Res0122","入库未找到库位:") + posId;//0505
LogUtil.info("收到服务器入库命令:入库未找到库位:二维码【" + message + "】库位【" + posId + "】"); LogUtil.info("收到服务器入库命令:入库未找到库位:二维码【" + message + "】库位【" + posId + "】");
return; return;
} }
...@@ -605,4 +605,4 @@ namespace DeviceLibrary ...@@ -605,4 +605,4 @@ namespace DeviceLibrary
InStoreError = 14, InStoreError = 14,
} }
} }
\ No newline at end of file \ No newline at end of file
using OnlineStore; using OnlineStore;
using OnlineStore.Common; using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary; using OnlineStore.LoadCSVLibrary;
using System; using System;
...@@ -40,7 +40,7 @@ namespace DeviceLibrary ...@@ -40,7 +40,7 @@ namespace DeviceLibrary
Config = _Config; Config = _Config;
mainMachine = _mainMachine; mainMachine = _mainMachine;
Msg = MsgService.MSList[mainMachine.MachineSide]; Msg = MsgService.MSList[mainMachine.MachineSide];
MoveInfo = new MoveInfo("出入库机构", _mainMachine.MachineSide, false); MoveInfo = new MoveInfo(crc.GetString("Res0123","出入库机构"), _mainMachine.MachineSide, false);
To = null; To = null;
From = null; From = null;
#region 初始化伺服轴 #region 初始化伺服轴
...@@ -131,7 +131,7 @@ namespace DeviceLibrary ...@@ -131,7 +131,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("Res0124","出入库时料叉{0}检测到有物料无法继续,请检查."),Config.DIList[SIO_Type.TrayCheck_Fixture].ElectricalDefinition), MsgLevel.alarm, ErrInfo.X09_BoxNotDetect);
} }
else else
{ {
...@@ -196,7 +196,7 @@ namespace DeviceLibrary ...@@ -196,7 +196,7 @@ 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("Res0125","出库时料叉{0}没有检测到物料无法继续,请检查."), Config.DIList[SIO_Type.TrayCheck_Fixture].ElectricalDefinition), MsgLevel.alarm, ErrInfo.X09_BoxNotDetect);
} }
else else
{ {
...@@ -253,13 +253,13 @@ namespace DeviceLibrary ...@@ -253,13 +253,13 @@ namespace DeviceLibrary
case MoveStep.StoreTS11: case MoveStep.StoreTS11:
if (To.posid==BoxStorePosition.ngdoor) { if (To.posid==BoxStorePosition.ngdoor) {
if (IOManager.IOValue(SIO_Type.Door_Tray_Check, Config).Equals(IO_VALUE.HIGH)) { if (IOManager.IOValue(SIO_Type.Door_Tray_Check, Config).Equals(IO_VALUE.HIGH)) {
Msg.add("单料门口有料无法放料.", MsgLevel.info); Msg.add(crc.GetString("Res0126","单料门口有料无法放料."), MsgLevel.info);
MoveInfo.log($"单料门口有料无法放料"); MoveInfo.log($"单料门口有料无法放料");
return false; return false;
} }
if (!DoorControl.Invoke(true)) if (!DoorControl.Invoke(true))
{ {
Msg.add("等待单料口门开启.", MsgLevel.info); Msg.add(crc.GetString("Res0127","等待单料口门开启."), MsgLevel.info);
MoveInfo.log($"等待单料口门开启"); MoveInfo.log($"等待单料口门开启");
return false; return false;
} }
...@@ -288,7 +288,7 @@ namespace DeviceLibrary ...@@ -288,7 +288,7 @@ 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("Res0128","入库后料叉{0}上任然检测到物料,请检查."), Config.DIList[SIO_Type.TrayCheck_Fixture].ElectricalDefinition), MsgLevel.alarm, ErrInfo.X09_BoxNotDetect);
} }
else else
{ {
...@@ -351,4 +351,4 @@ namespace DeviceLibrary ...@@ -351,4 +351,4 @@ namespace DeviceLibrary
return RobotManage.CameraA; return RobotManage.CameraA;
} }
} }
} }
\ No newline at end of file \ No newline at end of file
using CodeLibrary; using CodeLibrary;
using OnlineStore; using OnlineStore;
using OnlineStore.Common; using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary; using OnlineStore.LoadCSVLibrary;
...@@ -98,12 +98,12 @@ namespace DeviceLibrary ...@@ -98,12 +98,12 @@ namespace DeviceLibrary
{ {
if (IsNg) if (IsNg)
{ {
return "入库NG"+ $":{NgMsg}[{WareCode}]"; return crc.GetString("Res0129","入库NG")+ $":{NgMsg}[{WareCode}]";
} }
else else
{ {
return "库位号" + $":[{PosID}][{WareCode}] "; return crc.GetString("Res0130","库位号") + $":[{PosID}][{WareCode}] ";
} }
} }
...@@ -217,4 +217,4 @@ namespace DeviceLibrary ...@@ -217,4 +217,4 @@ namespace DeviceLibrary
{ {
NGDoor NGDoor
} }
} }
\ No newline at end of file \ No newline at end of file
using CodeLibrary; using CodeLibrary;
using OnlineStore; using OnlineStore;
using OnlineStore.Common; using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary; using OnlineStore.LoadCSVLibrary;
...@@ -22,16 +22,16 @@ namespace DeviceLibrary ...@@ -22,16 +22,16 @@ 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("按下复位按钮.", 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("急停未解除,按下复位按钮尝试复位安全继电器.", MsgLevel.info, ErrInfo.SuddenStop); MsgService.Add(crc.GetString("Res0132","急停未解除,按下复位按钮尝试复位安全继电器."), MsgLevel.info, ErrInfo.SuddenStop);
} }
LogUtil.info("按下复位按钮"); LogUtil.info("按下复位按钮");
} }
} }
} }
\ No newline at end of file \ No newline at end of file
using CodeLibrary; using OnlineStore;
using CodeLibrary;
using Newtonsoft.Json; using Newtonsoft.Json;
using OnlineStore.Common; using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary; using OnlineStore.LoadCSVLibrary;
...@@ -67,19 +68,19 @@ namespace DeviceLibrary ...@@ -67,19 +68,19 @@ namespace DeviceLibrary
{ {
MachineLedState.Clear(); MachineLedState.Clear();
//系统报警并停止,红亮 //系统报警并停止,红亮
MachineLedStateName[MachineLedStateE.AlarmStop] = "停机报警"; MachineLedStateName[MachineLedStateE.AlarmStop] = crc.GetString("ledstate_AlarmStop","停机报警");
MachineLedState.Add(MachineLedStateE.AlarmStop, nls(LedState.on, LedState.off, LedState.off)); MachineLedState.Add(MachineLedStateE.AlarmStop, nls(LedState.on, LedState.off, LedState.off));
//系统运行时报警, 绿亮,红闪 //系统运行时报警, 绿亮,红闪
MachineLedStateName[MachineLedStateE.Alarm] = "报警"; MachineLedStateName[MachineLedStateE.Alarm] = crc.GetString("ledstate_Alarm","报警");
MachineLedState.Add(MachineLedStateE.Alarm, nls(LedState.blink, LedState.off, LedState.on)); MachineLedState.Add(MachineLedStateE.Alarm, nls(LedState.blink, LedState.off, LedState.on));
//系统复位中 绿闪 //系统复位中 绿闪
MachineLedStateName[MachineLedStateE.HomeReset] = "复位"; MachineLedStateName[MachineLedStateE.HomeReset] = crc.GetString("ledstate_HomeReset","复位");
MachineLedState.Add(MachineLedStateE.HomeReset, nls(LedState.off, LedState.off, LedState.blink)); MachineLedState.Add(MachineLedStateE.HomeReset, nls(LedState.off, LedState.off, LedState.blink));
//系统正常运行 //系统正常运行
MachineLedStateName[MachineLedStateE.Running] = "运行"; MachineLedStateName[MachineLedStateE.Running] = crc.GetString("ledstate_Running","运行");
MachineLedState.Add(MachineLedStateE.Running, nls(LedState.none, LedState.none, LedState.on)); MachineLedState.Add(MachineLedStateE.Running, nls(LedState.none, LedState.none, LedState.on));
//系统暂停, 绿闪,红闪 //系统暂停, 绿闪,红闪
MachineLedStateName[MachineLedStateE.SystemPause] = "暂停"; MachineLedStateName[MachineLedStateE.SystemPause] = crc.GetString("ledstate_SystemPause","暂停");
MachineLedState.Add(MachineLedStateE.SystemPause, nls(LedState.blink, LedState.off, LedState.blink)); MachineLedState.Add(MachineLedStateE.SystemPause, nls(LedState.blink, LedState.off, LedState.blink));
//温湿度超限30分钟. 红闪,黄闪 //温湿度超限30分钟. 红闪,黄闪
//MachineLedStateName[MachineLedStateE.THoutRangeOver30m] = "温湿度超限30分钟"; //MachineLedStateName[MachineLedStateE.THoutRangeOver30m] = "温湿度超限30分钟";
...@@ -88,7 +89,7 @@ namespace DeviceLibrary ...@@ -88,7 +89,7 @@ namespace DeviceLibrary
// 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] = "出入库中"; MachineLedStateName[MachineLedStateE.InOut] = crc.GetString("ledstate_InOut","出入库中");
MachineLedState.Add(MachineLedStateE.InOut, nls(LedState.none, LedState.blink, LedState.on)); MachineLedState.Add(MachineLedStateE.InOut, nls(LedState.none, LedState.blink, LedState.on));
} }
Dictionary<LedColor, LedState> nls(LedState AlarmLedstate, LedState StandbyLedstate, LedState RunningLedstate) { Dictionary<LedColor, LedState> nls(LedState AlarmLedstate, LedState StandbyLedstate, LedState RunningLedstate) {
...@@ -218,4 +219,4 @@ namespace DeviceLibrary ...@@ -218,4 +219,4 @@ namespace DeviceLibrary
THoutRange, THoutRange,
InOut, InOut,
} }
} }
\ No newline at end of file \ No newline at end of file
using OnlineStore; using OnlineStore;
using OnlineStore.Common; using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary; using OnlineStore.LoadCSVLibrary;
using System; using System;
...@@ -141,7 +141,7 @@ namespace DeviceLibrary ...@@ -141,7 +141,7 @@ namespace DeviceLibrary
isInSuddenDown = IOValue(IO_Type.SuddenStop_BTN, Config).Equals(IO_VALUE.LOW); isInSuddenDown = IOValue(IO_Type.SuddenStop_BTN, Config).Equals(IO_VALUE.LOW);
if (UserPause) if (UserPause)
{ {
MsgService.Add("系统暂停", MsgLevel.warning); MsgService.Add(crc.GetString("Res0133","系统暂停"), MsgLevel.warning);
DeviceSuddenStop(); DeviceSuddenStop();
lastSafeCheckStatus = false; lastSafeCheckStatus = false;
ok = false; ok = false;
...@@ -149,7 +149,7 @@ namespace DeviceLibrary ...@@ -149,7 +149,7 @@ namespace DeviceLibrary
} }
else if (isInSuddenDown) else if (isInSuddenDown)
{ {
MsgService.Add("急停中", MsgLevel.alarm); MsgService.Add(crc.GetString("Res0134","急停中"), MsgLevel.alarm);
ok = false; ok = false;
} }
...@@ -182,4 +182,4 @@ namespace DeviceLibrary ...@@ -182,4 +182,4 @@ namespace DeviceLibrary
} }
} }
} }
} }
\ No newline at end of file \ No newline at end of file
using OnlineStore; using OnlineStore;
using OnlineStore.Common; using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary; using OnlineStore.LoadCSVLibrary;
using System; using System;
...@@ -76,7 +76,7 @@ namespace DeviceLibrary ...@@ -76,7 +76,7 @@ namespace DeviceLibrary
if (!IOManager.ConnectionIOList(new List<string>())) if (!IOManager.ConnectionIOList(new List<string>()))
{ {
IsLoadOk = false; IsLoadOk = false;
msg += "IO板卡初始化失败"+ "\n"; msg += crc.GetString("Res0135","IO板卡初始化失败")+ "\n";
} }
//if (!CameraA.LoadCameraConfig("CameraA", out string errmsg)) //if (!CameraA.LoadCameraConfig("CameraA", out string errmsg))
//{ //{
...@@ -85,7 +85,7 @@ namespace DeviceLibrary ...@@ -85,7 +85,7 @@ namespace DeviceLibrary
//} //}
if (!HumitureController.Init(Setting_Init.Device_Humiture_Port)) { if (!HumitureController.Init(Setting_Init.Device_Humiture_Port)) {
IsLoadOk = false; IsLoadOk = false;
msg += "温湿度传感器初始化失败,端口:"+ Setting_Init.Device_Humiture_Port+"\n"; msg += crc.GetString("Res0136","温湿度传感器初始化失败,端口:")+ Setting_Init.Device_Humiture_Port+"\n";
} }
IOManager.IOMove(IO_Type.Device_Led, IO_VALUE.HIGH,Config); IOManager.IOMove(IO_Type.Device_Led, IO_VALUE.HIGH,Config);
...@@ -97,7 +97,7 @@ namespace DeviceLibrary ...@@ -97,7 +97,7 @@ namespace DeviceLibrary
LoadFinishEvent?.Invoke(IsConfigMode ? IsConfigMode : IsLoadOk, msg); LoadFinishEvent?.Invoke(IsConfigMode ? IsConfigMode : IsLoadOk, msg);
} }
public static void LoadDebug() { public static void LoadDebug() {
LoadFinishEvent?.Invoke(true, "打开调试模式"); LoadFinishEvent?.Invoke(true, crc.GetString("Res0137","打开调试模式"));
} }
public static void Start(MachineSideE machineSide) { public static void Start(MachineSideE machineSide) {
//Init(); //Init();
...@@ -205,4 +205,4 @@ namespace DeviceLibrary ...@@ -205,4 +205,4 @@ namespace DeviceLibrary
public enum StoreType { public enum StoreType {
TypeA,TypeB TypeA,TypeB
} }
} }
\ No newline at end of file \ No newline at end of file
using CodeLibrary; using CodeLibrary;
using OnlineStore; using OnlineStore;
using OnlineStore.Common; using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary; using OnlineStore.LoadCSVLibrary;
...@@ -23,11 +23,11 @@ namespace DeviceLibrary ...@@ -23,11 +23,11 @@ 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("按下复位按钮.", MsgLevel.info, ErrInfo.ResetBtn); MsgService.Add(crc.GetString("Res0131","按下复位按钮."), MsgLevel.info, ErrInfo.ResetBtn);
} }
else else
{ {
MsgService.Add("急停未解除,按下复位按钮尝试复位安全继电器.", MsgLevel.info, ErrInfo.SuddenStop); MsgService.Add(crc.GetString("Res0132","急停未解除,按下复位按钮尝试复位安全继电器."), MsgLevel.info, ErrInfo.SuddenStop);
} }
LogUtil.info("按下复位按钮"); LogUtil.info("按下复位按钮");
...@@ -40,4 +40,4 @@ namespace DeviceLibrary ...@@ -40,4 +40,4 @@ namespace DeviceLibrary
} }
} }
} }
} }
\ No newline at end of file \ No newline at end of file
using OnlineStore; using OnlineStore;
using OnlineStore.Common; using OnlineStore.Common;
using OnlineStore.DeviceLibrary; using OnlineStore.DeviceLibrary;
using OnlineStore.LoadCSVLibrary; using OnlineStore.LoadCSVLibrary;
...@@ -109,10 +109,10 @@ namespace DeviceLibrary ...@@ -109,10 +109,10 @@ namespace DeviceLibrary
Msg = new MsgService(MachineSide); Msg = new MsgService(MachineSide);
Name = machineSide.ToString() + "-SISO"; Name = machineSide.ToString() + "-SISO";
crc.LanguageChangeEvent += Crc_LanguageChangeEvent; crc.LanguageChangeEvent += Crc_LanguageChangeEvent;
StoreMoveInfo = new MoveInfo("进出库调度",machineSide); StoreMoveInfo = new MoveInfo(crc.GetString("Res0138","进出库调度"),machineSide);
StoreMoveInfo.SetStateDelegate(StoreState); StoreMoveInfo.SetStateDelegate(StoreState);
ResetMoveInfo = new MoveInfo("重置", machineSide); ResetMoveInfo = new MoveInfo(crc.GetString("Res0139","重置"), machineSide);
AIOTMoveInfo = new MoveInfo("出入库测试", machineSide); AIOTMoveInfo = new MoveInfo(crc.GetString("Res0140","出入库测试"), machineSide);
ServerCM = new ServerCommunication(this); ServerCM = new ServerCommunication(this);
ServerCM.InStoreEvent += ServerCM_InStoreEvent1; ServerCM.InStoreEvent += ServerCM_InStoreEvent1;
ServerCM.OutStoreEvent += ServerCM_OutStoreEvent; ServerCM.OutStoreEvent += ServerCM_OutStoreEvent;
...@@ -146,7 +146,7 @@ namespace DeviceLibrary ...@@ -146,7 +146,7 @@ namespace DeviceLibrary
} }
else else
{ {
msg += Name+ "找不到库位配置文件" + "\n"; msg += Name+ crc.GetString("Res0141","找不到库位配置文件") + "\n";
} }
string fixpositionConfigFile = Path.Combine(baseDir, "StoreConfig\\" + machineSide.ToString() + "\\fixPositions.csv"); string fixpositionConfigFile = Path.Combine(baseDir, "StoreConfig\\" + machineSide.ToString() + "\\fixPositions.csv");
if (File.Exists(fixpositionConfigFile)) if (File.Exists(fixpositionConfigFile))
...@@ -215,9 +215,9 @@ namespace DeviceLibrary ...@@ -215,9 +215,9 @@ namespace DeviceLibrary
} }
private void Crc_LanguageChangeEvent(object sender, EventArgs e) private void Crc_LanguageChangeEvent(object sender, EventArgs e)
{ {
StoreMoveInfo.Name = "进出库调度"; StoreMoveInfo.Name = crc.GetString("Res0138","进出库调度");
ResetMoveInfo.Name = "重置"; ResetMoveInfo.Name = crc.GetString("Res0139","重置");
AIOTMoveInfo.Name = "出入库测试"; AIOTMoveInfo.Name = crc.GetString("Res0140","出入库测试");
} }
private (bool, string) InOut_Axis_interference(int from, int to) private (bool, string) InOut_Axis_interference(int from, int to)
{ {
...@@ -231,7 +231,7 @@ namespace DeviceLibrary ...@@ -231,7 +231,7 @@ namespace DeviceLibrary
return (false, ""); return (false, "");
} }
else else
return (true, "单料门没有打开进出轴无法伸出"); return (true, crc.GetString("Res0142","单料门没有打开进出轴无法伸出"));
return (false, ""); return (false, "");
} }
private (bool, string) Middle_Axis_interference(int from, int to) private (bool, string) Middle_Axis_interference(int from, int to)
...@@ -242,7 +242,7 @@ namespace DeviceLibrary ...@@ -242,7 +242,7 @@ namespace DeviceLibrary
if (InOut_Axis.IsInPosition(Config.InOut_P1)) if (InOut_Axis.IsInPosition(Config.InOut_P1))
return (false, ""); return (false, "");
return (true, "进出轴不在待机点时无法移动旋转轴"); return (true, crc.GetString("Res0143","进出轴不在待机点时无法移动旋转轴"));
} }
private (bool, string) UpDown_Axis_interference(int from, int to) private (bool, string) UpDown_Axis_interference(int from, int to)
...@@ -253,7 +253,7 @@ namespace DeviceLibrary ...@@ -253,7 +253,7 @@ namespace DeviceLibrary
if (InOut_Axis.IsInPosition(Config.InOut_P1)) if (InOut_Axis.IsInPosition(Config.InOut_P1))
return (false, ""); return (false, "");
return (true, "进出轴不在待机点时无法移动升降轴"); return (true, crc.GetString("Res0144","进出轴不在待机点时无法移动升降轴"));
} }
public volatile bool hasAlarm = false; public volatile bool hasAlarm = false;
/// <summary> /// <summary>
...@@ -416,7 +416,7 @@ namespace DeviceLibrary ...@@ -416,7 +416,7 @@ namespace DeviceLibrary
case MoveStep.H07_HomeReset: case MoveStep.H07_HomeReset:
if (IOValue(SIO_Type.Door_Tray_Check, Config).Equals(IO_VALUE.HIGH)) if (IOValue(SIO_Type.Door_Tray_Check, Config).Equals(IO_VALUE.HIGH))
{ {
Msg.add("回原时舱门口有料无法继续", MsgLevel.alarm); Msg.add(crc.GetString("Res0145","回原时舱门口有料无法继续"), MsgLevel.alarm);
} }
else { else {
ResetMoveInfo.NextMoveStep(MoveStep.H08_HomeReset); ResetMoveInfo.NextMoveStep(MoveStep.H08_HomeReset);
...@@ -438,7 +438,7 @@ namespace DeviceLibrary ...@@ -438,7 +438,7 @@ namespace DeviceLibrary
ResetMoveInfo.NextMoveStep(MoveStep.H11_HomeReset); ResetMoveInfo.NextMoveStep(MoveStep.H11_HomeReset);
if (IOValue(SIO_Type.Door_Tray_Check, Config).Equals(IO_VALUE.HIGH)) if (IOValue(SIO_Type.Door_Tray_Check, Config).Equals(IO_VALUE.HIGH))
{ {
Msg.add("回原时舱门口有料无法继续", MsgLevel.alarm); Msg.add(crc.GetString("Res0145","回原时舱门口有料无法继续"), MsgLevel.alarm);
} }
else else
{ {
...@@ -486,7 +486,7 @@ namespace DeviceLibrary ...@@ -486,7 +486,7 @@ namespace DeviceLibrary
bool lastSafeCheckStatus = true; bool lastSafeCheckStatus = true;
bool SafeCheck() { bool SafeCheck() {
bool ok = true; bool ok = true;
var ignorestring = "[" + "已忽略" + "]"; var ignorestring = "[" + crc.GetString("Res0146","已忽略") + "]";
if (IOValue(IO_Type.BackDoor_Check,MainConfig).Equals(IO_VALUE.LOW)) if (IOValue(IO_Type.BackDoor_Check,MainConfig).Equals(IO_VALUE.LOW))
{ {
if (!IgnoreSafecheck)// && IOValue(IO_Type.NGDoor_Open).Equals(IO_VALUE.HIGH)) if (!IgnoreSafecheck)// && IOValue(IO_Type.NGDoor_Open).Equals(IO_VALUE.HIGH))
...@@ -494,7 +494,7 @@ namespace DeviceLibrary ...@@ -494,7 +494,7 @@ namespace DeviceLibrary
ok = false; ok = false;
UserPause = true; UserPause = true;
} }
Msg.add("后维护被打开" + (ok ? ignorestring : ""), MsgLevel.warning); Msg.add(crc.GetString("Res0147","后维护被打开") + (ok ? ignorestring : ""), MsgLevel.warning);
} }
if (!lastSafeCheckStatus && ok) if (!lastSafeCheckStatus && ok)
{ {
...@@ -528,7 +528,7 @@ namespace DeviceLibrary ...@@ -528,7 +528,7 @@ namespace DeviceLibrary
isInSuddenDown = IOValue(IO_Type.SuddenStop_BTN,RobotManage.Config).Equals(IO_VALUE.LOW); isInSuddenDown = IOValue(IO_Type.SuddenStop_BTN,RobotManage.Config).Equals(IO_VALUE.LOW);
if (UserPause) if (UserPause)
{ {
Msg.add("系统暂停", MsgLevel.warning); Msg.add(crc.GetString("Res0133","系统暂停"), MsgLevel.warning);
DeviceSuddenStop(); DeviceSuddenStop();
lastSafeCheckStatus = false; lastSafeCheckStatus = false;
ok = false; ok = false;
...@@ -537,18 +537,18 @@ namespace DeviceLibrary ...@@ -537,18 +537,18 @@ namespace DeviceLibrary
else if (isInSuddenDown) else if (isInSuddenDown)
{ {
Alarm(AlarmType.SuddenStop); Alarm(AlarmType.SuddenStop);
Msg.add("急停中", MsgLevel.alarm); Msg.add(crc.GetString("Res0134","急停中"), MsgLevel.alarm);
ok = false; ok = false;
} }
else if (alarmType != AlarmType.None) { else if (alarmType != AlarmType.None) {
{ {
Msg.add("系统需要重置", MsgLevel.alarm,ErrInfo.SuddenStop); Msg.add(crc.GetString("Res0148","系统需要重置"), MsgLevel.alarm,ErrInfo.SuddenStop);
ok = false; ok = false;
} }
} }
if (AutoInOutTestMode) if (AutoInOutTestMode)
{ {
Msg.add("进出库调试模式", MsgLevel.info); Msg.add(crc.GetString("Res0149","进出库调试模式"), MsgLevel.info);
//ok = false; //ok = false;
} }
...@@ -563,7 +563,7 @@ namespace DeviceLibrary ...@@ -563,7 +563,7 @@ namespace DeviceLibrary
if (AxisManager.GetAlarmStatus(configMoveAxis.DeviceName, configMoveAxis.GetAxisValue()) == 1) if (AxisManager.GetAlarmStatus(configMoveAxis.DeviceName, configMoveAxis.GetAxisValue()) == 1)
{ {
Msg.add(crc.GetString(configMoveAxis.ProName, configMoveAxis.Explain) + $"[{configMoveAxis.GetAxisValue()}]:" Msg.add(crc.GetString(configMoveAxis.ProName, configMoveAxis.Explain) + $"[{configMoveAxis.GetAxisValue()}]:"
+ "运动报警", MsgLevel.alarm, ErrInfo.SuddenStop); + crc.GetString("Res0150","运动报警"), MsgLevel.alarm, ErrInfo.SuddenStop);
ok = false; ok = false;
} }
} }
...@@ -577,4 +577,4 @@ namespace DeviceLibrary ...@@ -577,4 +577,4 @@ namespace DeviceLibrary
LogUtil.info("按下X09忽略"); LogUtil.info("按下X09忽略");
} }
} }
} }
\ No newline at end of file \ No newline at end of file
using CodeLibrary; using CodeLibrary;
using OnlineStore; using OnlineStore;
using OnlineStore.Common; using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary; using OnlineStore.LoadCSVLibrary;
...@@ -18,7 +18,7 @@ namespace DeviceLibrary ...@@ -18,7 +18,7 @@ namespace DeviceLibrary
errmsg = ""; errmsg = "";
if (!boxTransport.IsComplateOrFree) if (!boxTransport.IsComplateOrFree)
{ {
errmsg = "料仓忙碌中,无法启动"; errmsg = crc.GetString("Res0151","料仓忙碌中,无法启动");
return false; return false;
} }
AutoInOutTest = true; AutoInOutTest = true;
...@@ -35,11 +35,11 @@ namespace DeviceLibrary ...@@ -35,11 +35,11 @@ namespace DeviceLibrary
{ {
if (!boxTransport.IgnoreX09 && IOMonitor.IODebound(SIO_Type.TrayCheck_Fixture, Config, IO_VALUE.HIGH, 5000)) if (!boxTransport.IgnoreX09 && IOMonitor.IODebound(SIO_Type.TrayCheck_Fixture, Config, IO_VALUE.HIGH, 5000))
{ {
errmsg = "收到出库任务,但料叉上有料,无法启动,请检查"; errmsg = crc.GetString("Res0152","收到出库任务,但料叉上有料,无法启动,请检查");
} }
else else
errmsg = "收到出库任务,但料叉上有料,无法启动,请检查"; errmsg = crc.GetString("Res0152","收到出库任务,但料叉上有料,无法启动,请检查");
return false; return false;
} }
else else
...@@ -51,7 +51,7 @@ namespace DeviceLibrary ...@@ -51,7 +51,7 @@ namespace DeviceLibrary
} }
else { else {
errmsg = "料仓正在出入库中,无法出库"; errmsg = crc.GetString("Res0153","料仓正在出入库中,无法出库");
} }
return true; return true;
...@@ -110,7 +110,7 @@ namespace DeviceLibrary ...@@ -110,7 +110,7 @@ namespace DeviceLibrary
} }
else else
{ {
Msg.add("单料口等待料盘离开.", MsgLevel.info); Msg.add(crc.GetString("Res0154","单料口等待料盘离开."), MsgLevel.info);
} }
break; break;
case MoveStep.StoreIn03: case MoveStep.StoreIn03:
...@@ -120,7 +120,7 @@ namespace DeviceLibrary ...@@ -120,7 +120,7 @@ namespace DeviceLibrary
AIOTMoveInfo.log($"入库料盘已准备好"); AIOTMoveInfo.log($"入库料盘已准备好");
} }
else { else {
Msg.add("请放入第二盘料.", MsgLevel.warning); Msg.add(crc.GetString("Res0155","请放入第二盘料."), MsgLevel.warning);
} }
break; break;
case MoveStep.StoreIn04: case MoveStep.StoreIn04:
...@@ -154,7 +154,7 @@ namespace DeviceLibrary ...@@ -154,7 +154,7 @@ namespace DeviceLibrary
} }
else else
{ {
Msg.add("单料口等待料盘离开.", MsgLevel.info); Msg.add(crc.GetString("Res0154","单料口等待料盘离开."), MsgLevel.info);
} }
break; break;
case MoveStep.StoreIn06: case MoveStep.StoreIn06:
...@@ -279,4 +279,4 @@ namespace DeviceLibrary ...@@ -279,4 +279,4 @@ namespace DeviceLibrary
} }
} }
} }
} }
\ No newline at end of file \ No newline at end of file
using CodeLibrary; using CodeLibrary;
using OnlineStore; using OnlineStore;
using OnlineStore.Common; using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary; using OnlineStore.LoadCSVLibrary;
...@@ -38,11 +38,10 @@ namespace DeviceLibrary ...@@ -38,11 +38,10 @@ namespace DeviceLibrary
{ {
if (!boxTransport.IgnoreX09 && IOMonitor.IODebound(SIO_Type.TrayCheck_Fixture, Config, IO_VALUE.HIGH, 5000)) if (!boxTransport.IgnoreX09 && IOMonitor.IODebound(SIO_Type.TrayCheck_Fixture, Config, IO_VALUE.HIGH, 5000))
{ {
Msg.add("收到出库任务,但料叉上有料,无法启动,请检查", MsgLevel.alarm, ErrInfo.X09_BoxNotDetect); Msg.add(crc.GetString("Res0152","收到出库任务,但料叉上有料,无法启动,请检查"), MsgLevel.alarm, ErrInfo.X09_BoxNotDetect);
} }
else else
Msg.add("收到出库任务,但料叉上有料,无法启动,请检查", MsgLevel.warning); Msg.add(crc.GetString("Res0152","收到出库任务,但料叉上有料,无法启动,请检查"), MsgLevel.warning);
return; return;
} }
else else
...@@ -74,7 +73,7 @@ namespace DeviceLibrary ...@@ -74,7 +73,7 @@ namespace DeviceLibrary
case MoveStep.StoreIn01: case MoveStep.StoreIn01:
if (!ServerCM.SendStoreState(StoreMoveInfo.MoveParam.PosID, StoreStatus.InStoreExecute)) if (!ServerCM.SendStoreState(StoreMoveInfo.MoveParam.PosID, StoreStatus.InStoreExecute))
{ {
Msg.add("服务器连接异常", MsgLevel.warning); Msg.add(crc.GetString("Res0156","服务器连接异常"), MsgLevel.warning);
return; return;
} }
StoreMoveInfo.NextMoveStep(MoveStep.StoreIn02); StoreMoveInfo.NextMoveStep(MoveStep.StoreIn02);
...@@ -92,7 +91,7 @@ namespace DeviceLibrary ...@@ -92,7 +91,7 @@ namespace DeviceLibrary
} }
else else
{ {
Msg.add("单料口等待料盘离开.", MsgLevel.info); Msg.add(crc.GetString("Res0154","单料口等待料盘离开."), MsgLevel.info);
} }
break; break;
case MoveStep.StoreIn04: case MoveStep.StoreIn04:
...@@ -100,7 +99,7 @@ namespace DeviceLibrary ...@@ -100,7 +99,7 @@ namespace DeviceLibrary
{ {
if (!ServerCM.SendStoreState(StoreMoveInfo.MoveParam.PosID, StoreStatus.InStoreEnd)) if (!ServerCM.SendStoreState(StoreMoveInfo.MoveParam.PosID, StoreStatus.InStoreEnd))
{ {
Msg.add("服务器连接异常", MsgLevel.warning); Msg.add(crc.GetString("Res0156","服务器连接异常"), MsgLevel.warning);
return; return;
} }
StoreMoveInfo.log($"料盘已到达目的地"); StoreMoveInfo.log($"料盘已到达目的地");
...@@ -108,7 +107,7 @@ namespace DeviceLibrary ...@@ -108,7 +107,7 @@ namespace DeviceLibrary
} }
else else
{ {
Msg.add("等待料盘送到指定位置.", MsgLevel.info); Msg.add(crc.GetString("Res0157","等待料盘送到指定位置."), MsgLevel.info);
} }
break; break;
case MoveStep.StoreIn05: case MoveStep.StoreIn05:
...@@ -121,7 +120,7 @@ namespace DeviceLibrary ...@@ -121,7 +120,7 @@ namespace DeviceLibrary
case MoveStep.StoreOut10: case MoveStep.StoreOut10:
if (!ServerCM.SendStoreState(StoreMoveInfo.MoveParam.PosID, StoreStatus.OutStoreExecute)) if (!ServerCM.SendStoreState(StoreMoveInfo.MoveParam.PosID, StoreStatus.OutStoreExecute))
{ {
Msg.add("服务器连接异常", MsgLevel.warning); Msg.add(crc.GetString("Res0156","服务器连接异常"), MsgLevel.warning);
return; return;
} }
StoreMoveInfo.NextMoveStep(MoveStep.StoreOut11); StoreMoveInfo.NextMoveStep(MoveStep.StoreOut11);
...@@ -137,7 +136,7 @@ namespace DeviceLibrary ...@@ -137,7 +136,7 @@ namespace DeviceLibrary
boxTransport.Pause(); boxTransport.Pause();
if (!ServerCM.SendStoreState(StoreMoveInfo.MoveParam.PosID, StoreStatus.OutStoreBoxEnd)) if (!ServerCM.SendStoreState(StoreMoveInfo.MoveParam.PosID, StoreStatus.OutStoreBoxEnd))
{ {
Msg.add("服务器连接异常", MsgLevel.warning); Msg.add(crc.GetString("Res0156","服务器连接异常"), MsgLevel.warning);
return; return;
} }
StoreMoveInfo.NextMoveStep(MoveStep.StoreOut12); StoreMoveInfo.NextMoveStep(MoveStep.StoreOut12);
...@@ -145,7 +144,7 @@ namespace DeviceLibrary ...@@ -145,7 +144,7 @@ namespace DeviceLibrary
} }
else else
{ {
Msg.add("等待料盘到达.", MsgLevel.info); Msg.add(crc.GetString("Res0158","等待料盘到达."), MsgLevel.info);
} }
break; break;
case MoveStep.StoreOut12: case MoveStep.StoreOut12:
...@@ -154,13 +153,13 @@ namespace DeviceLibrary ...@@ -154,13 +153,13 @@ namespace DeviceLibrary
{ {
if (IOValue(SIO_Type.Door_Tray_Check, Config).Equals(IO_VALUE.LOW)) if (IOValue(SIO_Type.Door_Tray_Check, Config).Equals(IO_VALUE.LOW))
{ {
Msg.add("单料门口没有检测到出库料盘" + "," + "出库库位号:" + StoreMoveInfo.MoveParam.PosID, MsgLevel.alarm); Msg.add(crc.GetString("Res0159","单料门口没有检测到出库料盘") + "," + crc.GetString("Res0160","出库库位号:") + StoreMoveInfo.MoveParam.PosID, MsgLevel.alarm);
UserPause = true; UserPause = true;
return; return;
} }
if (!ServerCM.SendStoreState(StoreMoveInfo.MoveParam.PosID, StoreStatus.OutStoreEnd)) if (!ServerCM.SendStoreState(StoreMoveInfo.MoveParam.PosID, StoreStatus.OutStoreEnd))
{ {
Msg.add("服务器连接异常", MsgLevel.warning); Msg.add(crc.GetString("Res0156","服务器连接异常"), MsgLevel.warning);
return; return;
} }
StoreMoveInfo.NextMoveStep(MoveStep.StoreOut13); StoreMoveInfo.NextMoveStep(MoveStep.StoreOut13);
...@@ -176,10 +175,10 @@ namespace DeviceLibrary ...@@ -176,10 +175,10 @@ namespace DeviceLibrary
} }
else if (StoreMoveInfo.IsTimeOut(30)) else if (StoreMoveInfo.IsTimeOut(30))
{ {
Msg.add("等聊单料门料盘被取走", MsgLevel.alarm); Msg.add(crc.GetString("Res0161","等聊单料门料盘被取走"), MsgLevel.alarm);
} }
else else
Msg.add("等聊单料门料盘被取走", MsgLevel.info); Msg.add(crc.GetString("Res0161","等聊单料门料盘被取走"), MsgLevel.info);
break; break;
default: default:
StoreMoveInfo.log($"未找到对应步骤:{StoreMoveInfo.MoveStep}"); StoreMoveInfo.log($"未找到对应步骤:{StoreMoveInfo.MoveStep}");
...@@ -187,17 +186,17 @@ namespace DeviceLibrary ...@@ -187,17 +186,17 @@ namespace DeviceLibrary
} }
} }
string StoreState() { string StoreState() {
string state = "空闲中"; string state = crc.GetString("Res0162","空闲中");
if (StoreMoveInfo.MoveStep >= MoveStep.StoreOut10) if (StoreMoveInfo.MoveStep >= MoveStep.StoreOut10)
{ {
state = "出库中"+":"+StoreMoveInfo.MoveParam.PosID; state = crc.GetString("Res0163","出库中")+":"+StoreMoveInfo.MoveParam.PosID;
} }
else if (StoreMoveInfo.MoveStep >= MoveStep.StoreIn01) else if (StoreMoveInfo.MoveStep >= MoveStep.StoreIn01)
{ {
state = "入库中"+":"+StoreMoveInfo.MoveParam.PosID; state = crc.GetString("Res0164","入库中")+":"+StoreMoveInfo.MoveParam.PosID;
} }
return state; return state;
} }
} }
} }
\ No newline at end of file \ No newline at end of file
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
using System.Drawing; using System.Drawing;
...@@ -78,7 +78,7 @@ namespace DeviceLibrary ...@@ -78,7 +78,7 @@ namespace DeviceLibrary
{ {
if (axis == null) if (axis == null)
{ {
MessageBox.Show("请先选择运动轴", "警告 ", MessageBoxButtons.OK, MessageBoxIcon.Error); MessageBox.Show(crc.GetString("Res0165","请先选择运动轴"), crc.GetString("Res0166","警告 "), MessageBoxButtons.OK, MessageBoxIcon.Error);
return false; return false;
} }
...@@ -291,7 +291,7 @@ namespace DeviceLibrary ...@@ -291,7 +291,7 @@ namespace DeviceLibrary
int speed = Convert.ToInt32(comjSpeed.Text); int speed = Convert.ToInt32(comjSpeed.Text);
if (speed <= 0) if (speed <= 0)
{ {
MessageBox.Show("提示", "请先输入正确的速度"); MessageBox.Show(crc.GetString("Res0167","提示"), crc.GetString("Res0168","请先输入正确的速度"));
return; return;
} }
btnAddMove.BackColor = Color.Green; btnAddMove.BackColor = Color.Green;
...@@ -320,7 +320,7 @@ namespace DeviceLibrary ...@@ -320,7 +320,7 @@ namespace DeviceLibrary
int speed = Convert.ToInt32(comjSpeed.Text); int speed = Convert.ToInt32(comjSpeed.Text);
if (speed <= 0) if (speed <= 0)
{ {
MessageBox.Show("提示", "请先输入正确的速度"); MessageBox.Show(crc.GetString("Res0167","提示"), crc.GetString("Res0168","请先输入正确的速度"));
return; return;
} }
btnDelMove.BackColor = Color.Green; btnDelMove.BackColor = Color.Green;
...@@ -353,7 +353,7 @@ namespace DeviceLibrary ...@@ -353,7 +353,7 @@ namespace DeviceLibrary
} }
private void ReadAxisStatus() private void ReadAxisStatus()
{ {
groupBox2.Text = cmbAxis.Text + "-"+"状态监控"; groupBox2.Text = cmbAxis.Text + "-"+crc.GetString("Res0169","状态监控");
//【1】更新轴号 //【1】更新轴号
short axisNo = SlvAddr; short axisNo = SlvAddr;
if (axisNo < 0) if (axisNo < 0)
...@@ -424,7 +424,7 @@ namespace DeviceLibrary ...@@ -424,7 +424,7 @@ namespace DeviceLibrary
lbl.BackColor = Color.Red ; lbl.BackColor = Color.Red ;
lblAlarmcode.Visible = true; lblAlarmcode.Visible = true;
lblAlarmcode.ForeColor = Color.Red; lblAlarmcode.ForeColor = Color.Red;
lblAlarmcode.Text = "错误码:" + HCBoardManager.GetAxErrCode(SlvAddr); lblAlarmcode.Text = crc.GetString("Res0170","错误码:") + HCBoardManager.GetAxErrCode(SlvAddr);
} }
else else
{ {
...@@ -445,4 +445,4 @@ namespace DeviceLibrary ...@@ -445,4 +445,4 @@ namespace DeviceLibrary
} }
} }
} }
} }
\ No newline at end of file \ No newline at end of file
using DeviceLibrary; using DeviceLibrary;
using HuichuanLibrary; using HuichuanLibrary;
using OnlineStore; using OnlineStore;
using OnlineStore.Common; using OnlineStore.Common;
...@@ -75,11 +75,11 @@ public partial class AxisTipControl : Form ...@@ -75,11 +75,11 @@ public partial class AxisTipControl : Form
AxisSts sts = HCBoardManager.GetAxisSts(SlvAddr); AxisSts sts = HCBoardManager.GetAxisSts(SlvAddr);
if (sts.ServoOn < 0) if (sts.ServoOn < 0)
{ {
showToolTip("伺服尚未使能",c); showToolTip(crc.GetString("Res0171","伺服尚未使能"),c);
return; return;
} }
if (sts.ALM != 0 || sts.WARN != 0 || sts.EMG != 0) { if (sts.ALM != 0 || sts.WARN != 0 || sts.EMG != 0) {
showToolTip("伺服警报状态中",c); showToolTip(crc.GetString("Res0172","伺服警报状态中"),c);
return; return;
} }
readPosition(); readPosition();
...@@ -137,7 +137,7 @@ public partial class AxisTipControl : Form ...@@ -137,7 +137,7 @@ public partial class AxisTipControl : Form
void showToolTip(string txt,Control control) { void showToolTip(string txt,Control control) {
var m_ToolTip = new ToolTip(); var m_ToolTip = new ToolTip();
m_ToolTip.ToolTipIcon = ToolTipIcon.Warning; m_ToolTip.ToolTipIcon = ToolTipIcon.Warning;
m_ToolTip.ToolTipTitle = "无法操作"; m_ToolTip.ToolTipTitle = crc.GetString("Res0173","无法操作");
m_ToolTip.AutoPopDelay = 0; m_ToolTip.AutoPopDelay = 0;
m_ToolTip.AutomaticDelay = 0; m_ToolTip.AutomaticDelay = 0;
m_ToolTip.InitialDelay = 0; m_ToolTip.InitialDelay = 0;
...@@ -167,7 +167,7 @@ public partial class AxisTipControl : Form ...@@ -167,7 +167,7 @@ public partial class AxisTipControl : Form
int speed = Convert.ToInt32(comjSpeed.Text); int speed = Convert.ToInt32(comjSpeed.Text);
if (speed <= 0) if (speed <= 0)
{ {
MessageBox.Show("提示", "请先输入正确的速度"); MessageBox.Show(crc.GetString("Res0167","提示"), crc.GetString("Res0168","请先输入正确的速度"));
return; return;
} }
btnAddMove.BackColor = Color.Green; btnAddMove.BackColor = Color.Green;
...@@ -200,7 +200,7 @@ public partial class AxisTipControl : Form ...@@ -200,7 +200,7 @@ public partial class AxisTipControl : Form
int speed = Convert.ToInt32(comjSpeed.Text); int speed = Convert.ToInt32(comjSpeed.Text);
if (speed <= 0) if (speed <= 0)
{ {
MessageBox.Show("提示", "请先输入正确的速度"); MessageBox.Show(crc.GetString("Res0167","提示"), crc.GetString("Res0168","请先输入正确的速度"));
return; return;
} }
btnDelMove.BackColor = Color.Green; btnDelMove.BackColor = Color.Green;
...@@ -222,12 +222,12 @@ public partial class AxisTipControl : Form ...@@ -222,12 +222,12 @@ public partial class AxisTipControl : Form
AxisSts sts = HCBoardManager.GetAxisSts(SlvAddr); AxisSts sts = HCBoardManager.GetAxisSts(SlvAddr);
if (sts.ServoOn < 0) if (sts.ServoOn < 0)
{ {
showToolTip("伺服尚未使能", (Control)sender); showToolTip(crc.GetString("Res0171","伺服尚未使能"), (Control)sender);
return false; return false;
} }
if (sts.ALM != 0 || sts.WARN != 0 || sts.EMG != 0) if (sts.ALM != 0 || sts.WARN != 0 || sts.EMG != 0)
{ {
showToolTip("伺服警报状态中", (Control)sender); showToolTip(crc.GetString("Res0172","伺服警报状态中"), (Control)sender);
return false; return false;
} }
return true; return true;
...@@ -257,4 +257,3 @@ public partial class AxisTipControl : Form ...@@ -257,4 +257,3 @@ public partial class AxisTipControl : Form
SetRelList((int)comjSpeed.SelectedItem); SetRelList((int)comjSpeed.SelectedItem);
} }
} }
using Newtonsoft.Json; using OnlineStore;
using Newtonsoft.Json;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
...@@ -37,7 +38,7 @@ namespace DeviceLibrary ...@@ -37,7 +38,7 @@ namespace DeviceLibrary
if (string.IsNullOrWhiteSpace(textBox_startcode.Text)) if (string.IsNullOrWhiteSpace(textBox_startcode.Text))
{ {
MessageBox.Show("条码首字母不能为空"); MessageBox.Show(crc.GetString("Res0174","条码首字母不能为空"));
return; return;
} }
FixtureConfig fixtureConfig = new FixtureConfig(); FixtureConfig fixtureConfig = new FixtureConfig();
...@@ -75,8 +76,9 @@ namespace DeviceLibrary ...@@ -75,8 +76,9 @@ namespace DeviceLibrary
public override string ToString() public override string ToString()
{ {
return $"[{StartCode}]={Width}x{Height}"+ (UseActualHeight?$", "+"物理厚度"+$":{ActualHeight}":"") + (AbandonCode? ", "+"自动弃用" : ""); return $"[{StartCode}]={Width}x{Height}"+ (UseActualHeight?$", "+crc.GetString("Res0175","物理厚度")+$":{ActualHeight}":"") + (AbandonCode? ", "+crc.GetString("Res0176","自动弃用") : "");
} }
public static bool GetFixtureHeight(int poswidth,int posheight, out int FixtureHeight) { public static bool GetFixtureHeight(int poswidth,int posheight, out int FixtureHeight) {
FixtureHeight = 0; FixtureHeight = 0;
var fcc = FixtureConfigList.Find(fc => fc.Width == poswidth && fc.Height == posheight); var fcc = FixtureConfigList.Find(fc => fc.Width == poswidth && fc.Height == posheight);
...@@ -99,7 +101,8 @@ namespace DeviceLibrary ...@@ -99,7 +101,8 @@ namespace DeviceLibrary
} catch { } } catch { }
} }
public static void Add(FixtureConfig fixtureConfig) { public static void Add(FixtureConfig fixtureConfig)
{
var fcc = FixtureConfigList.FindIndex(fc => fc.StartCode == fixtureConfig.StartCode); var fcc = FixtureConfigList.FindIndex(fc => fc.StartCode == fixtureConfig.StartCode);
if (fcc <0) if (fcc <0)
...@@ -123,4 +126,4 @@ namespace DeviceLibrary ...@@ -123,4 +126,4 @@ namespace DeviceLibrary
} }
} }
} }
\ No newline at end of file \ No newline at end of file
...@@ -15,9 +15,9 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -15,9 +15,9 @@ namespace OnlineStore.LoadCSVLibrary
string configFile = Path.Combine(baseDir, "config\\Config.csv"); string configFile = Path.Combine(baseDir, "config\\Config.csv");
var Config = new Robot_Config(0, "", configFile); var Config = new Robot_Config(0, "", configFile);
Config = (Robot_Config)CSVConfigReader.LoadConfig<IO_Type>(Config); Config = (Robot_Config)CSVConfigReader.LoadConfig<IO_Type>(Config);
var RConfig = new R_Config(0, "", Path.Combine(baseDir, "config\\Config_Right.csv")); var RConfig = new R_Config(0, "", Path.Combine(baseDir, "config\\Right\\Config.csv"));
RConfig = (R_Config)CSVConfigReader.LoadConfig<SIO_Type>(RConfig); RConfig = (R_Config)CSVConfigReader.LoadConfig<SIO_Type>(RConfig);
var LConfig = new L_Config(0, "", Path.Combine(baseDir, "config\\Config_Left.csv")); var LConfig = new L_Config(0, "", Path.Combine(baseDir, "config\\Left\\Config.csv"));
LConfig = (L_Config)CSVConfigReader.LoadConfig<SIO_Type>(LConfig); LConfig = (L_Config)CSVConfigReader.LoadConfig<SIO_Type>(LConfig);
Store_ConfigBase device = LConfig; Store_ConfigBase device = LConfig;
......
...@@ -42,7 +42,16 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -42,7 +42,16 @@ namespace OnlineStore.LoadCSVLibrary
/// </summary> /// </summary>
[CSVAttribute("目标速度")] [CSVAttribute("目标速度")]
public int TargetSpeed { get; set; } public int TargetSpeed { get; set; }
/// <summary>
/// 目标速度
/// </summary>
[CSVAttribute("加速时间")]
public int AddSpeed { get; set; }
/// <summary>
/// 目标速度
/// </summary>
[CSVAttribute("减速时间")]
public int DelSpeed { get; set; }
public string ConfigStr { get; set; } public string ConfigStr { get; set; }
public override string ToString() public override string ToString()
...@@ -80,12 +89,6 @@ namespace OnlineStore.LoadCSVLibrary ...@@ -80,12 +89,6 @@ namespace OnlineStore.LoadCSVLibrary
[CSVAttribute("目标速度")] [CSVAttribute("目标速度")]
public new int TargetSpeed { get; set; } public new int TargetSpeed { get; set; }
[CSVAttribute("加速时间")]
public int AddSpeed { get; set; }
[CSVAttribute("减速时间")]
public int DelSpeed { get; set; }
[CSVAttribute("原点低速度")] [CSVAttribute("原点低速度")]
public int HomeLowSpeed { get; set; } public int HomeLowSpeed { get; set; }
......
using CodeLibrary; using CodeLibrary;
using ConfigHelper; using ConfigHelper;
using DeviceLibrary; using DeviceLibrary;
using OnlineStore; using OnlineStore;
...@@ -99,7 +99,7 @@ namespace TheMachine ...@@ -99,7 +99,7 @@ namespace TheMachine
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)
AddForm("tab_log", "日志", lc); AddForm("tab_log", crc.GetString("Res0177","日志"), lc);
RobotManage.CameraA.camera_event += CameraA_camera_event; RobotManage.CameraA.camera_event += CameraA_camera_event;
...@@ -121,7 +121,7 @@ namespace TheMachine ...@@ -121,7 +121,7 @@ namespace TheMachine
}); });
})); }));
ListViewItem lvi = new ListViewItem(new string[] { "", DateTime.Now.ToString("HH:mm:ss"), "设备加载中,请稍后..." }); ListViewItem lvi = new ListViewItem(new string[] { "", DateTime.Now.ToString("HH:mm:ss"), crc.GetString("Res0178","设备加载中,请稍后...") });
lvi.ForeColor = Color.DarkGreen; lvi.ForeColor = Color.DarkGreen;
listViewL.Items.Add(lvi); listViewL.Items.Add(lvi);
//while (!loadtask.IsCompleted) { //while (!loadtask.IsCompleted) {
...@@ -170,10 +170,10 @@ namespace TheMachine ...@@ -170,10 +170,10 @@ namespace TheMachine
const int tabpagecount = 4; const int tabpagecount = 4;
void addTablePage() { void addTablePage() {
AddForm("tab_io","IO调试", ioc); AddForm("tab_io",crc.GetString("Form1_tabc_tab_io_Text","IO调试"), ioc);
AddForm("tab_leftMachine", "左侧料仓", leftMachine); AddForm("tab_leftMachine", crc.GetString("Form1_tabc_tabP1_pnl_gb_left_Text","左侧料仓"), leftMachine);
AddForm("tab_rightMachine", "右侧料仓", rightMachine); AddForm("tab_rightMachine", crc.GetString("Form1_tabc_tabP1_pnl_gb_right_Text","右侧料仓"), rightMachine);
AddForm("tab_sc","通用设置", sc); AddForm("tab_sc",crc.GetString("Form1_tabc_tab_sc_Text","通用设置"), sc);
crc.LanguageProcess(this); crc.LanguageProcess(this);
} }
...@@ -186,7 +186,7 @@ namespace TheMachine ...@@ -186,7 +186,7 @@ namespace TheMachine
RobotManage.Stores.ForEach(s=> { RobotManage.Stores.ForEach(s=> {
if (Config.Get<bool>($"Device_{s.MachineSide}_Disable")) { if (Config.Get<bool>($"Device_{s.MachineSide}_Disable")) {
MsgService.MSList[s.MachineSide].add("料仓已被禁用", MsgLevel.warning); MsgService.MSList[s.MachineSide].add(crc.GetString("Res0179","料仓已被禁用"), MsgLevel.warning);
MainMachine_ProcessMsgEvent(MsgService.MSList[s.MachineSide].get()); MainMachine_ProcessMsgEvent(MsgService.MSList[s.MachineSide].get());
} }
}); });
...@@ -244,7 +244,7 @@ namespace TheMachine ...@@ -244,7 +244,7 @@ namespace TheMachine
{ {
RobotManage.IsConfigMode = RobotManage.IsConfigMode ? false : true; RobotManage.IsConfigMode = RobotManage.IsConfigMode ? false : true;
(sender as ToolStripMenuItem).Text = !RobotManage.IsConfigMode ? "启用配置模式" : "停用配置模式"; (sender as ToolStripMenuItem).Text = !RobotManage.IsConfigMode ? crc.GetString("Res0180","启用配置模式") : crc.GetString("Res0181","停用配置模式");
if (RobotManage.IsConfigMode) if (RobotManage.IsConfigMode)
...@@ -376,7 +376,7 @@ namespace TheMachine ...@@ -376,7 +376,7 @@ namespace TheMachine
{ {
if (RobotManage.mainMachine.IOValue(IO_Type.SuddenStop_BTN,RobotManage.Config).Equals(IO_VALUE.LOW)) if (RobotManage.mainMachine.IOValue(IO_Type.SuddenStop_BTN,RobotManage.Config).Equals(IO_VALUE.LOW))
{ {
MsgService.Add("急停中,无法启动", MsgLevel.warning); MsgService.Add(crc.GetString("Res0182","急停中,无法启动"), MsgLevel.warning);
MainMachine_ProcessMsgEvent(MsgService.Get()); MainMachine_ProcessMsgEvent(MsgService.Get());
return; return;
} }
...@@ -408,7 +408,7 @@ namespace TheMachine ...@@ -408,7 +408,7 @@ namespace TheMachine
private void 退出ToolStripMenuItem_Click(object sender, EventArgs e) private void 退出ToolStripMenuItem_Click(object sender, EventArgs e)
{ {
if (RobotManage.isRunning) { if (RobotManage.isRunning) {
MessageBox.Show("机器尚在运行,不能退出,请先停止运行."); MessageBox.Show(crc.GetString("Res0183","机器尚在运行,不能退出,请先停止运行."));
} else { } else {
RobotManage.Stop(); RobotManage.Stop();
RobotManage.ShutDown(); RobotManage.ShutDown();
...@@ -507,14 +507,14 @@ namespace TheMachine ...@@ -507,14 +507,14 @@ namespace TheMachine
crc.LanguageProcess(this, this.GetType().Name); crc.LanguageProcess(this, this.GetType().Name);
crc.ProcessListItem(menuStrip1.Items, "menuStrip1"); crc.ProcessListItem(menuStrip1.Items, "menuStrip1");
listViewL.Columns[1].Text = "时间"; listViewL.Columns[1].Text = crc.GetString("Res0184","时间");
listViewL.Columns[2].Text = "信息"; listViewL.Columns[2].Text = crc.GetString("Form1_tabc_tabP1_Text","信息");
stateViewL.Columns[1].Text = "模块"; stateViewL.Columns[1].Text = crc.GetString("Res0185","模块");
stateViewL.Columns[2].Text = "步骤"; stateViewL.Columns[2].Text = crc.GetString("Res0186","步骤");
stateViewL.Columns[3].Text = "信息"; stateViewL.Columns[3].Text = crc.GetString("Form1_tabc_tabP1_Text","信息");
启用调试模式ToolStripMenuItem.Text = !RobotManage.IsConfigMode ? "启用配置模式" : "停用配置模式"; 启用调试模式ToolStripMenuItem.Text = !RobotManage.IsConfigMode ? crc.GetString("Res0180","启用配置模式") : crc.GetString("Res0181","停用配置模式");
} }
...@@ -536,4 +536,4 @@ namespace TheMachine ...@@ -536,4 +536,4 @@ namespace TheMachine
crc.LanguageChange(); crc.LanguageChange();
} }
} }
} }
\ No newline at end of file \ No newline at end of file
using CodeLibrary; using CodeLibrary;
using ConfigHelper; using ConfigHelper;
using DeviceLibrary; using DeviceLibrary;
using OnlineStore; using OnlineStore;
...@@ -87,15 +87,15 @@ namespace TheMachine ...@@ -87,15 +87,15 @@ namespace TheMachine
if (!Visible) if (!Visible)
return; return;
lbl_hmdstate.Text = "当前状态:"; lbl_hmdstate.Text = crc.GetString("Res0187","当前状态:");
if (!HumitureController.IsRun) if (!HumitureController.IsRun)
{ {
lbl_hmdstate.Text += "未成功连接"; lbl_hmdstate.Text += crc.GetString("Res0188","未成功连接");
return; return;
} }
var t = HumitureController.LastData; var t = HumitureController.LastData;
lbl_hmdstate.Text += "温度"+$"{t.Temperate}℃, "+"湿度"+$"{t.Humidity}%"; lbl_hmdstate.Text += crc.GetString("Res0189","温度")+$"{t.Temperate}℃, "+crc.GetString("Res0190","湿度")+$"{t.Humidity}%";
} }
} }
} }
\ No newline at end of file \ No newline at end of file
using CodeLibrary; using CodeLibrary;
using ConfigHelper; using ConfigHelper;
using DeviceLibrary; using DeviceLibrary;
using OnlineStore; using OnlineStore;
...@@ -49,7 +49,7 @@ namespace TheMachine ...@@ -49,7 +49,7 @@ namespace TheMachine
{ {
if (RobotManage.isRunning) if (RobotManage.isRunning)
{ {
MessageBox.Show("运行库位校准程序前,需要先停止料仓的运行"); MessageBox.Show(crc.GetString("Res0191","运行库位校准程序前,需要先停止料仓的运行"));
} }
else else
{ {
...@@ -65,4 +65,4 @@ namespace TheMachine ...@@ -65,4 +65,4 @@ namespace TheMachine
} }
} }
} }
\ No newline at end of file \ No newline at end of file
using DeviceLibrary; using OnlineStore;
using DeviceLibrary;
using OnlineStore.Common; using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary; using OnlineStore.LoadCSVLibrary;
using System; using System;
...@@ -215,7 +216,7 @@ namespace TheMachine ...@@ -215,7 +216,7 @@ namespace TheMachine
{ {
if (!Setting_Init.Device_Axis_Manual_Control_AtRunning && Machine.isRunning) if (!Setting_Init.Device_Axis_Manual_Control_AtRunning && Machine.isRunning)
{ {
MessageBox.Show("系统正在运行,不能手动控制伺服"); MessageBox.Show(crc.GetString("Res0210","系统正在运行,不能手动控制伺服"));
return; return;
} }
var cc = tableLayoutPanel1.Controls.Find(((Button)sender).Name, false); var cc = tableLayoutPanel1.Controls.Find(((Button)sender).Name, false);
...@@ -293,4 +294,4 @@ namespace TheMachine ...@@ -293,4 +294,4 @@ namespace TheMachine
Config = (Store_ConfigBase)CSVConfigReader.LoadConfig<SIO_Type>(Config); Config = (Store_ConfigBase)CSVConfigReader.LoadConfig<SIO_Type>(Config);
} }
} }
} }
\ No newline at end of file \ No newline at end of file
using DeviceLibrary; using OnlineStore;
using DeviceLibrary;
using OnlineStore.LoadCSVLibrary; using OnlineStore.LoadCSVLibrary;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
...@@ -71,28 +72,28 @@ namespace TheMachine.UC ...@@ -71,28 +72,28 @@ namespace TheMachine.UC
Label label_s = new Label() Label label_s = new Label()
{ {
Size = new Size(200, 34), Size = new Size(200, 34),
Text = "状态,优先级从大到小", Text = crc.GetString("Res0220","状态,优先级从大到小"),
TextAlign = ContentAlignment.MiddleLeft TextAlign = ContentAlignment.MiddleLeft
}; };
tableLayoutPanel1.Controls.Add(label_s, 0, 0); tableLayoutPanel1.Controls.Add(label_s, 0, 0);
Label label_g = new Label() Label label_g = new Label()
{ {
Size = new Size(120, 34), Size = new Size(120, 34),
Text = "绿灯", Text = crc.GetString("Res0221","绿灯"),
TextAlign = ContentAlignment.MiddleCenter TextAlign = ContentAlignment.MiddleCenter
}; };
tableLayoutPanel1.Controls.Add(label_g, 1, 0); tableLayoutPanel1.Controls.Add(label_g, 1, 0);
Label label_y = new Label() Label label_y = new Label()
{ {
Size = new Size(120, 34), Size = new Size(120, 34),
Text = "黄灯", Text = crc.GetString("Res0222","黄灯"),
TextAlign = ContentAlignment.MiddleCenter TextAlign = ContentAlignment.MiddleCenter
}; };
tableLayoutPanel1.Controls.Add(label_y, 2, 0); tableLayoutPanel1.Controls.Add(label_y, 2, 0);
Label label_r = new Label() Label label_r = new Label()
{ {
Size = new Size(120, 34), Size = new Size(120, 34),
Text = "红灯", Text = crc.GetString("Res0223","红灯"),
TextAlign = ContentAlignment.MiddleCenter TextAlign = ContentAlignment.MiddleCenter
}; };
tableLayoutPanel1.Controls.Add(label_r, 3, 0); tableLayoutPanel1.Controls.Add(label_r, 3, 0);
...@@ -114,10 +115,10 @@ namespace TheMachine.UC ...@@ -114,10 +115,10 @@ namespace TheMachine.UC
foreach (var led in Led.LedColors.Keys) foreach (var led in Led.LedColors.Keys)
{ {
List<lightitem> lightitems = new List<lightitem>(); List<lightitem> lightitems = new List<lightitem>();
lightitems.Add(new lightitem("无动作", LedState.none)); lightitems.Add(new lightitem(crc.GetString("Res0224","无动作"), LedState.none));
lightitems.Add(new lightitem("关", LedState.off)); lightitems.Add(new lightitem(crc.GetString("Res0225","关"), LedState.off));
lightitems.Add(new lightitem("开", LedState.on)); lightitems.Add(new lightitem(crc.GetString("Res0226","开"), LedState.on));
lightitems.Add(new lightitem("闪烁", LedState.blink)); lightitems.Add(new lightitem(crc.GetString("Res0227","闪烁"), LedState.blink));
var selit = lightitems.FindIndex(x => x.value == RobotManage.mainMachine.MachineLedState[key][led]); var selit = lightitems.FindIndex(x => x.value == RobotManage.mainMachine.MachineLedState[key][led]);
ComboBox comboBox = new ComboBox(); ComboBox comboBox = new ComboBox();
...@@ -171,9 +172,9 @@ namespace TheMachine.UC ...@@ -171,9 +172,9 @@ namespace TheMachine.UC
} }
if (RobotManage.mainMachine.SaveLedCfg()) if (RobotManage.mainMachine.SaveLedCfg())
MessageBox.Show("保存成功!"); MessageBox.Show(crc.GetString("Res0228","保存成功!"));
else else
MessageBox.Show("保存失败!"); MessageBox.Show(crc.GetString("Res0229","保存失败!"));
} }
} }
} }
\ No newline at end of file \ No newline at end of file
using DeviceLibrary; using DeviceLibrary;
using log4net; using log4net;
using OnlineStore; using OnlineStore;
using OnlineStore.Common; using OnlineStore.Common;
...@@ -66,7 +66,7 @@ namespace TheMachine ...@@ -66,7 +66,7 @@ namespace TheMachine
timer1.Enabled = true; timer1.Enabled = true;
} }
catch(Exception ex) { catch(Exception ex) {
MessageBox.Show("库位表解析错误"); MessageBox.Show(crc.GetString("Res0211","库位表解析错误"));
LogUtil.error(Name + " " + ex.ToString()); LogUtil.error(Name + " " + ex.ToString());
} }
...@@ -347,14 +347,14 @@ namespace TheMachine ...@@ -347,14 +347,14 @@ namespace TheMachine
ACStorePosition ktkPosition = Machine.StorePosition[selectPositionNum]; ACStorePosition ktkPosition = Machine.StorePosition[selectPositionNum];
JobInfo jobInfo = new JobInfo("IN_TEST", selectPositionNum, ktkPosition.BagWidth, ktkPosition.BagHigh); JobInfo jobInfo = new JobInfo("IN_TEST", selectPositionNum, ktkPosition.BagWidth, ktkPosition.BagHigh);
if (!Machine.StartInStore(jobInfo,Machine.AIOTMoveInfo)) { if (!Machine.StartInStore(jobInfo,Machine.AIOTMoveInfo)) {
MessageBox.Show("料盘没有到位,无法手动入库"); MessageBox.Show(crc.GetString("Res0212","料盘没有到位,无法手动入库"));
return; return;
} }
LogUtil.info($"手动入库:{selectPositionNum}"); LogUtil.info($"手动入库:{selectPositionNum}");
} }
else else
{ {
MessageBox.Show("请先启动料仓!"); MessageBox.Show(crc.GetString("Res0213","请先启动料仓!"));
} }
} }
...@@ -377,7 +377,7 @@ namespace TheMachine ...@@ -377,7 +377,7 @@ namespace TheMachine
} }
else else
{ {
MessageBox.Show("请先启动料仓!"); MessageBox.Show(crc.GetString("Res0213","请先启动料仓!"));
} }
} }
...@@ -406,13 +406,13 @@ namespace TheMachine ...@@ -406,13 +406,13 @@ namespace TheMachine
{ {
btnOutStore.Enabled = false; btnOutStore.Enabled = false;
btnInStore.Enabled = false; btnInStore.Enabled = false;
btn_autoinout.Text = "停止自动库位测试"; btn_autoinout.Text = crc.GetString("Res0214","停止自动库位测试");
} }
else else
{ {
btnOutStore.Enabled = true; btnOutStore.Enabled = true;
btnInStore.Enabled = true; btnInStore.Enabled = true;
btn_autoinout.Text = "自动库位测试"; btn_autoinout.Text = crc.GetString("Res0215","自动库位测试");
} }
} }
private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e) private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
...@@ -447,7 +447,7 @@ namespace TheMachine ...@@ -447,7 +447,7 @@ namespace TheMachine
if (Machine.AutoInOutTest) if (Machine.AutoInOutTest)
{ {
Machine.StopAutoInOutTest(); Machine.StopAutoInOutTest();
MessageBox.Show("自动出入库过程会再料盘送至出口后自动停止."); MessageBox.Show(crc.GetString("Res0216","自动出入库过程会再料盘送至出口后自动停止."));
return; return;
} }
...@@ -456,11 +456,11 @@ namespace TheMachine ...@@ -456,11 +456,11 @@ namespace TheMachine
if (!Machine.IOValue(SIO_Type.Door_Tray_Check, Config).Equals(IO_VALUE.HIGH)) if (!Machine.IOValue(SIO_Type.Door_Tray_Check, Config).Equals(IO_VALUE.HIGH))
{ {
MessageBox.Show("入库料盘没有准备好,请先点击[上料准备],无法启动"); MessageBox.Show(crc.GetString("Res0217","入库料盘没有准备好,请先点击[上料准备],无法启动"));
return; return;
} }
DialogResult res = MessageBox.Show("确定开始自动库位测试?\n请确保料仓库位全部为空.", "提示", MessageBoxButtons.YesNo); DialogResult res = MessageBox.Show(crc.GetString("Res0218","确定开始自动库位测试?\n请确保料仓库位全部为空."), crc.GetString("Res0167","提示"), MessageBoxButtons.YesNo);
if (res == DialogResult.No) if (res == DialogResult.No)
return; return;
int posindex = Machine.PositionNumList.IndexOf(cmbPosition.Text); int posindex = Machine.PositionNumList.IndexOf(cmbPosition.Text);
...@@ -470,11 +470,11 @@ namespace TheMachine ...@@ -470,11 +470,11 @@ namespace TheMachine
MessageBox.Show(errmsg); MessageBox.Show(errmsg);
return; return;
} }
(sender as Button).Text = "停止自动库位测试!"; (sender as Button).Text = crc.GetString("Res0219","停止自动库位测试!");
} }
else else
{ {
MessageBox.Show("请先启动料仓!"); MessageBox.Show(crc.GetString("Res0213","请先启动料仓!"));
} }
} }
...@@ -491,4 +491,4 @@ namespace TheMachine ...@@ -491,4 +491,4 @@ namespace TheMachine
} }
} }
} }
\ No newline at end of file \ No newline at end of file
using ConfigHelper; using ConfigHelper;
using DeviceLibrary; using DeviceLibrary;
using OnlineStore;
using OnlineStore.Common; using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary; using OnlineStore.LoadCSVLibrary;
using System; using System;
...@@ -37,8 +38,12 @@ namespace TheMachine ...@@ -37,8 +38,12 @@ namespace TheMachine
bd.Config = Machine.Config; bd.Config = Machine.Config;
sio.Config = Machine.Config; sio.Config = Machine.Config;
Common.AlertListViewSet(listView); Common.AlertListViewSet(listView);
this.Tag = "not";
crc.LanguageChangeEvent += Crc_LanguageChangeEvent;
}
private void Crc_LanguageChangeEvent(object sender, EventArgs e)
{
} }
private void Machine_ProcessMsgEvent(List<Msg> msg) private void Machine_ProcessMsgEvent(List<Msg> msg)
{ {
if (msg == null) if (msg == null)
...@@ -116,10 +121,10 @@ namespace TheMachine ...@@ -116,10 +121,10 @@ namespace TheMachine
private void UCStoreMachine_Load(object sender, EventArgs e) private void UCStoreMachine_Load(object sender, EventArgs e)
{ {
Config.PropertyBind($"Device_{Machine.MachineSide}_Disable", checkBox_disable, "Checked", "CheckedChanged"); Config.PropertyBind($"Device_{Machine.MachineSide}_Disable", checkBox_disable, "Checked", "CheckedChanged");
AddForm("tab_sio", "IO调试", sio); AddForm("tab_sio", crc.GetString("Form1_tabc_tab_io_Text","IO调试"), sio);
AddForm("tab_axis","伺服调试", ac); AddForm("tab_axis",crc.GetString("Res0192","伺服调试"), ac);
AddForm("tab_store", "库位调试", bd); AddForm("tab_store", crc.GetString("Res0193","库位调试"), bd);
AddForm("tab_setting", "相关设置", sc); AddForm("tab_setting", crc.GetString("Res0194","相关设置"), sc);
} }
private void AddForm(string id, string text, UserControl form) private void AddForm(string id, string text, UserControl form)
...@@ -160,7 +165,7 @@ namespace TheMachine ...@@ -160,7 +165,7 @@ namespace TheMachine
if (!Machine.isRunning) { if (!Machine.isRunning) {
btn_stop.Enabled = false; btn_stop.Enabled = false;
btn_run.Text = "启动"; btn_run.Text = crc.GetString("Res0195","启动");
btn_run.BackColor = Color.Transparent; btn_run.BackColor = Color.Transparent;
return; return;
} }
...@@ -168,13 +173,13 @@ namespace TheMachine ...@@ -168,13 +173,13 @@ namespace TheMachine
if (e) if (e)
{ {
//Machine.UserPause = true; //Machine.UserPause = true;
(btn_run as Button).Text = "恢复运行"; (btn_run as Button).Text = crc.GetString("Res0196","恢复运行");
(btn_run as Button).BackColor = Color.LightGreen; (btn_run as Button).BackColor = Color.LightGreen;
} }
else else
{ {
//Machine.UserPause = false; //Machine.UserPause = false;
(btn_run as Button).Text = "暂停运行"; (btn_run as Button).Text = crc.GetString("Res0197","暂停运行");
(btn_run as Button).BackColor = Color.Yellow; (btn_run as Button).BackColor = Color.Yellow;
} }
} }
...@@ -184,7 +189,7 @@ namespace TheMachine ...@@ -184,7 +189,7 @@ namespace TheMachine
{ {
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("急停中,无法启动", 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;
} }
...@@ -218,4 +223,4 @@ namespace TheMachine ...@@ -218,4 +223,4 @@ namespace TheMachine
//btn_run.BackColor = Color.Transparent; //btn_run.BackColor = Color.Transparent;
} }
} }
} }
\ No newline at end of file \ No newline at end of file
using DeviceLibrary; using OnlineStore;
using DeviceLibrary;
using OnlineStore.Common; using OnlineStore.Common;
using OnlineStore.DeviceLibrary; using OnlineStore.DeviceLibrary;
using OnlineStore.LoadCSVLibrary; using OnlineStore.LoadCSVLibrary;
...@@ -19,7 +20,7 @@ namespace OnlineStore.ACSingleStore ...@@ -19,7 +20,7 @@ namespace OnlineStore.ACSingleStore
{ {
public partial class FrmPositionTool : Form public partial class FrmPositionTool : Form
{ {
private string LogName = "升降轴位置调试:"; private string LogName = crc.GetString("Res0198","升降轴位置调试:");
AxisBean UpDown_Axis; AxisBean UpDown_Axis;
string iotype=""; string iotype="";
StoreMachine Machine; StoreMachine Machine;
...@@ -65,7 +66,7 @@ namespace OnlineStore.ACSingleStore ...@@ -65,7 +66,7 @@ namespace OnlineStore.ACSingleStore
formStatus(isOn); formStatus(isOn);
if (isOn) if (isOn)
timer1.Start(); timer1.Start();
ioStatusControl1.IOName = "检测信号"; ioStatusControl1.IOName = crc.GetString("Res0199","检测信号");
} }
delegate void ShowLogProDelegate(string msg, Color color); delegate void ShowLogProDelegate(string msg, Color color);
...@@ -149,7 +150,7 @@ namespace OnlineStore.ACSingleStore ...@@ -149,7 +150,7 @@ namespace OnlineStore.ACSingleStore
if (speed <= (0)) if (speed <= (0))
{ {
MessageBox.Show("请输入正确的速度"); MessageBox.Show(crc.GetString("Res0200","请输入正确的速度"));
txtSpeed.Focus(); txtSpeed.Focus();
return; return;
} }
...@@ -263,7 +264,7 @@ namespace OnlineStore.ACSingleStore ...@@ -263,7 +264,7 @@ namespace OnlineStore.ACSingleStore
} }
LogUtil.info(LogName + "伺服已停止运动,停止定时器,记录数据"); LogUtil.info(LogName + "伺服已停止运动,停止定时器,记录数据");
List<string> strList = new List<string>(); List<string> strList = new List<string>();
strList.Add("编号,标准位置,升降轴库位入料高点P3,升降轴库位入料低点P4"); strList.Add(crc.GetString("Res0201","编号,标准位置,升降轴库位入料高点P3,升降轴库位入料低点P4"));
int index = 1; int index = 1;
foreach (int p in PositionList) foreach (int p in PositionList)
{ {
...@@ -299,7 +300,7 @@ namespace OnlineStore.ACSingleStore ...@@ -299,7 +300,7 @@ namespace OnlineStore.ACSingleStore
var homests = AxisManager.GetHomeEndStatus(PortName, SlvAddr); var homests = AxisManager.GetHomeEndStatus(PortName, SlvAddr);
var servisop = AxisManager.ServerOnStatus(PortName, SlvAddr); var servisop = AxisManager.ServerOnStatus(PortName, SlvAddr);
int moveS = AxisManager.GetBusyStatus(PortName, SlvAddr); int moveS = AxisManager.GetBusyStatus(PortName, SlvAddr);
label_servosts.Text = "伺服状态:"+(servisop ? "已使能" : "未使能")+ ","+ "原点状态:"+(homests == 3 ? "已完成" : "未完成") + "," + "忙碌状态:"+(moveS == 1 ? "忙碌中" : "空闲中"); label_servosts.Text = crc.GetString("Res0202","伺服状态:")+(servisop ? crc.GetString("Res0203","已使能") : crc.GetString("Res0204","未使能"))+ ","+ crc.GetString("Res0205","原点状态:")+(homests == 3 ? crc.GetString("Res0206","已完成") : crc.GetString("Res0207","未完成")) + "," + crc.GetString("Res0208","忙碌状态:")+(moveS == 1 ? crc.GetString("Res0209","忙碌中") : crc.GetString("Res0162","空闲中"));
ioStatusControl1.IOValue = (int)GetSingleValue(); ioStatusControl1.IOValue = (int)GetSingleValue();
ioStatusControl1.ShowData(); ioStatusControl1.ShowData();
...@@ -333,4 +334,4 @@ namespace OnlineStore.ACSingleStore ...@@ -333,4 +334,4 @@ namespace OnlineStore.ACSingleStore
} }
} }
\ No newline at end of file \ No newline at end of file
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!