Mitsubishi Electric MELSEC iQ-R-R00CPU User Manual page 88

Melsec iq-r series cpu module application user's manual
Table of Contents

Advertisement

■Interrupt processing with FB/FUN
FB/FUN consists of multiple instructions. When an interrupt occurs during execution of the FB/FUN, the execution will be
suspended and an interrupt program will be executed even though "Interrupt Enable Setting in Executing Instruction" of the
CPU parameter has been set to "Disable".
To disable the execution of the interrupt program during execution of FB/FUN, use the DI instruction to disable the interrupt
before the FB/FUN is called and use the EI instruction to enable the interrupt after execution of the FB/FUN.
In ST programs and FBD/LD programs, each of the following elements and program elements consists of multiple
instructions.
• Instruction (manufacturer-defined FB/FUN)
• Arithmetic operations in ST programs (Example: D0 := D1 + D2 - D3;)
• Logical operations in ST programs (Example: M0 := M1 AND M2 OR M3;)
To disable the interrupt during execution of an ST program or an FBD/LD program, use the DI instruction and the EI
instruction before and after each element or program element regardless of the setting of "Interrupt Enable Setting in
Executing Instruction".
■Extended interrupt program processing time
If interrupts during instruction execution are set to "Enable" in the interrupt enabled during instruction execution setting, and
the interrupt program is executed when the following conditions are met, the interrupt program processing time will take
longer. ( Page 77 Interrupt enabled during instruction execution)
• If accessing the refresh data register (RD), a module label, or labels, or using FB/ST/FBD in the interrupt program while
executing an instruction involving the transfer of a significant amount of data to the device/label memory, or during refresh
processing
• If accessing the device/label memory in the interrupt program when using FB/ST/FBD while executing an instruction
involving the transfer of a significant amount of data to the refresh data register (RD), a module label, or a label, or during
refresh processing to the refresh data register (RD) or a module label
■Delay in interrupt programs
Completing low-priority interrupt programs may take time if high-priority interrupt programs are executed frequently when the
multiple interrupt function is used. Adjust the processing of high-priority interrupt programs to allow execution of low-priority
interrupts.
■Devices and labels used by interrupt programs
Do not use the same global devices and labels in multiple interrupt programs because it may cause data inconsistency when
the multiple interrupt function is used.
1 RUNNING A PROGRAM
86
1.7 Interrupt Program

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents