61302V Barometric Pressure Sensor
5.2.
Voltage Output Program Example
The program example illustrates the analog measurement of a
61302V in the configuration shown in Appendix A, using a
CR1000 datalogger. The sensor is powered for one minute before
the top of each hour, at which time the sensor is polled for a
measurement. The program also includes the option to correct for
elevation. The measurement units in the example are hPa.
'CR1000 Series Datalogger
'61302V will need to have the following configuration:
' Jumper P1 will need to be set to Continuous ASCII mode (jumpers A, B, & C in place)
' Jumper P3 will need to be set to "5VDC" mode (A position)
' Jumper P4 will need to be set to Voltage mode (B position)
'61302V Wiring
'Red - CR1000 12V (power continuously for testing)
'Black - CR1000 AG
'White - CR1000 SE1
'Blue - No Connection
'Green - CR1000 AG
'Shield - CR1000 AG
'Declare Public Variables
Public BP_61302V_Analog
Public Elevation_Correction
'Declare Constants
Const Elevation = 0 'This value must be added in order to correct for elevation (meters).
'Define Data Tables
DataTable (Hourly,1,-1)
DataInterval (0,60,min,10)
Sample (1,BP_61302V_Analog,IEEE4)
EndTable
'Main Program
BeginProg
Scan (5,Sec,0,0)
' Switch 61302V Sensor On 1 minute before the top of the hour
If TimeIntoInterval (59,60,Min) Then SW12 (1)
' Poll 61302V Sensor at the top of the hour
If TimeIntoInterval (0,60,Min) Then
'*** Measure Analog 61302V ***
VoltSe (BP_61302V_Analog,1,mV5000,1,1,0,_60Hz,0.12,500)
11
Содержание 61302V
Страница 15: ...61302V Barometric Pressure Sensor 13...