6 goesdata() example, Goesdata() example – Campbell Scientific TX320 Transmitter User Manual

Page 30

Advertising
background image

TX320 Transmitter

When transmitting random messages in pseudo binary format the
message counter must be turned off (RMC=N). The message
count is a simple three digit count of how many times the
transmission has been repeated. Digits 0 to 9 are not legal
characters in pseudo binary mode and are replaced at
transmission time with the replacement character specified by the
IRC command. The default IRC character is *. If the random
message counter is on when the random data format is set to
pseudo binary, the first three characters sent are 0x20,0x20,0x2a
(space,space,*) instead of the intended 0x20,0x20,0x31
(space,space,1).

NOTE

The order data appears in each transmission can be controlled.
Only whole records are copied from the datalogger to the
TX320. 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 0.

NOTE

7.5.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

20

Advertising