NI Home
Cart Cart | Help
Hello Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI
You are here: 
NI Home > NI Developer Zone > NI Discussion Forums


Reply
Member
Switchgear
Posts: 2
0 Kudos

Using the cFP-180x as a Modbus Device

I'm using the cFP-1804 as a Modbus Device and I'm having trouble understanding how the FieldPoint Modbus Addresses are defined.  I am Not using LabView to configure this device.  A Modicon PLC is connecting to this remote I/O over Ethernet to monitor 7 inputs and control 6 outputs.  I found the help document labeled "Using the cFP-180x as a Modbus Device".  The address consists of 5 digits.  I'm using a cFP-DIO-550 I/O module in slot 1.  What would the address be for Channel 0 of the Input side, and Channel 0 for the Output side?   Thanks.

Member
Zach-H
Posts: 175
0 Kudos

Re: Using the cFP-180x as a Modbus Device

FieldPoint Modbus Addresses

A FieldPoint Modbus address consists of five digits. The most significant (first) digit represents the type of FieldPoint data.

  • 0—Raw I/O data.
  • 1—Attributes.
  • 2—Commands.
  • 3—Scaled 32-bit data.

The second most significant digit of the Modbus address represents the position of the FieldPoint module. For example, Modbus address 13xxx refers to FieldPoint attribute data for a module in slot or position 3.

The meanings of the remaining three digits vary depending on which type of FieldPoint data the address represents.

FieldPoint Data TypeModule PositionMeaning of Three Least Significant Digits
0 x Each address represents one channel. For example, 02000-02015 point to the unscaled I/O data for channels 0-15 on the module in slot or position 2.
1 x Eight addresses are reserved for each channel. Each address points to one word, and each of the two bytes in each word can hold one attribute. For example, 14000-14007 point to eight words that represent up to 16 attributes for channel 0 on the module in slot or position 4. The most significant byte in each word represents the lower-indexed attribute. If you want to affect only one attribute of an address that contains two attributes, read the address before writing, then write the current value to the byte you do not want to change.
2 x Eight addresses are reserved for each channel. Each address points to one word, and each of the two bytes in each word can hold one command. For example, 23008-23015 point to eight words that represent up to 16 commands for channel 1 on the module in slot or position 3. The most significant byte in each word represents the lower-indexed command. When writing words to FieldPoint command addresses, write 00 to a byte if you do not want to affect the command that byte represents.
3 x Each pair of two consecutive addresses points to the 32-bit scaled I/O data for one channel. For example, 31000 and 31001 point to the 32-bit scaled I/O data for channel 0 on the module in position 1.
Applications Engineer
National Instruments
CLD Certified
Member
Zach-H
Posts: 175
0 Kudos

Re: Using the cFP-180x as a Modbus Device

The DIO-550 is strange though, because it has input and output channels. Based on that layout I think you'll want to use 01000 for the input and 01008 for the output based on how the pins match up to the input and output channels. 

Applications Engineer
National Instruments
CLD Certified
Member
Switchgear
Posts: 2
0 Kudos

Re: Using the cFP-180x as a Modbus Device

Zach,

 

There was an offset of +1, so actually the inputs started at 01001, and the outputs started at 01009.  It's working great now.  Thanks for your help.

Member
Zach-H
Posts: 175
0 Kudos

Re: Using the cFP-180x as a Modbus Device

Interesting, apparently they're 1-indexed instead of 0-indexed. Thanks for letting me know, I'm glad I could help. 

Applications Engineer
National Instruments
CLD Certified
By using this web site, you accept the Terms of Use for this web site. Please read these Terms of Use carefully before using any part of this site. Please go here for information on ni.com's copyright infringement policy.
My Profile | Privacy | Legal | Contact NI © 2011 National Instruments Corporation. All rights reserved.    |    E-Mail this Page E-Mail this Page