
Interfacing the MICROCOM DESIGN GTX Modulator to the Campbell Scientific CR1000 Data Logger PRELIMINARY
CR1000
Programming
The first test program we will write will test the ability of the CR1000 to wake up
the GTX. Using the LOGGERNET software we will write a CRBASIC program which
responds to the GTX ‘>’ prompt. A second serial cable was added from the
CR1000 COM4 to be used as a debug port.
The program listing is shown below:
'CR1000 Series Datalogger
'To create a different opening program template, type in new
'instructions and select Template | Save as Default Template
'date:
'program author: R. Schwarz
'Declare Public Variables
'Example:
Public PTemp, batt_volt,
Public CR as string * 1
Public LF as string * 1
Public CRLF as string * 2
Public PROMPT as string * 1
Public MESSAGE as string * 100
'Declare Other Variables
'Example:
'Dim Counter
'Declare Constants
'Example:
'CONST PI = 3.141592654
'Define Data Tables
DataTable (Test,1,-1)
DataInterval (0,15,Sec,10)
Minimum (1,batt_volt,FP2,0,False)
Sample (1,PTemp,FP2)
EndTable
'Define Subroutines
'Sub
'EnterSub instructions here
'EndSub
'Main Program
BeginProg
CR=CHR(13)
LF=CHR(10)
CRLF=CHR(13)+CHR(10)
PROMPT= ">"
MESSAGE = "MICROCOM DESIGN TEST MESSAGE TEMP "
SerialOpen (Com1,9600,0,0,10000)
SerialOpen (Com4,9600,0,0,10000)
Scan (1,Sec,0,0)
PanelTemp (PTemp,250)
Battery (Batt_volt)
'Enter other measurement instructions
'Call Output Tables
'Example:
CallTable Test
'SerialOutBlock (Com1,CR,1)
SerialOut (Com4,CR,PROMPT,100,100) ‘wake upGTX
© 2005 Microcom Design Inc. All rights reserved voice: 401.771.1070 Fax:410.771.0018
uAPP222 (v1.0) July 12, 2005 http://www.microcomdesign.com 5
Kommentare zu diesen Handbüchern