setting up KmotionCNC

Moderators: TomKerekes, dynomotion

Post Reply
Garage14
Posts: 27
Joined: Thu Jan 02, 2020 10:57 pm

setting up KmotionCNC

Post by Garage14 » Tue May 03, 2022 10:29 pm

OK, so I have finally moved on to the CNC program and I am getting into the tool setup tab to get my spindle setup.
I went through the instructions about 4 times and believe that I've done as told to output cw-ccw on optos and use a dac to output an analog speed signal to my drive. I've gotten as far as testing the jog7=0.25 and I get a measured 2.5volts out of dac7 so all is well there. When I start trying to use the kmotioncnc buttons to control the actual spindle I have the on and off working but the speed settings don't actually output anything on my dac wire when I put a meter on them.(So full speed or nothing atm)

I saw this line at the end of the no C programming required spindle setup section
" The standard SpindleUsingJogs examples can now be used for an open loop DAC controlled Spindle.

To determine the proper FACTOR in the MySpindleDefs.h file you will need to know what RPM your Spindle runs at when the full 10V analog signal is applied. This will correspond to the RPM where a full Jog Speed of 1.0 will be required. So for example if your RPM reading at 10V is 2500 RPM then configure "

I didn't do anything with a myspindledefs.h file, maybe this is why my dac does nothing within kmotioncnc.

This is a pic of my settings in kmotioncnc. My C program that I am running does initialize my 7th axis with the settings that the setup instructions asked for.
kmotion settings.png
Thanks for any input ! -Dave

Garage14
Posts: 27
Joined: Thu Jan 02, 2020 10:57 pm

Re: setting up KmotionCNC

Post by Garage14 » Tue May 03, 2022 10:31 pm

I have a 24,000 rpm spindle btw if my maths are wrong :)

User avatar
TomKerekes
Posts: 2679
Joined: Mon Dec 04, 2017 1:49 am

Re: setting up KmotionCNC

Post by TomKerekes » Tue May 03, 2022 10:50 pm

The Spindle instructions describe two different methods to control the Spindle. A Basic method where no C Programs (and no KFLOP Axis) are required where the KMotionCNC S command simply sets a DAC. Or a method involving C Programs (and a KFLOP Axis) where KMotionCNC S commands are sent to a KFLOP C Program which in turn commands a KFLOP Axis to Jog which in turn commands the Spindle DAC. There are a number of advantages with the second method including the ability to gradually ramp the Velocity up/down to speed using a set acceleration.

You should pick one method or the other. You seem to be mixing both methods. I think because you have a KFLOP Axis controlling the Spindle's DAC when KMotionCNC writes to the DAC it is basically ignored as the KFLOP Axis immediately overwrites it.

HTH
Regards,

Tom Kerekes
Dynomotion, Inc.

Post Reply