XHC-HB04 wireless MPG pendant HAL module

More
04 Mar 2015 07:28 #56448 by Robban
Renamed the files when i tried to get the pendant working but didnt notice the reference in the ini to the old file. will test again when i get to the lathe.

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

More
04 Mar 2015 07:32 #56449 by dgarrett
also, the file named monitor_xhc-hb04.tcl must be executable
so copy with cp -p
or use chmod on the copied file , for instance:
chmod +x filename

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

More
04 Mar 2015 07:40 #56450 by Robban
Did the changes you suggested and started it on my virtual machine and now it loads :) , will try on my lathe later. It just complains that it cant find the usb stick which i dont have here.

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

More
04 Mar 2015 22:52 - 04 Mar 2015 22:53 #56463 by Robban
Got it to work on the lathe computer but still have some issues.
The y axis on the pendant controls the z axis except when zeroing the z
Last edit: 04 Mar 2015 22:53 by Robban.

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

More
05 Mar 2015 07:12 #56488 by dgarrett

Got it to work on the lathe computer but still have some issues.
The y axis on the pendant controls the z axis except when zeroing the x


In LinuxCNC_2.6, the xhc-hb04.tcl script can connect up to four
axes from the set of nine axes suported (XYZABCUVW).
To do this, it assigns the items specified by
[XHC_HB04_CONFIG]coords =
in the order that they appear to the switch/display labels
of the pendant in the order of the labels (XYZA). So for a
lathe with coords = x z, the x axis will be assigned to
switch/display label x, the z axis will be assigned
to switch/display label y. You can probably use coords = x y z
to align with the switches (and ignore the y selector
and related settings) if you have [TRAJ]AXES=3 and
stanzas for [AXIS_0] and [AXIS_2] (the usual lathe setup)

I have updated the LinuxCNC_2.7 branch to improve this behavior
so that axes XYZA are always assigned to the correspondingly labeled
switch/display on the pendant. However, use of coordinates BCUVW
will necessitate assignments to the first available switch/display
label that is not in conflict with other assignments for XYZA.

Ref: git.linuxcnc.org/gitweb?p=linuxcnc.git;a...0b18aa923849227a0d77

You can also wait for 2.7, use a buildbot deb for 2.7 (after
today), or wire up the xhc-hb04 component using your own hal
wiring instead of using the xhc-hb04.tcl script. (2.7 has some
other changes and improvements that simplify the modifications
required to use the pendant.)

except when zeroing the x

In your ini file, you can modify the assignements for
the synthesized buttons zero-y, zero-z and/or change the
MDI_COMMANDs that correspond to them


Thanks for the report.

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

More
13 Mar 2015 05:49 #56772 by mikaelbd
Hello

I'm trying to get the XHC-HB04 pendant working with a MESA-5i25 system on LinuxCNC 2.6.7 and am having a bit of trouble.

I read that no drivers need to be installed with this version of LinuxCNC but could not locate the xhc-hb04 hal files and noticed the executable was installed under /usr/bin rather than /usr/local/bin as per wiki.linuxcnc.org/cgi-bin/wiki.pl?Using_...Wireless_MPG_Pendant
..So I've gone ahead and downloaded and compiled xhc-hb04-V06.tgz from the link above and that seems to have gone smoothly. I then placed the hal files in my configs folder and attempted to modify my linuxCNC.ini file as per instructions but it is at this point LinuxCNC crashes on startup.

It seems adding the line "HALFILE = xhc-hb04.hal" is the cause.

Also, I cannot locate /etc/udev/rules.d/90-xhc.rules this file is missing...could this be the cause?

Help much appreciated!

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

More
13 Mar 2015 06:19 - 15 Mar 2015 06:01 #56773 by dgarrett

I read that ...

As with many wikis, the information is undated, lacks ongoing updates,
no one takes responsibility to maintain it, and content details are
frequently unreliable.

With an install of LinuxCNC 2.6.0 (and newer):
no files in /usr/local/anything are required
no *.tgz file is required
no separate compile step is required
the simulation configs should work with the 18 button pendant

