Rockwell Automation PLC-5 Fieldbus Solutions for Integrated Architecture User Manual User Manual

Page 293

Advertising
background image

Publication 1757-UM006A-EN-P May 2002

1788-CN2FF Installation Example F-45

Figure F.6 Data Values

The first double word is the pad. The pressure is contained in word 1.
Remember, the pressure is returned as a floating-point value. You are
currently viewing it in a DINT. Word 2 contains the 2 status bytes.

As you look at the values you realize that in their current
representation the values are not of much use. Your first thought is to
create a bunch of copy instructions to copy the values into their
proper data type. Then you think that could end up being a lot of
instructions if there were a lot of values.

A HA! You think, this is a great opportunity to take advantage of the
User Defined Data Type feature of the ControlLogix processor. We can
take this cryptic information coming from the Linking device and with
a single copy instruction have it formatted into tags which we can
easily read and use. Let's create a data type for the linking device.

3. Go offline with RSLogix 5000.

4. In the controller organizer, right mouse on User Defined under

the Data Types folder and select New Data Type from the
popup menu.

5. Set the name of the data type to: FF_Linking_Device

6. In the first line of the Name column for the members below,

type: Pad

7. Tab over to the data type column and set the data type to DINT.

We are using DINT for the first member since we know that the
linking device sends 2 INT words of pad, which equals 1 DINT.
We could have set the data type to INT and then set the size to
2.

8. On the second line type a name of: Pressure

9. Set the data type to REAL (REAL = floating point).

Advertising