XHC-HB04 wireless MPG pendant HAL module

More
20 Mar 2015 05:41 #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
24 Mar 2015 03:31 #57122 by mikaelbd
The crash report gives the following:
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.

More
24 Mar 2015 03:35 #57123 by andypugh

Pin 'axis.0.jog-scale' was already linked to signal 'selected-jog-incr'


Well, there is the problem.

Do you have more than one file trying to do "things" with the axis.0.jog-scale? It looks like some other HAL file is grabbing the pin before the XHC tries to.

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

More
24 Mar 2015 05:37 - 24 Mar 2015 23:40 #57131 by dgarrett
The xhc-hb04.tcl script is provided to make connections for pendant jogging
with the assumption that the hal pins required are not previously connected.

For normal and vnormal jogging, the xhc-hb04.tcl script connects to:
axis.N.jog-scale, axis.N.jog-enable, axis.N.jog-counts, axis.N.jog-vel-mode,
halui.max-velocity.value.

Similarly, a number of pins are required for spindle-override, feed-override
plus-minus jogging, and other functions handled by xhc-hb04.tcl.

The error you posted will occur if another [HAL]HALFILE has made connections
before calling xhc-hb04.tcl.

To see the pins used by xhc-hb04.tcl, start one of the working xhc-hb04 pendant
simulation configs and in a separate shell:
$ halcmd show sig pendant: >xhc_hb04_connections.txt
(example attatched)

From the signal name

already linked to signal 'selected-jog-incr' while executing

it looks like you are using a config created by stepconf or pncconf. If
you want to use the xhc-hb04 pendant alone (no other jogging mpg), there may be
a way to prevent stepconf (or pncconf) from connecting those pins or you can remove or
comment out [HAL]HALFILE= lines that connect those pins prior to xhc-hb04.tcl

If you want separate halfiles to share jog control pins in order to support
(perhaps multiplex) multiple mpg sources, you will not be able to use the
xhc-hb04.tcl script directly but can still use the xhc-hb04 component and wire
it up with whatever multiplexing arrangements you require with custom halfiles
that you create yourself.

There is a man page for the xhc-hb04 in 2.7 (and most items are the same for
2.6): www.linuxcnc.org/docs/2.7/html/man/man1/xhc-hb04.1.html

If you would make a zip file of your entire configuration directory and post
it you will assist folks in making suggestions.
Attachments:
Last edit: 24 Mar 2015 23:40 by dgarrett.

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

More
03 Apr 2015 03:54 #57453 by etnur
Hi Frederic ,
many thanks for your great job! :)

I also bought a XHC - HB04 .
It works fantastic, just as I had wished .
But I had a little problem. I can't start the Program with the start -pause button.

The following message appears : "Can't do that ( EMC_TASK_PLAN_RUN : 507) mdi_mode or manual_mode.


When I start the program by mouse then I can countinue use it with the pedant .
Only the first start does't work.
I've been searching for the error message, but I found no answer.
Can you help me ?

My EMC-Version is 2.6.3.

Many thanks from Frank!

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

More
03 Apr 2015 05:40 - 03 Apr 2015 07:55 #57458 by dgarrett
If you are using the xhc-hb04.tcl script from the 2.6 distribution
(in configs/sim/axis/xhc-hb04 directory) and are using std_start_pause feature,
this is a bug that was fixed and you may need to upgrade to a later LinuxCNC
version and use the amended script. Ref:

git.linuxcnc.org/gitweb?p=linuxcnc.git;a...dfdace6258be748c0a02

If you are not using that script (e.g., using instructions form
the outdated wiki), the same change is probably needed:
connect the halui.mode.auto pin to the
signal connected to the halui.program.run pin
Last edit: 03 Apr 2015 07:55 by dgarrett. Reason: correct pin names
The following user(s) said Thank You: etnur

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

More
04 Apr 2015 19:15 #57516 by etnur
Thank you dgarrett !
I have test the xhc-hb04.tcl but it does't run it shows the Error Window.

Here are the Errorlist.
I understand that axis.3 . is not available but in the INI are only 3 axis ( 0,1,2) listed . Where is the problem?
Pin 'axis.3.jog-scale' does not exist
    while executing
"hal net pendant:jog-scale => axis.3.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 1222)
    invoked from within
"source $filename"
    invoked from within
