1. #1
    Hi,
    I currently have an air compressor being controlled by solenoid via Mach3 and when a job starts, the M8 signal is sent, air starts, and when the job finishs the M9 command stops it.


    However, as my compressor isn't so powerful, it's sort of at an equilabrium and so runs constantly throughout a job. What I'd like to do is have it on only when needed, during cuts, and off during rapids or lead ins..


    Short of going through the Gcode with M8/M9/M8/M9.. is there a more elegant solution/program that could handle it? I'm currently using HSMexpress for CAM..


    Any tips or tricks?

  2. #2
    Yes could be done using a Brain which watches the Z axis and if goes negative turns Ouptut ON and if Positive OFF. Most rapid moves are Positive and most cuts are Negative so should work well.

  3. #3
    Thanks Jazz, will read up on brains now.. That sounds exactly like what I had in mind.
    Do you happen to know if , while the brain is happening, I can also switch on & off the flood with the button for "Flood ctrl-F" on the fly without messing up everything.. (for example if I have a move in the negative Z, but one that I know isn't cutting anything at the time..)

  4. #4
    Quote Originally Posted by d4cnc View Post
    Thanks Jazz, will read up on brains now.. That sounds exactly like what I had in mind.
    Do you happen to know if , while the brain is happening, I can also switch on & off the flood with the button for "Flood ctrl-F" on the fly without messing up everything.. (for example if I have a move in the negative Z, but one that I know isn't cutting anything at the time..)
    Ok well not exactly sure what your asking here.? Are you asking if the Brain can do this or if you can do this while the brain is running.?

    Brains run all the time in the background and only watch the things they are setup to watch so won't affect anything other than what asked to do.
    They are very powerful things when used correctly, they can also be run at same time has Macro pump. They are also much faster than macro pump which is what you want for something like this.

    I've attached a Brain called Relay. This turns ON the OUTPUT #1 when the Z axis goes lower than 0.1 and off when above. To use this just unzip it and copy into the folder called brains in Mach3 folder.
    Then open Mach3 and go to Operator Menu and select Brain Control. From the List select the Brain called Relay and on right select Enable. Now close Brain Control and it should be working.

    To test this goto diagnostics window and jog Z axis down and the #1 output Led should start flashing. ( Output #1 will need to be enabled in portsn pins)
    Attached Files Attached Files

  5. The Following 3 Users Say Thank You to JAZZCNC For This Useful Post:


  6. #5
    Thanks so much Jazz.. really appreciate it.. Had a good read/watch & experiment with brains.. very useful stuff..


    I was asking if when running a job, I noticed that I didn't need air, I could just do a quick click myself to save a bit air and then click it on again..


    What I would love to be able to do, but haven't worked out how yet is the following..


    I start a Gcode program..
    The M8 line happens.. no air
    The cutter lowers to Z-0.001 - AIR ON.
    I want to turn off the air for a bit but it's still under Z0 so I click the flood button - AIR OFF
    I click flood again - AIR ON
    the Gcode program sends an M9, still under Z-0.001 - AIR OFF


    ie. is it possible that the brain can listen for an M8 or flood toggle button, and if it's under Z0, it allows the relay to turn on.


    And also if it sees an M9 or flood toggle button, it will turn off the relay, no matter what position the cutter is.




    I'll do some more experimenting now.. but just wondering if you know if it's even possible what I'm asking..

  7. #6
    Got it I think..
    If I put flood to an unused output.. Then in the brain I can use an AND function between Z position and flood on.
    There will only be air when flood is activated (via Gcode or myself) and the Z is less than -0.001.

    I'll try it in practice tomorrow..

    (not sure if there's a better solution than using an unused output for flood..)

  8. #7
    I am aware of the limitations of my compressor and had planned to use an arduino to pulse air and mist using solenoids. To combine with a Brain to make this more targetted to the cutting seems a good solution. I shall use this Brain to control the vacuum cleaner on the dust extraction for my current machine.

    Thanks to Jazz and this thread for making me aware of this feature of Mach3.

    Cheers,

    Rob
    Albert Einstein may have been a genius, but his brother Frank, was a monster

    Sent from my clunky old Windows 7 Machine

  9. #8
    I believe the pulsing can be handled by the brain too, so you needn't use an Arduino for that if you didn't want..


    I've been considering doing the same for my vacuum cleaner as well actually.. but it's a big load to be switching on and off frequently/quickly and I'm not sure I like the idea of turning on & off a lot during a job.. I guess we wouldn't know until we tried it... I suppose a vacuum cleaner is designed to be able to handle fast switch on/offs.. and if there's any adverse effects to cnc control signals then, it's all fixable.. where there's a will!
    Anyone have experience of doing this?

  10. #9
    Quote Originally Posted by d4cnc View Post
    I believe the pulsing can be handled by the brain too, so you needn't use an Arduino for that if you didn't want..


    I've been considering doing the same for my vacuum cleaner as well actually.. but it's a big load to be switching on and off frequently/quickly and I'm not sure I like the idea of turning on & off a lot during a job.. I guess we wouldn't know until we tried it... I suppose a vacuum cleaner is designed to be able to handle fast switch on/offs.. and if there's any adverse effects to cnc control signals then, it's all fixable.. where there's a will!
    Anyone have experience of doing this?
    My idea of using an arduino is so that I can set the pulse/space ratio externally, on the fly. The arduino is also going to be used to control the coolant pump for the spindle and display spindle temperature (and probably anything else I can think of !)

    I am unhappy about running an ordinary workshop vac for long periods. When the filter gets blocked with fine dust, the airflow, which is also used to cool the motor, drastically reduces. I tried making my own dust separator, but that was a limited success , so I have ordered a cyclone to make a decent one. I have the ash can from the previous attempt.

    Again I have to thank Jazz for leading me to the Artsoft Mach3 video tutorials at http://www.machsupport.com/videos/ they are a valuable resource and I shall go through them. Probably a good idea for any Mach3 user to watch a relevant video before asking dumb questions on the forum (been there, done that !)

    Happy Sunday,

    Rob
    Albert Einstein may have been a genius, but his brother Frank, was a monster

    Sent from my clunky old Windows 7 Machine

  11. #10
    Ah yes the dust commander I use is great. I opened up the vacuum cleaner yesterday and there was not a speck of dust in there. It was like new.. quite amazing.


    When I get a chance tomorrow, I'll hook a scope up to some control signals while turning the vac on & off to see if there's any noise issues with doing it.. if not, I think I'll add that to a brain as well. Should cut down on heat in my enclosure a little..

Similar Threads

  1. The best CAD/CAM suggestion, Gcode and Mach3
    By petes in forum CAD & CAM Software
    Replies: 1
    Last Post: 29-01-2015, 11:06 AM
  2. GCode for Omega symbol ?
    By Gasgasbones in forum Programmers Corner
    Replies: 14
    Last Post: 08-01-2015, 12:13 PM
  3. Some Gcode generating programs
    By Jonathan in forum Programmers Corner
    Replies: 20
    Last Post: 28-02-2014, 07:58 AM
  4. Tapping Gcode
    By Kai in forum General Discussion
    Replies: 10
    Last Post: 14-12-2010, 07:07 PM
  5. PLease help - gcode newbie
    By scotty in forum Programmers Corner
    Replies: 3
    Last Post: 07-03-2010, 12:48 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •