let's add acc code!
- dab77
- Offline
- Elite Member
- Posts: 194
- Thank you received: 2
is there any way to add a g-code to set acceleration ramp/time in next releases? EMC2 is lively growing and one of its main qualities is that is not limited to mill and lathe. so, even if it's not properly an important feature for standard use of emc2, modifying acc/dec ramps by the g-code can be very useful to other users!
I use EMC2 to move objects in the air for artistic purpose, and being able to modify accelerations and decelerations line by line is fundamental, but also who want to move any kind of robot/arms, could find it useful.
so, can someone tell me if it can be a feature in the next future, or if it's too hard to add?
thanks, davide.
Please Log in or Create an account to join the conversation.
- BigJohnT
- Offline
- Administrator
- Posts: 7106
- Thank you received: 1177
As I understand the trajectory planner changing acceleration on a line by line basis would not be possible with EMC. One could come close by changing the feeds in short increments I assume if this does not break blending...
John
Please Log in or Create an account to join the conversation.
- dab77
- Offline
- Elite Member
- Posts: 194
- Thank you received: 2
i know it's not possible now, in emc, but what i want to ask is if it's possible to add this feature in a future release. don't know if in a 2.5, or in a 3.xx version.
if this powerful software is going to grow again in the future, why don't add more functionality?
thanks John for your interest, do you think i'd better post this question in the dev-mailing list? i'm going to do it.
ciao!
Please Log in or Create an account to join the conversation.
- BigJohnT
- Offline
- Administrator
- Posts: 7106
- Thank you received: 1177
John
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
- Posts: 23310
- Thank you received: 4858
Linking that value to G-code would not be tidy, but could be done with an analogue output.
In actuality the real problem is that G-code, RS274-NGC is "full", all the 1-letter codes already have a use, and there is no real possibility of making the parser handle 2-letter codes.
(A supplementary issue is that acceleration is per-joint)
It might be possible to add acceleration to your kinematics code. Perhaps by creating an output pin that can be linked (in HAL) to the halui,feed-override.value pin.
Actually, you might even be able to do it with a hal component, that watches the cartesian velocity and adjusts the feed over-ride pin to keep the acceleration correct.
I am not sure how the accelleration gets passed from the INI file to the trajectory planner, but it is possible that you could intercept it on the way and make your own, special, EMC2. It is much easier to do that than to prove that doing so is safe and reliable enough to make it into the main release.
Please Log in or Create an account to join the conversation.
- dab77
- Offline
- Elite Member
- Posts: 194
- Thank you received: 2
but..correct me please if i'm wrong: in the .ini file now i'm setting the max accel for each axis, but when i move in world mode the acceleration ramp is derivated from the four max accel,is it right? so, what about changing the four max accel on the fly? maybe g-code can be helpful with an external calling (i'm not sure, but it can recall external programs, can it?), we are talking, as you suggest, of just changing 4 (or 1) variables, isn't it?
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
- Posts: 23310
- Thank you received: 4858
if i were a good programmer i'd modify my emc2, but since i need also a certain grade of reliability i'm not going to modify the code if i don't know what i'm doing...
You can always swap back to a normal version
but..correct me please if i'm wrong: in the .ini file now i'm setting the max accel for each axis, but when i move in world mode the acceleration ramp is derivated from the four max accel,is it right? so, what about changing the four max accel on the fly?
That is what you would need to do, but in your case it is somewhat more complicated as your kinematics are distinctly non-linear.
In any case, the INI file is only read at startup, and the accel values then remain constant.
I really do think that you could do exactly what you want with the motion.adaptive-feed pin and a HAL component, though.
Please Log in or Create an account to join the conversation.
- dab77
- Offline
- Elite Member
- Posts: 194
- Thank you received: 2
thanks andy.
cheers, davide.
Please Log in or Create an account to join the conversation.
- dab77
- Offline
- Elite Member
- Posts: 194
- Thank you received: 2
thanks again.
Please Log in or Create an account to join the conversation.
- BigJohnT
- Offline
- Administrator
- Posts: 7106
- Thank you received: 1177
John
Please Log in or Create an account to join the conversation.