Problems with installing xhc-hb04 in my Machinekit BBB cnc project

545 views
Skip to first unread message

Simon Mali

unread,
Mar 19, 2017, 10:34:23 AM3/19/17
to Machinekit
Hello
I am trying to add xhc-hb04 jogging device to my cnc project but with no success. I get printouts like this:

xhc-hb04: waiting for XHC-HB04 device
xhc-hb04: found XHC-HB04 device
xhc-hb04: connection lost, cleaning up
[timestamp] [threadID] facility level [function call] <message>
--------------------------------------------------------------------------------
Removing HAL_LIB, RTAPI, and Real Time OS modules
Removing NML shared memory segments
Cleanup done

Debug file information:

Unknown 'show' type 'pexists'
    while executing
"hal show pexists xhc-hb04.button-goto-zero"
    ("eval" body line 1)
    invoked from within
"eval hal show $args"
    (procedure "show" line 1)
    invoked from within
"show pexists $name"
    (procedure "pin_exists" line 2)
    invoked from within
"pin_exists $fullbname"
    (procedure "connect_pins" line 24)
    invoked from within
"connect_pins    "
    (file "xhc-hb04.tcl" line 400)
    invoked from within
"source $filename"
    invoked from within
"set result [source $filename]"
    (file "/usr/bin/haltcl" line 55

What I am doing wrong? My primary hal input file is BBB-3D-CNC.ini.
Is here anybody who has some experience with integrating xhc-hb04 jogging device into Machinekit?
Best regards
Simon Mali
90-xhc.rules
ARM.BeagleBone.Panther.zip
error_printout

schoo...@btinternet.com

unread,
Mar 19, 2017, 10:40:25 AM3/19/17
to machi...@googlegroups.com
What image or package version are you using?

There was a problem where the multicore changes clobbered the fix I made to the xhc-hb04 code

Run the sim, if you get the same problems you need to update.

Looks like you have an old halcmd without the 'pexists' code in it.
--
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.

schoo...@btinternet.com

unread,
Mar 19, 2017, 10:57:52 AM3/19/17
to machi...@googlegroups.com
See also this re the previous report
https://github.com/machinekit/machinekit/issues/1161

Simon Mali

unread,
Mar 19, 2017, 11:18:21 AM3/19/17
to Machinekit
How exactly to check which image or package version is currently installed on my memory card?
How to upgrade to newer code?


schoo...@btinternet.com

unread,
Mar 19, 2017, 12:19:18 PM3/19/17
to machi...@googlegroups.com
You haven't said what you are running on.

Assuming you are using a BBB and a recent SD card image, you should just be able to
sudo apt-get update
sudo apt-get dist-upgrade

That will fetch machinekit package which has the updated halcmd

Probably http://deb.machinekit.io/debian/pool/main/m/machinekit/machinekit_0.1.1489929991-1mk.travis.master.git187f851f~1jessie_armhf.deb
but that's a guess without much info


On 19/03/17 15:18, Simon Mali wrote:
How exactly to check which image or package version is currently installed on my memory card?
How to upgrade to newer code?


Simon Mali

unread,
Mar 19, 2017, 12:38:52 PM3/19/17
to Machinekit
With this correction:

92  92   proc pin_exists {name} {
 93      -   set line [show pexists $name]
 94      -   if {"$line" != "Exists"} {
 95      -    puts stderr "FAILED: show pexists $name, returned $line"
     93  +   set line [show pin $name]
     94  +   if {[string first $name $line 0] < 0} {
     95  +    puts stderr "FAILED: show pin $name, returned $line"
 96  96       return 0 ; #fail
 97  97     }
 98      -  puts stderr "PASSED: show pexists $name, returned $line"
     98  +  puts stderr "PASSED: show pin $name, returned $line"
 99  99     return 1; # pass
100 100   } ; #pin_exists

I get some other error printouts:

PASSED: show pin xhc-hb04.button-goto-zero, returned Component Pins:
  Comp   Inst Type  Dir         Value  Name                             Epsilon   622        bit   OUT         FALSE  xhc-hb04.button-goto-zero                 0

FAILED: show pin halui.mdi-command-00, returned Component Pins:
  Comp   Inst Type  Dir         Value  Name                             Epsilon
xhc-hb04.tcl: !!! <halui.mdi-command-00> target pin does not exist, continuing
PASSED: show pin xhc-hb04.button-half, returned Component Pins:
  Comp   Inst Type  Dir         Value  Name                             Epsilon   622        bit   OUT         FALSE  xhc-hb04.button-half                      0

FAILED: show pin halui.spindle.stop, returned Component Pins:
  Comp   Inst Type  Dir         Value  Name                             Epsilon
xhc-hb04.tcl: !!! <halui.spindle.stop> target pin does not exist, continuing
PASSED: show pin xhc-hb04.button-home, returned Component Pins:
  Comp   Inst Type  Dir         Value  Name                             Epsilon   622        bit   OUT         FALSE  xhc-hb04.button-home             

I will update software as you recommended.



error_printout2

schoo...@btinternet.com

unread,
Mar 19, 2017, 12:47:07 PM3/19/17
to machi...@googlegroups.com
The tcl files will work if the updated version of halcmd is used

Don't change them, that is just what someone else did and pushed the error elsewhere, it did not solve it

Simon Mali

unread,
Mar 19, 2017, 1:06:16 PM3/19/17
to Machinekit
No problem. I will reactivate the old file which I saved before changing this tcl file.
Yes I am driving Beagle Bone Black.
I have made an upgrade with proposed commands and among others also machinekit was upgraded:

Preparing to replace machinekit-xenomai 0.1.1459972160-1mk.travis.master.gita620e700~1wheezy (using .../machinekit-xenomai_0.1.1489929991-1mk.travis.master.git187f851f~1wheezy_armhf.deb) ...
Unpacking replacement machinekit-xenomai ...
Preparing to replace machinekit 0.1.1459972160-1mk.travis.master.gita620e700~1wheezy (using .../machinekit_0.1.1489929991-1mk.travis.master.git187f851f~1wheezy_armhf.deb) ...
Unpacking replacement machinekit ...

I have put all printouts while upgrading into attached file.


update_log

Simon Mali

unread,
Mar 19, 2017, 1:22:59 PM3/19/17
to Machinekit
After system restart and reactivating old tcl file machinekit even don't wan't to start anymore. What does this means:

Debug file information:
Warning - /usr/libexec/linuxcnc/rtapi_app_posix not setuid
'sudo make setuid' missing?
/usr/bin/realtime: line 111: test: =: unary operator expected
/usr/bin/realtime: line 174:  1357 Segmentation fault      ${rtapi_msgd} --instance=$MK_INSTANCE $NAME_CMD --rtmsglevel=$DEBUG --usrmsglevel=$DEBUG --halsize=$HAL_SIZE $MSGD_OPTS
/usr/bin/realtime: line 192: /usr/libexec/linuxcnc/rtapi_app_posix: No such file or directory
halcmd: cant connect to rtapi_app: -1 (uri= uuid=a42c8c6b-4025-4f83-ba28-dad21114744a): rtapi_rpc(): reply timeout

halcmd: the rtapi:0 RT demon is not running - please investigate /var/log/linuxcnc.log
halcmd: the msgd:0 logger demon is not running - please investigate /var/log/linuxcnc.log
halcmd: cant connect to rtapi_app: -1 (uri= uuid=a42c8c6b-4025-4f83-ba28-dad21114744a): rtapi_rpc(): reply timeout

In which folder do I have to make sudo make setuid?

error_printout3
linuxcnc.log

schoo...@btinternet.com

unread,
Mar 19, 2017, 1:26:52 PM3/19/17
to machi...@googlegroups.com
When you have installed, you can test with this sequence

user@INTEL-i7:/usr/src/machinekit/src/hal/utils$ realtime restart
user@INTEL-i7:/usr/src/machinekit/src/hal/utils$ halcmd loadrt debounce
user@INTEL-i7:/usr/src/machinekit/src/hal/utils$ halcmd show pexists debounce.0.0.in
Exists
user@INTEL-i7:/usr/src/machinekit/src/hal/utils$ halrun -U

Then run the sim https://github.com/machinekit/machinekit/tree/master/configs/sim/axis/xhc-hb04
with your pendant connected and switched on to test fully


I have put all printouts while upgrading into attached file.


schoo...@btinternet.com

unread,
Mar 19, 2017, 1:32:39 PM3/19/17
to machi...@googlegroups.com
Unless you are running from a RIP you cannot, that would have been done when the package was built

I can only suggest that you reboot and then try the test sequence I sent
You may still have modules loaded that are screwing everything up

Simon Mali

unread,
Mar 19, 2017, 2:32:31 PM3/19/17
to Machinekit
I have restarted the system but nothing substancially has changed. You said that I should test this: /usr/src/machinekit/src/hal/utils
My folder /usr/src is empty.

Simon Mali

unread,
Mar 19, 2017, 6:39:32 PM3/19/17
to Machinekit
How to make an iso file out of deb package? For instance out of: http://deb.machinekit.io/debian/pool/main/m/machinekit/machinekit_0.1.1489929991-1mk.travis.master.git187f851f~1jessie_armhf.deb
I would like to make a bootable SD card for BBB.



schoo...@btinternet.com

unread,
Mar 20, 2017, 2:58:53 AM3/20/17
to machi...@googlegroups.com

I suggested trying the commands, where I was when I ran them is irelevant


On 19/03/2017 18:32, Simon Mali wrote:
I have restarted the system but nothing substancially has changed. You said that I should test this: /usr/src/machinekit/src/hal/utils
My folder /usr/src is empty.

schoo...@btinternet.com

unread,
Mar 20, 2017, 3:07:06 AM3/20/17
to machi...@googlegroups.com

You can't and don't need to.  The BBB images are on Robert Nelsons website as per the instructions on the website.

Without information about exactly what you are using I cant really help further.

You must have had either a quite recent image or updated it recently, to have even hit the original problem.


On 19/03/2017 22:39, Simon Mali wrote:
How to make an iso file out of deb package? For instance out of: http://deb.machinekit.io/debian/pool/main/m/machinekit/machinekit_0.1.1489929991-1mk.travis.master.git187f851f~1jessie_armhf.deb
I would like to make a bootable SD card for BBB.



Simon Mali

unread,
Mar 20, 2017, 3:45:30 PM3/20/17
to Machinekit
Thank you all who are supporting me in this Linux quest. Sorry for the late answer. I was working till now.
I am using Necitec Beagle bone black cape which I bought at the start of this year. With the cape I also got SD card with supporting Linux-Machinekit software. Here is link:
http://www.necitec.de/index.php?lang=en

Before upgrade I had (on original Necitec SD card):

machinekit@beaglebone:~$ uname -a
Linux beaglebone 3.8.13-xenomai-r78 #1 Sat Sep 26 16:54:43 UTC 2015 armv7l GNU/Linux

machinekit@beaglebone:~$ lsb_release -a
No LSB modules are available.
Distributor ID:    Debian
Description:    Debian GNU/Linux 7.10 (wheezy)
Release:    7.10
Codename:    wheezy

machinekit@beaglebone:~$ cat /proc/version
Linux version 3.8.13-xenomai-r78 (root@a6-imx6q-wandboard-2gb) (gcc version 4.6.3 (Debian 4.6.3-14) ) #1 Sat Sep 26 16:54:43 UTC 2015
machinekit@beaglebone:~$

After upgrade:

root@beaglebone:/home/machinekit# uname -a
Linux beaglebone 3.8.13-xenomai-r78 #1 Sat Sep 26 16:54:43 UTC 2015 armv7l GNU/Linux
root@beaglebone:/home/machinekit# lsb_release -a
No LSB modules are available.
Distributor ID:    Debian
Description:    Debian GNU/Linux 7.11 (wheezy)
Release:    7.11
Codename:    wheezy
root@beaglebone:/home/machinekit#

2. How do you use deb package? Or is that only useful when using apt-get and apt-get dist-upgrade? Do you have an image which is working on your machine with xhc-hb04 and BBB? If yes can I have it?
3. As I can see there was a problem regarding newest software package. Does somebody know when this errors will be corrected?
4. I will try this software: http://elinux.org/Beagleboard:BeagleBoneBlack_Debian#BBW.2FBBB_.28All_Revs.29_Machinekit



Dne ponedeljek, 20. marec 2017 08.07.06 UTC+1 je oseba Schooner napisala:

schoo...@btinternet.com

unread,
Mar 20, 2017, 4:44:18 PM3/20/17
to machi...@googlegroups.com
No, I don't even have a BBB

3. As I can see there was a problem regarding newest software package. Does somebody know when this errors will be corrected?
They have been already as per previous posts
If you do

sudo apt-get update
sudo apt-get dist-upgrade
again, you should pull the new fixed packages
Try the above first

Then test by running the commands I listed previously or the sim, with the pendant connected.

Simon Mali

unread,
Mar 21, 2017, 3:41:58 PM3/21/17
to Machinekit
I have upgraded the OS with apt-get as you said. When I test proposed sequence I get the following output:

root@beaglebone:/home/machinekit# realtime restart
/usr/libexec/linuxcnc/rtapi_msgd: FATAL - will not run as root
rtapi_msgd startup failed - aborting
rtapi_app startup failed - aborting

halcmd: cant connect to rtapi_app: -1 (uri= uuid=a42c8c6b-4025-4f83-ba28-dad21114744a): rtapi_rpc(): reply timeout

halcmd: the rtapi:0 RT demon is not running - please investigate /var/log/linuxcnc.log
halcmd: the msgd:0 logger demon is not running - please investigate /var/log/linuxcnc.log
root@beaglebone:/home/machinekit# halcmd loadrt debounce

halcmd: cant connect to rtapi_app: -1 (uri= uuid=a42c8c6b-4025-4f83-ba28-dad21114744a): rtapi_rpc(): reply timeout

halcmd: the rtapi:0 RT demon is not running - please investigate /var/log/linuxcnc.log
halcmd: the msgd:0 logger demon is not running - please investigate /var/log/linuxcnc.log
root@beaglebone:/home/machinekit# 

linuxcnc.log printout:

Mar 21 20:17:16 beaglebone msgd:0: startup pid=1695 flavor=xenomai rtlevel=1 usrlevel=1 halsize=524288 shm=Posix cc=gcc 4.9.2  version=unknown
Mar 21 20:17:16 beaglebone msgd:0: ØMQ=4.0.5 czmq=2.2.0 protobuf=2.4.1 atomics=gcc intrinsics    libwebsockets=<no version symbol>
Mar 21 20:17:16 beaglebone msgd:0: configured: sha=32e5e60
Mar 21 20:17:16 beaglebone msgd:0: built:      Mar 20 2017 18:27:02 sha=32e5e60
Mar 21 20:17:16 beaglebone msgd:0: register_stuff: actual hostname as announced by avahi='beaglebone.local'
Mar 21 20:17:16 beaglebone msgd:0: zeroconf: registering: 'Log service on beaglebone.local pid 1695'
Mar 21 20:17:17 beaglebone msgd:0: zeroconf: registered 'Log service on beaglebone.local pid 1695' _machinekit._tcp 0 TXT "uuid=a42c8c6b-4025-4f83-ba28-dad21114744a" "instance=ff04a766-0e6a-11e7-bfee-1cba8cd967d9" "service=log" "dsn=ipc:///tmp/0.log.a42c8c6b-4025-4f83-ba28-dad21114744a"
Mar 21 20:17:52 beaglebone rtapi:0: unload: 'trivkins' not loaded
Mar 21 20:17:52 beaglebone rtapi:0: unload: 'tp' not loaded
Mar 21 20:17:52 beaglebone rtapi:0: unload: 'xhc_hb04_util' not loaded
Mar 21 20:17:52 beaglebone rtapi:0: unload: 'threads' not loaded
Mar 21 20:17:52 beaglebone rtapi:0: unload: 'pwmgen' not loaded
Mar 21 20:17:52 beaglebone rtapi:0: unload: 'motmod' not loaded
Mar 21 20:17:52 beaglebone rtapi:0: unload: 'limit1' not loaded
Mar 21 20:17:52 beaglebone rtapi:0: unload: 'hal_pru_generic' not loaded
Mar 21 20:17:52 beaglebone rtapi:0: unload: 'hal_bb_gpio' not loaded
Mar 21 20:17:52 beaglebone rtapi:0: unload: 'abs' not loaded
Mar 21 20:17:52 beaglebone msgd:0: rtapi_app exit detected - scheduled shutdown
Mar 21 20:17:54 beaglebone msgd:0: msgd shutting down
Mar 21 20:17:54 beaglebone msgd:0: zeroconf: unregistering 'Log service on beaglebone.local pid 1695'
Mar 21 20:17:54 beaglebone msgd:0: log buffer hwm: 0% (0 msgs, 0 bytes out of 524288)
Mar 21 20:17:54 beaglebone msgd:0: normal shutdown - global segment detached
Mar 21 20:18:52 beaglebone msgd:0: startup pid=2897 flavor=xenomai rtlevel=1 usrlevel=1 halsize=524288 shm=Posix cc=gcc 4.9.2  version=unknown
Mar 21 20:18:52 beaglebone msgd:0: ØMQ=4.0.5 czmq=2.2.0 protobuf=2.4.1 atomics=gcc intrinsics    libwebsockets=<no version symbol>
Mar 21 20:18:52 beaglebone msgd:0: configured: sha=32e5e60
Mar 21 20:18:52 beaglebone msgd:0: built:      Mar 20 2017 18:27:02 sha=32e5e60
Mar 21 20:18:52 beaglebone msgd:0: register_stuff: actual hostname as announced by avahi='beaglebone.local'
Mar 21 20:18:52 beaglebone msgd:0: zeroconf: registering: 'Log service on beaglebone.local pid 2897'
Mar 21 20:18:53 beaglebone msgd:0: zeroconf: registered 'Log service on beaglebone.local pid 2897' _machinekit._tcp 0 TXT "uuid=a42c8c6b-4025-4f83-ba28-dad21114744a" "instance=3801c576-0e6b-11e7-a045-1cba8cd967d9" "service=log" "dsn=ipc:///tmp/0.log.a42c8c6b-4025-4f83-ba28-dad21114744a"
Mar 21 20:19:05 beaglebone rtapi:0: unload: 'trivkins' not loaded
Mar 21 20:19:05 beaglebone rtapi:0: unload: 'tp' not loaded
Mar 21 20:19:05 beaglebone rtapi:0: unload: 'xhc_hb04_util' not loaded
Mar 21 20:19:05 beaglebone rtapi:0: unload: 'threads' not loaded
Mar 21 20:19:05 beaglebone rtapi:0: unload: 'pwmgen' not loaded
Mar 21 20:19:05 beaglebone rtapi:0: unload: 'motmod' not loaded
Mar 21 20:19:05 beaglebone rtapi:0: unload: 'limit1' not loaded
Mar 21 20:19:05 beaglebone rtapi:0: unload: 'hal_pru_generic' not loaded
Mar 21 20:19:05 beaglebone rtapi:0: unload: 'hal_bb_gpio' not loaded
Mar 21 20:19:05 beaglebone rtapi:0: unload: 'abs' not loaded
Mar 21 20:19:05 beaglebone msgd:0: rtapi_app exit detected - scheduled shutdown
Mar 21 20:19:07 beaglebone msgd:0: msgd shutting down
Mar 21 20:19:07 beaglebone msgd:0: zeroconf: unregistering 'Log service on beaglebone.local pid 2897'
Mar 21 20:19:08 beaglebone msgd:0: log buffer hwm: 0% (0 msgs, 0 bytes out of 524288)
Mar 21 20:19:08 beaglebone msgd:0: normal shutdown - global segment detached
Mar 21 20:22:16 beaglebone rtapi:0: rtapi_app:0: ERROR: cannot attach global segment key=0x154711 No such file or directory
Mar 21 20:22:16 beaglebone rtapi:0: rtapi:0: FATAL - failed to attach to global segment
Mar 21 20:23:03 beaglebone rtapi:0: rtapi_app:0: ERROR: cannot attach global segment key=0x154711 No such file or directory
Mar 21 20:23:03 beaglebone rtapi:0: rtapi:0: FATAL - failed to attach to global segment
Mar 21 20:26:37 beaglebone rtapi:0: rtapi_app:0: ERROR: cannot attach global segment key=0x154711 No such file or directory
Mar 21 20:26:37 beaglebone rtapi:0: rtapi:0: FATAL - failed to attach to global segment

When I start machinekit I get the following printout:

Starting Machinekit...
Starting Machinekit server program: linuxcncsvr
Loading Real Time OS, RTAPI, and HAL_LIB modules
Starting Machinekit IO program: io
io started
halcmd loadusr io started
Loading panther overlay
Loading cape-bone-iio overlay
Shutting down and cleaning up Machinekit...
Killing task linuxcncsvr, PID=1545

xhc-hb04: waiting for XHC-HB04 device
xhc-hb04: found XHC-HB04 device
xhc-hb04: connection lost, cleaning up
[timestamp] [threadID] facility level [function call] <message>
--------------------------------------------------------------------------------
Removing HAL_LIB, RTAPI, and Real Time OS modules
Removing NML shared memory segments
Cleanup done

Debug file information:

PASSED: show pexists xhc-hb04.button-goto-zero, returned Exists
FAILED: show pexists halui.mdi-command-00, returned Imaginary

xhc-hb04.tcl: !!! <halui.mdi-command-00> target pin does not exist, continuing
PASSED: show pexists xhc-hb04.button-half, returned Exists
FAILED: show pexists halui.spindle.stop, returned Imaginary

xhc-hb04.tcl: !!! <halui.spindle.stop> target pin does not exist, continuing
PASSED: show pexists xhc-hb04.button-home, returned Exists
FAILED: show pexists halui.home-all, returned Imaginary
xhc-hb04.tcl: !!! <halui.home-all> target pin does not exist, continuing
PASSED: show pexists xhc-hb04.button-macro-1, returned Exists
FAILED: show pexists halui.mdi-command-01, returned Imaginary
xhc-hb04.tcl: !!! <halui.mdi-command-01> target pin does not exist, continuing
PASSED: show pexists xhc-hb04.button-macro-2, returned Exists
FAILED: show pexists halui.mdi-command-02, returned Imaginary
xhc-hb04.tcl: !!! <halui.mdi-command-02> target pin does not exist, continuing
PASSED: show pexists xhc-hb04.button-macro-3, returned Exists
FAILED: show pexists halui.mdi-command-03, returned Imaginary
xhc-hb04.tcl: !!! <halui.mdi-command-03> target pin does not exist, continuing
PASSED: show pexists xhc-hb04.button-macro-6, returned Exists
FAILED: show pexists halui.mdi-command-06, returned Imaginary

What to do next to bring this pendant to work on my BBB?



test2

schoo...@btinternet.com

unread,
Mar 22, 2017, 3:02:02 AM3/22/17
to machi...@googlegroups.com



On 21/03/2017 19:41, Simon Mali wrote:
I have upgraded the OS with apt-get as you said. When I test proposed sequence I get the following output:

root@beaglebone:/home/machinekit# realtime restart
/usr/libexec/linuxcnc/rtapi_msgd: FATAL - will not run as root

The error messages tell you what is wrong, you cannot run as root.

Simon Mali

unread,
Mar 22, 2017, 4:41:56 PM3/22/17
to Machinekit
I have tested this procedure and it seems to work:

machinekit@beaglebone:~$ realtime start
machinekit@beaglebone:~$ halcmd loadrt debounce
machinekit@beaglebone:~$ halcmd show pexists debounce.0.0.in Exists
Exists
machinekit@beaglebone:~$ halrun -U
machinekit@beaglebone:~$ 

Now is a question how to run this xhc-hb04-layout2_mm.ini file? Probably not through machinekit because this returns an error:

Print file information:
RUN_IN_PLACE=no
LINUXCNC_DIR=
LINUXCNC_BIN_DIR=/usr/bin
LINUXCNC_TCL_DIR=/usr/lib/tcltk/linuxcnc
LINUXCNC_SCRIPT_DIR=
LINUXCNC_RTLIB_DIR=/usr/lib/linuxcnc
LINUXCNC_CONFIG_DIR=
LINUXCNC_LANG_DIR=/usr/share/linuxcnc/tcl/msgs
INIVAR=/usr/libexec/linuxcnc/inivar
HALCMD=halcmd
LINUXCNC_EMCSH=/usr/bin/wish8.5
MACHINEKIT - 0.1
Machine configuration directory is '/home/machinekit/machinekit/configs/machinekit-master/configs/sim/axis/xhc-hb04'
Machine configuration file is 'xhc-hb04-layout2_mm.ini'
INIFILE=/home/machinekit/machinekit/configs/machinekit-master/configs/sim/axis/xhc-hb04/xhc-hb04-layout2_mm.ini
PARAMETER_FILE=sim-9axis.var
TASK=milltask
HALUI=halui
DISPLAY=axis

Starting Machinekit...
Starting Machinekit server program: linuxcncsvr
Loading Real Time OS, RTAPI, and HAL_LIB modules
Starting Machinekit IO program: io
io started
halcmd loadusr io started
Starting HAL User Interface program: halui

Shutting down and cleaning up Machinekit...
Killing task linuxcncsvr, PID=2799

Removing HAL_LIB, RTAPI, and Real Time OS modules
Removing NML shared memory segments
Cleanup done

Debug file information:
Unrecognized line skipped: ../../sim_mm.tblcore_sim9.hal:1: Unknown command '../../../common/core_sim9.hal'
2799
  PID TTY      STAT   TIME COMMAND
Stopping realtime threads
Unloading hal components





schoo...@btinternet.com

unread,
Mar 23, 2017, 3:21:27 AM3/23/17
to machi...@googlegroups.com
Is your ini file the same as this?
https://github.com/machinekit/machinekit/blob/master/configs/sim/axis/xhc-hb04/xhc-hb04-layout2_mm.ini

If not change it so that it is.

It appears to be corrupted, with tool table name and hal file concatenated.

All the files are in this repo,
https://github.com/machinekit/machinekit/blob/master/configs/sim/axis/xhc-hb04
make sure they all match and try again.

There were broken sim links originally, the files referenced were added directly to the sim dir.
It is possible your updating has left old elements too, move anything not in the repo elsewhere.

  PID TTY      STAT   TIME COMMAND
Stopping realtime threads
Unloading hal components





Simon Mali

unread,
Mar 23, 2017, 4:53:46 PM3/23/17
to Machinekit
I have checked the file itself and the whole folder with diff and they all seems to be the same:
machinekit@beaglebone:~/machinekit/configs$ diff -r machinekit-master/configs/sim/axis/xhc-hb04/ orig/machinekit-master/configs/sim/axis/xhc-hb04/
machinekit@beaglebone:~/machinekit/configs$ 

I have also copied original files sim_mm.tbl and core_sim9.hal into this xhc-hb04 folder but the error stays the same:


Debug file information:
Unrecognized line skipped: ../../sim_mm.tblcore_sim9.hal:1: Unknown command '../../../common/core_sim9.hal'

Maybe we should concentrate what is this unknown command in one of both files?

As I have seen that there are some connections to pendant software I was copying some of definitions from core_sim9.hal file into my hal file:

70 net Xpos axis.0.motor-pos-cmd => axis.0.motor-pos-fb ddt_x.in

# position command and feedback
120 net emcmot.00.pos-cmd <= axis.0.motor-pos-cmd
121 net emcmot.00.pos-cmd => hpg.stepgen.00.position-cmd

Numbers are lines of code in hal file. Then I got this printout from machinekit:

Debug file information:
BBB-3D-CNC-axis.hal:120: Pin 'axis.0.motor-pos-cmd' was already linked to signal 'Xpos'

How to solve this problem?


 
 

Bas de Bruijn

unread,
Mar 23, 2017, 5:53:40 PM3/23/17
to Simon Mali, Machinekit


> On 23 Mar 2017, at 21:53, Simon Mali wrote:
>
> I have also copied original files sim_mm.tbl and core_sim9.hal into this xhc-hb04 folder but the error stays the same:
>
> Debug file information:
> Unrecognized line skipped: ../../sim_mm.tblcore_sim9.hal:1: Unknown command '../../../common/core_sim9.hal'

Have you checked paths? Tried using an absolute path? What command refers this message to?

Get the debug output set with 'export DEBUG=5' and start your config.
What does /var/log/linuxcnc.log say? Look at that yourself first for meaningfull messages, then paste that in pastebin.com and show us the link.

schoo...@btinternet.com

unread,
Mar 24, 2017, 4:05:41 AM3/24/17
to machi...@googlegroups.com

On 22/03/17 20:41, Simon Mali wrote:
> Machine configuration directory is
> '/home/machinekit/machinekit/configs/machinekit-master/configs/sim/axis/xhc-hb04'

Looks like you are running the wrong config

The package installed to /usr/share/linuxcnc/examples/sample-configs

You are running the original configs left over from when the image was
built as a RIP in ~/machinekit/machinekit
which are out of date and were not updated by the upgrade

Look carefully at the config chooser and you should have 2 trees, choose
the one in /usr/share

Simon Mali

unread,
Mar 24, 2017, 5:03:45 PM3/24/17
to Machinekit
I have tried with this path and pendant starts to work:
/usr/share/linuxcnc/examples/sample-configs/sim/axis/xhc-hb04/xhc-hb04-layout2.ini
Now is the next step to integrate my project into this project or vice versa? What do you recommend?
@Bas de Bruijn: Thank you for your support.


schoo...@btinternet.com

unread,
Mar 25, 2017, 3:17:04 AM3/25/17
to machi...@googlegroups.com



On 24/03/2017 21:03, Simon Mali wrote:
I have tried with this path and pendant starts to work:
/usr/share/linuxcnc/examples/sample-configs/sim/axis/xhc-hb04/xhc-hb04-layout2.ini
Now is the next step to integrate my project into this project or vice versa? What do you recommend?

You need to add the elements from this sim into your projects sim.

The only way to do this, is to read the files and work out what they do and add the bits you need.
The hal connections are in the .tcl file, just to make things more complicated.
The halui.mdi settings in the .ini file need changing to something useful.

You will greatly assist yourself by experimenting and working it out.  Most is just cut and paste and copying files
but an appreciation of what is happening is needed to get the most out of it

Enjoy


@Bas de Bruijn: Thank you for your support.


Simon Mali

unread,
Mar 30, 2017, 5:17:09 PM3/30/17
to Machinekit
I have managed to import xhc-hb04 pendant into my project. Everything works as expected. @Schooner: Thank you very much for your help!



schoo...@btinternet.com

unread,
Apr 6, 2017, 4:21:16 AM4/6/17
to machi...@googlegroups.com
Sorry, this got lost in spam for no reason I can discern.

Glad you got there, undoubtedly more knowledgeable and confident for the struggle :-)
That is probably the only knowledge that sticks.

regards


On 30/03/17 22:17, Simon Mali wrote:
I have managed to import xhc-hb04 pendant into my project. Everything works as expected. @Schooner: Thank you very much for your help!



Mathias Giacomuzzi

unread,
Apr 11, 2017, 3:52:14 AM4/11/17
to Machinekit
Cool can you share your config?
many thanks.
mathias

Simon Mali

unread,
Apr 17, 2017, 9:22:15 AM4/17/17
to Machinekit
Hello Mathias
Sorry for the late answer, I was quite occupied in the last days. Please see my project files in the attached zip file. I hope it can help you.
Best regards
Simon Mali
 

CNC_3D_UHU_SEM600.ZIP
Reply all
Reply to author
Forward
0 new messages