GetBusError (FB)

FUNCTION_BLOCK GetBusError EXTENDS CBM.ETrigA

If IBus.GetBusState returns BUS_STATE.ERROR this function block returns the associated bus error code. The error codes are fieldbus specific and will be defined by the associated communication stack.

Info

This feature may not be supported by all fieldbus drivers. eError will return ERROR.NOT_SUPPORTED if not supported.

InOut:

Scope

Name

Type

Comment

Inherited from

Input

xExecute

BOOL

Rising edge: Action starts

Falling edge: Resets outputs

If a falling edge occurs before the function block has completed its action, the outputs operate in the usual manner and are only reset if either the action is completed or in the event of an error. In this case, the corresponding output values (xDone, xError, iError) are present at the outputs for exactly one cycle.

ETrigA

xAbort

BOOL

TRUE: Action is stopped immediately and all outputs are reset to their initial values.

ETrigA

Output

xDone

BOOL

TRUE: Action successfully completed

ETrigA

xBusy

BOOL

TRUE: Function block active

ETrigA

xError

BOOL

TRUE: Error occurred, function block aborts action

FALSE: No error

ETrigA

xAborted

BOOL

TRUE : Action aborted by user

ETrigA

Input

itfNode

INode

bus node

Output

eError

ERROR

operation error code

einBusError

ERROR_INFO

bus error code