Our full technical support staff does not monitor this forum. If you need assistance from a member of our staff, please submit your question from the Ask a Question page.


Log in or register to post/reply in the forum.

ETO calculation with CRBasic


James Nov 16, 2021 09:32 AM

Hi,

Help please. We use CRBasic and not Short Cut. Would like to make sure the following would calculate ETO correct.

Dim ScanRateSeconds

Dim Multiplier_mV_To_Watt

Public AirTC

Public RH

Public WS_ms

Public WindDir

Public SlrW

Public SlrMJ
Units AirTC=Deg C

Units RH=%

Units WS_ms=meters/second

Units WindDir=degrees

Units SlrW=W/m^2

Units SlrMJ=MJ/m^2

DataTable(Hourly,True,-1)

DataInterval(0,60,Min,10)

Average(1,AirTC,FP2,False)

Sample(1,RH,FP2) WindVector(1,WS_ms,WindDir,FP2,False,0,0,0) FieldNames("WS_ms_S_WVT,WindDir_D1_WVT,WindDir_SD1_WVT")

Average(1,SlrW,FP2,False)

Totalize(1,SlrMJ,IEEE4,False)

ETsz(AirTC,RH,WS_ms,SlrMJ,28.17,-21.53,1250,3,1,FP2,False)

FieldNames("ETrs,Rso")

EndTable

BeginProg
Scan(5,Sec,1,0)

VoltSe(AirTC,1,mV2500,1,0,0,_50Hz,0.1,-40)   

VoltSe(RH,1,mV2500,2,0,0,_50Hz,0.1,0)   

If (RH>100) AND (RH<108) Then RH=100

PulseCount(WS_ms,1,1,1,1,0.1666,0)

BrHalf(WindDir,1,mV2500,3,1,1,2500,True,20000,_50Hz,355,0)   

If WindDir>=355 OR WindDir<0 Then WindDir=0   

ScanRateSeconds = 5   

Multiplier_mV_To_Watt = 200

VoltDiff(SlrW,1,mV7_5,3,True,0,_50Hz,Multiplier_mV_To_Watt,0)   

If SlrW<0 Then SlrW=0   

SlrMJ=SlrW*ScanRateSeconds/1000000

CallTable Hourly

NextScan

EndProg

Log in or register to post/reply in the forum.