Commit 6e8922c1 刘韬

梳理灯塔逻辑

1 个父辈 6b78cf3e
正在显示 38 个修改的文件 包含 659 行增加322 行删除
...@@ -10,7 +10,10 @@ using System.Windows.Forms.Layout; ...@@ -10,7 +10,10 @@ using System.Windows.Forms.Layout;
namespace OnlineStore namespace OnlineStore
{ {
public class crc : CodeResourceControl { } public class crc : CodeResourceControl
{
}
public class CodeResourceControl public class CodeResourceControl
{ {
public static readonly ILog LOG = LogManager.GetLogger("LngResource"); public static readonly ILog LOG = LogManager.GetLogger("LngResource");
...@@ -62,6 +65,10 @@ namespace OnlineStore ...@@ -62,6 +65,10 @@ namespace OnlineStore
{ {
return className + spiltStr + Text; return className + spiltStr + Text;
} }
public static string GetString(object id, string defaultStr)
{
return GetString(id.ToString(), defaultStr);
}
public static string GetString(string id, string defaultStr) public static string GetString(string id, string defaultStr)
{ {
string strCurLanguage = defaultStr; string strCurLanguage = defaultStr;
...@@ -111,10 +118,11 @@ namespace OnlineStore ...@@ -111,10 +118,11 @@ namespace OnlineStore
if (!LangMap["zh-CN"].ContainsKey(id) && checkInterid(id) && !hss.Contains(id)) if (!LangMap["zh-CN"].ContainsKey(id) && checkInterid(id) && !hss.Contains(id))
{ {
hss.Add(id); hss.Add(id);
LOG.Info("No Res id:" + id + "#" + defaultStr); LOG.Info("" + id + "\t" + defaultStr);
} }
} }
} }
private static bool checkInterid(string id) { private static bool checkInterid(string id) {
return true; return true;
...@@ -138,7 +146,7 @@ namespace OnlineStore ...@@ -138,7 +146,7 @@ namespace OnlineStore
var map = new Dictionary<string, string>(); var map = new Dictionary<string, string>();
foreach (string line in lines) foreach (string line in lines)
{ {
string[] array = line.Split('#'); string[] array = line.Split('\t');
if (array.Length >= 3) if (array.Length >= 3)
{ {
string key = array[0]; string key = array[0];
...@@ -180,13 +188,13 @@ namespace OnlineStore ...@@ -180,13 +188,13 @@ namespace OnlineStore
} }
private static void PreControlLanaguage(Control partentControl, string className) private static void PreControlLanaguage(Control partentControl, string className)
{ {
//string className = this.ClassName; string newStr = "";
Con_GetTxt(partentControl, out string title); //Con_GetTxt(partentControl, out string title);
string newStr = GetString(GetTextIdStr(className, partentControl.Name), title); //string newStr = GetString(GetTextIdStr(className, partentControl.Name), title);
if (!newStr.Equals("")) //if (!newStr.Equals(""))
{ //{
Con_SetTxt(partentControl, newStr.Replace("\\n", "\n")); //Con_SetTxt(partentControl, newStr.Replace("\\n", "\n"));
} //}
foreach (Control con in partentControl.Controls) foreach (Control con in partentControl.Controls)
{ {
string txt = ""; string txt = "";
......
...@@ -55,6 +55,7 @@ ...@@ -55,6 +55,7 @@
<Compile Include="CodeResourceControl.cs" /> <Compile Include="CodeResourceControl.cs" />
<Compile Include="Properties\AssemblyInfo.cs" /> <Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Setting_Init.cs" /> <Compile Include="Setting_Init.cs" />
<Compile Include="StringList.cs" />
<Compile Include="util\AcSerialBean.cs" /> <Compile Include="util\AcSerialBean.cs" />
<Compile Include="util\ConfigAppSettings.cs" /> <Compile Include="util\ConfigAppSettings.cs" />
<Compile Include="util\FormUtil.cs" /> <Compile Include="util\FormUtil.cs" />
......
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace OnlineStore.Common
{
public enum L
{
enable_config_mode,
disable_config_mode,
safty_release_string,
safty_releaseing_string,
safty_releaseed_string,
connect_fail,
humidity,
current_status,
device_initializing,
tab_io,
tab_axis,
tab_store,
tab_setting,
tab_log,
table_datetime,
table_info,
table_module,
table_step,
device_isrunning_cant_exit,
start,
device_pause,
device_resume,
device_suddenstop_cant_start,
open_debug_mode,
iocard_init_fail,
tempnhum_sensor_init_fail,
cant_find_storeposfile,
transfer_equipment,
string_inout_equipment,
clamp_equipment,
store_manage_equipment,
reset_equipment,
autotest_inout_equipment,
Clamp_Axis_interference_01,
Clamp_Axis_interference_02,
Clamp_Axis_interference_03,
Middle_Axis_interference_01,
UpDown_Axis_interference_01,
out_store_wait_ngdoor_ready,
out_store_not_detect_material,
out_store_detect_material,
out_store_wait_string_ready,
in_store_detect_material,
wait_reel_transfer,
reset_press,
reset_press_with_sudden,
runbtn_press,
system_is_running,
runbtn_press_with_sudden,
not_detect_airpressure,
x29_low_no_reel,
wait_put_reel_into_ngdoor,
ignored,
SafetyLight_is_block,
left_safedoor_not_close,
right_safedoor_not_close,
back_safedoor_not_close,
x29_higt_has_reel,
system_pause,
in_suddenstop,
system_need_reset,
store_inout_debug_mode,
airpressure_not_enough,
motion_alarm,
wait_detect_reel_height,
wait_user_select_pos,
wait_server_response_pos,
reel_wait_in_store,
please_take_ngdoor_reel,
no_string,
wait_stringdoor_close,
detect_string,
string_ready_for_get,
wait_string_take,
string_ready_for_put,
in_store_ng,
posnum,
not_detect_reel_height,
not_detect_reel_code,
scan_code_timeout,
wait_server_response_pos_timeout,
string_releasing,
ngdoor,
scanning_code,
taking_code,
no_info_reel,
ngdoor_reel_out,
timeout,
wait,
empty_reel,
full_reel,
instore_reel,
string_prepare,
free,
reel_outting,
reel_ining,
FrmPositionTool_serv_state,
FrmPositionTool_enable,
FrmPositionTool_disable,
FrmPositionTool_homests,
FrmPositionTool_finish,
FrmPositionTool_unfinish,
FrmPositionTool_busysts,
FrmPositionTool_busying,
detect_signal,
reel_not_onposition_cant_manual_in,
stop_inout_test,
start_device_first,
tips,
autotest_msg_01,
autotest_msg_02,
stop_auto_test,
start_auto_test,
store_busy_cant_manual_out,
monitor_open_fail,
monitor_config_load_fail,
monitor_config_not_exist,
AxisMoveControl_status_monitor
}
}
using Asa.Camera; using Asa.Camera;
using DeviceLibrary; using DeviceLibrary;
using OnlineStore;
using OnlineStore.Common; using OnlineStore.Common;
using OnlineStore.DeviceLibrary; using OnlineStore.DeviceLibrary;
using System; using System;
...@@ -38,7 +39,7 @@ public class HIKCamera ...@@ -38,7 +39,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(L.monitor_config_not_exist, "找不到监控相机配置文件");
LogUtil.error(Name + "找不到监控相机配置文件" + path); LogUtil.error(Name + "找不到监控相机配置文件" + path);
return false; return false;
} }
...@@ -57,7 +58,7 @@ public class HIKCamera ...@@ -57,7 +58,7 @@ public class HIKCamera
} }
catch (Exception e) catch (Exception e)
{ {
msg = Name + "加载监控相机配置文件失败:" + e.ToString(); msg = Name + crc.GetString(L.monitor_config_load_fail, "加载监控相机配置文件失败:") + e.ToString();
LogUtil.error(Name + "加载监控相机配置文件失败:" + e.ToString()); LogUtil.error(Name + "加载监控相机配置文件失败:" + e.ToString());
return false; return false;
} }
...@@ -65,7 +66,7 @@ public class HIKCamera ...@@ -65,7 +66,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(L.monitor_open_fail,"监控相机打开失败");
LogUtil.error(Name + $"监控相机打开失败"); LogUtil.error(Name + $"监控相机打开失败");
return false; return false;
} }
......
using OnlineStore.LoadCSVLibrary; using OnlineStore;
using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
...@@ -33,7 +35,7 @@ namespace DeviceLibrary ...@@ -33,7 +35,7 @@ namespace DeviceLibrary
{ {
Config = _Config; Config = _Config;
mainMachine = _mainMachine; mainMachine = _mainMachine;
MoveInfo = new MoveInfo("出入库机构",false); MoveInfo = new MoveInfo(crc.GetString(L.transfer_equipment, "出入库机构"),false);
#region 初始化伺服轴 #region 初始化伺服轴
Middle_Axis = _mainMachine.Middle_Axis; Middle_Axis = _mainMachine.Middle_Axis;
UpDown_Axis = _mainMachine.UpDown_Axis; UpDown_Axis = _mainMachine.UpDown_Axis;
...@@ -105,7 +107,7 @@ namespace DeviceLibrary ...@@ -105,7 +107,7 @@ namespace DeviceLibrary
case MoveStep.StoreTS01: case MoveStep.StoreTS01:
if (IOManager.IOValue(IO_Type.TrayCheck_Fixture).Equals(IO_VALUE.HIGH)) if (IOManager.IOValue(IO_Type.TrayCheck_Fixture).Equals(IO_VALUE.HIGH))
{ {
Msg.add("出库时料叉X30检测到有物料无法继续,请检查", MsgLevel.alarm); Msg.add(crc.GetString(L.out_store_detect_material,"出库时料叉X30检测到有物料无法继续,请检查."), MsgLevel.alarm);
RobotManage.UserPause("出库时料叉X30检测到有物料无法继续,请检查"); RobotManage.UserPause("出库时料叉X30检测到有物料无法继续,请检查");
} }
else else
...@@ -162,7 +164,7 @@ namespace DeviceLibrary ...@@ -162,7 +164,7 @@ namespace DeviceLibrary
RobotManage.CameraA.CameraGrabOne(RobotManage.CameraA.GetFixtureStateFilename(From.posid, WareCode, storeMoveType, FixtureState.FromOut)); RobotManage.CameraA.CameraGrabOne(RobotManage.CameraA.GetFixtureStateFilename(From.posid, WareCode, storeMoveType, FixtureState.FromOut));
if (!IgnoreX09 && IOManager.IOValue(IO_Type.TrayCheck_Fixture).Equals(IO_VALUE.LOW)) if (!IgnoreX09 && IOManager.IOValue(IO_Type.TrayCheck_Fixture).Equals(IO_VALUE.LOW))
{ {
Msg.add("出库时料叉X30没有检测到有物料无法继续,请检查", MsgLevel.alarm,ErrInfo.X09_BoxNotDetect); Msg.add(crc.GetString(L.out_store_not_detect_material, "出库时料叉X30没有检测到有物料无法继续,请检查."), MsgLevel.alarm,ErrInfo.X09_BoxNotDetect);
//RobotManage.UserPause("出库时料叉X30没有检测到有物料无法继续,请检查"); //RobotManage.UserPause("出库时料叉X30没有检测到有物料无法继续,请检查");
} }
else else
...@@ -184,7 +186,7 @@ namespace DeviceLibrary ...@@ -184,7 +186,7 @@ namespace DeviceLibrary
if (!mainMachine.IsPutReelReady) if (!mainMachine.IsPutReelReady)
{ {
//if (MoveInfo.IsTimeOut(20)) //if (MoveInfo.IsTimeOut(20))
Msg.add("等待料串准备好放料", MsgLevel.warning); Msg.add(crc.GetString(L.out_store_wait_string_ready, "等待料串准备好放料."), MsgLevel.warning);
MoveInfo.log($"等待料串准备好放料"); MoveInfo.log($"等待料串准备好放料");
return false; return false;
} }
...@@ -193,7 +195,7 @@ namespace DeviceLibrary ...@@ -193,7 +195,7 @@ namespace DeviceLibrary
if (mainMachine.ClampMoveInfo.MoveStep!=MoveStep.Wait) if (mainMachine.ClampMoveInfo.MoveStep!=MoveStep.Wait)
{ {
//if (MoveInfo.IsTimeOut(20)) //if (MoveInfo.IsTimeOut(20))
Msg.add("等待单料口空闲", MsgLevel.warning); Msg.add(crc.GetString(L.out_store_wait_ngdoor_ready,"等待单料口空闲."), MsgLevel.warning);
MoveInfo.log($"等待单料口空闲"); MoveInfo.log($"等待单料口空闲");
return false; return false;
} }
...@@ -222,7 +224,7 @@ namespace DeviceLibrary ...@@ -222,7 +224,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 (IOManager.IOValue(IO_Type.TrayCheck_Fixture).Equals(IO_VALUE.HIGH)) if (IOManager.IOValue(IO_Type.TrayCheck_Fixture).Equals(IO_VALUE.HIGH))
{ {
Msg.add("入库后料叉X30上任然检测到物料,请检查", MsgLevel.alarm); Msg.add(crc.GetString(L.in_store_detect_material,"入库后料叉X30上任然检测到物料,请检查."), MsgLevel.alarm);
RobotManage.UserPause("入库后料叉X30上任然检测到物料,请检查"); RobotManage.UserPause("入库后料叉X30上任然检测到物料,请检查");
} }
else else
......
using CodeLibrary; using CodeLibrary;
using OnlineStore;
using OnlineStore.Common; using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary; using OnlineStore.LoadCSVLibrary;
using System; using System;
...@@ -96,12 +97,12 @@ namespace DeviceLibrary ...@@ -96,12 +97,12 @@ namespace DeviceLibrary
{ {
if (IsNg) if (IsNg)
{ {
return $"入库NG:{NgMsg}[{WareCode}]"; return crc.GetString(L.in_store_ng,"入库NG")+ $":{NgMsg}[{WareCode}]";
} }
else else
{ {
return $"库位号:[{PosID}][{WareCode}] "; return crc.GetString(L.posnum, "库位号") + $":[{PosID}][{WareCode}] ";
} }
} }
......
using CodeLibrary; using CodeLibrary;
using OnlineStore;
using OnlineStore.Common; using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary; using OnlineStore.LoadCSVLibrary;
using System; using System;
...@@ -78,7 +79,7 @@ namespace DeviceLibrary ...@@ -78,7 +79,7 @@ namespace DeviceLibrary
} }
else else
{ {
Msg.add("反转托盘等待料盘离开", MsgLevel.info); Msg.add(crc.GetString(L.wait_reel_transfer, "单料口等待料盘离开."), MsgLevel.info);
} }
break; break;
case MoveStep.StoreIn03: case MoveStep.StoreIn03:
...@@ -120,7 +121,7 @@ namespace DeviceLibrary ...@@ -120,7 +121,7 @@ namespace DeviceLibrary
} }
else else
{ {
Msg.add("翻转托盘等待料盘离开", MsgLevel.info); Msg.add(crc.GetString(L.wait_reel_transfer, "单料口等待料盘离开."), MsgLevel.info);
} }
break; break;
case MoveStep.StoreIn06: case MoveStep.StoreIn06:
......
using CodeLibrary; using CodeLibrary;
using OnlineStore;
using OnlineStore.Common; using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary; using OnlineStore.LoadCSVLibrary;
using System; using System;
...@@ -20,12 +21,11 @@ namespace DeviceLibrary ...@@ -20,12 +21,11 @@ namespace DeviceLibrary
void Reset_BTN() { void Reset_BTN() {
if (IOValue(IO_Type.SuddenStop_BTN).Equals(IO_VALUE.HIGH)) if (IOValue(IO_Type.SuddenStop_BTN).Equals(IO_VALUE.HIGH))
{ {
Msg.add("按下复位按钮", MsgLevel.info, ErrInfo.ResetBtn); Msg.add(crc.GetString(L.reset_press, "按下复位按钮."), MsgLevel.info, ErrInfo.ResetBtn);
} }
else else
{ {
Msg.add("急停未解除,按下复位按钮", MsgLevel.info); Msg.add(crc.GetString(L.reset_press_with_sudden, "急停未解除,按下复位按钮尝试复位安全继电器."), MsgLevel.info, ErrInfo.SuddenStop);
Msg.add("按下复位按钮", MsgLevel.info, ErrInfo.SuddenStop);
} }
LogUtil.info("按下复位按钮"); LogUtil.info("按下复位按钮");
...@@ -41,13 +41,13 @@ namespace DeviceLibrary ...@@ -41,13 +41,13 @@ namespace DeviceLibrary
if (IOValue(IO_Type.SuddenStop_BTN).Equals(IO_VALUE.HIGH)) if (IOValue(IO_Type.SuddenStop_BTN).Equals(IO_VALUE.HIGH))
{ {
if (!RobotManage.isRunning) if (!RobotManage.isRunning)
Msg.add("按下启动按钮,开始启动", MsgLevel.info, ErrInfo.RunBtn); Msg.add(crc.GetString(L.runbtn_press, "按下启动按钮,开始启动."), MsgLevel.info, ErrInfo.RunBtn);
else else
Msg.add("系统正在运行,不能再次启动", MsgLevel.info); Msg.add(crc.GetString(L.system_is_running, "系统正在运行."), MsgLevel.info);
} }
else else
{ {
Msg.add("急停中,按下启动按钮,无法启动", MsgLevel.warning); Msg.add(crc.GetString(L.runbtn_press_with_sudden, "急停中,按下启动按钮,无法启动."), MsgLevel.warning);
} }
LogUtil.info("按下启动按钮"); LogUtil.info("按下启动按钮");
ProcessMsgEvent?.Invoke(Msg.get()); ProcessMsgEvent?.Invoke(Msg.get());
......
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;
...@@ -76,7 +77,7 @@ namespace DeviceLibrary ...@@ -76,7 +77,7 @@ namespace DeviceLibrary
else if (wait.WaitType.Equals(WaitEnum.W002_IOValue)) else if (wait.WaitType.Equals(WaitEnum.W002_IOValue))
{ {
ConfigIO io = RobotManage.Config.getWaitIO(wait.IoType); ConfigIO io = RobotManage.Config.getWaitIO(wait.IoType);
NotOkMsg = MoveInfo.Name+" 等待【" + io.DisplayStr + "】=【" + wait.IoValue + "】"; NotOkMsg = MoveInfo.Name+$" {crc.GetString(L.wait, "等待")}【" + io.DisplayStr + "】=【" + wait.IoValue + "】";
wait.IsEnd = IOManager.IOValue(wait.IoType).Equals(wait.IoValue); wait.IsEnd = IOManager.IOValue(wait.IoType).Equals(wait.IoValue);
if (!wait.IsEnd) if (!wait.IsEnd)
{ {
...@@ -84,7 +85,7 @@ namespace DeviceLibrary ...@@ -84,7 +85,7 @@ namespace DeviceLibrary
if (span.TotalMilliseconds > timeOutMs && NoAlarm()) if (span.TotalMilliseconds > timeOutMs && NoAlarm())
{ {
WarnMsg = MoveInfo.Name + "[" + MoveInfo.MoveStep + "] 等待(" + io.DisplayStr + "=" + wait.IoValue + ") 超时"; WarnMsg = MoveInfo.Name + "[" + MoveInfo.MoveStep + $"] {crc.GetString(L.wait, "等待")}(" + io.DisplayStr + "=" + wait.IoValue + $") {crc.GetString(L.timeout, "超时")}";
Msg.add(WarnMsg, MsgLevel.alarm); Msg.add(WarnMsg, MsgLevel.alarm);
if (NoAlarm()) if (NoAlarm())
...@@ -173,7 +174,7 @@ namespace DeviceLibrary ...@@ -173,7 +174,7 @@ namespace DeviceLibrary
} }
else if (span.TotalSeconds > MoveInfo.TimeOutSeconds) else if (span.TotalSeconds > MoveInfo.TimeOutSeconds)
{ {
WarnMsg = MoveInfo.Name + "[" + MoveInfo.MoveStep + "]等待" + NotOkMsg + "超时[" + Math.Round(span.TotalSeconds, 1) + "]秒"; WarnMsg = MoveInfo.Name + "[" + MoveInfo.MoveStep + $"]{crc.GetString(L.wait, "等待")}" + NotOkMsg + $"{crc.GetString(L.timeout, "超时")}[" + Math.Round(span.TotalSeconds, 1) + "]秒";
int second = (int)(MoveInfo.TimeOutSeconds / span.TotalSeconds) * 10; int second = (int)(MoveInfo.TimeOutSeconds / span.TotalSeconds) * 10;
if (second > 120) if (second > 120)
......
using CodeLibrary; using CodeLibrary;
using OnlineStore;
using OnlineStore.Common; using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary; using OnlineStore.LoadCSVLibrary;
using System; using System;
...@@ -16,7 +17,7 @@ namespace DeviceLibrary ...@@ -16,7 +17,7 @@ namespace DeviceLibrary
void ioMonitor() void ioMonitor()
{ {
if (IOValue(IO_Type.Airpressure_Check).Equals(IO_VALUE.LOW)) { if (IOValue(IO_Type.Airpressure_Check).Equals(IO_VALUE.LOW)) {
Msg.add("未检测到气压信号", MsgLevel.warning); Msg.add(crc.GetString(L.not_detect_airpressure, "未检测到气压信号."), MsgLevel.warning);
} }
airprocess(); airprocess();
} }
...@@ -52,5 +53,28 @@ namespace DeviceLibrary ...@@ -52,5 +53,28 @@ namespace DeviceLibrary
LogUtil.info($"关闭吹气,当前最大湿度:{Current_Humidity} < {ServerCM.Max_Humidity}-{ConfigHelper.Config.Get("Device_HumidityEndOffser", 10)}."); LogUtil.info($"关闭吹气,当前最大湿度:{Current_Humidity} < {ServerCM.Max_Humidity}-{ConfigHelper.Config.Get("Device_HumidityEndOffser", 10)}.");
} }
} }
bool lastTHoutRangeStatus = false;
DateTime lastTHoutRangeTime = DateTime.MaxValue;
bool IsTHoutRange()
{
if (HumitureController.LastData.Humidity > ServerCM.Max_Humidity
|| HumitureController.LastData.Temperate > ServerCM.Max_Temperature)
{
if (!lastTHoutRangeStatus)
lastTHoutRangeTime = DateTime.Now;
lastTHoutRangeStatus = true;
return true;
}
else
{
if (lastTHoutRangeStatus)
lastTHoutRangeTime = DateTime.MaxValue;
lastTHoutRangeStatus = false;
return false;
}
}
bool IsTHoutRangeOver30m() {
return (DateTime.Now - lastTHoutRangeTime).TotalMinutes > 30;
}
} }
} }
...@@ -30,31 +30,48 @@ namespace DeviceLibrary ...@@ -30,31 +30,48 @@ namespace DeviceLibrary
AlarmLed.LedState = LedState.off; AlarmLed.LedState = LedState.off;
RunningLed.LedState = LedState.off; RunningLed.LedState = LedState.off;
//无法运行,量报警灯 //无法运行,量报警灯
if (!canRunning)
{
AlarmLed.LedState = LedState.on;
if (runStatus != RunStatus.Stop)
{
if (IsTHoutRange())
{
RunningLed.LedState = LedState.on;
StandbyLed.LedState = LedState.blink;
} }
if (IsTHoutRangeOver30m())
if (hasAlarm)
{ {
AlarmLed.LedState = LedState.on; RunningLed.LedState = LedState.on;
//AlarmBuzzer.ON(); StandbyLed.LedState = LedState.blink;
AlarmLed.LedState = LedState.blink;
} }
else {
//AlarmBuzzer.OFF();
} }
if (runStatus == RunStatus.HomeReset) if (runStatus == RunStatus.HomeReset)
{ {
StandbyLed.LedState = LedState.blink; RunningLed.LedState = LedState.blink;
} }
if (runStatus == RunStatus.Running) else if (runStatus == RunStatus.Running)
{ {
RunningLed.LedState = LedState.on; RunningLed.LedState = LedState.on;
} }
else if (runStatus == RunStatus.Stop && !hasAlarm)
{
if (!canRunning)
RunningLed.LedState = LedState.blink;
if (UserPause) if (UserPause)
RunningLed.LedState = LedState.blink; RunningLed.LedState = LedState.blink;
}
if (hasAlarm)
AlarmLed.LedState = LedState.on;
if (ClampMoveInfo.MoveStep > MoveStep.Wait
|| StoreMoveInfo.MoveStep > MoveStep.Wait
|| (StringMoveInfo.MoveStep > MoveStep.Wait && StringMoveInfo.MoveStep != MoveStep.StringReadyPut)) {
RunningLed.LedState = LedState.blink;
StandbyLed.LedState = LedState.blink;
}
Led.LedGroup.ForEach((x) => { x.run(); }); Led.LedGroup.ForEach((x) => { x.run(); });
} }
......
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;
...@@ -72,7 +73,7 @@ namespace DeviceLibrary ...@@ -72,7 +73,7 @@ namespace DeviceLibrary
public MainMachine(Robot_Config _config) { public MainMachine(Robot_Config _config) {
Config = _config; Config = _config;
crc.LanguageChangeEvent += Crc_LanguageChangeEvent;
StringMoveInfo = new MoveInfo("料串进出机构"); StringMoveInfo = new MoveInfo("料串进出机构");
StringMoveInfo.SetStateDelegate(StringProcessState); StringMoveInfo.SetStateDelegate(StringProcessState);
ClampMoveInfo = new MoveInfo("取放料机构"); ClampMoveInfo = new MoveInfo("取放料机构");
...@@ -98,7 +99,7 @@ namespace DeviceLibrary ...@@ -98,7 +99,7 @@ namespace DeviceLibrary
Batch_Axis = new AxisBean(Config.Batch_Axis, Name); Batch_Axis = new AxisBean(Config.Batch_Axis, Name);
Clamp_Axis = new AxisBean(Config.Clamp_Axis, Name); Clamp_Axis = new AxisBean(Config.Clamp_Axis, Name);
Clamp_Axis.interference += Clamp_Axis_interference; Clamp_Axis.interference += Clamp_Axis_interference;
Crc_LanguageChangeEvent(null, EventArgs.Empty);
#endregion #endregion
Line = new LineRunMonitor("料串进出机构", Config.DOList[IO_Type.LineRun].GetIOAddr(),Config.DOList[IO_Type.LineRev].GetIOAddr()); Line = new LineRunMonitor("料串进出机构", Config.DOList[IO_Type.LineRun].GetIOAddr(),Config.DOList[IO_Type.LineRev].GetIOAddr());
...@@ -110,7 +111,7 @@ namespace DeviceLibrary ...@@ -110,7 +111,7 @@ namespace DeviceLibrary
}; };
//BoxTransport_InOutEndProcessEvent; //BoxTransport_InOutEndProcessEvent;
//ProcessMsgEvent += MainMachine_ProcessMsgEvent; //ProcessMsgEvent += MainMachine_ProcessMsgEvent;
ConfigHelper.Config.Get("Device_Disable_StringDoor", false);
AlarmBuzzer.SetOnOffAction(() =>{ IOMove(IO_Type.Alarm_Buzzer, IO_VALUE.HIGH); }, () => { IOMove(IO_Type.Alarm_Buzzer, IO_VALUE.LOW); }); AlarmBuzzer.SetOnOffAction(() =>{ IOMove(IO_Type.Alarm_Buzzer, IO_VALUE.HIGH); }, () => { IOMove(IO_Type.Alarm_Buzzer, IO_VALUE.LOW); });
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);
...@@ -118,6 +119,16 @@ namespace DeviceLibrary ...@@ -118,6 +119,16 @@ namespace DeviceLibrary
LedProcessInit(); LedProcessInit();
} }
private void Crc_LanguageChangeEvent(object sender, EventArgs e)
{
StringMoveInfo.Name=crc.GetString(L.string_inout_equipment, "料串进出机构");
ClampMoveInfo.Name = crc.GetString(L.clamp_equipment, "取放料机构");
StoreMoveInfo.Name = crc.GetString(L.store_manage_equipment, "进出库调度");
ResetMoveInfo.Name = crc.GetString(L.reset_equipment, "重置");
AIOTMoveInfo.Name = crc.GetString(L.autotest_inout_equipment, "出入库测试");
}
private (bool, string) Clamp_Axis_interference(int from, int to) private (bool, string) Clamp_Axis_interference(int from, int to)
{ {
if (to > Config.Clamp_P3) if (to > Config.Clamp_P3)
...@@ -125,19 +136,19 @@ namespace DeviceLibrary ...@@ -125,19 +136,19 @@ namespace DeviceLibrary
if (IOValue(IO_Type.ReelFlipDoor_L_Home).Equals(IO_VALUE.HIGH) && IOValue(IO_Type.ReelFlipDoor_R_Home).Equals(IO_VALUE.HIGH)) if (IOValue(IO_Type.ReelFlipDoor_L_Home).Equals(IO_VALUE.HIGH) && IOValue(IO_Type.ReelFlipDoor_R_Home).Equals(IO_VALUE.HIGH))
return (false, ""); return (false, "");
else else
return (true, "翻板门不在垂直端,不允许下降取料轴"); return (true, crc.GetString(L.Clamp_Axis_interference_01, "翻板门不在垂直端,不允许下降取料轴"));
if (IOValue(IO_Type.StringPosChecker_Home).Equals(IO_VALUE.HIGH)) if (IOValue(IO_Type.StringPosChecker_Home).Equals(IO_VALUE.HIGH))
return (false, ""); return (false, "");
else else
return (true, "上料定位臂不在避让端,不允许下降取料轴"); return (true, crc.GetString(L.Clamp_Axis_interference_02, "上料定位臂不在避让端,不允许下降取料轴"));
} }
else if (to >= Config.Clamp_P3) else if (to >= Config.Clamp_P3)
{ {
if(IOValue(IO_Type.ReelFlipDoor_L_Home).Equals(IO_VALUE.HIGH) && IOValue(IO_Type.ReelFlipDoor_R_Home).Equals(IO_VALUE.HIGH)) if(IOValue(IO_Type.ReelFlipDoor_L_Home).Equals(IO_VALUE.HIGH) && IOValue(IO_Type.ReelFlipDoor_R_Home).Equals(IO_VALUE.HIGH))
return (false, ""); return (false, "");
else else
return (true, "翻板门不在垂直端,不允许下降取料轴"); return (true, crc.GetString(L.Clamp_Axis_interference_03, "翻板门不在垂直端,不允许下降取料轴"));
} }
return (false, ""); return (false, "");
...@@ -151,7 +162,7 @@ namespace DeviceLibrary ...@@ -151,7 +162,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(L.Middle_Axis_interference_01, "进出轴不在待机点时无法移动旋转轴"));
} }
private (bool, string) UpDown_Axis_interference(int from, int to) private (bool, string) UpDown_Axis_interference(int from, int to)
...@@ -162,7 +173,7 @@ namespace DeviceLibrary ...@@ -162,7 +173,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(L.UpDown_Axis_interference_01, "进出轴不在待机点时无法移动升降轴"));
} }
public bool hasAlarm = false; public bool hasAlarm = false;
/// <summary> /// <summary>
...@@ -247,6 +258,8 @@ namespace DeviceLibrary ...@@ -247,6 +258,8 @@ namespace DeviceLibrary
Alarm(AlarmType.None); Alarm(AlarmType.None);
StopMove(true); StopMove(true);
IOMove(IO_Type.LineRun, IO_VALUE.LOW); IOMove(IO_Type.LineRun, IO_VALUE.LOW);
LedProcess(null);
} }
public void BeginHomeReset(bool firstRun=false) { public void BeginHomeReset(bool firstRun=false) {
...@@ -297,6 +310,7 @@ namespace DeviceLibrary ...@@ -297,6 +310,7 @@ namespace DeviceLibrary
break; break;
case MoveStep.H04_HomeReset: case MoveStep.H04_HomeReset:
ResetMoveInfo.NextMoveStep(MoveStep.H05_HomeReset); ResetMoveInfo.NextMoveStep(MoveStep.H05_HomeReset);
if (!ConfigHelper.Config.Get("Device_Disable_StringDoor",false))
CylinderMove(StringMoveInfo, IO_Type.StringDoor_Close, IO_Type.StringDoor_Open, IO_VALUE.LOW); CylinderMove(StringMoveInfo, IO_Type.StringDoor_Close, IO_Type.StringDoor_Open, IO_VALUE.LOW);
Clamp_Axis.AbsMove(ResetMoveInfo, Config.Clamp_P1, Config.Clamp_P1_speed); Clamp_Axis.AbsMove(ResetMoveInfo, Config.Clamp_P1, Config.Clamp_P1_speed);
ResetMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(500)); ResetMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(500));
...@@ -354,15 +368,15 @@ namespace DeviceLibrary ...@@ -354,15 +368,15 @@ namespace DeviceLibrary
ResetMoveInfo.NextMoveStep(MoveStep.H12_HomeReset); ResetMoveInfo.NextMoveStep(MoveStep.H12_HomeReset);
if (IOValue(IO_Type.NGDoor_Tray_Check).Equals(IO_VALUE.LOW)) if (IOValue(IO_Type.NGDoor_Tray_Check).Equals(IO_VALUE.LOW))
{ {
Msg.add("请检查单料口有无料盘", MsgLevel.alarm); Msg.add(crc.GetString(L.x29_low_no_reel, "传感器X29未检测到单料口料盘."), MsgLevel.alarm);
RobotManage.UserPause("请检查单料口有无料盘"); RobotManage.UserPause("传感器X29未检测到单料口料盘.");
} }
break; break;
case MoveStep.H14_HomeReset: case MoveStep.H14_HomeReset:
if (IOValue(IO_Type.NGDoor_Tray_Check).Equals(IO_VALUE.HIGH)) if (IOValue(IO_Type.NGDoor_Tray_Check).Equals(IO_VALUE.HIGH))
{ {
Msg.add("等待取走单料口盘,系统启动时无信息料盘", MsgLevel.alarm); Msg.add(crc.GetString(L.x29_higt_has_reel, "系统启动X29检测到有无信息料盘,等待取走单料口料盘"), MsgLevel.alarm);
RobotManage.UserPause("等待取走单料口盘"); RobotManage.UserPause("系统启动X29检测到有无信息料盘,等待取走单料口料盘");
} }
else { else {
ResetMoveInfo.NextMoveStep(MoveStep.H15_HomeReset); ResetMoveInfo.NextMoveStep(MoveStep.H15_HomeReset);
...@@ -372,7 +386,7 @@ namespace DeviceLibrary ...@@ -372,7 +386,7 @@ namespace DeviceLibrary
case MoveStep.H15_HomeReset: case MoveStep.H15_HomeReset:
if (IOValue(IO_Type.SafetyLightCurtains).Equals(IO_VALUE.LOW)) if (IOValue(IO_Type.SafetyLightCurtains).Equals(IO_VALUE.LOW))
{ {
Msg.add("等待手离开光栅", MsgLevel.warning); Msg.add(crc.GetString(L.wait_put_reel_into_ngdoor, "等待阻挡物离开光栅"), MsgLevel.warning);
} }
else else
{ {
...@@ -394,7 +408,7 @@ namespace DeviceLibrary ...@@ -394,7 +408,7 @@ namespace DeviceLibrary
} }
else else
{ {
Msg.add("等待手离开光栅", MsgLevel.warning); Msg.add(crc.GetString(L.wait_put_reel_into_ngdoor, "等待阻挡物离开光栅"), MsgLevel.warning);
} }
break; break;
case MoveStep.HEND_HomeReset: case MoveStep.HEND_HomeReset:
...@@ -426,6 +440,7 @@ namespace DeviceLibrary ...@@ -426,6 +440,7 @@ namespace DeviceLibrary
bool lastSafeCheckStatus = true; bool lastSafeCheckStatus = true;
bool SafeCheck() { bool SafeCheck() {
bool ok = true; bool ok = true;
var ignorestring = "[" + crc.GetString(L.ignored, "已忽略") + "]";
if (IOValue(IO_Type.SafetyLightCurtains).Equals(IO_VALUE.LOW)) if (IOValue(IO_Type.SafetyLightCurtains).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))
...@@ -433,7 +448,7 @@ namespace DeviceLibrary ...@@ -433,7 +448,7 @@ namespace DeviceLibrary
ok = false; ok = false;
DeviceSuddenStop(); DeviceSuddenStop();
} }
Msg.add("安全光栅被遮挡" + (ok ? "[已忽略]" : ""), MsgLevel.warning); Msg.add(crc.GetString(L.SafetyLight_is_block, "安全光栅被遮挡") + (ok ? ignorestring : ""), MsgLevel.warning);
} }
if (IOValue(IO_Type.LeftDoorClose_Check).Equals(IO_VALUE.LOW)) if (IOValue(IO_Type.LeftDoorClose_Check).Equals(IO_VALUE.LOW))
{ {
...@@ -442,7 +457,7 @@ namespace DeviceLibrary ...@@ -442,7 +457,7 @@ namespace DeviceLibrary
ok = false; ok = false;
DeviceSuddenStop(); DeviceSuddenStop();
} }
Msg.add("左侧防护门没有关闭" + (ok ? "[已忽略]" : ""), MsgLevel.warning); Msg.add(crc.GetString(L.left_safedoor_not_close, "左侧防护门没有关闭") + (ok ? ignorestring : ""), MsgLevel.warning);
} }
if (IOValue(IO_Type.RightDoorClose_Check).Equals(IO_VALUE.LOW)) if (IOValue(IO_Type.RightDoorClose_Check).Equals(IO_VALUE.LOW))
{ {
...@@ -451,7 +466,7 @@ namespace DeviceLibrary ...@@ -451,7 +466,7 @@ namespace DeviceLibrary
ok = false; ok = false;
DeviceSuddenStop(); DeviceSuddenStop();
} }
Msg.add("右侧防护门没有关闭" + (ok ? "[已忽略]" : ""), MsgLevel.warning); Msg.add(crc.GetString(L.right_safedoor_not_close, "右侧防护门没有关闭") + (ok ? ignorestring : ""), MsgLevel.warning);
} }
if (IOValue(IO_Type.BackDoorClose_Check).Equals(IO_VALUE.LOW)) if (IOValue(IO_Type.BackDoorClose_Check).Equals(IO_VALUE.LOW))
{ {
...@@ -460,7 +475,7 @@ namespace DeviceLibrary ...@@ -460,7 +475,7 @@ namespace DeviceLibrary
ok = false; ok = false;
DeviceSuddenStop(); DeviceSuddenStop();
} }
Msg.add("后侧防护门没有关闭" + (ok ? "[已忽略]" : ""), MsgLevel.warning); Msg.add(crc.GetString(L.back_safedoor_not_close, "后侧防护门没有关闭") + (ok ? ignorestring : ""), MsgLevel.warning);
} }
lastSafeCheckStatus = ok; lastSafeCheckStatus = ok;
return ok; return ok;
...@@ -492,7 +507,7 @@ namespace DeviceLibrary ...@@ -492,7 +507,7 @@ namespace DeviceLibrary
bool ok = true; bool ok = true;
if (UserPause) if (UserPause)
{ {
Msg.add("系统暂停", MsgLevel.warning); Msg.add(crc.GetString(L.system_pause, "系统暂停"), MsgLevel.warning);
DeviceSuddenStop(); DeviceSuddenStop();
lastSafeCheckStatus = false; lastSafeCheckStatus = false;
ok = false; ok = false;
...@@ -501,7 +516,7 @@ namespace DeviceLibrary ...@@ -501,7 +516,7 @@ namespace DeviceLibrary
else if (IOValue(IO_Type.SuddenStop_BTN).Equals(IO_VALUE.LOW)) else if (IOValue(IO_Type.SuddenStop_BTN).Equals(IO_VALUE.LOW))
{ {
Alarm(AlarmType.SuddenStop); Alarm(AlarmType.SuddenStop);
Msg.add("急停中", MsgLevel.alarm); Msg.add(crc.GetString(L.in_suddenstop, "急停中"), MsgLevel.alarm);
ok = false; ok = false;
} }
else if (alarmType != AlarmType.None) { else if (alarmType != AlarmType.None) {
...@@ -511,13 +526,13 @@ namespace DeviceLibrary ...@@ -511,13 +526,13 @@ namespace DeviceLibrary
//} //}
//else //else
{ {
Msg.add("系统需要重置", MsgLevel.alarm,ErrInfo.SuddenStop); Msg.add(crc.GetString(L.system_need_reset, "系统需要重置"), MsgLevel.alarm,ErrInfo.SuddenStop);
ok = false; ok = false;
} }
} }
if (RobotManage.InoutDebugMode) if (RobotManage.InoutDebugMode)
{ {
Msg.add("进出库调试模式", MsgLevel.info); Msg.add(crc.GetString(L.store_inout_debug_mode, "进出库调试模式"), MsgLevel.info);
//ok = false; //ok = false;
} }
if (IOValue(IO_Type.Airpressure_Check).Equals(IO_VALUE.LOW)) if (IOValue(IO_Type.Airpressure_Check).Equals(IO_VALUE.LOW))
...@@ -529,7 +544,7 @@ namespace DeviceLibrary ...@@ -529,7 +544,7 @@ namespace DeviceLibrary
if (span.TotalSeconds > RobotManage.Config.AirCheckSeconds) if (span.TotalSeconds > RobotManage.Config.AirCheckSeconds)
{ {
ok = false; ok = false;
Msg.add("气压不足", MsgLevel.warning); Msg.add(crc.GetString(L.airpressure_not_enough, "气压不足"), MsgLevel.warning);
} }
} }
else { else {
...@@ -545,7 +560,8 @@ namespace DeviceLibrary ...@@ -545,7 +560,8 @@ namespace DeviceLibrary
{ {
if (AxisManager.GetAlarmStatus(configMoveAxis.DeviceName, configMoveAxis.GetAxisValue()) == 1) if (AxisManager.GetAlarmStatus(configMoveAxis.DeviceName, configMoveAxis.GetAxisValue()) == 1)
{ {
Msg.add($"{configMoveAxis.Explain}[{configMoveAxis.GetAxisValue()}]:运动报警", MsgLevel.alarm,ErrInfo.SuddenStop); Msg.add(crc.GetString(configMoveAxis.ProName, configMoveAxis.Explain) + $"[{configMoveAxis.GetAxisValue()}]:"
+ crc.GetString(L.motion_alarm, "运动报警"), MsgLevel.alarm, ErrInfo.SuddenStop);
ok = false; ok = false;
} }
} }
......
using CodeLibrary; using CodeLibrary;
using OnlineStore;
using OnlineStore.Common; using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary; using OnlineStore.LoadCSVLibrary;
using System; using System;
...@@ -109,7 +110,7 @@ namespace DeviceLibrary ...@@ -109,7 +110,7 @@ namespace DeviceLibrary
{ {
ClampErrorCount++; ClampErrorCount++;
ClampMoveInfo.MoveParam.IsNg = true; ClampMoveInfo.MoveParam.IsNg = true;
ClampMoveInfo.MoveParam.NgMsg = "未检测到盘宽"; ClampMoveInfo.MoveParam.NgMsg = crc.GetString(L.not_detect_reel_height, "未检测到盘宽");
ReelGetted(false); ReelGetted(false);
//RobotManage.UserPause("未检测到盘", true); //RobotManage.UserPause("未检测到盘", true);
} }
...@@ -123,7 +124,7 @@ namespace DeviceLibrary ...@@ -123,7 +124,7 @@ namespace DeviceLibrary
case MoveStep.ReelClamp_WaitGaugeHeight: case MoveStep.ReelClamp_WaitGaugeHeight:
//ClampMoveInfo.NextMoveStep(MoveStep.StringLoad_12); //ClampMoveInfo.NextMoveStep(MoveStep.StringLoad_12);
ClampMoveInfo.log($"等待测高"); ClampMoveInfo.log($"等待测高");
Msg.add("等待料盘测高", MsgLevel.info); Msg.add(crc.GetString(L.wait_detect_reel_height, "等待料盘测高"), MsgLevel.info);
//BatchAxisToP2(ClampMoveInfo); //BatchAxisToP2(ClampMoveInfo);
break; break;
case MoveStep.ReelClamp_GetHeight: case MoveStep.ReelClamp_GetHeight:
...@@ -170,7 +171,7 @@ namespace DeviceLibrary ...@@ -170,7 +171,7 @@ namespace DeviceLibrary
ClampMoveInfo.NextMoveStep(MoveStep.NGOUT_01); ClampMoveInfo.NextMoveStep(MoveStep.NGOUT_01);
ClampMoveInfo.log($"未识别到有效二维码,送到NG口"); ClampMoveInfo.log($"未识别到有效二维码,送到NG口");
ClampMoveInfo.MoveParam.IsNg = true; ClampMoveInfo.MoveParam.IsNg = true;
ClampMoveInfo.MoveParam.NgMsg = "未识别到有效二维码"; ClampMoveInfo.MoveParam.NgMsg = crc.GetString(L.not_detect_reel_code, "未识别到有效二维码");
return; return;
} }
else else
...@@ -188,29 +189,29 @@ namespace DeviceLibrary ...@@ -188,29 +189,29 @@ namespace DeviceLibrary
{ {
ClampMoveInfo.NextMoveStep(MoveStep.NGOUT_01); ClampMoveInfo.NextMoveStep(MoveStep.NGOUT_01);
ClampMoveInfo.MoveParam.IsNg = false; ClampMoveInfo.MoveParam.IsNg = false;
ClampMoveInfo.MoveParam.NgMsg = "扫码超时"; ClampMoveInfo.MoveParam.NgMsg = crc.GetString(L.scan_code_timeout, "扫码超时");
ClampMoveInfo.log($"等待扫码超时,NG口送出"); ClampMoveInfo.log($"等待扫码超时,NG口送出");
} }
break; break;
case MoveStep.InWaitServerCallback: case MoveStep.InWaitServerCallback:
if (RobotManage.InoutDebugMode) if (RobotManage.InoutDebugMode)
{ {
Msg.add("等待手动选择入库库位", MsgLevel.warning); Msg.add(crc.GetString(L.wait_user_select_pos, "等待手动选择入库库位"), MsgLevel.warning);
} }
else if (ClampMoveInfo.IsTimeOut(20)) else if (ClampMoveInfo.IsTimeOut(20))
{ {
ClampMoveInfo.NextMoveStep(MoveStep.NGOUT_01); ClampMoveInfo.NextMoveStep(MoveStep.NGOUT_01);
ClampMoveInfo.MoveParam.IsNg = true; ClampMoveInfo.MoveParam.IsNg = true;
ClampMoveInfo.MoveParam.NgMsg = "服务器返回库位超时"; ClampMoveInfo.MoveParam.NgMsg = crc.GetString(L.wait_server_response_pos_timeout, "服务器返回库位超时");
ClampMoveInfo.log($"等待服务器返回库位超时"); ClampMoveInfo.log($"等待服务器返回库位超时");
} }
else if (ClampMoveInfo.IsTimeOut(5)) else if (ClampMoveInfo.IsTimeOut(5))
Msg.add("等待服务器返回库位", MsgLevel.info); Msg.add(crc.GetString(L.wait_server_response_pos, "等待服务器返回库位"), MsgLevel.info);
break; break;
case MoveStep.WaitInStore: case MoveStep.WaitInStore:
Msg.add("料盘等待入库", MsgLevel.info); Msg.add(crc.GetString(L.reel_wait_in_store, "料盘等待入库"), MsgLevel.info);
break; break;
case MoveStep.ReelTaked: case MoveStep.ReelTaked:
ClampMoveInfo.NextMoveStep(MoveStep.Wait); ClampMoveInfo.NextMoveStep(MoveStep.Wait);
...@@ -231,15 +232,15 @@ namespace DeviceLibrary ...@@ -231,15 +232,15 @@ namespace DeviceLibrary
ClampMoveInfo.NextMoveStep(MoveStep.NGOUT_03); ClampMoveInfo.NextMoveStep(MoveStep.NGOUT_03);
if (IOValue(IO_Type.NGDoor_Tray_Check).Equals(IO_VALUE.LOW)) if (IOValue(IO_Type.NGDoor_Tray_Check).Equals(IO_VALUE.LOW))
{ {
Msg.add("请检查单料口有无料盘", MsgLevel.alarm); Msg.add(crc.GetString(L.x29_low_no_reel, "传感器X29未检测到单料口料盘."), MsgLevel.alarm);
Msg.add(ClampMoveInfo.MoveParam.NgMsg, MsgLevel.warning); Msg.add(ClampMoveInfo.MoveParam.NgMsg, MsgLevel.warning);
RobotManage.UserPause("请检查单料口有无料盘"); RobotManage.UserPause("传感器X29未检测到单料口料盘");
} }
break; break;
case MoveStep.NGOUT_03: case MoveStep.NGOUT_03:
if (IOValue(IO_Type.NGDoor_Tray_Check).Equals(IO_VALUE.HIGH)) if (IOValue(IO_Type.NGDoor_Tray_Check).Equals(IO_VALUE.HIGH))
{ {
Msg.add("等待取走单口料盘", MsgLevel.alarm); Msg.add(crc.GetString(L.please_take_ngdoor_reel, "等待取走单口料盘"), MsgLevel.alarm);
Msg.add(ClampMoveInfo.MoveParam.NgMsg, MsgLevel.warning); Msg.add(ClampMoveInfo.MoveParam.NgMsg, MsgLevel.warning);
RobotManage.UserPause("等待取走单口料盘"); RobotManage.UserPause("等待取走单口料盘");
} }
...@@ -252,7 +253,7 @@ namespace DeviceLibrary ...@@ -252,7 +253,7 @@ namespace DeviceLibrary
case MoveStep.NGOUT_04: case MoveStep.NGOUT_04:
if (IOValue(IO_Type.SafetyLightCurtains).Equals(IO_VALUE.LOW)) if (IOValue(IO_Type.SafetyLightCurtains).Equals(IO_VALUE.LOW))
{ {
Msg.add("等待手离开光栅", MsgLevel.warning); Msg.add(crc.GetString(L.wait_put_reel_into_ngdoor, "等待阻挡物离开光栅"), MsgLevel.warning);
} }
else else
{ {
...@@ -274,7 +275,7 @@ namespace DeviceLibrary ...@@ -274,7 +275,7 @@ namespace DeviceLibrary
} }
else else
{ {
Msg.add("等待手离开光栅", MsgLevel.warning); Msg.add(crc.GetString(L.wait_put_reel_into_ngdoor, "等待阻挡物离开光栅"), MsgLevel.warning);
} }
break; break;
case MoveStep.SingleIn: case MoveStep.SingleIn:
...@@ -288,7 +289,7 @@ namespace DeviceLibrary ...@@ -288,7 +289,7 @@ namespace DeviceLibrary
CylinderMove(ClampMoveInfo, IO_Type.NGDoor_Close, IO_Type.NGDoor_Open, IO_VALUE.HIGH); CylinderMove(ClampMoveInfo, IO_Type.NGDoor_Close, IO_Type.NGDoor_Open, IO_VALUE.HIGH);
break; break;
case MoveStep.SingleInReady: case MoveStep.SingleInReady:
Msg.add("等待放入单盘入库料盘", MsgLevel.warning); Msg.add(crc.GetString(L.wait_put_reel_into_ngdoor, "等待放入单盘入库料盘"), MsgLevel.warning);
break; break;
case MoveStep.SingleInRun: case MoveStep.SingleInRun:
ClampMoveInfo.NextMoveStep(MoveStep.ReelClamp_09); ClampMoveInfo.NextMoveStep(MoveStep.ReelClamp_09);
...@@ -324,19 +325,19 @@ namespace DeviceLibrary ...@@ -324,19 +325,19 @@ namespace DeviceLibrary
string state = ""; string state = "";
if (ClampMoveInfo.MoveStep == MoveStep.Wait) if (ClampMoveInfo.MoveStep == MoveStep.Wait)
{ {
return "空闲中"; return crc.GetString(L.free,"空闲中");
} }
else if (ClampMoveInfo.MoveStep > MoveStep.NGOUT_01) else if (ClampMoveInfo.MoveStep > MoveStep.NGOUT_01)
{ {
state = "单料口:"+ClampMoveInfo.MoveParam.NgMsg; state = crc.GetString(L.ngdoor, "单料口:") +ClampMoveInfo.MoveParam.NgMsg;
} }
else if (ClampMoveInfo.MoveStep >= MoveStep.ReelClamp_09) else if (ClampMoveInfo.MoveStep >= MoveStep.ReelClamp_09)
{ {
return "扫码中"; return crc.GetString(L.scanning_code, "扫码中");
} }
else if (ClampMoveInfo.MoveStep >= MoveStep.ReelClamp_01) else if (ClampMoveInfo.MoveStep >= MoveStep.ReelClamp_01)
{ {
return "取料中"; return crc.GetString(L.taking_code, "取料中");
} }
return state; return state;
} }
......
...@@ -62,6 +62,7 @@ namespace DeviceLibrary ...@@ -62,6 +62,7 @@ namespace DeviceLibrary
StringMoveInfo.LastSetpTime = DateTime.Now; StringMoveInfo.LastSetpTime = DateTime.Now;
StringMoveInfo.IsInWait = true; StringMoveInfo.IsInWait = true;
if (!ConfigHelper.Config.Get("Device_Disable_StringDoor", false))
CylinderMove(StringMoveInfo, IO_Type.StringDoor_Close, IO_Type.StringDoor_Open, IO_VALUE.HIGH); CylinderMove(StringMoveInfo, IO_Type.StringDoor_Close, IO_Type.StringDoor_Open, IO_VALUE.HIGH);
return "开始打开折叠门"; return "开始打开折叠门";
...@@ -81,6 +82,7 @@ namespace DeviceLibrary ...@@ -81,6 +82,7 @@ namespace DeviceLibrary
//RobotManage.mainMachine.StringMoveInfo.NextMoveStep(RobotManage.mainMachine.StringMoveInfo.MoveStep); //RobotManage.mainMachine.StringMoveInfo.NextMoveStep(RobotManage.mainMachine.StringMoveInfo.MoveStep);
StringMoveInfo.LastSetpTime = DateTime.Now; StringMoveInfo.LastSetpTime = DateTime.Now;
StringMoveInfo.IsInWait = true; StringMoveInfo.IsInWait = true;
if (!ConfigHelper.Config.Get("Device_Disable_StringDoor", false))
CylinderMove(StringMoveInfo, IO_Type.StringDoor_Close, IO_Type.StringDoor_Open, IO_VALUE.LOW); CylinderMove(StringMoveInfo, IO_Type.StringDoor_Close, IO_Type.StringDoor_Open, IO_VALUE.LOW);
return $"批量料门关闭"; return $"批量料门关闭";
} }
......
using CodeLibrary; using CodeLibrary;
using OnlineStore;
using OnlineStore.Common; using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary; using OnlineStore.LoadCSVLibrary;
using System; using System;
...@@ -40,7 +41,7 @@ namespace DeviceLibrary ...@@ -40,7 +41,7 @@ namespace DeviceLibrary
StoreMoveInfo.MoveParam.PlateH = 56; StoreMoveInfo.MoveParam.PlateH = 56;
StoreMoveInfo.MoveParam.PlateW = 7; StoreMoveInfo.MoveParam.PlateW = 7;
StoreMoveInfo.MoveParam.IsNg = true; StoreMoveInfo.MoveParam.IsNg = true;
StoreMoveInfo.MoveParam.NgMsg = "无信息料盘出库"; StoreMoveInfo.MoveParam.NgMsg = crc.GetString(L.no_info_reel, "无信息料盘出库");
StoreMoveInfo.log($"开始无信息料盘出库"); StoreMoveInfo.log($"开始无信息料盘出库");
ServerCM.storeStatus = StoreStatus.OutStoreExecute; ServerCM.storeStatus = StoreStatus.OutStoreExecute;
CloseFlipDoor(StoreMoveInfo); CloseFlipDoor(StoreMoveInfo);
...@@ -62,7 +63,7 @@ namespace DeviceLibrary ...@@ -62,7 +63,7 @@ namespace DeviceLibrary
StoreMoveInfo.MoveParam.PlateH = jobInfo.plateH; StoreMoveInfo.MoveParam.PlateH = jobInfo.plateH;
StoreMoveInfo.MoveParam.PlateW = jobInfo.plateW; StoreMoveInfo.MoveParam.PlateW = jobInfo.plateW;
StoreMoveInfo.MoveParam.IsNg = true; StoreMoveInfo.MoveParam.IsNg = true;
StoreMoveInfo.MoveParam.NgMsg = "单盘出库"; StoreMoveInfo.MoveParam.NgMsg = crc.GetString(L.ngdoor_reel_out, "单盘出库");
StoreMoveInfo.log($"开始单盘出库任务:" + jobInfo.ToStr()); StoreMoveInfo.log($"开始单盘出库任务:" + jobInfo.ToStr());
ServerCM.storeStatus = StoreStatus.OutStoreExecute; ServerCM.storeStatus = StoreStatus.OutStoreExecute;
CloseFlipDoor(StoreMoveInfo); CloseFlipDoor(StoreMoveInfo);
...@@ -100,7 +101,7 @@ namespace DeviceLibrary ...@@ -100,7 +101,7 @@ namespace DeviceLibrary
} }
else else
{ {
Msg.add("翻板门等待料盘离开", MsgLevel.info); Msg.add(crc.GetString(L.wait_reel_transfer, "单料口等待料盘离开."), MsgLevel.info);
} }
break; break;
case MoveStep.StoreIn04: case MoveStep.StoreIn04:
...@@ -131,7 +132,7 @@ namespace DeviceLibrary ...@@ -131,7 +132,7 @@ namespace DeviceLibrary
} }
else else
{ {
Msg.add("等待料盘到达", MsgLevel.info); Msg.add(crc.GetString(L.wait_reel_transfer, "等待料盘到达."), MsgLevel.info);
} }
break; break;
case MoveStep.StoreOut12: case MoveStep.StoreOut12:
...@@ -160,14 +161,14 @@ namespace DeviceLibrary ...@@ -160,14 +161,14 @@ namespace DeviceLibrary
} }
} }
string StoreState() { string StoreState() {
string state = "空闲中"; string state = crc.GetString(L.free,"空闲中");
if (StoreMoveInfo.MoveStep >= MoveStep.StoreOut10) if (StoreMoveInfo.MoveStep >= MoveStep.StoreOut10)
{ {
state = $"出库中,库位号:{StoreMoveInfo.MoveParam.PosID}"; state = $"{crc.GetString(L.reel_outting, "出库中")},{crc.GetString(L.posnum, "出库中")}:{StoreMoveInfo.MoveParam.PosID}";
} }
else if (StoreMoveInfo.MoveStep >= MoveStep.StoreIn01) else if (StoreMoveInfo.MoveStep >= MoveStep.StoreIn01)
{ {
state = $"入库中,库位号:{StoreMoveInfo.MoveParam.PosID}"; state = $"{crc.GetString(L.reel_ining, "入库中")},{crc.GetString(L.posnum, "出库中")}:{StoreMoveInfo.MoveParam.PosID}";
} }
return state; return state;
......
using CodeLibrary; using CodeLibrary;
using OnlineStore;
using OnlineStore.Common; using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary; using OnlineStore.LoadCSVLibrary;
using System; using System;
...@@ -84,14 +85,14 @@ namespace DeviceLibrary ...@@ -84,14 +85,14 @@ namespace DeviceLibrary
StringState = StringStateE.Empty; StringState = StringStateE.Empty;
} }
else if (IOValue(IO_Type.StringBack_Check).Equals(IO_VALUE.LOW) && IOValue(IO_Type.StringFront_Check).Equals(IO_VALUE.LOW)){ else if (IOValue(IO_Type.StringBack_Check).Equals(IO_VALUE.LOW) && IOValue(IO_Type.StringFront_Check).Equals(IO_VALUE.LOW)){
Msg.add("当前没有料串", MsgLevel.info); Msg.add(crc.GetString(L.no_string, "当前没有料串"), MsgLevel.info);
StringMoveInfo.log($"当前没有料串"); StringMoveInfo.log($"当前没有料串");
StringState = StringStateE.None; StringState = StringStateE.None;
LastStringState = StringStateE.None; LastStringState = StringStateE.None;
} }
else if (IOValue(IO_Type.StringFront_Check).Equals(IO_VALUE.HIGH)) else if (IOValue(IO_Type.StringFront_Check).Equals(IO_VALUE.HIGH))
{ {
Msg.add("感应到料串", MsgLevel.info); Msg.add(crc.GetString(L.detect_string, "感应到料串"), MsgLevel.info);
StringMoveInfo.log($"感应到料串"); StringMoveInfo.log($"感应到料串");
Line.LineRun("n", false, 2); Line.LineRun("n", false, 2);
} }
...@@ -128,7 +129,7 @@ namespace DeviceLibrary ...@@ -128,7 +129,7 @@ namespace DeviceLibrary
downCheck2 = false; downCheck2 = false;
break; break;
case MoveStep.StringLoad_03: case MoveStep.StringLoad_03:
if (IOValue(IO_Type.StringDoor_Close).Equals(IO_VALUE.HIGH)) if (ConfigHelper.Config.Get("Device_Disable_StringDoor", false) || IOValue(IO_Type.StringDoor_Close).Equals(IO_VALUE.HIGH))
{ {
StringMoveInfo.NextMoveStep(MoveStep.StringLoad_04); StringMoveInfo.NextMoveStep(MoveStep.StringLoad_04);
StringMoveInfo.log($"批量轴到顶部检测点"); StringMoveInfo.log($"批量轴到顶部检测点");
...@@ -137,7 +138,7 @@ namespace DeviceLibrary ...@@ -137,7 +138,7 @@ namespace DeviceLibrary
} }
else if (StringMoveInfo.IsTimeOut(10)) else if (StringMoveInfo.IsTimeOut(10))
{ {
Msg.add("等待关门",MsgLevel.warning); Msg.add(crc.GetString(L.wait_stringdoor_close, "等待关门折叠门"),MsgLevel.warning);
StringMoveInfo.log($"等待关门"); StringMoveInfo.log($"等待关门");
} }
break; break;
...@@ -202,7 +203,7 @@ namespace DeviceLibrary ...@@ -202,7 +203,7 @@ namespace DeviceLibrary
} }
break; break;
case MoveStep.StringReadyGet: case MoveStep.StringReadyGet:
Msg.add("料串取料准备就绪", MsgLevel.info); Msg.add(crc.GetString(L.string_ready_for_get, "料串取料准备就绪"), MsgLevel.info);
break; break;
case MoveStep.StringReelGet: case MoveStep.StringReelGet:
StringMoveInfo.log($"料已取走,开始测高"); StringMoveInfo.log($"料已取走,开始测高");
...@@ -219,7 +220,7 @@ namespace DeviceLibrary ...@@ -219,7 +220,7 @@ namespace DeviceLibrary
Batch_Axis.AbsMove(StringMoveInfo, tpos1, Config.Batch_P1); Batch_Axis.AbsMove(StringMoveInfo, tpos1, Config.Batch_P1);
break; break;
case MoveStep.StringReadyPut: case MoveStep.StringReadyPut:
Msg.add("料串放料准备就绪", MsgLevel.info); Msg.add(crc.GetString(L.string_ready_for_put, "料串放料准备就绪"), MsgLevel.info);
StringMoveInfo.log($"料串放料准备就绪"); StringMoveInfo.log($"料串放料准备就绪");
break; break;
case MoveStep.StringReelPut: case MoveStep.StringReelPut:
...@@ -286,17 +287,17 @@ namespace DeviceLibrary ...@@ -286,17 +287,17 @@ namespace DeviceLibrary
} }
break; break;
case MoveStep.StringOut_05: case MoveStep.StringOut_05:
if (IOValue(IO_Type.StringDoor_Close).Equals(IO_VALUE.HIGH)) if (ConfigHelper.Config.Get("Device_Disable_StringDoor", false) || IOValue(IO_Type.StringDoor_Close).Equals(IO_VALUE.HIGH))
{ {
StringMoveInfo.NextMoveStep(MoveStep.Wait); StringMoveInfo.NextMoveStep(MoveStep.Wait);
StringMoveInfo.log($"折叠门已关闭"); StringMoveInfo.log($"折叠门已关闭");
} }
else { else {
Msg.add("等待关闭折叠门",MsgLevel.info); Msg.add(crc.GetString(L.wait_stringdoor_close, "等待关门折叠门"), MsgLevel.info);
} }
break; break;
case MoveStep.StringOut_06: case MoveStep.StringOut_06:
if (IOValue(IO_Type.StringDoor_Close).Equals(IO_VALUE.HIGH)) if (ConfigHelper.Config.Get("Device_Disable_StringDoor", false) || IOValue(IO_Type.StringDoor_Close).Equals(IO_VALUE.HIGH))
{ {
StringMoveInfo.NextMoveStep(MoveStep.Wait); StringMoveInfo.NextMoveStep(MoveStep.Wait);
StringMoveInfo.log($"料串未拿走,直接关门"); StringMoveInfo.log($"料串未拿走,直接关门");
...@@ -307,7 +308,7 @@ namespace DeviceLibrary ...@@ -307,7 +308,7 @@ namespace DeviceLibrary
StringMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(2000)); StringMoveInfo.WaitList.Add(WaitResultInfo.WaitTime(2000));
} else if (StringMoveInfo.IsTimeOut(30)) { } else if (StringMoveInfo.IsTimeOut(30)) {
StringMoveInfo.log($"等待料串被取走超时"); StringMoveInfo.log($"等待料串被取走超时");
Msg.add("等待料串被取走", MsgLevel.warning); Msg.add(crc.GetString(L.wait_string_take, "等待料串被取走"), MsgLevel.warning);
} }
break; break;
case MoveStep.StringOut_07: case MoveStep.StringOut_07:
...@@ -325,25 +326,25 @@ namespace DeviceLibrary ...@@ -325,25 +326,25 @@ namespace DeviceLibrary
string state = ""; string state = "";
if (StringState == StringStateE.Empty) if (StringState == StringStateE.Empty)
state = "空料串"; state = crc.GetString(L.empty_reel, "空料串");
else if (StringState == StringStateE.Full) else if (StringState == StringStateE.Full)
state = "满料串"; state = crc.GetString(L.full_reel, "满料串");
else if (StringState == StringStateE.HasReel) else if (StringState == StringStateE.HasReel)
state = "入库料串"; state = crc.GetString(L.instore_reel, "入库料串");
else if (StringState == StringStateE.None) else if (StringState == StringStateE.None)
state = "无料串"; state = crc.GetString(L.no_string, "无料串");
if (StringMoveInfo.MoveStep == MoveStep.Wait) if (StringMoveInfo.MoveStep == MoveStep.Wait)
{ {
return "空闲中"; return crc.GetString(L.free, "空闲中");
} }
else if (StringMoveInfo.MoveStep <= MoveStep.StringLoad_06) else if (StringMoveInfo.MoveStep <= MoveStep.StringLoad_06)
{ {
return "料串准备中"; return crc.GetString(L.string_prepare, "料串准备中");
} }
else if (StringMoveInfo.MoveStep >= MoveStep.StringOut_01) else if (StringMoveInfo.MoveStep >= MoveStep.StringOut_01)
{ {
return "料串释放中"; return crc.GetString(L.string_releasing, "料串释放中");
} }
else if (StringMoveInfo.MoveStep > MoveStep.StringLoad_06) else if (StringMoveInfo.MoveStep > MoveStep.StringLoad_06)
{ {
......
...@@ -22,6 +22,12 @@ namespace DeviceLibrary ...@@ -22,6 +22,12 @@ namespace DeviceLibrary
List.Add(this); List.Add(this);
} }
public MoveInfo(object p, string v)
{
this.p = p;
this.v = v;
}
public string Name { get; set; } public string Name { get; set; }
public DateTime LastSetpTime { get; set; } public DateTime LastSetpTime { get; set; }
public bool OneWaitCanEndStep = false; public bool OneWaitCanEndStep = false;
...@@ -116,6 +122,9 @@ namespace DeviceLibrary ...@@ -116,6 +122,9 @@ namespace DeviceLibrary
} }
string lasterrmsg = ""; string lasterrmsg = "";
private object p;
private string v;
public void errlog(string msg) public void errlog(string msg)
{ {
msg = $"[{Name}][{moveStep}][{MoveParam.WareCode}]{msg}"; msg = $"[{Name}][{moveStep}][{MoveParam.WareCode}]{msg}";
......
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;
...@@ -52,7 +53,7 @@ namespace DeviceLibrary ...@@ -52,7 +53,7 @@ namespace DeviceLibrary
} }
else { else {
IsLoadOk = false; IsLoadOk = false;
msg += "找不到库位配置文件\n"; msg += crc.GetString(L.cant_find_storeposfile, "找不到库位配置文件")+ "\n";
} }
...@@ -62,7 +63,7 @@ namespace DeviceLibrary ...@@ -62,7 +63,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(L.iocard_init_fail, "IO板卡初始化失败")+ "\n";
} }
if (!CameraA.LoadCameraConfig("CameraA", out string errmsg)) if (!CameraA.LoadCameraConfig("CameraA", out string errmsg))
{ {
...@@ -71,7 +72,7 @@ namespace DeviceLibrary ...@@ -71,7 +72,7 @@ namespace DeviceLibrary
} }
if (!HumitureController.Init(ConfigHelper.Config.Get("Device_Humiture_Port"))) { if (!HumitureController.Init(ConfigHelper.Config.Get("Device_Humiture_Port"))) {
IsLoadOk = false; IsLoadOk = false;
msg += $"温湿度传感器初始化失败,端口:{ConfigHelper.Config.Get("Device_Humiture_Port")}\n"; msg += crc.GetString(L.tempnhum_sensor_init_fail, $"温湿度传感器初始化失败,端口:")+ $"{ConfigHelper.Config.Get("Device_Humiture_Port")}\n";
} }
IOManager.IOMove(IO_Type.Device_Led, IO_VALUE.HIGH); IOManager.IOMove(IO_Type.Device_Led, IO_VALUE.HIGH);
IOManager.IOMove(IO_Type.Camera_Led, IO_VALUE.HIGH); IOManager.IOMove(IO_Type.Camera_Led, IO_VALUE.HIGH);
...@@ -84,7 +85,7 @@ namespace DeviceLibrary ...@@ -84,7 +85,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(L.open_debug_mode,"打开调试模式"));
} }
public static void Start() { public static void Start() {
//Init(); //Init();
......
...@@ -165,9 +165,10 @@ ...@@ -165,9 +165,10 @@
this.lblAlarmcode.Location = new System.Drawing.Point(433, 65); this.lblAlarmcode.Location = new System.Drawing.Point(433, 65);
this.lblAlarmcode.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0); this.lblAlarmcode.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.lblAlarmcode.Name = "lblAlarmcode"; this.lblAlarmcode.Name = "lblAlarmcode";
this.lblAlarmcode.Size = new System.Drawing.Size(68, 17); this.lblAlarmcode.Size = new System.Drawing.Size(80, 17);
this.lblAlarmcode.TabIndex = 19; this.lblAlarmcode.TabIndex = 19;
this.lblAlarmcode.Text = "错误码:160"; this.lblAlarmcode.Tag = "not";
this.lblAlarmcode.Text = "ErrCode:160";
this.lblAlarmcode.Visible = false; this.lblAlarmcode.Visible = false;
// //
// label4 // label4
...@@ -188,6 +189,7 @@ ...@@ -188,6 +189,7 @@
this.lblhomeSts.Name = "lblhomeSts"; this.lblhomeSts.Name = "lblhomeSts";
this.lblhomeSts.Size = new System.Drawing.Size(17, 17); this.lblhomeSts.Size = new System.Drawing.Size(17, 17);
this.lblhomeSts.TabIndex = 17; this.lblhomeSts.TabIndex = 17;
this.lblhomeSts.Tag = "not";
this.lblhomeSts.Text = "..."; this.lblhomeSts.Text = "...";
// //
// label2 // label2
...@@ -209,6 +211,7 @@ ...@@ -209,6 +211,7 @@
this.lblAxEncAcc.Name = "lblAxEncAcc"; this.lblAxEncAcc.Name = "lblAxEncAcc";
this.lblAxEncAcc.Size = new System.Drawing.Size(17, 17); this.lblAxEncAcc.Size = new System.Drawing.Size(17, 17);
this.lblAxEncAcc.TabIndex = 12; this.lblAxEncAcc.TabIndex = 12;
this.lblAxEncAcc.Tag = "not";
this.lblAxEncAcc.Text = "..."; this.lblAxEncAcc.Text = "...";
this.lblAxEncAcc.Visible = false; this.lblAxEncAcc.Visible = false;
// //
...@@ -350,6 +353,7 @@ ...@@ -350,6 +353,7 @@
this.lblAxEncVel.Name = "lblAxEncVel"; this.lblAxEncVel.Name = "lblAxEncVel";
this.lblAxEncVel.Size = new System.Drawing.Size(17, 17); this.lblAxEncVel.Size = new System.Drawing.Size(17, 17);
this.lblAxEncVel.TabIndex = 1; this.lblAxEncVel.TabIndex = 1;
this.lblAxEncVel.Tag = "not";
this.lblAxEncVel.Text = "..."; this.lblAxEncVel.Text = "...";
// //
// lblAxPrfVel // lblAxPrfVel
...@@ -360,6 +364,7 @@ ...@@ -360,6 +364,7 @@
this.lblAxPrfVel.Name = "lblAxPrfVel"; this.lblAxPrfVel.Name = "lblAxPrfVel";
this.lblAxPrfVel.Size = new System.Drawing.Size(17, 17); this.lblAxPrfVel.Size = new System.Drawing.Size(17, 17);
this.lblAxPrfVel.TabIndex = 1; this.lblAxPrfVel.TabIndex = 1;
this.lblAxPrfVel.Tag = "not";
this.lblAxPrfVel.Text = "..."; this.lblAxPrfVel.Text = "...";
// //
// lblAxEncPos // lblAxEncPos
...@@ -370,6 +375,7 @@ ...@@ -370,6 +375,7 @@
this.lblAxEncPos.Name = "lblAxEncPos"; this.lblAxEncPos.Name = "lblAxEncPos";
this.lblAxEncPos.Size = new System.Drawing.Size(17, 17); this.lblAxEncPos.Size = new System.Drawing.Size(17, 17);
this.lblAxEncPos.TabIndex = 1; this.lblAxEncPos.TabIndex = 1;
this.lblAxEncPos.Tag = "not";
this.lblAxEncPos.Text = "..."; this.lblAxEncPos.Text = "...";
// //
// lblAxPrfPos // lblAxPrfPos
...@@ -380,6 +386,7 @@ ...@@ -380,6 +386,7 @@
this.lblAxPrfPos.Name = "lblAxPrfPos"; this.lblAxPrfPos.Name = "lblAxPrfPos";
this.lblAxPrfPos.Size = new System.Drawing.Size(17, 17); this.lblAxPrfPos.Size = new System.Drawing.Size(17, 17);
this.lblAxPrfPos.TabIndex = 1; this.lblAxPrfPos.TabIndex = 1;
this.lblAxPrfPos.Tag = "not";
this.lblAxPrfPos.Text = "..."; this.lblAxPrfPos.Text = "...";
// //
// lblAxisPrfMode // lblAxisPrfMode
...@@ -390,6 +397,7 @@ ...@@ -390,6 +397,7 @@
this.lblAxisPrfMode.Name = "lblAxisPrfMode"; this.lblAxisPrfMode.Name = "lblAxisPrfMode";
this.lblAxisPrfMode.Size = new System.Drawing.Size(17, 17); this.lblAxisPrfMode.Size = new System.Drawing.Size(17, 17);
this.lblAxisPrfMode.TabIndex = 1; this.lblAxisPrfMode.TabIndex = 1;
this.lblAxisPrfMode.Tag = "not";
this.lblAxisPrfMode.Text = "..."; this.lblAxisPrfMode.Text = "...";
// //
// label50 // label50
...@@ -424,6 +432,7 @@ ...@@ -424,6 +432,7 @@
this.groupBox1.Size = new System.Drawing.Size(135, 260); this.groupBox1.Size = new System.Drawing.Size(135, 260);
this.groupBox1.TabIndex = 302; this.groupBox1.TabIndex = 302;
this.groupBox1.TabStop = false; this.groupBox1.TabStop = false;
this.groupBox1.Tag = "not";
this.groupBox1.Text = "状态"; this.groupBox1.Text = "状态";
// //
// txtBusyStatus // txtBusyStatus
...@@ -613,6 +622,7 @@ ...@@ -613,6 +622,7 @@
this.comjSpeed.Name = "comjSpeed"; this.comjSpeed.Name = "comjSpeed";
this.comjSpeed.Size = new System.Drawing.Size(95, 28); this.comjSpeed.Size = new System.Drawing.Size(95, 28);
this.comjSpeed.TabIndex = 335; this.comjSpeed.TabIndex = 335;
this.comjSpeed.Tag = "not";
// //
// btnComAlarmClear // btnComAlarmClear
// //
...@@ -742,6 +752,7 @@ ...@@ -742,6 +752,7 @@
this.txtASpeed.RightToLeft = System.Windows.Forms.RightToLeft.No; this.txtASpeed.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.txtASpeed.Size = new System.Drawing.Size(91, 26); this.txtASpeed.Size = new System.Drawing.Size(91, 26);
this.txtASpeed.TabIndex = 251; this.txtASpeed.TabIndex = 251;
this.txtASpeed.Tag = "not";
this.txtASpeed.Text = "200"; this.txtASpeed.Text = "200";
// //
// label1 // label1
...@@ -833,6 +844,7 @@ ...@@ -833,6 +844,7 @@
this.lblCountPulse.ReadOnly = true; this.lblCountPulse.ReadOnly = true;
this.lblCountPulse.Size = new System.Drawing.Size(118, 26); this.lblCountPulse.Size = new System.Drawing.Size(118, 26);
this.lblCountPulse.TabIndex = 38; this.lblCountPulse.TabIndex = 38;
this.lblCountPulse.Tag = "not";
// //
// btnAxisAMove // btnAxisAMove
// //
...@@ -874,6 +886,7 @@ ...@@ -874,6 +886,7 @@
this.txtAPosition.RightToLeft = System.Windows.Forms.RightToLeft.No; this.txtAPosition.RightToLeft = System.Windows.Forms.RightToLeft.No;
this.txtAPosition.Size = new System.Drawing.Size(91, 26); this.txtAPosition.Size = new System.Drawing.Size(91, 26);
this.txtAPosition.TabIndex = 244; this.txtAPosition.TabIndex = 244;
this.txtAPosition.Tag = "not";
this.txtAPosition.Text = "3000"; this.txtAPosition.Text = "3000";
// //
// label46 // label46
...@@ -923,6 +936,7 @@ ...@@ -923,6 +936,7 @@
this.txtAxisValue.ReadOnly = true; this.txtAxisValue.ReadOnly = true;
this.txtAxisValue.Size = new System.Drawing.Size(50, 26); this.txtAxisValue.Size = new System.Drawing.Size(50, 26);
this.txtAxisValue.TabIndex = 242; this.txtAxisValue.TabIndex = 242;
this.txtAxisValue.Tag = "not";
this.txtAxisValue.Text = "0"; this.txtAxisValue.Text = "0";
// //
// txtAxisDeviceName // txtAxisDeviceName
...@@ -934,6 +948,7 @@ ...@@ -934,6 +948,7 @@
this.txtAxisDeviceName.ReadOnly = true; this.txtAxisDeviceName.ReadOnly = true;
this.txtAxisDeviceName.Size = new System.Drawing.Size(50, 26); this.txtAxisDeviceName.Size = new System.Drawing.Size(50, 26);
this.txtAxisDeviceName.TabIndex = 241; this.txtAxisDeviceName.TabIndex = 241;
this.txtAxisDeviceName.Tag = "not";
this.txtAxisDeviceName.Text = "0"; this.txtAxisDeviceName.Text = "0";
// //
// lblServerOn // lblServerOn
......
...@@ -11,6 +11,7 @@ using OnlineStore.Common; ...@@ -11,6 +11,7 @@ using OnlineStore.Common;
using System.Threading; using System.Threading;
using OnlineStore.LoadCSVLibrary; using OnlineStore.LoadCSVLibrary;
using HuichuanLibrary; using HuichuanLibrary;
using OnlineStore;
namespace DeviceLibrary namespace DeviceLibrary
{ {
...@@ -25,7 +26,16 @@ namespace DeviceLibrary ...@@ -25,7 +26,16 @@ namespace DeviceLibrary
public AxisMoveControl() public AxisMoveControl()
{ {
InitializeComponent(); InitializeComponent();
crc.OpenResourceLog = true;
crc.LanguageChangeEvent += Crc_LanguageChangeEvent;
crc.LanguageProcess(this);
} }
private void Crc_LanguageChangeEvent(object sender, EventArgs e)
{
crc.LanguageProcess(this);
}
public void LoadData(List<AxisBean> axisList, bool isHc = true) public void LoadData(List<AxisBean> axisList, bool isHc = true)
{ {
//this.boxBean = equipBase; //this.boxBean = equipBase;
...@@ -37,7 +47,7 @@ namespace DeviceLibrary ...@@ -37,7 +47,7 @@ namespace DeviceLibrary
cmbAxis.Items.Clear(); cmbAxis.Items.Clear();
foreach (var a in axisList) foreach (var a in axisList)
{ {
cmbAxis.Items.Add(a.Config.Explain); cmbAxis.Items.Add(crc.GetString(a.Config.ProName,a.Config.Explain));
} }
cmbAxis.SelectedIndex = 0; cmbAxis.SelectedIndex = 0;
currentAxis = axisList[0]; currentAxis = axisList[0];
...@@ -224,8 +234,8 @@ namespace DeviceLibrary ...@@ -224,8 +234,8 @@ namespace DeviceLibrary
comjSpeed.Items.Add(targetSpeed * i / 10); comjSpeed.Items.Add(targetSpeed * i / 10);
} }
comjSpeed.SelectedIndex = 4; comjSpeed.SelectedIndex = 4;
btnAddMove.Text = "点动+ "; //btnAddMove.Text = "点动+ ";
btnDelMove.Text = "点动- "; //btnDelMove.Text = "点动- ";
txtASpeed.Text = targetSpeed.ToString(); txtASpeed.Text = targetSpeed.ToString();
int SelIndex = cmbAxis.SelectedIndex; int SelIndex = cmbAxis.SelectedIndex;
...@@ -342,7 +352,7 @@ namespace DeviceLibrary ...@@ -342,7 +352,7 @@ namespace DeviceLibrary
} }
private void ReadAxisStatus() private void ReadAxisStatus()
{ {
groupBox2.Text = cmbAxis.Text + "-状态监控"; groupBox2.Text = cmbAxis.Text + "-"+crc.GetString(L.AxisMoveControl_status_monitor, "状态监控");
//【1】更新轴号 //【1】更新轴号
short axisNo = SlvAddr; short axisNo = SlvAddr;
if (axisNo < 0) if (axisNo < 0)
......
...@@ -50,6 +50,7 @@ partial class AxisTipControl ...@@ -50,6 +50,7 @@ partial class AxisTipControl
this.comjSpeed.Name = "comjSpeed"; this.comjSpeed.Name = "comjSpeed";
this.comjSpeed.Size = new System.Drawing.Size(100, 28); this.comjSpeed.Size = new System.Drawing.Size(100, 28);
this.comjSpeed.TabIndex = 339; this.comjSpeed.TabIndex = 339;
this.comjSpeed.Tag = "not";
this.comjSpeed.SelectedIndexChanged += new System.EventHandler(this.comjSpeed_SelectedIndexChanged); this.comjSpeed.SelectedIndexChanged += new System.EventHandler(this.comjSpeed_SelectedIndexChanged);
// //
// btnDelMove // btnDelMove
...@@ -98,6 +99,7 @@ partial class AxisTipControl ...@@ -98,6 +99,7 @@ partial class AxisTipControl
this.textBox_pos.Name = "textBox_pos"; this.textBox_pos.Name = "textBox_pos";
this.textBox_pos.Size = new System.Drawing.Size(100, 21); this.textBox_pos.Size = new System.Drawing.Size(100, 21);
this.textBox_pos.TabIndex = 340; this.textBox_pos.TabIndex = 340;
this.textBox_pos.Tag = "not";
// //
// label_position // label_position
// //
...@@ -138,6 +140,7 @@ partial class AxisTipControl ...@@ -138,6 +140,7 @@ partial class AxisTipControl
this.flowLayoutPanel1.Name = "flowLayoutPanel1"; this.flowLayoutPanel1.Name = "flowLayoutPanel1";
this.flowLayoutPanel1.Size = new System.Drawing.Size(230, 74); this.flowLayoutPanel1.Size = new System.Drawing.Size(230, 74);
this.flowLayoutPanel1.TabIndex = 342; this.flowLayoutPanel1.TabIndex = 342;
this.flowLayoutPanel1.Tag = "not";
// //
// groupBox1 // groupBox1
// //
......
using DeviceLibrary; using DeviceLibrary;
using HuichuanLibrary; using HuichuanLibrary;
using OnlineStore;
using OnlineStore.Common; using OnlineStore.Common;
using OnlineStore.DeviceLibrary; using OnlineStore.DeviceLibrary;
using System; using System;
...@@ -22,8 +23,14 @@ public partial class AxisTipControl : Form ...@@ -22,8 +23,14 @@ public partial class AxisTipControl : Form
this.Deactivate += AxisTipControl_Deactivate; this.Deactivate += AxisTipControl_Deactivate;
this.LostFocus += AxisTipControl_LostFocus; this.LostFocus += AxisTipControl_LostFocus;
this.TopMost = true; this.TopMost = true;
crc.OpenResourceLog = true;
crc.LanguageChangeEvent += Crc_LanguageChangeEvent;
crc.LanguageProcess(this);
}
private void Crc_LanguageChangeEvent(object sender, EventArgs e)
{
crc.LanguageProcess(this);
} }
private void AxisTipControl_LostFocus(object sender, EventArgs e) private void AxisTipControl_LostFocus(object sender, EventArgs e)
{ {
//this.Close(); //this.Close();
......
此文件类型无法预览
...@@ -50,8 +50,7 @@ namespace TheMachine ...@@ -50,8 +50,7 @@ namespace TheMachine
this.tableLayoutPanel.Controls.Add(this.textBoxDescription, 1, 4); this.tableLayoutPanel.Controls.Add(this.textBoxDescription, 1, 4);
this.tableLayoutPanel.Controls.Add(this.okButton, 1, 5); this.tableLayoutPanel.Controls.Add(this.okButton, 1, 5);
this.tableLayoutPanel.Dock = System.Windows.Forms.DockStyle.Fill; this.tableLayoutPanel.Dock = System.Windows.Forms.DockStyle.Fill;
this.tableLayoutPanel.Location = new System.Drawing.Point(12, 10); this.tableLayoutPanel.Location = new System.Drawing.Point(9, 8);
this.tableLayoutPanel.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.tableLayoutPanel.Name = "tableLayoutPanel"; this.tableLayoutPanel.Name = "tableLayoutPanel";
this.tableLayoutPanel.RowCount = 6; this.tableLayoutPanel.RowCount = 6;
this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10F)); this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10F));
...@@ -60,30 +59,32 @@ namespace TheMachine ...@@ -60,30 +59,32 @@ namespace TheMachine
this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10F)); this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10F));
this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F)); this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10F)); this.tableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 10F));
this.tableLayoutPanel.Size = new System.Drawing.Size(556, 306); this.tableLayoutPanel.Size = new System.Drawing.Size(417, 245);
this.tableLayoutPanel.TabIndex = 0; this.tableLayoutPanel.TabIndex = 0;
// //
// labelProductName // labelProductName
// //
this.labelProductName.Dock = System.Windows.Forms.DockStyle.Fill; this.labelProductName.Dock = System.Windows.Forms.DockStyle.Fill;
this.labelProductName.Location = new System.Drawing.Point(80, 0); this.labelProductName.Location = new System.Drawing.Point(60, 0);
this.labelProductName.Margin = new System.Windows.Forms.Padding(8, 0, 4, 0); this.labelProductName.Margin = new System.Windows.Forms.Padding(6, 0, 3, 0);
this.labelProductName.MaximumSize = new System.Drawing.Size(0, 20); this.labelProductName.MaximumSize = new System.Drawing.Size(0, 16);
this.labelProductName.Name = "labelProductName"; this.labelProductName.Name = "labelProductName";
this.labelProductName.Size = new System.Drawing.Size(472, 20); this.labelProductName.Size = new System.Drawing.Size(354, 16);
this.labelProductName.TabIndex = 19; this.labelProductName.TabIndex = 19;
this.labelProductName.Tag = "not";
this.labelProductName.Text = "产品名称"; this.labelProductName.Text = "产品名称";
this.labelProductName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; this.labelProductName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
// //
// labelVersion // labelVersion
// //
this.labelVersion.Dock = System.Windows.Forms.DockStyle.Fill; this.labelVersion.Dock = System.Windows.Forms.DockStyle.Fill;
this.labelVersion.Location = new System.Drawing.Point(80, 30); this.labelVersion.Location = new System.Drawing.Point(60, 24);
this.labelVersion.Margin = new System.Windows.Forms.Padding(8, 0, 4, 0); this.labelVersion.Margin = new System.Windows.Forms.Padding(6, 0, 3, 0);
this.labelVersion.MaximumSize = new System.Drawing.Size(0, 20); this.labelVersion.MaximumSize = new System.Drawing.Size(0, 16);
this.labelVersion.Name = "labelVersion"; this.labelVersion.Name = "labelVersion";
this.labelVersion.Size = new System.Drawing.Size(472, 20); this.labelVersion.Size = new System.Drawing.Size(354, 16);
this.labelVersion.TabIndex = 0; this.labelVersion.TabIndex = 0;
this.labelVersion.Tag = "not";
this.labelVersion.Text = "版本"; this.labelVersion.Text = "版本";
this.labelVersion.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; this.labelVersion.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
this.labelVersion.Click += new System.EventHandler(this.labelVersion_Click); this.labelVersion.Click += new System.EventHandler(this.labelVersion_Click);
...@@ -91,23 +92,24 @@ namespace TheMachine ...@@ -91,23 +92,24 @@ namespace TheMachine
// labelCopyright // labelCopyright
// //
this.labelCopyright.Dock = System.Windows.Forms.DockStyle.Fill; this.labelCopyright.Dock = System.Windows.Forms.DockStyle.Fill;
this.labelCopyright.Location = new System.Drawing.Point(80, 60); this.labelCopyright.Location = new System.Drawing.Point(60, 48);
this.labelCopyright.Margin = new System.Windows.Forms.Padding(8, 0, 4, 0); this.labelCopyright.Margin = new System.Windows.Forms.Padding(6, 0, 3, 0);
this.labelCopyright.MaximumSize = new System.Drawing.Size(0, 20); this.labelCopyright.MaximumSize = new System.Drawing.Size(0, 16);
this.labelCopyright.Name = "labelCopyright"; this.labelCopyright.Name = "labelCopyright";
this.labelCopyright.Size = new System.Drawing.Size(472, 20); this.labelCopyright.Size = new System.Drawing.Size(354, 16);
this.labelCopyright.TabIndex = 21; this.labelCopyright.TabIndex = 21;
this.labelCopyright.Tag = "not";
this.labelCopyright.Text = "版权"; this.labelCopyright.Text = "版权";
this.labelCopyright.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; this.labelCopyright.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
// //
// labelCompanyName // labelCompanyName
// //
this.labelCompanyName.Dock = System.Windows.Forms.DockStyle.Fill; this.labelCompanyName.Dock = System.Windows.Forms.DockStyle.Fill;
this.labelCompanyName.Location = new System.Drawing.Point(80, 90); this.labelCompanyName.Location = new System.Drawing.Point(60, 72);
this.labelCompanyName.Margin = new System.Windows.Forms.Padding(8, 0, 4, 0); this.labelCompanyName.Margin = new System.Windows.Forms.Padding(6, 0, 3, 0);
this.labelCompanyName.MaximumSize = new System.Drawing.Size(0, 20); this.labelCompanyName.MaximumSize = new System.Drawing.Size(0, 16);
this.labelCompanyName.Name = "labelCompanyName"; this.labelCompanyName.Name = "labelCompanyName";
this.labelCompanyName.Size = new System.Drawing.Size(472, 20); this.labelCompanyName.Size = new System.Drawing.Size(354, 16);
this.labelCompanyName.TabIndex = 22; this.labelCompanyName.TabIndex = 22;
this.labelCompanyName.Text = "公司名称"; this.labelCompanyName.Text = "公司名称";
this.labelCompanyName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft; this.labelCompanyName.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
...@@ -115,42 +117,41 @@ namespace TheMachine ...@@ -115,42 +117,41 @@ namespace TheMachine
// textBoxDescription // textBoxDescription
// //
this.textBoxDescription.Dock = System.Windows.Forms.DockStyle.Fill; this.textBoxDescription.Dock = System.Windows.Forms.DockStyle.Fill;
this.textBoxDescription.Location = new System.Drawing.Point(80, 124); this.textBoxDescription.Location = new System.Drawing.Point(60, 99);
this.textBoxDescription.Margin = new System.Windows.Forms.Padding(8, 4, 4, 4); this.textBoxDescription.Margin = new System.Windows.Forms.Padding(6, 3, 3, 3);
this.textBoxDescription.Multiline = true; this.textBoxDescription.Multiline = true;
this.textBoxDescription.Name = "textBoxDescription"; this.textBoxDescription.Name = "textBoxDescription";
this.textBoxDescription.ReadOnly = true; this.textBoxDescription.ReadOnly = true;
this.textBoxDescription.ScrollBars = System.Windows.Forms.ScrollBars.Both; this.textBoxDescription.ScrollBars = System.Windows.Forms.ScrollBars.Both;
this.textBoxDescription.Size = new System.Drawing.Size(472, 145); this.textBoxDescription.Size = new System.Drawing.Size(354, 116);
this.textBoxDescription.TabIndex = 23; this.textBoxDescription.TabIndex = 23;
this.textBoxDescription.TabStop = false; this.textBoxDescription.TabStop = false;
this.textBoxDescription.Tag = "not";
this.textBoxDescription.Text = "说明"; this.textBoxDescription.Text = "说明";
// //
// okButton // okButton
// //
this.okButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.okButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.okButton.DialogResult = System.Windows.Forms.DialogResult.Cancel; this.okButton.DialogResult = System.Windows.Forms.DialogResult.Cancel;
this.okButton.Location = new System.Drawing.Point(452, 277); this.okButton.Location = new System.Drawing.Point(339, 222);
this.okButton.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.okButton.Name = "okButton"; this.okButton.Name = "okButton";
this.okButton.Size = new System.Drawing.Size(100, 25); this.okButton.Size = new System.Drawing.Size(75, 20);
this.okButton.TabIndex = 24; this.okButton.TabIndex = 24;
this.okButton.Text = "确定(&O)"; this.okButton.Text = "确定";
this.okButton.Click += new System.EventHandler(this.okButton_Click); this.okButton.Click += new System.EventHandler(this.okButton_Click);
// //
// AboutBox1 // AboutBox1
// //
this.AcceptButton = this.okButton; this.AcceptButton = this.okButton;
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F); this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(580, 326); this.ClientSize = new System.Drawing.Size(435, 261);
this.Controls.Add(this.tableLayoutPanel); this.Controls.Add(this.tableLayoutPanel);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
this.Margin = new System.Windows.Forms.Padding(4, 4, 4, 4);
this.MaximizeBox = false; this.MaximizeBox = false;
this.MinimizeBox = false; this.MinimizeBox = false;
this.Name = "AboutBox1"; this.Name = "AboutBox1";
this.Padding = new System.Windows.Forms.Padding(12, 10, 12, 10); this.Padding = new System.Windows.Forms.Padding(9, 8, 9, 8);
this.ShowIcon = false; this.ShowIcon = false;
this.ShowInTaskbar = false; this.ShowInTaskbar = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
......
using System; using OnlineStore;
using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
using System.Drawing; using System.Drawing;
...@@ -14,12 +15,18 @@ namespace TheMachine ...@@ -14,12 +15,18 @@ namespace TheMachine
public AboutBox1() public AboutBox1()
{ {
InitializeComponent(); InitializeComponent();
this.Text = String.Format("关于 {0}", AssemblyTitle); this.Text = String.Format("{0}", AssemblyTitle);
this.labelProductName.Text = AssemblyProduct; this.labelProductName.Text = AssemblyProduct;
this.labelVersion.Text = String.Format("版本 {0}", AssemblyVersion); this.labelVersion.Text = String.Format("Ver {0}", AssemblyVersion);
this.labelCopyright.Text = AssemblyCopyright; this.labelCopyright.Text = AssemblyCopyright;
this.labelCompanyName.Text = AssemblyCompany; this.labelCompanyName.Text = AssemblyCompany;
this.textBoxDescription.Text = AssemblyDescription; this.textBoxDescription.Text = AssemblyDescription;
this.Shown += AboutBox1_Shown;
}
private void AboutBox1_Shown(object sender, EventArgs e)
{
crc.LanguageProcess(this);
} }
#region 程序集特性访问器 #region 程序集特性访问器
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
<rollingStyle value="Date"/> <rollingStyle value="Date"/>
<datePattern value="yyyy-MM-dd"/> <datePattern value="yyyy-MM-dd"/>
<layout type="log4net.Layout.PatternLayout"> <layout type="log4net.Layout.PatternLayout">
<conversionPattern value="[%date][%t]%-5p %m%n"/> <conversionPattern value="%m%n"/>
</layout> </layout>
</appender> </appender>
<logger name="RollingLogFileAppender"> <logger name="RollingLogFileAppender">
......
...@@ -52,6 +52,7 @@ namespace TheMachine ...@@ -52,6 +52,7 @@ namespace TheMachine
this.axisMoveControl1.Name = "axisMoveControl1"; this.axisMoveControl1.Name = "axisMoveControl1";
this.axisMoveControl1.Size = new System.Drawing.Size(559, 400); this.axisMoveControl1.Size = new System.Drawing.Size(559, 400);
this.axisMoveControl1.TabIndex = 0; this.axisMoveControl1.TabIndex = 0;
this.axisMoveControl1.Tag = "not";
// //
// configControl1 // configControl1
// //
......
using DeviceLibrary; using DeviceLibrary;
using OnlineStore;
using OnlineStore.Common; using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary; using OnlineStore.LoadCSVLibrary;
using System; using System;
...@@ -20,6 +21,12 @@ namespace TheMachine ...@@ -20,6 +21,12 @@ namespace TheMachine
{ {
InitializeComponent(); InitializeComponent();
RobotManage.LoadFinishEvent += RobotManage_LoadFinishEvent; RobotManage.LoadFinishEvent += RobotManage_LoadFinishEvent;
crc.LanguageChangeEvent += Crc_LanguageChangeEvent;
}
private void Crc_LanguageChangeEvent(object sender, EventArgs e)
{
RobotManage_LoadFinishEvent(true, "");
} }
private void RobotManage_LoadFinishEvent(bool state, string msg) private void RobotManage_LoadFinishEvent(bool state, string msg)
......
...@@ -36,10 +36,14 @@ namespace TheMachine ...@@ -36,10 +36,14 @@ namespace TheMachine
this.二维码识别调试ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.二维码识别调试ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator();
this.退出ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.退出ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.语言toolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.简体中文ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.日本语ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.englishToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.关于ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); this.关于ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.tabControl1 = new System.Windows.Forms.TabControl(); this.tabc = new System.Windows.Forms.TabControl();
this.tabPage1 = new System.Windows.Forms.TabPage(); this.tabP1 = new System.Windows.Forms.TabPage();
this.panel1 = new System.Windows.Forms.Panel(); this.pnl = new System.Windows.Forms.Panel();
this.groupBox1 = new System.Windows.Forms.GroupBox(); this.groupBox1 = new System.Windows.Forms.GroupBox();
this.stateView = new System.Windows.Forms.ListView(); this.stateView = new System.Windows.Forms.ListView();
this.btn_releasestring = new System.Windows.Forms.Button(); this.btn_releasestring = new System.Windows.Forms.Button();
...@@ -53,14 +57,10 @@ namespace TheMachine ...@@ -53,14 +57,10 @@ namespace TheMachine
this.listView1 = new System.Windows.Forms.ListView(); this.listView1 = new System.Windows.Forms.ListView();
this.btn_stop = new System.Windows.Forms.Button(); this.btn_stop = new System.Windows.Forms.Button();
this.btn_run = new System.Windows.Forms.Button(); this.btn_run = new System.Windows.Forms.Button();
this.语言toolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.简体中文ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.日本语ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.englishToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.menuStrip1.SuspendLayout(); this.menuStrip1.SuspendLayout();
this.tabControl1.SuspendLayout(); this.tabc.SuspendLayout();
this.tabPage1.SuspendLayout(); this.tabP1.SuspendLayout();
this.panel1.SuspendLayout(); this.pnl.SuspendLayout();
this.groupBox1.SuspendLayout(); this.groupBox1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
...@@ -98,6 +98,7 @@ namespace TheMachine ...@@ -98,6 +98,7 @@ namespace TheMachine
this.启用调试模式ToolStripMenuItem.Enabled = false; this.启用调试模式ToolStripMenuItem.Enabled = false;
this.启用调试模式ToolStripMenuItem.Name = "启用调试模式ToolStripMenuItem"; this.启用调试模式ToolStripMenuItem.Name = "启用调试模式ToolStripMenuItem";
this.启用调试模式ToolStripMenuItem.Size = new System.Drawing.Size(192, 26); this.启用调试模式ToolStripMenuItem.Size = new System.Drawing.Size(192, 26);
this.启用调试模式ToolStripMenuItem.Tag = "not";
this.启用调试模式ToolStripMenuItem.Text = "启用配置模式"; this.启用调试模式ToolStripMenuItem.Text = "启用配置模式";
this.启用调试模式ToolStripMenuItem.Click += new System.EventHandler(this.启用调试模式ToolStripMenuItem_Click); this.启用调试模式ToolStripMenuItem.Click += new System.EventHandler(this.启用调试模式ToolStripMenuItem_Click);
// //
...@@ -125,6 +126,41 @@ namespace TheMachine ...@@ -125,6 +126,41 @@ namespace TheMachine
this.退出ToolStripMenuItem.Text = "退出"; this.退出ToolStripMenuItem.Text = "退出";
this.退出ToolStripMenuItem.Click += new System.EventHandler(this.退出ToolStripMenuItem_Click); this.退出ToolStripMenuItem.Click += new System.EventHandler(this.退出ToolStripMenuItem_Click);
// //
// 语言toolStripMenuItem
//
this.语言toolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.简体中文ToolStripMenuItem,
this.日本语ToolStripMenuItem,
this.englishToolStripMenuItem});
this.语言toolStripMenuItem.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F);
this.语言toolStripMenuItem.Name = "语言toolStripMenuItem";
this.语言toolStripMenuItem.Size = new System.Drawing.Size(54, 25);
this.语言toolStripMenuItem.Text = "语言";
//
// 简体中文ToolStripMenuItem
//
this.简体中文ToolStripMenuItem.Name = "简体中文ToolStripMenuItem";
this.简体中文ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
this.简体中文ToolStripMenuItem.Tag = "not";
this.简体中文ToolStripMenuItem.Text = "简体中文";
this.简体中文ToolStripMenuItem.Click += new System.EventHandler(this.简体中文ToolStripMenuItem_Click);
//
// 日本语ToolStripMenuItem
//
this.日本语ToolStripMenuItem.Name = "日本语ToolStripMenuItem";
this.日本语ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
this.日本语ToolStripMenuItem.Tag = "not";
this.日本语ToolStripMenuItem.Text = "日本語";
this.日本语ToolStripMenuItem.Click += new System.EventHandler(this.日本语ToolStripMenuItem_Click);
//
// englishToolStripMenuItem
//
this.englishToolStripMenuItem.Name = "englishToolStripMenuItem";
this.englishToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
this.englishToolStripMenuItem.Tag = "not";
this.englishToolStripMenuItem.Text = "English";
this.englishToolStripMenuItem.Click += new System.EventHandler(this.englishToolStripMenuItem_Click);
//
// 关于ToolStripMenuItem // 关于ToolStripMenuItem
// //
this.关于ToolStripMenuItem.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F); this.关于ToolStripMenuItem.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F);
...@@ -133,45 +169,45 @@ namespace TheMachine ...@@ -133,45 +169,45 @@ namespace TheMachine
this.关于ToolStripMenuItem.Text = "关于"; this.关于ToolStripMenuItem.Text = "关于";
this.关于ToolStripMenuItem.Click += new System.EventHandler(this.关于ToolStripMenuItem_Click); this.关于ToolStripMenuItem.Click += new System.EventHandler(this.关于ToolStripMenuItem_Click);
// //
// tabControl1 // tabc
// //
this.tabControl1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) this.tabc.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right))); | System.Windows.Forms.AnchorStyles.Right)));
this.tabControl1.Controls.Add(this.tabPage1); this.tabc.Controls.Add(this.tabP1);
this.tabControl1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.tabc.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.tabControl1.Location = new System.Drawing.Point(0, 90); this.tabc.Location = new System.Drawing.Point(0, 90);
this.tabControl1.Name = "tabControl1"; this.tabc.Name = "tabc";
this.tabControl1.SelectedIndex = 0; this.tabc.SelectedIndex = 0;
this.tabControl1.Size = new System.Drawing.Size(1008, 639); this.tabc.Size = new System.Drawing.Size(1008, 639);
this.tabControl1.TabIndex = 1; this.tabc.TabIndex = 1;
// //
// tabPage1 // tabP1
// //
this.tabPage1.Controls.Add(this.panel1); this.tabP1.Controls.Add(this.pnl);
this.tabPage1.Location = new System.Drawing.Point(4, 30); this.tabP1.Location = new System.Drawing.Point(4, 30);
this.tabPage1.Name = "tabPage1"; this.tabP1.Name = "tabP1";
this.tabPage1.Size = new System.Drawing.Size(1000, 605); this.tabP1.Size = new System.Drawing.Size(1000, 605);
this.tabPage1.TabIndex = 0; this.tabP1.TabIndex = 0;
this.tabPage1.Text = "信息"; this.tabP1.Text = "信息";
this.tabPage1.UseVisualStyleBackColor = true; this.tabP1.UseVisualStyleBackColor = true;
// //
// panel1 // pnl
// //
this.panel1.Controls.Add(this.groupBox1); this.pnl.Controls.Add(this.groupBox1);
this.panel1.Controls.Add(this.btn_releasestring); this.pnl.Controls.Add(this.btn_releasestring);
this.panel1.Controls.Add(this.cb_IgnoreSafecheck); this.pnl.Controls.Add(this.cb_IgnoreSafecheck);
this.panel1.Controls.Add(this.pictureBox2); this.pnl.Controls.Add(this.pictureBox2);
this.panel1.Controls.Add(this.cb_IgnoreGratingSignal); this.pnl.Controls.Add(this.cb_IgnoreGratingSignal);
this.panel1.Controls.Add(this.pictureBox1); this.pnl.Controls.Add(this.pictureBox1);
this.panel1.Controls.Add(this.cb_EnableBuzzer); this.pnl.Controls.Add(this.cb_EnableBuzzer);
this.panel1.Controls.Add(this.btn_IgnoreX09); this.pnl.Controls.Add(this.btn_IgnoreX09);
this.panel1.Controls.Add(this.btn_PauseBuzzer); this.pnl.Controls.Add(this.btn_PauseBuzzer);
this.panel1.Dock = System.Windows.Forms.DockStyle.Fill; this.pnl.Dock = System.Windows.Forms.DockStyle.Fill;
this.panel1.Location = new System.Drawing.Point(0, 0); this.pnl.Location = new System.Drawing.Point(0, 0);
this.panel1.Name = "panel1"; this.pnl.Name = "pnl";
this.panel1.Size = new System.Drawing.Size(1000, 605); this.pnl.Size = new System.Drawing.Size(1000, 605);
this.panel1.TabIndex = 273; this.pnl.TabIndex = 273;
// //
// groupBox1 // groupBox1
// //
...@@ -202,6 +238,7 @@ namespace TheMachine ...@@ -202,6 +238,7 @@ namespace TheMachine
this.btn_releasestring.Name = "btn_releasestring"; this.btn_releasestring.Name = "btn_releasestring";
this.btn_releasestring.Size = new System.Drawing.Size(201, 40); this.btn_releasestring.Size = new System.Drawing.Size(201, 40);
this.btn_releasestring.TabIndex = 272; this.btn_releasestring.TabIndex = 272;
this.btn_releasestring.Tag = "not";
this.btn_releasestring.Text = "安全释放料串"; this.btn_releasestring.Text = "安全释放料串";
this.btn_releasestring.UseVisualStyleBackColor = true; this.btn_releasestring.UseVisualStyleBackColor = true;
this.btn_releasestring.Click += new System.EventHandler(this.btn_releasestring_Click); this.btn_releasestring.Click += new System.EventHandler(this.btn_releasestring_Click);
...@@ -327,38 +364,6 @@ namespace TheMachine ...@@ -327,38 +364,6 @@ namespace TheMachine
this.btn_run.UseVisualStyleBackColor = true; this.btn_run.UseVisualStyleBackColor = true;
this.btn_run.Click += new System.EventHandler(this.btn_run_Click); this.btn_run.Click += new System.EventHandler(this.btn_run_Click);
// //
// 语言toolStripMenuItem
//
this.语言toolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.简体中文ToolStripMenuItem,
this.日本语ToolStripMenuItem,
this.englishToolStripMenuItem});
this.语言toolStripMenuItem.Font = new System.Drawing.Font("Microsoft YaHei UI", 12F);
this.语言toolStripMenuItem.Name = "语言toolStripMenuItem";
this.语言toolStripMenuItem.Size = new System.Drawing.Size(54, 25);
this.语言toolStripMenuItem.Text = "语言";
//
// 简体中文ToolStripMenuItem
//
this.简体中文ToolStripMenuItem.Name = "简体中文ToolStripMenuItem";
this.简体中文ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
this.简体中文ToolStripMenuItem.Text = "简体中文";
this.简体中文ToolStripMenuItem.Click += new System.EventHandler(this.简体中文ToolStripMenuItem_Click);
//
// 日本语ToolStripMenuItem
//
this.日本语ToolStripMenuItem.Name = "日本语ToolStripMenuItem";
this.日本语ToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
this.日本语ToolStripMenuItem.Text = "日本语";
this.日本语ToolStripMenuItem.Click += new System.EventHandler(this.日本语ToolStripMenuItem_Click);
//
// englishToolStripMenuItem
//
this.englishToolStripMenuItem.Name = "englishToolStripMenuItem";
this.englishToolStripMenuItem.Size = new System.Drawing.Size(180, 26);
this.englishToolStripMenuItem.Text = "English";
this.englishToolStripMenuItem.Click += new System.EventHandler(this.englishToolStripMenuItem_Click);
//
// Form1 // Form1
// //
this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F); this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
...@@ -368,7 +373,7 @@ namespace TheMachine ...@@ -368,7 +373,7 @@ namespace TheMachine
this.Controls.Add(this.listView1); this.Controls.Add(this.listView1);
this.Controls.Add(this.btn_stop); this.Controls.Add(this.btn_stop);
this.Controls.Add(this.btn_run); this.Controls.Add(this.btn_run);
this.Controls.Add(this.tabControl1); this.Controls.Add(this.tabc);
this.Controls.Add(this.menuStrip1); this.Controls.Add(this.menuStrip1);
this.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.MainMenuStrip = this.menuStrip1; this.MainMenuStrip = this.menuStrip1;
...@@ -379,10 +384,10 @@ namespace TheMachine ...@@ -379,10 +384,10 @@ namespace TheMachine
this.Shown += new System.EventHandler(this.Form1_Shown); this.Shown += new System.EventHandler(this.Form1_Shown);
this.menuStrip1.ResumeLayout(false); this.menuStrip1.ResumeLayout(false);
this.menuStrip1.PerformLayout(); this.menuStrip1.PerformLayout();
this.tabControl1.ResumeLayout(false); this.tabc.ResumeLayout(false);
this.tabPage1.ResumeLayout(false); this.tabP1.ResumeLayout(false);
this.panel1.ResumeLayout(false); this.pnl.ResumeLayout(false);
this.panel1.PerformLayout(); this.pnl.PerformLayout();
this.groupBox1.ResumeLayout(false); this.groupBox1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
...@@ -396,13 +401,13 @@ namespace TheMachine ...@@ -396,13 +401,13 @@ namespace TheMachine
private System.Windows.Forms.MenuStrip menuStrip1; private System.Windows.Forms.MenuStrip menuStrip1;
private System.Windows.Forms.ToolStripMenuItem 设备操作ToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem 设备操作ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem 退出ToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem 退出ToolStripMenuItem;
private System.Windows.Forms.TabControl tabControl1; private System.Windows.Forms.TabControl tabc;
private System.Windows.Forms.ToolStripMenuItem 启用调试模式ToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem 启用调试模式ToolStripMenuItem;
private System.Windows.Forms.ToolStripSeparator toolStripSeparator4; private System.Windows.Forms.ToolStripSeparator toolStripSeparator4;
private System.Windows.Forms.ListView listView1; private System.Windows.Forms.ListView listView1;
private System.Windows.Forms.Button btn_stop; private System.Windows.Forms.Button btn_stop;
private System.Windows.Forms.Button btn_run; private System.Windows.Forms.Button btn_run;
private System.Windows.Forms.TabPage tabPage1; private System.Windows.Forms.TabPage tabP1;
private System.Windows.Forms.ListView stateView; private System.Windows.Forms.ListView stateView;
private System.Windows.Forms.GroupBox groupBox1; private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.CheckBox cb_IgnoreSafecheck; private System.Windows.Forms.CheckBox cb_IgnoreSafecheck;
...@@ -416,7 +421,7 @@ namespace TheMachine ...@@ -416,7 +421,7 @@ namespace TheMachine
private System.Windows.Forms.PictureBox pictureBox1; private System.Windows.Forms.PictureBox pictureBox1;
private System.Windows.Forms.Button btn_IgnoreX09; private System.Windows.Forms.Button btn_IgnoreX09;
private System.Windows.Forms.Button btn_releasestring; private System.Windows.Forms.Button btn_releasestring;
private System.Windows.Forms.Panel panel1; private System.Windows.Forms.Panel pnl;
private System.Windows.Forms.ToolStripMenuItem 语言toolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem 语言toolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem 简体中文ToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem 简体中文ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem 日本语ToolStripMenuItem; private System.Windows.Forms.ToolStripMenuItem 日本语ToolStripMenuItem;
......
...@@ -24,10 +24,10 @@ namespace TheMachine ...@@ -24,10 +24,10 @@ namespace TheMachine
{ {
public Form1() public Form1()
{ {
crc.OpenResourceLog = true;
InitializeComponent(); InitializeComponent();
this.FormClosing += Form1_FormClosing; this.FormClosing += Form1_FormClosing;
this.Text = Config.Get(Setting_Init.App_Title) +" "+ Config.Get("CID"); this.Text = Config.Get(Setting_Init.App_Title) +" "+ Config.Get("CID");
crc.OpenResourceLog = true;
crc.GetLanguageEvent += Crc_GetLanguageEvent; crc.GetLanguageEvent += Crc_GetLanguageEvent;
crc.LanguageChangeEvent += Crc_LanguageChangeEvent; crc.LanguageChangeEvent += Crc_LanguageChangeEvent;
t1.Interval = 1000; t1.Interval = 1000;
...@@ -38,7 +38,10 @@ namespace TheMachine ...@@ -38,7 +38,10 @@ namespace TheMachine
private void Crc_LanguageChangeEvent(object sender, EventArgs e) private void Crc_LanguageChangeEvent(object sender, EventArgs e)
{ {
throw new NotImplementedException(); if (tabc.TabCount > tabpagecount)
addTablePage();
LanguageProcess();
} }
private string Crc_GetLanguageEvent() private string Crc_GetLanguageEvent()
...@@ -115,7 +118,7 @@ namespace TheMachine ...@@ -115,7 +118,7 @@ namespace TheMachine
AlarmBuzzer.BuzzerStateChange += AlarmBuzzer_BuzzerStateChange; AlarmBuzzer.BuzzerStateChange += AlarmBuzzer_BuzzerStateChange;
RobotManage.LoadFinishEvent += RobotManage_LoadFinishEvent; RobotManage.LoadFinishEvent += RobotManage_LoadFinishEvent;
if (!Config.Get("Device_DisableLogWindow",true)) if (!Config.Get("Device_DisableLogWindow",true))
AddForm("日志", lc); AddForm("tab_log", crc.GetString(L.tab_log, "日志"), lc);
RobotManage.UserPauseSet += RobotManage_UserPauseSet; RobotManage.UserPauseSet += RobotManage_UserPauseSet;
...@@ -126,14 +129,14 @@ namespace TheMachine ...@@ -126,14 +129,14 @@ namespace TheMachine
RobotManage.Init(); RobotManage.Init();
}); });
ListViewItem lvi = new ListViewItem(new string[] { "", DateTime.Now.ToString(), "设备加载中,请稍后..." }); ListViewItem lvi = new ListViewItem(new string[] { "", DateTime.Now.ToString(), crc.GetString(L.device_initializing, "设备加载中,请稍后...") });
lvi.ForeColor = Color.DarkGreen; lvi.ForeColor = Color.DarkGreen;
listView1.Items.Add(lvi); listView1.Items.Add(lvi);
//while (!loadtask.IsCompleted) { //while (!loadtask.IsCompleted) {
// Thread.Sleep(100); // Thread.Sleep(100);
// Application.DoEvents(); // Application.DoEvents();
//} //}
panel1.Enabled = false; pnl.Enabled = false;
} }
private void CameraA_camera_event(object sender, Bitmap e) private void CameraA_camera_event(object sender, Bitmap e)
...@@ -166,10 +169,11 @@ namespace TheMachine ...@@ -166,10 +169,11 @@ namespace TheMachine
} }
const int tabpagecount = 4; const int tabpagecount = 4;
void addTablePage() { void addTablePage() {
AddForm("IO调试", ioc); AddForm("tab_io",crc.GetString(L.tab_io,"IO调试"), ioc);
AddForm("伺服调试", ac); AddForm("tab_axis", crc.GetString(L.tab_axis, "伺服调试"), ac);
AddForm("库位调试", bd); AddForm("tab_store", crc.GetString(L.tab_store, "库位调试"), bd);
AddForm("相关设置", sc); AddForm("tab_setting", crc.GetString(L.tab_setting, "相关设置"), sc);
crc.LanguageProcess(this);
} }
private void T1_Tick(object sender, EventArgs e) private void T1_Tick(object sender, EventArgs e)
...@@ -199,32 +203,36 @@ namespace TheMachine ...@@ -199,32 +203,36 @@ namespace TheMachine
this.ResumeLayout(true); this.ResumeLayout(true);
} }
private void AddForm(string text, UserControl form) private void AddForm(string id, string text, UserControl form)
{
foreach (TabPage tp in tabc.TabPages)
{ {
//text = text.PadLeft(10, ' '); if (tp.Name == id)
{
tp.Text = text;
return;
}
}
TabPage lineTabPage = new TabPage(text); TabPage lineTabPage = new TabPage(text);
// lineTabPage.AutoScroll = true; lineTabPage.Name = id;
//lineTabPage.Tag = robot;
Panel linePan = new Panel(); Panel linePan = new Panel();
linePan.Dock = DockStyle.Fill; linePan.Dock = DockStyle.Fill;
linePan.AutoScroll = true; linePan.AutoScroll = true;
lineTabPage.Controls.Add(linePan); lineTabPage.Controls.Add(linePan);
//form.FormBorderStyle = FormBorderStyle.None;
//form.TopLevel = false;
linePan.Controls.Add(form); linePan.Controls.Add(form);
form.Dock = DockStyle.Fill; form.Dock = DockStyle.Fill;
linePan.Anchor = ((AnchorStyles)((AnchorStyles.Top | AnchorStyles.Right | AnchorStyles.Bottom | AnchorStyles.Left))); linePan.Anchor = ((AnchorStyles)((AnchorStyles.Top | AnchorStyles.Right | AnchorStyles.Bottom | AnchorStyles.Left)));
form.Anchor = ((AnchorStyles)((AnchorStyles.Top | AnchorStyles.Right | AnchorStyles.Bottom | AnchorStyles.Left))); form.Anchor = ((AnchorStyles)((AnchorStyles.Top | AnchorStyles.Right | AnchorStyles.Bottom | AnchorStyles.Left)));
form.Show(); form.Show();
//tabPageList.Add(lineTabPage); tabc.TabPages.Add(lineTabPage);
tabControl1.Controls.Add(lineTabPage);
} }
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 ? "启用配置模式" : "停用配置模式"; (sender as ToolStripMenuItem).Text = !RobotManage.IsConfigMode ? crc.GetString(L.enable_config_mode,"启用配置模式") : crc.GetString(L.disable_config_mode, "停用配置模式");
if (RobotManage.IsConfigMode) if (RobotManage.IsConfigMode)
...@@ -235,10 +243,10 @@ namespace TheMachine ...@@ -235,10 +243,10 @@ namespace TheMachine
} }
else else
{ {
var tc = tabControl1.TabPages.Count; var tc = tabc.TabPages.Count;
for (int i = 1; i <=tabpagecount; i++) for (int i = 1; i <=tabpagecount; i++)
{ {
tabControl1.TabPages[tc-i].Parent = null; tabc.TabPages[tc-i].Parent = null;
} }
} }
} }
...@@ -261,7 +269,7 @@ namespace TheMachine ...@@ -261,7 +269,7 @@ namespace TheMachine
return; return;
} }
启用调试模式ToolStripMenuItem.Enabled = true; 启用调试模式ToolStripMenuItem.Enabled = true;
panel1.Enabled = true; pnl.Enabled = true;
if (state) if (state)
{ {
btn_run.Enabled = true; btn_run.Enabled = true;
...@@ -334,7 +342,7 @@ namespace TheMachine ...@@ -334,7 +342,7 @@ namespace TheMachine
{ {
if (RobotManage.mainMachine.IOValue(IO_Type.SuddenStop_BTN).Equals(IO_VALUE.LOW)) if (RobotManage.mainMachine.IOValue(IO_Type.SuddenStop_BTN).Equals(IO_VALUE.LOW))
{ {
Msg.add("急停中,无法启动", MsgLevel.warning); Msg.add(crc.GetString(L.device_suddenstop_cant_start, "急停中,无法启动"), MsgLevel.warning);
MainMachine_ProcessMsgEvent(Msg.get()); MainMachine_ProcessMsgEvent(Msg.get());
return; return;
} }
...@@ -373,14 +381,14 @@ namespace TheMachine ...@@ -373,14 +381,14 @@ namespace TheMachine
if (e) if (e)
{ {
userpause = true; userpause = true;
(btn_run as Button).Text = "恢复运行"; (btn_run as Button).Text = crc.GetString(L.device_resume, "恢复运行");
(btn_run as Button).BackColor = Color.LightGreen; (btn_run as Button).BackColor = Color.LightGreen;
cb_IgnoreSafecheck.Enabled = true; cb_IgnoreSafecheck.Enabled = true;
} }
else else
{ {
userpause = false; userpause = false;
(btn_run as Button).Text = "暂停运行"; (btn_run as Button).Text = crc.GetString(L.device_pause, "暂停运行");
(btn_run as Button).BackColor = Color.Yellow; (btn_run as Button).BackColor = Color.Yellow;
cb_IgnoreSafecheck.Enabled = false; cb_IgnoreSafecheck.Enabled = false;
} }
...@@ -400,7 +408,7 @@ namespace TheMachine ...@@ -400,7 +408,7 @@ namespace TheMachine
userpause = false; userpause = false;
Task.Run(() => { RobotManage.Stop(); }); Task.Run(() => { RobotManage.Stop(); });
btn_stop.Enabled = false; btn_stop.Enabled = false;
btn_run.Text = "启动"; btn_run.Text = crc.GetString(L.start, "启动");
btn_run.BackColor = Color.Transparent; btn_run.BackColor = Color.Transparent;
cb_IgnoreSafecheck.Enabled = true; cb_IgnoreSafecheck.Enabled = true;
} }
...@@ -408,7 +416,7 @@ namespace TheMachine ...@@ -408,7 +416,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(L.device_isrunning_cant_exit, "机器尚在运行,不能退出,请先停止运行."));
} else { } else {
RobotManage.Stop(); RobotManage.Stop();
RobotManage.ShutDown(); RobotManage.ShutDown();
...@@ -495,12 +503,12 @@ namespace TheMachine ...@@ -495,12 +503,12 @@ namespace TheMachine
{ {
if (RobotManage.mainMachine.StringMoveInfo.MoveStep == MoveStep.Wait) if (RobotManage.mainMachine.StringMoveInfo.MoveStep == MoveStep.Wait)
{ {
MessageBox.Show("料串已是释放状态"); MessageBox.Show(crc.GetString(L.safty_releaseed_string, "料串已是释放状态"));
return; return;
} }
else if (RobotManage.mainMachine.StringMoveInfo.MoveStep>=MoveStep.StringOut_01) else if (RobotManage.mainMachine.StringMoveInfo.MoveStep>=MoveStep.StringOut_01)
{ {
MessageBox.Show("正在执行料串释放"); MessageBox.Show(crc.GetString(L.safty_releaseing_string, "正在执行料串释放"));
return; return;
} }
...@@ -514,7 +522,7 @@ namespace TheMachine ...@@ -514,7 +522,7 @@ namespace TheMachine
{ {
Invoke((EventHandler)delegate Invoke((EventHandler)delegate
{ {
(sender as Button).Text = $"料串等待释放中({timeout / 2})"; (sender as Button).Text = crc.GetString(L.safty_releaseing_string, $"正在执行料串释放")+$"({timeout / 2})";
}); });
} }
var step = RobotManage.mainMachine.StringMoveInfo.MoveStep; var step = RobotManage.mainMachine.StringMoveInfo.MoveStep;
...@@ -534,7 +542,7 @@ namespace TheMachine ...@@ -534,7 +542,7 @@ namespace TheMachine
Invoke((EventHandler)delegate Invoke((EventHandler)delegate
{ {
//btn_releaseleftshelf.BackColor = Color.Transparent; //btn_releaseleftshelf.BackColor = Color.Transparent;
(sender as Button).Text = "安全释放料串"; (sender as Button).Text = crc.GetString(L.safty_release_string, "安全释放料串");
}); });
}); });
} }
...@@ -570,12 +578,15 @@ namespace TheMachine ...@@ -570,12 +578,15 @@ namespace TheMachine
crc.LanguageProcess(this, this.GetType().Name); crc.LanguageProcess(this, this.GetType().Name);
crc.ProcessListItem(menuStrip1.Items, "menuStrip1"); crc.ProcessListItem(menuStrip1.Items, "menuStrip1");
listView1.Columns[1].Text = crc.GetString("table_datetime", "时间"); listView1.Columns[1].Text = crc.GetString(L.table_datetime, "时间");
listView1.Columns[2].Text = crc.GetString("table_info", "信息"); listView1.Columns[2].Text = crc.GetString(L.table_info, "信息");
stateView.Columns[1].Text = crc.GetString(L.table_module, "模块");
stateView.Columns[2].Text = crc.GetString(L.table_step, "步骤");
stateView.Columns[3].Text = crc.GetString(L.table_info, "信息");
stateView.Columns[1].Text = crc.GetString("table_module", "模块"); 启用调试模式ToolStripMenuItem.Text = !RobotManage.IsConfigMode ? crc.GetString(L.enable_config_mode, "启用配置模式") : crc.GetString(L.disable_config_mode, "停用配置模式");
stateView.Columns[2].Text = crc.GetString("table_step", "步骤"); btn_releasestring.Text = crc.GetString(L.safty_release_string, "安全释放料串");
stateView.Columns[3].Text = crc.GetString("table_info", "信息");
} }
private void 简体中文ToolStripMenuItem_Click(object sender, EventArgs e) private void 简体中文ToolStripMenuItem_Click(object sender, EventArgs e)
......
using DeviceLibrary; using DeviceLibrary;
using OnlineStore;
using OnlineStore.Common; using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary; using OnlineStore.LoadCSVLibrary;
using System; using System;
...@@ -59,7 +60,6 @@ namespace TheMachine ...@@ -59,7 +60,6 @@ namespace TheMachine
private void ioControl1_Load(object sender, EventArgs e) private void ioControl1_Load(object sender, EventArgs e)
{ {
} }
} }
} }
...@@ -36,14 +36,18 @@ namespace TheMachine ...@@ -36,14 +36,18 @@ namespace TheMachine
this.button_positiontool = new System.Windows.Forms.Button(); this.button_positiontool = new System.Windows.Forms.Button();
this.lbl_hmdstate = new System.Windows.Forms.Label(); this.lbl_hmdstate = new System.Windows.Forms.Label();
this.timer1 = new System.Windows.Forms.Timer(this.components); this.timer1 = new System.Windows.Forms.Timer(this.components);
this.tp = new System.Windows.Forms.TableLayoutPanel();
this.tp.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
// //
// chbAutoRun // chbAutoRun
// //
this.chbAutoRun.AutoSize = true; this.chbAutoRun.AutoSize = true;
this.chbAutoRun.Location = new System.Drawing.Point(44, 186); this.tp.SetColumnSpan(this.chbAutoRun, 2);
this.chbAutoRun.Location = new System.Drawing.Point(10, 130);
this.chbAutoRun.Margin = new System.Windows.Forms.Padding(10);
this.chbAutoRun.Name = "chbAutoRun"; this.chbAutoRun.Name = "chbAutoRun";
this.chbAutoRun.Size = new System.Drawing.Size(101, 19); this.chbAutoRun.Size = new System.Drawing.Size(84, 16);
this.chbAutoRun.TabIndex = 1; this.chbAutoRun.TabIndex = 1;
this.chbAutoRun.Text = "开机自启动"; this.chbAutoRun.Text = "开机自启动";
this.chbAutoRun.UseVisualStyleBackColor = true; this.chbAutoRun.UseVisualStyleBackColor = true;
...@@ -52,27 +56,32 @@ namespace TheMachine ...@@ -52,27 +56,32 @@ namespace TheMachine
// //
this.cb_tempsensorport.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.cb_tempsensorport.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cb_tempsensorport.FormattingEnabled = true; this.cb_tempsensorport.FormattingEnabled = true;
this.cb_tempsensorport.Location = new System.Drawing.Point(157, 23); this.cb_tempsensorport.Location = new System.Drawing.Point(139, 6);
this.cb_tempsensorport.Margin = new System.Windows.Forms.Padding(6);
this.cb_tempsensorport.Name = "cb_tempsensorport"; this.cb_tempsensorport.Name = "cb_tempsensorport";
this.cb_tempsensorport.Size = new System.Drawing.Size(121, 23); this.cb_tempsensorport.Size = new System.Drawing.Size(121, 20);
this.cb_tempsensorport.TabIndex = 2; this.cb_tempsensorport.TabIndex = 2;
this.cb_tempsensorport.SelectedIndexChanged += new System.EventHandler(this.cb_tempsensorport_SelectedIndexChanged); this.cb_tempsensorport.SelectedIndexChanged += new System.EventHandler(this.cb_tempsensorport_SelectedIndexChanged);
// //
// label_tempsensor // label_tempsensor
// //
this.label_tempsensor.AutoSize = true;
this.label_tempsensor.Cursor = System.Windows.Forms.Cursors.Default; this.label_tempsensor.Cursor = System.Windows.Forms.Cursors.Default;
this.label_tempsensor.Location = new System.Drawing.Point(17, 26); this.label_tempsensor.Location = new System.Drawing.Point(10, 10);
this.label_tempsensor.Margin = new System.Windows.Forms.Padding(10);
this.label_tempsensor.Name = "label_tempsensor"; this.label_tempsensor.Name = "label_tempsensor";
this.label_tempsensor.Size = new System.Drawing.Size(134, 23); this.label_tempsensor.Size = new System.Drawing.Size(107, 12);
this.label_tempsensor.TabIndex = 3; this.label_tempsensor.TabIndex = 3;
this.label_tempsensor.Text = "温湿度控制器端口:"; this.label_tempsensor.Text = "温湿度控制器端口:";
this.label_tempsensor.TextAlign = System.Drawing.ContentAlignment.TopRight; this.label_tempsensor.TextAlign = System.Drawing.ContentAlignment.TopRight;
// //
// button_positiontool // button_positiontool
// //
this.button_positiontool.Location = new System.Drawing.Point(44, 129); this.tp.SetColumnSpan(this.button_positiontool, 2);
this.button_positiontool.Location = new System.Drawing.Point(10, 74);
this.button_positiontool.Margin = new System.Windows.Forms.Padding(10);
this.button_positiontool.Name = "button_positiontool"; this.button_positiontool.Name = "button_positiontool";
this.button_positiontool.Size = new System.Drawing.Size(181, 38); this.button_positiontool.Size = new System.Drawing.Size(181, 36);
this.button_positiontool.TabIndex = 4; this.button_positiontool.TabIndex = 4;
this.button_positiontool.Text = "库位定位辅助工具"; this.button_positiontool.Text = "库位定位辅助工具";
this.button_positiontool.UseVisualStyleBackColor = true; this.button_positiontool.UseVisualStyleBackColor = true;
...@@ -81,10 +90,13 @@ namespace TheMachine ...@@ -81,10 +90,13 @@ namespace TheMachine
// lbl_hmdstate // lbl_hmdstate
// //
this.lbl_hmdstate.AutoSize = true; this.lbl_hmdstate.AutoSize = true;
this.lbl_hmdstate.Location = new System.Drawing.Point(41, 49); this.tp.SetColumnSpan(this.lbl_hmdstate, 2);
this.lbl_hmdstate.Location = new System.Drawing.Point(10, 42);
this.lbl_hmdstate.Margin = new System.Windows.Forms.Padding(10);
this.lbl_hmdstate.Name = "lbl_hmdstate"; this.lbl_hmdstate.Name = "lbl_hmdstate";
this.lbl_hmdstate.Size = new System.Drawing.Size(67, 15); this.lbl_hmdstate.Size = new System.Drawing.Size(53, 12);
this.lbl_hmdstate.TabIndex = 5; this.lbl_hmdstate.TabIndex = 5;
this.lbl_hmdstate.Tag = "not";
this.lbl_hmdstate.Text = "当前状态"; this.lbl_hmdstate.Text = "当前状态";
// //
// timer1 // timer1
...@@ -92,17 +104,40 @@ namespace TheMachine ...@@ -92,17 +104,40 @@ namespace TheMachine
this.timer1.Enabled = true; this.timer1.Enabled = true;
this.timer1.Tick += new System.EventHandler(this.timer1_Tick); this.timer1.Tick += new System.EventHandler(this.timer1_Tick);
// //
// tp
//
this.tp.AutoSize = true;
this.tp.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
this.tp.ColumnCount = 2;
this.tp.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tp.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.tp.Controls.Add(this.label_tempsensor, 0, 0);
this.tp.Controls.Add(this.cb_tempsensorport, 1, 0);
this.tp.Controls.Add(this.chbAutoRun, 0, 6);
this.tp.Controls.Add(this.button_positiontool, 0, 5);
this.tp.Controls.Add(this.lbl_hmdstate, 0, 4);
this.tp.Location = new System.Drawing.Point(3, 3);
this.tp.Name = "tp";
this.tp.RowCount = 7;
this.tp.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tp.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tp.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tp.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tp.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tp.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tp.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tp.Size = new System.Drawing.Size(266, 156);
this.tp.TabIndex = 6;
//
// SettingControl // SettingControl
// //
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
this.Controls.Add(this.lbl_hmdstate); this.Controls.Add(this.tp);
this.Controls.Add(this.button_positiontool);
this.Controls.Add(this.label_tempsensor);
this.Controls.Add(this.cb_tempsensorport);
this.Controls.Add(this.chbAutoRun);
this.Name = "SettingControl"; this.Name = "SettingControl";
this.Size = new System.Drawing.Size(1024, 740); this.Size = new System.Drawing.Size(1024, 740);
this.Load += new System.EventHandler(this.SettingControl_Load); this.Load += new System.EventHandler(this.SettingControl_Load);
this.tp.ResumeLayout(false);
this.tp.PerformLayout();
this.ResumeLayout(false); this.ResumeLayout(false);
this.PerformLayout(); this.PerformLayout();
...@@ -115,5 +150,6 @@ namespace TheMachine ...@@ -115,5 +150,6 @@ namespace TheMachine
private System.Windows.Forms.Button button_positiontool; private System.Windows.Forms.Button button_positiontool;
private System.Windows.Forms.Label lbl_hmdstate; private System.Windows.Forms.Label lbl_hmdstate;
private System.Windows.Forms.Timer timer1; private System.Windows.Forms.Timer timer1;
private System.Windows.Forms.TableLayoutPanel tp;
} }
} }
using CodeLibrary; using CodeLibrary;
using ConfigHelper; using ConfigHelper;
using DeviceLibrary; using DeviceLibrary;
using OnlineStore;
using OnlineStore.ACSingleStore; using OnlineStore.ACSingleStore;
using OnlineStore.Common; using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary; using OnlineStore.LoadCSVLibrary;
...@@ -103,14 +104,14 @@ namespace TheMachine ...@@ -103,14 +104,14 @@ namespace TheMachine
if (!Visible) if (!Visible)
return; return;
lbl_hmdstate.Text = "当前状态:"; lbl_hmdstate.Text = crc.GetString(L.current_status, "当前状态:");
if (!HumitureController.IsRun) if (!HumitureController.IsRun)
{ {
lbl_hmdstate.Text += "未成功连接"; lbl_hmdstate.Text += crc.GetString(L.connect_fail, "未成功连接");
return; return;
} }
var t = HumitureController.LastData; var t = HumitureController.LastData;
lbl_hmdstate.Text += $"温度:{t.Temperate}℃, 湿度:{t.Humidity}%"; lbl_hmdstate.Text += $"{crc.GetString(L.humidity, "温度")}:{t.Temperate}℃, {crc.GetString(L.humidity, "湿度")}:{t.Humidity}%";
} }
} }
} }
...@@ -39,7 +39,7 @@ namespace TheMachine ...@@ -39,7 +39,7 @@ namespace TheMachine
private void Crc_LanguageChangeEvent(object sender, EventArgs e) private void Crc_LanguageChangeEvent(object sender, EventArgs e)
{ {
//LoadPos(_aCStorePosition); LoadPos(_aCStorePosition);
} }
private ACStorePosition _aCStorePosition; private ACStorePosition _aCStorePosition;
public void LoadPos(ACStorePosition aCStorePosition) public void LoadPos(ACStorePosition aCStorePosition)
......
...@@ -117,6 +117,7 @@ namespace TheMachine ...@@ -117,6 +117,7 @@ namespace TheMachine
this.label_size.Name = "label_size"; this.label_size.Name = "label_size";
this.label_size.Size = new System.Drawing.Size(57, 10); this.label_size.Size = new System.Drawing.Size(57, 10);
this.label_size.TabIndex = 224; this.label_size.TabIndex = 224;
this.label_size.Tag = "not";
// //
// cmbPosition // cmbPosition
// //
...@@ -124,6 +125,7 @@ namespace TheMachine ...@@ -124,6 +125,7 @@ namespace TheMachine
this.cmbPosition.Name = "cmbPosition"; this.cmbPosition.Name = "cmbPosition";
this.cmbPosition.Size = new System.Drawing.Size(104, 11); this.cmbPosition.Size = new System.Drawing.Size(104, 11);
this.cmbPosition.TabIndex = 224; this.cmbPosition.TabIndex = 224;
this.cmbPosition.Tag = "not";
// //
// timer1 // timer1
// //
...@@ -153,7 +155,7 @@ namespace TheMachine ...@@ -153,7 +155,7 @@ namespace TheMachine
this.dataGridView1.ShowCellToolTips = false; this.dataGridView1.ShowCellToolTips = false;
this.dataGridView1.ShowEditingIcon = false; this.dataGridView1.ShowEditingIcon = false;
this.dataGridView1.ShowRowErrors = false; this.dataGridView1.ShowRowErrors = false;
this.dataGridView1.Size = new System.Drawing.Size(785, 250); this.dataGridView1.Size = new System.Drawing.Size(981, 250);
this.dataGridView1.TabIndex = 103; this.dataGridView1.TabIndex = 103;
this.dataGridView1.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellContentClick); this.dataGridView1.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView1_CellContentClick);
this.dataGridView1.CellMouseDown += new System.Windows.Forms.DataGridViewCellMouseEventHandler(this.dataGridView1_CellMouseDown); this.dataGridView1.CellMouseDown += new System.Windows.Forms.DataGridViewCellMouseEventHandler(this.dataGridView1_CellMouseDown);
...@@ -164,6 +166,7 @@ namespace TheMachine ...@@ -164,6 +166,7 @@ namespace TheMachine
this.label_verify.Name = "label_verify"; this.label_verify.Name = "label_verify";
this.label_verify.Size = new System.Drawing.Size(104, 11); this.label_verify.Size = new System.Drawing.Size(104, 11);
this.label_verify.TabIndex = 224; this.label_verify.TabIndex = 224;
this.label_verify.Tag = "not";
this.label_verify.TextAlign = System.Drawing.ContentAlignment.TopRight; this.label_verify.TextAlign = System.Drawing.ContentAlignment.TopRight;
// //
// storePosControl1 // storePosControl1
...@@ -175,7 +178,7 @@ namespace TheMachine ...@@ -175,7 +178,7 @@ namespace TheMachine
this.storePosControl1.Name = "storePosControl1"; this.storePosControl1.Name = "storePosControl1";
this.storePosControl1.Size = new System.Drawing.Size(503, 210); this.storePosControl1.Size = new System.Drawing.Size(503, 210);
this.storePosControl1.TabIndex = 225; this.storePosControl1.TabIndex = 225;
this.storePosControl1.Tag = "not"; this.storePosControl1.Tag = "";
// //
// uc_boxdebug // uc_boxdebug
// //
......
using DeviceLibrary; using DeviceLibrary;
using log4net; using log4net;
using OnlineStore;
using OnlineStore.Common; using OnlineStore.Common;
using OnlineStore.DeviceLibrary; using OnlineStore.DeviceLibrary;
using OnlineStore.LoadCSVLibrary; using OnlineStore.LoadCSVLibrary;
...@@ -320,14 +321,14 @@ namespace TheMachine ...@@ -320,14 +321,14 @@ namespace TheMachine
string selectPositionNum = cmbPosition.Text; string selectPositionNum = cmbPosition.Text;
JobInfo jobInfo = new JobInfo("IN_TEST", selectPositionNum); JobInfo jobInfo = new JobInfo("IN_TEST", selectPositionNum);
if (!RobotManage.mainMachine.StartInStore(jobInfo)) { if (!RobotManage.mainMachine.StartInStore(jobInfo)) {
MessageBox.Show("料盘没有到位,无法手动入库"); MessageBox.Show(crc.GetString(L.reel_not_onposition_cant_manual_in, "料盘没有到位,无法手动入库"));
return; return;
} }
LogUtil.info($"手动入库:{selectPositionNum}"); LogUtil.info($"手动入库:{selectPositionNum}");
} }
else else
{ {
MessageBox.Show("请先启动料仓!"); MessageBox.Show(crc.GetString(L.start_device_first,"请先启动料仓!"));
} }
} }
...@@ -343,12 +344,12 @@ namespace TheMachine ...@@ -343,12 +344,12 @@ namespace TheMachine
} }
else else
{ {
MessageBox.Show("料仓正在出入库中,无法手动出库"); MessageBox.Show(crc.GetString(L.store_busy_cant_manual_out, "料仓正在出入库中,无法手动出库"));
} }
} }
else else
{ {
MessageBox.Show("请先启动料仓!"); MessageBox.Show(crc.GetString(L.start_device_first, "请先启动料仓!"));
} }
} }
...@@ -377,13 +378,13 @@ namespace TheMachine ...@@ -377,13 +378,13 @@ namespace TheMachine
{ {
btnOutStore.Enabled = false; btnOutStore.Enabled = false;
btnInStore.Enabled = false; btnInStore.Enabled = false;
btn_autoinout.Text = "停止自动库位测试"; btn_autoinout.Text = crc.GetString(L.stop_auto_test, "停止自动库位测试");
} }
else else
{ {
btnOutStore.Enabled = true; btnOutStore.Enabled = true;
btnInStore.Enabled = true; btnInStore.Enabled = true;
btn_autoinout.Text = "自动库位测试"; btn_autoinout.Text = crc.GetString(L.start_auto_test, "自动库位测试");
} }
} }
private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e) private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
...@@ -419,13 +420,13 @@ namespace TheMachine ...@@ -419,13 +420,13 @@ namespace TheMachine
if (RobotManage.mainMachine.AutoInOutTest) if (RobotManage.mainMachine.AutoInOutTest)
{ {
RobotManage.mainMachine.StopAutoInOutTest(); RobotManage.mainMachine.StopAutoInOutTest();
MessageBox.Show("自动出入库过程会再料盘送至出口后自动停止"); MessageBox.Show(crc.GetString(L.autotest_msg_01, "自动出入库过程会再料盘送至出口后自动停止."));
return; return;
} }
if (RobotManage.mainMachine.runStatus == RunStatus.Running) if (RobotManage.mainMachine.runStatus == RunStatus.Running)
{ {
DialogResult res = MessageBox.Show("确定开始自动库位测试?\n请确保料仓库位全部为空.", "提示", MessageBoxButtons.YesNo); DialogResult res = MessageBox.Show(crc.GetString(L.autotest_msg_02, "确定开始自动库位测试?\n请确保料仓库位全部为空."), crc.GetString(L.tips, "提示"), MessageBoxButtons.YesNo);
if (res == DialogResult.No) if (res == DialogResult.No)
return; return;
int posindex = RobotManage.PositionNumList.IndexOf(cmbPosition.Text); int posindex = RobotManage.PositionNumList.IndexOf(cmbPosition.Text);
...@@ -434,11 +435,11 @@ namespace TheMachine ...@@ -434,11 +435,11 @@ namespace TheMachine
MessageBox.Show(errmsg); MessageBox.Show(errmsg);
return; return;
} }
(sender as Button).Text = "停止自动库位测试"; (sender as Button).Text = crc.GetString(L.stop_inout_test, "停止自动库位测试!");
} }
else else
{ {
MessageBox.Show("请先启动料仓!"); MessageBox.Show(crc.GetString(L.start_device_first, "请先启动料仓!"));
} }
} }
......
...@@ -115,6 +115,7 @@ ...@@ -115,6 +115,7 @@
this.txtLOffset.Name = "txtLOffset"; this.txtLOffset.Name = "txtLOffset";
this.txtLOffset.Size = new System.Drawing.Size(121, 26); this.txtLOffset.Size = new System.Drawing.Size(121, 26);
this.txtLOffset.TabIndex = 283; this.txtLOffset.TabIndex = 283;
this.txtLOffset.Tag = "not";
this.txtLOffset.Text = "-200"; this.txtLOffset.Text = "-200";
// //
// label5 // label5
...@@ -135,6 +136,7 @@ ...@@ -135,6 +136,7 @@
this.txtHOffset.Name = "txtHOffset"; this.txtHOffset.Name = "txtHOffset";
this.txtHOffset.Size = new System.Drawing.Size(121, 26); this.txtHOffset.Size = new System.Drawing.Size(121, 26);
this.txtHOffset.TabIndex = 281; this.txtHOffset.TabIndex = 281;
this.txtHOffset.Tag = "not";
this.txtHOffset.Text = "200"; this.txtHOffset.Text = "200";
// //
// label4 // label4
...@@ -166,6 +168,7 @@ ...@@ -166,6 +168,7 @@
this.txtSpeed.Name = "txtSpeed"; this.txtSpeed.Name = "txtSpeed";
this.txtSpeed.Size = new System.Drawing.Size(121, 26); this.txtSpeed.Size = new System.Drawing.Size(121, 26);
this.txtSpeed.TabIndex = 83; this.txtSpeed.TabIndex = 83;
this.txtSpeed.Tag = "not";
this.txtSpeed.Text = "20"; this.txtSpeed.Text = "20";
// //
// label8 // label8
...@@ -186,6 +189,7 @@ ...@@ -186,6 +189,7 @@
this.txtFileName.Name = "txtFileName"; this.txtFileName.Name = "txtFileName";
this.txtFileName.Size = new System.Drawing.Size(164, 26); this.txtFileName.Size = new System.Drawing.Size(164, 26);
this.txtFileName.TabIndex = 278; this.txtFileName.TabIndex = 278;
this.txtFileName.Tag = "not";
this.txtFileName.Text = "position.csv"; this.txtFileName.Text = "position.csv";
// //
// ioStatusControl1 // ioStatusControl1
...@@ -238,6 +242,7 @@ ...@@ -238,6 +242,7 @@
this.txtPosition.Name = "txtPosition"; this.txtPosition.Name = "txtPosition";
this.txtPosition.Size = new System.Drawing.Size(121, 26); this.txtPosition.Size = new System.Drawing.Size(121, 26);
this.txtPosition.TabIndex = 89; this.txtPosition.TabIndex = 89;
this.txtPosition.Tag = "not";
this.txtPosition.Text = "5000"; this.txtPosition.Text = "5000";
// //
// txtActualPosition // txtActualPosition
...@@ -249,6 +254,7 @@ ...@@ -249,6 +254,7 @@
this.txtActualPosition.Name = "txtActualPosition"; this.txtActualPosition.Name = "txtActualPosition";
this.txtActualPosition.Size = new System.Drawing.Size(121, 26); this.txtActualPosition.Size = new System.Drawing.Size(121, 26);
this.txtActualPosition.TabIndex = 270; this.txtActualPosition.TabIndex = 270;
this.txtActualPosition.Tag = "not";
// //
// label13 // label13
// //
...@@ -337,6 +343,7 @@ ...@@ -337,6 +343,7 @@
this.txtIOIndex.Name = "txtIOIndex"; this.txtIOIndex.Name = "txtIOIndex";
this.txtIOIndex.Size = new System.Drawing.Size(164, 26); this.txtIOIndex.Size = new System.Drawing.Size(164, 26);
this.txtIOIndex.TabIndex = 275; this.txtIOIndex.TabIndex = 275;
this.txtIOIndex.Tag = "not";
this.txtIOIndex.Text = "1"; this.txtIOIndex.Text = "1";
// //
// label2 // label2
...@@ -381,6 +388,7 @@ ...@@ -381,6 +388,7 @@
this.logBox.Name = "logBox"; this.logBox.Name = "logBox";
this.logBox.Size = new System.Drawing.Size(510, 642); this.logBox.Size = new System.Drawing.Size(510, 642);
this.logBox.TabIndex = 105; this.logBox.TabIndex = 105;
this.logBox.Tag = "not";
this.logBox.Text = ""; this.logBox.Text = "";
// //
// timer1 // timer1
......
 using DeviceLibrary;