the simulation config directory includes a .txt file for each sim config
and a README file with information about adapting an existing
configuration to use a pendant


For any LinuxCNC version after 2.6.0:
1) start LinuxCNC which will open the Configuration Selector
2) navigate to Sample Configurationsbb/sim/axis/xhc-hb04
3) select and start one of the simulation configs

If there are errors running a sim config, report how you installed
LinuxCNC, what version, and exact error messages.

Also:
A deb install places a udev file in the right place
(a rip install may require user creation of a udev file
instructions are in the sim configs README)

Additions and improvements have been made for 2.7.0 and
are available from buildbot debs now and will be in the next
release.
Last edit: 15 Mar 2015 06:01 by dgarrett.
The following user(s) said Thank You: mikaelbd

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

More
19 Mar 2015 03:48 #56991 by mikaelbd
dgarrett,

I've done as suggested and the simulation seems to work fine. At least now I can see that the pendant and software are communicating and displaying the same parameters.

What is the next step after this to get it working with an existing configuration?

Regards
m

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

More
19 Mar 2015 08:23 #56998 by dgarrett

the simulation config directory includes a .txt file for each sim
config and a README file with information about adapting an existing
configuration to use a pendant


When you start LinuxCNC and use the Configuration Selector, a README file is
shown in the right-hand panel when a directory name is selected (clicked).
When a directory is opened (click on the 'plus' box) and a specific
configuration is selected, additional notes are displayed (if a specific .txt
file is available).

The README and all .txt files are copied to the directory created in
~username/linuxcnc/configs/new_config_name so that you can read them with
an editor or print them at any time.

The README file includes instructions for adding a pendant to an existing
configuration.

The sim configurations are examples that show Hal connections for a few pendant
button pins. Studying the ini file for a working sim configuration and
experimenting with modifications is a good way to learn about the options
available in the ini file [XHC-HB04_CONFIG] stanza and how to connect pendant
buttons to hal pins in the [XHC-HB04_BUTTONS] stanza.

Some pins are usefully connected directly to motion.* or halui.* pins. Using
halui.mdi-command-nn pins allows use of mdi commands which can execute simple
mdi commands or complete, complex gcode subroutines. Halui mdi-command pins
are defined in the ini file [HALUI] stanza.

Ref: linuxcnc.org/docs/html/gui/halui.html
The following user(s) said Thank You: mikaelbd

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

More
20 Mar 2015 04:51 - 20 Mar 2015 04:56 #57025 by mikaelbd
dgarrett,

I've read through the readme as suggested and copied all applicable files over to my config folder. I started modifying my main ini file to include the hal files and stanzas as prescribed but have not added anything under the stanzas [XHC_HB04_CONFIG], [XHC_HB04_BUTTONS] or [HALUI] yet. I was hoping I could leave these empty and check that the hal files load OK first before proceeding but LinuxCNC is crashing on startup. Here is a portion of my ini file:
[HAL]
HALUI = halui
HALFILE = LinuxCNC-500.hal
HALFILE = custom.hal
POSTGUI_HALFILE = postgui_call_list.hal
SHUTDOWN = shutdown.hal
HALFILE = xhc-hb04.tcl
HALFILE = monitor_xhc-hb04.tcl

[XHC_HB04_CONFIG]

[XHC_HB04_BUTTONS]


[HALUI]
MDI_COMMAND = G10 L20 P0 X0 (Set X to zero)
MDI_COMMAND = G10 L20 P0 Y0 (Set Y to zero)
MDI_COMMAND = G10 L20 P0 Z0 (Set Z to zero)


Is it paramount that these stanzas be populated with some minimum set of parameters in order for LinuxCNC to start successfully or is there something else that could be going wrong?


Regards
m


*edit: I've also noticed the stanzas in the README are written with hyphens (e.g. [XHC-HB04_BUTTONS]) rather than underscores (e.g. [XHC_HB04_BUTTONS]) as in the example inis. I have used underscores as above but have tried both to no avail. I presume all-underscores is the correct naming with a typo in the README?
Last edit: 20 Mar 2015 04:56 by mikaelbd.

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

Time to create page: 0.155 seconds
Powered by Kunena Forum