VoiceKey

The VoiceKey instruction recognizes the return of a number 1 through 9, the asterisk (*), or the pound key (#). VoiceKey is often used to add a delay, which provides time for the message to be spoken, in a VoiceBegin/EndVoice sequence.

Syntax

VoiceKey ( Timeout )

Remarks

If the timeout period is exceeded, the VoiceKey instruction returns a -1. If the key is received within the time out period, the key itself is returned. If a carrier is detected a -2 is returned. If a voice modem is not detected, a -3 will be returned. If the connection is terminated on the other end or the voice modem times out speaking, a -4 will be returned.

NOTE: When creating code for voice modems, the VoiceKey instruction should be used to add a delay before the EndVoice instruction is executed. Otherwise, the datalogger will end the VoiceSpeak command before the spoken message is completed.

Parameter

VoiceTimeOut

Defines a time, in 0.01 seconds, when the instruction should time out and proceed to the next instruction if the defined key is not returned. The TimeOut timer begins once the spoken announcements have finished.

Type: Constant