6-157
RAMP
1
2
3
4
4
6
7
8
6.8 Other Convenient Instructions
6.8.6 Ramp signal (RAMP)
6.8.6 Ramp signal (RAMP)
RAMP
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.
n1 : Initial value (BIN 16 bits)
n2 : Final value (BIN 16 bits)
: + 0 : Present value (BIN 16 bits)
+ 1 : Number of executions (BIN 16 bits)
n3 : Number of shifts (BIN 16 bits)
: + 0 : Completion device (bits)
+ 1 : Bit for selecting data retaining at completion (bit)
Setting
Data
Internal Devices
R, ZR
J\
U\G
Zn
Constants
K, H
Other
Bit Word Bit Word
n1 ––
n2 ––
–– ––
n3 ––
–– –– ––
Process
High
performance
Universal
Basic
Redundant
Command
RAMP
n3
n2n1
D1
D2
RAMP
D1 D1
D1
D2 D2
D2
D1
D2
D1
Value of one variation (one scan)
(Value specified by n2)
(Value specified by n1)
(Value specified by n3)
Example
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)