Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: Raychar on November 08, 2016, 05:46:39 AM

Title: About V.B. script
Post by: Raychar on November 08, 2016, 05:46:39 AM
Hello, everybody,

Want to write  V.B script in Mach3 environment to have ‘beep‘ sound from the computer. Is it possible and how is it?

Thanks,
Title: Re: About V.B. script
Post by: Davek0974 on November 08, 2016, 06:02:00 AM
Not sure about the beep but i think you can make it play a .WAV audio file.
Title: Re: About V.B. script
Post by: Raychar on November 08, 2016, 10:13:17 AM
I checked Mach3 Vx Marco Prog. Ref pdf document, but nothing found about it!
I just want to save an output I/O line which is used to operate an added buzzer hardware...

Thanks,
Title: Re: About V.B. script
Post by: Tweakie.CNC on November 08, 2016, 10:33:56 AM
From the Cypress Enable Language Reference...

The command  Beep
Sounds a tone through the computer's speaker.  The frequency and duration of the beep depends on hardware, which may vary among computers.
 
Tweakie.
Title: Re: About V.B. script
Post by: Raychar on November 08, 2016, 01:21:00 PM
Thanks,

But it still doesn't work, maybe the computer‘s speaker problem or its connection problem! I need to take time to repair it...
Title: Re: About V.B. script
Post by: ger21 on November 08, 2016, 01:37:15 PM
PlayWave
Page 60
http://www.machsupport.com/wp-content/uploads/2013/02/Mach3_V3.x_Macro_Prog_Ref.pdf
Title: Re: About V.B. script
Post by: Davek0974 on November 08, 2016, 01:56:37 PM
Most pc's beep when they boot up - does it do this?

If not maybe your speaker is dead or the connector has popped off the board.
Title: Re: About V.B. script
Post by: Raychar on November 09, 2016, 03:03:46 AM
No, it doesn't.

It is a second hand desktop. I haven't yet opened it up to check. In my memory of the old stuff desktop, there were a whole bundle of wires. If there were any of them disconnected, it was difficult to figure out which one went to which jumper post pin...!

Thanks,
Title: Re: About V.B. script
Post by: Davek0974 on November 09, 2016, 03:12:34 AM
The speaker is usually just two wires, they usually go to a post pair marked "spkr"

They do get knocked or left off easily.

:)
Title: Re: About V.B. script
Post by: Tweakie.CNC on November 09, 2016, 03:40:24 AM
If it’s any help, with almost all of the PC’s I have owned speakers have had to be connected to the sound card to enable the V.B. (Cypress Enable) ‘Beep’ to be heard.

However, my present PC has it’s integrated sound card set-up to play any sound file (.wav, etc.) through it’s small internal speaker (until such time as a jack is inserted into the ‘speaker out’ when all audio is then routed to an external sound system).
With this set-up the V.B. (Cypress Enable) ‘Beep’ command (actual sound determined by Windows system sounds) is heard without any external speakers (My PC has SoundMAX Integrated Digital HD Audio).

Tweakie.
Title: Re: About V.B. script
Post by: stirling on November 09, 2016, 08:10:37 AM
try the following in CB

Shell "echo " & Chr(7), 2
Title: Re: About V.B. script
Post by: Tweakie.CNC on November 09, 2016, 08:26:31 AM
Quote
Shell "echo " & Chr(7), 2

For me it does nothing other than report the error...

Error on line: # - File not found.

Tweakie.
Title: Re: About V.B. script
Post by: stirling on November 09, 2016, 10:03:37 AM
what flavor windoze Tweakie? I'm on XP here.
Title: Re: About V.B. script
Post by: Tweakie.CNC on November 09, 2016, 10:26:21 AM
This PC is Win10 Pro.

Tweakie.
Title: Re: About V.B. script
Post by: stirling on November 09, 2016, 10:31:23 AM
Can you run a cmd window and type:

<Ctrl>G<return>

does that beep?
Title: Re: About V.B. script
Post by: Tweakie.CNC on November 09, 2016, 10:45:58 AM
It does Beep but I suspect that it is only error notification of '' is not recognized as an internal or external command, operable program or batch file.

Tweakie.

n.b. Shell "calc " & Chr(7), 2 opens the calculator so the Shell command performs OK it just baulks at echo.
Title: Re: About V.B. script
Post by: stirling on November 09, 2016, 11:16:00 AM
OK - but at least that shows the beep capability is there.

In the cmd window type:

help

you should get a list of all the internal commands - is echo in there?

alternatively you could just try:

echo <Ctrl>G<return>

if not - it looks like echo is not an internal command in W10
Title: Re: About V.B. script
Post by: Raychar on November 09, 2016, 11:50:22 PM
Thanks everybody for the advice....