Examples Of Practical Program (Timer Interrupt Programs Using Applied Instruction) - Mitsubishi Electric MELSEC FX3U Programming Manual

Melsec fx series programmable logic controllers
Table of Contents

Advertisement

FX
/FX
/FX
Series Programmable Controllers
3G
3U
3UC
Programming Manual - Basic & Applied Instruction Edition
5. Cautions
• Each pointer number (I6, I7 or I8) can be used only once.
• When M8056 to M8058 is set to ON in a program, a corresponding timer interrupt is disabled.
6. Program example
→ For program examples in which RAMP (FNC 67) or HKY (FNC 71) instructions are combined, refer
In the program example shown below, data is added and the addition result is compared with the set value
every 10 ms.
1) Program example
Step
0
X001
Interrupt
pointer
I610

36.5.2 Examples of practical program (timer interrupt programs using applied instruction)

RAMP (FNC 67), HKY (FNC 71), SEGL (FNC 74), ARWS (FNC 75) and PR (FNC 77) instructions execute a
series of operations in synchronization with the scan time.
Because the total time may be too long or time fluctuation may cause a problem in these instructions, it is
recommended to execute these instructions at a constant time interval using the timer interrupt function.
When not using the timer interrupt function, use the constant scan mode.
FNC 04
EI
SET
M3
FNC 06
FEND
When interrupt is
given at every 10 ms
M3
FNC 24
D0
INC
FNC224
K1000
D0
LD=
FNC 03
IRET
END
36 Interrupt Function and Pulse Catch Function
36.5 Timer Interrupt (Interrupt in Constant Cycle)
Interrupts are enabled by EI instruction.
The main program is described.
When M3 is set to ON, FNC 24 (INC)
instruction becomes valid.
The main program is finished by FEND
instruction.
"1" is added to the current value of D0 at
every 10 ms.
When the current value of D0 reaches
RST
M3
"1000", M3 is reset.
The current value of D0 is ramp data
which changes from "0" to "1000" in 10
seconds.
In the program example using FNC 67
(RAMP) instruction shown later, the ramp
data is made using a dedicated applied
instruction.
31
32
to Subsection 36.5.2.
33
34
35
36
37
38
863
A
B

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec fx3ucMelsec fx3g

Table of Contents