|
@@ -731,7 +731,7 @@ namespace MainForm
|
|
|
/// <param name="fault_tm">故障发⽣时间</param>
|
|
|
/// <returns>上位机发送1代表OK;2代表上传客户MES失败;3代表上位机保存数据失败;4代表上位机报警;</returns>
|
|
|
|
|
|
- public (int, string) SaveDeviceStateData(string stationNameStr, XiaomiDeviceState deviceState, string fault_code = "A40001", string fault_tm = "")
|
|
|
+ public (int, string) SaveDeviceStateData(string stationNameStr, XiaomiDeviceState deviceState, string fault_code = "A40000", string fault_tm = "")
|
|
|
{
|
|
|
int result = 0;
|
|
|
string msg = "";
|
|
@@ -750,14 +750,13 @@ namespace MainForm
|
|
|
if (GlobalContext.IsUsePLC3)
|
|
|
request.station = GlobalContext.S3_station; // 工位ID(可配置)
|
|
|
if (GlobalContext.IsUsePLC4)
|
|
|
- {
|
|
|
request.station = GlobalContext.S4_1_station; // ⼯位ID(可配置)
|
|
|
- //request.station = GlobalContext.S4_3_station; // ⼯位ID(可配置)
|
|
|
- //request.station = GlobalContext.S4_4_station; // ⼯位ID(可配置)
|
|
|
- //request.station = GlobalContext.S4_5_station; // ⼯位ID(可配置)
|
|
|
- }
|
|
|
if (GlobalContext.IsUsePLC5)
|
|
|
request.station = GlobalContext.S5_station; // 工位ID(可配置)
|
|
|
+ if (GlobalContext.IsUsePLC6)
|
|
|
+ request.station = GlobalContext.S6_station; // 工位ID(可配置)
|
|
|
+ if (GlobalContext.IsUsePLC7)
|
|
|
+ request.station = GlobalContext.S7_station; // ⼯位ID(可配置)
|
|
|
|
|
|
request.state = deviceState.ToString(); // 设备状态
|
|
|
request.time = dtNow.ToString("yyyy-MM-dd HH:mm:ss.fff"); // 状态切换时的时间 2022-06-01 14:27:57.283
|