Delta Electronics — 6.13.2 Explanation of Data Processing Instructions

Chapter 6 Applied Instructions Symbol S : Matrix source n : Length of the array D : Pointer Explanation 6_ 1. This instruction checks the state of SM613. If SM613 is ON, the instruction clears the value of the pointer D to zero. The instruction reads the value of the bit specified by the value of the pointer D into SM614, and then checks the state of SM612. If SM612 is ON, the instruction increments the value of the pointer D by adding one. 2. When the instruction reads the value of the last bit, SM608 is ON, and the instruction stores the bit number in the pointer D . 3. The operand n must be between 1–256. 4. You specify the value of the pointer.

The values are between 0–16 n − 1, and correspond to the range between b0–b16 n − 1. If the value of the pointer exceeds the range, SM611 is set to one, and the instruction is not executed. Example 1. Suppose SM613 is OFF and SM612 is ON when X0.0 switches from OFF to ON. 2. Suppose the current value in D20 is 45.

When X0.0 is switched from OFF to ON three times, the instruction gives 6-365 API Instruction code Operand Function 1212 MBRD P S, n, D Reading a matrix bit Device X Y M S T C HC D FR SM SR E K 16# “$” F S       n          D      BOOL WORD DWORD LWORD UINT INT DINT LINT REAL LREAL TMR CNT STRING Data type S    n    D    Pulse instruction 16-bit instruction 32-bit instruction AS AS -