Z axis Feedrate Change
However, I would like to be able to better control the feedrate of the Z Axis. right now, I basically have a running total in a hal component that adds or subtracts a very small amount depending on the signal.
If I make the increment in my Hal Component too large, the control trys to move my Z axis at the same speed as my X and Y are moving, which it physically cannot do. Is there a way I can "decouple" the Z axis feed rate so that to and pass it through the component, so that I can adjust it faster or slower?
Thanks
Brian
Please Log in or Create an account to join the conversation.
John
Please Log in or Create an account to join the conversation.
I have looked at the THC comp, that is what I based mine on. I am not that experienced of a programmer. Are you saying to basically have an input that will change the increment amount? On the THC comp it would be the correction_vel variable
Thanks
Please Log in or Create an account to join the conversation.
John
Please Log in or Create an account to join the conversation.
- viesturs.lacis
- Offline
- Premium Member
- Posts: 101
- Thank you received: 3
Now I have the comp compare the actual voltage vs requested voltage. If the difference is big, then correction speed is faster. The principle looks like this:
if (actual - requested)>0,5
then offset = correction velocity * 3
if (actual - requested)<0,5
then offset = correction velocity * 1
Viesturs
Please Log in or Create an account to join the conversation.
You could move at a rate proportional to the error, like a PID controller:if (actual - requested)>0,5
then offset = correction velocity * 3
if (actual - requested)<0,5
then offset = correction velocity * 1
offset = correction_gain * (actual - requested)
if ( offset > max ) offset = max
Please Log in or Create an account to join the conversation.
- viesturs.lacis
- Offline
- Premium Member
- Posts: 101
- Thank you received: 3
viesturs.lacis wrote:
You could move at a rate proportional to the error, like a PID controller:if (actual - requested)>0,5
then offset = correction velocity * 3
if (actual - requested)<0,5
then offset = correction velocity * 1
offset = correction_gain * (actual - requested) if ( offset > max ) offset = max
Actually I tried this approach.
My sensor has ~0,5 sec delay for better accuracy, that is why I either had to set the gain very very low (which resulted in very slow movement) or I got constant overshoots, which is completely unacceptable.
So I came up with this "2 speed" idea.
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.