beautypg.com

97 initiate telecommunications – Campbell Scientific CR10X Measurement and Control System User Manual

Page 189

background image

SECTION 12. PROGRAM CONTROL INSTRUCTIONS

12-7

When the baud rate code specifying a checksum is
used, the checksum of the data is sent as the last
piece of data in the data array. This only works
when sending out comma separated data. See
Section 5.1 to learn about the checksum.

NOTE: All memory pointers are positioned
to the DSP location when the datalogger
compiles a program. For this reason,
Always retrieve uncollected data before
making program changes.

TABLE 12-6. Baud Rate Codes

Code

Baud Rate

0

300

1

1200

2

9600

3

76800

4

300 with checksum

5

1200 with checksum

6

9600 with checksum

7

76800 with checksum

PARAM.

DATA

NUMBER

TYPE

DESCRIPTION

01:

2

Option Device

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

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
CR10X initiates a call to a computer. The
CR10X 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 CR10X sends the ID#
(Parameter 8) to identify itself to the computer.
When the computer sends back the same ID#,
the CR10X 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 CR10X will not send any data
(or do anything else) without first receiving a
command to do so. CSI’s TELCOM, PC208E,
or PC208W 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 97 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.