Chapter 2 Devices The relation among bits, nibbles, bytes, words, and double words in the binary system is as follows. DW Double word W1 W0 Word BY3 BY2 BY1 BY0 Byte NB0 NB1 NB2 NB3 NB4 NB5 NB6 NB7 Nibble Bit The PLC uses four types of values to execute the peration according to different control purposes. o The functions of these values are illustrated as follows: 1. Binary number (BIN) The PLC adopts the b Decimal number (DEC) The decimal number in th the setting value of the timer (T) or the setti inary system to operate the values. 2. e PLC is used as ng value of the counter (C/HC). For example, TMR C0 50 (constant K). the device number.
For example, M10 and T30 (device number) 0 as the number before or after the decimal point. For example, X0. , Y0.11, and D10.0 s used as the operand in the applied instruction. For example, MOV 123 (device number). the constant K: It i D0 (constant K). ed decimal (BCD) A decimal value is represented b can represent a four-digit decimal value. Hexadecimal number (HEX) The hexadecimal number in t the constant 16#: It is used as the operand in the ap 3. Binary-cod y a nibble or four bits, and therefore sixteen consecutive bits 4. he PLC is used as plied instruction. For example, MOV 16#1A2B D0 (hexadecimal constant). ce table:
The following is the referen 2-5 Name Description 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 system.
b31 b30 b29 b28 b27 b26 b25 b2 4b23 b22 b 21 b20 b19 b18 b17 b16 b1 5b14 b13 b12 b11 b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0 Binary number Decimal number Binary-coded decimal number Hexadecimal number (BIN) (DEC) (BCD) (HEX) Internal operation in the PLC Decimal constant, device number Instruction related to the binary-code decimal number Hexadecimal constant, device number 0000 0 0000 0 0001 1 0001 1 0010 2 0010 2 0011 3 0011 3 0100 4 0100 4 0101 5 0101 5 0110 6 0110 6 0111 7 0111 7 1000 8 1000 8 1001 9 1001 9