Axis lathe - showing velocity and DTG

More
13 Jan 2018 05:09 #104384 by kentavv
Hi. In lathe mode (I've not checked mill mode), when I have Show Offsets enabled or am on the DRO tab, DTG is shown for the X and Z axes, but axis velocity is not shown. With Show Offsets not enabled, DTG and velocity are shown but not for each axis.

Is this the correct behavior (in case I've messed something up) and is there a way I can add axis velocities when Show Offsets is enabled and on the DRO page?

Thank you, Kent

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

More
13 Jan 2018 16:06 #104389 by skunkworks
That is a known bug.

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

More
13 Jan 2018 17:11 #104391 by kentavv
OK, would fixing the bug be a reasonable challenge for a newbie or are there major obstacles?

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

More
14 Jan 2018 02:31 - 14 Jan 2018 02:40 #104411 by Todd Zuercher
Considering it has been that way for longer than I have used Linuxcnc (more than 8 years) it probably is not an easy fix.
Last edit: 14 Jan 2018 02:40 by Todd Zuercher.

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

More
14 Jan 2018 03:01 #104413 by kentavv
Thanks Todd, that's too bad. It would be nice to find some simple task to tackle.

In case it's of some help to the next person, here's how I hacked it in for the time being. Seems to work with jogs and feed overrides, but not as nicely integrated as with mill mode.

custom_postgui.hal
loadrt scale names=scale.x-vel,scale.z-vel
addf scale.x-vel servo-thread
addf scale.z-vel servo-thread

setp scale.x-vel.gain 60
setp scale.z-vel.gain 60

net x-velocity-ups axis.0.joint-vel-cmd scale.x-vel.in
net z-velocity-ups axis.2.joint-vel-cmd scale.z-vel.in
net x-velocity-upm scale.x-vel.out pyvcp.x-velocity-upm
net z-velocity-upm scale.z-vel.out pyvcp.z-velocity-upm

custompanel.xml
                <hbox>
                        <label>
                                <text>"X Velocity"</text>
                                <font>("Helvetica", 20)</font>
                        </label>

                        <number>
                                <font>("Helvetica", 20)</font>
                                <halpin>"x-velocity-upm"</halpin>
                                <format>"+3.2f"</format>
                        </number>
                </hbox>

                <hbox>
                        <label>
                                <text>"Z Velocity"</text>
                                <font>("Helvetica", 20)</font>
                        </label>

                        <number>
                                <font>("Helvetica", 20)</font>
                                <halpin>"z-velocity-upm"</halpin>
                                <format>"+3.2f"</format>
                        </number>
                </hbox>

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

More
16 Jan 2018 19:39 #104562 by cmorley
This is actually a one line change in glcanon.py to get velocity to shown in the offsets page.
Is there a bug tracker for this problem? never heard of it before.

some where near line 1576:
            if self.get_show_machine_speed():
                posstrs.append(format % ("Vel", spd))
                droposstrs.append(diaformat % ("Vel", spd)) # <-- add this line

If someome one could confirm the behavior I can push the fix

Chris M
The following user(s) said Thank You: kentavv

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

More
23 Jan 2018 05:57 #104873 by kentavv
Hi Chris, I tried your suggestion and it worked perfectly. Looks much more like the mill mode does. I also learned about glcanon.py, which looks very interesting. Is it OK to modify this directly to add new functionality or is a there a recommended way that's safe from being overwritten during an upgrade? I have been using custompanel.xml and custom_postgui.hal. Thank you, Kent

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

More
23 Jan 2018 06:35 - 23 Jan 2018 06:36 #104874 by cmorley
This file would be overwritten on upgrades.
The typical way to maintain customizations of this type is to use a git clone of linuxcnc, create your own branch and run it Run-In-Place (RIP) - this is exactly what developers do.
In this way you can control what gets changed and when.

In this case when I get some time I will look to push the fix.
Chris M
Last edit: 23 Jan 2018 06:36 by cmorley.

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

More
24 Jan 2018 02:33 #104929 by cmorley
I pushed the fix to master branch.

Chris M

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

Time to create page: 0.150 seconds
Powered by Kunena Forum