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.

Basic Function <strong>Instruction</strong>CCOUNTER(16-Bit: C0~C199, 32-bit: C200~C255)CExample 116-Bit Fixed CounterLadder diagram Key operations Mnemonic codeORG ORG SHORTX0X1CKCLRRSTC 1PV :M19735CUPY1ORGLDRST M 1973ORG X 0LD X 1C 1 PV: 5X0X1CKCLRSETC 2PV :M19735CUPOUTORGFO 0OUT Y 1ORG SHORTSET M 1973An example of applyingthe “Count-Up” status byusing FO0 directly.ORGLDORG X 0LD X 1C 2 PV: 5X0X13276632767M1973=0(Defaulted)M1973=1C1Y1C2(CV)C20011325 times32445632767 times500Count StartCount-UpExample 232-Bit counter with variable preset valueLike a timer, if the PV of a counter is changed to a register (such as R, D, and so on), the counter will use theregister contents as the counting PV. Therefore, only need to change the register contents to change the PV ofthe counter while PLC is running. Below is an example of a 32-bit counter that uses the data register R0 as thePV (in fact it is the 32-bit PV formed by R1 and R0).6-6

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

Saved successfully!

Ooh no, something went wrong!