beautypg.com

2 data callback, 1 example data callback program – Campbell Scientific COM310 Voice Communications Modem User Manual

Page 23

background image

COM310 Voice Communications Modem

The CallOut parameter is a Boolean value that indicates the COM310 mode.
When the value returned in this parameter is True the datalogger has called
out. When the value is False the datalogger has received an incoming call.

If the same ASCII character is used for HangUpKey and ExitSubKey, the
datalogger will exit a subroutine if it is in one, otherwise, it will hang up the
COM310. When the specified ContinueKey is pressed, the COM310 will skip
the current VoiceSpeak string and move to the next one. If any other key is
pressed, the COM310 will skip to the next group of VoiceSpeak instructions.

5.2.2 Data Callback

The COM310 can be put into data mode to accomplish data callback,
instructing LoggerNet to do a collection of datalogger data.

5.2.2.1 Example Data Callback Program

The following program (downloadable from CSI web site under
Support/Download/Program Examples) does data callbacks to the phone
number associated with the DialModem instruction whenever the TC
temperature exceeds 85F. To complete the system, provide a PC running
LoggerNet with a phone modem connected to the phone line dialed.

' CR1000 Series Datalogger

' BASIC_DATA_CLBK_1.CR1

' Program description: Does a DATA CALLBACK via COM310 when DIFF 7 TC temp > 85F

' LoggerNet Map:
' ComPort
' PhoneBase
' PhoneRemote
' PakBusPort
' CR1000 (PakBus Address matches remote DL)

‘ Use Type T thermocouple or change TCDiff instruction accordingly

Public batt_volt, Result
Public PTemp, TCvalue_F, dummy
Dim DialSuccess

DataTable (TestA,1,1000)
DataInterval (0,0,Sec,10)
Sample (1,PTemp,FP2)
Sample (1,TCvalue_F,FP2)
Sample (1,batt_volt,FP2)
Sample (1,DialSuccess,FP2)
Sample (1,Result,FP2)
EndTable

17