Hello,
I've just started to learn CRBasic and how to connect sensors to the logger. I'm using shortcut to help me with the basics and I'm trying to connect the following sensors to a CR350:
03002-5 WIND SENTRY
BaroVUE10
ARG314 RAINGAUGE
CS301 APOGEE PYRANOMETER
When I upload my code I get values for the raingauge and the pyranometer but the Barovue and the wind sentry are not even showing in the table when I look at it in the Monitor Data tab. I'm following the wiring guide provided for each sensor by shortcut. Any pointers would be really appreciated, code is below:
'CR350 'Created by Short Cut (4.4) 'Declare Variables and Units Public BattV Public PTemp_C Public BaroVUE(3) Public WS_ms Public WindDir Public SlrW Public SlrMJ Public Rain_mm Public RIntH Public RIntCorr Public RCorr_mm Alias BaroVUE(1)=BV_BP Alias BaroVUE(2)=BV_Temp Alias BaroVUE(3)=BV_Qual Units BattV=Volts Units PTemp_C=Deg C Units WS_ms=meters/second Units WindDir=degrees Units SlrW=W/m^2 Units SlrMJ=MJ/m^2 Units Rain_mm=mm Units BV_BP=hPa Units BV_Temp=deg C Units BV_Qual=unitless 'Define Data Tables DataTable(Table2,True,-1) DataInterval(0,1440,Min,10) Minimum(1,BattV,FP2,False,False) EndTable 'Main Program BeginProg 'Main Scan Scan(10,Sec,1,0) 'Default CR350 Datalogger Battery Voltage measurement 'BattV' Battery(BattV) 'Default CR350 Datalogger Wiring Panel Temperature measurement 'PTemp_C' PanelTemp(PTemp_C,50) If TimeIntoInterval(0,60,Min) Then 'BaroVUE10 (SDI-12) Barometric Pressure Sensor measurements 'BV_BP', 'BV_Temp', and 'BV_Qual' SDI12Recorder(BaroVUE(),C1,"0","M!",1,0,-1) EndIf '03002 Wind Speed & Direction Sensor (CSL) measurements 'WS_ms' and 'WindDir' PulseCount(WS_ms,1,P_LL,1,1,0.75,0.2) If WS_ms<0.21 Then WS_ms=0 BrHalf(WindDir,1,mV2500,1,VX1,1,2500,False,20000,50,352,0) If WindDir>=352 Or WindDir<0 Then WindDir=0 'CS301 Pyranometer measurements 'SlrMJ' and 'SlrW' VoltSE(SlrW,1,mV2500,2,True,0,50,1,0) If SlrW<0 Then SlrW=0 'Calculate total flux 'The multiplier to calculate total flux was calculated by Short Cut 'and based on a program execution rate (scan rate) of 10 Seconds. 'If you change the program execution rate outside of Short Cut with the CRBasic Editor 'you will need to recalculate this multiplier. See the sensor manual for more details. SlrMJ=SlrW*5E-05 'Calculate flux density SlrW=SlrW*5 'ARG100 Tipping Bucket Rain Gauge measurement 'Rain_mm' PulseCount(Rain_mm,1,P_SW,2,0,0.1,0) 'Calculate rate per hour 'Scans per minute * rain * 60 minutes RIntH=60/10*Rain_mm*60 RIntCorr=(RIntH^2)*0.00051367+1.0038*RIntH RCorr_mm=RIntCorr/60*(10/60) 'Call Data Tables and Store Data CallTable Table2 NextScan EndProg