Chapter 8 Logic Instructions
8-241
8.14.3.3 RS485_Link_Status
FB/FC
Explanation Applicable model
FB
RS485_Link_Status is used to watch if an error occurs in the 485 link
which the number corresponds to or if the slave replies with error codes.
RS485_Link_Status
Enable
RS485_Link_Status_instance
LinkNum
Valid
RS485_Link_Error
RS485_Link_ErrorID
Error
ErrorID
Input Parameters
Function Data type
Enable
The instruction is validated when
Enable changes from FALSE to
BOOL
TRUE or FALSE
(FALSE)
LinkNum
The number of the link to be watched.
UINT
(The variable value
changes from
FALSE to TRUE
Output Parameters
Parameter name Function Data type Valid range
Valid
TRUE when the outputs of the instruction are valid. BOOL
TRUE / FALSE
RS485_Link_Error
TRUE when an error occurs in the corresponding
link. It is valid when Error is FALSE.
BOOL TRUE / FALSE
RS485_Link_ErrorID
Outputs communication error code. See error codes
and their meanings as below:
1: Unidentified function code
2: The address in the response message from the
slave is different from the configured address.
3: The length of received data in the response
message from the slave is inconsistent with the
configured length.
4: Data-receiving timeout
5: Checksum error
6: The configured lengths of data to be read and
written are both 0.
7: The length of the data that is actually received
exceeds the max. received data length.
8: Data-sending timeout
16#80+ exception code: the exception code from the
slave
WORD
Error
TRUE when an error occurs in the instruction inputs. BOOL TRUE / FALSE
ErrorID
Contains error codes when an error occurs in the
instruction execution. Please refer to section 12.2 for
the corresponding error code.
WORD
Output Update Timing