You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@plc4x.apache.org by GitBox <gi...@apache.org> on 2022/12/22 12:07:49 UTC

[GitHub] [plc4x] SteinOv commented on issue #710: modbus-tcp Write Request coil always set to false

SteinOv commented on issue #710:
URL: https://github.com/apache/plc4x/issues/710#issuecomment-1362763771

   I found the cause of the bug!
   On line 144 in the write() method in ModbusTcpProtocolLogic there is a ModbusPDU object called requestPdu. This object has a field "value" which is a byte[]. In release 0.9.1 this array contains one value: 0 if false was set and 1 if true was set. In release 0.10.0 this array contains two values. The first seems to be always 0 and the second is 0 if false was set and 1 if true was set.
   This array originates from the fromPlcValue() method. I hardcoded it to return `new byte[]{1};` and then the coils are set to true.
   
   I'll try to figure further what is going wrong exactly and how to fix it.


-- 
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: issues-unsubscribe@plc4x.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org