M & S Code (Configure or Define), in Initialization File: How to do it?
Greetings,
I am building a new CNC Software, KFlop Inside, or at the heart of the system.
The part I am working on now. Is the Spindle Analog Control, via PWM, on pin 44. Like used via the KStep. Except I am not using the KStep board, nor the KMotion software. I will be using my own interface board.
My custom software loads the pwm-analog out... control file into the KFlop thread 2.
In GCode, when you turn on the spindle, and give it a speed... M4 S1000 (fwd 1000rpm)... this works via the Tool Setup in the KMotionCNC. So I know the C file is working.
_______________________________________________
My software auto loads this C program into thread 2.
I need to be able in my Init. file, at startup. To configure the MCodes, as to what they should do.
As well, I need to tell the S command, what it is to do.
_______________________________________________
M4 SetBit 46 ClearBit 47
M5 Setbit 47 ClearBit 46
S1000 execute thread 2 when called. S 2 0 "no file specified"... it is already loaded in thread 2.
So, how to load these setting via the Initialization program. Which is a C program... so should be able to do this? I hope?
Thanks in advance for your help!
Robot & Machine Design - BLUECNC4, GreenCNC3, RedCNC2L, SilverCNC2; CNC Software!
www.truemachinedesign.com - - - - - - - - - - - - - www.truemachineautomation.com