Skip to content

Conversation

IsmoLeszczynski
Copy link
Contributor

This PR addresses both #2060 and #2059.

66467ef : The ModbusOptimizer handling for reading Coils and Discrete Inputs didn't check if the response was actually an array of booleans, always returning only the first bit instead of a list of bits in such cases. I added support for checking should the response be handled as a PlcBOOL or PlcList.

cdebad6 : The driver originally had support for Byte Swapping, but it the world of Modbus there is also need for Word Swapping, and even a combination of both. I extended the ModbusByteOrder to include the new variations. Given, having the different variations in the enum isn't perfect, but it required the least changes and won't break anything. Alternatively these could be as separate options, but I don't think it's worth the effort.

IsmoLeszczynski and others added 7 commits April 9, 2025 14:29
Fix Discrete Input handling when processing response
Fixed endianness resolution to check modbusTag overrides
Fixed response handling for Modbus Coil and Discrete Input arrays
Added support for Modbus Word Swapping
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant