Python interface, relative/machine coords [SOLVED]
- TurBoss
-
Topic Author
- Offline
- Premium Member
-
Less
More
- Posts: 135
- Thank you received: 81
30 Apr 2017 20:52 - 07 May 2017 15:24 #92372
by TurBoss
Python interface, relative/machine coords [SOLVED] was created by TurBoss
Hello
How I can know in python if I'm on machine or relative coordinate system?
Thanks
How I can know in python if I'm on machine or relative coordinate system?
Thanks
Last edit: 07 May 2017 15:24 by TurBoss.
Please Log in or Create an account to join the conversation.
- cmorley
- Offline
- Moderator
-
Less
More
- Posts: 7874
- Thank you received: 2128
30 Apr 2017 22:18 #92386
by cmorley
Replied by cmorley on topic Python interface, relative/machine coords
search through the active gcodes for the relative codes (G90/G91)
Unfortunately this can't be relied on in a running program because of the interpreter reading ahead of the actual machine.
There is a test branch to work on this problem hopefully merged in the future.
Oh wait now I think you mean you are referring to the DRO display.
You can't without being plugged into/modifying the program that creates this.
DRO display type is not a system wide setting it's a per screen setting.
linuxcnc has very few ways to communicate between screens.
Are you building a screen or building a gladeVCP panel? What screen are you using?
With more context I may be able to give more ideas.
Chris M
Chris M
Unfortunately this can't be relied on in a running program because of the interpreter reading ahead of the actual machine.
There is a test branch to work on this problem hopefully merged in the future.
Oh wait now I think you mean you are referring to the DRO display.
You can't without being plugged into/modifying the program that creates this.
DRO display type is not a system wide setting it's a per screen setting.
linuxcnc has very few ways to communicate between screens.
Are you building a screen or building a gladeVCP panel? What screen are you using?
With more context I may be able to give more ideas.
Chris M
Chris M
Please Log in or Create an account to join the conversation.
- TurBoss
-
Topic Author
- Offline
- Premium Member
-
Less
More
- Posts: 135
- Thank you received: 81
30 Apr 2017 22:49 - 30 Apr 2017 23:53 #92390
by TurBoss
Replied by TurBoss on topic Python interface, relative/machine coords
I'm building a 7 segment display to show the coordinates
a physical one
a physical one
Last edit: 30 Apr 2017 23:53 by TurBoss.
Please Log in or Create an account to join the conversation.
- cmorley
- Offline
- Moderator
-
Less
More
- Posts: 7874
- Thank you received: 2128
01 May 2017 02:06 #92403
by cmorley
Replied by cmorley on topic Python interface, relative/machine coords
Again without more info I'm guessing.
What screen are you going to use?
Some are easier to hack into then others.
It may require to customize the internal code of the screen, which is a pain if you update.
but all possible.
Chris M
What screen are you going to use?
Some are easier to hack into then others.
It may require to customize the internal code of the screen, which is a pain if you update.
but all possible.
Chris M
Please Log in or Create an account to join the conversation.
- TurBoss
-
Topic Author
- Offline
- Premium Member
-
Less
More
- Posts: 135
- Thank you received: 81
01 May 2017 02:11 #92404
by TurBoss
Replied by TurBoss on topic Python interface, relative/machine coords
The screen is a series of 7 degment displays using max7219
the controller board is a teensy ++ 2.0
Currently I'm using Axis Gui
and using linuxcnc 2.8pre from github repos updated daily
the controller board is a teensy ++ 2.0
Currently I'm using Axis Gui
and using linuxcnc 2.8pre from github repos updated daily
Please Log in or Create an account to join the conversation.
- cmorley
- Offline
- Moderator
-
Less
More
- Posts: 7874
- Thank you received: 2128
01 May 2017 05:03 - 01 May 2017 13:05 #92407
by cmorley
Replied by cmorley on topic Python interface, relative/machine coords
using axis's ./axisrc file you could tap into the setting of coordinates.
for instance adding:
Will print test when you toggle # (coordinate display)
unfortunately it doesn't if you select using the menu and mouse.
Modifying AXIS is mostly undocumented and requires detective-ness and patients.
Chris M
for instance adding:
def test(self):
print 'hi'
root_window.bind("#", test)
Will print test when you toggle # (coordinate display)
unfortunately it doesn't if you select using the menu and mouse.
Modifying AXIS is mostly undocumented and requires detective-ness and patients.
Chris M
Last edit: 01 May 2017 13:05 by cmorley. Reason: miss spelled
Please Log in or Create an account to join the conversation.
- TurBoss
-
Topic Author
- Offline
- Premium Member
-
Less
More
- Posts: 135
- Thank you received: 81
01 May 2017 08:35 #92412
by TurBoss
Replied by TurBoss on topic Python interface, relative/machine coords
Ok
so there is no way to get it from a python component?
Thank you so much
so there is no way to get it from a python component?
Thank you so much
Please Log in or Create an account to join the conversation.
- cmorley
- Offline
- Moderator
-
Less
More
- Posts: 7874
- Thank you received: 2128
01 May 2017 13:05 #92441
by cmorley
Replied by cmorley on topic Python interface, relative/machine coords
Well AXIS is a python program but i guess you mean a separate program - No
Please Log in or Create an account to join the conversation.
- bevins
-
- Offline
- Platinum Member
-
Less
More
- Posts: 1943
- Thank you received: 336
07 May 2017 12:45 #92773
by bevins
Replied by bevins on topic Python interface, relative/machine coords
g5x_index
(returns string) - currently active coordinate system, G54=0, G55=1 etc.
(returns string) - currently active coordinate system, G54=0, G55=1 etc.
Please Log in or Create an account to join the conversation.
- TurBoss
-
Topic Author
- Offline
- Premium Member
-
Less
More
- Posts: 135
- Thank you received: 81
07 May 2017 15:23 #92779
by TurBoss
Replied by TurBoss on topic Python interface, relative/machine coords
Thanks cmorley & bevins
I ended doing this:
pytrhon:
gist.github.com/TurBoss/9df83b5709add77760d0a1e8380f27b7
Teensy:
gist.github.com/TurBoss/71659a3829c2c3fef0c21758fe92a803
as I only use G54 for now i'm done
Thanks again
I ended doing this:
pytrhon:
gist.github.com/TurBoss/9df83b5709add77760d0a1e8380f27b7
Teensy:
gist.github.com/TurBoss/71659a3829c2c3fef0c21758fe92a803
as I only use G54 for now i'm done
Thanks again
Please Log in or Create an account to join the conversation.
Time to create page: 0.080 seconds