- Posts: 86
- Thank you received: 0
Switch between AXIS tabs with GladeVCP button?
What, exactly, is the master branch?!
Where would I find details about getting it, and what downside (if any) am I looking at if I do so?
I don't recall seeing anything about it on the usual sites, which I suppose might mean that it's something I had better avoid!!!!
regards,
Patrick
Please Log in to join the conversation.
Just wondering.
PKF
Please Log in to join the conversation.
pferrick wrote: OK, a quick search of the forum turns up plenty of answers to the middle question, ie. installing...but not too much about why one might run it.
Just wondering.
I guess you would use master if you had a requirement that was not met by 2.7 ...
Master may not be stable as it is being altered/added to frequently and some would say not to use it in production machines while some use it all the time and have done so for quite some time. I use master on a mill and two lathes and am currently (slowly) making a plasma cutting table that will also use master.
Like most things, I think it just comes down to personal choice.
Probably the best way to try it is to clone the git repo and build a run in place version, that way you can leave your original 2.7 installation as is. Just keep a copy of your linuxcnc folder (all your configs) somewhere as a backup. When you first run an existing 2.7 config with master it will perform an update (if you answer in the affirmative) to the config files and will also make a backup copy of the originals.
Building LinuxCNC
Cheers, Phill.
Please Log in to join the conversation.
Thanks again for the expert advice. Things are humming along nicely (well, with the exception of my deleting a critical RTAI file that I have to figure out how to resurrect! But that's another story...)
A couple of other (low priority) questions occur to me regarding switching AXIS tabs "remotely":
1. Is it true that in master, I might be able to go beyond the 4-tab limit imposed by the timing? It's working great with 4 buttons / 4 tabs but ideally I'd like to have 8 tabs and 8 buttons...! I'm wondering if perhaps master goes about polling differently which might help with this?
2. Is there a any way (in master) that I might switch tabs via GladeVCP other than in .axisrc? Again, not critical but it would be great if when, for example I loaded a file with an IconFileView (on a tab) it also raised the backplot tab.
I'm leaning toward trying master alongside 2.7, and I guess I'm looking for more reasons to take the plunge...!
tnx,
Patrick
Please Log in to join the conversation.
In master i did eight tabs but I don't know the limit.
The difference is master uses the python hal library while in 2.7 we need to call the command line hal through Popen which is much slower...
I don't know if GladeVCP can access the tcl/tk part of Axis, Chris M would be the better person to ask about that.
The .axisrc file is read by all configs, if you use multiple configs on one machine (or even just one) you can use a USER_COMMAND_FILE ( see @ the end of the DISPLAY section ) rather than .axisrc and then keep a file for each config in the config directory.
Cheers, Phill.
Please Log in to join the conversation.
With much help from Phill I've managed to get things arranged so that I can switch AXIS tabs with a GladeVCP button, with the following in my .axisrc:
which works great. I'm wondering if you know of any way to raise the Preview tab from python code attached to various user tabs? I tried adding that last root_window call to file.py (which goes along with my 'File Open' tab) like this:
but that didn't work, and produced this error:
Traceback (most recent call last):
File "./Python/file.py", line 26, in on_file_selected
root_window.tk.call('.pane.top.right','raise','user_2')
NameError: global name 'root_window' is not defined
It's certainly not critical that the Preview tab be raised automatically after choosing a g-code file, but it would be very convenient!
Thanks,
Patrick
Please Log in to join the conversation.
You could make a HAL pin to request tab change, and have AXIS monitor it.
A HAL IO pin is probably the easiest to use.
Have Gladevcp set it true to change to the plot tab when the file is loaded.
have AXIS monitor it - if it's true set the tab visible and then set the pin false again.
hmm or guessing by your code - you have a Gladevcp button for plot tab already - you could 'press' the button programmatically when the file loads.
I'll get back to you with sample code for pressing buttons programmatically later.
Chris M
Please Log in to join the conversation.
Two completely separate processes. Correct me if I'm wrong about that please.
However, I don't believe there's anything in file.py that raises the tab containing file.glade (embedded with several others alongside AXIS via the ini file). Ahh, so if we can get any old GladeVCP button to fire off the same signal that the 'Plot' button does (which triggers the code in .axisrc to raise the plot tab)...voila. Y'know, I think this is really starting to sink in!
Thanks again.
Patrick
Please Log in to join the conversation.
Please Log in to join the conversation.
Absolutely rightpferrick wrote: Hey- Those are two good ideas, Chris. I think I get what you mean about .axisrc- it's a chunk of python code that AXIS runs, whereas file.py is python code run by GladeVCP.
Two completely separate processes. Correct me if I'm wrong about that please.
pferrick wrote: However, I don't believe there's anything in file.py that raises the tab containing file.glade (embedded with several others alongside AXIS via the ini file). Ahh, so if we can get any old GladeVCP button to fire off the same signal that the 'Plot' button does (which triggers the code in .axisrc to raise the plot tab)...voila. Y'know, I think this is really starting to sink in!
This code in axisrc:
The code i posted shows how to click that button programmatically, which will change the HAL pin, which should make .axisrc change the plot.
If I assumed everything correctly
Please Log in to join the conversation.
