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

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 142
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 105
Chapter 8
Defining Strings for Serial Ports and Viewports
830
This section provides an example of a serial port message string, for the
purpose of demonstrating the use of string elements, and the definition of the
Event.
For this example, we want to transmit the results of the two gage
measurements, and also to transmit the results only if the inspection fails.
First, determine the format. Suppose we want the message transmitted in
the following format for use by a printer:
Results [space] [ gage 1 result ] [space] [ gage 2 result ] [CR ] [ LF]
where [space] is the space character, [CR] is the carriage return, and [LF]
is the line feed character. A string text entry which would transmit the
above content and format would be:
Results g1(3) g2(3) n
The above string text would look like this on the keyboard display:
String entry display
Transmitted String:
Results 109 112 [CR] [LF]
Assuming these gage results for an inspection Gage 1 = 109, Gage 2 =
112 the resulting string, if transmitted, would be as shown above.
Now lets look at the string elements to see how the message was created:
Literal Text consists of any characters enclosed within a pair of
quotes. Two literal text entries in the string are Results (which
includes a space after the word Results) and (which is a space
enclosed in quotes).
Results 109 112 [CR] [LF]
Note that, as a result of the spaces in the literal entries, spaces exist
between the transmitted fields.
Data Codes Using a data code results in the transmission of a field
containing corresponding data. The example includes two data codes, g1
Custom Serial Port
Message Example
Vista de pagina 105
1 2 ... 101 102 103 104 105 106 107 108 109 110 111 ... 141 142

Comentarios a estos manuales

Sin comentarios