Machsupport Forum
Mach Discussion => Brains Development => Topic started by: Jimmyalenius on December 25, 2014, 05:55:38 PM
-
Hi! I have mounted a relay that goes on and off using code M08 for ON and M09 for OFF (coolent on/off). When I want to start the laser I put M08 in my g-code. But that solution gives a lot of manual editing. It have to be another way to control the relay? I have seen some solutions on Youtube that use the negative Z for switching the relay on (https://www.youtube.com/watch?v=Bmx0OxR8EMg). Is that possible using brain, and is there some example code to learn from?
Regards / Jimmy
-
what do you wont the laser to do
-
Hi! I want to turn the laser on and off, depending on the position off the spindle. A positive value turn the laser off (M09) and a negative value turn the laser on (M08). The relay I use to control the laser is connected to the breakout card (P14 and +5V).
Regards / Jimmy
-
have a search through here for what you wont it there
you could also do changes to your post processor to add a M8 at start and M9 at end
-
Hi! I have done a search at the forum but can't find what I'm looking for. Right now I do it manually in the post precessing, but my question was about if this could be done with a brain.
-
there are easier ways of doing what you wont to do search for laser on off
-
Ok, now I made a Brain that switch the laser on and off depending if the Z axis is positive or negative. It's a simple and fast solution. Now I need to figure out a way of turning the laser off in both positive AND negative Z value until I hit start i Mach3. Is there a command for start and stop?