5 Categories and Use of Basic Application Instructions API 67 Operands: S 1 : Start of ramp signal S 2 : End of ramp signal D : Current value of ramp signal (occupies 2 consecutive devices) n : Times for scan ( n : 1~32,767) Explanations: 1. 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. 2. When RAMP instruction is executed, the ramp signal will vary from S 1 to S 2 . Current value of ramp signal is stored in D and D+1 stores the current number of accumulated scans.
When ramp signal reaches S 2 , 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 . 3. 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. 4. 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 If X20 = ON, DVP-PM Operation Instruction 5-76 Mnemonic Operands Function Controllers 20PM 10PM D RAMP Ramp variable Value Type OP Bit Devices Word devices Program Steps X Y M S K H KnX KnY KnM KnS T C D E F RAMP: 9 steps DRAMP: 17 steps S 1 * S 2 * D * n * * * RAMP D10 D11 D12 K100