Mitsubishi — 3.8 Counters

Chapter 3 Devices 32-bit high-speed counter: 1. The setting value of s 32-bit high-speed counter must be in the range of K-2,147,483,648 to K2,147,483,647. 2. Mode of counting: *1. The input terminals of AH20MC-5A are differential input terminals. X0.8 and X0.9 on AH15PM-5A are differential input terminals. The input terminals of AH05PM-5A/AH10PM-5A are transistors whose collectors are open collectors. X0.10~X0.15 on AH15PM-5A are transistors whose collectors are open collectors. *2. The terminal S/S on AH05PM-5A/10PM-5A must be connected. X0.10~X0.15 on AH15PM-5A must be connected to the terminal S/S. *3. U/D: Counting up/Counting down; P/D: Pulse/Direction; A/B: A phase/B phase  C200:

Users can select a mode of counting by setting SM200 and SM201. Input signals are controlled by X0.8 and X0.9. If SM203 is ON, the function of resetting C200 will be enabled. Resetting signals are controlled by X0.0.  C204: Users can select a mode of counting by setting SM204 and SM205. Input signals are controlled by X0.10 and X0.11. If SM207 is ON, the function of resetting C204 will be enabled. Resetting signals are controlled by X0.1.  C208: Users can select a mode of counting by setting SM208 and SM209. Input signals are controlled by X0.12 and X0.13. If SM211 is ON, the function of resetting C208 will be enabled. Resetting signals are controlled by X0.2.  C212:

Users can select a mode of counting by setting SM212 and SM213. Input signals are controlled by X0.14 and X0.15. If SM215 is ON, the function of resetting C212 will be enabled. Resetting signals are controlled by X0.3.  C216: Users can select a mode of counting by setting SM216 and SM217. Input signals are controlled by X0.12 and X0.13. If SM219 is ON, the function of resetting C216 will be enabled. Resetting signals are controlled by X0.2.  C220: Users can select a mode of counting by setting SM220 and SM221. Input signals are controlled by X0.14 and X0.15. If SM223 is ON, the function of resetting C220 will be enabled. Resetting signals are controlled by X0.3. 3.

The setting value of a 32-bit high-speed counter can be a constant preceded by K, or the value stored in two consecutive data registers. A setting value can be a positive value, or a negative value. 4. If a power cut occurs when a general counter counts, the present value of the counter will be cleared. If a power cut occurs when a latching counter counts, the counter value and the state of the contact which are before the power cut will be retained, and the latching counter will not continue to count until power is restored. 5. If a counter counts up from the present value 2,147,483,647, the next value following 2,147,483,647 will be -2,147,483,648.

If a counter counts down from the present value -2,147,483,648, the next value following -2,147,483,648 will be 2,147,483,647. 3-11 Counter Mode of counting Resetting o f External reset External input Device Setting value*3 a counter terminal terminal*1 *2 C200 K1SM200 0: U/D 1: P/D 2: A/B (One time the frequency of A/B-phase inputs) 3:

4A/B (Four times the frequency of A/B-phase inputs) SM203 X0.0+ and X0.0- X0.8, X0.9, and S/S C204 K1SM204 SM207 X0.1+ and X0.1- X0.10, X0.11, and S/S C208 K1SM208 SM211 X0.2+ and X0.2- X0.12, X0.13, and S/S C212 K1SM212 SM215 X0.3+ and X0.3- X0.14, X0.15, and S/S C216 K1SM216 SM219 X0.2+ and X0.2- X0.12, X0.13, and S/S C220 K1SM220 SM223 X0.3+ and X0.3- X0.14, X0.15, and S/S