Rockwell-automation 1775-KA PLC-3 Communication Adapter Module User Ma Manual de usuario Pagina 88

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 239
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 87
Message Procedure Commands
Chapter 6
610
There are two functions:
TO_BCD
FROM_BCD
Figure 6.2 illustrates the format of these functions as they might appear in
an assignment command.
Figure 6.2
Examples
of TO-BCD and FROM-BCD Functions
$D:12 = TO_BCD (27)
COUNT = FROM_BCD ($D:12)
<
<
<
Function Parameter
Function
Assignment Command
Destination of
Resulting Value
10028–I
The parameter of the function must be enclosed in parentheses. The
parameter may be any one of the following:
A direct numeric value (either decimal or octal)
An expression
A user symbol
A logical address
A symbolic address
TO_BCD Function
The TO_BCD function converts its parameter into a binary coded decimal
value that is 32 bits long. For example, the TO_BCD function in
Figure 6.2 stores the number 27 in binary–coded–decimal format in word
12 of the decimal section of PLC–3 memory. After this function is
executed, word 12 will contain the following bit pattern:
0000 0000 0010 0111
Vista de pagina 87
1 2 ... 83 84 85 86 87 88 89 90 91 92 93 ... 238 239

Comentarios a estos manuales

Sin comentarios