C program control issues

Moderators: TomKerekes, dynomotion

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

Re: C program control issues

Post by TomKerekes » Wed Dec 30, 2020 3:48 pm

Hi Peter,

You learn quickly.
As you can see, the Spindle has quite a sizeable Following Error (if that's the correct term) and I cannot reduce it significantly using the Integral term as I was able to do quite successfully with both X and Z. In fact it becomes unstable before it has had any significant effect at all. X & Z behaved themselves pretty much like 'text book' cases.

Since it is the Spindle, perhaps it won't matter so much, although I would like to be able to do single point thread cutting with it. Maybe I can play around with the motor drives later and see what I can find there, but for now it will do.
Correct there usually isn't any need for a Spindle to be positionally accurate even when Threading.
Regards,

Tom Kerekes
Dynomotion, Inc.

hatcat
Posts: 9
Joined: Sun Aug 05, 2018 8:39 am

Re: C program control issues

Post by hatcat » Thu Dec 31, 2020 1:12 am

Hi Tom,

I'm needing some help with a C program please. The object of this is to increase my knowledge of using the C programs to control the machine. I realise that the answer to my question is probably quite simple, but I cannot work it out yet.

I have powered the machine up and have downloaded the Axis 0 Configuration. I presume that that should connect DAC5 to (Axis) Channel 0.
Axis 0 Config.png
Then I run the following (basically nonsense) program which is one of the standard supplied programs with some mods so I can watch it and control its operation from the KMotion C Programs window. The program clearly runs, because I can watch the dig bits do what they should on the Dig I/O window and on the Console window. It waits for me to operate one of the home switches (Bit 141) and then proceeds and finishes. All that is working as I expect.
SimpleHomePM.png
The problem I'm having is that the Jog lines do not cause a change in the DAC5 output. (I'm checking this with a multimeter on the actual Kanalog output connection.) I guess that I just have to make another 'connection' somewhere between the Jog statements and the DAC5 output, but where please? What have I missed?

Another unrelated thought I had was whether Single Point Threading is a situation where one might use a Master/Slave Axis arrangement, so that it doesn't matter how far off the 'proper' path the Spindle is, as long as the Z Axis (i.e. the cutting tool) is faithfully following it (at some specific 'gear ratio'), then all will be well?

Thanks & have a great evening.
Peter

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

Re: C program control issues

Post by TomKerekes » Thu Dec 31, 2020 1:36 am

Hi Peter,

Is Axis 0 enabled? Check the Axis Screen.

When Jogging is Axis 0 Destination changing? Check the Axis Screen.

Is the DAC being commanded to a voltage? Check the Analog Screen.

Otherwise how the DAC output changes depends on how the axis is tuned. PID gains, Filters and so forth on the Step Response and Filters Screens. How is the servo tuned? Show us the Step Response and Filters Screens.

Image
Regards,

Tom Kerekes
Dynomotion, Inc.

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

Re: C program control issues

Post by TomKerekes » Thu Dec 31, 2020 2:00 am

Another unrelated thought I had was whether Single Point Threading is a situation where one might use a Master/Slave Axis arrangement, so that it doesn't matter how far off the 'proper' path the Spindle is, as long as the Z Axis (i.e. the cutting tool) is faithfully following it (at some specific 'gear ratio'), then all will be well?
Yes that is how Threading works.
Regards,

Tom Kerekes
Dynomotion, Inc.

Post Reply