OBIOInterruptInfo (FB)
FUNCTION_BLOCK OBIOInterruptInfo EXTENDS AbbLConC3
This FB is to be used inside the OnBoard_Binary_Input-Task (IEC Task). It retrieves information regarding the binary inputs which triggered the interrupt task and regarding the timing. | Up to 4 different binary inputs can be used for triggering the interrupt task. This block gives the information regarding which input triggered the task, and a timestamp when it did happen. | By these informations, a row of events can be constructed.
- precondition
the respective channel is configured as interrupt channel. OBIOInterruptPara (FB)
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
Inout
Confilink the block to the interrupt configuration OBIOInterruptPara (FB)
Output
ErrorID0
Error code
ActTimeStampUDINTtimestamp from triggering the interrupt. If a FilterTime is used, and >1 interrupts occur in a row, this time can be different from the InterruptTimeStamp
InterruptActiveARRAY [0..arrLimit] OF BOOL
indication of active interrupt, rising edge
InterruptActiveNegARRAY [0..arrLimit] OF BOOL
indication of active interrupt, falling edge
InterruptTimeStampARRAY [0..arrLimit] OF UDINT
timestamp for respective interrupt occurence, refers to ActTimeStamp
InterruptLostARRAY [0..arrLimit] OF UDINT
count number of lost interrupts, if interrupts are too fast. Different binary inputs can be close together, but rising egdes for a specific input needs to be FilterTime apart, otherwise information is lost.