chenxy 5 vuotta sitten
vanhempi
commit
de2fc3c047
2 muutettua tiedostoa jossa 12 lisäystä ja 0 poistoa
  1. 8 0
      PLC/PLC_S/Core/PLC_S_Core.cs
  2. 4 0
      PLC/PLC_S/EPTS/GoodsPolish/EPTS_GoodsPolish.cs

+ 8 - 0
PLC/PLC_S/Core/PLC_S_Core.cs

@@ -88,6 +88,10 @@ namespace PLC_S
             plcs.PLCServiceType = ini.Read("PLCService", "PLCServiceType");
             plcs.AutoStart = ini.Read("PLCService", "AutoStart").ToBoolean();
             plcs.Port = ini.Read("PLCService", "Port").ToInt32();
+
+            plcs.Interval = ini.Read("PLCService", "Interval").ToInt32();
+            plcs.EPTS_CODE = ini.Read("PLCService", "EPTS_CODE");
+
             plcs.Description = ini.Read("PLCService", "Description");
             plcs.DisplayName = ini.Read("PLCService", "DisplayName");
             plcs.ServiceName = ini.Read("PLCService", "ServiceName");
@@ -102,6 +106,10 @@ namespace PLC_S
             ini.Write("PLCService", "PLCServiceType", plcs.PLCServiceType);
             ini.Write("PLCService", "AutoStart", plcs.AutoStart.ToString());
             ini.Write("PLCService", "Port", plcs.Port.ToString());
+
+            ini.Write("PLCService", "Interval", plcs.Interval.ToString());
+            ini.Write("PLCService", "EPTS_CODE", plcs.EPTS_CODE);
+
             ini.Write("PLCService", "Description", plcs.Description);
             ini.Write("PLCService", "DisplayName", plcs.DisplayName);
             ini.Write("PLCService", "ServiceName", plcs.ServiceName);

+ 4 - 0
PLC/PLC_S/EPTS/GoodsPolish/EPTS_GoodsPolish.cs

@@ -234,6 +234,10 @@ namespace PLC_S.EPTS
                         usercode = "JD2";
                     }
 
+                    outputMessage = $"[{EPTS_CODE}]MES_USERCODE={usercode}";
+                    logger_t.OutputTrace(outputMessage);
+                    FormLogShow?.ShowLog(outputMessage);
+
                     string result = SmartDeviceProxy.Instance.Invoke<string>(
                         p => p.AddWorkPieceByStatus3(_mes_s.AccountCode,
                         usercode,null, plc_ini.P_ID, barcode, roomcode));