Kaiyi — 2.2.1 Values and Constants

AH500 Programming Manual *: * indicates that users can set the range of latched areas, and that the device can be set to Non-latched Area. The range of latched areas can not exceed the device range. Above all, only 32768 data registers at most can be non-latched areas. For example, users can set D50~D32817 or D32768~D65535 to Latched Areas although the default range of latched areas is D0~D32767. 2.2 Functions of Devices The procedure for processing the program in the PLC:  Regenerating the input signal: 1. Before the program is executed, the state of the external input signal is read into the memory of the input signal. 2.

When program is executed, the state in the memory of the input signal does not change even if the input signal changes from ON to OFF or from OFF to ON. Not until the next scan begins will the input signal be refreshed.  Processing the program: Input terminal X Regenerating the input signal Device memory D e v i c e m e m o r y Processing the program After the input signal is refreshed, the instructions in the program are executed in order from the start address of the program, and the results are stored in the device memories.  Regenerating the state of the output:

Device memory Regenerating the output signal and sending it to the output terminal After the instruction END is executed, the state in the device memory is sent to the specified output terminal. 2.2.1 Values and Constants 2-4 Device Function Device range Latched area HC* 32-bit counter HC0~HC63 The default range is HC0~HC63. D* Data register D0~D16383 (AHCPU500) The default range is D0~D16383. D0~D32767 (AHCPU510) The default range is D0~D32767. At most 32768 devices can be latched areas. D0~D65535 (AHCPU520/530) SR Special data register SR0~SR2047 Some are latched, and can not be changed. Please refer to the function list of SR for more information.

L Link register L0~D16383 (AHCPU500) All devices are non-latched. L0~D32767 (AHCPU510) L0~D65535 (AHCPU520/530) E Index register E0~E31 All devices are non-latched. Name Description Bit A bit is the basic unit in the binary system. Its state is either 1 or 0. Nibble A nibble is composed of four consecutive bits (e.g. b3~b0). Nibbles can be used to represent 0~9 in the decimal system, or 0~F in the hexadecimal system. Byte A byte is composed of two consecutive nibbles (i.e. 8 bits, b7~b0). Bytes can be used to represent 00~FF in the hexadecimal system. Word A word is composed of two consecutive bytes (i.e. 16 bits, b15~b0). Words can be used to represent 0000~FFFF in the hexadecimal system.