Commit 835ded5d 张东亮

Merge branch 'MIMO_PLUS_NV' of http://106.15.194.121:8083/liutao/1069_MIMO_PlUS into MIMO_PLUS_NV

2 个父辈 e373bcae 7efca343
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="ConfigHelper"> <Reference Include="ConfigHelper">
<HintPath>..\..\..\..\..\SharedRefDll\Neotel\DL.Common\Debug\net462\ConfigHelper.dll</HintPath> <HintPath>..\TheMachineNView\bin\Debug\ConfigHelper.dll</HintPath>
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.Core" /> <Reference Include="System.Core" />
......
...@@ -41,6 +41,7 @@ namespace OnlineStore ...@@ -41,6 +41,7 @@ namespace OnlineStore
var lngjson = JsonHelper.SerializeObject(LangMap); var lngjson = JsonHelper.SerializeObject(LangMap);
Task.Run(() => { Task.Run(() => {
return;
try try
{ {
Task.Delay(10 * 1000).Wait(); Task.Delay(10 * 1000).Wait();
...@@ -290,6 +291,8 @@ namespace OnlineStore ...@@ -290,6 +291,8 @@ namespace OnlineStore
private static void PreControlLanaguage(Control partentControl, string className) private static void PreControlLanaguage(Control partentControl, string className)
{ {
string newStr = ""; 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(""))
...@@ -300,17 +303,25 @@ namespace OnlineStore ...@@ -300,17 +303,25 @@ namespace OnlineStore
{ {
string txt = ""; string txt = "";
bool haslang = false; bool haslang = false;
if (con.Tag != null && con.Tag.ToString() == "not") if (con.Tag != null && con.Tag.ToString() == "not")
{ {
continue; continue;
} }
if (Con_GetTxt(con, out txt)) if (Con_GetTxt(con, out txt))
{ {
newStr = GetString(GetTextIdStr(className, con.Name), txt); newStr = GetString(GetTextIdStr(className, con.Name), txt);
if (!newStr.Equals("")) if (!newStr.Equals(""))
{ {
Con_SetTxt(con, newStr.Replace("\\n", "\n")); Con_SetTxt(con, newStr.Replace("\\n", "\n"));
//haslang = true; //haslang = true;
} }
...@@ -322,7 +333,12 @@ namespace OnlineStore ...@@ -322,7 +333,12 @@ namespace OnlineStore
} }
if (con.Controls.Count > 0 && !haslang) if (con.Controls.Count > 0 && !haslang)
{ {
PreControlLanaguage(con, className+"_"+ con.Name); //kmon
PreControlLanaguage(con, className + "_" + con.Name);
} }
//Console.WriteLine(con is IList<Component>); //Console.WriteLine(con is IList<Component>);
//Console.WriteLine(con is IList<Component>); //Console.WriteLine(con is IList<Component>);
......
...@@ -259,6 +259,11 @@ namespace OnlineStore.Common ...@@ -259,6 +259,11 @@ namespace OnlineStore.Common
[MyConfigComment("盘点_料盘Y坐标")] [MyConfigComment("盘点_料盘Y坐标")]
public static MyConfig<int> Device_SelfAudit_ReelY = 1; public static MyConfig<int> Device_SelfAudit_ReelY = 1;
//夹爪类型配置
//kmon
//2025-7-1
[MyConfigComment("夹爪类型")]
public static MyConfig<Claw_Type_Mode> Device_Claw_Type_Mode = Claw_Type_Mode.SingleoIn_Claw;
...@@ -268,4 +273,14 @@ namespace OnlineStore.Common ...@@ -268,4 +273,14 @@ namespace OnlineStore.Common
SingleIoIn_SingleIoOut = 0, SingleIoIn_SingleIoOut = 0,
SingleIoIn_DoubltIoOut = 1 SingleIoIn_DoubltIoOut = 1
} }
//夹爪类型枚举
//kmon
//2025-7-1
public enum Claw_Type_Mode {
//吸盘
SingleoIn_Sucker=0,
//夹爪
SingleoIn_Claw=1
}
} }
using HuichuanLibrary; using HuichuanLibrary;
using OnlineStore; using OnlineStore;
using OnlineStore.Common; using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary; using OnlineStore.LoadCSVLibrary;
...@@ -53,7 +53,7 @@ namespace DeviceLibrary ...@@ -53,7 +53,7 @@ namespace DeviceLibrary
if (AxisManager.GetAlarmStatus(portName, slvAddr) != 0) if (AxisManager.GetAlarmStatus(portName, slvAddr) != 0)
{ {
AxisManager.AlarmClear(portName, slvAddr); AxisManager.AlarmClear(portName, slvAddr);
Msg += "...尝试清除报警第" + j + "次"; Msg += crc.GetString("Res0006.5b851e06","...尝试清除报警第") + j + crc.GetString("Res0007.7229ecc6","次");
Thread.Sleep(500); Thread.Sleep(500);
continue; continue;
} }
...@@ -63,11 +63,11 @@ namespace DeviceLibrary ...@@ -63,11 +63,11 @@ namespace DeviceLibrary
Thread.Sleep(50); Thread.Sleep(50);
if (AxisManager.IsServeoOn(portName, slvAddr)) if (AxisManager.IsServeoOn(portName, slvAddr))
{ {
Msg += "...尝试使能成功"; Msg += crc.GetString("Res0018.975ecef5","...尝试使能成功");
return true; return true;
} }
else else
Msg += "...尝试使能失败"; Msg += crc.GetString("Res0019.ebec6459","...尝试使能失败");
Thread.Sleep(2000); Thread.Sleep(2000);
Msg += "\r\n"; Msg += "\r\n";
...@@ -104,7 +104,7 @@ namespace DeviceLibrary ...@@ -104,7 +104,7 @@ namespace DeviceLibrary
else else
{ {
AxisManager.ServoOff(portName, slvAddr); AxisManager.ServoOff(portName, slvAddr);
msg = "打开轴" + Config.Explain + "失败 "; msg = crc.GetString("Res0021.2bf5c941","打开轴") + Config.Explain + crc.GetString("Res0022.33d2a704","失败 ");
LogUtil.info(AxisName + msg); LogUtil.info(AxisName + msg);
return false; return false;
} }
...@@ -214,7 +214,7 @@ namespace DeviceLibrary ...@@ -214,7 +214,7 @@ namespace DeviceLibrary
int isAlarm = AxisManager.GetAlarmStatus(deviceName, axisNo); int isAlarm = AxisManager.GetAlarmStatus(deviceName, axisNo);
if (isAlarm.Equals(1)) if (isAlarm.Equals(1))
{ {
clearMsg = "清理报警,"; clearMsg = crc.GetString("Res0023.cbd5d752","清理报警,");
AxisManager.AlarmClear(deviceName, axisNo); AxisManager.AlarmClear(deviceName, axisNo);
Thread.Sleep(200); Thread.Sleep(200);
AxisManager.ServoOn(deviceName, axisNo); AxisManager.ServoOn(deviceName, axisNo);
...@@ -551,4 +551,4 @@ namespace DeviceLibrary ...@@ -551,4 +551,4 @@ namespace DeviceLibrary
} }
} }
\ No newline at end of file \ No newline at end of file
using OnlineStore.Common; using OnlineStore;
using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary; using OnlineStore.LoadCSVLibrary;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
...@@ -29,7 +30,7 @@ namespace DeviceLibrary ...@@ -29,7 +30,7 @@ namespace DeviceLibrary
MoveInfo moveInfo1; MoveInfo moveInfo1;
bool paused = false; bool paused = false;
private bool needPlaySound = false; private bool needPlaySound = false;
public LiftMonitor(string _up, string _down, string _saftylight, string _break, AxisBean _axisBean, int _StrokeLength, int _upspeed, int _downspeed = 0,string name= "升降机构",bool needSound=false ) public LiftMonitor(string _up, string _down, string _saftylight, string _break, AxisBean _axisBean, int _StrokeLength, int _upspeed, int _downspeed,string name,bool needSound=false )
{ {
moveInfo1 = new MoveInfo(name, false); moveInfo1 = new MoveInfo(name, false);
up = _up; up = _up;
...@@ -355,4 +356,4 @@ namespace DeviceLibrary ...@@ -355,4 +356,4 @@ namespace DeviceLibrary
catch { } catch { }
} }
} }
} }
\ No newline at end of file \ No newline at end of file
...@@ -865,7 +865,7 @@ namespace DeviceLibrary ...@@ -865,7 +865,7 @@ namespace DeviceLibrary
if (data == null) if (data == null)
{ {
msg = deviceName + " getNetPos 没有收到服务器反馈"; msg = deviceName + $" getNetPos 没有收到服务器反馈";
} }
else if (data.code.Equals(0).Equals(false)) else if (data.code.Equals(0).Equals(false))
{ {
......
using log4net; using log4net;
using OnlineStore.Common; using OnlineStore.Common;
using OnlineStore; using OnlineStore;
using System; using System;
...@@ -205,7 +205,7 @@ namespace DeviceLibrary ...@@ -205,7 +205,7 @@ namespace DeviceLibrary
{ {
if (!OpenPort(comPortName, out string errmsg)) if (!OpenPort(comPortName, out string errmsg))
{ {
log("未初始化,或已断开连接:" + errmsg); log($"未初始化,或已断开连接:" + errmsg);
return restr; return restr;
} }
} }
...@@ -421,4 +421,4 @@ DD 55 EE 00 00 00 01 00 99 01 00 00 00 5A 00 01 1B 09 6C 1B 09 6C 1B 09 6C 1B 09 ...@@ -421,4 +421,4 @@ DD 55 EE 00 00 00 01 00 99 01 00 00 00 5A 00 01 1B 09 6C 1B 09 6C 1B 09 6C 1B 09
_serialPort?.Close(); _serialPort?.Close();
} }
} }
} }
\ No newline at end of file \ No newline at end of file
using log4net; using log4net;
using OnlineStore; using OnlineStore;
using OnlineStore.Common; using OnlineStore.Common;
using System; using System;
...@@ -92,7 +92,7 @@ namespace DeviceLibrary ...@@ -92,7 +92,7 @@ namespace DeviceLibrary
{ {
msg += crc.GetString("comOpenFail", "串口{0}打开失败", PortName); msg += crc.GetString("comOpenFail", "串口{0}打开失败", PortName);
//msg = "端口连接失败:" + PortName; //msg = "端口连接失败:" + PortName;
log("串口打开失败:" + PortName.ToString()); log(crc.GetString("Res0024.6c83a184","串口打开失败:") + PortName.ToString());
return false; return false;
} }
else else
...@@ -116,7 +116,7 @@ namespace DeviceLibrary ...@@ -116,7 +116,7 @@ namespace DeviceLibrary
{ {
msg = crc.GetString("comOpenFail", "串口{0}打开失败", PortName); msg = crc.GetString("comOpenFail", "串口{0}打开失败", PortName);
//msg =e.ToString(); //msg =e.ToString();
log("串口"+PortName+"打开失败:"+e.ToString()); log($"串口"+PortName+$"打开失败:"+e.ToString());
return false; return false;
} }
} }
...@@ -171,7 +171,7 @@ namespace DeviceLibrary ...@@ -171,7 +171,7 @@ namespace DeviceLibrary
} }
catch (Exception ex) catch (Exception ex)
{ {
error("read 出错::" + ex.ToString()); error($"read 出错::" + ex.ToString());
} }
return new byte[0]; return new byte[0];
} }
...@@ -229,7 +229,7 @@ namespace DeviceLibrary ...@@ -229,7 +229,7 @@ namespace DeviceLibrary
{ {
if (!Open(PortName, out string msg)) if (!Open(PortName, out string msg))
{ {
log(PortName + "未初始化,或已断开连接"); log(PortName + $"未初始化,或已断开连接");
return restr; return restr;
} }
} }
...@@ -424,17 +424,17 @@ namespace DeviceLibrary ...@@ -424,17 +424,17 @@ namespace DeviceLibrary
} }
void error(string msg) void error(string msg)
{ {
loge.Error("x光高压:" + msg); loge.Error($"x光高压:" + msg);
Console.WriteLine(msg); Console.WriteLine(msg);
} }
void log(string msg) void log(string msg)
{ {
loge.Info("x光高压:" + msg); loge.Info($"x光高压:" + msg);
Console.WriteLine(msg); Console.WriteLine(msg);
} }
void debuglog(string msg) void debuglog(string msg)
{ {
loge.Debug("x光高压:" + msg); loge.Debug($"x光高压:" + msg);
Console.WriteLine(msg); Console.WriteLine(msg);
} }
} }
...@@ -468,4 +468,4 @@ namespace DeviceLibrary ...@@ -468,4 +468,4 @@ namespace DeviceLibrary
} }
} }
} }
\ No newline at end of file \ No newline at end of file
using CodeLibrary; using CodeLibrary;
using OnlineStore; using OnlineStore;
using OnlineStore.Common; using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary; using OnlineStore.LoadCSVLibrary;
...@@ -34,7 +34,7 @@ namespace DeviceLibrary ...@@ -34,7 +34,7 @@ namespace DeviceLibrary
lastSuddenStop = false; lastSuddenStop = false;
ProcessMsgEvent?.Invoke(Msg.get()); ProcessMsgEvent?.Invoke(Msg.get());
StringStartOut("按下复位按钮"); StringStartOut(crc.GetString("Res0033.009d536f","按下复位按钮"));
} }
void Run_BTN() void Run_BTN()
{ {
...@@ -64,4 +64,4 @@ namespace DeviceLibrary ...@@ -64,4 +64,4 @@ namespace DeviceLibrary
RobotManage.Stop(); RobotManage.Stop();
} }
} }
} }
\ No newline at end of file \ No newline at end of file
...@@ -139,8 +139,8 @@ namespace DeviceLibrary ...@@ -139,8 +139,8 @@ namespace DeviceLibrary
{ {
RobotManage.Config.DOList.Remove(IO_Type.ReelFlipDoor_Work); RobotManage.Config.DOList.Remove(IO_Type.ReelFlipDoor_Work);
RobotManage.Config.DOList.Remove(IO_Type.ReelFlipDoor_Home); RobotManage.Config.DOList.Remove(IO_Type.ReelFlipDoor_Home);
MotorFlipDoorB = new LiftMonitor(IO_Type.ReelFlipDoor_L_Home, IO_Type.ReelFlipDoor_L_Work, IO_Type.SafetyLightCurtains, null, new AxisBean(Config.FlipDoor_L_Axis, Name), Config.FlipDoorLength, Config.FlipDoorLength_speed, 0, "B翻转门"); MotorFlipDoorB = new LiftMonitor(IO_Type.ReelFlipDoor_L_Home, IO_Type.ReelFlipDoor_L_Work, IO_Type.SafetyLightCurtains, null, new AxisBean(Config.FlipDoor_L_Axis, Name), Config.FlipDoorLength, Config.FlipDoorLength_speed, 0, $"B翻转门");
MotorFlipDoorA = new LiftMonitor(IO_Type.ReelFlipDoor_R_Home, IO_Type.ReelFlipDoor_R_Work, IO_Type.SafetyLightCurtains, null, new AxisBean(Config.FlipDoor_R_Axis, Name), Config.FlipDoorLength, Config.FlipDoorLength_speed, 0, "A翻转门"); MotorFlipDoorA = new LiftMonitor(IO_Type.ReelFlipDoor_R_Home, IO_Type.ReelFlipDoor_R_Work, IO_Type.SafetyLightCurtains, null, new AxisBean(Config.FlipDoor_R_Axis, Name), Config.FlipDoorLength, Config.FlipDoorLength_speed, 0, $"A翻转门");
MotorFlipDoorB.SlowAftPause = true; MotorFlipDoorB.SlowAftPause = true;
MotorFlipDoorB.SlowAftPause = true; MotorFlipDoorB.SlowAftPause = true;
LogUtil.info("加载翻板门类型为:步进"); LogUtil.info("加载翻板门类型为:步进");
...@@ -158,7 +158,7 @@ namespace DeviceLibrary ...@@ -158,7 +158,7 @@ namespace DeviceLibrary
var sf = ""; var sf = "";
if (Setting_Init.StringDoor_X08IsStringDoor_SafetyLightCurtains) if (Setting_Init.StringDoor_X08IsStringDoor_SafetyLightCurtains)
sf = IO_Type.AGV_OnPosition; sf = IO_Type.AGV_OnPosition;
StringDoor = new LiftMonitor(IO_Type.StringDoor_Open, IO_Type.StringDoor_Close, sf, IO_Type.StringDoor_Axis_Break, new AxisBean(Config.StringDoor_Axis, Name), Config.StringDoorLength, Config.StringDoorLength_speed, 0, "折叠门", true); StringDoor = new LiftMonitor(IO_Type.StringDoor_Open, IO_Type.StringDoor_Close, sf, IO_Type.StringDoor_Axis_Break, new AxisBean(Config.StringDoor_Axis, Name), Config.StringDoorLength, Config.StringDoorLength_speed, 0, crc.GetString("Res0036.da7a921f","折叠门"), true);
StringDoor.DownOverTimeMS = Setting_Init.StringDoor_DownOverTimeMS; StringDoor.DownOverTimeMS = Setting_Init.StringDoor_DownOverTimeMS;
StringDoor.UpOverTimeMS = Setting_Init.StringDoor_UpOverTimeMS; StringDoor.UpOverTimeMS = Setting_Init.StringDoor_UpOverTimeMS;
StringDoor.ResumeWaitTimeSec = 5; StringDoor.ResumeWaitTimeSec = 5;
...@@ -180,6 +180,12 @@ namespace DeviceLibrary ...@@ -180,6 +180,12 @@ namespace DeviceLibrary
RobotManage.Config.DIList.Remove(IO_Type.BackDoorClose_Check); RobotManage.Config.DIList.Remove(IO_Type.BackDoorClose_Check);
RobotManage.Config.DOList.Remove(IO_Type.DoorSafe_Disable); RobotManage.Config.DOList.Remove(IO_Type.DoorSafe_Disable);
} }
//添加判读是否吸盘
if (Setting_Init.Device_Claw_Type_Mode == Claw_Type_Mode.SingleoIn_Sucker)
{
RobotManage.Config.DIList.Remove(IO_Type.Clamping_Relax);
RobotManage.Config.DIList.Remove(IO_Type.Clamping_Work);
}
if (!ConfigHelper.Config.Get("Device_IO_HasX29", true)) if (!ConfigHelper.Config.Get("Device_IO_HasX29", true))
{ {
RobotManage.Config.DIList.Remove(IO_Type.NGDoor_Tray_Check); RobotManage.Config.DIList.Remove(IO_Type.NGDoor_Tray_Check);
...@@ -565,7 +571,10 @@ namespace DeviceLibrary ...@@ -565,7 +571,10 @@ namespace DeviceLibrary
case MoveStep.H10_HomeReset: case MoveStep.H10_HomeReset:
ResetMoveInfo.NextMoveStep(MoveStep.H11_HomeReset); ResetMoveInfo.NextMoveStep(MoveStep.H11_HomeReset);
ResetMoveInfo.log("释放夹爪"); ResetMoveInfo.log("释放夹爪");
CylinderMove(StringMoveInfo, IO_Type.Clamping_Relax, IO_Type.Clamping_Work, IO_VALUE.LOW); // CylinderMove(StringMoveInfo, IO_Type.Clamping_Relax, IO_Type.Clamping_Work, IO_VALUE.LOW);
//修改为下面,2025-7-1
StringClowClose(ResetMoveInfo);
break; break;
case MoveStep.H11_HomeReset: case MoveStep.H11_HomeReset:
ResetMoveInfo.NextMoveStep(MoveStep.H12_HomeReset); ResetMoveInfo.NextMoveStep(MoveStep.H12_HomeReset);
......
...@@ -98,7 +98,8 @@ namespace DeviceLibrary ...@@ -98,7 +98,8 @@ namespace DeviceLibrary
case MoveStep.ReelClamp_02: case MoveStep.ReelClamp_02:
ClampMoveInfo.NextMoveStep(MoveStep.ReelClamp_03); ClampMoveInfo.NextMoveStep(MoveStep.ReelClamp_03);
ClampMoveInfo.log($"取料夹爪张开"); ClampMoveInfo.log($"取料夹爪张开");
CylinderMove(ClampMoveInfo, IO_Type.Clamping_Relax, IO_Type.Clamping_Work, IO_VALUE.HIGH); // CylinderMove(ClampMoveInfo, IO_Type.Clamping_Relax, IO_Type.Clamping_Work, IO_VALUE.HIGH);
StringClowOpen(ResetMoveInfo);
break; break;
case MoveStep.ReelClamp_03: case MoveStep.ReelClamp_03:
ClampMoveInfo.NextMoveStep(MoveStep.ReelClamp_04); ClampMoveInfo.NextMoveStep(MoveStep.ReelClamp_04);
...@@ -152,7 +153,8 @@ namespace DeviceLibrary ...@@ -152,7 +153,8 @@ namespace DeviceLibrary
//case MoveStep.ReelClamp_071: //case MoveStep.ReelClamp_071:
ClampMoveInfo.NextMoveStep(MoveStep.ReelClamp_08); ClampMoveInfo.NextMoveStep(MoveStep.ReelClamp_08);
ClampMoveInfo.log($"取料夹爪释放"); ClampMoveInfo.log($"取料夹爪释放");
CylinderMove(ClampMoveInfo, IO_Type.Clamping_Relax, IO_Type.Clamping_Work, IO_VALUE.LOW); //CylinderMove(ClampMoveInfo, IO_Type.Clamping_Relax, IO_Type.Clamping_Work, IO_VALUE.LOW);
StringClowClose(ClampMoveInfo);
break; break;
case MoveStep.ReelClamp_08: case MoveStep.ReelClamp_08:
ClampMoveInfo.NextMoveStep(MoveStep.ReelClamp_09); ClampMoveInfo.NextMoveStep(MoveStep.ReelClamp_09);
......
using CodeLibrary; using CodeLibrary;
using OnlineStore; using OnlineStore;
using OnlineStore.Common; using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary; using OnlineStore.LoadCSVLibrary;
...@@ -66,7 +66,7 @@ namespace DeviceLibrary ...@@ -66,7 +66,7 @@ namespace DeviceLibrary
} }
else else
{ {
RobotManage.UserPause("单口料盘已取走", false); RobotManage.UserPause(crc.GetString("Res0037.53a1c193","单口料盘已取走"), false);
} }
} }
LogUtil.info($"取料机构当前没有在等待单盘入库:{ClampMoveInfo.MoveStep}"); LogUtil.info($"取料机构当前没有在等待单盘入库:{ClampMoveInfo.MoveStep}");
...@@ -108,4 +108,4 @@ namespace DeviceLibrary ...@@ -108,4 +108,4 @@ namespace DeviceLibrary
return crc.GetString(L.begin_close_string_door, "开始关闭料串门"); return crc.GetString(L.begin_close_string_door, "开始关闭料串门");
} }
} }
} }
\ No newline at end of file \ No newline at end of file
...@@ -290,7 +290,9 @@ namespace DeviceLibrary ...@@ -290,7 +290,9 @@ namespace DeviceLibrary
var tpos4 = Batch_Axis.GetAclPosition() + Config.Batch_PoToMM * (Config.Batch_DetectDownMM + 2); var tpos4 = Batch_Axis.GetAclPosition() + Config.Batch_PoToMM * (Config.Batch_DetectDownMM + 2);
Batch_Axis.AbsMove(StringMoveInfo, tpos4, Config.Batch_P1_speed); Batch_Axis.AbsMove(StringMoveInfo, tpos4, Config.Batch_P1_speed);
Batch_Axis.MonitorAxisLoadRate(Setting_Init.LoadRateLimit_BatchMaxLoadRate); Batch_Axis.MonitorAxisLoadRate(Setting_Init.LoadRateLimit_BatchMaxLoadRate);
CylinderMove(StringMoveInfo, IO_Type.Clamping_Relax, IO_Type.Clamping_Work, IO_VALUE.LOW); //CylinderMove(StringMoveInfo, IO_Type.Clamping_Relax, IO_Type.Clamping_Work, IO_VALUE.LOW);
StringClowOpen(ClampMoveInfo);
//OpenFlipDoor(StringMoveInfo); //OpenFlipDoor(StringMoveInfo);
StringType = StringTypeE.In; StringType = StringTypeE.In;
} }
...@@ -792,7 +794,7 @@ namespace DeviceLibrary ...@@ -792,7 +794,7 @@ namespace DeviceLibrary
} }
if (LastHeight <= 8) { LastHeight = 8; } if (LastHeight <= 8) { LastHeight = 8; }
//string code = CodeManager.ProcessCode(LastCodeList); //string code = CodeManager.ProcessCode(LastCodeList);
string msg = Name + prefix + "上升前 [" + StartMovePosition + "]实时[ " + EndMovePosition + "]差值[" + (EndMovePosition - StartMovePosition) + "]系数[" + AxisChangeValue + "] 计算后" + "[" + height + "]," + buchongStr + ",归类为【" + LastHeight + "mm】条码【" + LastCode + "】"; string msg = Name + prefix + $"上升前 [" + StartMovePosition + $"]实时[ " + EndMovePosition + $"]差值[" + (EndMovePosition - StartMovePosition) + $"]系数[" + AxisChangeValue + $"] 计算后" + "[" + height + "]," + buchongStr + $",归类为【" + LastHeight + $"mm】条码【" + LastCode + "】";
LogUtil.info(msg); LogUtil.info(msg);
return LastHeight; return LastHeight;
} }
...@@ -800,7 +802,7 @@ namespace DeviceLibrary ...@@ -800,7 +802,7 @@ namespace DeviceLibrary
{ {
if (Setting_Init.Disable_StringDoor) if (Setting_Init.Disable_StringDoor)
{ {
LogUtil.info($"料串门已屏蔽,不打开"); moveInfo.log($"料串门已屏蔽,不打开");
return; return;
} }
if (StringDoor != null) if (StringDoor != null)
...@@ -830,6 +832,39 @@ namespace DeviceLibrary ...@@ -830,6 +832,39 @@ namespace DeviceLibrary
CyStringDoor.ToLow(moveInfo); CyStringDoor.ToLow(moveInfo);
} }
} }
#region 夹爪开关*K-Mon*2025-7-1
//夹爪开
public void StringClowOpen(MoveInfo moveInfo)
{
moveInfo.log("打开夹爪");
if (Setting_Init.Device_Claw_Type_Mode == Claw_Type_Mode.SingleoIn_Sucker)
{
IOMove(IO_Type.Clamping_Work, IO_VALUE.HIGH);
IOMove(IO_Type.Clamping_Relax, IO_VALUE.LOW);
}
else
{
CylinderMove(moveInfo, IO_Type.Clamping_Relax, IO_Type.Clamping_Work, IO_VALUE.HIGH);
}
}
public void StringClowClose(MoveInfo moveInfo)
{
moveInfo.log("关闭夹爪");
if (Setting_Init.Device_Claw_Type_Mode == Claw_Type_Mode.SingleoIn_Sucker)
{
IOMove(IO_Type.Clamping_Work, IO_VALUE.LOW);
IOMove(IO_Type.Clamping_Relax, IO_VALUE.HIGH);
}
else
{
CylinderMove(moveInfo, IO_Type.Clamping_Relax, IO_Type.Clamping_Work, IO_VALUE.LOW);
}
}
#endregion
public void StringDoorPause() public void StringDoorPause()
{ {
if (Setting_Init.Disable_StringDoor) if (Setting_Init.Disable_StringDoor)
......
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;
...@@ -265,11 +266,11 @@ namespace DeviceLibrary ...@@ -265,11 +266,11 @@ namespace DeviceLibrary
} }
else if (WaitType.Equals(WaitEnum.W008_BatchAxis)) else if (WaitType.Equals(WaitEnum.W008_BatchAxis))
{ {
return "批量轴上升到上料点"; return crc.GetString("Res0043.84e7c741","批量轴上升到上料点");
} }
else if (WaitType.Equals(WaitEnum.W009_ScanCode)) else if (WaitType.Equals(WaitEnum.W009_ScanCode))
{ {
return "扫码完成"; return crc.GetString("Res0044.ed4de1c6","扫码完成");
} }
else if (WaitType.Equals(WaitEnum.W013_Action)) else if (WaitType.Equals(WaitEnum.W013_Action))
{ {
...@@ -412,4 +413,4 @@ namespace DeviceLibrary ...@@ -412,4 +413,4 @@ namespace DeviceLibrary
///// </summary> ///// </summary>
//CheckFixture=6, //CheckFixture=6,
} }
} }
\ No newline at end of file \ No newline at end of file
using Newtonsoft.Json; using OnlineStore;
using Newtonsoft.Json;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
...@@ -131,12 +132,12 @@ namespace ImgCheckReel ...@@ -131,12 +132,12 @@ namespace ImgCheckReel
} }
catch (AccessViolationException e) catch (AccessViolationException e)
{ {
MessageBox.Show(" 扫码出现AccessViolationException异常:" + e.ToString()); MessageBox.Show(crc.GetString("Res0045.83e7b221"," 扫码出现AccessViolationException异常:") + e.ToString());
return null; return null;
} }
catch (Exception ex) catch (Exception ex)
{ {
MessageBox.Show(" 扫码出错:" + ex.ToString()); MessageBox.Show(crc.GetString("Res0046.f220fc88"," 扫码出错:") + ex.ToString());
return null; return null;
} }
finally finally
...@@ -153,7 +154,7 @@ namespace ImgCheckReel ...@@ -153,7 +154,7 @@ namespace ImgCheckReel
{ {
OpenFileDialog openFileDialog = new OpenFileDialog(); OpenFileDialog openFileDialog = new OpenFileDialog();
openFileDialog.InitialDirectory = "c:\\";//注意这里写路径时要用c:\\而不是c:\ openFileDialog.InitialDirectory = "c:\\";//注意这里写路径时要用c:\\而不是c:\
openFileDialog.Filter = "图片|*.*"; openFileDialog.Filter = crc.GetString("Res0047.9ba9fd98","图片|*.*");
openFileDialog.RestoreDirectory = true; openFileDialog.RestoreDirectory = true;
openFileDialog.FilterIndex = 1; openFileDialog.FilterIndex = 1;
if (openFileDialog.ShowDialog() == DialogResult.OK) if (openFileDialog.ShowDialog() == DialogResult.OK)
...@@ -559,4 +560,4 @@ namespace ImgCheckReel ...@@ -559,4 +560,4 @@ namespace ImgCheckReel
} }
} }
} }
} }
\ No newline at end of file \ No newline at end of file
...@@ -89,5 +89,11 @@ ...@@ -89,5 +89,11 @@
<ItemGroup> <ItemGroup>
<None Include="App.config" /> <None Include="App.config" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Common\Common.csproj">
<Project>{43CDD09E-FCF3-4960-A01D-3BBFE9933122}</Project>
<Name>Common</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project> </Project>
\ No newline at end of file \ No newline at end of file
using CodeLibrary; using CodeLibrary;
using Common; using Common;
using ConfigHelper; using ConfigHelper;
using DeviceLibrary; using DeviceLibrary;
...@@ -15,6 +15,7 @@ using System.Runtime.Serialization.Formatters.Binary; ...@@ -15,6 +15,7 @@ using System.Runtime.Serialization.Formatters.Binary;
using System.Threading; using System.Threading;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows.Forms; using System.Windows.Forms;
using static System.Net.Mime.MediaTypeNames;
using static System.Windows.Forms.VisualStyles.VisualStyleElement.StartPanel; using static System.Windows.Forms.VisualStyles.VisualStyleElement.StartPanel;
namespace TheMachine namespace TheMachine
...@@ -186,7 +187,9 @@ namespace TheMachine ...@@ -186,7 +187,9 @@ namespace TheMachine
AddForm("tab_setting", crc.GetString(L.tab_setting, "相关设置"), sc); AddForm("tab_setting", crc.GetString(L.tab_setting, "相关设置"), sc);
//this.ResumeLayout(true); //this.ResumeLayout(true);
//this.PerformLayout(); //this.PerformLayout();
crc.LanguageProcess(this);
//crc.LanguageProcess(this);
} }
private void T1_Tick(object sender, EventArgs e) private void T1_Tick(object sender, EventArgs e)
...@@ -246,6 +249,8 @@ namespace TheMachine ...@@ -246,6 +249,8 @@ namespace TheMachine
private void AddForm(string id, string text, UserControl form) private void AddForm(string id, string text, UserControl form)
{ {
//GetString(GetTextIdStr(className, id), text);
foreach (TabPage tp in tabc.TabPages) foreach (TabPage tp in tabc.TabPages)
{ {
if (tp.Name == id) if (tp.Name == id)
...@@ -254,6 +259,7 @@ namespace TheMachine ...@@ -254,6 +259,7 @@ namespace TheMachine
return; return;
} }
} }
TabPage lineTabPage = new TabPage(text); TabPage lineTabPage = new TabPage(text);
lineTabPage.Name = id; lineTabPage.Name = id;
Panel linePan = new Panel(); Panel linePan = new Panel();
...@@ -584,11 +590,11 @@ namespace TheMachine ...@@ -584,11 +590,11 @@ namespace TheMachine
} }
else if (!RobotManage.IsUserPause) else if (!RobotManage.IsUserPause)
{ {
RobotManage.UserPause("用户按下启动按钮", true); RobotManage.UserPause(crc.GetString("Res0048.aff4439b","用户按下启动按钮"), true);
} }
else if (RobotManage.IsUserPause) else if (RobotManage.IsUserPause)
{ {
RobotManage.UserPause("用户按下启动按钮", false); RobotManage.UserPause(crc.GetString("Res0048.aff4439b","用户按下启动按钮"), false);
} }
} }
private void RobotManage_UserPauseSet(object sender, bool e) private void RobotManage_UserPauseSet(object sender, bool e)
...@@ -929,4 +935,4 @@ namespace TheMachine ...@@ -929,4 +935,4 @@ namespace TheMachine
//} //}
} }
} }
} }
\ No newline at end of file \ No newline at end of file
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
</layout> </layout>
</appender> </appender>
<logger name="RollingLogFileAppender"> <logger name="RollingLogFileAppender">
<level value="ALL" /> <level value="INFO" />
<appender-ref ref="RollingLogFileAppender" /> <appender-ref ref="RollingLogFileAppender" />
</logger> </logger>
<logger name="HCBOARD" additivity="false"> <logger name="HCBOARD" additivity="false">
......
using CodeLibrary; using CodeLibrary;
using Common; using Common;
using ConfigHelper; using ConfigHelper;
using DeviceLibrary; using DeviceLibrary;
...@@ -223,6 +223,8 @@ namespace TheMachineNView ...@@ -223,6 +223,8 @@ namespace TheMachineNView
List<TabPage> tabPages = new List<TabPage>(); List<TabPage> tabPages = new List<TabPage>();
void showDebugTabPages(bool show) void showDebugTabPages(bool show)
{ {
if (this.InvokeRequired) if (this.InvokeRequired)
{ {
this.Invoke((EventHandler)delegate this.Invoke((EventHandler)delegate
...@@ -243,6 +245,7 @@ namespace TheMachineNView ...@@ -243,6 +245,7 @@ namespace TheMachineNView
item.Parent = null; item.Parent = null;
} }
} }
//kmon
crc.LanguageProcess(this); crc.LanguageProcess(this);
} }
...@@ -279,9 +282,10 @@ namespace TheMachineNView ...@@ -279,9 +282,10 @@ namespace TheMachineNView
RobotManage.IsConfigMode = RobotManage.IsConfigMode ? false : true; RobotManage.IsConfigMode = RobotManage.IsConfigMode ? false : true;
(sender as ToolStripMenuItem).Text = !RobotManage.IsConfigMode ? crc.GetString(L.enable_config_mode, "启用配置模式") : crc.GetString(L.disable_config_mode, "停用配置模式"); (sender as ToolStripMenuItem).Text = !RobotManage.IsConfigMode ? crc.GetString(L.enable_config_mode, "启用配置模式") : crc.GetString(L.disable_config_mode, "停用配置模式");
crc.LanguageChange();
showDebugTabPages(RobotManage.IsConfigMode); showDebugTabPages(RobotManage.IsConfigMode);
this.WindowState = FormWindowState.Maximized; this.WindowState = FormWindowState.Maximized;
crc.LanguageChange();
//if (RobotManage.IsConfigMode) //if (RobotManage.IsConfigMode)
//{ //{
// //RobotManage.Config = (Robot_Config)CSVConfigReader.LoadConfig(RobotManage.Config); // //RobotManage.Config = (Robot_Config)CSVConfigReader.LoadConfig(RobotManage.Config);
...@@ -586,11 +590,11 @@ namespace TheMachineNView ...@@ -586,11 +590,11 @@ namespace TheMachineNView
} }
else if (!RobotManage.IsUserPause) else if (!RobotManage.IsUserPause)
{ {
RobotManage.UserPause("用户按下启动按钮", true); RobotManage.UserPause(crc.GetString("Res0048.aff4439b","用户按下启动按钮"), true);
} }
else if (RobotManage.IsUserPause) else if (RobotManage.IsUserPause)
{ {
RobotManage.UserPause("用户按下启动按钮", false); RobotManage.UserPause(crc.GetString("Res0048.aff4439b","用户按下启动按钮"), false);
} }
} }
private void RobotManage_UserPauseSet(object sender, bool e) private void RobotManage_UserPauseSet(object sender, bool e)
...@@ -689,11 +693,11 @@ namespace TheMachineNView ...@@ -689,11 +693,11 @@ namespace TheMachineNView
{ {
Camera._cam.CloseAll(); Camera._cam.CloseAll();
} }
CodeLibrary.CodeResourceControl.CurrLanguage = CodeLibrary.CodeResourceControl.English; //CodeLibrary.CodeResourceControl.CurrLanguage = CodeLibrary.CodeResourceControl.English;
CodeLibrary.CodeResourceControl.GetLanguageEvent += Crc_GetLanguageEvent; //CodeLibrary.CodeResourceControl.GetLanguageEvent += Crc_GetLanguageEvent;
CodeLibrary.FrmCodeDecodeNW frm = new CodeLibrary.FrmCodeDecodeNW(); CodeLibrary.FrmCodeDecodeNW frm = new CodeLibrary.FrmCodeDecodeNW();
frm.CurrLanguage = Crc_GetLanguageEvent(); frm.CurrLanguage = Crc_GetLanguageEvent();
crc.LanguageProcess(frm);
frm.chbZxing.Checked = false; frm.chbZxing.Checked = false;
try try
{ {
...@@ -932,4 +936,4 @@ namespace TheMachineNView ...@@ -932,4 +936,4 @@ namespace TheMachineNView
//} //}
} }
} }
} }
\ No newline at end of file \ No newline at end of file
...@@ -54,7 +54,7 @@ namespace TheMachineNView ...@@ -54,7 +54,7 @@ namespace TheMachineNView
private static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e) private static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
{ {
LogUtil.error($"CurrentDomain_UnhandledException:" + e.ToString()); LogUtil.error($"CurrentDomain_UnhandledException:" + e.ExceptionObject.ToString());
} }
private static void Application_ThreadException(object sender, ThreadExceptionEventArgs e) private static void Application_ThreadException(object sender, ThreadExceptionEventArgs e)
......
...@@ -237,7 +237,7 @@ namespace TheMachineNView ...@@ -237,7 +237,7 @@ namespace TheMachineNView
this.uC_LedConfig1.Name = "uC_LedConfig1"; this.uC_LedConfig1.Name = "uC_LedConfig1";
this.uC_LedConfig1.Size = new System.Drawing.Size(693, 427); this.uC_LedConfig1.Size = new System.Drawing.Size(693, 427);
this.uC_LedConfig1.TabIndex = 9; this.uC_LedConfig1.TabIndex = 9;
this.uC_LedConfig1.Tag = "not"; this.uC_LedConfig1.Tag = "";
// //
// uC_SetUserPassword1 // uC_SetUserPassword1
// //
......
...@@ -87,8 +87,9 @@ ...@@ -87,8 +87,9 @@
<Reference Include="System.Net.Http" /> <Reference Include="System.Net.Http" />
<Reference Include="System.Windows.Forms" /> <Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" /> <Reference Include="System.Xml" />
<Reference Include="UserFromControl"> <Reference Include="UserFromControl, Version=1.0.7440.17371, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\..\SO775-DUOStore\dll\UserFromControl.dll</HintPath> <SpecificVersion>False</SpecificVersion>
<HintPath>bin\Debug\UserFromControl.dll</HintPath>
</Reference> </Reference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
......
...@@ -53,6 +53,7 @@ namespace TheMachineNView ...@@ -53,6 +53,7 @@ namespace TheMachineNView
this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle()); this.tableLayoutPanel1.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.tableLayoutPanel1.Size = new System.Drawing.Size(601, 363); this.tableLayoutPanel1.Size = new System.Drawing.Size(601, 363);
this.tableLayoutPanel1.TabIndex = 0; this.tableLayoutPanel1.TabIndex = 0;
this.tableLayoutPanel1.Tag = "not";
// //
// button_reset // button_reset
// //
......
...@@ -207,7 +207,7 @@ namespace TheMachineNView ...@@ -207,7 +207,7 @@ namespace TheMachineNView
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(676, 312); this.dataGridView1.Size = new System.Drawing.Size(669, 312);
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);
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!