|
@@ -159,33 +159,21 @@ namespace MainForm
|
|
|
|
|
|
if (GlobalContext.IsUsePLC1)
|
|
|
FunsEip.Add(1, new Inovance_EIP(GlobalContext.PC1Address, GlobalContext.Machine1Address)); //OP10 壳体清洁上料装备
|
|
|
- //Funs.Add(1, new ModbusClientHelper(GlobalContext.Machine1Address, GlobalContext.MachinePort, 2001)); // Tray盘上料装备(板测)
|
|
|
-
|
|
|
if (GlobalContext.IsUsePLC2)
|
|
|
//Funs.Add(2, new ModbusClientHelper(GlobalContext.Machine2Address, GlobalContext.MachinePort, 2001)); // FCT(板测),
|
|
|
FunsEip.Add(2, new Inovance_EIP(GlobalContext.PC2Address, GlobalContext.Machine2Address)); //OP20 顶盖上料设备
|
|
|
-
|
|
|
if (GlobalContext.IsUsePLC3)
|
|
|
FunsEip.Add(3, new Inovance_EIP(GlobalContext.PC3Address, GlobalContext.Machine3Address)); //OP30 点胶设备
|
|
|
- //Funs.Add(3, new ModbusClientHelper(GlobalContext.Machine3Address, GlobalContext.MachinePort, 2001)); // 值板机,
|
|
|
-
|
|
|
if (GlobalContext.IsUsePLC4)
|
|
|
FunsEip.Add(4, new Inovance_EIP(GlobalContext.PC4Address, GlobalContext.Machine4Address)); //OP40 3D胶线检测
|
|
|
- //Funs.Add(4, new ModbusClientHelper(GlobalContext.Machine4Address, GlobalContext.MachinePort, 2001)); // 取放桁
|
|
|
-
|
|
|
if (GlobalContext.IsUsePLC5)
|
|
|
FunsEip.Add(5, new Inovance_EIP(GlobalContext.PC5Address, GlobalContext.Machine5Address)); //OP50 ADD PCB板上料
|
|
|
- //Funs.Add(5, new ModbusClientHelper(GlobalContext.Machine5Address, GlobalContext.MachinePort, 2001)); //Tray盘下料装备
|
|
|
-
|
|
|
if (GlobalContext.IsUsePLC6)
|
|
|
FunsEip.Add(6, new Inovance_EIP(GlobalContext.PC6Address, GlobalContext.Machine6Address)); //OP60 顶盖装配
|
|
|
-
|
|
|
if (GlobalContext.IsUsePLC7)
|
|
|
FunsEip.Add(7, new Inovance_EIP(GlobalContext.PC7Address, GlobalContext.Machine7Address)); //OP70 锁螺丝
|
|
|
-
|
|
|
if (GlobalContext.IsUsePLC8)
|
|
|
FunsEip.Add(8, new Inovance_EIP(GlobalContext.PC8Address, GlobalContext.Machine8Address)); //OP80 3D螺丝高度检测,NG出料站
|
|
|
-
|
|
|
if (GlobalContext.IsUsePLC9)
|
|
|
FunsEip.Add(9, new Inovance_EIP(GlobalContext.PC9Address, GlobalContext.Machine9Address)); //OP90 下料站
|
|
|
|
|
@@ -300,7 +288,6 @@ namespace MainForm
|
|
|
//XiaomiMqttClient_Extend.SetCallbackWithDataId(CallbackWithDataId);
|
|
|
// 配置参数
|
|
|
XiaomiMqttLoginFunAndParam param = new XiaomiMqttLoginFunAndParam();
|
|
|
- XiaomiMqttLoginFunAndParam2Station param2 = new XiaomiMqttLoginFunAndParam2Station();
|
|
|
// fds
|
|
|
param.parameter.fds.address = "http://file-cm.be.mi.com/file/x5/file/upload/mqtt";
|
|
|
param.parameter.fds.appId = "Auto-Soft";
|
|
@@ -328,10 +315,8 @@ namespace MainForm
|
|
|
}
|
|
|
if (GlobalContext.IsUsePLC3)
|
|
|
{
|
|
|
- param2.left.parameter.equipment.deviceCode = GlobalContext.s3_1_device_code; // 装备编码
|
|
|
- param2.left.parameter.equipment.stationCode = GlobalContext.s3_1_station; // ⼯位Id
|
|
|
- param2.right.parameter.equipment.deviceCode = GlobalContext.s3_2_device_code; // 装备编码
|
|
|
- param2.right.parameter.equipment.stationCode = GlobalContext.s3_2_station; // ⼯位Id
|
|
|
+ param.parameter.equipment.deviceCode = GlobalContext.s3_1_device_code; // 装备编码
|
|
|
+ param.parameter.equipment.stationCode = GlobalContext.s3_1_station; // ⼯位Id
|
|
|
}
|
|
|
if (GlobalContext.IsUsePLC4)
|
|
|
{
|
|
@@ -350,10 +335,8 @@ namespace MainForm
|
|
|
}
|
|
|
if (GlobalContext.IsUsePLC7)
|
|
|
{
|
|
|
- param2.left.parameter.equipment.deviceCode = GlobalContext.s7_1_device_code; // 装备编码
|
|
|
- param2.left.parameter.equipment.stationCode = GlobalContext.s7_1_station; // ⼯位Id
|
|
|
- param2.right.parameter.equipment.deviceCode = GlobalContext.s7_1_device_code; // 装备编码
|
|
|
- param2.right.parameter.equipment.stationCode = GlobalContext.s7_1_station; // ⼯位Id
|
|
|
+ param.parameter.equipment.deviceCode = GlobalContext.s7_1_device_code; // 装备编码
|
|
|
+ param.parameter.equipment.stationCode = GlobalContext.s7_1_station; // ⼯位Id
|
|
|
}
|
|
|
if (GlobalContext.IsUsePLC8)
|
|
|
{
|
|
@@ -370,7 +353,7 @@ namespace MainForm
|
|
|
param.parameter.equipment.productMode = "debug";
|
|
|
//
|
|
|
param.parameter.other.logLevel = 0;
|
|
|
- param.parameter.other.LogPath = "D:\\Test";
|
|
|
+ param.parameter.other.LogPath = GlobalContext.WorkLogDir;
|
|
|
XiaomiMqttClient_Extend.ParameterConfig(param);
|
|
|
}
|
|
|
else
|