811
FX3G/FX3U/FX3UC Series Programmable Controllers
Programming Manual - Basic & Applied Instruction Edition
36 Interrupt Function and Pulse Catch Function
36.5 Timer Interrupt (Interrupt in Constant Cycle)
31
FNC275-FNC279
Data
Transfer 3
32
FNC280-FNC289
High Speed
Processing 2
33
FNC290-FNC299
Extension File
Register
34
FNC300-FNC305
FX
3U
-CF-ADP
35
SFC•STL
Programming
36
Interrupt
Function
37
Special Device
38
Error Code
A
Version Up
Information
B
Execution Times
2. Timer interrupt processing of RAMP (FNC 67) instruction
The ramp signal output circuit shown below is programmed using the timer interrupt function executed every 10 ms.
→ For the use method of the instruction execution complete flag M8029, refer to Subsection 6.5.2.
→ For RAMP (FNC 67) instruction, refer to Section 14.8.
1) Ramp output pattern
D4 is occupied as a register for counting the number of times of execution.
2) Program
(D 1) = 1
(D 3)
(D 2) = 255
X000 = ON
M8029 Execution is completed
While M8026 is OFF
10 sec.
While M8026 is ON
X000
Start
FNC 04
EI
FNC 12
MOV
K 1 D 1
FNC 12
MOV
K255 D 2
PLS M 0
M 0
SET M 1
FNC 06
FEND
M 1
FNC 67
RAMP
D 1 D 2 D 3 K1000
Initial
value
Target
value
Current
value
Number of
times of
transfer
M 1
M8029
FNC 03
IRET
END
I610
M8026
Interrupt
pointer
Step
0
When interrupt is given every 10 ms
RST
Interrupts are enabled by EI instruction.
The main program is described.
With M8026 turned ON, when the value of
(D3) reaches the final value (D2), the final
value is latched.
As soon as the start command is given, the
initial value (D1) and target value (D2) are
transferred.
The main program is finished by FEND
instruction.
While the instruction is executed 1000
times (in 10 seconds), the contents of D3
are changed from the value of D1 to the
value of D2.
When the instruction execution complete
flag M8029 turns ON, RAMP instruction
drive input is set to OFF.
If FNC 67 (RAMP) instruction is
continuously executed while M8026 is OFF,
the value of D3 returns to the initial value
(D1) immediately after it reaches the final
value (D2), and then the same operation is
repeated.
This program is not necessary when M8026
is ON.