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>FUN126 PMBRDMATRIX BIT READFUN126 PMBRDReadout controlPointer incrementENINCLadder symbol126P.MBRDMs :L :Pr :OTBENDOutput bitRead to endMs : Starting register of matrixL : Matrix lengthPr : Pointer registerMs may combine with V, Z, P0~P9 to serveindirect address applicationPointer clearCLRERRPointer errorOperandRangeWX WY WM WS TMR CTR HR IR OR SR ROR DR K XRWX0∣WX240WY0∣WY240WM0∣WM1896WS0∣WS984T0∣T255C0∣C199R0∣R3839R3840∣R3903R3904∣R3967R3968∣R4167R5000∣R8071D0∣D4095Ms ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○L ○ ○* ○ ○Pr ○ ○ ○ ○ ○ ○ ○ ○* ○* ○2∣256V、ZP0~P9• When readout control "EN" = 1 or "EN↑" ( P instruction) has atransition from 0 to 1, the status of the bit Mspr pointed bypointer Pr within matrix Ms will be read out and appear at theoutput bit "OTB". Before the readout, this instruction will firstcheck the input -pointer clear "CLR". If "CLR" is 1, then the Prvalue will be cleared to 0 first before the readout action is carriedout. After the readout is completed, If the Pr value has alreadyreached 16L-1 (the final bit), then the read-to-end flag "END" willbe set to 1. If Pr is less than 16L-1, then the status of pointerincrement "INC" will be checked. If "INC" is 1, then Pr will beincreased by 1. Besides this, pointer clear "CLR" can executeindependently, and is not affected by other input.LMsMsprPrOTB• The effective range of the pointer is 0 to 16L-1. Beyond this range the pointer error flag "ERR" will be set to 1,and this instruction will not be carried out.X0ENINCCLR126P.MBRDMs : R 0L :Pr :5R 20OTBENDERR• In the program at left, INC = 1, so every time there isone readout the pointer will be increased by 1. With thisway each bit in Ms may be read out successively, asshown at left in the diagram below. When X0 goes 3times from 0→1, the results are shown at right in thediagram below .PrMs15Ms0↓Ms↓ R20 77R0 0 0 0 0 0 1 1 1 1 1 0 0 0 0 0 1R1 0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1OTBR2 0 0 0 1 1 1 0 0 0 1 1 1 0 0 0 1 0R3 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1R4 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0↑ ↑Ms79Ms77↑Ms64Before executionPr OTB END R20 78 1 0Pr OTB END R20 79 0 0Pr OTB END R20 79 1 1Execution result7-109

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

Saved successfully!

Ooh no, something went wrong!