You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@plc4x.apache.org by "Maximilian (Jira)" <ji...@apache.org> on 2022/05/30 05:36:00 UTC

[jira] [Created] (PLC4X-343) Issue with Modbus Write -- PLC Connection Exception: Error Creating Channel

Maximilian created PLC4X-343:
--------------------------------

             Summary: Issue with Modbus Write -- PLC Connection Exception: Error Creating Channel
                 Key: PLC4X-343
                 URL: https://issues.apache.org/jira/browse/PLC4X-343
             Project: Apache PLC4X
          Issue Type: Bug
          Components: Driver-Modbus
    Affects Versions: 0.9.1
            Reporter: Maximilian
         Attachments: image-2022-05-30-13-31-56-320.png, mb1.png, mb2.png, mb3.png

Hi!
 
Thanks for supporting this library.
 
I'd like to seek your advice on an issue I'm having surrounding *writing* to Modbus registers.
 
I have a code snippet as follows:
 
!image-2022-05-30-13-31-56-320.png!
 
I'm able to make about ~100 requests successfully, until I encounter a{{{} PLC Connection Exception: Error creating channel error{}}}. This is consistent with multiple tries.
 
I've tried using {{CachedDriverManagers }}/ {{{}PooledDriverManagers{}}}, but this will result in a NullPointerException when I tried to use its {{PlcConnection }}object to create a {{{}PlcWriteRequest.Builder{}}}. Essentially, the "builder" object is null:
 
!mb2.png!
 
However, I'm able to create {{PlcReadRequest }}builders for reading data; no {{{}NullPointerExceptions{}}}:
 
This is how I'm creating the {{{}CachedDriverManager{}}}:
 
!mb3.png!
 
I've noticed that I will never encounter a maximum buffer limit reached for connections created from the {{{}CachedDriverManager{}}}, used to make Modbus read requests. Hence, I considered using connections created from the CachedDriverManger to make Modbus write requests, {*}however I get a NullPointerException for the "builder"{*}.
 
Hope you could help point me in the right direction, been stuck at this for a couple of days.
 
Thanks!
Regards,
Max
 



--
This message was sent by Atlassian Jira
(v8.20.7#820007)