Vmax549 wrote:Hi Dan , Teh ATC macro is not as simple as teh test piece of code. The atc is not a simple sliding carrousel. It is basically a 1 armed bandit style tool changer that when parked is tucked in out of teh way.
We ran into teh macro problem when testing out HOW to sec from a sequence. Much to our surprise it when all wrong.
The atc has to operate in a defined sequence of movements to avoid collisions. Each stage of an output defines a movement. Output 5,1 OFF is one directional move of one element. Output 5,1 OFF is the opposite directional move of that element. And there is a detection switch for both limits of travel for that element. There are 14 motion events and 28 detection events per cycle and 2 cycles per tool change. When a cancel is applied ALL outputs HAVE to state in teh same state as when the {ESC} was applied. Then the operator will back the order of events up to a safe position to resume if needed or STOP all together
When we hit {Esc} to see how it would react to a macro cancel we were surprised that everything went wacky and ALL elements tried to move at teh same time because all teh outputs reset themselves. THAT was a BIG surprise as I have NEVER seen a controller do that on stop or esc. DIY or commercial.
Now can I write around that SURE I can but I should not have to. To me this is a safety issue. It would seem that IF teh {ESC} can allow certain things like cancel all motion it SHOULD be able to cancel all output toggling as well. There should be a warning put in teh UCCNC manuals describing what happens on an {ESC} or {Stop} and specifically how to deal with it when programming a function. As it will be required for all macros that make use of outputs.
GERRY , I remember when UCCNC was first getting started up EVERYONE said we want it to work like MACH3 does. Well it is my turn
I want this to work like mach3 did.
I am done with MY soapbox session and rant and am returning to normal space
(;-) TP
Like I said it IS what it is and we have to deal with it.
(;-) TP
Hi Terry,
Definitely seems like a complicated macro to write
and GOOOOOOD LUCK!!! lol
I must add though, any time writing a macro/plugin it's your responsibility to make safe by utilizing functions available. I think if UCCNC made the changes you suggest there will be other complaints soon to follow.
I don't have much experience with ports/pins since using a UC100, but with my experimenting induced by this thread this simple line with a created bool for each port/pin regardless how many, would set port/pin to it's state before escaped pressed and not change to end of macro.
if(!exec.Ismacrostopped()){exec.Setoutpin(5,16); Set516 = true;}
// end of macro
if (exec.Ismacrostopped())
{
if(Set516 == true) {exec.Setoutpin(5,16);} else {exec.Clroutpin(5,16); return;}
}
Most times when reading your post/thread I learn something new!
Thanks,
Dan