beautypg.com

97 initiate telecommunications – Campbell Scientific CR510 Basic Datalogger User Manual

Page 140

background image

SECTION 12. PROGRAM CONTROL INSTRUCTIONS

12-6

ADDRESSED PRINT DEVICE, y = Baud code
1y

= Printable ASCII

2y

= Comma Separated ASCII

3y

= Binary Final Storage Format

7N

= Storage Module N (N=1-8; Section 4.4.2)

(Stored in Binary Format)

7N-- = Output File Mark to Storage Module N

SERIAL PRINTER, COMPUTER, OR
PIN-ENABLED PRINT DEVICE, y = Baud code
(SDE pulled high)
4y = Printable ASCII
5y = Comma Separated ASCII
6y = Binary Final Storage Format

TRANSFER DATA TO OTHER FINAL
STORAGE AREA
80 = New data only
81 = All data

*** 97 INITIATE ***

TELECOMMUNICATIONS

Instruction 97 is used to have the CR510 initiate
telecommunications in response to certain
conditions. This is commonly referred to as
callback. This instruction can be used to initiate
three different types of calls:

A) to expect a modem and computer to

answer the call,

B) to program a voice modem to send a

voice message to a phone, or

C) to call a remote datalogger and collect a

specified number of input locations.

D) to call a pager

The section mostly discusses the computer
communication method. See the Voice Modem
manual for a more complete description of the
voice callback. See Appendix H more complete
information on the datalogger to datalogger
communications.

Briefly, when the instruction is executed and the
interrupt disable flag (Parameter 2) is low, the
CR510 initiates a call to a computer. The
CR510 starts communicating with the modem
identified in Parameter 1 using the additional
modem ID#s, phone numbers, or other
commands given in the subsequent
Instruction(s) 63 or 68. Once the computer
answers the call, the CR510 sends the ID#
(Parameter 8) to identify itself to the computer.

When the computer sends back the same ID#,
the CR510 will go into the normal
telecommunications mode (Section 5) and the
computer is now in charge of the call. The
computer uses the ID# to know what station
file/setup to use to control the calling
datalogger. The CR510 will not send any data
(or do anything else) without first receiving a
command to do so. CSI’s datalogger support
software enables PCs to automatically answer
calls, retrieve data, and instruct the datalogger
on what to do now. See Appendix G for a
phone modem callback example including the
computer setup.

If the correct response is not received from the
computer within the time allotted in Parameter 3
the datalogger hangs up and calls back later.
The number of unsuccessful attempts is stored
in the Failure Input Location (Parameter 7).
Once a successful call is made, the Failure
Input Location is reset to 0.

Be careful in calling P97 from a conditional
statement or subroutine. Instruction 7 must be
run at least twice for each call, once to initiate
the call and another time to completely reset
and clean up memory values used to make the
call after the call was successful or has stopped
trying to call.

Parameter 1:

The datalogger will call out using the modem
specified in Parameter 1. If the call is to go
from one type of modem to another, list the first
modem to be used. For example, when calling
through a RF modem to phone, you would use
a code for an RF Modem. Table 12-5 shows
the different modem/baud rate options valid for
this Parameter.

When the phone modem is specified, the
following commands are sent to the modem
before the phone number: ATV0[Enter],
ATS7=180[Enter], and ATDT. The first
command causes the modem to respond with
digits rather than words. The second command
causes the modem to wait for 180 seconds
after dialing for the carrier. The third command
causes the modem to dial the phone number (in
Instruction(s) 63 or 68) in “Touch Tones”.
Additional commands can be entered as part of
the telephone number (e.g. “,” for a delay or “P”
for pulse dialing). Additional commands must
be entered into the subsequent instructions as
their ASCII equivalents (Appendix E).