User manual

IEC61131 User and Reference Manual
April 22, 2008
301
hart2
Send HART command 2
Description
The hart2 function block sends a HART protocol command 2 (“read primary variable and
percent of span”) to a HART device and processes the response.
enable
module
addressOfDevice
e
hart2
error
done
status
v1Current
code
u1Current
u1Percent
v1Percent
Arguments
Inputs
Type
Description
enable
Boolean
Set to TRUE to send one HART command. Enable
must then be set to FALSE and back to TRUE to send
another command. Each command is complete when
either the done or error output is TRUE.
module
Integer
The module address of the HART 5904 modem
module. Valid values are 0 to 3.
This must correspond with the module number of a
hart5904 Hart Modem I/O hardware.
addressOfDevice
Integer
The address of the HART device. Valid values are 0 to
15.
Outputs
Type
Description
done
Boolean
TRUE when the enable input is TRUE and a response
is received from the HART device.
FALSE in all other cases.
error
Boolean
TRUE when the enable input is TRUE and a there is
an error in the command, or if the HART device fails to
respond to any of the attempts.
FALSE in all other cases.
status
Integer
This output contains the status of the HART command
sent to the HART device.
0 =HART interface module is not communicating
1 =Command ready to send to device
2 =Command sent to device
3 =Response received
4 =No valid response received after all attempts made
5 =HART interface is not ready to transmit