297
RAMP
1
2
3
4
6
7
8
6.8
O
ther Con
venient Instru
ctions
6.8.6
R
AMP
Function
(1) When the execution command is ON, the following processing is executed.
• Shifts from the value specified by n1 to the value specified by n2 in the number of times specified by n3.
• For n3, designate the number of scans (number of shifts) required for shift from n1 to n2.
No operation if other than 0<n3<32768.
• The system uses +1 to store the number of times the instruction has been executed.
• The value of one variation (one scan) is obtained by the expression below:
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 in n2 by the
number of shifts specified in n3.
Hence, a linear ramp may not be made.
(2) If the scan is performed for the number of moves specified by n3, the complete device specified by +0 is turned ON.
The ON/OFF status of the completion device and the contents of
+0 are determined by the ON/OFF status of the
device designated by +1.
• When +1 is OFF, +0 will go OFF at the next scan, and the RAMP instruction will begin a new move operation from
the value currently at
+0.
• When +1 is ON, +0 will remain ON, and the contents of +0 will not change.
(3) When the command is turned OFF during the execution of this instruction, the contents of +0 will not change following
this.
When the command goes ON again, the RAMP instruction will begin a new move from the present value at +0.
(4) Do not change the specified values in n1 and n2 before the completion device specified in +0 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.
Operation Error
(1) In the following case, an operation error occurs, the error flag (SM0) turns ON, and an error code is stored into SD0.
Caution
(1) When the digit specification of bit device is made to , the digit specification of bit device can only be used when the
following condition is met.
• Specification of digits: K8
Error
code
Error details
Q00J/
Q00/
Q01
QnH
QnPH QnPRH
QnU
LCPU
4101
The device specified by or exceeds the range of the
corresponding device.
––
––
––
––
D1
Value of one variation
(
one scan
)
(
Value specified b
y
n2
) (
Value specified b
y
n1
)
(
Value specified b
y
n3
)
Example
350
300
250
200
150
100
50
(
0
)
(
1
)
D1
D1
N
umber
of
sh
i
fts
(
7
)
spec
i
f
i
ed
b
y
n3
Va
l
ue
spec
i
f
i
ed
b
y
n2
(
350
)
Va
l
ue
stored
i
n
+
1
(N
umber
of
execut
i
on
t
i
mes
)
Va
l
ue
stored
i
n
+
0
(
Present
va
l
ue
)
Va
l
ue
spec
i
f
i
ed
b
y
n1
(
0
)
(
2
)
(
3
)
(4)
(
5
)
(
6
)
(
7
)
D2
D1
D2
D2
D2
D2
D2
D1
D1
D2
D1
D1
D2
D1