OBIOInterruptInfo
(FB)
FUNCTION_BLOCK OBIOInterruptInfo EXTENDS AbbLConCA
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
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
Inout
Confi
link the block to the interrupt configuration OBIOInterruptPara (FB)
Output
ErrorID
0
Error code
ActTimeStamp
UDINT
timestamp from triggering the interrupt. If a FilterTime is used, and >1 interrupts occur in a row, this time can be different from the InterruptTimeStamp
InterruptActive
ARRAY [0..arrLimit] OF BOOL
indication of active interrupt
InterruptTimeStamp
ARRAY [0..arrLimit] OF UDINT
timestamp for respective interrupt occurence, refers to ActTimeStamp
InterruptLost
ARRAY [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.