Moving axis in position mode from Hal .

More
17 Apr 2012 17:27 #19320 by bigalex
Hello folks

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 :blink:

Please Log in or Create an account to join the conversation.

More
17 Apr 2012 17:44 #19321 by BigJohnT
This does sound similar to jogging with a MPG or similar and using the count as the final destination.

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.

More
17 Apr 2012 20:29 #19324 by andypugh
bigalex wrote:

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 might find the limit3 component useful to apply acceleration, velocity and position limits.
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.

More
18 Apr 2012 08:07 - 18 Apr 2012 08:42 #19337 by bigalex
Hello Gentlemen

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 :blink:
Last edit: 18 Apr 2012 08:42 by bigalex.

Please Log in or Create an account to join the conversation.

More
18 Apr 2012 09:32 #19341 by andypugh
If you want to read and act on G-code too, then you will need the rest of LinuxCNC and a GUI. I thought you were not wanting to use G-code.

Please Log in or Create an account to join the conversation.

More
18 Apr 2012 12:23 #19350 by bigalex
Yes Andy

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 :blink:

Please Log in or Create an account to join the conversation.

More
18 Apr 2012 12:27 #19351 by andypugh
bigalex wrote:

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.

More
18 Apr 2012 12:35 #19352 by bigalex
Thanks a lot for the advice.

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 :blink:

Please Log in or Create an account to join the conversation.

Time to create page: 0.287 seconds
Powered by Kunena Forum