13.07.2015 Views

[Instruction] Contents

[Instruction] Contents

[Instruction] Contents

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Advanced Function <strong>Instruction</strong>FUN102 D PT→TTABLE TO TABLE MOVEFUN102 D PT→TMove controlPointer incrementENPAULadder symbol102DP.T TTs :Td :L :Pr :ENDERRMove to endPointer errorTs : Starting number of source table registerTd : Starting number of destination tableregisterL : Table (Ts and Td) lengthPr : Pointer registerTs, Rd may combine with V, Z, P0~P9 toserve indirect address applicationPointer clearCLROperandRangeWX WY WM WS TMR CTR HR IR OR SR ROR DR K XRWX0∣WX240WY0∣WY240WM0∣WM1896WS0∣WS984T0∣T255C0∣C255R0∣R3839R3840∣R3903R3904∣R3967R3968∣R4167R5000∣R8071D0∣D4095P0~P9Ts ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○Td ○ ○ ○ ○ ○ ○ ○ ○* ○* ○ ○L ○ ○* ○ ○Pr ○ ○ ○ ○ ○ ○ ○ ○* ○* ○• When move control "EN" = 1 or "EN↑" ( P instruction) have a transition from 0 to 1, the register Tspr pointedby pointer Pr within the source table will be moved to a register Tdpr, which also pointed by the pointer Pr in thedestination table. Before execution, it will first check the input signal of pointer clear "CLR". If "CLR" is 1, it willfirst clear Pr to 0 and then do the move (in this case Ts0→Td0). After the move action has been completed itwill then check the value of pointer Pr. If the Pr value has already reached L-1 (point to the last register on thetable), then it will set the move-to-end flag "END" to 1 and finish executing of this instruction. If the Pr value isless than L-1, it will check the status of "INC". If "INC" is 1, then the Pr value will be increased by 1 beforeexecution. Besides, pointer clear "CLR" can execute independently, and will not be influenced by other input.• The effective range of the pointer is 0 to L-1. Beyond this range, the pointer error flag "ERR" will be set to 1,and this instruction will not be carried out.2∣2048V、ZX0102P.T TEN TS : R 0Td : R 10INC L :Pr :CLR10R 20ENDERR• The diagram at left below is the status before execution.When X0 from 0→1, the content of R5 in Ts table will copy toR15 and pointer R20 will be increased by 1.PrPrR20 5 R20 6Ts Td TdR0 1111 R10 0000 R10 0000R1 1111 R11 0000 R11 0000R2 1111 R12 0000 R12 0000R3 1111 R13 0000 X0= R13 0000R4 1111 R14 8888 R14 8888R5 1111 R15 0000 R15 1111R6 1111 R16 0000 R16 0000R7 1111 R17 0000R17 0000R8 1111 R18 0000 R18 0000R9 1111 R19 0000 R19 0000Before executionresult7-86

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!