NEWS
LinuxCNC 2.5.2 Release
There are no translations available.

LinuxCNC 2.5.2 Update Released (changelog).
 
LinuxCNC 2.5.1 Release
There are no translations available.

LinuxCNC 2.5.1 Update Released (changelog). If the Package Manager does not prompt you to upgrade see this page.

 
LinuxCNC 2.5.0 Release
There are no translations available.

New major release (changelog). See the instructions to update your system from EMC 2.4 to LinuxCNC 2.5.
 
Home Forum General General LinuxCNC Questions Moving axis in position mode from Hal .

Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: Moving axis in position mode from Hal .

Moving axis in position mode from Hal . 17 Apr 2012 10:27 #19320

  • bigalex
  • bigalex's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 124
  • Thank you received: 2
  • Karma: 3
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:
The administrator has disabled public write access.

Re:Moving axis in position mode from Hal . 17 Apr 2012 10:44 #19321

  • BigJohnT
  • BigJohnT's Avatar
  • OFFLINE
  • Administrator
  • Posts: 4947
  • Thank you received: 85
  • Karma: 134
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
The administrator has disabled public write access.

Re:Moving axis in position mode from Hal . 17 Apr 2012 13:29 #19324

  • andypugh
  • andypugh's Avatar
  • NOW ONLINE
  • Moderator
  • Posts: 4108
  • Thank you received: 140
  • Karma: 129
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.
The administrator has disabled public write access.

Re:Moving axis in position mode from Hal . 18 Apr 2012 01:07 #19337

  • bigalex
  • bigalex's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 124
  • Thank you received: 2
  • Karma: 3
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 01:42 by bigalex.
The administrator has disabled public write access.

Re:Moving axis in position mode from Hal . 18 Apr 2012 02:32 #19341

  • andypugh
  • andypugh's Avatar
  • NOW ONLINE
  • Moderator
  • Posts: 4108
  • Thank you received: 140
  • Karma: 129
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.
The administrator has disabled public write access.

Re:Moving axis in position mode from Hal . 18 Apr 2012 05:23 #19350

  • bigalex
  • bigalex's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 124
  • Thank you received: 2
  • Karma: 3
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:
The administrator has disabled public write access.

Re:Moving axis in position mode from Hal . 18 Apr 2012 05:27 #19351

  • andypugh
  • andypugh's Avatar
  • NOW ONLINE
  • Moderator
  • Posts: 4108
  • Thank you received: 140
  • Karma: 129
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
The administrator has disabled public write access.

Re:Moving axis in position mode from Hal . 18 Apr 2012 05:35 #19352

  • bigalex
  • bigalex's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 124
  • Thank you received: 2
  • Karma: 3
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:
The administrator has disabled public write access.
  • Page:
  • 1
Time to create page: 0.976 seconds
Powered by Kunena Forum
© 2013 LinuxCNC.org
Joomla! is Free Software released under the GNU General Public License.