I am sort of convinced this may be a bug. My code was working with v4.33, but now it has a problem with 4.34. Upon halting a runing gcode within KMotionCNC on a 3 axis gantry router, it should stop the spindle and go to machine zero, which is does. Where it has trouble is with continuing the job.
With running the attached c program as the "Halt" command from KMotionCNC in mid gcode, the problem is seen after pressing the start again. It will drop the Z back to the appropriate height per the job, but then it will start running to the next XY per job but to the Z machine zero or whatever value I use in my Safe Z program.
My guess is Kmotion is confusing the last gcode commanded value, that was in this case from my Safe Z via MDI, with the next value when I am in mid gcode without any Z's further called until the end of program. The odd part is it does correctly recognize the last running gcode Z value, and does go to it first, but then overlays the Safe Z value to the next XY.
FYI, I am using the MDI function instead of Move in the initial KMotion example C due to a continued servo tuning problem that results in overshooting rapids that are not run as feeds, and a desire to command the specific machine zero location. Again, this was not a problem with 4.33.
Thanks
Safe Z Spindle off Restart error
Moderators: TomKerekes, dynomotion
Safe Z Spindle off Restart error
- Attachments
-
- SafeZ_SpindleOff.c
- (568 Bytes) Downloaded 319 times
- TomKerekes
- Posts: 2676
- Joined: Mon Dec 04, 2017 1:49 am
Re: Safe Z Spindle off Restart error
Hi MadTooler,
You can’t use MDI commands to run GCode if you wish to resume running GCode.
Can you explain more clearly what overshooting problem you are having moving Z from KFLOP? Are you also moving it to zero?
You can’t use MDI commands to run GCode if you wish to resume running GCode.
Can you explain more clearly what overshooting problem you are having moving Z from KFLOP? Are you also moving it to zero?
Regards,
Tom Kerekes
Dynomotion, Inc.
Tom Kerekes
Dynomotion, Inc.
Re: Safe Z Spindle off Restart error
Interesting. I have been using the MDI for a couple of years within this script and some other mcodes. There have not been any clear issues with v433. In any case, I will plan to adjust now that I know that it never should have worked the way I had managed.
The overshooting is a violent full throttle Move with very little if any ramping up to and down from commanded velocity. Or at least it seems. This is surely related to a tuning issue that I need to get back to where my step moves for my brushed dc servos looks good in the bode plots, but somewhere is getting way to much speed. I keep looking at "I" clamping variables and max pwm and others while missing what is wrong.
I will set this issue aside until I get back to my threads on cnczone with the tuning issues I never solved many moons ago.
Thanks
The overshooting is a violent full throttle Move with very little if any ramping up to and down from commanded velocity. Or at least it seems. This is surely related to a tuning issue that I need to get back to where my step moves for my brushed dc servos looks good in the bode plots, but somewhere is getting way to much speed. I keep looking at "I" clamping variables and max pwm and others while missing what is wrong.
I will set this issue aside until I get back to my threads on cnczone with the tuning issues I never solved many moons ago.
Thanks
Re: Safe Z Spindle off Restart error
Other than a gcode/MDI command to go to z0 g53, what would be a proper command in this script to go to z machine 0?
- TomKerekes
- Posts: 2676
- Joined: Mon Dec 04, 2017 1:49 am
Re: Safe Z Spindle off Restart error
Hi MadTooler,
Move(ZAXIS,0.0);
Would move Z to machine 0 without altering the GCode Interpreter State.
Move(ZAXIS,0.0);
Would move Z to machine 0 without altering the GCode Interpreter State.
Regards,
Tom Kerekes
Dynomotion, Inc.
Tom Kerekes
Dynomotion, Inc.
Re: Safe Z Spindle off Restart error
Thanks, Tom. I get following errors when I use the Move command over longer distances. I tried it over a shorter distance and everything does perform correctly. When I figure out what I have set wrong and get my tune better, I am sure this will work perfectly well.
- TomKerekes
- Posts: 2676
- Joined: Mon Dec 04, 2017 1:49 am
Re: Safe Z Spindle off Restart error
Hi MadTooler,
A common mistake is to have the max velocity set too high and not realize this until you make a move large enough to get up to a speed your system can't do. Similarly the acceleration might be set too high and not realize it until you make a move large enough to allow acceleration to ramp up to a level your ststem can't do. See also here.
A common mistake is to have the max velocity set too high and not realize this until you make a move large enough to get up to a speed your system can't do. Similarly the acceleration might be set too high and not realize it until you make a move large enough to allow acceleration to ramp up to a level your ststem can't do. See also here.
Regards,
Tom Kerekes
Dynomotion, Inc.
Tom Kerekes
Dynomotion, Inc.