MB Ethernet Master Query Read Exception Status (poly).vi

Modbus LabVIEW VI

MB Ethernet Master Query Read Exception Status (poly).vi

The master uses this VI to read the exception status from the slave. This corresponds to a public function code of 7 in the MODBUS protocol.

MBAP Header is a cluster containing the transaction ID and Unit ID. This is additional information not usually required for a MODBUS transaction.

Transaction Identifier—This identifier is for transaction pairing; the MODBUS server copies the request transaction identifier in the response.

Unit Identifier—This field is for intra-system routing purposes. It typically communicates to a MODBUS serial line slave through a gateway between an Ethernet TCP-IP network and a MODBUS serial line. The MODBUS client sets this field in the request, and the server response must return this field with the same value.

TCP Connection Refnum in is a network connection refnum that uniquely identifies the TCP connection. Use TCP Open Connection.vi to open a TCP connection.
Timeout specifies the maximum time period, in milliseconds, that the VI waits for the slave's response before throwing an error.
error in describes error conditions that occur before this VI or function runs. The default is no error. If an error occurred before this VI or function runs, the VI or function passes the error in value to error out. If an error occurs while this VI or function runs, the VI or function runs normally and sets its own error status in error out. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. Use error in and error out to check errors and to specify execution order by wiring error out from one node to error in of the next node.
status is TRUE (X) if an error occurred before this VI or function ran or FALSE (checkmark) to indicate a warning or that no error occurred before this VI or function ran. The default is FALSE.
code is the error or warning code. The default is 0. If status is TRUE, code is a negative error code. If status is FALSE, code is 0 or a warning code.
source identifies where an error occurred. The source string includes the name of the VI that produced the error, what inputs are in error, and how to eliminate the error.
TCP Connection Refnum (dup) can be an input to another MODBUS VI, or you can close it using TCP Close Connection.vi.
Exception Code is nonzero if a MODBUS error has occurred. The exception code mapping is as follows:
0 No error
1 Illegal function
2 Illegal data address
3 Illegal data value
4 Failure in associated device
5 Acknowledge
6 Busy, rejected message
7 NAK—Negative acknowledge
For more information about these error codes, refer to your device's documentation.
error out contains error information. If error in indicates that an error occurred before this VI or function ran, error out contains the same error information. Otherwise, it describes the error status that this VI or function produces. Right-click the error out front panel indicator and select Explain Error from the shortcut menu for more information about the error.
status is TRUE (X) if an error occurred or FALSE (checkmark) to indicate a warning or that no error occurred.
code is the error or warning code. If status is TRUE, code is a nonzero error code. If status is FALSE, code is 0 or a warning code.
source describes the origin of the error or warning and is, in most cases, the name of the VI or function that produced the error or warning.