Jump to content

programmable stop "alert Sound"


---
 Share

Recommended Posts

Is it possible to get an alert sound when a programmable stop happens? If so, how would I go about making that work? Thank you in advance!!!!!!!!!!
Link to comment
Share on other sites

IF my memory serves me correctly lol.......

Make a batch file with the sound you want.

Save it out as "inspection_end.bat" or something.

Should go into your inspection folder that coincides with the part you want the sound active..
Link to comment
Share on other sites

Please sign in to view this quote.

He's asking about if you have a programmable stop during the program, not when the program ends.
Link to comment
Share on other sites

Step 1:
Make a batch file to play the sound.

Something like follows should work, though there is probably better methods. This is just an example of one method I found in a thirty second google search and I make no assertions that it is the best or even a good method.

Save the followiing line in a file and name it playSound.bat

start wmplayer "C:\Windows\media\Alarm01.wav" && timeout 5 && taskkill /im wmplayer.exe
Step 2:
Call the batch file using the pcm systemCall command.

result = systemCall("C:\path\to\playSound.bat")

You can easily put the systemCall code into the pre-settings of the feature with the programmable stop and it will play when the feature begins to run.

In order for this to be played at the programmable stop is a bit more of a challenge - but it is possible.

You can use a formula for the text, however the result of the code needs to be text since the text box in the programmable stop is expecting text. Using format will convert the result of the systemCall function to text so it doesn't break the conditional stop.

The following line will 'trick' calypso into executing the code when it shows the text - it does tack the result value of the systemCall function on to the end - but its a small price to pay to get the sound to play exactly when we want.

As I said earlier, this is just an example of one method and I make no assertions that it is the best or even a good method.

"This is some text - and the result of the systemCall is " + format(systemCall("C:\path\to\playSound.bat"))
Link to comment
Share on other sites

Maybe a forgone conclusion but, they do make Light Signals for CMM's so, you'd think this wouldn't be that difficult to achieve.
I don't know, Iv'e never used a Zeiss CMM that had one. 164_73f913b239f52231fe1634f19055a6cb.jpg
Link to comment
Share on other sites

I use two sounds in every program - one for "end of program" and one to "alert" the operator. They are called with two snippets of PCM where necessary (below.) Occasionally, the operator is prompted before measuring a feature: the PCM to call the batch file goes in the pre-settings PCM of the particular feature. At the end of every program, the ending sound batch file is run from the global charactistics post-settings PCM.

I copy the folder "SOUND" (attached) into every part program file. Consequently, I have the batch files and sounds available in all programs. If you unpack the folder, you'll notice there are more than two sounds available to the batch file players. I was experimenting. Pardon the goofiness of my sound selection.

PCM:

----Alarm----

myPath = getActualInspectionDir() // Sound folder is copied here, so I'm fetching the location.
myPathSiren= myPath + "\SOUND\SirenPlayer.bat" // creating a filepath to the batch file.
systemCall(myPathSiren) // calling the batch file to execute.

----Program End Sound----

myPath = getActualInspectionDir()
myPathTada= myPath + "\SOUND\TadaPlayer.bat"
systemCall(myPathTada)

TLDR: Copy the attached folder into your program file. Use the PCM snippets above to execute batch files.

SOUND.zip

Link to comment
Share on other sites

You dont need either pcm or a batchfile. If you are using 6.8 this function is now provided, you can choose files in your Programmable Stop.

Or else you can use this, it will make a batchfile obsolete.
systemCall("cmd.exe /c start yourfile.mp3")
You can pass "syntax" directly to cmd with /c
Link to comment
Share on other sites

Please sign in to view this quote.

You are correct. Now when you open up a Programmable Stop there is a new option for "Measurement Info" which behaves line the Measurement Run Information that people typically use for loading instructions.
Link to comment
Share on other sites

 Share

×
×
  • Create New...