FUNCTION_BLOCK RECV_EMCY EXTENDS CiA405Base
Function block checks if an emergency object has been received from any DEVICE. If the function block has finished its action without any error, output CONFIRM is changed to TRUE and ERROR to 0. If DEVICE is 0 all devices are error free. If an EMCY is pending or an EMCY error reset was received output DEVICE contains the NodeID of the corresponding device and ERRORINFO contains the EMCY information.
Note
An EMCY will be returned as long as it is pending.
An EMCY error reset (Variable EMCY_ERROR_CODE of EMCY_ERROR is zero) is returned only once.
If an error occurred while checking for an emergency, CONFIRM is set to FALSE and ERROR is set to the corresponding error value.
InOut:
|
Scope
|
Name
|
Type
|
Initial
|
Comment
|
Inherited from
|
Input
|
NETWORK
|
USINT
|
1
|
CAN network number the function block should operate on. Note: It is not the same like the network number in CANBus configurator. The CiA405 NETWORK is calculated by NetID + 1. Example: 1 = CAN0, 2 = CAN1, 3 = CAN2, …
|
CiA405Base
|
ENABLE
|
BOOL
|
FALSE
|
Enables the function block on rising edge. Aborts operation on falling edge.
|
CiA405Base
|
TIMEOUT
|
UDINT
|
0
|
Timeout in ms; 0 means no timeout
|
CiA405Base
|
Output
|
CONFIRM
|
BOOL
|
FALSE
|
TRUE: function block finished without error
|
CiA405Base
|
ERROR
|
CANOPEN_KERNEL_ERROR
|
CANOPEN_KERNEL_ERROR.CANOPEN_KERNEL_NO_ERROR
|
Error code: see CANOPEN_KERNEL_ERROR for further details
|
CiA405Base
|
DEVICE
|
DEVICE
|
0
|
EMCY received: DEVICE contains the NODEID of the sending device; no EMCY received: value is 0
|
|
ERRORINFO
|
EMCY_ERROR
|
|
EMCY information
|
|
|