chrisdutz commented on issue #1068: URL: https://github.com/apache/plc4x/issues/1068#issuecomment-1740885327
So ... for the sake of being right here, I wrote this little program, and it worked as it should ... So I guess you were doing it wrong. But at least you can use this example for knowing how it was supposed to be used (However I wouldn't reccomend this pattern in general ... wir modbus it's ok, but with other drivers such as ADS, this approach would be very imperformant). ``` public static void main(String[] args) throws Exception { try (PlcConnection plcConnection = PlcDriverManager.getDefault().getConnectionManager().getConnection("modbus-tcp://127.0.0.1")) { PlcReadRequest readRequest = plcConnection.readRequestBuilder().addTagAddress("Bool", "holding-register:1000:BOOL").build(); PlcReadResponse readResponse = readRequest.execute().get(); } try (PlcConnection plcConnection = PlcDriverManager.getDefault().getConnectionManager().getConnection("modbus-tcp://127.0.0.1")) { PlcReadRequest readRequest = plcConnection.readRequestBuilder().addTagAddress("Bool", "holding-register:1000:BOOL").build(); PlcReadResponse readResponse = readRequest.execute().get(); } } ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@plc4x.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org