OBIOInterruptPara (FB)
FUNCTION_BLOCK OBIOInterruptPara EXTENDS AbbLConC3
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
EnableBOOLFALSE
A rising edge (Enable = TRUE) starts the operation, the output Busy goes to TRUE. All other inputs are read and considered continuously. Execution will continue forever until a falling edge (Enable = FALSE) aborts the operation. During Aborting the Busy is still TRUE. Afterward all outputs are reset.
AbbLConC3
Output
BusyBOOLFALSE
Operation is running (while output Error is FALSE)
AbbLConC3
ErrorBOOLFALSE
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.
AbbLConC3
Input
EnableInterruptARRAY [0..arrLimit] OF BOOL
enable the respective Input for Interrupt functionality, use rising edge. Can be combined with EnableInterruptNeg
EnableInterruptNegARRAY [0..arrLimit] OF BOOL
enable the respective Input for Interrupt functionality, use falling edge. Can be combined with EnableInterrupt
FilterTimeUDINTFilter time in microseconds, as a minimum Distance between 2 events, time will be limited to 1s
MaxWaitTimeUDINTmaximum time in microsendonds to start the task anyway if no event was detected, time will be limited to 1s
Output
ErrorID0
Error code