Using Modbus Support for Shared Variables in LabVIEW 8.0 or Later

FieldPoint cFP-180x Modbus

Using Modbus Support for Shared Variables in LabVIEW 8.0 or Later

The LabVIEW Real-Time Module and LabVIEW DSC include Modbus support for LabVIEW shared variables. You must select Modbus Support while installing the LabVIEW Real-Time Module or LabVIEW DSC. The installers do not install Modbus support by default.

Modbus Support for Shared Variables uses a 1-based addressing system. FieldPoint Modbus addresses are zero-based, so you must add 1 to a FieldPoint Modbus address to read or write to the correct address.

Modbus Support for Shared Variables uses six-digit addresses. You must prepend the first (most significant) digit to all FieldPoint Modbus addresses. The six-digit addresses function as described in the following list:

  • 000001-065535—Access single-bit coils. You can use addresses in this range to read or write Boolean data. Example:You want to write Boolean data to channel 7 of a cFP-DO-401 in slot 2 of a cFP-180x. The FieldPoint Modbus address is 02007. The address you would use in LabVIEW is 002008.
  • 100001-165535—Read single-bit discrete inputs. You can use addresses in this range to read Boolean data. Example: You want to read Boolean data from channel 15 of a cFP-DI-304 in slot 3 of a cFP-180x. The FieldPoint Modbus address is 03015. The address you would use in LabVIEW is 103016.
  • 300001.1-365535.16—Read individual bits out of input registers and regard them as logical TRUE/FALSE values. The least significant bit is 1; the most significant is 16.
  • 300001-365535—Read 16-bit input registers encoded as unsigned integers ranging from 0 to 65535. You can use addresses in this range to read unscaled I/O data or channel attributes. Example: You want to read the Resolution attribute for Pulses Remaining channel 4 on a cFP-PG-522 in slot 3 of a cFP-180x. The FieldPoint Modbus address is 13035. The address you would use in LabVIEW is 313036.
  • 400001.1-465535.16—Read individual bits out of holding registers and regard them as logical TRUE/FALSE values. The least significant bit is 1; the most significant is 16.
  • 400001-465535—Access 16-bit holding registers encoded as unsigned integers ranging from 0 to 65535. You can use addresses in this range to read and write unscaled I/O data or channel attributes and commands. Example: You want to send a Stop Immediately command to Pulses Remaining channel 3 on a cFP-PG-522 in slot 6 of a cFP-180x. The FieldPoint Modbus address is 26027. In LabVIEW, you would write x03FF to address 426028.

For more information, refer to the Creating Modbus I/O Servers topic of the LabVIEW Help.