Limit3 question.
Today, reading here: linuxcnc.org/docs/html/man/man9/limit3.9.html , i've learned about limit3.x.maxs and maxa.
If i understood correctly this limits max acceleration (and velocity) for the given movement into limit3.x.in. Is it?
Do you think can i use some way this parameter connected to maybe a Spinbutton into Gladevcp, where i set the limit of acceleration?
this way i can set an initial Hi acceleration, and then slow this into Gladevcp during axis running.
Any ideas?
Thanks, Davide.
Please Log in or Create an account to join the conversation.
or, better, where can i after plug the output?
Please Log in or Create an account to join the conversation.
Haven't tried it but would have thought
stepgen.N.maxaccel which is a RW param would be a good place to start
When emc starts, this is set to the MAX_ACCELERATION figure for that axis from the .ini file
Unless you are doing something very clever, would appear to just need a limit1 component to define the bounds within which the acceleration can be adjusted.
regards
Please Log in or Create an account to join the conversation.
Unless you are doing something very clever, would appear to just need a limit1 component to define the bounds within which the acceleration can be adjusted.
Stepgen-maxaccel is a parameter, it can't be netted. (you can only net pins)
The way to do it would be to insert a limit3 between the position-command output and the stepgen-cmd input, then alter the accel limit. However, that would tend to cause an f-error unless the feedback is short-circuited.
Please Log in or Create an account to join the conversation.
but, what if i do a 'setp stepgen.N.maxaccel my_hal_pin'
does it work?
i would like to set maxaccel with the value of a spinbutton, in the moment when i reset the estop (in the same moment i'm setting my_kins_values from other spinbuttons..), but i really don't know how.
while thinking on this i'll try as you suggest, Andy.
Thanks, Davide.
Please Log in or Create an account to join the conversation.
Yes, setp works with parameters.but, what if i do a 'setp stepgen.N.maxaccel my_hal_pin'
does it work?
Please Log in or Create an account to join the conversation.
...
tgvcp.hal:45: value 'tgvcp.max_acc_out' invalid for float
tgvcp.hal:45: setp failed
Shutting down and cleaning up EMC2...
tried to do this:
# Prova modifica accelerazioni:
setp stepgen.0.maxaccel tgvcp.max_acc_out #this is line 45.
setp stepgen.1.maxaccel tgvcp.max_acc_out
setp stepgen.2.maxaccel tgvcp.max_acc_out
setp stepgen.3.maxaccel tgvcp.max_acc_out
tgvcp.max_acc_out is a out_pin created into python, with the value token from the spinbutton.
Please Log in or Create an account to join the conversation.
setp stepgen.0.maxaccel tgvcp.max_acc_out
You can't do that. setp takes a pin or a parameter and a number.
You can _type_ setp at the command line, but it isn't a way to link a gui control to a parameter. And you can't net a parameter.
without re-writing stepgen you can't change the acceleration on the fly.
I say it again, do it in CAM.
Please Log in or Create an account to join the conversation.
no, i'm sorry, but in CAM is not the way it should be and it would be a real pita..dab77 wrote:
setp stepgen.0.maxaccel tgvcp.max_acc_out
You can't do that. setp takes a pin or a parameter and a number.
You can _type_ setp at the command line, but it isn't a way to link a gui control to a parameter. And you can't net a parameter.
without re-writing stepgen you can't change the acceleration on the fly.
I say it again, do it in CAM.
I think there should be a way!
as you say, i proved i can setp by typing into the command line, so how can i do that from my python file?
p.s. i've tried the limit3 way, but the acceleration doesn't change.
Please Log in or Create an account to join the conversation.
I didn't say anything about connecting it with netStepgen-maxaccel is a parameter, it can't be netted. (you can only net pins)
Andy Pugh wrote:
You can use setp. One way might be.You can't do that. setp takes a pin or a parameter and a number.
You can _type_ setp at the command line, but it isn't a way to link a gui control to a parameter.
Write a handler for the slider or spinbox you set the new max accel with.
From that handler fork halcmd setp stepgen.0.maxaccel [value]
See the Forum discussion under Glade > Label regards writing python event handlers for glade widgets
Another way would be to write a user M code script which does the same thing and call it from your g code at the point
where you want to limit accel to a given value, no pretty gui sliders but can be written in 2 minutes.
regards
Please Log in or Create an account to join the conversation.