CM579PnioGetSysState (FB)

FUNCTION_BLOCK CM579PnioGetSysState EXTENDS CM579PnioBase

function block to get present system state of specified Communication Module CM579-PNIO

It provides diagnosis information which devices are configured, are active or have a dignosis. Type of requested information can be selected via input DeviceStatesType.

InOut:

Scope

Name

Type

Initial

Comment

Inherited from

Input

Execute

BOOL

FALSE

A rising edge starts a single operation, the output Busy goes to TRUE. In the first cycle all other inputs are read and stored, afterwards they are ignored. A falling edge does not stop the operation. After Done = TRUE or Error = TRUE and Execute = FALSE all outputs will be reset. For executing another operation the Execute input needs to be retriggered by another rising edge!

AbbETrig3

Output

Done

BOOL

FALSE

Operation is completed without error (while outputs Busy and Error are FALSE). This output is TRUE for at least one cycle or until Execute is set to FALSE

AbbETrig3

Busy

BOOL

FALSE

Operation is running (while outputs Done and Error are FALSE)

AbbETrig3

Error

BOOL

FALSE

Operation is stopped with error (while outputs Busy and Done are FALSE). This output is TRUE for at least one cycle or until Execute is set to FALSE. The output ErrorID gives more details about the error.

AbbETrig3

Input

Device

AC500_IoDrvCM579Profinet.IDeviceCM579Profinet

instance of CM579-PNIO device

CM579PnioBase

Output

ErrorID

ERROR_ID

error code that describes occurred error

CM579PnioBase

AddErrorID

UDINT

additional description of error, meaning depends on value of output ErrorID

CM579PnioBase

Input

DeviceStatesType

CM579PnioDeviceStatesListType

type of device states list to read

Output

DeviceStates

CM579PnioDeviceStates

device state array of booleans - to show system diagnosis

Num

UDINT

number of active devices in device state list