12-05-2017 11:37 AM
Hi all,
I am trying to poll modbus data from a device that requires that its slave/device id be specified. I'm not sure how to do that in LabVIEW. I have other devices on the network that do not require that parameter, and this code works for them:
I also know that the rest of my parameters are correct and my slave is properly networked because I am able to poll it using CAS Modbus Scanner with the correct device ID specified.
Is there a way to do this in LabVIEW?
Thank you,
Amanda
12-05-2017 12:18 PM
Depends on which Modbus API you are using. The Modbus API that comes with the LabVIEW DSC / Realtime modules has a "Set Unit ID" VI specifically for this. Are you using this one? Check to see if something similar exists for your API.
12-05-2017 12:20 PM
I figured it out (of course, immediately after posting).
It's in the MBAP header. The MBAP header is a cluster of the transaction ID and unit ID, and is an input to the MB Ethernet Master Query.vi. I made it a control to specify on the front panel. I don't know anything about the Transaction ID, but specifying the Unit ID is what I was looking for and I'm able to poll the data now.
01-09-2018 04:25 PM
I ran into a similar problem, except I was using the Modbus Library that is part of RT/DSC Toolkit. Setting unit ID through property node works as well in additional how tyk007 described above.
I posted my query here - just for reference