Coordinate System display box

More
04 May 2017 14:41 #92645 by beltramidave
beltramidave created the topic: Coordinate System display box
I would like to display the value in #5220 in my Pyvcp panel. How would I go about that? Also, Since #5220 is going to return a value of 1-9, how go I convert that to 1 = G54, 2 = G55 and so on?
Thanks!
More
05 May 2017 02:32 #92679 by cmorley
cmorley replied the topic: Coordinate System display box
Don't use pyvcp use gladevcp as it's oh so much more powerful.
You could use pyvcp's multilabel widget plus some HAL code to convert HAL intergers to text,
but I don't think you can get #5220 into a HAL pin.
Maybe Andy knows a way..

Chris M
More
05 May 2017 05:09 #92682 by Todd Zuercher
Todd Zuercher replied the topic: Coordinate System display box
I don't think there is an easy way to do this with PYVCP but it isn't too hard with Glade.

If you use GladeVCP you can use the python interface to directly read the status of LInuxcnc
linuxcnc.org/docs/2.6/html/common/python...ding_linuxcnc_status
the stat you'd use would be g5x_index
But you would probably need to write a little bit of python code to use it.
This is how the newer Glade based GUIs like Gmoccapy do it.
I've muddled my way through doing some things like this, but please don't ask me to explain exactly how to it.
There are some good GladeVCP tutorials for Linuxcnc out there.
More
05 May 2017 10:29 #92689 by beltramidave
beltramidave replied the topic: Coordinate System display box
Looks like I need to figure out how to use Glade for starters. Thanks
Time to create page: 0.230 seconds
Powered by Kunena Forum