Gmoccapy - A new screen for linuxcnc

More
16 Jan 2015 06:23 - 16 Jan 2015 06:25 #55053 by Johnny-Don

Hallo Johnny-Don,

I can not follow completely, but why you do not use a hal container and connect the sensitive hal pin to halui.mode.is-auto?

Please post your files, so i can see what to do.

If you want to import gmoccapy to your python file, make sure gmoccapy.py is in your python path

Norbert


Thank you Sir!
Maybe once you see my python file you will pick up on what I am trying to do, please disregard all of the commented out garbage, its just all of my trials and errors that I don't want to repeat.
The python file is being called from my ini file using:
EMBED_TAB_COMMAND = gladevcp -x {XID} -u ./usr/bin/paneljdj.py paneljdj.glade
it's working, as I had the other parts of the python file working before I started attempting this.
What I need to happen is, when "on_rbt_auto_pressed" handler activates from your file, I want my buttons to go NOT sensitive, so they cannot be pressed while the machine is in auto mode.
I know how to do it, I just don't know how I can get the signal from YOUR file... I hope this makes sense.

I have only included my python file, as I have not made any changes to yours.
Last edit: 16 Jan 2015 06:25 by Johnny-Don.

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

More
16 Jan 2015 14:40 #55073 by mariusl
Johnny-Don
You have to rename the python files to .txt or something as the forum does not upload .py files for some reason.

Regards
Marius


www.bluearccnc.com

The following user(s) said Thank You: Johnny-Don

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

More
16 Jan 2015 18:35 - 16 Jan 2015 18:44 #55074 by newbynobi
Hi Johnny-Don,

as Marius sayed, no file is attached to your post.

To do what you are trying, I would suggest:

Take a HAL_HBox or a HAL_Table and place your button in the containers. Both have an IN BIT Pin, controling if the child widgets are sensitive or not.

6.9. Containers: HAL_HBox and HAL_Table

Compared to their Gtk counterparts they have one input BIT pin which controls if their child widgets are sensitive or not. If the pin is low then child widgets are inactive which is the default.
Tip
If you find some part of your GladeVCP application is grayed out (insensitive), see whether a container’s pin is unset.


from GladeVCP docu

Now you only have to add a hal file to your embedded tab

EMBED_TAB_COMMAND = gladevcp -x {XID} -u ./usr/bin/paneljdj.py -H paneljdj.hal paneljdj.glade

and in this file you connect (check syntax!, as I am not on my linux computer and names are unclear):

net auto halui.mode.is_auto => not.in
net notauto not.out => hal_container.in

And it is done.

_______________________________________________________________________

If you realy want to import gmoccapy, you will have to check the following:

Is gmoccapy in your python path: In Ubuntu 10.04 it should be in
/usr/lib/pymodules/python2.6/gmoccapy

But it is not there!!!!

you will find a file named gmoccapy in /usr/bin/

copy this file to /usr/lib/pymodules/python2.6/gmoccapy/ and rename it to be gmoccapy.py

Now try again to import gmoccapy from gmoccapy and report.

All this is untested!!!

Norbert
Last edit: 16 Jan 2015 18:44 by newbynobi.
The following user(s) said Thank You: Johnny-Don

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

More
19 Jan 2015 00:37 #55147 by franstrein
Hallo gmoccapy fans,

I started to use gmoccapy some weeks ago, on my converted Deckel FP1, see also the topic
www.linuxcnc.org/index.php/english/forum...increased-my-latency

All is going very nice, and I like the UI, especially after adding a touch screen to my setup !

I initially ran the "user" version of gmoccapy, v1.3.x with Linux 2.6.5, installed from the ISO and the upgrade.
That works well.

Recently I tried to do a simple upgrade to 1.5.1.1. by getting the sources from git, and copying them to my libraries. According to the instructions in the wiki:

just download

gmoccapy.py
gmoccapy.glade
notification.py

from scr/emc/usr_intf/gmoccapy of git
At git.linuxcnc.org/gitweb?p=linuxcnc.git;a...ntf/gmoccapy;hb=HEAD

2. Then replace the files on your computer, be aware that gmoccapy.py will loose its py. ending

gmoccapy.py goes to /usr/bin as gmoccapy
gmoccapy.glade goes to /usr/share/gmoccapy/
notification.py goes to /usr/share/pyshared//gmoccapy/


And also changing the appropriate permissions, etc.

However when running gmoccapy now, I get a scripting error on the alarm entries, see attachment.
When I change the script on line 2499 to read
if self.log: self._add_alarm_entry( "turtle jog has been set to %s" % widget.get_active() )
the UI works.

I guess I am doing something wrong in the install steps, but not sure what..

Thanks for your help,
Frans
Attachments:

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

More
19 Jan 2015 05:53 - 19 Jan 2015 05:55 #55155 by newbynobi
You did all correct, my fault!
Thanks for reporting the bug, i will corect tomorow!

