2141
General Mach Discussion / Re: Probably simple but...(G-Code help)
« on: January 11, 2016, 03:08:40 PM »
Apart from my little oddity with the G04, I need a little help with control logic - brains etc, here's what it needs...
The variable #15239 / 1239 is set to 1 or 0 by G-code in the probe subroutine, this variable is monitored by a brain which activates/deactivates output2 (extends or retracts the probe)
This works perfectly UNLESS g-code is loading or you do a path re-gen and it runs the code again as it does when loading - this has the effect of slapping the probe up and down multiple times as it reads the subroutine at every call.
So I am looking for a smart way to block operation when its parsing code.
I have tried to use the other output and the variable AND'ed together in the brain, which works BUT not when i do a dry run or drill holes with the torch as output 2 controls my extract fan and that is off when dry running or drilling so that idea fails.
Is there a smart way to do this please???
The variable #15239 / 1239 is set to 1 or 0 by G-code in the probe subroutine, this variable is monitored by a brain which activates/deactivates output2 (extends or retracts the probe)
This works perfectly UNLESS g-code is loading or you do a path re-gen and it runs the code again as it does when loading - this has the effect of slapping the probe up and down multiple times as it reads the subroutine at every call.
So I am looking for a smart way to block operation when its parsing code.
I have tried to use the other output and the variable AND'ed together in the brain, which works BUT not when i do a dry run or drill holes with the torch as output 2 controls my extract fan and that is off when dry running or drilling so that idea fails.
Is there a smart way to do this please???