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>FUN 80MUXIMULTIPLEX INPUTIN : Multiplex input point numberOT : Multiplex output point number(must be transistor output point)N : Multiplex input lines (2~8)FUN 80MUXID : Register for storing resultsD may combine with V, Z, P0~P9 to serveindirect address applicationRange X Y WY WM WS TMR CTR HR OR SR ROR DR K XRX0 Y0 WY0 WM0 WS0 T0 C0 R0 R3904 R3968 R5000 D0 2 V、ZOpe- ∣ ∣ ∣ ∣ ∣ ∣ ∣ ∣ ∣ ∣ ∣ ∣ ∣rand X240 Y240 WY240 WM1896 WS984 T255 C255 R3839 R3967 R4167 R8071 D4095 8 P0~P0IN ○OT ○N○D ○ ○ ○ ○ ○ ○ ○ ○* ○* ○ ○• This instruction uses the multiplex method to read out N lines of input status from 8 consecutive input points(IN0~IN7) starting from the input point specified by IN. With this method we can obtain 8×N input status, butonly need to use 8 input points and N output points.• The multiplex scanning method goes through N output points starting from the OT output point. Each scan oneof the N bits will set to 1 and the corresponding line will be selected. OT0 responsible for first line, while OT1responsible for second line, etc. Until it read all the N lines the 8×N status that has been read out is then storedinto the register starting at D, and the execution completed flag "DN" is set as 1 (but is only kept for onescanning period).• With every scan, this instruction retrieves a line for 8 input status, so N lines require N scan cycles before theycan be completed.X080.MUXIEN IN : X24OT : Y16N : 4D : WM0WR : D0DNM10• This example retrieves 4 lines×8 points of input,32 point status in all. They are stored into the32-bit register of DWM0 (M0~M31).Fourth lineM24 M25 M26 M27 M28 M29 M30 M31Third lineM16 M17 M18 M19 M20 M21 M22 M23Second lineM8 M9 M10M11M12M13M14M15First lineM0 M1 M2 M3 M4 M5 M6S/S X24 X25 X26 X27 X28 X29 X30 X31M724VPLC NPN transistor outputC Y16 Y17 Y18 Y19 Y20 Y21 Y22 Y237-62

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

Saved successfully!

Ooh no, something went wrong!