6.8 Other Convenient Instructions
6.8.6 Ramp signal
6-167
6
BA
S
IC
INSTRUCTIONS
RAMP
RAMP
0 is varied to 350 in seven scans as shown below.
When the calculated one variation is indivisible, compensation is made to achieve the value
specified for n2 by the number of shifts specified for n3.
Hence, a linear ramp may not be made.
(2) When the transition is completed to the final value, the completion device specified for
[0]
will turn ON.
The ON/OFF status of the completion device and the value of
[0] are determined by the
ON/OFF status of the device specified for
[1].
• When
[1] is OFF,
[0] will turn OFF at the next scan, and the RAMP instruction will
begin a new transition operation from the initial value.
• When
[1] is ON,
[0] will remain ON, and the value of
[0] will not change.
(3) When the command is turned OFF during the execution of this instruction, the value of
[0]
will not change following this.
When the command turns ON again, the RAMP instruction will begin a new transition from
the initial value.
(4) Do not change the values of n1 and n2 before the completion device specified for
[2] turns
ON.
Since the same expression is used every scan to calculate the value stored in
[1],
changing n1/n2 may cause a sudden variation.
O
p
erat
i
on
E
rror
In the following case, an operation error occurs, the error flag (SM0) is turned ON, and the
corresponding error code is stored to SD0.
• The device specified for
or
exceeds the corresponding device range. (For Universal
model QCPU only)
(Error code: 4101)
Program
E
xam
pl
e
In the following program, the value of Var_D0 is changed from 10 to 100 in a total of 6 scans, and
the value of Var_D0 is saved when the transition has been completed.
[Structured ladder]
Example
3
5
0
300
25
0
2
00
15
0
1
00
5
0
(0)
(
1
)
d
1
d
1
Num
b
er o
f
s
h
i
f
ts (7) s
p
eci
f
ied
b
y n3
Value s
p
eci
f
ied
b
y n
2
(3
5
0)
Value stored in +
1
(Num
b
er o
f
execution times)
Value stored in
+ 0 (Present value)
Value s
p
eci
f
ied
b
y n
1
(0)
(
2
)
(3)
(4)
(
5
)
(
6
)
(7)
d
2
d
1
d
2
d
2
d
2
d
2
d
2
d
1
d
1
d
2
d
1
d
1
d
2
Summary of Contents for MELSEC Q Series
Page 1: ...Structured Programming Manual Mitsubishi Programmable Controller QCPU Common Instructions ...
Page 2: ......
Page 14: ...A 12 MEMO ...
Page 340: ...6 178 MEMO MTR ...
Page 708: ...7 368 MEMO ...
Page 776: ...8 68 MEMO ...
Page 796: ...9 20 MEMO ...
Page 804: ...App 8 MEMO ...
Page 812: ...Index 8 MEMO ...
Page 815: ......