add load bar for tormach pathpilot

More
26 Jan 2022 09:25 - 26 Jan 2022 09:47 #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
Last edit: 26 Jan 2022 09:47 by tivoi.
The following user(s) said Thank You: snowgoer540

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

More
26 Jan 2022 13:02 #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 or Create an account to join the conversation.

More
26 Jan 2022 14:45 #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
The following user(s) said Thank You: snowgoer540

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

More
11 Feb 2022 11:28 #234560 by tivoi
add load bar to pp interface
step 1. build linuxcnc 2.8 to pp OS
step 2. open terminal
source /home/operator/linuxcnc28/scripts/rip-environment
glade-gtk2

step3 open pp mill interface at
./tmc/python/images/tormach_mill_ui.glade
The following user(s) said Thank You: snowgoer540

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

Moderators: cncbasher
Time to create page: 0.060 seconds
Powered by Kunena Forum