Chapter 2 Devices Example: 1. When X0.0 is ON, the instruction RST is executed, the current value of the counter C0 is cleared to zero, and the output contact is reset to OFF. 2. If X0.1 is switched from OFF to ON, the counter will count up, i.e. the current value will increase by one. 3. When the current value of the counter C0 matches the setting value 5, the contact of C0 is ON. Even if X0.1 is still triggered, C0 does not accept the trigger signal, and the current value remains 5. X0.0 X0.1 0 1 2 3 4 5 Current value of C0 Setting value 0 Y0.0 and C0 2.2.12 32-bit Counters The characteristics of the 32-bit counter:
2-47 Item 32-bit counter Type General type Number HC0~HC63 Direction Counting up/down setting value -2,147,483,648~+2,147,483,647 Specification of the setting value The setting value can be either the constant or the value occupying two data registers. Change of the current value The counter keeps counting after the value of the counter matches the setting value. Output contact The contact is ON when the value of the addition counter matches the setting value. The contact is reset to OFF when the value of the subtraction counter matches the setting value. Reset When the instruction RST is executed, the current value is cleared to zero, and the contact is reset of OFF.
Action of the contact After the scan is complete, the contact acts.