Campbell-scientific CR800 and CR850 Measurement and Control Systems Manual de usuario Pagina 212

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 566
  • Tabla de contenidos
  • SOLUCIÓN DE PROBLEMAS
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 211
Section 7. Installation
212
Scan(5,Sec, 3, 0)
'Serial Out Code
'Transmits string "*27.435,56.789#" out COM1
SerialOpen(Com1,9600,0,0,10000) 'Open a serial port
'Build the output string
SerialOutString = "*" & TempOut & "," & RhOut & "#"
'Output string via the serial port
SerialOut(Com1,SerialOutString,"",0,100)
'Serial In Code
'Receives string "27.435,56.789" via COM2
'Uses * and # character as filters
SerialOpen(Com2,9600,0,0,10000) 'Open a serial port
'Receive serial data as a string
'42 is ASCII code for "*", 35 is code for "#"
SerialInRecord(Com2,SerialInString,42,0,35,"",01)
'Parse the serial string
SplitStr(InStringSplit(),SerialInString,"",2,0)
NextScan
EndProg
7.8.8.6 Testing Applications
A common problem when developing a serial I/O application is the lack of an
immediately available serial device with which to develop and test programs.
Using HyperTerminal, a developer can simulate the output of a serial device or
capture serial input.
Note HyperTerminal is provided as a utility with Windows XP and earlier
versions of Windows. HyperTerminal is not provided with later versions of
Windows. HyperTerminal automatically converts binary data to ASCII on the
screen. Binary data can be captured, saved to a file, and then viewed with a
hexadecimal editor. Other terminal emulators are available from third-party
vendors that facilitate capture of binary or hexadecimal data.
7.8.8.6.1 Configure HyperTerminal
Create a HyperTerminal instance file by clicking Start | All Programs |
Accessories | Communications | HyperTerminal. The windows in the figures
HyperTerminal Connection Description
(p. 213) through HyperTerminal ASCII
Setup
(p. 214) are presented. Enter an instance name and click OK.
Vista de pagina 211
1 2 ... 207 208 209 210 211 212 213 214 215 216 217 ... 565 566

Comentarios a estos manuales

Sin comentarios