Moving axis in position mode from Hal .
- bigalex
- Offline
- Premium Member
- Posts: 148
- Thank you received: 3
I need to move 2 axis (part of a cylindrical achitecture "robot") to a continuous calculated position (generated from an external encoder) to follow a point moving in the space .
Is there any way to do this from HAL ?
The part program will allow to describe the various movement positions during the cycle.
In an exact part of the part program the "robot" position the axis on a specific point and then without any G code (?) but maybe with a Mxxx engage the
position calculation into HAL and HAL will move the axis to the needed position .
After that with another Mxxx function wating for the end of the "following point in the space" procedure the "robot" will continue the cycle/part program .
I hope I'm clear enough.
I've already did this kind of job with commercial motion controllers but I don't know linuxcnc so much to get the right answer.
Thank for any advice.
bigalex
Please Log in or Create an account to join the conversation.
- BigJohnT
- Offline
- Administrator
- Posts: 7000
- Thank you received: 1172
halui.jog.N.analog float in
pin for jogging the axis N using an float value (e.g. joystick)
linuxcnc.org/docview/html/man/man1/halui.1.html
John
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
- Posts: 23182
- Thank you received: 4869
You might find the limit3 component useful to apply acceleration, velocity and position limits.I need to move 2 axis (part of a cylindrical achitecture "robot") to a continuous calculated position (generated from an external encoder) to follow a point moving in the space .
You would wire the position command through the limit3 to a stepgen (or PID for a servo) and then to the motor drive.
Is the position command literally from an encoder quadrature pulse train?
I would suggest using standalone HAL and possibly a GladeVCP panel, and not load any of the usual GUIs.
Please Log in or Create an account to join the conversation.
- bigalex
- Offline
- Premium Member
- Posts: 148
- Thank you received: 3
Thanks for the quick reply.
For Andy :
Is the position command literally from an encoder quadrature pulse train?
I read the incremental encoder and then I make a calculation to determine the position coordinates of the two axis I need to move.
The resultant movement is like a sector of a circle on a plane determined by the angular position read from the external encoder. (A-B phases 3600 ppr 0.1 degree resolution) .
As I wrote at the beginning of the thread I would like to use G code for the normal axis movements and start the motion with the calculation into HAL , then at the end of this movements the part program will continue using G code for the movements.
Is this way possible or I have to do as Andy said
.I would suggest using standalone HAL and possibly a GladeVCP panel, and not load any of the usual GUIs.
bigalex
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
- Posts: 23182
- Thank you received: 4869
Please Log in or Create an account to join the conversation.
- bigalex
- Offline
- Premium Member
- Posts: 148
- Thank you received: 3
I would like to use G-Code style part program and Mxxx funtion to sincronize and execute that specific task.
Do you think is this possible and in case it is can you suggest to me a possible solution ?
bigalex
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
- Posts: 23182
- Thank you received: 4869
Do you think is this possible and in case it is can you suggest to me a possible solution ?
I am quite sure it is possible. I think I would do it with a custom HAL component written in "comp" as I am familiar with that tool, but it might also be possible to do it with existing HAL components.
I think you will find "offset" and "scale" to be useful.
www.linuxcnc.org/docview/html/man/man9/offset.9.html
www.linuxcnc.org/docview/html/man/man9/scale.9.html
Please Log in or Create an account to join the conversation.
- bigalex
- Offline
- Premium Member
- Posts: 148
- Thank you received: 3
I will get more knowledge on HAL to better inderstand how to integrate and inteact with tha components .
I only read once about "comp" and the possibility to write new components/functions .
I believe it is a useful tool but I have to learn much more about it.
Thank you .
bigalex
Please Log in or Create an account to join the conversation.