11-05-2020 05:05 PM
Hello all, I tried to use modbus for rs485 serial connection for three temperature controllers, but I always get error 56 (code attached). The working computer got another labview code for the same connection and it works well, which did not use modubs library. I'm wondering in my case where the problem is. Could anyone please give suggestions? Thank you.
11-05-2020 06:14 PM
Error 56 is a timeout error which usually indicates that nothing is attached on the other end of whatever you're trying to connect to.
It's also usually a TCP/IP error, so it's a little weird that a RS485 connection would generate it. Any chance you're accidentally trying to address it with an Ethernet connection? I don't have the NI Modbus library installed on this PC so I can't see if the RS485 version can still generate error 56.
Anyway, best bet is just to verify your connection, both physically and in the configuration. Maybe you're using the wrong COM port or have a bad cable, for instance.
11-06-2020 02:03 AM
Hi,
For our devices I always create my own ModBus VI's and never use r the library. Also because we have dedicated ModBus commands next to the standard commands.
You did both !!! You are using the library and you are constructing a ModBus message. You are wiring that ModBus message into a register.
The register to write (0 in this VI) and the register data must be connected to the register write VI.
Just as you did for the register read.
See the modified VI
Kees