OBIOInterruptPara (FB)

FUNCTION_BLOCK OBIOInterruptPara EXTENDS AbbLConCA

This FB has to be used inside a cyclic task to parameterize and enable the binary inputs for OnBoard_Binary_Input-Task (Interrupt task). It enables up to 4 inputs to be used as interrupt source. The input parameters are used with the rising edge of enable, subsequent modifications are ignored.

|It is recommended to use a FilterTime which restricts the consecutive occurence of events. This will prevent to overload the PLC with interrupts. The interrupt information is not lost, as the timestamps are stored.

Note

This block should just be called once per cycle otherwise inconsistent values could be send to PRU, if send twice in short time.

InOut:

Scope

Name

Type

Initial

Comment

Inherited from

Input

Enable

BOOL

FALSE

A rising edge (Enable = TRUE) starts the operation, the output Busy goes to TRUE. All other inputs are read and considered continuously. A falling edge (Enable = FALSE) aborts the operation. During Aborting the Busy is still TRUE. Afterward all outputs are reset.

AbbLConCA

Output

Busy

BOOL

FALSE

Operation is running (while output Error is FALSE)

AbbLConCA

Error

BOOL

FALSE

Operation is stopped with error (while output Busy is 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.

AbbLConCA

Input

EnableInterrupt

ARRAY [0..arrLimit] OF BOOL

enable the respective Input for Interrupt functionality

FilterTime

UDINT

Filter time in microseconds, as a minimum Distance between 2 events, time will be limited to 1s

MaxWaitTime

UDINT

maximum time in microsendonds to start the task anyway if no event was detected, time will be limited to 1s

Output

ErrorID

Error_ID

0

Error code