08-02-2021 12:59 PM
I am brand new to Modbus and I have the new free Modbus libraries for Master and Slave. I see so many VIs I don't know where to start. My application is Master LabVIEW and Slave a UR robot controller. How does the Master communicate or identify with the Slave; is it a IP address setup or device ID and which VIs are needed for simple read/write handshaking?
08-02-2021 03:50 PM
Here's a good Introduction to Modbus
Here's a thread dedicated to the NI Modbus Library
In general Modbus is somewhat simple as most of the hairy details have been abstracted out by the Modbus libraries.
The manual for your device is going to be extremely important as it should contain a "register map" that you will require to read and write values and any scaling information. "Registers" are analogous to memory locations and when you need to get data from a device you "Read a "Holding Register"" (sometimes you have to read multiple registers and combine the integers then convert it to floating point using the scale factors given in the manual), you change device settings by Writing a register, you open and close relay contacts by Writing a "Coil".
Using an IP address or Device ID all depends on your communication method. If you are using serial (RS-232/485/etc.) then you use a Modbus Device ID if you are using Modbus over Ethernet (Modbus RTU) then you use the device IP address like any other Ethernet device.