Campbell Scientific CR800 and CR850 Measurement and Control Systems User Manual
Page 216

Section 7. Installation
216
programming to output and accept these same ASCII strings. A similar program
can be used to emulate CR10X and CR23X dataloggers.
Solution: CRBasic example Measure Sensors / Send RS-232 Data
(p. 216)
imports
and exports serial data via the CR800 RS-232 port. Imported data are expected to
have the form of the legacy Campbell Scientific time set C command. Exported
data has the form of the legacy Campbell Scientific Printable ASCII format.
Note The nine-pin RS-232 port can be used to download the CR800 program if
the SerialOpen() baud rate matches that of the datalogger support software
(p. 382,
p. 429).
However, two-way PakBus
®
communications will cause the CR800 to
occasionally send unsolicited PakBus
®
packets out the RS-232 port for at least 40
seconds after the last PakBus
®
communication. This will produce some "noise" on
the intended data-output signal.
Monitor the CR800 RS-232 port with the HyperTerminal instance described in
Configure HyperTerminal
(p. 212).
Send C-command file to set the clock according
to the text in the file.
Note The HyperTerminal file will not update automatically with actual time. The
file only simulates a clock source for the purposes of this example.
CRBasic Example 41. Measure Sensors / Send RS‐232 Data
'CR800 is programmed to accept legacy "C" command to set the CR800 clock.
'Declarations
'Visible Variables
Public
StationID
Public
KWH_In
Public
KVarH_I
Public
KWHHold
Public
KVarHold
Public
KWHH
Public
KvarH
Public
InString
As String
* 25
Public
OutString
As String
* 100
'Hidden Variables
Dim
i, rTime(9), OneMinData(6), OutFrag(6)
As String
Dim
InStringSize, InStringSplit(5)
As String
Dim
Date, Month, Year, DOY, Hour, Minute, Second, uSecond
Dim
LeapMOD4, LeapMOD100, LeapMOD400
Dim
Leap4
As Boolean
, Leap100
As Boolean
, Leap400
As Boolean
Dim
LeapYear
As Boolean
Dim
ClkSet(7)
As Float