Hello Guest it is November 28, 2021, 09:18:23 AM

Author Topic: Alarm/buzzer when cutting is finished  (Read 8373 times)

0 Members and 1 Guest are viewing this topic.

Offline Vogavt

*
  •  260 260
    • View Profile
Alarm/buzzer when cutting is finished
« on: October 09, 2008, 12:41:42 PM »
How would one go about setting up a buzzer/alarm for letting the machinist know the job is complete?  I bought a 12v buzzer from Radio Shack and got to thinking about how to make it work then realized it would require some deeper thinking. I searched the forum, but didn't find what I was looking for.


Thoughts or ideas?

Offline jimpinder

*
  •  1,232 1,232
  • Wakefield, West Yorks, UK
    • View Profile
Re: Alarm/buzzer when cutting is finished
« Reply #1 on: October 09, 2008, 12:51:09 PM »
If you drive the alarm from a relay or a darlington array this is quite easy.

I don't know what outputs you already use from mach 3 - but, for instance, do you use the coolant.

If not that is one signal that is already programmed in Gcode you could use. Include an M7 or M8 at the end of the code, and switch the appropriate output on  - which triggers your relay. The same applies to any of the readily available out puts, which can be quickly programmed in Ports and Pins.
Not me driving the engine - I'm better looking.

Offline Vogavt

*
  •  260 260
    • View Profile
Re: Alarm/buzzer when cutting is finished
« Reply #2 on: October 09, 2008, 02:08:00 PM »
Yes, I use flood coolant. Familiar with the M8/M9 on/off. I use a cnc4pc C11 board which has an analog relay where my 110v pump is turned on.

Still new to me, but do I just hook up the wires of the buzzer to the pins and set Mach to activate the pin?  I guess I'm confused about the 12v buzzer and where it would physically hook up to the board. For example, I'm not using Mist control (M7) so I suppose I could use that as an output or maybe use one of the other outputs in Mach, but how do I enable that output via g-code? I still have outputs 2-6 available.

Offline Hood

*
  •  25,838 25,838
  • Carnoustie, Scotland
    • View Profile
Re: Alarm/buzzer when cutting is finished
« Reply #3 on: October 09, 2008, 02:24:56 PM »
You could write a macro and call it for instance M100.m1s and place it in your Macro folder, the macro would have something like this in it

ActivateSignal (OutPut4)

Then if you placed that M code (ie M100) at the end of the code it would activate output 4.
 You would then have Ouput 4 in ports and pins set up to the correct pin and port number ( port 1 pin 2 as you say you have that spare)
Doing that when M100 is reached in your code output 4 would actiivate and if you had a relay which switched with this pin and had the buzzer connected to the relay you would get the buzzer when the code was completed.
 Then the next problem would  be how to switch the buzzer off but thats easy enough, you would make a VB button for your screen and have the following in it.

DeActivateSignal (OutPut4)

So when you hear the buzzer you walk to the machine and press the button and the buzzer goes off.

Hood

Offline jimpinder

*
  •  1,232 1,232
  • Wakefield, West Yorks, UK
    • View Profile
Re: Alarm/buzzer when cutting is finished
« Reply #4 on: October 09, 2008, 02:58:58 PM »
Yes - Hood beat me to it.

I have looked at the cnc4pc site, and the C11, but I can't seem to access the technical files.

