Interrupt_mask, Interrupt_request, Interrupt_pending 4.11.6.4. example – Yaskawa FSP Amplifier FlexWorks User Manual
Page 92: Interrupt, Variable functioning, Interrupt_mask: interrupt_request

Operating the FSP Amplifier Using FlexWorks
92
command SET_VAR must be used to change the value of the mask
variable so as to enable an interrupt.
The Interrupt_mask variable is reset to zero each time the program
is started (by the RUN command or the auto start switch).
Therefore, the Interrupt_mask must be set each time.
4.11.6.3. Interrupt_pending
The Interrupt_pending variable indicates which interrupts are to be
handled. The value of a bit in Interrupt_pending is only set to 1
(indicating that the interrupt is to be handled) if both of the
following conditions are met:
♦ The interrupt event has occurred, and the corresponding bit
in Interrupt_request has been set to 1.
♦ You have enabled the interrupt in the mask register,
Interrupt_mask.
Once the corresponding interrupt service routine has been
completed, the bit in the variable is reset to 0.
Interrupt_pending is a read-only variable, and its values thus
cannot be changed by the user.
4.11.6.4. Example of Interrupt Variable Functioning
Interrupt_mask:
To specify that only interrupts 3 and 7 be handled, should their
conditions be met, bits 3 and 7 in the variable Interrupt_mask must
be set to 1 and all other bits must be set to 0, as shown:
B
IT
#
7 6 5 4 3 2 1 0
Setting 1 0 0 0 1 0 0 0
Variable value: Interrupt_mask = 136
Interrupt_request:
If the interrupt conditions for interrupts 1, 3 and 4 are met, then
bits 1,3 and 4 in the variable Interrupt_request will be set to 1 and
all other bits will be set to 0.
B
IT
# 7 6 5 4 3 2 1 0
Setting 0 0 0 1 1 0 1 0
Variable value: Interrupt_request = 26