Section 7. Installation
324
KWHH = KWH_In
KvarH = KVarH_I
KWHHold = KWHH + KWHHold
KVarHold = KvarH + KVarHold
CallTable
OneMinTable
'////////////////////Serial I/O Section/////////////////////
SerialOpen
(ComRS232,9600,0,0,10000)
'///////////////Serial Time Set Input Section///////////////
'Accept old C command -- [2008:028:10:36:22]C -- parse, process, set
'clock (Note: Chr(91) = "[", Chr(67) = "C")
SerialInRecord
(ComRS232,InString,91,0,67,InStringSize,01)
If
InStringSize <> 0
Then
SplitStr
(InStringSplit,InString,"",5,0)
Call
DOY2MODAY
'Call subroutine to convert day-of-year
'to month & day
ClkSet(1) = Year
ClkSet(2) = Month
ClkSet(3) = Date
ClkSet(4) = Hour
ClkSet(5) = Minute
ClkSet(6) = Second
ClkSet(7) = uSecond
'Note: ClkSet array requires year, month, date, hour, min, sec, msec
ClockSet
(ClkSet())
CallTable
(ClockSetRecord)
EndIf
'/////////////////Serial Output Section/////////////////////
'Construct old Campbell Scientific Printable ASCII data format and output to COM1
'Read datalogger clock
RealTime
(rTime)
If
TimeIntoInterval
(0,5,Sec)
Then
'Load OneMinData table data for processing into printable ASCII
GetRecord
(OneMinData(),OneMinTable,1)
'/- Sign
For
i=1
To
6
If
OneMinData(i) < 0
Then
'Note: chr45 is - sign
OutFrag(i)=CHR(45) &
FormatFloat
(
ABS
(OneMinData(i)),"%05g")
Else
'Note: chr43 is + sign
OutFrag(i)=CHR(43) &
FormatFloat
(
ABS
(OneMinData(i)),"%05g")
EndIf
Next
i
'Concatenate Printable ASCII string, then push string out RS-232
'(first 2 fields are ID, hhmm):
OutString = "01+0115." & " 02+" &
FormatFloat
(rTime(4),"%02.0f") & _
FormatFloat
(rTime(5),"%02.0f")
OutString = OutString & " 03" & OutFrag(1) & " 04" & OutFrag(2) & _
" 05" & OutFrag(3)
OutString = OutString & " 06" & OutFrag(4) & " 07" & OutFrag(5) & _
CHR(13) & CHR(10) & ""
'add CR LF null
Summary of Contents for CR3000 Micrologger
Page 2: ......
Page 3: ......
Page 4: ......
Page 6: ......
Page 30: ......
Page 34: ......
Page 36: ......
Page 96: ......
Page 485: ...Section 8 Operation 485 8 11 2 Data Display FIGURE 110 Keyboard and Display Displaying Data ...
Page 487: ...Section 8 Operation 487 FIGURE 112 CR1000KD Real Time Custom ...
Page 491: ...Section 8 Operation 491 FIGURE 116 Keyboard and Display File Edit ...
Page 496: ......
Page 502: ......
Page 564: ...Section 11 Glossary 564 FIGURE 126 Relationships of Accuracy Precision and Resolution ...
Page 566: ......
Page 594: ......
Page 598: ......
Page 600: ......
Page 602: ......
Page 624: ......
Page 642: ......
Page 643: ......