How to check whether G33 would hit machine limits?

More
11 Apr 2016 14:49 #73111 by torotil
G-code program that uses a series of G33 lines to move the tool in sync with a lathe-spindle. Currently it seems I can execute programs that would need the machine to go faster than configured in the MAX_VELOCITY and MAX_ACCELERATION in the ini-file.

At the moment the program is executed (using AXIS in this case) and the machine just "silently" loses the synchronization with the spindle without so much as a notice. Is there a way to check whether a program would work (at a given spindle-speed) before-hand?

Please Log in or Create an account to join the conversation.

More
11 Apr 2016 14:56 #73112 by andypugh
I would actually expect the machine to trigger a following error. Are your f-error limits unusually wide?

Not that that is any real help, of course.

Please Log in or Create an account to join the conversation.

More
11 Apr 2016 15:00 - 11 Apr 2016 15:02 #73113 by torotil
Yes the F_ERROR settings might be a bit 'generous'. So that covers the 'silently' part. I'd still love to know as early as possible that the program will fail (ie. before executing it) and also exactly which part of it is too fast.

If needed I'm even prepared to chip-in some coding - but at the moment I do not even know where to look for that functionality.
Last edit: 11 Apr 2016 15:02 by torotil.

Please Log in or Create an account to join the conversation.

More
11 Apr 2016 15:10 - 11 Apr 2016 15:10 #73114 by andypugh
It could be done in G-code.....
O100 IF [#<_rpm> * #101 GT #<_ini[AXIS_2]MAX_VELOCITY>]
   (MSG, I am sorry Dave, I can't let you do that)
O100 ELSE
   G33 Z100 K#101
O100 ENDIF

Reading of INI files by G-code needs to be enabled for this to work:
linuxcnc.org/docs/2.7/html/remap/remap.h...i_file_configuration
Last edit: 11 Apr 2016 15:10 by andypugh.

Please Log in or Create an account to join the conversation.

More
11 Apr 2016 15:16 #73116 by torotil
Wow, thanks! Do you also know something similar for the acceleration? I guess that somewhat depends on trajectory planning, right?
G33 Z0 K#1
G33 Z100 K#2

From that I know the difference in speed as
ABS[#1-#2]*#<_rpm>/60
, but I still don't know the needed acceleration.

Please Log in or Create an account to join the conversation.

More
11 Apr 2016 15:23 #73117 by andypugh

Do you also know something similar for the acceleration


The fact that the spindle is (probably) already turning and that the axis has a finite acceleration means that there will always be _some_ error. The magnitude of the position error can be calculated from the desired speed (rpm x feed) and the equation v^2 = 2as.
In this case a can be read from the INI and s is the resultant following error.

Please Log in or Create an account to join the conversation.

More
11 Apr 2016 15:34 #73118 by torotil
Sure. Going from one speed to another can't go instantly. It seems that usually the machine catches up with the desired position at some later point - perhaps by going faster and then slowing down again. Looking closely at my test-objects I can even see that. At some times it simply fails to do that, though. Subsequent commands are then executed at the wrong position. Under which conditions would that happen?

Please Log in or Create an account to join the conversation.

More
12 Apr 2016 11:21 #73151 by andypugh

Sure. Going from one speed to another can't go instantly. It seems that usually the machine catches up with the desired position at some later point


I don't have much experience with G33. I have used G76 extensively, and my impression is that that is allowed to lag behind the "ideal" position but retracts at the right point. The amount of lag would vary with spindle speed, so there is a recommendation in the documentation not to alter the spindle speed between threading passes.

Please Log in or Create an account to join the conversation.

Time to create page: 0.155 seconds
Powered by Kunena Forum