Appendix D Use of Application Instructions | DOP-EXIO Series Operands: S : Source device D : Destination device for storing counted value Explanations: 1. Among the bits of S , the total of bits whose content is “1” will be stored in D. 2. When all the 16 bits of S are “0”, zero flag M1020 = On. 3. When 32- instruction is in use, D will occupy 2 registers. Program Example: When X10 = On, among the 16 bits of D0, the total of bits whose content is “1” will be stored in D2. X10 K3 D2 D0 Revision March, 2008, Doc. Name:
2007PDD23000014 D-55 Mnemonic Operands Function SUM D S D Sum of Active Bits Bit Devices Word Devices 16-bit instruction (5 Steps) Continuous SUM execution 32-bit instruction (9 Steps) Continuous DSUM execution y Flags: M1020 (Zero flag) X Y M S K H KnX KnY KnM KnS T C D E F S ¼ ¼ ¼ ¼ ¼ ¼ ¼ ¼ ¼ ¼ ¼ D ¼ ¼ ¼ ¼ ¼ ¼ ¼ ¼ y Note: 1. If S and D is used in device F, only 16-bit instruction is applicable. SUM D0 D2 0 0 0 1 0 0 1 0 0 0 0 0 0 1 0 0