|
|
@@ -1901,24 +1901,28 @@ public class ExecuteTheRecipe { |
|
|
|
{ |
|
|
|
ModbusTcpServer.get().ReadInt(plcaddress.address, 1, ints -> { |
|
|
|
ReturnsVariable[0] = ints[0]; |
|
|
|
ConfigName.getInstance().PlcIsConnect = true; |
|
|
|
}); |
|
|
|
} else if (plcaddress.address.toUpperCase().startsWith("M"))//bool |
|
|
|
{ |
|
|
|
ModbusTcpServer.get().ReadBool(plcaddress.address, 1, val -> { |
|
|
|
ReturnsVariable[0] = val[0]; |
|
|
|
ConfigName.getInstance().PlcIsConnect = true; |
|
|
|
}); |
|
|
|
} else if (plcaddress.address.toUpperCase().startsWith("VW"))//short |
|
|
|
{ |
|
|
|
ModbusTcpServer.get().ReadShort(plcaddress.address, 1, val -> { |
|
|
|
ReturnsVariable[0] = val[0]; |
|
|
|
ConfigName.getInstance().PlcIsConnect = true; |
|
|
|
}); |
|
|
|
} else if (plcaddress.address.toUpperCase().startsWith("VR"))//float |
|
|
|
{ |
|
|
|
ModbusTcpServer.get().ReadFloat(plcaddress.address, 1, val -> { |
|
|
|
ReturnsVariable[0] = val[0]; |
|
|
|
ConfigName.getInstance().PlcIsConnect = true; |
|
|
|
}); |
|
|
|
} |
|
|
|
ConfigName.getInstance().PlcIsConnect = true; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} catch (Exception ex) { |
|
|
|