- LinuxCNC
- General LinuxCNC Questions
- Feature request: Different acceleration for rapid and feed moves
Feature request: Different acceleration for rapid and feed moves
- Shu
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 49
- Thank you received: 0
12 Jan 2020 02:53 #154658
by Shu
Feature request: Different acceleration for rapid and feed moves was created by Shu
I would like to be able to set different acceleration values in the ini for rapids and feeds.
Right now I use a custom m code to execute something likeright before G0 lines. With a custom CAM postprocessor. And after the last G0 movement another custom m code to set it back to the default. This works well and shaves of a lot of time while keeping the finish quality high. The particular machine has more than 3000mm of travel and can move with 82000 mm/min (3200 in/m) thus it makes a huge difference for G0 moves what acceleration the config has. On the other hand, acceleration needs to be set low during cuts to have a high surface finish.
I'm wondering if there are cases where this hack is not going well. E.g. with G64 active and switching acceleration between two G0 or G1 codes that will be affected by path blending. I have not checked if the halcmd does bust the queue.
Right now I use a custom m code to execute something like
halcmd setp ini.0.max_acceleration 9800
I'm wondering if there are cases where this hack is not going well. E.g. with G64 active and switching acceleration between two G0 or G1 codes that will be affected by path blending. I have not checked if the halcmd does bust the queue.
Please Log in or Create an account to join the conversation.
- aleksamc
- Offline
- Platinum Member
Less
More
- Posts: 567
- Thank you received: 65
12 Jan 2020 19:29 #154712
by aleksamc
Replied by aleksamc on topic Feature request: Different acceleration for rapid and feed moves
I think you should look for analog output and change it for G-code using M68 E<Out_numb> Q<acceleration>
in hal you should use input to your acceleration from motion.analog−out−NN.
For example:
Inhal
And from G-code you should write:
M68 E0 Q9800
in hal you should use input to your acceleration from motion.analog−out−NN.
For example:
Inhal
net set_accel motion.analog-out-00 => ini.0.max_acceleration
And from G-code you should write:
M68 E0 Q9800
Please Log in or Create an account to join the conversation.
- Shu
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 49
- Thank you received: 0
13 Jan 2020 16:21 #154767
by Shu
Replied by Shu on topic Feature request: Different acceleration for rapid and feed moves
Yes that might be cleaner than using halcmd. But how to ditch m codes to change acceleration before and after every g0 entirely?
Please Log in or Create an account to join the conversation.
- aleksamc
- Offline
- Platinum Member
Less
More
- Posts: 567
- Thank you received: 65
13 Jan 2020 18:22 - 13 Jan 2020 18:23 #154776
by aleksamc
Replied by aleksamc on topic Feature request: Different acceleration for rapid and feed moves
Currently it's not question for linuxcnc program. I tried to tell you what to do to operate your accelaration from g-code.
1) The simplest way to write G0 with M68 command is to use "Replace" statment in your text editor, for example "G0 raplace with M68 E0Q100 G0".
2) Configure your post for generating G-code that you need.
3) Remap G0
1) The simplest way to write G0 with M68 command is to use "Replace" statment in your text editor, for example "G0 raplace with M68 E0Q100 G0".
2) Configure your post for generating G-code that you need.
3) Remap G0
Last edit: 13 Jan 2020 18:23 by aleksamc.
Please Log in or Create an account to join the conversation.
- Shu
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 49
- Thank you received: 0
14 Jan 2020 11:24 #154815
by Shu
Replied by Shu on topic Feature request: Different acceleration for rapid and feed moves
1.) is a bad idea as it will break blending between two subsequent G0 lines. A custom m code that checks a flag if the acceleration needs to be altered is better. Any M68 will bust the queue.
2.) Is the current state. As I explained, I have a custom m code and the post processor handles it, only inserts it once, not for every G0 line. I would like to ditch this and have separate acceleration values for rapid and feed moves.
3.) Can you give advice on how to do that without recompiling? AFAIK G0 can't be remapped.
2.) Is the current state. As I explained, I have a custom m code and the post processor handles it, only inserts it once, not for every G0 line. I would like to ditch this and have separate acceleration values for rapid and feed moves.
3.) Can you give advice on how to do that without recompiling? AFAIK G0 can't be remapped.
Please Log in or Create an account to join the conversation.
- aleksamc
- Offline
- Platinum Member
Less
More
- Posts: 567
- Thank you received: 65
14 Jan 2020 19:07 #154839
by aleksamc
Replied by aleksamc on topic Feature request: Different acceleration for rapid and feed moves
Try to read
Remap G-code linuxcnc
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
Less
More
- Posts: 23178
- Thank you received: 4862
15 Jan 2020 00:53 #154869
by andypugh
Replied by andypugh on topic Feature request: Different acceleration for rapid and feed moves
Note that the ini.pins are not sampled in realtime or when G-code is running.
forum.linuxcnc.org/24-hal-components/331...running-a-file#97437
What is the purpose of having different accel in G0 ?
forum.linuxcnc.org/24-hal-components/331...running-a-file#97437
What is the purpose of having different accel in G0 ?
Please Log in or Create an account to join the conversation.
- Shu
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 49
- Thank you received: 0
15 Jan 2020 01:06 #154874
by Shu
Running a high acceleration makes the whole head of the machine nod a bit (everything's a spring), this little mechanical overshoot might be acceptable with scanning (probing many points) and rapids, but not while cutting.
Replied by Shu on topic Feature request: Different acceleration for rapid and feed moves
Thanks Andy, that's good to know.Note that the ini.pins are not sampled in realtime or when G-code is running.
forum.linuxcnc.org/24-hal-components/331...running-a-file#97437
Saves of a lot of time while keeping the finish quality high. The particular machine has more than 3000mm of travel and can move with 82000 mm/min (3200 in/m) thus it makes a huge difference for G0 moves what acceleration is used. On the other hand, acceleration needs to be set low during cuts (G1 etc) to yield a good surface finish.What is the purpose of having different accel in G0 ?
Running a high acceleration makes the whole head of the machine nod a bit (everything's a spring), this little mechanical overshoot might be acceptable with scanning (probing many points) and rapids, but not while cutting.
Please Log in or Create an account to join the conversation.
- Shu
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 49
- Thank you received: 0
15 Jan 2020 01:11 #154876
by Shu
Replied by Shu on topic Feature request: Different acceleration for rapid and feed moves
I G0 can't be remapped.Try to read Remap G-code linuxcnc
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
Less
More
- Posts: 23178
- Thank you received: 4862
15 Jan 2020 13:57 #154918
by andypugh
Replied by andypugh on topic Feature request: Different acceleration for rapid and feed moves
Feed moves and rapid moves are different canon commands, so there is some chance that a different acceleration could be chosen for each of feed, arc and rapid.
Have you tried tracing the numbers to find where they are finally used?
It might be in code that calls this:
github.com/LinuxCNC/linuxcnc/blob/345688.../src/emc/tp/tc.c#L55
TC_STRUCT is here:
github.com/LinuxCNC/linuxcnc/blob/345688...c/tp/tc_types.h#L117
It is possible that canon_motion_type contains information about the G0 / not G0 distinction.
Have you tried tracing the numbers to find where they are finally used?
It might be in code that calls this:
github.com/LinuxCNC/linuxcnc/blob/345688.../src/emc/tp/tc.c#L55
TC_STRUCT is here:
github.com/LinuxCNC/linuxcnc/blob/345688...c/tp/tc_types.h#L117
It is possible that canon_motion_type contains information about the G0 / not G0 distinction.
Please Log in or Create an account to join the conversation.
- LinuxCNC
- General LinuxCNC Questions
- Feature request: Different acceleration for rapid and feed moves
Time to create page: 0.154 seconds