How to check whether G33 would hit machine limits?

More
10 years 6 months ago #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
10 years 6 months ago #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
10 years 6 months ago - 10 years 6 months ago #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: 10 years 6 months ago by torotil.

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

More
10 years 6 months ago - 10 years 6 months ago #73114 by andypugh
It could be done in G-code.....
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: 10 years 6 months ago by andypugh.

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

More
10 years 6 months ago #73116 by torotil
Wow, thanks! Do you also know something similar for the acceleration? I guess that somewhat depends on trajectory planning, right?
Code:
G33 Z0 K#1 G33 Z100 K#2

From that I know the difference in speed as
Code:
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
10 years 6 months ago #73117 by andypugh

torotil wrote: 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.

Time to create page: 0.541 seconds
Powered by Kunena Forum