Ok, after a quick glance at my old Essential Guide to ANSI C - I understand what the function is doing, inverting the output each time it is ran IF it's enabled.
How do I set it to always be enabled via the .hal file though? If I connect it to E-Stop it's still going to toggle at some point. I want it to run if EMC2 is running - never toggle. E-Stop
only shut down the amplifier enable bit and the spindle enable bit. I also posted to the mailing list (I think...hope I did it right...)
EDIT - Ok after reading more of the CVS info :
Code:
pin out bit out "Square wave if 'enable' is TRUE or unconnected, low if 'enable' is FALSE";
Would indicate that if it isn't connected to an input bit - it's enabled - am I interpreting that correct? Also, how would I get another thread started that would run the charge pump at 12.5KHz?
Am I going about this an overly complex way? As there a simpler way, maybe to set a high bit high when EMC is active and forgive the possible startup jitters that rarely might power up the controllers? (ie a $5 relay instead of a $22.50 charge pump board or programming my own PIC)
Just spitballing...
Thanks for any help.