HAL Pin for Coordinate System

More
30 Mar 2022 18:03 #238772 by tom.eagan@integrisgp.com
Hello -

Is there a HAL pin available for reading the current coordinate system, G54, G55, etc?

Thanks!

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

More
30 Mar 2022 20:13 #238815 by andypugh
I looked and could not find one. Which does not necessarily mean that it does not exist.

However, it might not actually be possible. The working coordinate system is an interpreter state, and the interpreter has generally finished the job by the time motion starts.

A possible workaround is a very small Python programme that creates a HAL pin and updates it, as the coordinate system is available in the linuxcnc.stat() object.

If that sounds like something you could do, documentation is here:
linuxcnc.org/docs/stable/html/hal/halmodule.html
and linuxcnc.org/docs/stable/html/config/python-interface.html

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

More
30 Mar 2022 21:06 #238829 by tom.eagan@integrisgp.com
Thank you... that's probably more effort than I want to go to, but I'll keep it in mind...

The application is: I have a pyvcp panel that allows the user to set the coordinate system, and it stores it and retrieves it to/from linuxcnc.var #5220. But when a g-code file is run that changes the coordinate system, or the User changes it using an Axis MDI Command, the pyvcp panel doesn't doesn't know about it and is then out of sync until next restart. Just looking for an easy fix.

Thanks!

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

More
30 Mar 2022 22:23 #238842 by MaHa
Replied by MaHa on topic HAL Pin for Coordinate System
If you are using axis, there is this workaround to display current ucs.


www.forum.linuxcnc.org/21-axis/38824-yes...axis?start=10#164000

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

More
30 Mar 2022 22:37 #238843 by tom.eagan@integrisgp.com
I would have to learn a lot more about the ins and outs of linuxcnc to implement that, which I could do, but not sure it's worth it right now.

In addition to displaying in Axis, is it available to pyvcp?

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

More
30 Mar 2022 23:31 #238849 by andypugh

The application is: I have a pyvcp panel that allows the user to set the coordinate system, 
 

We have rather too many VCP options (PyVCP, GladeVCP. QTVCP, QTPyVCP...) and PyVCP is the oldest and weakest. 

If you converted it to one of the others then I think that the Python handler code could poll the linuxcnc.status() and update itself. 
 

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

More
31 Mar 2022 13:02 #238895 by tom.eagan@integrisgp.com
Thank you, I'll look into that. Thanks to all for your help.

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

Time to create page: 0.066 seconds
Powered by Kunena Forum