![Campbell CS225 Скачать руководство пользователя страница 17](http://html1.mh-extra.com/html/campbell/cs225/cs225_instruction-manual_3725384017.webp)
CS225 Temperature String
15
'Main Program
BeginProg
Scan (60,Sec,0,0)
PanelTemp (PTemp,250)
Battery (batt_volt)
'Read the current Temperature Value
For i=1 To NumTempSensors
SDI12Recorder (CS225Temp(i),CS225_SDI12_Port,ConvertNumToSDI12address(i),"R0!",1.0,0)
Next
CallTable Daily
CallTable TempSample
NextScan
EndProg
7.2.4.2 CR1000 Program for Measuring 15 Sensors Every 5 Minutes
In this example a single CS225 is being measured on Control Port 1 of a
CR1000. The CS225 includes 15 sensors with SDI-12 addresses 1 through 15.
Each temperature sensor is polled both on power up and daily with the “aR1!”
command to determine metadata, which is stored in a daily data table. The
minimum and maximum temperature of each sensor is polled (aR6! and aR7!
respectively) every 5 minutes and stored to a data table on the same interval.
Other common station data is measured every 60 seconds and stored to a
separate daily data table.
'CR1000 Series Datalogger
'The following Sample program reads a CS225 string that has 15 temperature Sensors.
'Individual temperatures, user minimum & maximum are recorded every 5 minutes, and Meta Data
'is collected daily.
'Declare Public Variables
Public PTemp, batt_volt
'Enter the number of temperature sensors that are in the string (will need to be adjusted to
'fit specific application)
Const NumTempSensors=15
'Calculate the number of Meta Data points based on the number of sensors
Const MetaData_pts=NumTempSensors*3
'Uses the control port C1 on the CR1000 (valid port options are 1,3,5,7)
Const CS225_SDI12_Port=1
Public CS225Temp(NumTempSensors) As Float
Public CS225TempUserMax(NumTempSensors) As Float
Public CS225TempUserMin(NumTempSensors) As Float
Public CS225Meta(NumTempSensors,3) As Float
Dim i As Long
'Define Data Tables
DataTable (Daily,1,-1)
DataInterval (0,1,Day,10)
Minimum (1,batt_volt,FP2,0,False)
Maximum (1,batt_volt,FP2,0,False)
Average (1,batt_volt,FP2,0)
Minimum (1,PTemp,FP2,0,False)
Maximum (1,PTemp,FP2,0,False)
Average (1,PTemp,FP2,0)
EndTable
Содержание CS225
Страница 2: ......