XHC-HB04 wireless MPG pendant HAL module

More
11 years 7 months ago - 11 years 7 months ago #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: 11 years 7 months ago by dgarrett.
The following user(s) said Thank You: mikaelbd

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

More
11 years 7 months ago #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
11 years 7 months ago #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
11 years 7 months ago - 11 years 7 months ago #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:
Code:
[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: 11 years 7 months ago by mikaelbd.

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

More
11 years 7 months ago #57027 by dgarrett
To get help it is usually better to post details and the exact error
message instead of the unhelpful "is crashing" summarization.

I don't know why one would expect it to run without stanzas specified
in the instructions.

As always, a working simulator config is easy for you to modify, test
and explore config items when there is doubt.

I've also noticed the stanzas in the README are written with hyphens (e.g.
[XHC-HB04_BUTTONS]) rather than underscores ...


This is an error, will fix for next release (2.7)
Thanks for the report.

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

More
11 years 7 months ago #57122 by mikaelbd
The crash report gives the following:
Code:
Debug file information: xhc-hb04.tcl: using std_start_pause_button Pin 'axis.0.jog-scale' was already linked to signal 'selected-jog-incr' while executing "hal net pendant:jog-scale => axis.0.jog-scale" ("eval" body line 1) invoked from within "eval hal net $args" (procedure "net" line 1) invoked from within "net pendant:jog-scale => axis.$axno.jog-scale" (procedure "wheel_setup" line 61) invoked from within "wheel_setup $::XHC_HB04_CONFIG(jogmode)" (file "xhc-hb04.tcl" line 409) invoked from within "source $filename" invoked from within "set result [source $filename]" (file "/usr/bin/haltcl" line 55)

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

Time to create page: 0.102 seconds
Powered by Kunena Forum