Topic: DMD0363 INTCONFIG - Interrupt Configuration Editor |
|
All of BRX PLCs and BRX HSIO modules (BX-HSIO1, BX-HSIO2) support hardware interrupts and timed events that can be used to initiate the execution of an Interrupt Service Routine (ISR). These interrupt events must be programmed through an Interrupt Trigger that specifies the type of trigger with the required triggering conditions, and which Interrupt Service Routine to execute when that trigger is fired. There are three types of Interrupt Triggers that can be used to invoke the execution of an Interrupt Service Routine: an Input Event (using discrete inputs), a software Timer, and a Match Register (using discrete inputs for High-Speed counting) as described in the sections that follow.
Note: if the instruction is being used to perform a runtime modification to an Interrupt Trigger that was created using the Interrupt Triggers setup in System Configuration, be aware that this instruction DOES NOT change that configuration because it's stored as part of the System Configuration. That interrupt trigger configuration will return each time the BRX CPU transitions from PROGRAM to RUN mode.
Input EventBRX CPUs can use its on-board discrete inputs or the inputs on BRX HSIO modules (BX-HSIO1, BX-HSIO2) to trigger the execution of an Interrupt Service Routine. There can be up to 4 Input Events defined for the MPU itself and 4 for each BRX HSIO module. The triggering Event is constructed from the input's current state of the selected input (a High / Low Level), and transitions between states of the selected input (a Rising / Falling / Either Edge).
The AND selections are states, and should be considered preconditions; OR selections are transitions or edges, and should be considered triggers. An Input Event must contain at least one trigger (one of the OR selections) but does NOT have to contain any preconditions (one of the AND selections). Any time all of the Level Events (AND selections) are true, any of the Edge Events (OR selections) will cause the associated Interrupt Service Routine to run.
Input Event # selects which Input Trigger to create / modify. This can be a constant value of 1 to 4.
Input 0 - Input 19: when using the inputs on a BRX MPU, there are potentially 20 discrete inputs (0 - 19) that can be used in the trigger event depending on which MPU model is being used. Remember that only the first 10 on-board inputs are High-Speed inputs (denoted as HS on the dialog); any other inputs are standard speed (denoted as Std on the dialog). When using one of the BRX HSIO modules (BX-HSIO1, BX-HSIO2), there are 8 discrete inputs available for use in the trigger. All 8 of these inputs are High-Speed inputs.
The High-Speed discrete inputs allow for much quicker response times than the standard speed inputs. And while it's possible to select the standard speed inputs for use in the input event, the use of the High-Speed inputs will provide the responsiveness that is typically expected when using hardware interrupts. If the application requires both level inputs and edge inputs, it is possible that the standard speed inputs could work acceptably well as the level inputs, leaving the High-Speed inputs available for edge inputs which are required to be more responsive.
ISR Code-Block is the name of the Interrupt Service Routine to execute when the Input Event trigger happens.
Input Leg selects which of the following power-flow conditions will cause this instruction to run:
Timer EventThe BRX PLCs can use a hardware timer to create a Timer Event that will run an Interrupt Service Routine at either a precise, recurring interval or at a precise point in time. There can be up to 4 Timer Event triggers defined for the MPU itself and 4 for each BRX HSIO module.
Timer # selects which Timer to create / modify. This can be a constant value of 1 to 4.
Behavior specifies how the Timer will operate
ISR Code-Block is the name of the Interrupt Service Routine to execute once the Timer expires.
Input Leg selects which of the following power-flow conditions will cause this instruction to run:
Match RegisterWhen one of the BRX CPU's on-board a High-Speed I/O inputs or one of the inputs on a BRX HSIO module (BX-HSIO1, BX-HSIO2) is configured for high speed counting, a register match operation can be used to generate a Match Register Event to run an Interrupt Service Routine. Once enabled, the ISR will be run each time the comparison operation transitions from "not a match" to "is a match". There can be up to 4 Match Register Event triggers defined for the MPU itself and 4 for each BRX HSIO module.
Match Register # selects which Match Register to create / modify. This can be a constant value of 1 to 4.
Fire ISR When specifies which of the High-Speed I/O input or output locations to use in the comparison. Choose from the following:
Is specifies the math operator to use when preforming the comparison. Choose from the following:
This Value specifies the 32-bit signed decimal value to compare to the register contents. This can be any value between -2147483648 and 2147483647 or any numeric location containing a value in that range. If this parameter is a numeric memory location, it's contents are read at the instant this INTCONFIG instruction is executed.
ISR Code-Block is the name of the Interrupt Service Routine to execute once the Match Register comparison is TRUE.
Input Leg selects which of the following power-flow conditions will cause this instruction to run:
|
|
See Also:INTCONFIG - Interrupt Configuration Editor
INTDECONFIG - Deconfigure Interrupt
INTSUSPEND - Suspend Interrupts
|
|
Related Topics:Interrupt Service Routine Code Block Configuration
Interrupt Triggers in System Configuration
|
|