So I bought a house that's controlled by some remarkably cheap xLogic PLCs which speak a slightly off variant of Modbus RTU and TCP, and I can't seem to get AdvancedHMI to communicate with them.
The xLogic devices don't perfectly follow the modbus standard. According to the awesome introductory video on Modbus referenced below, input registers should be accessed with command 0x4 and live in the 30,000 range. They seem to have invented their own addressing scheme, though. The PLC has 8 analog input registers, which are accessed with command 0x3 at addresses 1024-1031, and I've had good luck communicating with them with qModMaster through a Prolific USB-RS485 adapter.
But not with AdvancedHMI. I've tried hooking up a DigitalPanelMeter to addresses "1024", "3:1024", "31024", "031024", as well as "41024" and "041024". No luck. I just variously get zero, -999, or "invalid response".
I've been trying the above with a ModbusTCPCom1 with a UnitID of CType(1, Byte) (because I have a TCP device at modbus address 1. I've also tried the above with a ModbusRTUCom1 with a StationAddress of CType(2, Byte) (because I have an RTU device at modbus address 2). I've tried various combinations of SwapBytes and SwapWords, and reduced the MaxReadGroupSize to 1.
Am I overlooking something? Is AdvancedHMI just refusing to talk to the non-standard addresses?
References:
xLogic PLC:
https://www.aliexpress.com/item/xLogic-Alternative-of-Siemens-LOGO-programmable-logic-controller-mini-PLC/490250595.htmlqModMaster:
https://sourceforge.net/projects/qmodmaster/xLogic's RTU addressing:
http://www.xlogic-plc.com/Modbus%20RTU%20PROTOCOL.pdfAwesome modbus video:
https://www.youtube.com/watch?v=k993tAFRLSE