DVP-ES2/EX2/SS2/SA2/SX2/SE Operation Manual - Programming
3-170
API Mnemonic Operands Function
67
D RAMP Ramp variable
Value
Controllers
ES2/EX2 SS2 SA2
SE SX2
Bit Devices Word devices Program Steps Type
OP X Y M S K H KnX KnY KnMKnS T C D E F
S1 *
S2 *
D *
n * * *
RAMP: 9 steps
DRAMP: 17 steps
PULSE 16-bit 32-bit
ES2/EX2 SS2 SA2
SE SX2 ES2/EX2 SS2 SA2
SE SX2 ES2/EX2 SS2 SA2
SE SX2
Operands:
S1: Start of ramp signal S2: End of ramp signal D: Current value of ramp signal (occupies 2
consecutive devices) n: Times for scan (n: 1~32,767)
Explanations:
147. This instruction creates a ramp output. A ramp output linearity depends on a consistent scan
time. Therefore, scan time has to be fixed before executing RAMP instruction.
148. When RAMP instruction is executed, the ramp signal will vary from S1 to S2. Current value of
ramp signal is stored in D and D+1 stores the current number of accumulated scans. When
ramp signal reaches S2, or when the drive contact of RAMP instruction turns OFF, the content
in D varies according to the setting of M1026 which is explained later in Points to note.
149. When n specifies a D register, the value in D cannot be modified during the execution of the
instruction. Please modify the content of D when the instruction is stopped.
150. When this instruction is applied with analog output function, Ramp start and Ramp stop
function can be achieved.
Program example:
1. Before executing the instruction, first drive M1039 = ON to fix the scan time. Use MOV
instruction to write the fixed scan time to the special data register D1039. Assume the scan
time is 30ms and take the below program for example, n = K100, the time for D10 to increase
to D11 will be 3 seconds (30ms × 100).
2. When X20 goes OFF, the instruction will stop its execution. When X10 goes ON again, the
content in D12 will be reset to 0 for recalculation
3. When M1026 = OFF, M1029 will be ON to indicate the completion of ramp process and the
content in D12 will be reset to the set value in D10.
4. Set the Start and End of ramp signal in D10 and D11. When X20 = ON, D10 increases towards
D11, the current value of the variation is stored in D12 and the number of current scans is
stored in D13.
X20 RAMP D10 D11 D12 K100