2 native pakbus dataloggers, 1 voice instructions, 1 voicebeg / endvoice – Campbell Scientific COM310 Voice Communications Modem User Manual

Page 21: 2 voicespeak, 3 voicekey

Advertising
background image

COM310 Voice Communications Modem

The VoiceSpeak code might look like this:

TC_1 = Public.AirTemp(1,1)

VoiceSpeak ("THE AIR TEMPERATURE WAS" + TC_1 + "DEGREES", 0)

5.2 Native PakBus Dataloggers

The CR1000 and other voice capable CRBasic dataloggers can be programmed
to provide the features available in the Edlog dataloggers, and most any other
feature you can imagine. The Quick Start example voice callback/callin
program “BASIC_VOICE_2.CR1” provides a starting point from which to
build the features you want.

5.2.1 Voice Instructions

Patterned after the example program in Quick Start, voice instructions can be
combined in a variety of ways to provide phone access to datalogger data and
for control of datalogger flags/output ports.

5.2.1.1 VoiceBeg / EndVoice

This instruction pair contains the code executed when the CR1000 detects a
RING signal from the COM310 (a call in). It is placed in the declarations
portion of the program before the BeginProg instruction. The EndVoice
instruction hangs up the modem. So, VoiceHangup is not required unless you
want to hang up the modem under certain condition(s) prior to the execution of
the EndVoice instruction.

The VoiceKey instruction is also used to add a delay before the EndVoice
instruction is executed so that the datalogger will not end the VoiceSpeak
command before the spoken message is completed.

5.2.1.2 VoiceSpeak

The VoiceSpeak instruction is used to define the voice string that should be
spoken by the voice modem. The spoken string is comprised of words from
the Voice.txt file and variables. The words are enclosed with quotes, and any
variables are concatenated with the words using a plus sign (e.g., "50MS THE
BATTERY VOLTAGE IS" + Value(1) + "VOLTS"). The word “50MS”
inserts a 50 millisecond pause during the announcement. It can be inserted
multiple times in series if desired.

5.2.1.3 VoiceKey

The VoiceKey instruction is used to add a delay before the EndVoice
instruction is executed so that the datalogger does not end the VoiceSpeak
command before the announcement is finished.

The VoiceKey instruction’s timeout parameter is used to add a delay (in 0.01
seconds) before EndVoice or Loop is executed. Multiple VoiceKey
instructions placed before an EndVoice or Loop instruction increase the delay.
The VoiceKey timeout provides silent time for a user to respond to the

15

Advertising