AH500 Hardware and Operation Manual 
5-10 
5.2.11  32-bit Counters 
  Characteristics of the 32-bit counter 
-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. 
After the scan is complete, the contact acts. 
  32-bit general-purpose addition/subtraction counter 
1.  Setting range: -2,147,483,648~2,147,483,647 
2.  The switch between the 32-bit general-purpose addition counters and the 32-bit general-purpose 
subtraction counters depends on the states of the special auxiliary relays SM621~SM684. For 
example, the counter HC0 is the addition counter when SM621 is OFF, whereas HC0 is the 
subtraction counter when SM621 is ON. 
3.  Users can use either the constant or the value in the data registers as the setting value of the 
counter, and the setting value can be a positive or a negative. If users use the value in the data 
registers as the setting value of the counter, the setting value occupies two consecutive registers. 
4.  For the general-purpose counter, the current value of the counter is cleared when there is a power 
cut. If the counter is the latched one, the current value of the counter and the state of the contact 
before the power cut will be retained. The latched counter counts from the current value when the 
power supply is restored. 
5.  If the counter counts up from 2,147,483,647, the next current value becomes -2,147,483,648. If the 
counter counts down from -2,147,483,648, the next current value becomes 2,147,483,647. 
5.2.12  Data Registers 
The data register stores the 16-bit data. The highest bit represents either a positive sign or a negative sign, 
and the values which can be stored in the data registers range from -32,768 to +32,767. Two 16-bit registers 
can be combined into a 32-bit register, i.e. (D+1, D) in which the register whose number is smaller represents 
the low 16 bits. The highest bit represents either a positive sign or a negative sign, and the values which can 
be stored in the data registers range from -2,147,483,648 to +2,147,483,647. Besides, four 16-bit registers 
can be combined into a 64-bit register, i.e. (D+3, D+2, D+1, D) in which the register whose number is smaller 
represents the lower 16 bits. The highest bit represents either a positive sign or a negative sign, and the 
values which can be stored in the data registers range from -9,223,372,036,854,776 to 
+9,223,372,036,854,775,807. The data registers can also be used to refresh the values in the control registers 
in the modules other than digital I/O modules. Please refer to ISPSoft User Manual for more information 
regarding refreshing the values in the control registers. 
The registers can be classified into two types according to their properties. 
1.  General-purpose register: When the PLC begins to run, or is disconnected, the value in the register will be 
cleared to zero. If users want to retain the data when the PLC begins to RUN, they can refer to ISPSoft 
User Manual for more information. Please notice that the value will still be cleared to zero when the PLC 
is disconnected. 
2.  Latched register: If the PLC is disconnected, the data in the latched register will not be cleared. In other 
words, the value before the disconnection is still retained. If users want to clear the data in the latched 
area, they can use RST or ZRST.