add load bar for tormach pathpilot

More
4 years 9 months ago #233158 by tivoi

i use mesa encoder input mode speed for vfd feeback ( voltage to fequency)

tormach_mesa_mill.hal
setp hm2_[HOSTMOT2](BOARD).0.encoder.01.counter-mode 1
net  analog-in-00 motion.analog-in-00 <= hm2_[HOSTMOT2](BOARD).0.encoder.01.velocity 

postgui_tormach_mill.hal
net  analog-in-00 => tormach.spindle-load-meter 

add to tormach_mill_ui.py

import gladevcp.makepins

   at     #
        # HAL setup.  Pins/signals must be connected in POSTGUI halfile
        #
        self.hal.newpin("spindle-load-meter", hal.HAL_FLOAT, hal.HAL_IN)

at           # spindle rpm dro
            if not self.dro_list.masked:
                if self.door_sw_enabled and self.door_sw_status and self.hal and (self.s_word > self.enc_open_door_max_rpm):
                    self.dro_list.set_text(self.dro_short_format % abs(self.hal))
                    
                else:
                    self.dro_list.set_text(self.dro_short_format % abs(self.s_word))
                    self.meter.set_value(abs(self.hal))

at             # lock the notebook
            if not self.notebook_locked:
                self.hide_notebook_tabs()
                self.notebook_locked = True
            # if we're running a program, use S value from HAL spindle-speed-out and F value from status.current_vel
            self.rpm = int(self.hal["spindle-speed-out"])
            feed_per_min = self.status.current_vel * 60 * self.get_linear_scale()
            self.dro_list.set_text(self.dro_short_format % abs(self.rpm))
            self.dro_list.set_text(self.dro_medium_format % feed_per_min)
            self.meter.set_value(abs(self.hal))
            self.elapsed_time_label.set_text('%02d:%02d:%02d' % (self.hal, self.hal, self.hal))

thanks and regards

Please Log in to join the conversation.

More
4 years 9 months ago #233167 by snowgoer540
This is pretty neat!  Thanks for sharing.

Would you mind sharing the steps you use to make the edits to the GUI (GladeVCP)?  I know that is something a lot of people on here struggle with.  

I would really like to change the Max Vel. slider to Max Rapid, which I reckon I need to edit the GUI to do.  

Please Log in to join the conversation.

More
4 years 9 months ago #233173 by tivoi

This is pretty neat!  Thanks for sharing.

Would you mind sharing the steps you use to make the edits to the GUI (GladeVCP)?  I know that is something a lot of people on here struggle with.  

I would really like to change the Max Vel. slider to Max Rapid, which I reckon I need to edit the GUI to do.  
 
okies, let me some picture guide you use glade gtk to add gladvcp to pathpilot interface
i use vel for simulation speed respond of slider bar

i use it for view spindle power , vfd load > 0-10v > 10hz-10khz > mesa encoder velocity > silder bar

Please Log in to join the conversation.

More
4 years 8 months ago #234560 by tivoi
add load bar to pp interface
step 1. build linuxcnc 2.8 to pp OS , run in place
step 2 copy file from lib/python/gladevcp ( in linuxcnc 2.8 folder ) to /usr/share/glade3 ( file py and pyc to /usr/share/glade3/catalogs, png to /usr/share/glade3/pixmaps ) 
step 2. open terminal
source /home/operator/linuxcnc28/scripts/rip-environment
glade-gtk2

step3 open pp mill interface then edit it
./tmc/python/images/tormach_mill_ui.glade

best regards

Please Log in to join the conversation.

More
3 years 10 months ago #258175 by Dorro1971
sorry but...



might sound like a silly question but,......I'm a bit silly!.....

I managed update a version of pathpilot (that I don't connect to my machines)...and after "sudo apt get update" PP won't run anyway but..,I can now use halcopile to enable me to modify comps and then copy them over to my running version of PP so I'm not that daft.....
but I'm not sure what "build linuxcnc 2.8 to pp OS" means?....
Does it mean build a fresh linuxcnc(2.8) but to the same version of linux as PP? and use it as a source?..

thanks for your time..

Ian

 

Please Log in to join the conversation.

Time to create page: 0.084 seconds
Powered by Kunena Forum