Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The HART Command object specficies a particular HART command and defines data types and RTDB registers in which to store the data used in communication with the HART device. HART Command objects are dynamically referenced by HART Field Unit Poll Tables. The name of the object is what is shown in the dropdown list of the Field Unit HART → Poll Table → Command Index column.

The definition of a HART command within the ACE configuration requires knowledge of the command structure (Data portion only), as published by the HART Communication Foundation or manufacturer device-specific command documentation. For example, HART universal command #3 returns the loop current and up to four process variables and units codes. The command #3 documentation describes the following structure:

Request Data Bytes

...

 

Response Data Bytes

ByteFormatDescription
0-3FloatPrimary Variable Loop Current (mA)
4EnumPrimary Variable Units Code
5-7FloatPrimary Variable (floating point, in engineering units)

...

This object defines the Data Type of fields associated with the particular HART command, and RTDB addresses in which to store the values returned from or sent to the device. The database addresses must be defined in the RTDB of the HART Field Unit which is referencing the particulart HART Command definition.

Data Type: Choose the correct datatype associated with the selected action

Action: There are 3 types of actions to choose from, and the order in which the actions appear in the table affect the behavior of the RediGate

Read and Store: This action takes the response from the HART command and stores the data (whose type is defined by the selection in the "Data Type" column) in the RTDB address specfied in the "Address" column

Read and Discard: This action takes the response from the HART command and does not store it in any RTDB register

...

 

AttributesFunction
Object TypeHartCommands 
Parent(s)System → Clients → Master Channels → HartCommands 
InstanceMust be between 0 and 256
PropertiesValues
Hart CommandHART command number as defined in the HART protocol (universal, common practice, or device-specific).
Definition Table

This object defines the Data Type of fields associated with the particular HART command, and RTDB addresses in which to store the values returned from or sent to the device. Data fields must be included in this table in the order in which the bytes occur in the HART Data message.

If more Data bytes are received from a device than are referenced in this table, they are automatically discarded. Similarly, if the HART Command definition includes more bytes than are included in the actual HART message, command processing will cease when the bytes run out.

Data Type: Choose the correct datatype associated with the selected Action (Store, Discard, or Write) in order to parse bytes from the HART command message.

  • Byte Value – process a single Data byte.
  • Integer Value – process two bytes Data bytes.
  • Unsigned 24 bit Integer – process three Data bytes.
  • Unsigned 32 bit Integer – process four Data bytes.
  • IEEE Floating Point – process four Data bytes, store as REAL32.
  • IEEE w/ discarded units code (5 bytes) – discard one Data byte, then process four Data bytes as REAL32 (this is used with commands that send a units code and variable value, if you don't wish to store the units code into the RTDB).
  • 4 Character ASCII (3 bytes) – process three Data bytes, store as 4 ASCII characters (HART uses a 6-bit ASCII to pack four characters into three bytes).

Action: Select one of three actions for processing bytes in HART command messages.

Read and Store: This action takes the response from the HART command and stores the data (whose type is defined by the selection in the "Data Type" column) in the RTDB address starting at the specified "Address" location.

Read and Discard: This action takes the response from the HART command and does not store it in any RTDB register (discards the bytes).

Write Data: This action is used for commands written to a HART device. Data is taken from the RTDB address starting at the specified "Address" location and builds an output message to the device according to the Data Type and Count. The values are sent in the order in which these "Write Data" entries are defined in the Definition Table for the command.
Before calling a HART Command with a Write Data action, the values of the registers in the Address column must be set in some way (pre-initialized in the RTDB, written from a host, changed using a POD or ISaGRAF logic, etc.).

Count: Enter the number of sets of HART command Data to process according to the Data Type and Action specified.

Address: Enter a starting RTDB address register in which to store the bytes identified by Data Type format. For Write actions, the RediGate will use the current values in the registers to create the Data messages sent to the device. For Read and Discard actions, the Address field is unused.
The correct quantity of database addresses for Read and Store or Write actions must be defined in the RTDB of each HART Field Unit that uses this HART Command.

Comment: The Comment column is an optional field, allowing a description to be entered for each row in the table. This is only for the user and has no effect on the operation of the RediGate. 

 

Examples of HART Command Definitions

The definition of a HART Command within the ACE configuration requires knowledge of the command structure (Data portion only), as published by the HART Communication Foundation or manufacturer device-specific command documentation. Some examples are given below.

Command 3 - Read Dynamic Variables and Loop Current

For example, HART universal command #3 returns the loop current and up to four process variables and units codes (secondary, tertiary, and quaternary variables are optional). The command #3 documentation describes the following structure:

Request Data Bytes

ByteFormatDescription
None 

(i.e., the Request for HART command #3 includes no bytes in the Data portion of the message)

 

Response Data Bytes

ByteFormatDescription
0-3FloatPrimary Variable Loop Current (mA)
4EnumPrimary Variable Units Code
5-8FloatPrimary Variable (floating point, in engineering units)
9Enum Secondary Variable Units Code
10-13 Float Secondary Variable
14 Enum Tertiary Variable Units Code 
15-18Float Tertiary Variable 
19 Enum Quaternary Variable Units Code 
20-23 Float Quaternary Variable 

To create a HART Command definition in ACE that will read up to four process variable and milliamp current (but discard the unit codes), a Command definition would be constructed as shown below. The minimum required RTDB configuration is also shown. This command would be scanned in the Master Channel using the Unit Address of the device (as configured in ACE) and the Poll Record number (row number of this HART Command in the device's Poll Table).