Gmoccapy - A new screen for linuxcnc

More
22 Mar 2017 09:30 #90052 by newbynobi
Hallo,

it should be possible, as gmoccapy uses the hal_gremlin glade widget.
Just look at the code of /lib/python/gladevcp/hal_gremlin.py

Within gmoccapy the widget is called: self.widgets.gremlin

Norbert

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

More
23 Mar 2017 01:18 #90097 by Patrik T
OK, thanks, but how do I get a reference to "self" in the self.widgets.gremlin?
When I write "self" it refers to my class instance. I need to refer to the Gmoccapy class instance.

Naively I would want something like:

self.gmoccapy = self.top_level.get_parent() # I need a reference to the Gmoccapy python class / handler.
self.gmoccapy.widgets.gremlin.clear()

Patrik

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

More
23 Mar 2017 18:37 #90140 by newbynobi
You are right. Have you in your code:

from gmoccapy import gmoccapy

after that you should be able to do something like:

gmoccapy.widgets.gremlin.clear()

All out of memory, I am not on my native computer.

Norbert

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

More
24 Mar 2017 01:32 #90169 by Patrik T
Cool, that is what I am asking for. But I cant get it to work.
May I ask you to look at it again when you are back at your computer, please.

Thanks again
Patrik

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

More
24 Mar 2017 15:39 #90217 by newbynobi
Of course, please push your config with your handler file, so I have a testing environment.

Norbert

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

More
27 Mar 2017 14:54 #90374 by dhanger
Hi Norbert-

Comments and a question--I have been using LinuxCNC with Axis for several years on a router I built, I have just recently converted a DM4400 mill to LinuxCNC, added a touch screen, and started using Gmoccapy for the first time. Thank you very much for all your effort on this, I love it. I attached a picture of the machine set up in my garage.

My question is, while using Axis it automatically included a check box for my spindle brake, but that is not available in the default setup for Gmoccapy (or else I just can't see it). I am assuming I will need to add that myself, but I don't know how it's done. Can you point me in the right direction for how to do that please, I would appreciate it. I need to be able to disable the brake while doing setups on the machine.

Dan

Attachments:

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

More
27 Mar 2017 17:17 - 27 Mar 2017 17:18 #90382 by newbynobi
Hallo Dan,

very nice machine and nice GUI B)

Of course I will help you as much as I can.

I would recommend to use a custom embedded panel for that, and place that one in
box_custom_4 (will introduce your glade file right of spindle_frame)

you can find more documentation here

Just use glade to make your panel (i.e. spindle_brake.glade) with the needed hal widgets and include it like so:
gladevcp -x {XID} -H spindle_brake.hal spindle_brake.glade

You need to do the corresponding hal connections in spindle_brake.hal

Norbert
Last edit: 27 Mar 2017 17:18 by newbynobi.

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

More
27 Mar 2017 23:58 #90411 by dhanger
Okay, I see I have some reading and testing to do. I haven't done very much 'under the hood' work with LinuxCNC, but I've already read a lot so I have some understanding. I'll shout if I run into any problems, thanks.

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

More
28 Mar 2017 04:27 #90417 by Patrik T
Hello, thanks for your support.
Here are files of a config. I had to add some .txt extensions to be able to upload them.
There is a ui panel with buttons and callbacks, and a python handler. The callbacks are connected and ready to use. The problem that I want help with is to get them to clear, pan and zoom in the Gmoccapy gremln preview. There is also a button to reload the program in Gmoccapy that I need help with.
I do off course not expect you to do all the buttons, just help with one that has contact with the gremlin and the one that reloads the program.

Best regards
Patrik

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

More
28 Mar 2017 04:31 #90418 by Patrik T
I am not sure the upload was successful so I try it again.
Attachments:

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

Moderators: newbynobiHansU
Time to create page: 0.162 seconds
Powered by Kunena Forum