Commit d0fcb671 刘韬

1

1 个父辈 f92b36c3
...@@ -146,7 +146,7 @@ namespace OnlineStore ...@@ -146,7 +146,7 @@ namespace OnlineStore
{ {
if (GetLanguageEvent == null) if (GetLanguageEvent == null)
{ {
return China; return string.IsNullOrEmpty(CurrLanguage)?China:CurrLanguage;
} }
string result = GetLanguageEvent?.Invoke(); string result = GetLanguageEvent?.Invoke();
if (result == null) if (result == null)
......
...@@ -87,6 +87,7 @@ namespace OnlineStore.Common ...@@ -87,6 +87,7 @@ namespace OnlineStore.Common
public static MyConfig<string> Runtime_RFID = ""; public static MyConfig<string> Runtime_RFID = "";
public static MyConfig<string> Runtime_PN = ""; public static MyConfig<string> Runtime_PN = "";
public static MyConfig<string> Runtime_WareCode = ""; public static MyConfig<string> Runtime_WareCode = "";
public static MyConfig<string> Runtime_NGINFOLIST="";
......
using Newtonsoft.Json;
using OnlineStore; using OnlineStore;
using OnlineStore.Common; using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary; using OnlineStore.LoadCSVLibrary;
...@@ -358,6 +359,10 @@ namespace DeviceLibrary ...@@ -358,6 +359,10 @@ namespace DeviceLibrary
{ {
LogUtil.info(StoreName + "收到服务器命令:closeInLock=doit"); LogUtil.info(StoreName + "收到服务器命令:closeInLock=doit");
IOManager.IOMove(IO_Type.Entry_Drawer_Lock, IO_VALUE.HIGH); IOManager.IOMove(IO_Type.Entry_Drawer_Lock, IO_VALUE.HIGH);
RobotManage.mainMachine.NGInfoList = new List<ReelParam>();
Setting_Init.Runtime_NGINFOLIST = JsonConvert.SerializeObject(RobotManage.mainMachine.NGInfoList);
RobotManage.mainMachine.StoreMoveInfo.NewMove(MoveStep.StoreIn01);
RobotManage.mainMachine.StoreMoveInfo.log(StoreName + " 服务器锁定抽屉,开始入库");
result = ""; result = "";
} }
...@@ -467,7 +472,8 @@ namespace DeviceLibrary ...@@ -467,7 +472,8 @@ namespace DeviceLibrary
} }
else else
{ {
string msg = resultOperation.msg;
string msg = crc.CurrLanguage != "zh-CN"? resultOperation.msgEn: resultOperation.msg;
SendStoreState("", StoreStatus.InStoreError); SendStoreState("", StoreStatus.InStoreError);
RobotManage.mainMachine.LabelingMoveInfo.MoveParam.IsNg = true; RobotManage.mainMachine.LabelingMoveInfo.MoveParam.IsNg = true;
RobotManage.mainMachine.LabelingMoveInfo.MoveParam.NgMsg = msg; RobotManage.mainMachine.LabelingMoveInfo.MoveParam.NgMsg = msg;
......
...@@ -126,7 +126,8 @@ namespace DeviceLibrary ...@@ -126,7 +126,8 @@ namespace DeviceLibrary
{ {
MoveInfo.NextMoveStep(MoveStep.StoreTS08); MoveInfo.NextMoveStep(MoveStep.StoreTS08);
MoveInfo.log($"{storeMoveType}:物料已在夹爪上"); MoveInfo.log($"{storeMoveType}:物料已在夹爪上");
}else }
else
MoveInfo.NextMoveStep(MoveStep.StoreTS04); MoveInfo.NextMoveStep(MoveStep.StoreTS04);
Y_Axis.AbsMove(MoveInfo, From.Y_Axis_P2 + FromCheckOffset, Config.Y_Axis_P1_speed); Y_Axis.AbsMove(MoveInfo, From.Y_Axis_P2 + FromCheckOffset, Config.Y_Axis_P1_speed);
//MoveInfo.log($"{storeMoveType}:Y轴到达取料点偏移点"); //MoveInfo.log($"{storeMoveType}:Y轴到达取料点偏移点");
...@@ -148,11 +149,11 @@ namespace DeviceLibrary ...@@ -148,11 +149,11 @@ namespace DeviceLibrary
} }
break; break;
case MoveStep.StoreTS05: case MoveStep.StoreTS05:
if (!ignoreFixtureCheck && FromCheckOffset > 0 && !IgnoreX09 && IOManager.IOValue(FromCheckOffset>0?IO_Type.Taking_Left_Check: IO_Type.Taking_Right_Check).Equals(IO_VALUE.LOW)) if (!ignoreFixtureCheck && FromCheckOffset > 0 && !IgnoreX09 && IOManager.IOValue(FromCheckOffset > 0 ? IO_Type.Taking_Left_Check : IO_Type.Taking_Right_Check).Equals(IO_VALUE.LOW))
{ {
Msg.add(crc.GetString("Res0062","取料时没有检测到物料信号,请检查."), MsgLevel.alarm, ErrInfo.X09_BoxNotDetect); Msg.add(crc.GetString("Res0062", "取料时没有检测到物料信号,请检查."), MsgLevel.alarm, ErrInfo.X09_BoxNotDetect);
MoveInfo.log($"取料时没有检测到物料信号,请检查."); MoveInfo.log($"取料时没有检测到物料信号,请检查.");
RobotManage.UserPause(crc.GetString("Res0063","取料时没有检测到物料信号,请检查")); RobotManage.UserPause(crc.GetString("Res0063", "取料时没有检测到物料信号,请检查"));
} }
else else
{ {
...@@ -177,7 +178,7 @@ namespace DeviceLibrary ...@@ -177,7 +178,7 @@ namespace DeviceLibrary
MoveInfo.NextMoveStep(MoveStep.StoreTS09); MoveInfo.NextMoveStep(MoveStep.StoreTS09);
RobotManage.mainMachine.CylinderMove(MoveInfo, IO_Type.Taking_Release, IO_Type.Taking_Clamp, IO_VALUE.HIGH); RobotManage.mainMachine.CylinderMove(MoveInfo, IO_Type.Taking_Release, IO_Type.Taking_Clamp, IO_VALUE.HIGH);
//Setting_Init.Runtime_Posid = To.posid; //Setting_Init.Runtime_Posid = To.posid;
if (storeMoveType== StoreMoveType.InStore && To.posid==MainMachine.LabelP) if (storeMoveType == StoreMoveType.InStore && To.posid == MainMachine.LabelP)
Setting_Init.Runtime_Step = Runtime_StepE.InToLabel; Setting_Init.Runtime_Step = Runtime_StepE.InToLabel;
if (storeMoveType == StoreMoveType.InStore && To.posid != MainMachine.LabelP) if (storeMoveType == StoreMoveType.InStore && To.posid != MainMachine.LabelP)
Setting_Init.Runtime_Step = Runtime_StepE.InToStore; Setting_Init.Runtime_Step = Runtime_StepE.InToStore;
...@@ -188,7 +189,7 @@ namespace DeviceLibrary ...@@ -188,7 +189,7 @@ namespace DeviceLibrary
break; break;
case MoveStep.StoreTS09: case MoveStep.StoreTS09:
MoveInfo.NextMoveStep(MoveStep.StoreTS10); MoveInfo.NextMoveStep(MoveStep.StoreTS10);
if (From.posid == MainMachine.LabelP && To.posid== MainMachine.RFIDP) if (From.posid == MainMachine.LabelP && To.posid == MainMachine.RFIDP)
Z_Axis.AbsMove(MoveInfo, To.Z_Axis_P3, Config.Z_Axis_P1_speed); Z_Axis.AbsMove(MoveInfo, To.Z_Axis_P3, Config.Z_Axis_P1_speed);
else else
Z_Axis.AbsMove(MoveInfo, Config.Z_Axis_P1, Config.Z_Axis_P1_speed); Z_Axis.AbsMove(MoveInfo, Config.Z_Axis_P1, Config.Z_Axis_P1_speed);
...@@ -202,12 +203,13 @@ namespace DeviceLibrary ...@@ -202,12 +203,13 @@ namespace DeviceLibrary
break; break;
case MoveStep.StoreTS20: case MoveStep.StoreTS20:
MoveInfo.NextMoveStep(MoveStep.StoreTS21); MoveInfo.NextMoveStep(MoveStep.StoreTS21);
Y_Axis.AbsMove(MoveInfo, To.Y_Axis_P2+ ToCheckOffset, Config.Y_Axis_P1_speed); Y_Axis.AbsMove(MoveInfo, To.Y_Axis_P2 + ToCheckOffset, Config.Y_Axis_P1_speed);
X_Axis.AbsMove(MoveInfo, To.X_Axis_P2, Config.X_Axis_P1_speed); X_Axis.AbsMove(MoveInfo, To.X_Axis_P2, Config.X_Axis_P1_speed);
MoveInfo.log($"{storeMoveType}:XY轴到达目的地检测,X:{To.X_Axis_P2},Y:{To.Y_Axis_P2}+{ToCheckOffset}"); MoveInfo.log($"{storeMoveType}:XY轴到达目的地检测,X:{To.X_Axis_P2},Y:{To.Y_Axis_P2}+{ToCheckOffset}");
break; break;
case MoveStep.StoreTS21: case MoveStep.StoreTS21:
if (CheckPosStatus(MoveInfo, To.posid)) { if (CheckPosStatus(MoveInfo, To.posid))
{
MoveInfo.NextMoveStep(MoveStep.StoreTS22); MoveInfo.NextMoveStep(MoveStep.StoreTS22);
} }
break; break;
...@@ -235,11 +237,11 @@ namespace DeviceLibrary ...@@ -235,11 +237,11 @@ namespace DeviceLibrary
} }
break; break;
case MoveStep.StoreTS23: case MoveStep.StoreTS23:
if (!ignoreFixtureCheck && ToCheckOffset>0 && IOManager.IOValue(ToCheckOffset > 0 ? IO_Type.Taking_Left_Check : IO_Type.Taking_Right_Check).Equals(IO_VALUE.HIGH)) if (!ignoreFixtureCheck && ToCheckOffset > 0 && IOManager.IOValue(ToCheckOffset > 0 ? IO_Type.Taking_Left_Check : IO_Type.Taking_Right_Check).Equals(IO_VALUE.HIGH))
{ {
Msg.add(crc.GetString("Res0064","放料时发现库位已经有料,请检查."), MsgLevel.alarm); Msg.add(crc.GetString("Res0064", "放料时发现库位已经有料,请检查."), MsgLevel.alarm);
MoveInfo.log($"放料时发现库位已经有料,请检查."); MoveInfo.log($"放料时发现库位已经有料,请检查.");
RobotManage.UserPause(crc.GetString("Res0065","放料时发现库位已经有料,请检查")); RobotManage.UserPause(crc.GetString("Res0065", "放料时发现库位已经有料,请检查"));
} }
else else
{ {
...@@ -276,7 +278,8 @@ namespace DeviceLibrary ...@@ -276,7 +278,8 @@ namespace DeviceLibrary
break; break;
case MoveStep.StoreTS27: case MoveStep.StoreTS27:
MoveInfo.NextMoveStep(MoveStep.StoreTS28); MoveInfo.NextMoveStep(MoveStep.StoreTS28);
if (To.posid == MainMachine.LabelP) { if (To.posid == MainMachine.LabelP)
{
var rfidp = CSVPositionReader<ACStorePosition>.GetPositon(MainMachine.RFIDP); var rfidp = CSVPositionReader<ACStorePosition>.GetPositon(MainMachine.RFIDP);
Z_Axis.AbsMove(MoveInfo, rfidp.Z_Axis_P3, Config.Z_Axis_P1_speed); Z_Axis.AbsMove(MoveInfo, rfidp.Z_Axis_P3, Config.Z_Axis_P1_speed);
MoveInfo.log($"{storeMoveType}:Z轴到达待机点"); MoveInfo.log($"{storeMoveType}:Z轴到达待机点");
...@@ -289,18 +292,17 @@ namespace DeviceLibrary ...@@ -289,18 +292,17 @@ namespace DeviceLibrary
break; break;
case MoveStep.StoreTS28: case MoveStep.StoreTS28:
MoveInfo.NextMoveStep(MoveStep.StoreTS29); MoveInfo.NextMoveStep(MoveStep.StoreTS29);
//RobotManage.CameraA.CameraGrabOne(RobotManage.CameraA.GetFixtureStateFilename(To.posid, WareCode, storeMoveType, FixtureState.ToOut)); if (To.posid == MainMachine.LabelP || To.posid.StartsWith("S"))
if (To.posid != MainMachine.LabelP && !To.posid.StartsWith("S")) {
}
else
{ {
MoveInfo.log($"{storeMoveType}:XY返回待机点"); MoveInfo.log($"{storeMoveType}:XY返回待机点");
Y_Axis.AbsMove(MoveInfo, Config.Y_Axis_P1, Config.Y_Axis_P1_speed); Y_Axis.AbsMove(MoveInfo, Config.Y_Axis_P1, Config.Y_Axis_P1_speed);
X_Axis.AbsMove(MoveInfo, Config.X_Axis_P1, Config.X_Axis_P1_speed); X_Axis.AbsMove(MoveInfo, Config.X_Axis_P1, Config.X_Axis_P1_speed);
} }
MoveInfo.log($"{storeMoveType}:完成放料"); MoveInfo.log($"{storeMoveType}:完成放料");
InOutEndProcess(StoreMoveType.InStore, To.posid); InOutEndProcess(StoreMoveType.InStore, To.posid);
break; break;
case MoveStep.StoreTS29: case MoveStep.StoreTS29:
MoveInfo.log($"{storeMoveType}:转移物料完成"); MoveInfo.log($"{storeMoveType}:转移物料完成");
...@@ -408,7 +410,7 @@ namespace DeviceLibrary ...@@ -408,7 +410,7 @@ namespace DeviceLibrary
int CalcOffset(string posid) { int CalcOffset(string posid) {
if (string.IsNullOrEmpty(posid)) if (string.IsNullOrEmpty(posid))
return 0; return 0;
if (Regex.IsMatch(posid, "^S\\w12")) if (Regex.IsMatch(posid, "^S\\w(12|6)"))
return Config.X_Axis_Lcheck_Offset * -1; return Config.X_Axis_Lcheck_Offset * -1;
if (Regex.IsMatch(posid, "^L\\w4")) if (Regex.IsMatch(posid, "^L\\w4"))
return Config.X_Axis_Lcheck_Offset * -1; return Config.X_Axis_Lcheck_Offset * -1;
......
...@@ -38,6 +38,23 @@ namespace DeviceLibrary ...@@ -38,6 +38,23 @@ namespace DeviceLibrary
RobotManage.UserPause("Reset_BTN", false); RobotManage.UserPause("Reset_BTN", false);
} }
} }
void HomeReset_BTN()
{
if (IOValue(IO_Type.SuddenStop_BTN).Equals(IO_VALUE.HIGH))
{
Msg.add(crc.GetString("Res0009", "按下复位按钮."), MsgLevel.info, ErrInfo.ResetBtn);
}
else
{
Msg.add(crc.GetString("Res0010", "急停未解除,按下复位按钮尝试复位安全继电器."), MsgLevel.info, ErrInfo.SuddenStop);
}
if (RobotManage.isRunning)
{
LogUtil.info("长按下复位按钮,系统正在运行,开始复位");
BeginHomeReset();
}
ProcessMsgEvent?.Invoke(Msg.get());
}
void Run_BTN() { void Run_BTN() {
if (IOValue(IO_Type.SuddenStop_BTN).Equals(IO_VALUE.HIGH)) if (IOValue(IO_Type.SuddenStop_BTN).Equals(IO_VALUE.HIGH))
{ {
......
...@@ -96,7 +96,7 @@ namespace DeviceLibrary ...@@ -96,7 +96,7 @@ namespace DeviceLibrary
WarnMsg = MoveInfo.Name + "[" + MoveInfo.MoveStep + $"] {"等待"}(" + io.ElectricalDefinition + " " + "=" + wait.IoValue + $" {"超时"}"; WarnMsg = MoveInfo.Name + "[" + MoveInfo.MoveStep + $"] {"等待"}(" + io.ElectricalDefinition + " " + "=" + wait.IoValue + $" {"超时"}";
Msg.add(WarnMsg, MsgLevel.alarm); //Msg.add(WarnMsg, MsgLevel.alarm);
if (NoAlarm()) if (NoAlarm())
{ {
//Alarm(AlarmType.IoSingleTimeOut, WarnMsg); //Alarm(AlarmType.IoSingleTimeOut, WarnMsg);
...@@ -183,7 +183,7 @@ namespace DeviceLibrary ...@@ -183,7 +183,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 + "]" + "等待" + "}" + NotOkMsg + "超时" + "[" + 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 Newtonsoft.Json;
using OnlineStore; using OnlineStore;
using OnlineStore.Common; using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary; using OnlineStore.LoadCSVLibrary;
...@@ -119,6 +120,7 @@ namespace DeviceLibrary ...@@ -119,6 +120,7 @@ namespace DeviceLibrary
}; };
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);
IOMonitor.RegisterIO(IO_Type.Reset_BTN, Config, IO_VALUE.HIGH, HomeReset_BTN, 2500, 3000);
IOMonitor.RegisterIO(IO_Type.AutoRun_Single, Config, IO_VALUE.HIGH, Run_BTN, 2500,100); IOMonitor.RegisterIO(IO_Type.AutoRun_Single, Config, IO_VALUE.HIGH, Run_BTN, 2500,100);
IOMonitor.RegisterIO(IO_Type.Entry_Drawer, Config, IO_VALUE.LOW, Entry_Drawer_Open, 1500,100); IOMonitor.RegisterIO(IO_Type.Entry_Drawer, Config, IO_VALUE.LOW, Entry_Drawer_Open, 1500,100);
IOMonitor.RegisterIO(IO_Type.Entry_Drawer, Config, IO_VALUE.HIGH, Entry_Drawer_Close, 1500,100); IOMonitor.RegisterIO(IO_Type.Entry_Drawer, Config, IO_VALUE.HIGH, Entry_Drawer_Close, 1500,100);
...@@ -128,6 +130,15 @@ namespace DeviceLibrary ...@@ -128,6 +130,15 @@ namespace DeviceLibrary
IOMonitor.RegisterIO(IO_Type.PrinterDoor_Check, Config, IO_VALUE.HIGH, PrinterDoor_Close, 1500,100); IOMonitor.RegisterIO(IO_Type.PrinterDoor_Check, Config, IO_VALUE.HIGH, PrinterDoor_Close, 1500,100);
LedProcessInit(); LedProcessInit();
IOMove(IO_Type.Fan,IO_VALUE.HIGH); IOMove(IO_Type.Fan,IO_VALUE.HIGH);
if (!string.IsNullOrEmpty(Setting_Init.Runtime_NGINFOLIST)) {
var s = JsonConvert.DeserializeObject<List<ReelParam>>(Setting_Init.Runtime_NGINFOLIST);
if (s != null)
{
NGInfoList = s;
}
}
} }
private void Entry_Drawer_Open() private void Entry_Drawer_Open()
...@@ -145,10 +156,12 @@ namespace DeviceLibrary ...@@ -145,10 +156,12 @@ namespace DeviceLibrary
} }
private void Entry_Drawer_Close() private void Entry_Drawer_Close()
{ {
IOMove(IO_Type.Entry_Drawer_Lock, IO_VALUE.HIGH);
CameraPointTest.GetThingStoreName(TestStorePointPort.入口); CameraPointTest.GetThingStoreName(TestStorePointPort.入口);
} }
private void Out_Drawer_Close() private void Out_Drawer_Close()
{ {
IOMove(IO_Type.Out_Drawer_Lock, IO_VALUE.HIGH);
CameraPointTest.GetThingStoreName(TestStorePointPort.出口); CameraPointTest.GetThingStoreName(TestStorePointPort.出口);
} }
......
...@@ -271,13 +271,17 @@ namespace DeviceLibrary ...@@ -271,13 +271,17 @@ namespace DeviceLibrary
} }
string LabelingState() { string LabelingState() {
string state = crc.GetString("Res0107","空闲中"); string state = crc.GetString("Res0107","空闲中");
if (LabelingMoveInfo.MoveStep >= MoveStep.StoreOut10) if (LabelingMoveInfo.MoveStep >= MoveStep.Labeling57)
{ {
state = $"{"出库中"},{"出库中"}:{StoreMoveInfo.MoveParam.PosID}"; state = "";
} }else
else if (LabelingMoveInfo.MoveStep >= MoveStep.Labeling01) if (LabelingMoveInfo.MoveStep >= MoveStep.Labeling10)
{
state = crc.GetString("Res0147.aa2e38a6","贴标中");
}else
if (LabelingMoveInfo.MoveStep >= MoveStep.Labeling04)
{ {
state = $"{"入库中"},{"出库中"}:{StoreMoveInfo.MoveParam.PosID}"; state = crc.GetString("Res0148.fc8069d9","扫码中");
} }
return state; return state;
......
...@@ -29,6 +29,11 @@ namespace DeviceLibrary ...@@ -29,6 +29,11 @@ namespace DeviceLibrary
case MoveStep.Wait: case MoveStep.Wait:
break; break;
case MoveStep.StoreIn01: case MoveStep.StoreIn01:
StoreMoveInfo.NextMoveStep(MoveStep.StoreIn02);
Y_Axis.AbsMove(StoreMoveInfo, Config.Y_Axis_P1, Config.Y_Axis_P1_speed);
X_Axis.AbsMove(StoreMoveInfo, Config.X_Axis_P1, Config.X_Axis_P1_speed);
break;
case MoveStep.StoreIn02:
StoreMoveInfo.NextMoveStep(MoveStep.StoreOut10); StoreMoveInfo.NextMoveStep(MoveStep.StoreOut10);
if (IOManager.IOValue(IO_Type.Tside_Right).Equals(IO_VALUE.HIGH)) if (IOManager.IOValue(IO_Type.Tside_Right).Equals(IO_VALUE.HIGH))
DemoTestList = CameraPointTest.GetThingStoreName(TestStorePointPort.上层右侧); DemoTestList = CameraPointTest.GetThingStoreName(TestStorePointPort.上层右侧);
......
using CodeLibrary; using CodeLibrary;
using Newtonsoft.Json;
using OnlineStore; using OnlineStore;
using OnlineStore.Common; using OnlineStore.Common;
using OnlineStore.LoadCSVLibrary; using OnlineStore.LoadCSVLibrary;
...@@ -87,9 +88,9 @@ namespace DeviceLibrary ...@@ -87,9 +88,9 @@ namespace DeviceLibrary
} }
else if (IOValue(IO_Type.Entry_Drawer_Lock).Equals(IO_VALUE.HIGH) && IOValue(IO_Type.Entry_Drawer).Equals(IO_VALUE.HIGH)) else if (IOValue(IO_Type.Entry_Drawer_Lock).Equals(IO_VALUE.HIGH) && IOValue(IO_Type.Entry_Drawer).Equals(IO_VALUE.HIGH))
{ {
NGInfoList = new List<ReelParam>(); //NGInfoList = new List<ReelParam>();
StoreMoveInfo.NewMove(MoveStep.StoreIn01); //StoreMoveInfo.NewMove(MoveStep.StoreIn01);
StoreMoveInfo.log($"检测到入库抽屉已锁定"); //StoreMoveInfo.log($"检测到入库抽屉已锁定");
} }
Setting_Init.Runtime_Step = Runtime_StepE.None; Setting_Init.Runtime_Step = Runtime_StepE.None;
return; return;
...@@ -134,8 +135,8 @@ namespace DeviceLibrary ...@@ -134,8 +135,8 @@ namespace DeviceLibrary
if (slist.Count == 0) if (slist.Count == 0)
{ {
StoreMoveInfo.NextMoveStep(MoveStep.Wait); StoreMoveInfo.NextMoveStep(MoveStep.Wait);
IOMove(IO_Type.Entry_Drawer_Lock, IO_VALUE.LOW); //IOMove(IO_Type.Entry_Drawer_Lock, IO_VALUE.LOW);
StoreMoveInfo.log($"没有检测到有入库物料,抽屉解锁"); StoreMoveInfo.log($"没有检测到有入库物料");
return; return;
} }
else else
...@@ -304,6 +305,7 @@ namespace DeviceLibrary ...@@ -304,6 +305,7 @@ namespace DeviceLibrary
//nglist.Add(outposid); //nglist.Add(outposid);
ServerCM.cancelPutInTask("", StoreMoveInfo.MoveParam.PosID); ServerCM.cancelPutInTask("", StoreMoveInfo.MoveParam.PosID);
nglist.Add(Setting_Init.Runtime_FromPosid); nglist.Add(Setting_Init.Runtime_FromPosid);
StoreMoveInfo.MoveParam.PosID = Setting_Init.Runtime_FromPosid;
StoreMoveInfo.NextMoveStep(MoveStep.StoreIn09); StoreMoveInfo.NextMoveStep(MoveStep.StoreIn09);
from = CSVPositionReader<ACStorePosition>.GetPositon(LabelP); from = CSVPositionReader<ACStorePosition>.GetPositon(LabelP);
to = CSVPositionReader<ACStorePosition>.GetPositon(Setting_Init.Runtime_FromPosid); to = CSVPositionReader<ACStorePosition>.GetPositon(Setting_Init.Runtime_FromPosid);
...@@ -311,6 +313,7 @@ namespace DeviceLibrary ...@@ -311,6 +313,7 @@ namespace DeviceLibrary
//StoreMoveInfo.MoveParam.PosID = outposid; //StoreMoveInfo.MoveParam.PosID = outposid;
StoreMoveInfo.MoveParam.dateTime = DateTime.Now; StoreMoveInfo.MoveParam.dateTime = DateTime.Now;
NGInfoList.Add(StoreMoveInfo.MoveParam.clone()); NGInfoList.Add(StoreMoveInfo.MoveParam.clone());
Setting_Init.Runtime_NGINFOLIST = JsonConvert.SerializeObject(NGInfoList);
//StoreMoveInfo.MoveParam.ReelOnFixture = false; //StoreMoveInfo.MoveParam.ReelOnFixture = false;
boxTransport.Start(new BoxStorePosition(Config, from, StoreMoveInfo.MoveParam), new BoxStorePosition(Config, to, StoreMoveInfo.MoveParam), StoreMoveType.InStore, true); boxTransport.Start(new BoxStorePosition(Config, from, StoreMoveInfo.MoveParam), new BoxStorePosition(Config, to, StoreMoveInfo.MoveParam), StoreMoveType.InStore, true);
StoreMoveInfo.log($"开始转运"); StoreMoveInfo.log($"开始转运");
...@@ -321,8 +324,12 @@ namespace DeviceLibrary ...@@ -321,8 +324,12 @@ namespace DeviceLibrary
{ {
if(!StoreMoveInfo.MoveParam.IsNg) if(!StoreMoveInfo.MoveParam.IsNg)
ServerCM.SendStoreState(StoreMoveInfo.MoveParam.PosID, StoreStatus.InStoreEnd); ServerCM.SendStoreState(StoreMoveInfo.MoveParam.PosID, StoreStatus.InStoreEnd);
if (OutStoreJobList.Count==0)
StoreMoveInfo.NewMove(MoveStep.StoreIn01);
else
StoreMoveInfo.NewMove(MoveStep.Wait); StoreMoveInfo.NewMove(MoveStep.Wait);
StoreMoveInfo.log($"入库完成"); StoreMoveInfo.log($"入库完成");
CameraPointTest.GetThingStoreName(TestStorePointPort.入口); CameraPointTest.GetThingStoreName(TestStorePointPort.入口);
} }
break; break;
...@@ -473,7 +480,7 @@ namespace DeviceLibrary ...@@ -473,7 +480,7 @@ namespace DeviceLibrary
case MoveStep.StoreOut17: case MoveStep.StoreOut17:
if (IOValue(IO_Type.Out_Drawer).Equals(IO_VALUE.HIGH)) if (IOValue(IO_Type.Out_Drawer).Equals(IO_VALUE.HIGH))
{ {
StoreMoveInfo.EndMove(); StoreMoveInfo.NewMove(MoveStep.StoreIn01);
} }
else else
{ {
......
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;
...@@ -236,40 +237,40 @@ namespace DeviceLibrary ...@@ -236,40 +237,40 @@ namespace DeviceLibrary
{ {
if (IsHomeMove) if (IsHomeMove)
{ {
return "轴【" + AxisInfo.DisplayStr + "】原点返回"; return string.Format("轴【{0}】原点返回", AxisInfo.DisplayStr);
} }
else else
{ {
return "轴【" + AxisInfo.DisplayStr + "】绝对运动,目标位置【" + TargetPosition + "】"; return string.Format("轴【{0}】绝对运动,目标位置【{1}】", AxisInfo.DisplayStr, TargetPosition);
} }
} }
else if (WaitType.Equals(WaitEnum.W002_IOValue)) else if (WaitType.Equals(WaitEnum.W002_IOValue))
{ {
return "等待【" + IoType + "】=【" + IoValue + "】"; return crc.GetString("Res0149.87979227","等待") + "【" + IoType + "】=【" + IoValue + "】";
} }
else if (WaitType.Equals(WaitEnum.W003_Time)) else if (WaitType.Equals(WaitEnum.W003_Time))
{ {
return "时间等待:【" + TimeMSeconds + "】毫秒"; return crc.GetString("Res0150.d7647f48","时间等待") + ":【" + TimeMSeconds + "】" + crc.GetString("Res0151.21157cbf","毫秒");
} }
else if (WaitType.Equals(WaitEnum.W005_ShuoKe)) else if (WaitType.Equals(WaitEnum.W005_ShuoKe))
{ {
return "硕科电机目标位置:【" + TargetPosition + "】 "; return crc.GetString("Res0152.863d516a","硕科电机目标位置")+":【" + TargetPosition + "】 ";
} }
else if (WaitType.Equals(WaitEnum.W006_AxisOrg)) else if (WaitType.Equals(WaitEnum.W006_AxisOrg))
{ {
return "轴【" + AxisInfo.DisplayStr + "】ORG信号:【" + IoValue + "】 "; return crc.GetString("Res0153.60c85b4b","轴") + "【" + AxisInfo.DisplayStr + "】" + crc.GetString("Res0154.3802ba42","ORG信号") + ":【" + IoValue + "】 ";
} }
else if (WaitType.Equals(WaitEnum.W007_ReelHeight)) else if (WaitType.Equals(WaitEnum.W007_ReelHeight))
{ {
return "料盘高度【" + TargetPosition + "】 "; return crc.GetString("Res0155.f4a8d691","料盘高度") + "【" + TargetPosition + "】 ";
} }
else if (WaitType.Equals(WaitEnum.W008_BatchAxis)) else if (WaitType.Equals(WaitEnum.W008_BatchAxis))
{ {
return "批量轴上升到上料点"; return crc.GetString("Res0156.84e7c741","批量轴上升到上料点");
} }
else if (WaitType.Equals(WaitEnum.W009_ScanCode)) else if (WaitType.Equals(WaitEnum.W009_ScanCode))
{ {
return "扫码完成"; return crc.GetString("Res0157.ed4de1c6","扫码完成");
} }
else if (WaitType.Equals(WaitEnum.W013_Action)) else if (WaitType.Equals(WaitEnum.W013_Action))
{ {
...@@ -277,7 +278,7 @@ namespace DeviceLibrary ...@@ -277,7 +278,7 @@ namespace DeviceLibrary
} }
else else
{ {
return "Wait位置类型:WaitType=【" + WaitType + "】"; return "WaitType=【" + WaitType + "】";
} }
} }
/// <summary> /// <summary>
......
...@@ -46,14 +46,11 @@ namespace TheMachine ...@@ -46,14 +46,11 @@ namespace TheMachine
this.cb_labelselect = new System.Windows.Forms.ComboBox(); this.cb_labelselect = new System.Windows.Forms.ComboBox();
this.uC_SetUserPassword1 = new TheMachine.UC_SetUserPassword(); this.uC_SetUserPassword1 = new TheMachine.UC_SetUserPassword();
this.tabPage_ledtower = new System.Windows.Forms.TabPage(); this.tabPage_ledtower = new System.Windows.Forms.TabPage();
this.tabPage1 = new System.Windows.Forms.TabPage();
this.fixtureSizeConfigControl1 = new DeviceLibrary.FixtureSizeConfigControl();
this.tp.SuspendLayout(); this.tp.SuspendLayout();
this.tabControl1.SuspendLayout(); this.tabControl1.SuspendLayout();
this.tabPage_set.SuspendLayout(); this.tabPage_set.SuspendLayout();
this.groupBox1.SuspendLayout(); this.groupBox1.SuspendLayout();
this.tabPage_ledtower.SuspendLayout(); this.tabPage_ledtower.SuspendLayout();
this.tabPage1.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
// //
// chbAutoRun // chbAutoRun
...@@ -148,7 +145,6 @@ namespace TheMachine ...@@ -148,7 +145,6 @@ namespace TheMachine
// //
this.tabControl1.Controls.Add(this.tabPage_set); this.tabControl1.Controls.Add(this.tabPage_set);
this.tabControl1.Controls.Add(this.tabPage_ledtower); this.tabControl1.Controls.Add(this.tabPage_ledtower);
this.tabControl1.Controls.Add(this.tabPage1);
this.tabControl1.Dock = System.Windows.Forms.DockStyle.Fill; this.tabControl1.Dock = System.Windows.Forms.DockStyle.Fill;
this.tabControl1.Location = new System.Drawing.Point(0, 0); this.tabControl1.Location = new System.Drawing.Point(0, 0);
this.tabControl1.Name = "tabControl1"; this.tabControl1.Name = "tabControl1";
...@@ -239,25 +235,6 @@ namespace TheMachine ...@@ -239,25 +235,6 @@ namespace TheMachine
this.tabPage_ledtower.Text = "灯塔设置"; this.tabPage_ledtower.Text = "灯塔设置";
this.tabPage_ledtower.UseVisualStyleBackColor = true; this.tabPage_ledtower.UseVisualStyleBackColor = true;
// //
// tabPage1
//
this.tabPage1.Controls.Add(this.fixtureSizeConfigControl1);
this.tabPage1.Location = new System.Drawing.Point(4, 22);
this.tabPage1.Name = "tabPage1";
this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
this.tabPage1.Size = new System.Drawing.Size(1016, 714);
this.tabPage1.TabIndex = 2;
this.tabPage1.Text = "治具设置";
this.tabPage1.UseVisualStyleBackColor = true;
//
// fixtureSizeConfigControl1
//
this.fixtureSizeConfigControl1.Dock = System.Windows.Forms.DockStyle.Fill;
this.fixtureSizeConfigControl1.Location = new System.Drawing.Point(3, 3);
this.fixtureSizeConfigControl1.Name = "fixtureSizeConfigControl1";
this.fixtureSizeConfigControl1.Size = new System.Drawing.Size(1010, 708);
this.fixtureSizeConfigControl1.TabIndex = 0;
//
// SettingControl // SettingControl
// //
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
...@@ -272,7 +249,6 @@ namespace TheMachine ...@@ -272,7 +249,6 @@ namespace TheMachine
this.tabPage_set.PerformLayout(); this.tabPage_set.PerformLayout();
this.groupBox1.ResumeLayout(false); this.groupBox1.ResumeLayout(false);
this.tabPage_ledtower.ResumeLayout(false); this.tabPage_ledtower.ResumeLayout(false);
this.tabPage1.ResumeLayout(false);
this.ResumeLayout(false); this.ResumeLayout(false);
} }
...@@ -288,8 +264,6 @@ namespace TheMachine ...@@ -288,8 +264,6 @@ namespace TheMachine
private System.Windows.Forms.TabControl tabControl1; private System.Windows.Forms.TabControl tabControl1;
private System.Windows.Forms.TabPage tabPage_set; private System.Windows.Forms.TabPage tabPage_set;
private System.Windows.Forms.TabPage tabPage_ledtower; private System.Windows.Forms.TabPage tabPage_ledtower;
private System.Windows.Forms.TabPage tabPage1;
private DeviceLibrary.FixtureSizeConfigControl fixtureSizeConfigControl1;
private UC_SetUserPassword uC_SetUserPassword1; private UC_SetUserPassword uC_SetUserPassword1;
private System.Windows.Forms.GroupBox groupBox1; private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.Label label2; private System.Windows.Forms.Label label2;
......
...@@ -23,6 +23,8 @@ namespace TheMachine ...@@ -23,6 +23,8 @@ namespace TheMachine
public SettingControl() public SettingControl()
{ {
InitializeComponent(); InitializeComponent();
crc.LanguageProcess(this);
crc.LanguageChangeEvent += Crc_LanguageChangeEvent;
RobotManage.LoadFinishEvent += RobotManage_LoadFinishEvent; RobotManage.LoadFinishEvent += RobotManage_LoadFinishEvent;
//chbAutoRun.Enabled = false; //chbAutoRun.Enabled = false;
chbAutoRun.Checked =Setting_Init.App_AutoRun; chbAutoRun.Checked =Setting_Init.App_AutoRun;
...@@ -36,6 +38,11 @@ namespace TheMachine ...@@ -36,6 +38,11 @@ namespace TheMachine
this.cb_tempsensorport.SelectedIndexChanged += new System.EventHandler(this.cb_tempsensorport_SelectedIndexChanged); this.cb_tempsensorport.SelectedIndexChanged += new System.EventHandler(this.cb_tempsensorport_SelectedIndexChanged);
} }
private void Crc_LanguageChangeEvent(object sender, EventArgs e)
{
crc.LanguageProcess(this);
}
private void RobotManage_LoadFinishEvent(bool state, string msg) private void RobotManage_LoadFinishEvent(bool state, string msg)
{ {
if (!state) if (!state)
......
...@@ -17,6 +17,7 @@ namespace TheMachine ...@@ -17,6 +17,7 @@ namespace TheMachine
public FrmPassCheck() public FrmPassCheck()
{ {
InitializeComponent(); InitializeComponent();
crc.LanguageProcess(this);
} }
public static bool CheckPassword() { public static bool CheckPassword() {
......
...@@ -10,6 +10,7 @@ using System.Linq; ...@@ -10,6 +10,7 @@ using System.Linq;
using System.Text; using System.Text;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Windows.Forms; using System.Windows.Forms;
using OnlineStore.Common;
namespace TheMachine.UC namespace TheMachine.UC
{ {
...@@ -21,6 +22,8 @@ namespace TheMachine.UC ...@@ -21,6 +22,8 @@ namespace TheMachine.UC
InitializeComponent(); InitializeComponent();
this.Tag = "not"; this.Tag = "not";
crc.LanguageChangeEvent += Crc_LanguageChangeEvent; crc.LanguageChangeEvent += Crc_LanguageChangeEvent;
if (!string.IsNullOrEmpty(Setting_Init.Device_Default_Language))
crc.CurrLanguage = Setting_Init.Device_Default_Language;
crc.LanguageProcess(this); crc.LanguageProcess(this);
} }
private void Crc_LanguageChangeEvent(object sender, EventArgs e) private void Crc_LanguageChangeEvent(object sender, EventArgs e)
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!