Function block CIA405.GET_STATE returns the current state of a CANopen network device.
Extends ⇘ CIA405.CIA405BASE.
Input:
NETWORK |
USINT |
|
ENABLE |
BOOL |
|
TIMEOUT |
UDINT |
|
DEVICE |
CIA405.DEVICE |
Addressed device; 0 means local device range: 1 … 127 initial: 0 |
Output:
CONFIRM |
BOOL |
|
ERROR |
CIA405.CANOPEN_ KERNEL_ERROR |
|
STATE |
CIA405.DEVICE_STATE |
Device state range: 0 … 7 initial: 0 |
If the state is not known, the function block returns with the state UNKNOWN. This will occur, if the device is not guarded and Heartbeat is not running. If Guarding is performed and the device does not answer or it is known for other reasons, that the device is not available, the function returns the state NOT_AVAIL. If DEVICE is 0 or equal to the own Node-ID, the function block returns the state of the local communication process.