Chapter 5 Applied Instructions Explanation S : Initial device; D : Device into which a value is written; n : Number of devices The values in the n word devices starting from S are defined as first in, first out values, and S is taken as a pointer. When the instruction is executed, the value in S decreases by one, the value in S + 1 is written into D , the values in S + n -1~ S +2 are moved rightwards, and the value in S + n -1 is unchanged. When the value in S is equal to 0, the instruction does not process the reading of the values, and the zero flag SM20 is ON.
If KnM/KnS is used, it is suggested that M device numbers/S device numbers should start from a number which is a multiple of 16 in the decimal numeral system, e.g. K1M0 and K4S16 (decimal numeral system). Generally, the pulse instruction SFRDP is used. 2≤ n ≤512 When X0.0 is turned from OFF to ON, the value in D1 is written into D21, the values in D9~D2 are moved rightwards, the value in D9 is unchanged, and the value in D0 decreases by one. The value in D1 is moved and written into D21 in the way described below. The value in D1 is written into D21. The values in D9~D2 are moved rightwards. The value in D0 decreases by one. Example X0.0 The value in D1 is read.
5-59 API Instruction code Operand Function Moving a value and 39 SFRD P S, D, n reading it from a word device Device Xn.n Yn.n M S K 16# F KnM KnS D W T C V Z S D n Pulse instruction 16-bit instruction (7 steps) 32-bit instruction – .0 SFRDP D0 D21 K10 n=10 D9 D8 D7 D6 D5 D4 D3 D2 D1 D0 D21 Pointer D9 D8 D7 D6 D5 D4 D3 D2 D1 D0 D21