04.01.2015 Views

CR1000 Manual - Campbell Scientific

CR1000 Manual - Campbell Scientific

CR1000 Manual - Campbell Scientific

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Section 7. Installation<br />

'Define Data Tables<br />

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

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

Average(1,Batt_Volt,FP2,False)<br />

Average(1,PTemp_C,FP2,False)<br />

Average(2,Temp_C(1),FP2,False)<br />

EndTable<br />

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

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

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

EndTable<br />

'Main Program<br />

BeginProg<br />

Scan(5,Sec,1,0)<br />

'Default Datalogger Battery Voltage measurement Batt_Volt:<br />

Battery(Batt_Volt)<br />

'Wiring Panel Temperature measurement PTemp_C:<br />

PanelTemp(PTemp_C,_60Hz)<br />

'Type T (copper-constantan) Thermocouple measurements Temp_C:<br />

TCDiff(Temp_C(),2,mV2_5C,1,TypeT,PTemp_C,True,0,_60Hz,1,0)<br />

'Call Data Tables and Store Data<br />

CallTable(OneMin)<br />

CallTable(Table1)<br />

NextScan<br />

EndProg<br />

DataTable() and EndTable Instructions<br />

The DataTable() instruction has three parameters: a user-specified alphanumeric<br />

name for the table (for example, OneMin), a trigger condition (for example,<br />

"True"), and the size to make the table in RAM (for example, auto allocated).<br />

• Name-The table name can be any combination of numbers, letters, and<br />

underscore up to 20 characters in length. The first character must be a letter<br />

or underscore.<br />

Note While other characters may pass the precompiler and compiler, runtime<br />

errors may occur if these naming rules are not adhered to.<br />

• TrigVar-Controls whether or not data records are written to storage. Data<br />

records are written to storage if TrigVar is true and if other conditions, such as<br />

DataInterval(), are met. Default setting is -1 (True). TrigVar may be a<br />

variable, expression, or constant. TrigVar does not control intermediate<br />

processing. Intermediate processing is controlled by the disable variable,<br />

DisableVar, which is a parameter in all output processing instructions (see<br />

section, Output Processing Instructions (p. 131) ).<br />

Read More! Section, TrigVar and DisableVar — Controlling Data Output and<br />

Output Processing (p. 222) discusses the use of TrigVar and DisableVar in special<br />

applications.<br />

128

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

Saved successfully!

Ooh no, something went wrong!