
PI1X Basic Programming Manual Ver. 1.10
50/156
3.8
Beeper commands
Purpose
:
To assign a beeper sequence to designate beeper operation.
Syntax
:
BEEP(freq%, duration% {, freq%, duration%})
Example
:
BEEP(99,30,0,10,88,30,0,10,66,30,0,0)
Description
:
freq%
is an integer variable, indicating the value of
Beep
frequency ( 76000 / Actual Frequency Desired )
.
A beep frequency is an integer used to specify the frequency
(tone) when the beeper been activated. The actual frequency
that the beeper gives is not the value specified to the beep
frequency. It is calculated by the following formula.
For instance, to get a frequency of 2000Hz, the value of beep
frequency should be 38. If no sound is desired (pause), the
beep frequency should be set to 0. A beep with frequency 0
does not terminate the beeper sequence. Suitable frequency for
the beeper ranges from 1 to 2700Hz, while peak volume is at
around 2000Hz.
Duration%
is an integer variable, indicating the value of
beeping duration, which is specified in units of 10 ms.
Purpose
:
To terminate beeper sequence.
Syntax
:
STOP BEEP
Example
:
BEEP(99,100,0,30,88,100,66,100,0,0)
WAIT(200)
STOP BEEP
Description
:
The STOP BEEP statement terminates the beeping
immediately if there is a beeper sequence in progress.