"set result [source $filename]"
    (file "/usr/bin/haltcl" line 55)
5545

Here are the INI
[HAL]
HALFILE = X-Quer-Positiv-Rechts.hal
#HALFILE = xhc-hb04-V06.hal
#POSTGUI_HALFILE = custom_postgui.hal
HALUI = halui
HALFILE = xhc-hb04.tcl

[XHC-HB04_CONFIG]
layout = 2       (required: 1|2 are supported)
coords = x y z  (any unique four of xyzabcuvw)
coefs  = 1 1 1 1 (optional, filter coefs, 0 < coef < 1, not usually reqd)
scales = 1 1 1 1 (optional)
threadname = servo-thread (optional)
sequence = 1     (optional: 1|2)
jogmode = normal (optional: normal|vnormal|plus-minus)
require_pendant = yes (optional: yes|no)

[XHC-HB04_BUTTONS]
name = pin  (connect button to hal pin)
name = ""   (no connect button)
special cases:
start-pause = std_start_pause  (for usual behavior)
step = xhc-hb04.stepsize-up    (for usual behavior)
#   (see ini files for more exanples)


Hopefully I'm not too stupid to see the failure.
I hope you or anyone can help me.

Thank a Lot!!!
Frank
Attachments:

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

More
04 Apr 2015 21:42 #57522 by dgarrett
In the ini file;
[XHC-HB04_CONFIG] should be [XHC_HB04_CONFIG]
[XHC-HB04_BUTTONS] should be [XHC_HB04_BUTTONS]
(No hyphen) This mistake may exist in the directory README file and has
been recently fixed.
Ref: git.linuxcnc.org/gitweb?p=linuxcnc.git;a...da46194385e977725be4

The example sim config ini files include COMMENT lines that start with
a # character like:
# layout = 2 (required: 1|2 are supported)
However, your ini file has lines without the leading # character like
layout = 2 (required: 1|2 are supported)
The text in parentheses from the README comments should NOT be included on an active line, so this line should be:
layout = 2
Similar corrections are required on numerous lines in your ini file.
See the sim config ini files for working examples of all lines in
the [XHC_HB04_CONFIG] and [XHC_HB04_BUTTONS] stanzas.

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

More
05 Apr 2015 14:24 - 05 Apr 2015 14:29 #57543 by etnur
Thank you for your support !
Excuse my bad English

The Script run :) .

One little problem is still here.
The Macro-2 button doesn't work, only this button :(
I hope the pedant isn't defect.

If I watch the Macro-button in the HAL-SHOW module, it doesn't toggle the light, after push the button, the OK LED at the pedant flashed.

But if I push the SAFE-Z Button the Macro-2 light change the state too.
Also there is a connection between SAFE-Z and Macro-2 button.
Where is defined the connection . I can't find it.

All other button works fine, so I see.

I hope you can follow my explanation, and you can help me.

Thanks a LOT !!!!
Frank
Last edit: 05 Apr 2015 14:29 by etnur. Reason: expanded the text

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

More
05 Apr 2015 20:57 - 05 Apr 2015 21:16 #57548 by dgarrett
You can test the pendant without using any parts of linuxCNC
or Hal by running the driver program from the command line.

This test should help determine if the device is not generating codes
as expected.

Example (18 button pendant, rotary switch in off postion):
$ xhc-hb04 -h    # -h shows usage
$
$ xhc-hb04
Creating pin: xhc-hb04.x.pos-absolute
Creating pin: xhc-hb04.y.pos-absolute
Creating pin: xhc-hb04.z.pos-absolute
...
Creating pin: xhc-hb04.jog.minus-a
xhc-hb04: waiting for XHC-HB04 device
xhc-hb04: found XHC-HB04 device
...
...
04 0B 00 00 00 07   <--- macro-2 button pressed  (BUTTON=0B)
04 00 00 00 00 0C   <--- macro-2 button released
...
04 08 00 00 00 04   <--- Safe-Z button pressed  (BUTTON=08)
04 00 00 00 00 0C   <--- Safe-Z button released
...
(The BUTTON codes in the second byte position correspond to the
items in the xhc-hb04-layout2.cfg)
Last edit: 05 Apr 2015 21:16 by dgarrett.

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

Time to create page: 0.354 seconds
Powered by Kunena Forum