Chapter 6 Applied Instructions Symbol D : Device to store the value in the index registers Explanation 1. This instruction stores the values in E0–E9 in the devices specified by D . The valid range for D is between 0–99. The instruction is not executed for values that exceed the range. 2. The instruction uses sixteen devices, and the last six devices are for system use. If you execute the instruction and the number of times the data is stored is n (the value in D ), the instruction stores data in E0–E9 in 6_ D +(16*n+1)– D +(16*n+16), and increments the value in D to n+1. 3. The storage for the device D is 1601 (16x100+1). 4.
This instruction uses a pulse instruction to interact with the stack, pushing a value onto the stack. Therefore, you must reset the contact before the next operation. 5. When you use this instruction with the EPOP instruction (API 1905), the value stored last in the device specified by D is read first, following the LIFO (last in first out) principle. D D + 1 The num ber of ti mes . the data is stored E0 D + 2 E1 ...... ...... ...... ...... D + 10 E9 D +16 For system u se + 18 D +17 D E0 E1 D + 19 E2 ......
6-619 API Instruction code Operand Function 1904 EPUSH P D Storing the contents of the index registers Device X Y M S T C HC D FR SM SR E K 16# “$” F D BOOL WORD DWORD LWORD UINT INT DINT LINT REAL LREAL TMR CNT STRING Data type D Pulse instruction 16-bit instruction 32-bit instruction ES3 ES3 ─