Number Systems: ST Prog2 Nro # 4
Number Systems: ST Prog2 Nro # 4
The hexadecimal
system has the
3. Grabamos y cerramos.
4ta Parte Programar el bloque de programa FC1
1. De la misma que se cre el bloque de datos, crear el bloque de
programa
FC1. Este bloque tendr la secuencia solicitada:
ST PROG2 Nro # 4
Number Systems
Since a PLC is a computer, it stores information in the form of
On or Off conditions (1 or 0), referred to as binary digits (bits).
Sometimes binary digits are used individually and sometimes
they are used to represent numerical values.
Decimal System Various number systems are used by PLCs. All number systems
have the same three characteristics: digits, base, weight. The
decimal system, which is commonly used in everyday life, has
the following characteristics:
Ten digits 0, 1, 2, 3, 4, 5, 6, 7, 8, 9
Base 10
Weights 1, 10, 100, 1000, ...
Binary System The binary system is used by programmable controllers. The
binary system has the following characteristics:
Two digits 0, 1
Base 2
Weights Powers of base 2 (1, 2, 4, 8, 16, ...)
In the binary system 1s and 0s are arranged into columns. Each
column is weighted. The first column has a binary weight of 2 0.
This is equivalent to a decimal 1. This is referred to as the least
significant bit. The binary weight is doubled with each
succeeding column. The next column, for example, has a weight
The ten digits of the decimal system are used for the first ten
digits of the hexadecimal system. The first six letters of the
alphabet are used for the remaining six digits.
A = 10 D = 13
B = 11 E = 14
C = 12 F = 15
The hexadecimal system is used in PLCs because it allows the
status of a large number of binary bits to be represented in a
small space such as on a computer screen or programming
device display. Each hexadecimal digit represents the exact
status of four binary bits. To convert a decimal number to a
hexadecimal number the decimal number is divided by the base
of 16. To convert decimal 28, for example, to hexadecimal:
Decimal 28 divided by 16 is 1 with a remainder of 12. Twelve is
equivalent to C in hexadecimal. The hexadecimal equivalent of
decimal 28 is 1C.
The decimal value of a hexadecimal number is obtained by
multiplying the individual hexadecimal digits by the base 16
weight and then adding the results. In the following example
the hexadecimal number 2B is converted to its decimal
equivalent of 43.