Machinekit XHC-WHB04B-6

546 views
Skip to first unread message

Aurelien

unread,
Feb 3, 2018, 6:01:28 PM2/3/18
to Machinekit
Hi All

Another newbee question :

I have found some link about the possible integration MPG XHC-WHB04B-6 but for now i think ther is a missing file, if someone can help me to understand how make it work.



i think the last file is only a link but i dont found in any folder.

can you help with this ?

Best regards

Aurelien

unread,
Feb 3, 2018, 7:26:09 PM2/3/18
to Machinekit

schoo...@btinternet.com

unread,
Feb 4, 2018, 2:18:11 AM2/4/18
to machi...@googlegroups.com

You need to contact the author.

The support in Machinekit is for the standard pendant.

--
website: http://www.machinekit.io blog: http://blog.machinekit.io github: https://github.com/machinekit
---
You received this message because you are subscribed to the Google Groups "Machinekit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to machinekit+...@googlegroups.com.
Visit this group at https://groups.google.com/group/machinekit.
For more options, visit https://groups.google.com/d/optout.

Aurelien

unread,
Feb 20, 2018, 6:46:07 AM2/20/18
to Machinekit
Hi

Can you help for compiling this driver  ?


i  try to create missing makefile with the submakefile but my knowledge is too short for make this to work.

Best regards


Submakefile
Makefile

schoo...@btinternet.com

unread,
Feb 20, 2018, 9:00:45 AM2/20/18
to machi...@googlegroups.com
Really you should contact the author.
However he created several issues related to the xhc, but when asked to make a PR he said he would 'probably be too busy' and was never heard from again.

You should not need to do anything other than clone his repo, checkout the `feature-xhc-whb04b-6` branch and build it.

Unfortunately it is based upon and old version of machinekit, before the czmq update and does not build with the default libraries.

So clone machinekit and checkout a new branch and copy across the whole
https://github.com/rubienr/machinekit/tree/feature-xhc-whb04b-6/src/hal/user_comps/xhc-whb04b-6 dir

The go to src/Makefile and insert the line from L241 of his Makefile to have the Submakefile included in the build
https://github.com/rubienr/machinekit/blob/feature-xhc-whb04b-6/src/Makefile#L241

That then builds fine and you can copy the binary across to your machine or just use that branch to run from.

No support beyond that though, it is not part of Machinekit.
 

Aurelien

unread,
Feb 20, 2018, 6:37:59 PM2/20/18
to Machinekit
Hi

i have already contact author and wait for some news.

But with your great info i have done with success compiling machinekit git with adding src files for driver, only one more file is missing and need to copy



and one issue for compil from BBB we need to add a swap file and reboot


now try to add this binary and configure.

Another thanks ! 

Aurelien

unread,
Feb 22, 2018, 2:00:01 PM2/22/18
to Machinekit
Hello


sorry to ask again i have understand that you can't provide support for this external parts but i don't understand if this is a error from bad compiling or from config files or other...

I'm really too newbee for understand that myslef and google don't found anything related, and off course for now no news from author



$ halrun
msgd:0 stopped
rtapi:0 stopped
halcmd: loadusr ../bin/xhc-whb04b-6 -Hup
hal initialize HAL component in HAL mode xhc-whb04b-6 ... ok
hal initialize shared HAL memory for component id 38 ... failed to allocate HAL memory 


if try in simulation mode without -H this seem to be ok
halcmd: loadusr xhc-whb04b-6 -up
halcmd: init  starting in simulation mode
hal   initialize simulated HAL memory  ... ok
hal   bit   out whb.button.reset
etc...

Sorry for asking another time here.

Best regards

Aurelien

unread,
Feb 22, 2018, 8:12:57 PM2/22/18
to Machinekit
this message is sended by the driver i have found the output text error in source code

