Rigid Taping - DAC closed loop Spindle

Moderators: TomKerekes, dynomotion

Mateusz
Posts: 31
Joined: Thu Jun 06, 2019 8:36 pm

Rigid Taping - DAC closed loop Spindle

Post by Mateusz » Sun Jun 16, 2019 7:54 pm

Hello Tom,

I'm very eager to give a go with Rigid Tap functionality. I went thru different forums and still is something missing.
Starting from beginning,
- I found this Patch KiT https://dynomotion.com/Software/Patch/A ... dTapV434h/ .DO I have to replace some of the files in GCodeInterpeter Catalogue ?

- My Spindle is DAC closed loop setup. I'm running CW and CCW over OnCWJog.c and OnCCWJog.c scripts and analog +/-10V. I'could not find any example how to configure such case. In most cases people were changing bits.

- I'm worry about position overshoots during direction change from M3 to M4 or M5 for example. I found this during my tests.
When I'm starting spindle with command M3, Axis Dest = Position spindle starts nicely and there is no noticeable speed fluctuations.
Afterwards I'm switching Spindle off with M5 command, this situation generates situation Axis Dest > Position (because stop ramp in VFD is much more sharper then set during tuning) . Now I'm starting Spindle again with M3, Spindle Overshoots badly :) goes nuts in every direction until stabilises (overshooting 15kW in both direction makes you think..). To overcome this problem I placed DisableAxis command in OffJog.c and EnableAxis in OnCWJog.c This little change has fixed the problem noticeably, but I'm nut sure how this will work with Tapping ;)


Cheers
Mateusz
Attachments
InitAxis.c
(5.27 KiB) Downloaded 102 times
OnCWJog.c
(1.18 KiB) Downloaded 107 times
OnCCWJog.c
(1.15 KiB) Downloaded 96 times
OffJog.c
(516 Bytes) Downloaded 90 times

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

Re: Rigid Taping - DAC closed loop Spindle

Post by TomKerekes » Mon Jun 17, 2019 4:52 am

Hi Mateusz,

That G84 patch is not required if you are using Release Version 4.34 or later.

In your case it will probably be better to never disable your drives. Or if you do, do it after you have commanded the speed to zero and waited for the Axis to be finished decelerating to a stop.
Regards,

Tom Kerekes
Dynomotion, Inc.

cwatson1982
Posts: 26
Joined: Tue Jun 02, 2020 11:14 pm

Re: Rigid Taping - DAC closed loop Spindle

Post by cwatson1982 » Tue Jun 02, 2020 11:20 pm

You ever get this working? I am in the same position. Running spindle closed loop.

In the example code using bits for forward/reverse, it looks like I could probably just replace the bit setting for forward/reverse with calls to the onCWjog and onCCWjog functions.

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

Re: Rigid Taping - DAC closed loop Spindle

Post by TomKerekes » Wed Jun 03, 2020 1:19 am

Hi cwatson1982,

Not sure what you mean. Those are C Programs not functions. You can't "call" them. But you can code equivalent things.
Regards,

Tom Kerekes
Dynomotion, Inc.

Mateusz
Posts: 31
Joined: Thu Jun 06, 2019 8:36 pm

Re: Rigid Taping - DAC closed loop Spindle

Post by Mateusz » Sun Aug 01, 2021 6:43 pm

Hello Gents,

I would like to refresh this topic, I'm sorry I had no chance to get finish this project, things went off on a tangent.
This time machine is very similar, Spindle on DAC working as servo well tuned. Now machine is ready to implement Rigid Taping, thing is I feel confused regarding information. I did observed many smart discussions, but....
- which C code should I use to configure my Spindle it does operate with two bits to switch ON and +/- 10V to change a direction of spin.
- how to implement configuration code or is already embedded ? , Does M119 should start the thread once G84 is called ?
- Threading window in Trajectory Planner is configured: Encoder 1 ; Encoder Axis 3 ;

Regards
Mateusz

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

Re: Rigid Taping - DAC closed loop Spindle

Post by TomKerekes » Sun Aug 01, 2021 9:33 pm

Hi Mateusz,
which C code should I use to configure my Spindle it does operate with two bits to switch ON and +/- 10V to change a direction of spin
You might use: \C Programs\RigidTap\RigidTapMultiPassJogM119_v1.c
how to implement configuration code or is already embedded ?
I'm not sure what you mean. You would change the defines in the above program to configure things for your System.
Does M119 should start the thread once G84 is called ?
Yes, when G84 is interpreted it invokes the M119 Action.
Threading window in Trajectory Planner is configured: Encoder 1 ; Encoder Axis 3
You also need to know counts/rev and configure those in the C Program.
Regards,

Tom Kerekes
Dynomotion, Inc.

Mateusz
Posts: 31
Joined: Thu Jun 06, 2019 8:36 pm

Re: Rigid Taping - DAC closed loop Spindle

Post by Mateusz » Tue Aug 03, 2021 3:16 pm

Hi Tom,

I will continue this post, in some point we run two the same topics.
thank you for above answer it works but with V1.Jim version.

I mentioned that I've got signal "Speed reached" (current speed n = n set point) from Spindle VFD .
It is actually not useful because having ramp up / down for Spindle generated by KFklop, I'm getting this signal read out all of the time, sometimes it is flickering of course but it is enough to trigger program further.. I can set very tight window to assess this signal but sometimes I'm getting short pulses to early.

To overcome this problem I was thinking to do very steep ramp acceleration and introduce ramp in the drive to make this signal useful. In that way Spindle will be behind of the set point till will reach it. What do you think Tom ? does PID will cope with this situation?

OR.. There is a simple function to write when Spindle has reached the end of the ramp ?
At the moment I placed delay for safety reason in each script, but of of course this is good just for certain speeds.


Regards Mateusz

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

Re: Rigid Taping - DAC closed loop Spindle

Post by TomKerekes » Tue Aug 03, 2021 3:29 pm

Hi Mateuse,

No I would not set a high Acceleration to cause a huge following error.

You might add something like this that should wait until the commanded Spindle speed is within 1 RPM of the set speed.

Code: Select all

		while (fast_fabs(fast_fabs(chan[SPINDLEAXIS].last_vel) - speed * FACTOR) > 1.0)  ;
Regards,

Tom Kerekes
Dynomotion, Inc.

Mateusz
Posts: 31
Joined: Thu Jun 06, 2019 8:36 pm

Re: Rigid Taping - DAC closed loop Spindle

Post by Mateusz » Tue Aug 03, 2021 5:03 pm

Thank you it works!

BTW, what is fast_fabs ? some math function?

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

Re: Rigid Taping - DAC closed loop Spindle

Post by TomKerekes » Tue Aug 03, 2021 5:25 pm

fast_fabs() is a function to take the absolute value of a floating point number quickly.
Regards,

Tom Kerekes
Dynomotion, Inc.

Post Reply