beautypg.com

Appendix g. datalogger initiated communications, G.1 introduction – Campbell Scientific CR10X Measurement and Control System User Manual

Page 265

background image

G-1

APPENDIX G. DATALOGGER INITIATED COMMUNICATIONS

Datalogger initiated communications, commonly referred to as “callback," enables the datalogger to
initiate a call back to a computer. A CR10X uses Instruction 97 to initiate a call. For complete
information on Instruction 97 and its parameters, refer to section 12.

G.1 INTRODUCTION

In most applications, the datalogger initiates a
call to a computer to notify the user that a
specific condition (alarm) has occurred. For
example, a station monitoring conditions at a
dam could be setup to initiate an alarm call
when the water level gets above a specified
level. Another example would be a CR10X
initiating a call when conditions in a controlled
environment are not within acceptable ranges.
Datalogger initiated calls can also be triggered
based on time (Instruction 92).

This appendix gives an example of a CR10X
calling a computer via a COM200 CSI Field
Phone Modem whenever the temperature
exceeds 32

° C. An example program plus the

necessary PC208(W) files and setup are
included. This is only an example, changes
should be made to match your system.

G.2 EXAMPLE PROGRAM—PHONE

CALLBACK BASED ON A CONDITION

The following program example measures a
HMP35C Temperature/RH sensor every 30
seconds and stores hourly data. Whenever the
HMP35C temperature is above 32

° C, the

datalogger initiates a call to a dedicated
computer.

Instruction 97 uses the status of a Flag to
determine when to initiate the call. Any user
flag (1-8) may be used as Instruction 97’s
Interrupt Disable Flag. In this example when
temperature is within acceptable limits
(< 32

° C), Flag 5 is set high, otherwise Flag 5 is

set low. If Flag 5 is low when Instruction 97
executes, the datalogger will initiate a call.

Once the computer answers the datalogger’s
call and communication is established, the
datalogger sends a 3 digit identification number
(ID#, Parameter 8 of Instruction 97). Each site
that calls a computer must have a unique 3 digit
ID#. PC208(W) uses this 3 digit ID# to identify
which datalogger is calling and what it should do
as a result of the call. Section G.3 covers the

Windows-based PC208W software setup for
this example program. Section G.4 covers the
DOS-based PC208 software setup for this
example program.

When the datalogger initiates a call, it will dial the
phone number given in the Instruction(s) 63 that
directly follow the P97 in the program. If the
datalogger is dialing 7 or less digits, only one
Instruction 63 is needed. If the datalogger needs
to dial 8 digits, a second Instruction 63 is still
required to dial the 13. Do not forget to put a 13
for the last parameter in the last Instruction 63.
The 13 tells the datalogger to stop sending
characters and to instruct the Field Phone Modem
to make the call. Any excess parameters in the
last P63 should be left as zeros.

PROGRAM

*Table 1 Program

01:

30

Execution Interval (seconds)

1: Batt Voltage (P10)

1:

3

Loc [ BATT_VOLT ]

2: Temp (107) (P11)

1:

1

Reps

2:

1

SE Channel

3:

3

Excite all reps w/Exchan 3

4:

1

Loc [ AIR_TEMP ]

5:

1

Mult

6:

0

Offset

3: Do (P86)

1:

4

Set Port 1 High

4: Excitation with Delay (P22)

1:

1

Ex Channel

2:

0

Delay W/Ex (units = 0.01 sec)

3:

15

Delay After Ex (units = 0.01 sec)

4:

0

mV Excitation

5: Volts (SE) (P1)

1:

1

Reps

2:

25

± 2500 mV 60 Hz Rejection
Range

3:

2

SE Channel

4:

2

Loc [ RH ]

5:

.1

Mult

6:

0

Offset