08-09-2023 03:48 AM
Hi,
I try to communicate with a stepper motor controller via RS485. The device is functional for sure because it was shipped with an app which can operate the device. Whenever I change a setting in this software it displays the bus communication at the bottom of the app:
If I use simple VISA serial nodes and send out the same message what I see in the TX line, then I receive the same response with labview as what I receive in the app, so I certainly can communicate with the controller.
I dont necessarily want to write my own modbus driver though so I wanted to use what comes with (I guess) the NI-RT module. I couldnt make it work though and I'm wondering if I made a mistake, or if there is some sort of a hidden knowledge what I dont know about.
I assume the VI below should receive a similar response than what I see in the app:
Instead: the VI finishes without an error. It returns an array with only zeros. Also from this point I can't connect to the device via the application because it says the serial port is busy. I need to run a VISA close VI first, so the VI shown in the snippet actually doesnt close the serial port. I have tried to read the individual coils, tried to read different addresses, and did some other experiments, but all of them has the same result: no response at all from the device.
Pls let me know if you have any ideas.
Thx!
Solved! Go to Solution.
08-09-2023 03:59 AM
You need to create a master. The master initiates communication and the slave responds.
08-09-2023 04:26 AM
Oh shoot... that, plus I had to set the parity to "none" instead of the default "even".
Thanks mate 🙂