BEEP
Sound the PC's speaker. To generate a sound on a WebVue client see WEBVUE.
WebVue support - Not applicable. Returns an unsuccessful code if used in this context.Syntax
IntVal = BEEP([Freq, [Period]]);
Return type: INTEGER.
Argument | Meaning |
Freq | The frequency of the generated sound in hertz. Type DOUBLE. |
Period | The length of the generated sound in milliseconds. Type DOUBLE. |
Execution
Plays a sound through the desktop client PC motherboard's beeper.
Return: | 1 if successful, else 0. |
There is a delay built in to the use of the BEEP instruction, which means it can only be used about once every 2 seconds.
Avoid long Period as, while BEEP is being executed, operation of the HMI is suspended.
Example
This example causes a sound at 1000Hz for a tenth of a second.
SUB main()
DIM dblfrequency as DOUBLE; 'in Hz
DIM dbldelay as DOUBLE; 'in ms
dblfrequency = 1000;
dbldelay = 100;
BEEP(dblfrequency,dbldelay);
END SUB