5 Applied Instructions and Basic Usage
DVP-20PM Application Manual
5-77
API
Applicable model
20PM
67
D
D
RAMP
Ramp
Bit device Word device
X Y M S K H KnX KnY KnM KnS T C D V Z
S1
*
S2
*
D
*
N
*
Note: All devices can not be modified by V devices and Z devices.
Please refer to specifications for more information about device
ranges.
16-bit instruction (9 steps)
RAMP
Continuity
instruction
-
32-bit instruction (17 steps)
D RAMP
Continuity
instruction
-
Flags: M1026 (Please refer to the additional
remark below.)
M1029
Explanation
S
1
: Start a ramp; S
2
: End of a ramp; D: Duration of a ramp (2 consecutive
devices are occupied.); n: Number of scan cycles (n=1~32,767)
The instruction is used to get a slope. Whether a slope is linear or not has an
absolute relationship with scan time. When users use the instruction, they have
to specify scan time in advance.
When the contact driving the instruction RAMP is turned from OFF to ON, the
value in D will increase from the value in S
1
to the value S
2
, and the number of
scan cycles is stored in D+1.
If the operand n is a D device, the value in n can not be changed until the
execution of the instruction stops.
If the instruction is used with an output of analog signals, the action of
cushioning a start/stop can be executed.
Example
The start of a ramp is written into D10, and the end of the ramp is written into
D11. When X20 is turned ON, the value in D12 increases from the value in
D10 to the value in D11, and the number of scan cycles is stored in D13.
After M1039 in a program is turned ON, the scan time for the program will be
fixed. Users can write scan time into the special data register D1039 by means
of the instruction MOV. If the scan time set is 30 milliseconds, and n is K100,
the time it takes for the value in D12 to increase from the value in D10 to the
value in D11 will be 3 seconds (30 milliseconds×100).
If X20 is turned OFF, the execution of the instruction will stop. If X20 is turned
ON again, the value in D12 will become 0, and increase again.
If M1026 is OFF, and M1029 is ON, the value in D12 will becomes the value in
D10.
X20
RAMP D10 D11 D12 K100
D10
D12
D11
D11
D12
D10
D10<D11 D10>D11
The number of scan cycles is n.
The number of scan cycle is stored in D13.
The number of scan cycles is n.