Section 7. Installation
296
Measure Sensors / Send RS-232 Data
'This program example demonstrates the import and export 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:
' [YR:DAY:HR:MM:SS]C
'Exported data has the form of the legacy Campbell Scientific Printable ASCII format:
' 01+0115. 02+135 03+00270 04+7999 05+00138 06+07999 07+04771
'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
'One Minute Data Table
DataTable
(OneMinTable,true,-1)
OpenInterval
'sets interval same as found in CR510
DataInterval
(0,1,Min,10)
Totalize
(1, KWHH,FP2,0)
Sample
(1, KWHHold,FP2)
Totalize
(1, KvarH,FP2,0)
Sample
(1, KVarHold,FP2)
Sample
(1, StationID,FP2)
EndTable
'Clock Set Record Data Table
DataTable
(ClockSetRecord,True,-1)
Sample
(7,ClkSet(),FP2)
EndTable
'Subroutine to convert date formats (day-of-year to month and date)
Sub
DOY2MODAY
'Store Year, DOY, Hour, Minute and Second to Input Locations.
Year = InStringSplit(1)
DOY = InStringSplit(2)
Hour = InStringSplit(3)
Minute = InStringSplit(4)
Second = InStringSplit(5)
uSecond = 0
Содержание CR800 Series
Страница 2: ......
Страница 4: ......
Страница 6: ......
Страница 32: ......
Страница 34: ......
Страница 54: ......
Страница 92: ......
Страница 190: ...Section 7 Installation 190 FIGURE 40 Running Average Frequency Response FIGURE 41 Running Average Signal Attenuation ...
Страница 310: ......
Страница 446: ...Section 8 Operation 446 8 11 2 Data Display FIGURE 100 CR1000KD Displaying Data ...
Страница 448: ...Section 8 Operation 448 FIGURE 102 CR1000KD Real Time Custom ...
Страница 449: ...Section 8 Operation 449 8 11 2 3 Final Storage Data FIGURE 103 CR1000KD Final Storage Data ...
Страница 450: ...Section 8 Operation 450 8 11 3 Run Stop Program FIGURE 104 CR1000KD Run Stop Program ...
Страница 452: ...Section 8 Operation 452 FIGURE 106 CR1000KD File Edit ...
Страница 456: ......
Страница 462: ......
Страница 523: ...Section 11 Glossary 523 FIGURE 116 Relationships of Accuracy Precision and Resolution ...
Страница 524: ......
Страница 526: ......
Страница 556: ......
Страница 558: ......
Страница 560: ......
Страница 597: ......