Playing around with Pathpilot GUI

More
17 Jan 2017 04:19 #85890 by smgvbest
smgvbest created the topic: Playing around with Pathpilot GUI
Spent some time learning how the gui works and I am getting a better idea so I made some minor changes to it

I changed the led for the Door, I'm color blind and can not tell the difference between the yellow and green led so I made it green and black, That was first change.
I added a second colum for Flood, Mist, Collet, estop and external lighting. (flood is working)
I also change the label on the HOME to indicate when it is homing and added individual leds for X+/- and z+/- also working
so when HOMING the HOME LED comes on, then when it trips the limit switching the one that is hit is lit up.
Finally changed USBIO labels to 7i76 since thats my source of I/Os
oh, and made the version number a bit larger and i'm doing this to the V1.9.8 Version
I have more work to do but it's fun learning the gui and python

I want to add a Lighting Button on the main page but there really isn't room for one. I could add it to the Settings page but that makes no sense really.




Anyway, thought I would share my adventure in GUI editing.

Oh, since technically pathpilot is opensource, I should be able to share when done, I'm leaving comments in the code so mark what i've changed

also, i had to move the limit switch stuff to the postgui because I couldn't figure out how to use a signal inside the GUI. does anyone know if you can use a signal inside the gui or are you limited to HAL PINS?
Attachments:
More
17 Jan 2017 08:39 #85896 by racedirector
racedirector replied the topic: Playing around with Pathpilot GUI
Nice, well done! I have been dying to make the offset number more visible, switching from G54 to G55 etc has caught me out a few too many times.

Might be time to get this onto my other machine and have a play with the gui and code.....
More
17 Jan 2017 20:22 #85994 by Jedi
Jedi replied the topic: Playing around with Pathpilot GUI
Nice! :)
More
19 Jan 2017 23:18 - 19 Jan 2017 23:23 #86209 by smgvbest
smgvbest replied the topic: Playing around with Pathpilot GUI
@racedirector
is this that you mean for the G54?
Attachments:
Last Edit: 19 Jan 2017 23:23 by smgvbest.
More
20 Jan 2017 08:56 #86230 by racedirector
racedirector replied the topic: Playing around with Pathpilot GUI
Sort of, I was thinking more of having a seperate line for the current offset. Probable easier said than done but I haven't had a chance to play with it. Your solution is better than the original though. Space on the lower screen is an issue when you have a router using X,Y,Z and A though
More
21 Jan 2017 16:25 #86370 by smgvbest
smgvbest replied the topic: Playing around with Pathpilot GUI
Yeh, space is a bit constrained there
I tried like putting a OFFET just above Status, it worked but I needed to figure out how to remove the current offset from the Status line otherwise it really looks redundant

Here's some of my latest playing around
Modified the Gaurd/Door Label to turn RED when it is Open, Makes the unsafe condition clearer
Modified the Home Switch to Say Homing while it's Homing with a Yellow LED, When Both X/Y are Homed the LED is Green and the Label Says HOMED.
Modified MACHINE OK to also Go RED and Say MACHINE NOT OK when the Machine Check is in error
Added a [CUSTOM] to the INI
with a way to change the Labels for the Machine Name and USBIO Label
[CUSTOM]
MACHINE_LABEL=Grizzly G0602 Lathe
MACHINE_IO_LABEL=7i76

you can see both on the screen shots, if they are not in the INI it will use the defaults in pathpilot
Shifted things around a bit to put labels above the IO LED for P1-P4 just so there's no confusion with the X+/- and Y+/- labels
Flood and Collet LEDS working
Not sure yet how to hook up the Mist LED
Need to tie into the ESTOP logic
Need to Add a Lighting Button Somewhere which would turn on/off the lighting inside the enclosure (or any lighting you hooked up)




This is mostly a learning experience for me on Glade, Python and Pathpilots UI
Really does help understand it.

One thing I would like to work out is having a Spindle Orientation DRO show 0 - 360 degrees of rotation,
Curious of anyone else thinks that would be useful?
Attachments:
The following user(s) said Thank You: racedirector
More
25 Jan 2017 03:14 #86589 by smgvbest
smgvbest replied the topic: Playing around with Pathpilot GUI
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
Attachments:
The following user(s) said Thank You: Contract_Pilot
More
26 Jan 2017 18:58 - 26 Jan 2017 18:59 #86731 by smgvbest
smgvbest replied the topic: Playing around with Pathpilot GUI
Lesson Learned
Had a setback in working on this. it was working last night, went to fire up pathpilot and get
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
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: 26 Jan 2017 18:59 by smgvbest. Reason: I guess you can't embed things like bold withing a code block.
Moderators: cncbasher
Time to create page: 0.258 seconds
Powered by Kunena Forum