Execute HART Commands Through Producer/Consumer Data

These are some guidelines to execute HART commands through Producer/Consumer Data.
  • A command execution starts with a rising edge of Command.Execute in the consumer data.
  • Command.ReadyToExecute
    in the producer data is reported as 1 for a HART device when the HART device has no outstanding commands that are initiated from the consumer data and Command.Execute is 0 in the latest received consumer data.
  • Set
    Command.Execute
    to 1 only when
    Command.ReadyToExecute
    is 1.
  • After initiating a command execution, set it back to 0 once
    Command.ReadyToExecute
    of 0 in producer data is received.
    Command.ReadyToExecute
    transitioning from 1 to 0 indicates that the HART module has received the command execution request.
  • After a command is complete, check the status of all producer data in the
    Command
    tag before retrieving the response data of the command.
A Typical Command Execution Sequence
  1. To execute a HART command, set Command.Execute to 1 in the consumer data when
    Command.ReadyToExecute
    = 1 in the producer data of the HART device.
  2. After the HART module receives the consumer data,
    Command.Active
    = 1 and
    Command.ReadyToExecute
    = 0 are reported in the producer data of the HART device.
  3. Once the controller receives
    Command.ReadyToExecute
    = 0, which means that the module has received the execution request, you can set
    Command.Execute
    to 0 in the consumer data.
  4. When the HART command execution is complete, the HART module reports
    Command.Completed
    = 1 and
    Command.ReadyToExecute
    = 1 in the producer data of the HART device together with the command result and response data.
  5. To initiate another command execution, repeat steps 1 to 4.
Command Completed within an RPI
  1. To execute a HART command, set
    Command.Execute
    to 1 in the consumer data when
    Command.ReadyToExecute
    = 1 in the producer data of the HART device.
  2. After the HART module receives the consumer data, the HART command is completed within an RPI. Hence
    Command.Completed
    = 1 and
    Command.ReadyToExecute
    = 0 are reported in the next producer data of the HART device. An active state is not reported for the command.
  3. Once the controller receives
    Command.ReadyToExecute
    = 0, set
    Command.Execute
    to 0 in the consumer data.
  4. When the HART module receives the consumer data, the next producer data of the HART device reports
    Command.ReadyToExecute
    = 1.
  5. To initiate another command execution, repeat steps 1 to 4.
Command with a Parameter Error
  1. To execute a HART command, set Command.Execute to 1 in the consumer data when
    Command.ReadyToExecute
    = 1 in the producer data of the HART device.
  2. After the HART module receives the consumer data, it verifies the request data and finds some parameters (for example, invalid characters for Packed ASCII or string length longer than configured) that cannot be converted to HART type successfully. The HART module reports
    Command.Active
    = 0,
    <nameofcommand>.Command.ReadyToExecute
    = 0,
    Command.Complete
    = 0, and
    Command.ParameterError
    = 1 in the producer data of the HART device.
  3. When the module receives
    Command.ReadyToExecute
    = 0, set
    Command.Execute
    to 0 in the consumer data. With
    ParameterError
    bit set, the execution is rejected due to errors in the command request data.
    Command.ParameterErrorNumber
    in the producer data indicates the index of the first invalid parameter in the command request data.
  4. Once the controller receives
    Command.ReadyToExecute
    = 0, set
    Command.Execute
    to 1 in the producer data of the HART device.
  5. Initiate a new execution by setting
    Command.Execute
    to 1 in the consumer data.
  6. When the HART module receives the consumer data and finds that the command request data in the consumer data still has errors, it reports
    Command.ReadyToExecute
    = 0 and
    Command.ParameterError
    = 1 in the producer data of the HART device again.
  7. Once the HART module receives
    Command.ReadyToExecute
    = 0, the module receives the latest execution request and you can set
    Command.Execute
    to 0 in the consumer data. With
    ParameterError
    bit set, the latest execution request is rejected due to errors in the command request data.
  8. The HART module reports
    Command.ReadyToExecute
    = 1 in the producer data of the HART device.
  9. To start a new execution, set
    Command.Execute
    to 1 in the consumer data.
  10. When the HART module receives the consumer data and verifies that the command request data are all valid, it sends the command to the HART device and reports
    Command.ReadyToExecute
    = 0,
    Command.Active
    = 1, and
    Command.ParameterError
    = 0 in the producer data of the HART device.
Command Overlap
  1. Set
    Command.Execute
    to 1 in the consumer data when
    Command.ReadyToExecute
    = 1 in the producer data of the HART device.
  2. After the HART module receives the consumer data,
    Command.Active
    = 1 and
    Command.ReadyToExecute
    = 0 are reported in producer data of the HART device.
  3. Once the controller receives
    Command.ReadyToExecute
    = 0, the module receives the execution request and you can set
    Command.Execute
    to 0 in the consumer data.
  4. Without waiting for the outstanding command to complete, set
    Command.Execute
    to 1 in the consumer data again.
  5. The HART module reports
    Command.Overlap
    = 1 in the producer data of the HART device.
  6. Set
    Command.Execute
    to 0 in the consumer data.
  7. If
    Command.Execute
    is set to 0 in Step 6, after HART command execution is complete, the HART module reports
    Command.Completed
    = 1 and
    Command.ReadyToExecute
    = 1 in the producer data of the HART device together with the command result and response data.
  8. To initiate another command execution, repeat steps 1 to 7.
    Command.Overlap
    is only cleared when a new command execution is started successfully.
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.
Normal