Section 7. Installation
313
o
Tip — concatenate (add) strings together using & instead of +.
o
Tip — use CHR() instruction to insert ASCII / ANSI characters into
a string.
3. Output string via the serial port (SerialOut() or SerialOutBlock() command).
o
Example:
SerialOut
(Com1,SerialOutString,"",0,100)
o
Declare the output string variable large enough to hold the entire
concatenation.
o
Example:
Public
SerialOutString
As String
* 100
•
SerialOut() and SerialOutBlock() output the same data, except that
SerialOutBlock() transmits null values while SerialOut() strings are
terminated by a null value.
7.7.18.5.4
Serial I/O Translating Bytes
One or more of three principle data formats may end up in the SerialInString()
variable (see examples in Serial Input Programming Basics
(p. 311)
). Data may be
combinations or variations of these. The instrument manufacturer must provide
the rules for decoding the data
•
Alpha-numeric — Each digit represents an alpha-numeric value. For
ex
ample, R = the letter R, and 2 = decimal 2. This is the easiest
protocol to translate since the encode and translation are identical.
Normally, the CR3000 is programmed to parse (split) the string and
place values in variables.
Example string from humidity, temperature, and pressure sensor:
SerialInString
= "RH= 60.5 %RH T= 23.7 °C Tdf= 15.6 °C Td=
15.6 °C a= 13.0 g/m3 x= 11.1 g/kg Tw= 18.5 °C H2O=
17889 ppmV pw=17.81 hPa pws 29.43 hPa h= 52.3 kJ/kg dT=
8.1 °C"
•
Hex Pairs — Bytes are translated to hex pairs, consisting of digits 0 to 9
and letters a to f. Each pair describes a hexadecimal ASCII / ANSI code.
Some codes translate to alpha-numeric values, others to symbols or non-
printable control characters.
Example sting from temperature sensor:
SerialInString
= "23 30 31 38 34 0D"
which translates to
#01 84 cr
Содержание CR3000 Micrologger
Страница 2: ......
Страница 3: ......
Страница 4: ......
Страница 6: ......
Страница 30: ......
Страница 34: ......
Страница 36: ......
Страница 96: ......
Страница 200: ...Section 7 Installation 200 FIGURE 42 Running Average Frequency Response FIGURE 43 Running Average Signal Attenuation ...
Страница 485: ...Section 8 Operation 485 8 11 2 Data Display FIGURE 110 Keyboard and Display Displaying Data ...
Страница 487: ...Section 8 Operation 487 FIGURE 112 CR1000KD Real Time Custom ...
Страница 488: ...Section 8 Operation 488 8 11 2 3 Final Storage Data FIGURE 113 Keyboard and Display Final Storage Data ...
Страница 489: ...Section 8 Operation 489 8 11 3 Run Stop Program FIGURE 114 Keyboard and Display Run Stop Program ...
Страница 491: ...Section 8 Operation 491 FIGURE 116 Keyboard and Display File Edit ...
Страница 495: ...Section 8 Operation 495 Low power standby whenever possible Low power bus sets bus and modules to low power ...
Страница 496: ......
Страница 502: ......
Страница 564: ...Section 11 Glossary 564 FIGURE 126 Relationships of Accuracy Precision and Resolution ...
Страница 566: ......
Страница 594: ......
Страница 598: ......
Страница 600: ......
Страница 602: ......
Страница 624: ......
Страница 642: ......
Страница 643: ......