6 BASIC INSTRUCTIONS
6.8 Other Convenient Instructions
345
6
Ramp signal
RAMP
• When the execution command is ON, the following processing is executed.
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.
• If the scan is performed for the number of moves specified by n3, the complete device specified by (D2) +0 is turned ON.
The ON/OFF status of the completion device and the contents of (D1)+0 are determined by the ON/OFF status of the
device designated by (D2)+1.
• When the command is turned OFF during the execution of this instruction, the contents of (D1)+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.
• Do not change the specified values in n1 and n2 before the completion device specified in (D2)+0 turns ON. Since the
same expression is used every scan to calculate the value stored in (D1)+1, changing n1/n2 may cause a sudden variation.
n1: Initial value (BIN 16 bits)
n2: Final value (BIN 16 bits)
(D1): (D1)+0: Present value (BIN 16 bits)
(D1)+1: Number of executions (BIN 16 bits)
n3: Number of shifts (BIN 16 bits)
(D2): (D2)+0: Completion device (bits)
(D2)+1: Bit for selecting data retaining at completion (bit)
Setting
data
Internal device R, ZR J\ U\G Zn Constant
K, H
Others
Bit Word Bit Word
n1
n2
(D1)
n3
(D2)
• 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 (D1)+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:
• When (D2)+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 (D2)+0.
• When (D2)+1 is ON, (D2)+0 will remain ON, and the contents of (D1)+0 will not change.
Basic
Redundant
Process
High
performance
Universal
LCPU
Command
RAMP
n3
n2n1
D1
D2
RAMP
Value of one variation (one scan)
(Value specified by n2)
(Value specified by n1)
(Value specified by n3)
350
300
250
200
150
100
50
(0)
(1)
D1
D1
Number of shifts (7) specified by n3
Value specified by n2 (350)
Value stored in + 1
(Number of execution times)
Value stored in
+ 0 (Present value)
Value specified by n1 (0)
(2)
(3)
(4)
(5)
(6)
(7)