Kaiyi — 6.8.2 Explanation of Convenience Instructions

Chapter 6 Applied Instructions API 0703 Symbol: S 1 : Initial value of the ramp signal Word S 2 : Final value of the ramp signal Word D : Duration of the ramp signal Word n : Number of scan cycles Word 1. The instruction is used to get the slope. The slope is linear, and has an absolute relationship with the scan time. 2. The initial value of the ramp signal and the final value of the ramp signal are written into D10 and D11 respectively in advance. When X0.0 is ON, the value in D12 increases from the setting value in D10 to the setting value in D11. The number of scan cycles is stored in D13.

When the value in D12 is equal to that in D11, or when the value on D13 is equal to n , SM687 is ON. Explanation: 3. When the conditional contact is not enabled, the value in D12 is 0, the value in D13 is 0, and SM687 is OFF. 4. When the on-line editing is used, please reset the conditional contact to initialize the instruction. 5. Please refer to ISPSoft User Manual for more information related to the fixing of the scan time. 6. The operand n should be within the range between 1 and 32767. Example: When the instruction is used with the analog signal output, the action of cushioning the start/stop can be executed. 1. Suppose the instruction is being executed.

When X0.0 is switched OFF, the execution of the instruction stops. When X0.0 is ON again, SM687 is OFF, D12 is reset to the setting value in D10, D13 is reset to 0, and the calculation is restarted. 2. When SM686 is OFF, SM687 is ON, D12 is reset to the setting value in D10, and D13 is reset to 0. 6-158 Instruction code Operand Function RAMP S , S , D, n 1 2 Ramp signal Device X Y M S T C HC D L SM SR E PR K 16# “$” DF S 1       S 2       D       n         Pulse instruction 16-bit instruction (9 steps) 32-bit instruction - AH -