Browse Source

修改

master-new-炒锅
liup 1 week ago
parent
commit
f34337623a
2 changed files with 7 additions and 3 deletions
  1. +2
    -2
      .idea/deploymentTargetSelector.xml
  2. +5
    -1
      app/src/main/java/com/bonait/bnframework/business/ExecuteTheRecipe.java

+ 2
- 2
.idea/deploymentTargetSelector.xml View File

@@ -4,10 +4,10 @@
<selectionStates>
<SelectionState runConfigName="app">
<option name="selectionMode" value="DROPDOWN" />
<DropdownSelection timestamp="2024-12-04T08:48:47.031769Z">
<DropdownSelection timestamp="2024-12-17T03:56:07.722915200Z">
<Target type="DEFAULT_BOOT">
<handle>
<DeviceId pluginId="Default" identifier="serial=127.0.0.1:7555;connection=8624e8b9" />
<DeviceId pluginId="Default" identifier="serial=192.168.114.153:5555;connection=bf0f7adc" />
</handle>
</Target>
</DropdownSelection>


+ 5
- 1
app/src/main/java/com/bonait/bnframework/business/ExecuteTheRecipe.java View File

@@ -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) {


Loading…
Cancel
Save