beautypg.com

6 goesdata() example – Campbell Scientific TX312 High Data Rate GOES Transmitter User Manual

Page 22

background image

TX312 Transmitter

The order data appears in each transmission can be controlled.
Only whole records are copied from the datalogger to the
TX312. Each record is copied in the same order it appears in the
datalogger memory. The order of data records, oldest to newest
or newest to oldest, can be controlled. To arrange data records
oldest to newest, execute the GoesData instruction when data is
written to the data table. To arrange data newest to oldest,
execute the GoesData instruction once per timed transmission.
Either method works best when the table option is set to zero.

NOTE

5.1.1.6 GOESData() Example

' GOESData() Example

' Sample program makes a few simple measurements and
' stores the result in the table named Tempdata.
' All new data from TempData is copied to the
' transmitter hourly.

' An hourly record containing stats regarding
' the Last GOES message are stored in another table

'declarations
Public TCTemp
Public PanelT
Public battery1
Public RC_Data
Public LastStatus(14)

Alias LastStatus(1)=RC_Last
Alias LastStatus(2)=Lst_Type
Alias LastStatus(3)=Lst_Bytes
Alias LastStatus(4)=Lst_Forward
Alias LastStatus(5)=Lst_Reflected
Alias LastStatus(6)=Lst_BattVolt
Alias LastStatus(7)=Lst_GPS
Alias LastStatus(8)=Lst_OscDrift
Alias LastStatus(9)=Lat_Deg
Alias LastStatus(10)=Lat_Min
Alias LastStatus(11)=Lat_Secd
Alias LastStatus(12)=Long_Deg
Alias LastStatus(13)=Long_Min
Alias LastStatus(14)=Long_Secd

'program table
DataTable (Tempdata,1,1000)
DataInterval

(0,15,min,10)

Sample

(1,TCTemp,FP2)

Sample

(1,PanelT,FP2)

Sample

(1,battery1,FP2)

EndTable

16