04.01.2015 Views

CR1000 Manual - Campbell Scientific

CR1000 Manual - Campbell Scientific

CR1000 Manual - Campbell Scientific

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Section 7. Installation<br />

'Declare Public (viewable) Variables<br />

Public Batt_Volt As FLOAT<br />

Public PTemp_C<br />

Public AirTemp_C<br />

Public AirTemp_F<br />

Public AirTemp2_F<br />

Public DeltaT_C<br />

Public HowMany<br />

Public Counter As Long<br />

Public SiteName As String * 16<br />

'Declared as Float<br />

'Float by default<br />

'Float by default<br />

'Float by default<br />

'Float by default<br />

'Float by default<br />

'Float by default<br />

'Declared as Long so counter does not have<br />

'rounding error<br />

'Declared as String with 16 chars for a<br />

'site name (optional)<br />

'Declare program control flags & terms. Set the words “High” and “Low” to equal “TRUE”<br />

'and “FALSE” respectively<br />

Public Flag(1) As Boolean<br />

Const High = True<br />

Const Low = False<br />

'Optional – Declare a Station Name into a location in the Status table.<br />

StationName(<strong>CR1000</strong>_on_desk)<br />

'Optional -- Declare units. Units are not used in programming, but only appear in the<br />

'data file header.<br />

Units Batt_Volt = Volts<br />

Units PTemp = deg C<br />

Units AirTemp = deg C<br />

Units AirTempF2 = deg F<br />

Units DeltaT_C = deg C<br />

'Declare an interval driven output table<br />

DataTable(OneMin,True,-1)<br />

DataInterval(0,1,Min,0)<br />

Average(1,AirTemp_C,IEEE4,0)<br />

Maximum(1,AirTemp_C,IEEE4,0,False)<br />

Minimum(1,AirTemp_C,FP2,0,False)<br />

Minimum(1,Batt_Volt,FP2,0,False)<br />

Sample(1,Counter,Long)<br />

Sample(1,SiteName,String)<br />

Sample(1,HowMany, FP2)<br />

EndTable<br />

'Declare an event driven data output table<br />

DataTable(Event,True,1000)<br />

DataInterval(0,5,Sec,10)<br />

DataEvent(0,DeltaT_C >= 3,DeltaT_C < 3,0)<br />

Maximum(1,AirTemp_C,FP2,0,False)<br />

'Time driven data storage<br />

'Controls the interval<br />

'Stores temperature average in high<br />

'resolution format<br />

'Stores temperature maximum in high<br />

'resolution format<br />

'Stores temperature minimum in low<br />

'resolution format<br />

'Stores battery voltage minimum in low<br />

'resolution format<br />

'Stores counter in integer format<br />

'Stores site name as a string<br />

'Stores how many data events in low<br />

'resolution format<br />

'Data table – event driven<br />

'—AND interval driven<br />

'—AND event range driven<br />

'Stores temperature maximum in low<br />

'resolution format<br />

244

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!