Hello forum,
I am trying to program a CR200X to work with a Stevens GOES 2.0 Satellite Transmitter. Has anyone got a sample program that I could try? I tried using the GOESsetup options and the data doesn't appear to be getting to the Stevens transmitter. Thanks for any help or pointers.
Don Price
National Weather Service
Seattle, WA
In addition I'm trying to compile my program and I keep getting the following message on my CR200X
GOESData not accepted. Requires different OS version. I'm getting this will all of my GOES commands.
The current OS version I have on the CR200X is
CR200X.Std.03
I'm using CRbasic editor 3.2 with the following version for the CR200
CR200
Compiler: C:\Campbellsci\Lib\CR200Compilers\CR2Comp.exe
Version: CR200X.Std.03 CompileDate: 131104
DefFile: C:\Campbellsci\Lib\CRBasicDefFiles\CR200.def
HelpFile: C:\Campbellsci\Lib\CRBasicDefFiles\CRBasic2.chm
Thanks for any information.
Don Price
Are you sure you have a CR200 or do you have a CR200X?
The CR200 needed a special OS for GOES support. It was my understanding that the CR200X did not need a special OS.
Dana W.
Hi Dana,
Thanks for your reply.
I have a CR200X and part of the problem (I figured this out yesterday) was that it didn't have the CR295 OS loaded on it. So I loaded it and fixed my compile problem but I'm still having problems connecting the CR200X(sic CR295) to the Stevens transmitter. I'm trying to use the RS232 port on CR200X and connecting to the External Logger port on the Stevens Xmtr.
Thanks for any help
Don Price
Attached is the program I'm running. This program is one that I've run successfully with a TX312 xmtr. But I have a couple of Stevens transmitters on hand that I would like to get running with the datalogger.
'CR1000 Pt. Wilson program
' Program by: Donald Price
' V01 changes. First non-beta version
' 1) removed test code
' 2) Converted some variables from public to dim
' changes from v0_04 to v0_05
' 1) change order of data transmitted over goes.
' now oldest data is first in the message.
' changes v0_03 to v0_04:
' 1) Corrected GoesData() format for wind speed alarms. Was FP ASCII,
' now FP Pseudo binary.
' 2) Added J day and hr/min to goes data table
' Changes made 6/25/13. Modified tables to reflect changes suggested in an email from Chris Burke. as follows.
' An SAOROB product should have the 2-minute (58 to 00 in the hour) average wind, the 2-minute (58 to 00) gust,
' which is the peak wind in that 2 minutes, and the peak gust in the entire hour (01 to 00).
' A MTRTTI product should have the six 10-minute Average winds from throughout the hour.
' program also incorporates new GOES ID for point wilson/
Const Elevation = 0 'This value is site dependant
Const ScanRate = 3
Const ART = 1800 ' Alarm Run Time
Public GOESArray1(6),GOESArray2(7)
Public WS_knot, WindDir
Public HrMin, RC_GoesData
Public Batt_Volt, TX312_Setup, data_rc
Public FiveMinWS, FiveMinWD, MaxWS, MaxWD
Public WS_25, WS_35, WS_50, WDOld, WDNew, Wdalarm
Public TenMinWS, TenMinWD, Peakwind
Dim FirstRun As Boolean, location(6), time(7)
Dim AlarmRest, WindSpdAve
Dim clk(9), hr_min
Units Batt_Volt=Volts
Units WS_knot=knots
Units WindDir=Degrees
Alias Location(1)=GPSdataRC: Alias Location(2)=GPSSeconds
Alias Location(3)=Latitude: Alias Location(4)=Longitude
Alias Location(5)=Elev: Alias Location(6)=MagDec
Alias Time(1)=Year: Alias Time(2)=Month: Alias Time(3)=days
Alias Time(4)=Hours: Alias Time(5)=Minutes: Alias Time(6)=Seconds
Alias Time(7)=MicroSeconds
DataTable(CalcFive,True,10) 'Two Minute Wind summery
DataInterval(0,10,min)
WindVector (WS_knot,WS_knot,False,0,1)
FieldNames("WS_knot_S_WVT,WindDir_D1_WVT,WindDir_SD1_WVT")
EndTable
DataTable(CalcTwo,True,10) 'two min Max wind gust
DataInterval(0,2,Min)
Maximum(1,WS_knot,False,1)
EndTable
DataTable(CalcTen,True,10) 'Ten Minute Wind summery
DataInterval(0,10,min)
WindVector (WS_knot,WS_knot,False,0,1)
FieldNames("WS_knot_S_WVT,WindDir_D1_WVT,WindDir_SD1_WVT")
EndTable
DataTable(CalcHWG,True,10) 'hourly weather peak winds
DataInterval(0,1,Hr)
Maximum(1,WS_knot,False,1)
EndTable
DataTable(Battvolt,true,10) 'Minimum batt volt for end of GOES data
DataInterval(0,10,min)
Minimum(1,Batt_Volt,False,0)
EndTable
DataTable(WDShift,true,10) '2 Minute Wind for wind shift alarm
DataInterval(1,2,min,) 'On the odd minutes
WindVector (WS_knot,WS_knot,False,0,1)
FieldNames("WS_knot_S_WVT,WindDir_D1_WVT,WindDir_SD1_WVT")
EndTable
DataTable(gust,true,10) 'Wind Gust Alarm data
Sample(1,WS_knot,) 'Transmitted on alarm
Sample(1,WindDir)
EndTable
DataTable(TenMin,True,-1) 'Main data table
DataInterval(0,10,Min)
Sample(1,clk(9),) 'Julian day
Sample(1,hr_min,) 'hour/minute
Sample(1,FiveMinWS,) 'two minute average wind speed
Sample(1,FiveMinWD,) 'two minute average wind direction
Sample(1,MaxWS,) 'two minute max wind gust
Sample(1,TenMinWS,) 'ten minute wind speed
Sample(1,TenMinWD,) 'Ten minute wind direction
Sample(1,Peakwind,) 'Peak hourly wind
EndTable
Sub TimeSet '********************************************************
RealTime(clk(1)) ' get J-day, hour, minute for goes time stamp
hr_min=clk(4)*100+clk(5) ' providie Hr/Min for goes timestamp
GOESGPS (GOESArray1(),GOESArray2())
If FirstRun Then 'Set CR1000 clock to GMT time via TX312
If GPSdataRC < 1 Then
If Hours>=0AND Hours<24AND Minutes>=0AND Minutes<60AND Seconds>=0AND Seconds<60 Then
ClockSet (Time())
FirstRun = False
EndIf
EndIf
EndIf
EndSub
Sub GustAlarm '********************************************************
If WS_Knot > 50 AND WS_50 < 1 Then
WS_50=scanrate : WS_35=scanrate : WS_25=scanrate
CallTable(gust)
GOESData (data_RC,gust,1,3,0)
ElseIf WS_knot > 35 AND WS_35 < 1 Then
WS_35=scanrate : WS_25=scanrate
CallTable(gust)
GOESData (data_RC,gust,1,3,0)
ElseIf WS_Knot > 25 AND WS_25 < 1 Then
WS_25=scanrate
CallTable(gust)
GOESData (data_RC,gust,1,3,0)
EndIf
If WS_50 > 0 Then
WS_50=WS_50+scanrate
If WS_50 > 10800 Then 'Reset alarm after three hours
WS_50=0 : WS_35=0 : WS_25=0
EndIf
EndIf
If WS_35 > 0 Then
WS_35=WS_35+scanrate
If WS_35 > 10800 Then 'Reset alarm after three hours
WS_35=0 : WS_25=0
EndIf
EndIf
If WS_25 > 0 Then
WS_25=WS_25+scanrate
If WS_25 > 10800 Then 'Reset alarm after three hours
WS_25=0
EndIf
EndIf
EndSub
Sub WindShift '********************************************************
Dim ws(7),wsave,i
If WdAlarm < 1 Then
wsave = 0 'reset total wind speed
For i = 1 To 7
ws(i) = WDShift.WS_knot_S_WVT(1,i) 'retrieve wind speed
wsave = wsave+ws(i) 'store total
Next
WindSpdAve = wsave/7 'test
If WindSpdAve >=10 Then 'test 'Calc WS ave, if >= 10, check alarm
WDNew=CalcFive.WindDir_D1_WVT(1,1) 'WD current average
For i = 2 To 7
WDOld=WDShift.WindDir_D1_WVT(1,i) 'WD at I*2 minutes back
If ABS(WDOld-WDNew) > 44 Then 'set shift alarm
If ABS(WDOld-WDNew) < 316 Then
If WdAlarm<1 Then GOESData(data_rc,WDShift,2,3,0)
WdAlarm=scanrate
EndIf
EndIf
Next
EndIf
EndIf
If WdAlarm > 0 Then WdAlarm = WdAlarm+ScanRate
If WdAlarm > 10800 Then WdAlarm = 0 'reset alarm after 3 hours
EndSub
Sub AlarmReset
WDalarm=0 : WS_25=0 : WS_35=0 : WS_50=0
alarmRest=0
EndSub
'Main Program
BeginProg
FirstRun = True 'set clock on power up
TX312_Setup = -1
AlarmRest = 0
Scan(ScanRate,Sec)
Battery(Batt_Volt)
'05106 Wind Speed & Direction, WS_knot and WindDir:
PulseCount(WS_knot,P_LL,1,1,0.1904,0)
ExDelSE(WindDir,1,1,1,mV2500,3000,0.142,0)
If WindDir>=360 Then WindDir=0
Call(gustalarm) 'Call wind gust alarm subroutine
CallTable(CalcFive) 'Calc two min wind averages
FiveMinWS=CalcFive.WS_Knot_S_WVT(1,1)
FiveMinWD=CalcFive.WindDir_D1_WVT(1,1)
CallTable(CalcTwo) 'Calc two min Wind speed max
MaxWS=CalcTwo.WS_knot_MAX(1,1)
CallTable(CalcHWG) 'Calc peak hourly wind
Peakwind=CalcHWG.WS_knot_MAX(1,1)
CallTable(CalcTen) 'Calc ten minute average wind and direction
TenMinWS=CalcTen.WS_Knot_S_WVT(1,1)
TenMinWD=CalcTen.WindDir_D1_WVT(1,1)
CallTable(WdShift) 'Past and current wind dir
Call(WindShift) 'Wind shift alarm
Call(Gustalarm)
CallTable Battvolt
If IfTime(0,10,min) Then
Call timeset ' read tx312 clock
EndIf
CallTable(TenMin)
If IfTime(0,10,min) Then
GOESData(data_rc,TenMin,1,0,1) 'Send Last record to tx312
EndIf
If IfTime(0,60,min) Then
GOESData(data_rc,BattVolt,1,0,1) 'Append min batt volt
EndIf
If IfTime(0,30,day) Then 'every day
firstrun=true 'Set logger clock to gmt
EndIf
If AlarmRest Then Call(AlarmReset) 'Manual alarm shut down
'clear data from random buffer after 1/2 hour.
'time is set by constant ART and is not scan rate dependent
If WdAlarm>ART Then GOESData (data_RC,CalcFive,1,9,0)
If WS_25>ART OR WS_35>ART OR WS_50>ART Then GOESData (data_RC,CalcFive,1,9,0)
If firstrun Then Call timeset 'at power up, set logger clock to gmt
NextScan
EndProg
* Last updated by: SEWESA on 7/25/2014 @ 12:21 PM *