using DeviceLibrary;
using OnlineStore.Common; using OnlineStore.Common;
using OnlineStore.DeviceLibrary; using OnlineStore.DeviceLibrary;
using OnlineStore.LoadCSVLibrary; using OnlineStore.LoadCSVLibrary;
...@@ -32,7 +31,7 @@ namespace OnlineStore.ACSingleStore ...@@ -32,7 +31,7 @@ namespace OnlineStore.ACSingleStore
InitializeComponent(); InitializeComponent();
showLogProDelegate = new ShowLogProDelegate(ShowLogPro); showLogProDelegate = new ShowLogProDelegate(ShowLogPro);
LogUtil.ShowLog += LogUtil_ShowLog; LogUtil.ShowLog += LogUtil_ShowLog;
this.Shown += FrmPositionTool_Shown;
this.UpDown_Axis = UpDown_Axis; this.UpDown_Axis = UpDown_Axis;
this.iotype = iotype; this.iotype = iotype;
PortName = UpDown_Axis.Config.DeviceName; PortName = UpDown_Axis.Config.DeviceName;
...@@ -45,22 +44,27 @@ namespace OnlineStore.ACSingleStore ...@@ -45,22 +44,27 @@ namespace OnlineStore.ACSingleStore
FrmPositionTool.CheckForIllegalCrossThreadCalls = false; FrmPositionTool.CheckForIllegalCrossThreadCalls = false;
} }
private void FrmPositionTool_Shown(object sender, EventArgs e)
{
crc.LanguageProcess(this);
}
private void Form1_Load(object sender, EventArgs e) private void Form1_Load(object sender, EventArgs e)
{ {
CheckForIllegalCrossThreadCalls = false; CheckForIllegalCrossThreadCalls = false;
txtIOIndex.Text = iotype.ToString(); txtIOIndex.Text = iotype.ToString();
ConfigHelper.Config.PropertyBind<int>("PositionTool_HOffset", txtHOffset, "Text", "TextChanged"); ConfigHelper.Config.PropertyBind<uint>("PositionTool_HOffset", txtHOffset, "Text", "TextChanged");
ConfigHelper.Config.PropertyBind<int>("PositionTool_LOffset", txtLOffset, "Text", "TextChanged"); ConfigHelper.Config.PropertyBind<uint>("PositionTool_LOffset", txtLOffset, "Text", "TextChanged");
ConfigHelper.Config.PropertyBind<int>("PositionTool_Target", txtPosition, "Text", "TextChanged"); ConfigHelper.Config.PropertyBind<uint>("PositionTool_Target", txtPosition, "Text", "TextChanged");
ConfigHelper.Config.PropertyBind<int>("PositionTool_Speed", txtSpeed, "Text", "TextChanged"); ConfigHelper.Config.PropertyBind<uint>("PositionTool_Speed", txtSpeed, "Text", "TextChanged");
//判断伺服是否已经打开 //判断伺服是否已经打开
bool isOn = UpDown_Axis.IsServeoOn; bool isOn = UpDown_Axis.IsServeoOn;
formStatus(isOn); formStatus(isOn);
if (isOn) if (isOn)
timer1.Start(); timer1.Start();
ioStatusControl1.IOName = "检测信号"; ioStatusControl1.IOName = crc.GetString(L.detect_signal, "检测信号");
} }
delegate void ShowLogProDelegate(string msg, Color color); delegate void ShowLogProDelegate(string msg, Color color);
...@@ -291,7 +295,7 @@ namespace OnlineStore.ACSingleStore ...@@ -291,7 +295,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(L.FrmPositionTool_serv_state, "伺服状态")}:{(servisop ? crc.GetString(L.FrmPositionTool_enable, "已使能") : crc.GetString(L.FrmPositionTool_disable, "未使能"))}, {crc.GetString(L.FrmPositionTool_homests, "原点状态")}:{(homests == 3 ? crc.GetString(L.FrmPositionTool_finish, "已完成") : crc.GetString(L.FrmPositionTool_unfinish, "未完成"))}, {crc.GetString(L.FrmPositionTool_busysts, "忙碌状态")}:{(moveS == 1 ? crc.GetString(L.FrmPositionTool_busying, "忙碌中") : crc.GetString(L.free, "空闲中"))}";
ioStatusControl1.IOValue = (int)GetSingleValue(); ioStatusControl1.IOValue = (int)GetSingleValue();
ioStatusControl1.ShowData(); ioStatusControl1.ShowData();
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!