How to activate a solenoid at the start and end of machining

Good day.
I have finally added a sander to my cnc …since it’s pneumatic I need to activate a solenoid at the start of the program and de-activate at the end to make things as automatic as possible.
Is there an easy and fast way to do this?

Thank you!

You can assign the output for the solenoid to either one of the coolant signals in Mach4 and then adding M7 or M8 ( whichever is the right one) to your post processor at the beginning of the Gcode to turn it on and M9 at the end to turn it off.

Nice …going to check it out…
The slab wizard would work great for thisbut it needs be able to repeat the cycle as well.

tnx.

Any pictures of your sander setup to share?

Ill post some sent week…when I finish adding some rails and springs to it.

I definitely want to see your set up.

Slab Wizard already includes M9 (turn off all relays) and M30 (end program and rewind to start of program) as the last two commands. All you need to do is edit the gcode manually to add the appropriate relay-on command Jim mentioned somewhere around the ‘Move to X/Y Zero’ line. If you want to set your Z just a little lower each cycle, you can manipulate the Z-axis DRO by adding an offset rather than changing the gcode/running the Wizard.

Those M-codes control relays inside the control box. Those relays are triggered by the same kind of logic signal that could trigger a different external relay or solenoid. You’ll find two pair of wires (black) in terminal blocks at the edge of the card housing your prox sensor connectors. Put your DMM on the terminal block then play with the relay buttons in Mach4 to see how they work.

image

Good day.
Attached a pic how I made the sander…my plasma torch is actually used to keep the sander on.

Althought it worked …I will now make a 10" disc /brush sander that will be powered by a DC treadmill motor…the pneumatic did work but it was running my compressor (5hp) too much and causing too much noise… so I am wasting power.

How do you handle the dust collection?
Clever Idea using the plasma mount.
Will your new 10" concept have any floating or compression compensation?
I have found the RO sander concept does not work as well as a straight circular pattern. I also did not like how much vibration was present at the lower grits with the RO. I sanded a walnut dining table from 80 through the grits to 600. Never touched a hand sander.

I do not have a dust collection yet…on my list
on the next build I will be planning to use the Avid linear rails and some car valve springs.

I need a brush more than a sander…I mostly do alum. and need to scuff the metal in preparation for primer.