Norbert

P.S. to update, best is to use 2.6 buildnot repository!
Last edit: 19 Jan 2015 05:55 by newbynobi.

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

More
19 Jan 2015 21:26 - 20 Jan 2015 04:36 #55162 by Johnny-Don

Hi Johnny-Don,

as Marius sayed, no file is attached to your post.

To do what you are trying, I would suggest:

Take a HAL_HBox or a HAL_Table and place your button in the containers. Both have an IN BIT Pin, controling if the child widgets are sensitive or not.

6.9. Containers: HAL_HBox and HAL_Table

Compared to their Gtk counterparts they have one input BIT pin which controls if their child widgets are sensitive or not. If the pin is low then child widgets are inactive which is the default.
Tip
If you find some part of your GladeVCP application is grayed out (insensitive), see whether a container’s pin is unset.


from GladeVCP docu

Now you only have to add a hal file to your embedded tab

EMBED_TAB_COMMAND = gladevcp -x {XID} -u ./usr/bin/paneljdj.py -H paneljdj.hal paneljdj.glade

and in this file you connect (check syntax!, as I am not on my linux computer and names are unclear):

net auto halui.mode.is_auto => not.in
net notauto not.out => hal_container.in

And it is done.

_______________________________________________________________________

If you realy want to import gmoccapy, you will have to check the following:

Is gmoccapy in your python path: In Ubuntu 10.04 it should be in
/usr/lib/pymodules/python2.6/gmoccapy

But it is not there!!!!

you will find a file named gmoccapy in /usr/bin/

copy this file to /usr/lib/pymodules/python2.6/gmoccapy/ and rename it to be gmoccapy.py

Now try again to import gmoccapy from gmoccapy and report.

All this is untested!!!

Norbert


Marius, thank you, I thought maybe it was awaiting approval.

Norbert, thank you a ton, I have not been on this project since last Thursday, but am back on it today. In light of your new info I dont see any point of posting my py file in it's current state. I am going to work out what you have suggested and give it a try. Thanks a bundle for the input, it never even crossed my mind to monitor HALUI pins. I will let all know how it goes.

Edit:
That works perfectly Norbert, thank you a ton! Below is the contents actual paneljdj.hal that I used. I had to re-do some things in my glade file to place all buttons in 'HAL Sensitive Tables' as they are called in Glade Interface Designer. What an amazing feature. I am a novice at Glade as well.

loadrt not count=1
addf not.o servo-thread

net auto halui.mode.is-auto => not.0.in
net notauto not.0.out => paneljdj.wheel_btn_tab

This has saved me many mores hours of painstaking work, I do appreciate it. Until next time, thank you!
Last edit: 20 Jan 2015 04:36 by Johnny-Don. Reason: Udpate

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

More
23 Jan 2015 19:12 #55292 by franstrein
Norbert,

Thanks for your fast response and creation of gmoccapy 1.5.1.4.
That solved indeed my problem.

And the new buttons, turtle and rabbit jogging, are very useful.
For instance last night I was doing deep-drilling, using manual controls with the z-axis jogging button, doing slow drilling and fast retracts with the new button. :)

Keep up the good work and thanks,
Frans

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

More
03 Feb 2015 21:09 #55639 by Swapper

Hi Norbert

I agree that we need some better touch off features. If you want to go that route with touch off then you might as well look at a lot more options like circle centres and many more.
IMHO we need a tab with touch off features and leave the run of the mill stuff as it is. Once you start down this road you will find that even the space at the bottom is not enough for what can be done.

The attached file shows what is a good set of touch off functions. That is why I think we need a tab for this.

You must also consider lathe users.



Would it be hard to dock this probe gui in gmoccapy?

linuxcnc.org/index.php/english/forum/40-...gcgui?start=30#37039
github.com/cnc-club/linuxcnc-features

Then all the "hard" probe stuff is done already.

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

More
03 Feb 2015 21:26 #55643 by andypugh

Would it be hard to dock this probe gui in gmoccapy?


I am wondering if it could be created as a standalone GladeVCP "tab" that could be embedded into any GUI.

I have been thinking of setting up something similar as a tab in my Touchy config.

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

More
07 Feb 2015 09:13 #55762 by anarchos
I use git for revision control on my ngc files, which works pretty well. I was able to hack in a button to gmoccapy in the "load a new file" selection dialogue that performs a "git pull" on the currently viewed directory to ensure the most recent file is being used. It works in a way (git actually executes) but the file list does not update until I go back a directory then back into the git controlled directory. Anyways, as I have no idea what I'm doing it's just a proof of concept, but I think it's pretty cool. Maybe there could be an option in the settings to enable/disable the button, and even customize the command that is being run on the button press? Or even better, only show the button when a .git file is present in the currently viewed directory.
The following user(s) said Thank You: dracozny

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

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