If you are using  a powered breakout board, you would be better to contact cnc4pc, and ask them how to power the buzzer you have from their board - given that you can get the signal to an output pin. I see there are two solid state relay so they might suggest using one of those (if you haven't already used both)

As far as mach 3 is concerned, on the standard 25 pin LPT1 socket, 12 outputs are provided. You normally use 6 of these for the three axis, which leaves you 6 to go at. These can be allocated on Ports and Pins, as you probably know.

From a Gcode point of view, it would be clearly simpler to use an unused Gcode command to activate the output pin - hence I said coolant -  there is M3 M4 which you probably also use, but as you say the mist output is available - you could use that. Allocate this to an unused pin and an M7 command with activate it. M9 would switch it off.

However, as Hood said, you can make up your own range of M*** commands in Mach 3 using Visual Basic script.  They are not difficult to write and there is a tutorial video to watch which will show you how. Hood has given you the relevant line (probably the only line in your script) and as he has put it - turn on output 4. Allocate output 4 in your Ports and Pins to an unused output pin - and wire to your buzzer as instructed.

Including M100 (say) in your programs at the end before the M30 would turn on the output.
Although the GCode program would then finish, the output would remain on until cancelled.
To cancel it, add a button to your screen labelled Alarm Cancel or similar and add a script to the button which reads "DeActivateSignal(Output4)". If you clicked the button, this would turn off the signal.

We have given you a bit of food for thought - and you thought it was going to be a simple job  ;D ;D

It is really, when you get down to it. The hardest bit will be fathoming out the cnc4pc board.


 
Not me driving the engine - I'm better looking.

Offline Chaoticone

*
  • *
  •  5,626 5,626
  • Precision Chaos
    • View Profile
Re: Alarm/buzzer when cutting is finished
« Reply #5 on: October 09, 2008, 09:52:09 PM »
Sorry if this has been mentioned allready, just not enough time to read all the post real good tonight, but mach can be set to play wav files and do speech as well. If those are options.

Brett 
;D If you could see the things I have in my head, you would be laughing too. ;D

My guard dog is not what you need to worry about!

Offline Vogavt

*
  •  260 260
    • View Profile
Re: Alarm/buzzer when cutting is finished
« Reply #6 on: October 10, 2008, 09:32:24 AM »
Thanks for the responses. Definitely food for thought.  Had forgotten about the built-in wav player for Mach.  Might be an option, but I'd have to add speakers to the PC. Not sure I'd hear it over my stereo in the shop, that's why I bought a buzzer (distinct sound). And besides, I'm not sure I'm ready for my mill to start talking to me. My wife thinks I'm nuts already! LOL!

I've invited Arturo to chime in (pun intended) to give his thoughts for all of us to see.  You've already given me some great options, just want to get his input as well.

Vogavt
Re: Alarm/buzzer when cutting is finished
« Reply #7 on: October 10, 2008, 10:34:32 AM »
Steven,

I see you have received already all the ideas of possible ways to do it that I can think off. If I remember your setup, you still have an electromechanical relay available on the C11.  Te fastest way of doing this, could be to configure an output like was described on previous posts.

If you want to get fancy, you can edit the M30 macro to activate signal.  Keep in mind you may have to create a button to disable the alarm once you get to the machine.

Arturo Duncan
http://cnc4pc.com

Offline Vogavt

*
  •  260 260
    • View Profile
Re: Alarm/buzzer when cutting is finished
« Reply #8 on: October 10, 2008, 10:52:41 AM »
Thanks Arturo for the quick response.

Yes, your memory serves you correctly. I still have a both of the onboard electromechanical relays available.

Just so I've got this straight, I'd plug the wires in to one of the relays and activate it from within Mach3.  If I use the M7 code and set it to pause for 10 seconds or so, thus leaving the relay active (buzzer buzzing), and then use the M9 to stop the M7 (faux mist) wouldn't that turn off the buzzer?

Excuse my ignorance but what is the voltage that goes through the electromechanical relay?

Offline Hood

*
  •  25,838 25,838
  • Carnoustie, Scotland
    • View Profile
Re: Alarm/buzzer when cutting is finished
« Reply #9 on: October 10, 2008, 11:08:10 AM »
You could use the M7 to activate your buzzer but the problem I see with that is you would have to be carefull where you put the M7 as obviously you would have to make sure you have it after your coolant has been switched off by the M9. If you had it before then the M9 would not only switch off the coolant but would switch off the buzzer.
 
Hood