CM592CommStatus (FB)
FUNCTION_BLOCK PUBLIC CM592CommStatus EXTENDS CM592BaseStatusBlockReq
Get present state of PROFIBUS master communication module
- InOut:
Scope
Name
Type
Initial
Comment
Inherited from
Input
EnableBOOLFALSE
A rising edge (Enable = TRUE) starts a single operation, the output Busy goes to TRUE. All other inputs are read and considered continuously. A falling edge (Enable = FALSE) aborts the operation, if BUSY=TRUE (Note: During Aborting the Busy is still TRUE). Afterwards all outputs will be reset. For executing another operation the Enable input needs to be retriggered by another rising edge!
AbbLCon3
Output
DoneBOOLFALSE
Operation is completed without error (while outputs Busy and Error are FALSE). This output is TRUE for at least one cycle or until Enable is set to FALSE.
AbbLCon3
BusyBOOLFALSE
Operation is running (while outputs Done and Error are FALSE)
AbbLCon3
ErrorBOOLFALSE
Operation is stopped with error (while outputs Busy and Done are FALSE). This output is TRUE for at least one cycle or until Enable is set to FALSE. The output ErrorID gives more details about the error.
AbbLCon3
Input
DeviceIDeviceCM592Profibus0
Instance of CM592 profibus device
CM592BaseStatusBlockReq
Output
ErrorIDERROR_ID.NO_ERROR
Error code that describes the occured error
CM592BaseStatusBlockReq
AddErrorIDUDINTCM592Const.CM592_ADD_ERROR_NONE
Additional error info, in case ErrorID shows “REQUEST_FAILED”
CM592BaseStatusBlockReq
StateInfoState bits - see type definition
CommStateCM592CommState.COMMSTATE_OFFLINE
PROFIBUS master communication state
CommErrorCommunication error - see type definition
NumBusErrorUDINT0
Number of bus errors
NumTimeoutUDINT0
Number of timeout errors