Playing around with Pathpilot GUI

More
9 years 9 months ago #86589 by smgvbest
I decided to bite the bullet on selecting between Flood or Mist Coolant. So I did up new buttons for Flood and Mist, added the code to support mist (for flood just changed the images).

Here's the latest version of of the lathe control screen



you can see a few other cosmetic changes.

Next to figure out where to add a Light Button so you can control any light source such as the one inside the lathes enclosure (maybe use the Y Axis Ref button for that and I don't need rapid turn features)
Also I'm thinking I might use the Y axis for a Spindle Orientation DRO. this is normally used for rapid turn also
The following user(s) said Thank You: Rhine_Labs

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

More
9 years 9 months ago - 9 years 9 months ago #86731 by smgvbest
Lesson Learned
Had a setback in working on this. it was working last night, went to fire up pathpilot and get
Code:
Traceback (most recent call last): File "/home/operator/tmc/python/tormach_lathe_ui.py", line 7340, in <module> UI = lathe() File "/home/operator/tmc/python/tormach_lathe_ui.py", line 894, in __init__ self.setup_gcode_marks() File "/home/operator/v1.9.8/python/ui_common.py", line 738, in setup_gcode_marks self.sourceview.set_buffer(self.gcodelisting_buffer) AttributeError: 'NoneType' object has no attribute 'set_buffer' Shutting down and cleaning up LinuxCNC...

I did a diff on ui_common.py to the original 1.9.8 version and they match, I also compared all *.py in ~/python to the original and only the changes I made where there. took a look at the glade source. after searching I found the problem.

looking at ui_common.py
Code:
self.sourceview = self.builder.get_object("gcode_sourceview") self.gcodelisting_buffer = gtksourceview2.Buffer() self.sourceview.set_buffer(self.gcodelisting_buffer)

Well there are no reference to gcode_sourceview in the glade file.
checking as to why I found I had restarted glade after starting a new session. I had lost the rip_environment and when I saved the glade file it removed that entire section when it saved. Oye!

So I restored that section and the gui is back up and running.

I wanted to add Spindle Orientation to the gui and I've decided what I'll do is use the Y-DRO for that. I've added a "Use Y Axis for C Axis" to the settings tab. if checked I'll change the Label on Y to C1 and unhide the Label, DRO and LED. then the Y-DRO will display the current angle of the C Axis (Spindle). Of course you'll need an encoder on the spindle to work. and it will be orientate to the Index Pulse. so that it resets after 360. on mine I have a 1440 PPR encoder (that is the 4x count) which is about .25 deg per count. So I'll display something like 123.50 in the DRO. this will be the biggest GUI change yet and may take a bit. especially sicne I'm putting a Rostock MAX 3d printer together also. :)
Last edit: 9 years 9 months ago by smgvbest. Reason: I guess you can't embed things like bold withing a code block.

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

More
9 years 5 months ago #92608 by Rhine_Labs
Looking good..

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

More
9 years 1 week ago #100620 by DaOne
Any chance at sharing your "tormach_lathe_ui.py" and "tormach_lathe_ui.glade"? I am doing much the same things and have made headway but being able to see where you made changes would sure be helpful. I am playing with v1.9.13 but I am sure its done the same way.

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

More
9 years 1 week ago #100621 by smgvbest
it's not finished code nor pretty but i'll share as long as thats known. I'll publish it once I'm happy with it. in the mean time send me your email and I'll send what I have to you.

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

More
9 years 1 week ago #100622 by DaOne
xgenmods@gmail.com

Thank you and I fully understand. I just wanna see if the way I am doing this correlates with yours I am not fluent with python so I am learning as I go.

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

Time to create page: 0.122 seconds
Powered by Kunena Forum