I am trying to write a VB script (macro I believe they are called) That will open and close my air collet closer.
I already have Mach3 running a Macro that runs a toolchanger. this is air operated, and uses one solenoid and a stepper motor.
I have a M06 macro running it that uses this command " ActivateSignal(OutPut2)" and also uses DeActivateSignal(OutPut2) one allows the solenoid to pressurize the air cylinder and the other depressurises it.
How can I write a macro that does this-
(I want to call it something like M101)
I want to be able to either MDI a command like CC0 for (collet closer open) and CC1 for (collet closer closed) or to have CC0 or CC1 placed into my Gcode file.
I want CC0 to ActivateSignal(OutPut3) and CC1 to DeActivateSignal(OutPut3)
I believe that I need to have the Macro stored in C/Mach3/Macros/Mach3Turn. Is this correct?
I know how to wire the solenoids, plumb the air, configure Mach ports&pins for the outputs, but for the life of me I cant figure out how to write this macro. It seems like it should be so easy, but I cant figure it out.
Any input you can provide would be great!
Best,
Nate.