CS100 Barometric Pressure Sensor
7.3.3 Program Examples
The CS100 wiring instructions for the example programs are shown in TABLE
7-4 below.
TABLE 7-4. Wiring for Example Programs
Wire Color Description
CR10(X)
CR1000
Blue
VOUT – Pressure Signal Out
SE6
SE15
Red
SUPPLY – 12 Vdc Power In
12V
12V
Black
GND – Power Ground
G
G
Yellow
AGND – Signal Ground
AG
Green
ETX. TRIG. – External Trigger
C8
C4
Clear Shield
G G
7.3.3.1 CRBasic Example 1: CR1000 Program Using Sequential Mode
This CR1000 program uses the sequential mode, which is the simplest mode
and can be used for most meteorological applications. Although the example is
for the CR1000, other CRBasic dataloggers, such as the CR200(X), CR800,
CR850, CR3000, and CR9000(X) are programmed similarly. In the example,
the CR1000 measures the CS100 once an hour. To do this, the CR1000 uses a
control port to turn on the CS100 one minute before the top of the hour. On the
hour, the datalogger measures the CS100, and then turns the CS100 off.
'CR1000
'Declare Variables and Units
Public BattV
Public PTemp_C
Public BP_mmHg
Units BattV=Volts
Units PTemp_C=Deg C
Units BP_mmHg=mmHg
'Define Data Tables
DataTable(Table1,True,-1)
DataInterval(0,60,Min,10)
Sample(1,BP_mmHg,FP2)
EndTable
DataTable(Table2,True,-1)
DataInterval(0,1440,Min,10)
Minimum(1,BattV,FP2,False,False)
EndTable
'Main Program
BeginProg
'Main Scan
Scan(5,Sec,1,0)
'Default Datalogger Battery Voltage measurement 'BattV'
Battery(BattV)
'Default Wiring Panel Temperature measurement 'PTemp_C'
PanelTemp(PTemp_C,_60Hz)
'CS100 Barometric Pressure Sensor measurement 'BP_mmHg'
If IfTime(59,60,Min) Then PortSet(4,1)
If IfTime(0,60,Min) Then
VoltSE(BP_mmHg,1,mV2500,15,1,0,_60Hz,0.2,600)
BP_mmHg=BP_mmHg*0.75006
PortSet(4,0)
12