Rockwell-automation 5370-UPK CVIM USER-PAK Option Manual de usuario Pagina 86

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 142
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 85
Chapter 8
Defining Strings for Serial Ports and Viewports
810
Example We want to display the statistical mean for gages 18. To do this,
we would use the data code for statistical mean value, Sn.3, where n
represents the tool type and number. For this data code, the n values 916
indicate gages 18.
We could use the following string:
Gage # Mean = S #+8 . 3 n
and use the Repeat String feature, with Start = 1, End = 8, Increment = 1.
In this string, the term # + 8 is used for the n value in the data code Sn.3:
Data code Sn.3
Gage # Mean = S #+8 . 3 n
n= #+8
where
When this string is repeated for index values from 18, the n value #+8
(current index value + 8) indexes through the values 916. In this way, eight
strings are displayed, which provide the mean values for gages 18:
Gage 1 Mean = 144.560
Gage 2 Mean = 222.666
Field Formatting Codes
You can, at your option, specify the format of the contents of any numerical
field, that is, fields in the displayed or transmitted strings which correspond
either to tool results (or other data), or to the index (#) number. You specify
field format by placing a field formatting code in parentheses immediately
following the data code (or index character) in the string you are defining.
In defining the format, you can simply specify the field width, which limits
the number of places a field will occupy in the serial message (the default
format is 9 places). Or, you can further define the format by also specifying
other characteristics, such as limiting the number of decimal places used (for
floating point results only), or specifying left justification of data within the
field.
For instance, within a serial port string, the data code G1 will transmit the
result of the gage 1; the transmitted field will, by default, be 9 places in
width. However, entering the code G1(3), where (3) is the format code,
transmits the result of the gage 1, and limits the field for that result to three
places in the serial message.
Likewise, within a viewport string, the data code G1 will display the result of
the gage 1; the displayed field will, by default, be 9 places in width.
However, entering the code G1(3), where (3) is the format code, displays
Vista de pagina 85
1 2 ... 81 82 83 84 85 86 87 88 89 90 91 ... 141 142

Comentarios a estos manuales

Sin comentarios