Accessing intelligent field device diagnostic data

External reference expressions

A module can use external reference expressions to gain access to a diagnostic parameter. DeltaV provides no browser support or wizards with which to create the path required to reference bus device diagnostic data directly from an external reference parameter. Instead, you must manually enter a path with the following syntax, including the special prefix, /&:

/&device_specifier/parameter_specifier/data_type

Path component

Description

/&device_specifier

The device tag that uniquely identifies the field device. The device tag must be prefixed by the special character sequence /&. The /& prefix enables the database to do limited verification of the path.

Note  An invalid reference following the device_specifier, such as a negative number or number containing a decimal point, is not checked and no warning will indicate that it could not be resolved.

parameter_specifier

The device-dependent component or set of components that uniquely identifies the parameter.

data_type

The component of the path that specifies the expected data type of the value in the device. DeviceNet and fieldbus devices require the data_type component for access to diagnostic data. The path for a Profibus DP device, however, does not use the data_type component.

Valid data_type components include:

  • FP — Floating point

  • FS — Floating point with status (fieldbus only)

  • DS — Discrete with status (fieldbus only)

  • UI — Unsigned integer

  • SI — Signed integer

  • SG — String

Important

A reference to diagnostic data in an internal write parameter or in an input or output parameter results in a database error.

Fields in external references parameters

The following fields can be used in an expression to specify an external reference parameter:

Field

Description

CV

The current parameter value. This is the default if field is not otherwise specified.

ST

Status

DeviceNet:

  • Good (128)

  • No usable value (24)

  • Timeout (20; or 24, if no previous usable value)

  • Loss of communication (20; or 24, if no previous usable value)

  • Configuration error (4)

Fieldbus:

  • Good (device-dependent, per fieldbus standard)

  • No usable value (24)

  • Loss of communication (20; or 24, if no previous usable value)

  • Configuration error (4)

Profibus DP:

  • Good (128)

  • No usable value (24)

  • Timeout (20; or 24, if no previous usable value)

  • Loss of communication (20; or 24, if no previous usable value)

CST

Communications status, an 8-bit signed value. The following are valid values:

  • COMM_STATUS_NORMAL

  • COMM_STATUS_MODULE_NOT_CONFIGURED

    (e.g. invalid path)

Examples

The following sections illustrate specific examples of the path required to reference bus device diagnostic data directly from an external reference parameter.

Fieldbus

The parameter_specifier component (leading zeroes are not required) consists of the object index of the parameter and an optional subindex. The subindex is not required if the path is to a parameter that has status.

object_index/subindex/data_type

where:

  • object_index is the object index in the form OInnnnn, with nnnnn representing the UINT16 object index number, 0 through 65535

  • sub_index is the optional subindex in the form SUnnn, with nnn representing the UINT8 subindex number, 0 through 255

  • data_type is the expected data type of the value.
Note

The Object Index and Sub-Index can be obtained from the device’s manual or in the Device Descriptor (If it is not indicated on the manual, we recommend contacting the manufacturer directly regarding this information).

An exported .fhx file for the device opened in a text editor is used to find the data type for the parameter.

The following format should be followed when referencing the read-only parameters in a parameter module:

/& Device Tag/Object Index/Sub Index/ Data Type

For example, for a device named PDT1 at an address within the valid range of 20-35, a module can use the following path to read the parameter at object index 1200 as float:

/&PDT1/OI1200/FS

To read the third field of a float array at object index 1400, a module can use the following path:

/&PDT1/OI1400/SU3/FP

The following example references the Emerson DVC6000 valve Fieldbus device and the parameters Cycle Count and Supply Pressure Value.
  1. Identify which parameter is going to be accessed (Cycle Count and Supply Pressure Value in this example.)
  2. From the device manual and its Device Descriptor, Cycle Count has an Object Index of 73 while Supply Pressure Value has an Object Index of 35.2.
    • 0.2 is the Sub-Index for the Supply Pressure Value.
  3. Add two Internal Read Parameters in the module and set both as an External Reference.
  4. Using the .fhx export, read the “TYPE=” for the Cycle_Count to find the data type is UINT32 (UI) and the data type for Supply_Pressure is a FLOAT (FP).
  5. For this example, the device tag is PY1. Enter /&PY1/OI1273/UI for Cycle Count and /&PY1/OI35/SU2/FP for Supply Pressure.
    • The 12 in OI1273 denotes the transducer block (1200).

DeviceNet

Modules can read a read-only parameter for a DeviceNet device. The parameter_specifier component (leading zeroes are not required) consists of the class code, instance, and attribute ID.

Note

In order to determine the values of the parameter_specifier, the exported EDS or fhx file of the DeviceNet device should be accessed using a text editor. The components can be found under the Parameter field in the .fhx file. The class, instance, attribute and data type are shown.

Cnnnnn/Innnnn/Annn

where:

  • Cnnnnn represents the UINT16 class code, 0 to 65535

  • Innnnn represents the UINT16 instance, 0 to 65535

  • Annn represents the UINT8 attribute ID, 0 to 255

For example, for a device named PDT1 at address 16, a module can use the following path to read the parameter at class code 1, instance2, and attribute ID 33 as float:

/&PDT1/C1/I2/A33/FP

Note

By default, DeltaV assumes that DeviceNet devices represent diagnostic parameters in little-endian format, as defined by the DeviceNet protocol.

The format to reference the read-only parameters is /& Device Tag/Class/Instance/Attribute/Data Type.

Tip

DeltaV reads raw values stored by a DeviceNet device. For a parameter stored as an integer, but which needs to be displayed as a floating point value, you may need to add either a Divide (DIV) function block or other expression to appropriately scale the value. For example, if a value is stored as the unsigned integer 47, and the meaning of the value is hundredths of amps, you can specify that the value be divided by 100 to force it to display as 0.47.

The following example references the Allen-Bradley 1790D-T0W6 6 Relay Outputs DeviceNet device. The parameter to be accessed is the AutoBaud.
  1. Locate the device’s values and data type in the FHX export, where the following is found for the AutoBaud parameter:
    • LINK_PATH_CLASS_ID=3

    • LINK_PATH_INSTANCE_ID=1

    • LINK_PATH_ATTRIBUTE_ID= 100

    • TYPE=DEVICENET_INT16

  2. Add an Internal Read Parameter in the module and set it as an External Reference.
  3. Assuming that the device tag is PDT1, enter /&PDT1/C03/I01/A100/SI

Profibus DP

Every Profibus DP device is given a byte array, including status, named DIAGMSG that contains the diagnostics message appearing in DeltaV Diagnostics. The first 6 bytes of the array have fixed meaning; the remaining bytes, if any, are device-dependent. The size of the array can be determined by reading the ROWS field of the parameter. You can read individual bytes from the array using the same [index] syntax supported by floating point arrays. The maximum size of the array is 220 bytes; if necessary, the diagnostic message is truncated and bytes beyond the limit are not accessible.

Because access to Profibus DP diagnostic information is through a well-known parameter name, the parameter_specifier component of the path is always DIAGMSG and the data_type component is not used.

The format to reference the diagnostic information is /& Device Tag/DIAGMSG.

For example, a module can use the following path to read a Profibus DP diagnostics parameter (assuming the device tag is PDT1):

/&PDT1/DIAGMSG