[La...] Posted June 18, 2019 Share Posted June 18, 2019 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 More sharing options...
[Mi...] Posted June 18, 2019 Share Posted June 18, 2019 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 More sharing options...
[Ri...] Posted June 18, 2019 Share Posted June 18, 2019 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 More sharing options...
[Mi...] Posted June 18, 2019 Share Posted June 18, 2019 LOL Yeah he was. Link to comment Share on other sites More sharing options...
[De...] Posted June 19, 2019 Share Posted June 19, 2019 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 More sharing options...
[Ow...] Posted June 19, 2019 Share Posted June 19, 2019 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. Link to comment Share on other sites More sharing options...
[Ra...] Posted June 20, 2019 Share Posted June 20, 2019 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 More sharing options...
[La...] Posted June 21, 2019 Author Share Posted June 21, 2019 Since we don't have PCM, my question is: Do either or both of these methods work without PCM? Link to comment Share on other sites More sharing options...
[Er...] Posted June 21, 2019 Share Posted June 21, 2019 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 More sharing options...
[Ri...] Posted June 21, 2019 Share Posted June 21, 2019 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 More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in