Chapter 8 Logic Instructions
8-333
8.19.2.2 CANopen_NodeDiag
FB/FC
Explanation Applicable model
FB
CANopen_NodeDiag is used for the diagnosis of the state of the specified
slave connected to CANopen port.
CANopen_NodeDiag
Enable
CANopen_NodeDiag_instance
SlaveNode
Done
Error
ErrorID
InitSuccess
InitFailure
DeviceNotRight
AutoSDOFailure
ReceiveEmcy
HearbeatTimeout
NodeNumSame
EMCY_Num
EMCY_Data
Input Parameters
Parameter name Function Data type
Validation timing
Enable
executed when Enable
changes from FALSE to
BOOL
TRUE or FALSE
(FALSE)
When Enable
changes to TRUE.
SlaveNode USINT
(The variable value
must be set)
When Enable
changes to TRUE.
Output Parameters
Parameter name Function Data type Valid range
Done
TRUE when the instruction execution is
completed.
BOOL TRUE/FALSE
Error
TRUE when there is an error in the execution
of the instruction.
BOOL TRUE / FALSE
ErrorID
Contains the error code when an error
occurs. Please refer to section 12.2.
WORD
InitSuccess TRUE when the slave initializing succeeds. BOOL TRUE / FALSE
InitFailure TRUE when the slave initializing fails. BOOL TRUE / FALSE
DeviceNotRight TRUE when the slave register is incorrect. BOOL TRUE / FALSE
AutoSDOFailure
TRUE when the setting for Auto SDO of the
slave fails.
BOOL TRUE / FALSE
ReceiveEmcy
TRUE when the slave receives the Emergency
message.
BOOL TRUE / FALSE
HeartbeatTimeout
TRUE when the heartbeat message timeout
occurs.
BOOL TRUE / FALSE
NodeNumSame
TRUE when the station addresses of the
master and slaves are duplicated.
BOOL TRUE / FALSE
EMCY_Num
Recods the number of Emergency message
the controller receives.
USINT 0~5
EMCY_Data
Recods the Emergency message that the
controller receives from the slave.
ARRAY [1..5] OF
CANopen_EMCY_Type