PathPilot and XHC-HB04 - work?

More
30 Dec 2016 02:14 #84891 by racedirector
Found this in the mill py file and one of the hal files.....will look into how to connect these to the XHC

From the .py file:
# Shuttle
        # force mode switch - needs MODE_MANUAL for jogging to function
        if self.hal['jog-axis-x-enabled'] or self.hal['jog-axis-y-enabled'] or self.hal['jog-axis-z-enabled'] or self.hal['jog-axis-a-enabled']:
            if (self.hal['jog-counts'] != self.prev_hal_jog_counts) or (self.hal['jog-ring-speed-signed'] != 0.0):
                self.ensure_mode(linuxcnc.MODE_MANUAL)

From the hal file:
# this connects the GUI to the signals from the milljogtranslator/shuttlexpress
net sxp.xen-button            => tormach.jog-axis-x-enabled
net sxp.yen-button            => tormach.jog-axis-y-enabled
net sxp.zen-button            => tormach.jog-axis-z-enabled
net sxp.aen-button            => tormach.jog-axis-a-enabled
net sxp.step-button           => tormach.jog-step-button
net sxp.jog-ring-speed-signed => tormach.jog-ring-speed-signed
net sxp.selected-axis         => tormach.jog-ring-selected-axis
net sxp.counts-smoothed       => tormach.jog-counts
net sxp.gui_step_index        <= tormach.jog-gui-step-index
net sxp.is_metric             <= tormach.jog-is-metric

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

More
03 Jan 2017 04:02 #85130 by RandyJ
Here is a start. There are a few major problems that make the HB04 somewhat limited.

# Relative position LCD
net pos-rel-x halui.axis.0.pos-relative => xhc-hb04.x.pos-relative
net pos-rel-y halui.axis.1.pos-relative => xhc-hb04.y.pos-relative
net pos-rel-z halui.axis.2.pos-relative => xhc-hb04.z.pos-relative
net pos-rel-a halui.axis.3.pos-relative => xhc-hb04.a.pos-relative

# Jog wheel and axis selection button in XHB-04.hal
net jog-x axis.0.jog-enable <= xhc-hb04.jog.enable-x
net jog-y axis.1.jog-enable <= xhc-hb04.jog.enable-y
net jog-z axis.2.jog-enable <= xhc-hb04.jog.enable-z
# in the postgui hal
net jog-x => tormach.jog-axis-x-enabled
net jog-y => tormach.jog-axis-y-enabled
net jog-z => tormach.jog-axis-z-enabled

# in XHC-HB04,hal jog wheel works.
net jog-scale xhc-hb04.jog.scale => axis.0.jog-scale axis.1.jog-scale axis.2.jog-scale
net jog-counts xhc-hb04.jog.counts => axis.0.jog-counts axis.1.jog-counts
net jog-counts-neg xhc-hb04.jog.counts-neg => axis.2.jog-counts
net size-up xhc-hb04.button-step => xhc-hb04.stepsize-up


Problems at first glance:
1. Tormach hal has no output to show that you are in G21 (mm). So you cant change the display
2. That is OK, because the V06 driver that I have of XHC-HB04 also doesn't bring out the is-metric pin. Some work needs to be done to that driver.
3. There is no simple way to do the math for DTG. The tormach and halui hals do not give you this value. Meth is not allowed (something like this).
net pos-dtg-x (halui.axis.0.pos-command - halui.axis.0.pos-feedback) => xhc-hb04.x.pos-relative
So for these reasons we are stuck with inches.
4. Tormach also stripped the halui.mdi-commandXX, so other functions are also limited.

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

More
04 Jan 2017 12:39 - 04 Jan 2017 12:39 #85192 by racedirector
Thanks Randy

I did have most of that in my setup and figured the G21 stuff was impossible.


4. Tormach also stripped the halui.mdi-commandXX, so other functions are also limited.



Surprisingly enough this does work if you just put [HALUI] in the ini file. I didn't actually get far enough to do exhaustive tests as PathPilot failed me on a very large 3D project, it locked up entirely with a 200,000+ line gcode file killing an expensive piece of timber. I am currently building a machine with GMoccapy as it did not fail during a sim run with the same file, if that works in real life then PathPilot will no longer be my goto screen.....
Last edit: 04 Jan 2017 12:39 by racedirector.

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

More
04 Jan 2017 13:58 #85205 by andypugh

3. There is no simple way to do the math for DTG. The tormach and halui hals do not give you this value. Meth is not allowed (something like this).
net pos-dtg-x (halui.axis.0.pos-command - halui.axis.0.pos-feedback) => xhc-hb04.x.pos-relative
So for these reasons we are stuck with inches.


You can do maths in HAL, but you need to set it up with a combination of sum2 and scale components (and possibly invert ) (subtraction is sum2 with a negative gain on one input)

4. Tormach also stripped the halui.mdi-commandXX, so other functions are also limited.

halui is an optional component even in standard linuxcnc.
If adding it to the INI the the usual way doesn't work, then you should be able to load it in the HAL with
loadusr halui
linuxcnc.org/docs/2.7/html/man/man1/halui.1.html

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

More
22 Mar 2018 14:13 #107721 by ymilord
Have you made any progress on this? Inquiring minds would like to know :P

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

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