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>FUN 40 D PBITRDBIT READFUN 40 D PBITRDOperation controlENLadder symbol40DP.BITRDS :N :OBTOutput bitS : Source data to be readN : The bit number of the S data to be read out.S, N may combine with V, Z, P0~P9 to serveindirect address applicationERRN value errorOperandRangeWX 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/32-bit+/- numberP0~P9S ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○N ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ ○ 0~31 ○V、Z• When read control "EN" = 1 or "EN↑" ( P instruction) changes from 0 to 1, take the Nth bit of the S dataout , and put it to the output bit "OTB".• When read control "EN" = 0 or "EN↑" ( P instruction) is not change from 0 to 1, The output “OTB” can beselected to keep at the last state( if M1919=0 ) or set to zero ( if M1919=1 ).• When the operand is 16 bit, the effective range for N is 0~15. For 32 bit operand ( D instruction) it is 0~31.N beyond this range will set the N value error flag "ERR" to 1, and do not carry out this instruction.X0EN40P.BITRDS : WX 0 OTBN : 7ERRY0• The instruction at left reads the 7th bit (X7) status fromWX0 (X0~X15) and output to Y0. The results are asfollows:X15 X7 X0S WX0 1 1 0 0 1 1 1 0 1 0 0 1 1 0 0 1N=7────────── X0=Y0 17-15

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

Saved successfully!

Ooh no, something went wrong!