Hi Adam,

thanks for the hint.
I guess this simply is a bug.

Let me have a look.

Julian

Am 09.08.20, 00:34 schrieb "Adam Rossi" <ac.ro...@gmail.com>:

    Howdy. I am using Plc4x for modbus tcp integration.

    For my application I need to specify the slave ID in the following format:

    modbus://192.168.0.1:503?unit-identifier=50

    This works for a single PlcConnection. However, parameters are not
    supported in the PooledPlcDriverManager, I get this exception:

    Caused by: org.apache.plc4x.java.api.exceptions.PlcConnectionException:
    java.lang.IllegalArgumentException: modbus://
    192.168.0.5:503?unit-identifier=50 doesn't match
    
^(?<poolablePart>modbus:(tcp://(?<host>[\w.]+)(:(?<port>\d*))?|serial://(?<serialDefinition>((?!/\d).)*)))/?(?<params>\?.*)?
    at
    
org.apache.plc4x.java.utils.connectionpool.PooledPlcDriverManager.getConnection(PooledPlcDriverManager.java:117)

    Is there a reason the pool does not like parameters for tcp (but does
    accept them for serial modbus)?

    Thanks for all of the hard work here. Wonderful project! Regards, Adam

Reply via email to