Sm560Rec (FB)

FUNCTION_BLOCK PUBLIC FINAL Sm560Rec EXTENDS AbbLCon3

Read non-safe data from a SM560 module. ATTENTION! Only one receive channel exists. Therefore, only one Sm560Rec instance should be created.

Otherwise received data could be mixed up.

InOut:

Scope

Name

Type

Initial

Comment

Inherited from

Input

Enable

BOOL

FALSE

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

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 Enable is set to FALSE.

AbbLCon3

Busy

BOOL

FALSE

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

AbbLCon3

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 Enable is set to FALSE. The output ErrorID gives more details about the error.

AbbLCon3

Input

Device

AC500_IoDrvSM560.IDeviceSM560

Reference to Coupler instance

Data

POINTER TO BYTE

0

Address of variable where received data is to be stored (via ADR operator)

Output

ErrorID

ERROR_ID

ERROR_ID.NO_ERROR

Error code description

AddErrNo

UDINT

16#0

(unused yet) Additional internal error code

DataLen

DWORD

0

Number of bytes read to ADR(Data)

Methods:

FB_Init

FB_Exit

Structure: