13.07.2015 Views

[Instruction] Contents

[Instruction] Contents

[Instruction] Contents

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Advanced Function <strong>Instruction</strong>FUN100 D PR→TREGISTER TO TABLE MOVEFUN100 D PR→TMove controlPointer incrementPointer clearENPAUCLRLadder symbol100DP.R TRs :Td :L :Pr :ENDERRMove to endPointer errorRs : Source data , can be constant or registerTd : Source register for destination tableL : Length of destination tablePr : Pointer registerRs, Td can associate with V, Z, P0~P9 indexregister as indirect addressingOperandRangeWX WY WM WS TMR CTR HR IR OR SR ROR DR K XRWX0∣WX240WY0∣WY240WM0∣WM1896WS0∣WS984T0∣T255C0∣C255R0∣R3839R3840∣R3903R3904∣R3967R3968∣R4167R5000∣R8071D0∣D409516/32bit+/-numberP0~P9Rs ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○Td ○ ○ ○ ○ ○ ○ ○ ○* ○* ○ ○L ○ ○* ○ 2~2048Pr ○ ○ ○ ○ ○ ○ ○ ○* ○* ○V、Z●●When move control "EN" = 1 or "EN↑" ( P instruction) transition from 0 to 1, the contents of the sourceregister Rs will be written onto the register Tdpr indicated by the pointer Pr within the destination table Td(length is L). Before executing, this instruction will first check the pointer clear "CLR" input signal. If "CLR" is1, it will first clear the pointer Pr, and then carry out the move operation. After the move has been completed,it will then check the Pr value. If the Pr value has already reached L-1 (point to the last register in the table)then it will only set the move-to-end flag "END" to 1, and finish execution of this instruction. If the Pr value isless than L-1, then it must again check the pointer increment "INC" input signal. If "INC" is 1, then Pr valuewill be also increased. Besides, pointer clear "CLR" is able to operate independently, without beinginfluenced by other input.The effective range of the pointer is 0 to L-1. Beyond this range, the pointer error "ERR" will be set to 1, andthis instruction will not be performed.X1100P.R TEN RS : R 0Td : R 10INC L :Pr :CLR8R 50ENDERR• The example at left at the very beginning pointer Pr = 4,the entire content of table Td is 0, and the Rs value is8888. The diagram below shows the operation resultswhen X1 have the transition of 0→1 twice.• Because INC is 1, Pr will increase by 1 each time theinstruction is executed.Pr Pr Pr4 R50 5 R50 6 R50Td Td Td0000 R10(T0) 0000 R10 0000 R100000 R11(T1) 0000 R11 0000 R11Rs 0000 R12(T2)X0=0000 R12X0=0000 R12R0 8888 0000 R13(T3) (First) 0000 R13 (Second) 0000 R130000 R14(T4) 8888 R14 8888 R140000 R15(T5) 0000 R15 8888 R150000 R16(T6) 0000 R16 0000 R160000 R17(T7)0000 R170000 R17Before First time result Second time result7-84

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

Saved successfully!

Ooh no, something went wrong!