xhc.hal = (xhc_hal_t *)hal_malloc(sizeof(xhc_hal_t));
if (xhc.hal == NULL) {
fprintf(stderr, "%s: ERROR: unable to allocate HAL shared memory\n", modname);
exit(1);

Bas de Bruijn

unread,
Feb 23, 2018, 12:47:49 AM2/23/18
to Aurelien, Machinekit
Hi Aurelien,
Try this to see if you can get some info on why this happens.
Before you run Machinekit from terminal type:
export DEBUG=5

Then open /var/log/linuxcnc.log and see if you can find more info on the crash.

Please don't attach the log, but paste on pastebin.com

The author opened some issues, that could be a starting point.
Issues 1254, 1255, 1256, 1257, 1266 and 1267

Bas

schoo...@btinternet.com

unread,
Feb 23, 2018, 2:23:51 AM2/23/18
to machi...@googlegroups.com
The most common mistake that gives this error, is calling hal_malloc() when realtime is not started.
Does not look to be the case.

I have no familiarity with this code and only have a standard xhc pendant, but will look later.

schoo...@btinternet.com

unread,
Feb 23, 2018, 5:35:04 AM2/23/18
to machi...@googlegroups.com

On 23/02/18 07:26, 'schoo...@btinternet.com' via Machinekit wrote:



On 23/02/2018 01:12, Aurelien wrote:
this message is sended by the driver i have found the output text error in source code

xhc.hal = (xhc_hal_t *)hal_malloc(sizeof(xhc_hal_t));
if (xhc.hal == NULL) {
fprintf(stderr, "%s: ERROR: unable to allocate HAL shared memory\n", modname);
exit(1);
The most common mistake that gives this error, is calling hal_malloc() when realtime is not started.
Does not look to be the case.

I have no familiarity with this code and only have a standard xhc pendant, but will look later.

I don't know what you are doing, but when I build it and run, it works (as far as it can with no pendant attached)

You will get the error you had when realtime is not started.

The memory allocation will work in sim mode because that uses calloc() not hal_malloc()


user@INTEL-i7:/usr/src/sandbox/machinekit# DEBUG=5 realtime restart
user@INTEL-i7:/usr/src/sandbox/machinekit# halcmd loadusr xhc-whb04b-6 -Hup
<commandline>:0: Program 'xhc-whb04b-6' started
user@INTEL-i7:/usr/src/sandbox/machinekit# hal   initialize HAL component in HAL mode xhc-whb04b-6 ... ok
hal   initialize shared HAL memory for component id  80 ... ok
hal   bit   out whb.button.reset
hal   bit   out whb.button.macro-11
hal   bit   out whb.button.stop
hal   bit   out whb.button.macro-12
hal   bit   out whb.button.start-pause
hal   bit   out whb.button.macro-13
hal   bit   out whb.button.feed-plus
hal   bit   out whb.button.macro-1
hal   bit   out whb.button.feed-minus
hal   bit   out whb.button.macro-2
hal   bit   out whb.button.spindle-plus
hal   bit   out whb.button.macro-3
hal   bit   out whb.button.spindle-minus
hal   bit   out whb.button.macro-4
hal   bit   out whb.button.m-home
hal   bit   out whb.button.macro-5
hal   bit   out whb.button.safe-z
hal   bit   out whb.button.macro-6
hal   bit   out whb.button.w-home
hal   bit   out whb.button.macro-7
hal   bit   out whb.button.s-on-off
hal   bit   out whb.button.macro-8
hal   bit   out whb.button.fn
hal   bit   out whb.button.probe-z
hal   bit   out whb.button.macro-9
hal   bit   out whb.button.macro-10
hal   bit   out whb.button.macro-14
hal   bit   out whb.button.mode-continuous
hal   bit   out whb.button.macro-15
hal   bit   out whb.button.mode-step
hal   bit   out whb.button.macro-16
hal   s32   out whb.axis.0.jog-counts
hal   bit   out whb.axis.0.jog-enable
hal   float out whb.axis.0.jog-scale
hal   bit   out whb.axis.0.jog-vel-mode
hal   s32   out whb.axis.1.jog-counts
hal   bit   out whb.axis.1.jog-enable
hal   float out whb.axis.1.jog-scale
hal   bit   out whb.axis.1.jog-vel-mode
hal   s32   out whb.axis.2.jog-counts
hal   bit   out whb.axis.2.jog-enable
hal   float out whb.axis.2.jog-scale
hal   bit   out whb.axis.2.jog-vel-mode
hal   s32   out whb.axis.3.jog-counts
hal   bit   out whb.axis.3.jog-enable
hal   float out whb.axis.3.jog-scale
hal   bit   out whb.axis.3.jog-vel-mode
hal   s32   out whb.axis.4.jog-counts
hal   bit   out whb.axis.4.jog-enable
hal   float out whb.axis.4.jog-scale
hal   bit   out whb.axis.4.jog-vel-mode
hal   s32   out whb.axis.5.jog-counts
hal   bit   out whb.axis.5.jog-enable
hal   float out whb.axis.5.jog-scale
hal   bit   out whb.axis.5.jog-vel-mode
hal   bit   out whb.pendant.is-sleeping
hal   bit   out whb.pendant.is-connected
hal   float in  whb.halui.axis.0.pos-feedback
hal   float in  whb.halui.axis.1.pos-feedback
hal   float in  whb.halui.axis.2.pos-feedback
hal   float in  whb.halui.axis.3.pos-feedback
hal   float in  whb.halui.axis.4.pos-feedback
hal   float in  whb.halui.axis.5.pos-feedback
hal   float in  whb.halui.axis.0.pos-relative
hal   float in  whb.halui.axis.1.pos-relative
hal   float in  whb.halui.axis.2.pos-relative
hal   float in  whb.halui.axis.3.pos-relative
hal   float in  whb.halui.axis.4.pos-relative
hal   float in  whb.halui.axis.5.pos-relative
hal   float in  whb.stepgen.00.maxvel
hal   float in  whb.stepgen.00.position-scale
hal   float in  whb.stepgen.01.maxvel
hal   float in  whb.stepgen.01.position-scale
hal   float in  whb.stepgen.02.maxvel
hal   float in  whb.stepgen.02.position-scale
hal   float in  whb.stepgen.03.maxvel
hal   float in  whb.stepgen.03.position-scale
hal   float in  whb.stepgen.04.maxvel
hal   float in  whb.stepgen.04.position-scale
hal   float in  whb.stepgen.05.maxvel
hal   float in  whb.stepgen.05.position-scale
hal   bit   out whb.halui.feed.selected-0.001
hal   bit   out whb.halui.feed.selected-0.01
hal   bit   out whb.halui.feed.selected-0.1
hal   bit   out whb.halui.feed.selected-1.0
hal   float out whb.halui.feed-override.scale
hal   bit   out whb.halui.feed-override.direct-val
hal   bit   out whb.halui.feed-override.count-enable
hal   float in  whb.halui.feed-override.value
hal   float in  whb.halui.feed-override.min-value
hal   float in  whb.halui.feed-override.max-value
hal   s32   out whb.halui.feed-override.counts
hal   bit   out whb.halui.feed-override.decrease
hal   bit   out whb.halui.feed-override.increase
hal   float in  whb.motion.current-vel
hal   float in  whb.halui.spindle-override.value
hal   float in  whb.motion.spindle-speed-abs
hal   bit   out whb.halui.spindle.increase
hal   bit   out whb.halui.spindle.decrease
hal   bit   out whb.halui.spindle-override.increase
hal   bit   out whb.halui.spindle-override.decrease
hal   bit   in  whb.halui.spindle.is-on
hal   bit   out whb.halui.spindle.stop
hal   bit   out whb.halui.spindle.forward
hal   bit   out whb.halui.spindle.reverse
hal   bit   out whb.halui.estop.activate
hal   bit   in  whb.halui.estop.is-activated
hal   bit   out whb.halui.estop.reset
hal   bit   in  whb.halui.machine.is-on
hal   bit   out whb.halui.machine.on
hal   bit   out whb.halui.machine.off
hal   bit   in  whb.halui.program.is-idle
hal   bit   in  whb.halui.program.is-paused
hal   bit   in  whb.halui.program.is-running
hal   bit   out whb.halui.program.resume
hal   bit   out whb.halui.program.pause
hal   bit   out whb.halui.program.run
hal   bit   out whb.halui.program.stop
hal   bit   in  whb.halui.mode.is-auto
hal   bit   in  whb.halui.mode.is-joint
hal   bit   in  whb.halui.mode.is-manual
hal   bit   in  whb.halui.mode.is-mdi
hal   bit   out whb.halui.mode.auto
hal   bit   out whb.halui.mode.joint
hal   bit   out whb.halui.mode.manual
hal   bit   out whb.halui.mode.mdi
hal   bit   out whb.halui.joint.x.select
hal   bit   out whb.halui.joint.y.select
hal   bit   out whb.halui.joint.z.select
hal   bit   out whb.halui.joint.a.select
hal   bit   out whb.halui.joint.b.select
hal   bit   out whb.halui.joint.c.select
hal   float out whb.halui.jog-speed
hal   bit   out whb.halui.home-all
init  usb context ... ok
init  not waiting for device XHC-WHB04B-6 vendorId=0x10ce productId=0xeb93, will continue in 0s

Aurelien

unread,
Feb 23, 2018, 6:33:30 AM2/23/18
to Machinekit
I think the author only opened the issue and not do the job for standard xhc because( i think), rubienr have only new model and report issue founded when developping new model, so i hope the issue is not related for this new unit. (for sure not sure at all^^)

Thanks a lot for DEBUG=5 info

now i can show that the problem (i hope) is duplicate  hal linked configuration i try to fix myself


same as your test i can run in simulation mode without issue.


Many thanks !!

Golfo

unread,
Feb 23, 2018, 6:59:54 AM2/23/18
to Machinekit
Work now !!!!!!

Really happy 😊 finally only config issue from Hal and ini 

Thanks a lot for your support !
--
You received this message because you are subscribed to a topic in the Google Groups "Machinekit" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/machinekit/jwvEEPT-HMg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to machinekit+...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages