hit counter script

Mitsubishi Electric FX3G SERIES Programming Manual page 817

Programmable controllers
Hide thumbs Also See for FX3G SERIES:
Table of Contents

Advertisement

FX
/FX
/FX
Series Programmable Controllers
3G
3U
3UC
Programming Manual - Basic & Applied Instruction Edition
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.
1)
Ramp output pattern
D4 is occupied as a register for counting the number of times of execution.
(D 3)
(D 1) = 1
X000 = ON
2)
Program
Step
0
X000
Start
M 0
Interrupt
M 1
pointer
I610
(D 2) = 255
While M8026 is ON
While M8026 is OFF
10 sec.
M8029
Execution is completed
FNC 04
EI
M8026
FNC 12
K 1
D 1
MOV
FNC 12
K255
D 2
MOV
PLS
M 0
SET
M 1
FNC 06
FEND
When interrupt is given every 10 ms
FNC 67
D 1
D 2
RAMP
Initial
Target
value
value
M8029
RST
M 1
FNC 03
IRET
END
36 Interrupt Function and Pulse Catch Function
36.5 Timer Interrupt (Interrupt in Constant Cycle)
→ For RAMP (FNC 67) instruction, refer to Section 14.8.
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
D 3 K1000
are changed from the value of D1 to the
value of D2.
Current
Number of
value
times of
transfer
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.
31
32
33
34
35
36
37
38
A
B
815

Advertisement

Table of Contents
loading

This manual is also suitable for:

Fx3u seriesFx3uc series

Table of Contents