CIA405.RECV_EMCY_DEV (FB)

( CAA_CiA405.Library)

Function block CIA405.RECV_EMCY_DEV checks if an emergency object has been received from DEVICE.

Extends CIA405.CIA405BASE.

Input:

NETWORK

USINT

see CIA405.CIA405BASE

ENABLE

BOOL

see CIA405.CIA405BASE

TIMEOUT

UDINT

see CIA405.CIA405BASE

DEVICE

CIA405.DEVICE

Additional device information connected to STATE; 0 means local device

range: 0 … 127

initial: 0

Output:

CONFIRM

BOOL

see CIA405.CIA405BASE

ERROR

CIA405.CANOPEN_

KERNEL_ERROR

see CIA405.CIA405BASE

ERRORINFO

CIA405.EMCY_ERROR

EMCY code

插图 569: Request/Response diagram

CIA405.RECV_EMCY_DEV will check if an emergency object (/DS-301/) has been received from DEVICE. If the function block has finished its action without any error, output CONFIRM is changed to TRUE and ERROR to 0. ERRORINFO contains the information about the received emergency. An emergency was received if the error code of ERRORINFO is unequal 0. An error code with value 0 means that the device has currently no emergency.

A received emergency is not cleared and it is delivered with each call of the function block until the device sends an emergency reset .

If an error occurred while checking for an emergency, CONFIRM is set to FALSE and ERROR is set to the corresponding error value. 

  • For behaviour of ENABLE and CONFIRM see chapter “Control mechanism”.
  • For inputs NETWORK and TIMEOUT see chapter Additional parameters.
  • Response: this event is the positive acknowledgement that the request is processed without error, i.e. the value of EMCY is available at the output ERRORINFO. If no EMCY was received, ERRORINFO = 0, i.e. all members of the structure CIA405.EMCY_ERROR are zero. For detailed description of CIA405.EMCY_ERROR see CIA405.EMCY_ERROR (STRUCT)
  • error: this event is the negative acknowledgement and means that the request is processed with error, for example the CANopen kernel returns an error to the function block when accessing the value of EMCY. In this case ERRORINFO = 0. For detailed description of CIA405.CANOPEN_ KERNEL_ERROR see CIA405.CANOPEN_KERNEL_ERROR
  • Timeout: the time control starts with a rising edge at ENABLE. Timeout event occurs, when there is no acknowledgement returned to the function block before time control reaches the timeout value. When timeout occurs, ERROR = 3 and ERRORINFO = 0.

Recommendation: The function block should deliver the EMCY of the checked device on each call. Often the earliest EMCY contains the originally error information; later EMCYs often just results from following errors. A lower level software may work in the way, that a received EMCY does not overwrite an EMCY which is different from "No Error" ( is equal to "Reset Error" ). On the other hand, a received "No Error"- EMCY overwrites the stored EMCY in any case.