Chapter 6 Symbol Variables (b) If the addition of the value in an index register to a device address produces a device address which is not within the range, the PLC will operate incorrectly. As a result, users have to be more careful when they modify a symbol with an index register. Take AHCPU530-EN for example. If the value in E0 is larger than 35, the operand D65500@E0 represents a device which is not within the range of data registers, and an error occurs in the CPU module. (c) If the value in an index register is changed, the device which actually operates differs from the original device.
As a result, if the original device is not used in the program, the final value in the original device is retained. Take AHCPU530-EN for example. In the figure below, if the value in E0 is 2. M102 is ON when M0 is ON. If the value in E0 is changed from 2 to 3, the device which actually operates becomes M103. M103 is ON when M0 is ON. Owing to the fact that M102 is not used in the program, M102 remains ON. 6.1.6 Bit Operation of Symbol Variable (Only AH/AS Series ) An AH/AS series CPU module supports the manipulation of the bits in a word device. The format is Word device.Bit number . For example, D0.2 indicates that bit 2 in D0 is manipulated. The same rule applies to the symbols.
The format is Identifier . Bit number , e.g. VB . 2. The rule also applies to the symbols whose data type is ARRAY. The format is Identifier[Index] . Bit number , e.g. Ary[0] . 1. The bit number must be a decimal constant. No matter what the data type of a symbol modified is, the bit number must be within the range between 0 and 15. Besides, the bits in a device represented by a symbol whose data type is BOOL, STEP, COUNTER, TIMER, a function block, HC_POINTER, C_POINTER, or T_POINTER cannot be manipulated. In the figure below, the data type of VB is WORD. Suppose the present value of VB is 0.
When M0 is ON, the value of bit 2 in the device represented by VB is 1, that is, the value of VB is 4. 6-19