Hi everyone,

i'm trying to complete some tests connecting a Modbus RTU device (digital
input converter).

The device is connected using a USB/485 converter, running with pyModbus
i'm able to communicate with the device.

I'm using this connection string:

PlcConnection plcConnection = new
PlcDriverManager().getConnection("modbus:serial:///dev/ttyUSB0?unit-identifier=1");

Then:
PlcReadRequest.Builder builder = plcConnection.readRequestBuilder();
builder.addItem("value-0", "holding-register:14");
PlcReadRequest readRequest = builder.build();
PlcReadResponse response = readRequest.execute().get();

But i was unable to obtain a response, watching at the logs there are
plenty of:
io.netty.channel.nio.NioEventLoop        : Migrated 1 channel(s) to the new
Selector.
Selector.select() returned prematurely 512 times in a row; rebuilding
Selector
org.apache.plc4x.java.transport.serial.SerialPollingSelector@37f2b566.

Another important part is that i'm unable to find where i can configure the
serial communication parameters, like baud rate, stop bits, etc.

Greetings,
Alessio

Reply via email to