Chapter 2 Devices, Symbols and Instructions 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. You 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 you 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. 2_ Refer to Chapter 5: Understanding Common Devices of AH Motion Controller - Operation Manual for more information.
2.1.15 Index Registers (E) The index register is the 16-bit data register. It is like the general register in that the data can be read from it and written into it. However, it is mainly used as the index register. The range of index registers is E0~E13. Refer to 2.2.5 Modifying a Symbol with an Index Register for more information. 2.1.16 Values and Constants (K, 16#) The PLC uses four types of values to execute the operation according to different control purposes. The functions of these values are illustrated as follows: 1. Binary number (BIN) The PLC adopts the binary system to operate the values. 2.
Decimal number (DEC) The decimal number in the PLC is used as the setting value of the timer (T) or the setting value of the counter (C/HC). For example, TMR C0 50 ( constant K ). the device number. For example, M10 and T30 (device number) the number before or after the decimal point. For example, X0.0, Y0.11, and D10.0 (device number). the constant K : It is used as the operand in the applied instruction. For example, MOV 123 D0 (constant K) . 3. Binary-coded decimal (BCD) A decimal value is represented by a nibble or four bits, and therefore sixteen consecutive bits can represent a four-digit decimal value. 4.
Hexadecimal number (HEX) The hexadecimal number in the PLC is used as the constant 16# : It is used as the operand in the applied instruction. For example, MOV 16#1A2B D0 (hexadecimal constant). 2-9