AH500 Programming Manual
2-6
2.2 Functions of Devices
The procedure for processing the program in the PLC:
Input terminal X
Device memory
Processing the program
Device memory
Regenerating the output signal
and sending it to the output terminal
Regenerating the input signal
Device memory
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:
After the input signal is refreshed
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:
After the instruction END is executed, the state in
the device memory is sent to the specified output
2.2.1 Values and Constants
Name Description
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
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
Double word
A double word is composed of two consecutive words (i.e. 32 bits,
b31~b0). Double words can be used to represent
00000000~FFFFFFFF in the hexadecimal system.
Quadruple word
A quadruple word is composed of four consecutive words (i.e. 64 bits,
b63~b0). Quadruple words can be used to represent
0000000000000000 – FFFFFFFFFFFFFFFF in the hexadecimal
The relation among bits, nibbles, bytes, words, and double words in the binary system is as follows.
b31b30 b29 b28 b27b26 b25 b24b23 b22 b21 b20b19 b18 b17 b16 b15b14 b13
b12b 11 b10
b9 b8
b7
b6
b5 b4
b3
b2 b1 b0
NB0NB1NB2NB3NB4NB5NB6NB7
BY3 BY2 BY1 BY0
W1
DW
W0
Double word
Word
Byte
Nibble
Bit
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)