Xylotex.ini failing to run under Stretch

168 views
Skip to first unread message

mugginsac

unread,
Aug 30, 2018, 2:20:53 PM8/30/18
to Machinekit
I got machinekit loaded to where I can pick the ini file to load. (I am running ssh -X machi...@beaglebone.local.)

I chose Xylotex under ARM.BeagleBone.Xylotex. Is that the correct ini file to load for a Xylotex DB25 cape?

Do Xylotex.ini and Xylotex.hal need some changes to run under Stretch?

It reported a failure on executing setup.sh.

MACHINEKIT - 0.1
Machine configuration directory is '/home/machinekit/machinekit/configs/ARM.BeagleBone.Xylotex'
Machine configuration file is 'Xylotex.ini'
Starting Machinekit...
rtapi_msgd command:  /usr/libexec/linuxcnc/rtapi_msgd --instance=0 --rtmsglevel=1 --usrmsglevel=1 --halsize=524288
rtapi_app command:  /usr/libexec/linuxcnc/rtapi_app_rt-preempt --instance=0
io started
emc/iotask/ioControl.cc 768: can't load tool table.
halcmd loadusr io started
grep: /sys/devices/bone_capemgr.*/slots: No such file or directory
Loading cape-universal overlay
bash: /sys/devices/bone_capemgr.*/slots: No such file or directory
Error loading device tree overlay file: cape-universal
Xylotex.hal:24: program './setup.sh' failed, returned 1
Shutting down and cleaning up Machinekit...
Cleanup done
Machinekit terminated with an error.  You can find more information in the log:
    /home/machinekit/linuxcnc_debug.txt
and
    /home/machinekit/linuxcnc_print.txt
as well as in the output of the shell command 'dmesg' and in the terminal

Robert Nelson

unread,
Aug 30, 2018, 2:34:26 PM8/30/18
to mugginsac, Machinekit Mailing List
On Thu, Aug 30, 2018 at 1:20 PM mugginsac <mugg...@gmail.com> wrote:
>
> I got machinekit loaded to where I can pick the ini file to load. (I am running ssh -X machi...@beaglebone.local.)
>
> I chose Xylotex under ARM.BeagleBone.Xylotex. Is that the correct ini file to load for a Xylotex DB25 cape?
>
> Do Xylotex.ini and Xylotex.hal need some changes to run under Stretch?
>
> It reported a failure on executing setup.sh.
>
> MACHINEKIT - 0.1
> Machine configuration directory is '/home/machinekit/machinekit/configs/ARM.BeagleBone.Xylotex'
> Machine configuration file is 'Xylotex.ini'
> Starting Machinekit...
> rtapi_msgd command: /usr/libexec/linuxcnc/rtapi_msgd --instance=0 --rtmsglevel=1 --usrmsglevel=1 --halsize=524288
> rtapi_app command: /usr/libexec/linuxcnc/rtapi_app_rt-preempt --instance=0
> io started
> emc/iotask/ioControl.cc 768: can't load tool table.
> halcmd loadusr io started
> grep: /sys/devices/bone_capemgr.*/slots: No such file or directory
> Loading cape-universal overlay
> bash: /sys/devices/bone_capemgr.*/slots: No such file or directory
> Error loading device tree overlay file: cape-universal

ps, you can debug u-boot via:

sudo /opt/scripts/tools/version.sh

cape-universal is "auto" loaded in u-boot, thus "bone_capemgr" doesn't
apply anymore..

config-pin is enabled out of the box..

What pins do the Xylotex use?

Just remember to disable internal hardware devices you don't need
(audio/hdmi/etc)...

https://elinux.org/Beagleboard:BeagleBoneBlack_Debian#U-Boot_Disable_on-board_devices

Regards,

--
Robert Nelson
https://rcn-ee.com/

Robert Nelson

unread,
Aug 30, 2018, 2:38:29 PM8/30/18
to mugginsac, Machinekit Mailing List
nuke these lines:

https://github.com/machinekit/machinekit/blob/master/configs/ARM/BeagleBone/Xylotex/setup.sh#L34-L51

and use:

uboot_overlay_pru=/lib/firmware/AM335X-PRU-UIO-00A0.dtbo

in /boot/uEnv.txt

Condit Alan

unread,
Aug 30, 2018, 4:36:48 PM8/30/18
to Robert Nelson, Machinekit Mailing List
Robert,

I didn’t get what bugging u-boot had to do with anything at first. However, I reread you post and then I understood.

On Aug 30, 2018, at 11:33 AM, Robert Nelson <robert...@gmail.com> wrote:
What pins do the Xylotex use?

P8.07 out # gpio2.2 Enable System
P8.10 in # gpio2.4 XLIM
P8.11 out # gpio1.13 X_Dir
P8.12 out # gpio1.12 X_Step
P8.13 out # gpio0.23 PWM0/SPINDLE
P8.14 in # gpio0.26 YLIM
P8.15 out # gpio1.15 Y_Dir
P8.16 out # gpio1.14 Y_Step
P8.18 in # gpio2.1 ZLIM
P8.19 out # gpio0.22 PWM1
P9.14 out # gpio1.18 PWM2
P9.15 out # gpio1.16 Z_Step
P9.23 out # gpio1.17 Z_Dir
# P9.17 out # gpio0.5 SCS
# P9.18 in # gpio0.4 SDI
# P9.21 out # gpio0.3 SDO
# P9.22 out # gpio0.2 SCK
P9.13 out # gpio0.30 A_Dir
P9.11 out # gpio0.31 A_Step
P8.09 in # gpio2.5 STOPin

Condit Alan

unread,
Aug 30, 2018, 4:58:43 PM8/30/18
to Robert Nelson, Machinekit Mailing List
Robert,

I commented out lines 34-51 from setup.sh as you suggested and the line
uboot_overlay_pru=/lib/firmware/AM335X-PRU-UIO-00A0.dtbo
was already in uEnv.txt.

I tried running it again. This time I got

MACHINEKIT - 0.1
Machine configuration directory is '/home/machinekit/machinekit/configs/ARM.BeagleBone.Xylotex'
Machine configuration file is 'Xylotex.ini'
Starting Machinekit...
rtapi_msgd command:  /usr/libexec/linuxcnc/rtapi_msgd --instance=0 --rtmsglevel=1 --usrmsglevel=1 --halsize=524288
rtapi_app command:  /usr/libexec/linuxcnc/rtapi_app_rt-preempt --instance=0
io started
emc/iotask/ioControl.cc 768: can't load tool table.
halcmd loadusr io started
Xylotex.hal:34: insmod failed, returned -1:
rtapi_app_main(motmod): -1 Operation not permitted

See /var/log/linuxcnc.log for more information.
Shutting down and cleaning up Machinekit...
Cleanup done
Machinekit terminated with an error.


On Aug 30, 2018, at 11:38 AM, Robert Nelson <robert...@gmail.com> wrote:

config-pin is enabled out of the box..

What pins do the Xylotex use?

Just remember to disable internal hardware devices you don't need
(audio/hdmi/etc)...

https://elinux.org/Beagleboard:BeagleBoneBlack_Debian#U-Boot_Disable_on-board_devices

nuke these lines:

https://github.com/machinekit/machinekit/blob/master/configs/ARM/BeagleBone/Xylotex/setup.sh#L34-L51

I commented out lines 34-51 in setup.sh.


and use:

uboot_overlay_pru=/lib/firmware/AM335X-PRU-UIO-00A0.dtbo

in /boot/uEnv.txt

This line is already in uEnv.txt.

Condit Alan

unread,
Aug 30, 2018, 6:55:21 PM8/30/18
to Robert Nelson, Machinekit Mailing List
I found a link talking about getting a CRAMPS board working with Stretch. It said you need to replace
#PRUBIN=xenomai/pru_generic.bin
with
PRUBIN=rt-preempt/pru_generic.bin.

Does that apply to the Xylotex DB25 cape also?

I tried it in Xylotex.ini but the errors seemed to be the same either way.


Robert Nelson

unread,
Aug 30, 2018, 9:30:15 PM8/30/18
to mugginsac, Machinekit Mailing List
i thought that was fixed in git..

Condit Alan

unread,
Aug 30, 2018, 10:01:42 PM8/30/18
to Robert Nelson, Machinekit Mailing List
If it is then I am looking at the wrong git:

CRAMPS
[PRUCONF]
DRIVER=hal_pru_generic
CONFIG=pru=0 num_stepgens=4 num_pwmgens=6
PRUBIN=xenomai/pru_generic.bin

Xylotex
[PRUCONF]
DRIVER=hal_pru_generic
CONFIG=pru=1 num_stepgens=4
PRUBIN=xenomai/pru_generic.bin

schoo...@gmail.com

unread,
Aug 31, 2018, 2:05:18 AM8/31/18
to machi...@googlegroups.com

The .ini file is a configuration file for YOUR system.

If you are running a rt-preempt kernel, whereas previous distros would have had a xenomai kernel, YOU need to change things like that.

We do not have turn-key systems rigidly linked to specific hardware and software.

There is no way we can guess how you will do something and on what.

The change Robert referred to I think was the flavor relevant installation, rather than the configs.

If we changed the configs to rt-preempt, they would be wrong for everyone running a Xenomai kernel.

--
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.

Condit Alan

unread,
Aug 31, 2018, 11:19:26 AM8/31/18
to schoo...@gmail.com, machi...@googlegroups.com
Schooner,

I have used Emc2/Linuxcnc for years. I know what an .ini file is. Linuxcnc has a method of separating stuff by what I think you are calling flavors (Jessie, Stretch, etc???). If I want to build a system based on 2.7 I will definitely find something to use as a starting point. Then I will have to choose between Wheezy, Jessie, or Stretch. If I want to build a system based on 2.8 I will get lots of help but maybe not a working config as a starting point. If I want to build a system on Jessie, I can download stuff that at least uses Jessie as a starting point. If I want to build a system on Stretch I can maybe find something someone has done on Stretch. 

So I am trying to build a Machinekit system on Stretch. But I sort of expected that the configs that were released on the Stretch image would at least load — not that they would do what I want to do. So far I haven’t found a single config that uses .hal on Stretch that will even load. That is why I am looking for help and that is why I am trying to post what I find. To help those who follow.

If someone has a working config for Stretch that uses both .ini and .hal, I would love to see it. I really thought that there would be a working config for the CRAMPS board since Charles developed that but no luck there either.

Thanks,
Alan

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/dDVH1TJDFDA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to machinekit+...@googlegroups.com.

schoo...@gmail.com

unread,
Aug 31, 2018, 11:55:42 AM8/31/18
to Condit Alan, machi...@googlegroups.com

On 31/08/18 16:19, Condit Alan wrote:
Schooner,

So I am trying to build a Machinekit system on Stretch. But I sort of expected that the configs that were released on the Stretch image would at least load

There is a basic lack of understanding of the process here

The image is nothing to do with machinekit, it is released by RCN who is an authority on BBB and all things ARM, but he just builds, or installs the packages, for the current Machinekit.

The configs were written or adapted by people using Xenomai on Wheezy most likely.

Doubtless many people have adapted them to run on rt-preempt and Stretch, but no-one has submitted working configs for inclusion in the repo, so they are not there.

I personally do not have a BBB and have no interest in running an under-powered board to do what a proper computer and a FPGA board will do much better,
so these updates won't come from me.


— not that they would do what I want to do. So far I haven’t found a single config that uses .hal on Stretch that will even load. That is why I am looking for help and that is why I am trying to post what I find. To help those who follow.

If you stick with one config that best matches your hardware and follow the guidelines in reporting problems in a post
http://www.machinekit.io/docs/getting-help/
we should be able to help you.

When you switch debugging on, the messages  in the linuxcnc.log and/or dmesg will generally pinpoint the source of the problem.

Robert Nelson

unread,
Aug 31, 2018, 12:10:22 PM8/31/18
to schoo...@gmail.com, mugginsac, Machinekit Mailing List
On Fri, Aug 31, 2018 at 10:55 AM schoo...@gmail.com <schoo...@gmail.com> wrote:

On 31/08/18 16:19, Condit Alan wrote:
Schooner,

So I am trying to build a Machinekit system on Stretch. But I sort of expected that the configs that were released on the Stretch image would at least load

There is a basic lack of understanding of the process here

The image is nothing to do with machinekit, it is released by RCN who is an authority on BBB and all things ARM, but he just builds, or installs the packages, for the current Machinekit.

The configs were written or adapted by people using Xenomai on Wheezy most likely.

Doubtless many people have adapted them to run on rt-preempt and Stretch, but no-one has submitted working configs for inclusion in the repo, so they are not there.

I would take a look at the Replicape-Stretch dir:



and use that for comparison..

I think the old 3.8.13-bone xenomai will be the old default for awhile..

Regards,

Condit Alan

unread,
Aug 31, 2018, 2:30:06 PM8/31/18
to Robert Nelson, schoo...@gmail.com, Machinekit Mailing List
Before I started this project I tried loading config for the Xylotex on the 8.7 image and it wouldn’t load and run either (just errored out immediately). So I figured if I have to debug the configuration either way I may as well try it on Stretch.

I am actually looking for something with a “.hal” configuration. I don’t speak python and really don’t want to learn it. I have written software for years in C, C++, and Objective-C. I really don’t want to spend time learning yet another language. HAL works just fine for me and as far as I am concerned people who are writing configurations in python are just reinventing the wheel.

Doesn’t anybody have a configuration with a “.ini” file and a “.hal” file that load and runs on Stretch and rt_preempt? If not how about something with a “.ini” file and a “.hal” file that loads and runs on Jessie.

mugginsac

unread,
Aug 31, 2018, 2:49:10 PM8/31/18
to Machinekit
The last time I tried to run this is what I found in /var/log/linuxcnc.log.

6.3.0 20170516  version=v0.1~-----~5d86a7e
Aug 31 18:25:01 beaglebone-db25 msgd:0: ØMQ=4.2.1 czmq=4.0.2 protobuf=3.0.0 atomics=gcc intrinsics    libwebsockets=2.0.3
Aug 31 18:25:01 beaglebone-db25 msgd:0: configured: sha=5d86a7e
Aug 31 18:25:01 beaglebone-db25 msgd:0: built:      Jul 24 2018 16:00:52 sha=5d86a7e
Aug 31 18:25:01 beaglebone-db25 msgd:0: register_stuff: actual hostname as announced by avahi='beaglebone-db25.local'
Aug 31 18:25:01 beaglebone-db25 msgd:0: zeroconf: registering: 'Log service on beaglebone-db25.local pid 2560'
Aug 31 18:25:02 beaglebone-db25 msgd:0: zeroconf: registered 'Log service on beaglebone-db25.local pid 2560' _machinekit._tcp 0 TXT "uuid=a42c8c6b-4025-4f83-ba28-dad21114744a" "instance=2cb2224e-ad4b-11e8-9406-9059af5aa845" "service=log" "dsn=ipc:///tmp/0.log.a42c8c6b-4025-4f83-ba28-dad21114744a"
Aug 31 18:25:04 beaglebone-db25 rtapi:0: rtapi_app_main(motmod): -1 Operation not permitted
Aug 31 18:25:10 beaglebone-db25 rtapi:0: unload: 'trivkins' not loaded
Aug 31 18:25:10 beaglebone-db25 msgd:0: rtapi_app exit detected - scheduled shutdown
Aug 31 18:25:12 beaglebone-db25 msgd:0: msgd shutting down
Aug 31 18:25:12 beaglebone-db25 msgd:0: zeroconf: unregistering 'Log service on beaglebone-db25.local pid 2560'
Aug 31 18:25:12 beaglebone-db25 msgd:0: log buffer hwm: 0% (0 msgs, 0 bytes out of 524288)
Aug 31 18:25:12 beaglebone-db25 msgd:0: normal shutdown - global segment detached

This is what I saw in /home/machinekit/linuxcnc_print.txt:
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.6
INIFILE=/home/machinekit/machinekit/configs/ARM.BeagleBone.Xylotex/Xylotex.ini
PARAMETER_FILE=pru-stepper.var
TASK=milltask
HALUI=halui
DISPLAY=axis
Starting Machinekit server program: linuxcncsvr
Loading Real Time OS, RTAPI, and HAL_LIB modules
Starting Machinekit IO program: io
Starting HAL User Interface program: halui
Killing task linuxcncsvr, PID=2538
Removing HAL_LIB, RTAPI, and Real Time OS modules
Removing NML shared memory segments

The only things that I noticed was something about trying to unload trivikins (not loaded). Does trivikins need to be loaded? If so, where?
The other thing was it apparently stopped after parsing HALUI.
Does this give anyone any clues?

Message has been deleted

schoo...@gmail.com

unread,
Sep 1, 2018, 4:13:04 AM9/1/18
to machi...@googlegroups.com
You haven't even said which config you are running, we can't guess that it was the last, amongst many you have mentioned.

Please attach YOUR copies of all the hal files and the ini file
(in case you have done something stupid like editing it with microsoft word)

Open a terminal, run 'sudo > /var/log/linuxcnc.log' then  run 'export DEBUG=5'
Then start machinekit from the same terminal session.

Then attach the whole resultant linuxcnc.log too.

If an error mentioning 'segmentation fault' or 'general protection fault' is displayed,
attach dmsg (run 'dmsg > dmsg.txt')

I have an inkling as to what this error is, but am not going to speculate.


On 31/08/18 23:15, mugginsac wrote:
It looks like it may be failing on insmod of motmod.

This is the line in the Xylotex.hal file that the message points to:
loadrt [EMCMOT]EMCMOT servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[TRAJ]AXES

Bas de Bruijn

unread,
Sep 1, 2018, 5:08:11 AM9/1/18
to schoo...@gmail.com, machi...@googlegroups.com


On 1 Sep 2018, at 10:13, "schoo...@gmail.com" <schoo...@gmail.com> wrote:

You haven't even said which config you are running, we can't guess that it was the last, amongst many you have mentioned.

Please attach YOUR copies of all the hal files and the ini file
(in case you have done something stupid like editing it with microsoft word)

Open a terminal, run 'sudo > /var/log/linuxcnc.log' then  run 'export DEBUG=5'
Then start machinekit from the same terminal session.

Then attach the whole resultant linuxcnc.log too.

If an error mentioning 'segmentation fault' or 'general protection fault' is displayed,
attach dmsg (run 'dmsg > dmsg.txt')

I have an inkling as to what this error is, but am not going to speculate.


On 31/08/18 23:15, mugginsac wrote:
It looks like it may be failing on insmod of motmod.

This is the line in the Xylotex.hal file that the message points to:
loadrt [EMCMOT]EMCMOT servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[TRAJ]AXES

Without more info: I think your problem is the same as another poster a few weeks ago. You have not loaded trivkins kinematics and haven’t told the trajectory planner which kinematics to use.

See this thread my comment on July 27th

Condit Alan

unread,
Sep 1, 2018, 11:18:15 AM9/1/18
to schoo...@gmail.com, Machinekit Mailing List
Schooner,

The title to the thread is Xylotex.ini failing to run under Stretch.
I showed the output:
MACHINEKIT - 0.1
Machine configuration directory is '/home/machinekit/machinekit/configs/ARM.BeagleBone.Xylotex'
Machine configuration file is 'Xylotex.ini'

So I don’t know how I was to more clearly tell you what configuration I am working on.

Having programmed for years I know better than to use a non-text editor on source code.

Alan
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/dDVH1TJDFDA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to machinekit+...@googlegroups.com.

Condit Alan

unread,
Sep 1, 2018, 11:44:03 AM9/1/18
to Bas de Bruijn, schoo...@gmail.com, machi...@googlegroups.com
Bas,

I modified Xylotex.ini as follows:
#PRUBIN=xenomai/pru_generic.bin
PRUBIN=rt-preempt/pru_generic.bin

and Xylotex.hal as follows
#loadusr -w /home/machinekit/machinekit/configs/ARM.BeagleBone.Xylotex/setup.sh
loadusr -w ./setup.sh

#loadrt hal_bb_gpio output_pins=107,113,119,126,214 input_pins=109,110,114,118,241
loadrt hal_bb_gpio output_pins=807,811,812,813,815,816,819,914,915,923,913,911 input_pins=809,810,814,818

#loadrt [PRUCONF](DRIVER) prucode=$(HAL_RTMOD_DIR)/[PRUCONF](PRUBIN) [PRUCONF](CONFIG)
loadrt [PRUCONF](DRIVER) prucode=$(LINUXCNC_HOME)/[PRUCONF](PRUBIN) [PRUCONF](CONFIG) pru_period=25000

I just added "loadrt tp" before this run.

I am suspicious of some of the pin numbers for the step and dir pins. I don’t know if the change in numbering scheme affects them or not.

Here is the output to the console from the last attempted run:
MACHINEKIT - 0.1
Machine configuration directory is '/home/machinekit/machinekit/configs/ARM.BeagleBone.Xylotex'
Machine configuration file is 'Xylotex.ini'
Starting Machinekit...
rtapi_msgd command:  /usr/libexec/linuxcnc/rtapi_msgd --instance=0 --rtmsglevel=5 --usrmsglevel=5 --halsize=524288
rtapi_app command:  /usr/libexec/linuxcnc/rtapi_app_rt-preempt --instance=0
io started
<commandline>:0: Component 'iocontrol' ready
<commandline>:0: Program 'io' started
emc/iotask/ioControl.cc 768: can't load tool table.
halcmd loadusr io started
<commandline>:0: Component 'halui' ready
<commandline>:0: Program 'halui' started
Xylotex.hal:25: Program './setup.sh' finished
Xylotex.hal:31: Realtime module 'trivkins' loaded
Xylotex.hal:34: Realtime module 'tp' loaded
Xylotex.hal:37: Realtime module 'motmod' loaded
Xylotex.hal:41: Realtime module 'hal_bb_gpio' loaded
Xylotex.hal:44: insmod failed, returned -1:
rtapi_app_main(hal_pru_generic): -1 Operation not permitted

See /var/log/linuxcnc.log for more information.
Shutting down and cleaning up Machinekit...
<commandline>:0: Realtime threads stopped
<commandline>:0: Realtime module 'hal_bb_gpio' unloaded
<commandline>:0: Realtime module 'motmod' unloaded
<commandline>:0: Realtime module 'tp' unloaded
<commandline>:0: Realtime module 'trivkins' unloaded
Cleanup done
Machinekit terminated with an error.  You can find more information in the log:
    /home/machinekit/linuxcnc_debug.txt
and
    /home/machinekit/linuxcnc_print.txt
as well as in the output of the shell command 'dmesg' and in the terminal

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/dDVH1TJDFDA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to machinekit+...@googlegroups.com.

schoo...@gmail.com

unread,
Sep 1, 2018, 1:00:25 PM9/1/18
to Condit Alan, Machinekit Mailing List
You have mentioned Xylotex and CRAMPS in the course of the thread, I was trying to get you to be explicit.

The other reason for having YOUR copies of the config files is in case they have been altered or are corrupted.

Sorry if you think I am teaching you to 'suck eggs',  as you didn't provide anything else I asked for, I'll leave you
to get on with it.

Bas de Bruijn

unread,
Sep 1, 2018, 1:11:18 PM9/1/18
to Condit Alan, machi...@googlegroups.com
Line 791

Sep  1 15:07:30 beaglebone-db25 rtapi:0: 1:rtapi_app:2296:user hal_pru_generic: cant find /usr/rt-preempt/pru_generic.bin in /home/machinekit/machinekit/configs/ARM.BeagleBone.Xylotex or /lib/firmware/pru/
Sep  1 15:07:30 beaglebone-db25 rtapi:0: 1:rtapi_app:2296:user hpg: ERROR: failed to initialize PRU

The debug output in /var/log/linuxcnc.log usually gives the best info, so spitting that one thru is very important. So you should find out where the file resides. Something like `sudo find / -name pru*` usually gets you on track.

Condit Alan

unread,
Sep 1, 2018, 1:59:47 PM9/1/18
to Bas de Bruijn, machi...@googlegroups.com
Bas,

I fixed that but now it is blowing up on this line:
loadrt pid num_chan=4

The text of the documentation on pid still shows 'num_chan=‘ but I’m wondering from the other text showing options if it has actually been changed.

MACHINEKIT - 0.1
Machine configuration directory is '/home/machinekit/machinekit/configs/ARM.BeagleBone.Xylotex'
Machine configuration file is 'Xylotex.ini'
Starting Machinekit...
rtapi_msgd command:  /usr/libexec/linuxcnc/rtapi_msgd --instance=0 --rtmsglevel=5 --usrmsglevel=5 --halsize=524288
rtapi_app command:  /usr/libexec/linuxcnc/rtapi_app_rt-preempt --instance=0
io started
emc/iotask/ioControl.cc 768: can't load tool table.
<commandline>:0: Component 'iocontrol' ready
<commandline>:0: Program 'io' started
halcmd loadusr io started
<commandline>:0: Component 'halui' ready
<commandline>:0: Program 'halui' started
Xylotex.hal:25: Program './setup.sh' finished
Xylotex.hal:31: Realtime module 'trivkins' loaded
Xylotex.hal:34: Realtime module 'tp' loaded
Xylotex.hal:37: Realtime module 'motmod' loaded
Xylotex.hal:41: Realtime module 'hal_bb_gpio' loaded
Xylotex.hal:44: Realtime module 'hal_pru_generic' loaded
Xylotex.hal:45: 
Invalid argument 'num_chan=4' to instantiated component
NB. Use of personality or cfg is deprecated

Shutting down and cleaning up Machinekit...
<commandline>:0: Realtime threads stopped
<commandline>:0: Realtime module 'hal_bb_gpio' unloaded
<commandline>:0: Realtime module 'hal_pru_generic' unloaded
<commandline>:0: Realtime module 'motmod' unloaded
<commandline>:0: Realtime module 'tp' unloaded
<commandline>:0: Realtime module 'trivkins' unloaded
Cleanup done
Machinekit terminated with an error.  You can find more information in the log:
    /home/machinekit/linuxcnc_debug.txt
and
    /home/machinekit/linuxcnc_print.txt
as well as in the output of the shell command 'dmesg' and in the terminal

mugginsac

unread,
Sep 1, 2018, 3:02:08 PM9/1/18
to Machinekit
I changed:
loadrt pid num_chan=4
to
loadrt pid count=4
and now it gets past that. Documentation description should be fixed and maybe add someone besides John Kasunich as the guilty party for the change???

Now it doesn't like
net home-a bb_gpio.p9.in-41 => axis.3.home-sw-in

So what is the current correct way to do this?

Bas de Bruijn

unread,
Sep 2, 2018, 6:13:24 AM9/2/18
to mugginsac, Machinekit
“Doesn’t like” is an insufficient message.
Nobody can see what is happening.
See /var/log/linuxcnc.log

Condit Alan

unread,
Sep 2, 2018, 11:25:23 AM9/2/18
to Bas de Bruijn, Machinekit
Sorry,

The pin was missing from bb_gpio. I think I have all the pins fixed now, but it is still blowing out. Does it look like something related to GLX is missing from the BeagleBone?

MACHINEKIT - 0.1
Machine configuration directory is '/home/machinekit/machinekit/configs/ARM.BeagleBone.Xylotex'
Machine configuration file is 'Xylotex.ini'
Starting Machinekit...
rtapi_msgd command:  /usr/libexec/linuxcnc/rtapi_msgd --instance=0 --rtmsglevel=5 --usrmsglevel=5 --halsize=524288
rtapi_app command:  /usr/libexec/linuxcnc/rtapi_app_rt-preempt --instance=0
io started
emc/iotask/ioControl.cc 768: can't load tool table.
<commandline>:0: Component 'iocontrol' ready
<commandline>:0: Program 'io' started
halcmd loadusr io started
<commandline>:0: Component 'halui' ready
<commandline>:0: Program 'halui' started
Xylotex.hal:25: Program './setup.sh' finished
Xylotex.hal:31: Realtime module 'trivkins' loaded
Xylotex.hal:34: Realtime module 'tp' loaded
Xylotex.hal:37: Realtime module 'motmod' loaded
Xylotex.hal:41: Realtime module 'hal_bb_gpio' loaded
Xylotex.hal:44: Realtime module 'hal_pru_generic' loaded
Xylotex.hal:46: Realtime module 'pid' loaded
Xylotex.hal:47: Realtime module 'limit1' loaded
Xylotex.hal:53: Function 'hal_pru_generic.capture-position' added to thread 'servo-thread', rmb=0 wmb=0
Xylotex.hal:54: Function 'bb_gpio.read' added to thread 'servo-thread', rmb=0 wmb=0
Xylotex.hal:55: Function 'motion-command-handler' added to thread 'servo-thread', rmb=0 wmb=0
Xylotex.hal:56: Function 'motion-controller' added to thread 'servo-thread', rmb=0 wmb=0
Xylotex.hal:58: Function 'pid.0.do-pid-calcs' added to thread 'servo-thread', rmb=0 wmb=0
Xylotex.hal:59: Function 'pid.1.do-pid-calcs' added to thread 'servo-thread', rmb=0 wmb=0
Xylotex.hal:60: Function 'pid.2.do-pid-calcs' added to thread 'servo-thread', rmb=0 wmb=0
Xylotex.hal:61: Function 'pid.3.do-pid-calcs' added to thread 'servo-thread', rmb=0 wmb=0
Xylotex.hal:62: Function 'limit1.0' added to thread 'servo-thread', rmb=0 wmb=0
Xylotex.hal:63: Function 'limit1.1' added to thread 'servo-thread', rmb=0 wmb=0
Xylotex.hal:64: Function 'hal_pru_generic.update' added to thread 'servo-thread', rmb=0 wmb=0
Xylotex.hal:65: Function 'bb_gpio.write' added to thread 'servo-thread', rmb=0 wmb=0
Xylotex.hal:76: Signal 'emcmot.00.enable' set to FALSE
Xylotex.hal:78: Pin 'axis.0.amp-enable-out' linked to signal 'emcmot.00.enable'
Xylotex.hal:79: Pin 'hal_pru_generic.stepgen.00.enable' linked to signal 'emcmot.00.enable'
Xylotex.hal:79: Pin 'pid.0.enable' linked to signal 'emcmot.00.enable'
Xylotex.hal:82: Pin 'axis.0.motor-pos-cmd' linked to signal 'emcmot.00.pos-cmd'
Xylotex.hal:82: Pin 'pid.0.command' linked to signal 'emcmot.00.pos-cmd'
Xylotex.hal:83: Pin 'axis.0.joint-vel-cmd' linked to signal 'emcmot.00.vel-cmd'
Xylotex.hal:83: Pin 'pid.0.command-deriv' linked to signal 'emcmot.00.vel-cmd'
Xylotex.hal:84: Pin 'hal_pru_generic.stepgen.00.position-fb' linked to signal 'motor.00.pos-fb'
Xylotex.hal:84: Pin 'axis.0.motor-pos-fb' linked to signal 'motor.00.pos-fb'
Xylotex.hal:84: Pin 'pid.0.feedback' linked to signal 'motor.00.pos-fb'
Xylotex.hal:85: Pin 'pid.0.output' linked to signal 'motor.00.command'
Xylotex.hal:85: Pin 'hal_pru_generic.stepgen.00.velocity-cmd' linked to signal 'motor.00.command'
Xylotex.hal:86: setting parameter 'pid.0.error-previous-target' to 'true'
Xylotex.hal:86: Pin 'pid.0.error-previous-target' set to true
Xylotex.hal:87: setting parameter 'pid.0.maxerror' to '.001'
Xylotex.hal:87: Pin 'pid.0.maxerror' set to .001
Xylotex.hal:90: setting parameter 'hal_pru_generic.stepgen.00.dirsetup' to '25000'
Xylotex.hal:90: Pin 'hal_pru_generic.stepgen.00.dirsetup' set to 25000
Xylotex.hal:91: setting parameter 'hal_pru_generic.stepgen.00.dirhold' to '25000'
Xylotex.hal:91: Pin 'hal_pru_generic.stepgen.00.dirhold' set to 25000
Xylotex.hal:93: setting parameter 'hal_pru_generic.stepgen.00.steplen' to '25000'
Xylotex.hal:93: Pin 'hal_pru_generic.stepgen.00.steplen' set to 25000
Xylotex.hal:94: setting parameter 'hal_pru_generic.stepgen.00.stepspace' to '25000'
Xylotex.hal:94: Pin 'hal_pru_generic.stepgen.00.stepspace' set to 25000
Xylotex.hal:96: setting parameter 'hal_pru_generic.stepgen.00.position-scale' to '2000'
Xylotex.hal:96: Pin 'hal_pru_generic.stepgen.00.position-scale' set to 2000
Xylotex.hal:98: setting parameter 'hal_pru_generic.stepgen.00.maxvel' to '2.6'
Xylotex.hal:98: Pin 'hal_pru_generic.stepgen.00.maxvel' set to 2.6
Xylotex.hal:99: setting parameter 'hal_pru_generic.stepgen.00.maxaccel' to '18.75'
Xylotex.hal:99: Pin 'hal_pru_generic.stepgen.00.maxaccel' set to 18.75
Xylotex.hal:101: setting parameter 'hal_pru_generic.stepgen.00.control-type' to '1'
Xylotex.hal:101: Pin 'hal_pru_generic.stepgen.00.control-type' set to 1
Xylotex.hal:102: setting parameter 'hal_pru_generic.stepgen.00.stepinvert' to '0'
Xylotex.hal:102: Pin 'hal_pru_generic.stepgen.00.stepinvert' set to 0
Xylotex.hal:104: setting parameter 'hal_pru_generic.stepgen.00.steppin' to '812'
Xylotex.hal:104: Pin 'hal_pru_generic.stepgen.00.steppin' set to 812
Xylotex.hal:105: setting parameter 'hal_pru_generic.stepgen.00.dirpin' to '811'
Xylotex.hal:105: Pin 'hal_pru_generic.stepgen.00.dirpin' set to 811
Xylotex.hal:108: setting parameter 'pid.0.Pgain' to '50'
Xylotex.hal:108: Pin 'pid.0.Pgain' set to 50
Xylotex.hal:109: setting parameter 'pid.0.Igain' to '0'
Xylotex.hal:109: Pin 'pid.0.Igain' set to 0
Xylotex.hal:110: setting parameter 'pid.0.Dgain' to '0'
Xylotex.hal:110: Pin 'pid.0.Dgain' set to 0
Xylotex.hal:111: setting parameter 'pid.0.bias' to '0'
Xylotex.hal:111: Pin 'pid.0.bias' set to 0
Xylotex.hal:112: setting parameter 'pid.0.FF0' to '0'
Xylotex.hal:112: Pin 'pid.0.FF0' set to 0
Xylotex.hal:113: setting parameter 'pid.0.FF1' to '1'
Xylotex.hal:113: Pin 'pid.0.FF1' set to 1
Xylotex.hal:114: setting parameter 'pid.0.FF2' to '0'
Xylotex.hal:114: Pin 'pid.0.FF2' set to 0
Xylotex.hal:115: setting parameter 'pid.0.deadband' to '0'
Xylotex.hal:115: Pin 'pid.0.deadband' set to 0
Xylotex.hal:116: setting parameter 'pid.0.maxoutput' to '0'
Xylotex.hal:116: Pin 'pid.0.maxoutput' set to 0
Xylotex.hal:119: Pin 'bb_gpio.p8.in-10' linked to signal 'home-x'
Xylotex.hal:119: Pin 'axis.0.home-sw-in' linked to signal 'home-x'
Xylotex.hal:127: Signal 'emcmot.01.enable' set to FALSE
Xylotex.hal:129: Pin 'axis.1.amp-enable-out' linked to signal 'emcmot.01.enable'
Xylotex.hal:130: Pin 'hal_pru_generic.stepgen.01.enable' linked to signal 'emcmot.01.enable'
Xylotex.hal:130: Pin 'pid.1.enable' linked to signal 'emcmot.01.enable'
Xylotex.hal:133: Pin 'axis.1.motor-pos-cmd' linked to signal 'emcmot.01.pos-cmd'
Xylotex.hal:133: Pin 'pid.1.command' linked to signal 'emcmot.01.pos-cmd'
Xylotex.hal:134: Pin 'axis.1.joint-vel-cmd' linked to signal 'emcmot.01.vel-cmd'
Xylotex.hal:134: Pin 'pid.1.command-deriv' linked to signal 'emcmot.01.vel-cmd'
Xylotex.hal:135: Pin 'hal_pru_generic.stepgen.01.position-fb' linked to signal 'motor.01.pos-fb'
Xylotex.hal:135: Pin 'axis.1.motor-pos-fb' linked to signal 'motor.01.pos-fb'
Xylotex.hal:135: Pin 'pid.1.feedback' linked to signal 'motor.01.pos-fb'
Xylotex.hal:136: Pin 'pid.1.output' linked to signal 'motor.01.command'
Xylotex.hal:136: Pin 'hal_pru_generic.stepgen.01.velocity-cmd' linked to signal 'motor.01.command'
Xylotex.hal:137: setting parameter 'pid.1.error-previous-target' to 'true'
Xylotex.hal:137: Pin 'pid.1.error-previous-target' set to true
Xylotex.hal:138: setting parameter 'pid.1.maxerror' to '.001'
Xylotex.hal:138: Pin 'pid.1.maxerror' set to .001
Xylotex.hal:141: setting parameter 'hal_pru_generic.stepgen.01.dirsetup' to '25000'
Xylotex.hal:141: Pin 'hal_pru_generic.stepgen.01.dirsetup' set to 25000
Xylotex.hal:142: setting parameter 'hal_pru_generic.stepgen.01.dirhold' to '25000'
Xylotex.hal:142: Pin 'hal_pru_generic.stepgen.01.dirhold' set to 25000
Xylotex.hal:144: setting parameter 'hal_pru_generic.stepgen.01.steplen' to '25000'
Xylotex.hal:144: Pin 'hal_pru_generic.stepgen.01.steplen' set to 25000
Xylotex.hal:145: setting parameter 'hal_pru_generic.stepgen.01.stepspace' to '25000'
Xylotex.hal:145: Pin 'hal_pru_generic.stepgen.01.stepspace' set to 25000
Xylotex.hal:147: setting parameter 'hal_pru_generic.stepgen.01.position-scale' to '2000'
Xylotex.hal:147: Pin 'hal_pru_generic.stepgen.01.position-scale' set to 2000
Xylotex.hal:149: setting parameter 'hal_pru_generic.stepgen.01.maxvel' to '2.6'
Xylotex.hal:149: Pin 'hal_pru_generic.stepgen.01.maxvel' set to 2.6
Xylotex.hal:150: setting parameter 'hal_pru_generic.stepgen.01.maxaccel' to '18.75'
Xylotex.hal:150: Pin 'hal_pru_generic.stepgen.01.maxaccel' set to 18.75
Xylotex.hal:152: setting parameter 'hal_pru_generic.stepgen.01.control-type' to '1'
Xylotex.hal:152: Pin 'hal_pru_generic.stepgen.01.control-type' set to 1
Xylotex.hal:153: setting parameter 'hal_pru_generic.stepgen.01.stepinvert' to '0'
Xylotex.hal:153: Pin 'hal_pru_generic.stepgen.01.stepinvert' set to 0
Xylotex.hal:155: setting parameter 'hal_pru_generic.stepgen.01.steppin' to '816'
Xylotex.hal:155: Pin 'hal_pru_generic.stepgen.01.steppin' set to 816
Xylotex.hal:156: setting parameter 'hal_pru_generic.stepgen.01.dirpin' to '815'
Xylotex.hal:156: Pin 'hal_pru_generic.stepgen.01.dirpin' set to 815
Xylotex.hal:159: setting parameter 'pid.1.Pgain' to '50'
Xylotex.hal:159: Pin 'pid.1.Pgain' set to 50
Xylotex.hal:160: setting parameter 'pid.1.Igain' to '0'
Xylotex.hal:160: Pin 'pid.1.Igain' set to 0
Xylotex.hal:161: setting parameter 'pid.1.Dgain' to '0'
Xylotex.hal:161: Pin 'pid.1.Dgain' set to 0
Xylotex.hal:162: setting parameter 'pid.1.bias' to '0'
Xylotex.hal:162: Pin 'pid.1.bias' set to 0
Xylotex.hal:163: setting parameter 'pid.1.FF0' to '0'
Xylotex.hal:163: Pin 'pid.1.FF0' set to 0
Xylotex.hal:164: setting parameter 'pid.1.FF1' to '1'
Xylotex.hal:164: Pin 'pid.1.FF1' set to 1
Xylotex.hal:165: setting parameter 'pid.1.FF2' to '0'
Xylotex.hal:165: Pin 'pid.1.FF2' set to 0
Xylotex.hal:166: setting parameter 'pid.1.deadband' to '0'
Xylotex.hal:166: Pin 'pid.1.deadband' set to 0
Xylotex.hal:167: setting parameter 'pid.1.maxoutput' to '0'
Xylotex.hal:167: Pin 'pid.1.maxoutput' set to 0
Xylotex.hal:170: Pin 'bb_gpio.p8.in-14' linked to signal 'home-y'
Xylotex.hal:170: Pin 'axis.1.home-sw-in' linked to signal 'home-y'
Xylotex.hal:177: Signal 'emcmot.02.enable' set to FALSE
Xylotex.hal:179: Pin 'axis.2.amp-enable-out' linked to signal 'emcmot.02.enable'
Xylotex.hal:180: Pin 'hal_pru_generic.stepgen.02.enable' linked to signal 'emcmot.02.enable'
Xylotex.hal:180: Pin 'pid.2.enable' linked to signal 'emcmot.02.enable'
Xylotex.hal:183: Pin 'axis.2.motor-pos-cmd' linked to signal 'emcmot.02.pos-cmd'
Xylotex.hal:183: Pin 'pid.2.command' linked to signal 'emcmot.02.pos-cmd'
Xylotex.hal:184: Pin 'axis.2.joint-vel-cmd' linked to signal 'emcmot.02.vel-cmd'
Xylotex.hal:184: Pin 'pid.2.command-deriv' linked to signal 'emcmot.02.vel-cmd'
Xylotex.hal:185: Pin 'hal_pru_generic.stepgen.02.position-fb' linked to signal 'motor.02.pos-fb'
Xylotex.hal:185: Pin 'axis.2.motor-pos-fb' linked to signal 'motor.02.pos-fb'
Xylotex.hal:185: Pin 'pid.2.feedback' linked to signal 'motor.02.pos-fb'
Xylotex.hal:186: Pin 'pid.2.output' linked to signal 'motor.02.command'
Xylotex.hal:186: Pin 'hal_pru_generic.stepgen.02.velocity-cmd' linked to signal 'motor.02.command'
Xylotex.hal:187: setting parameter 'pid.2.error-previous-target' to 'true'
Xylotex.hal:187: Pin 'pid.2.error-previous-target' set to true
Xylotex.hal:188: setting parameter 'pid.2.maxerror' to '.001'
Xylotex.hal:188: Pin 'pid.2.maxerror' set to .001
Xylotex.hal:191: setting parameter 'hal_pru_generic.stepgen.02.dirsetup' to '25000'
Xylotex.hal:191: Pin 'hal_pru_generic.stepgen.02.dirsetup' set to 25000
Xylotex.hal:192: setting parameter 'hal_pru_generic.stepgen.02.dirhold' to '25000'
Xylotex.hal:192: Pin 'hal_pru_generic.stepgen.02.dirhold' set to 25000
Xylotex.hal:194: setting parameter 'hal_pru_generic.stepgen.02.steplen' to '25000'
Xylotex.hal:194: Pin 'hal_pru_generic.stepgen.02.steplen' set to 25000
Xylotex.hal:195: setting parameter 'hal_pru_generic.stepgen.02.stepspace' to '25000'
Xylotex.hal:195: Pin 'hal_pru_generic.stepgen.02.stepspace' set to 25000
Xylotex.hal:197: setting parameter 'hal_pru_generic.stepgen.02.position-scale' to '8000'
Xylotex.hal:197: Pin 'hal_pru_generic.stepgen.02.position-scale' set to 8000
Xylotex.hal:199: setting parameter 'hal_pru_generic.stepgen.02.maxvel' to '1.2'
Xylotex.hal:199: Pin 'hal_pru_generic.stepgen.02.maxvel' set to 1.2
Xylotex.hal:200: setting parameter 'hal_pru_generic.stepgen.02.maxaccel' to '18.75'
Xylotex.hal:200: Pin 'hal_pru_generic.stepgen.02.maxaccel' set to 18.75
Xylotex.hal:202: setting parameter 'hal_pru_generic.stepgen.02.control-type' to '1'
Xylotex.hal:202: Pin 'hal_pru_generic.stepgen.02.control-type' set to 1
Xylotex.hal:203: setting parameter 'hal_pru_generic.stepgen.02.stepinvert' to '0'
Xylotex.hal:203: Pin 'hal_pru_generic.stepgen.02.stepinvert' set to 0
Xylotex.hal:205: setting parameter 'hal_pru_generic.stepgen.02.steppin' to '915'
Xylotex.hal:205: Pin 'hal_pru_generic.stepgen.02.steppin' set to 915
Xylotex.hal:206: setting parameter 'hal_pru_generic.stepgen.02.dirpin' to '923'
Xylotex.hal:206: Pin 'hal_pru_generic.stepgen.02.dirpin' set to 923
Xylotex.hal:209: setting parameter 'pid.2.Pgain' to '50'
Xylotex.hal:209: Pin 'pid.2.Pgain' set to 50
Xylotex.hal:210: setting parameter 'pid.2.Igain' to '0'
Xylotex.hal:210: Pin 'pid.2.Igain' set to 0
Xylotex.hal:211: setting parameter 'pid.2.Dgain' to '0'
Xylotex.hal:211: Pin 'pid.2.Dgain' set to 0
Xylotex.hal:212: setting parameter 'pid.2.bias' to '0'
Xylotex.hal:212: Pin 'pid.2.bias' set to 0
Xylotex.hal:213: setting parameter 'pid.2.FF0' to '0'
Xylotex.hal:213: Pin 'pid.2.FF0' set to 0
Xylotex.hal:214: setting parameter 'pid.2.FF1' to '1'
Xylotex.hal:214: Pin 'pid.2.FF1' set to 1
Xylotex.hal:215: setting parameter 'pid.2.FF2' to '0'
Xylotex.hal:215: Pin 'pid.2.FF2' set to 0
Xylotex.hal:216: setting parameter 'pid.2.deadband' to '0'
Xylotex.hal:216: Pin 'pid.2.deadband' set to 0
Xylotex.hal:217: setting parameter 'pid.2.maxoutput' to '0'
Xylotex.hal:217: Pin 'pid.2.maxoutput' set to 0
Xylotex.hal:220: Pin 'bb_gpio.p8.in-18' linked to signal 'home-z'
Xylotex.hal:220: Pin 'axis.2.home-sw-in' linked to signal 'home-z'
Xylotex.hal:227: Signal 'emcmot.03.enable' set to FALSE
Xylotex.hal:229: Pin 'axis.3.amp-enable-out' linked to signal 'emcmot.03.enable'
Xylotex.hal:230: Pin 'hal_pru_generic.stepgen.03.enable' linked to signal 'emcmot.03.enable'
Xylotex.hal:230: Pin 'pid.3.enable' linked to signal 'emcmot.03.enable'
Xylotex.hal:233: Pin 'axis.3.motor-pos-cmd' linked to signal 'emcmot.03.pos-cmd'
Xylotex.hal:233: Pin 'pid.3.command' linked to signal 'emcmot.03.pos-cmd'
Xylotex.hal:234: Pin 'axis.3.joint-vel-cmd' linked to signal 'emcmot.03.vel-cmd'
Xylotex.hal:234: Pin 'pid.3.command-deriv' linked to signal 'emcmot.03.vel-cmd'
Xylotex.hal:235: Pin 'hal_pru_generic.stepgen.03.position-fb' linked to signal 'motor.03.pos-fb'
Xylotex.hal:235: Pin 'axis.3.motor-pos-fb' linked to signal 'motor.03.pos-fb'
Xylotex.hal:235: Pin 'pid.3.feedback' linked to signal 'motor.03.pos-fb'
Xylotex.hal:236: Pin 'pid.3.output' linked to signal 'motor.03.command'
Xylotex.hal:236: Pin 'hal_pru_generic.stepgen.03.velocity-cmd' linked to signal 'motor.03.command'
Xylotex.hal:237: setting parameter 'pid.3.error-previous-target' to 'true'
Xylotex.hal:237: Pin 'pid.3.error-previous-target' set to true
Xylotex.hal:238: setting parameter 'pid.3.maxerror' to '.001'
Xylotex.hal:238: Pin 'pid.3.maxerror' set to .001
Xylotex.hal:241: setting parameter 'hal_pru_generic.stepgen.03.dirsetup' to '25000'
Xylotex.hal:241: Pin 'hal_pru_generic.stepgen.03.dirsetup' set to 25000
Xylotex.hal:242: setting parameter 'hal_pru_generic.stepgen.03.dirhold' to '25000'
Xylotex.hal:242: Pin 'hal_pru_generic.stepgen.03.dirhold' set to 25000
Xylotex.hal:244: setting parameter 'hal_pru_generic.stepgen.03.steplen' to '25000'
Xylotex.hal:244: Pin 'hal_pru_generic.stepgen.03.steplen' set to 25000
Xylotex.hal:245: setting parameter 'hal_pru_generic.stepgen.03.stepspace' to '25000'
Xylotex.hal:245: Pin 'hal_pru_generic.stepgen.03.stepspace' set to 25000
Xylotex.hal:247: setting parameter 'hal_pru_generic.stepgen.03.position-scale' to '2000'
Xylotex.hal:247: Pin 'hal_pru_generic.stepgen.03.position-scale' set to 2000
Xylotex.hal:249: setting parameter 'hal_pru_generic.stepgen.03.maxvel' to '1.2'
Xylotex.hal:249: Pin 'hal_pru_generic.stepgen.03.maxvel' set to 1.2
Xylotex.hal:250: setting parameter 'hal_pru_generic.stepgen.03.maxaccel' to '18.75'
Xylotex.hal:250: Pin 'hal_pru_generic.stepgen.03.maxaccel' set to 18.75
Xylotex.hal:252: setting parameter 'hal_pru_generic.stepgen.03.control-type' to '1'
Xylotex.hal:252: Pin 'hal_pru_generic.stepgen.03.control-type' set to 1
Xylotex.hal:253: setting parameter 'hal_pru_generic.stepgen.03.stepinvert' to '0'
Xylotex.hal:253: Pin 'hal_pru_generic.stepgen.03.stepinvert' set to 0
Xylotex.hal:255: setting parameter 'hal_pru_generic.stepgen.03.steppin' to '911'
Xylotex.hal:255: Pin 'hal_pru_generic.stepgen.03.steppin' set to 911
Xylotex.hal:256: setting parameter 'hal_pru_generic.stepgen.03.dirpin' to '913'
Xylotex.hal:256: Pin 'hal_pru_generic.stepgen.03.dirpin' set to 913
Xylotex.hal:259: setting parameter 'pid.3.Pgain' to '50'
Xylotex.hal:259: Pin 'pid.3.Pgain' set to 50
Xylotex.hal:260: setting parameter 'pid.3.Igain' to '0'
Xylotex.hal:260: Pin 'pid.3.Igain' set to 0
Xylotex.hal:261: setting parameter 'pid.3.Dgain' to '0'
Xylotex.hal:261: Pin 'pid.3.Dgain' set to 0
Xylotex.hal:262: setting parameter 'pid.3.bias' to '0'
Xylotex.hal:262: Pin 'pid.3.bias' set to 0
Xylotex.hal:263: setting parameter 'pid.3.FF0' to '0'
Xylotex.hal:263: Pin 'pid.3.FF0' set to 0
Xylotex.hal:264: setting parameter 'pid.3.FF1' to '1'
Xylotex.hal:264: Pin 'pid.3.FF1' set to 1
Xylotex.hal:265: setting parameter 'pid.3.FF2' to '0'
Xylotex.hal:265: Pin 'pid.3.FF2' set to 0
Xylotex.hal:266: setting parameter 'pid.3.deadband' to '0'
Xylotex.hal:266: Pin 'pid.3.deadband' set to 0
Xylotex.hal:267: setting parameter 'pid.3.maxoutput' to '0'
Xylotex.hal:267: Pin 'pid.3.maxoutput' set to 0
Xylotex.hal:278: Pin 'iocontrol.0.tool-prepare' linked to signal 'tool-prep-loop'
Xylotex.hal:278: Pin 'iocontrol.0.tool-prepared' linked to signal 'tool-prep-loop'
Xylotex.hal:279: Pin 'iocontrol.0.tool-change' linked to signal 'tool-change-loop'
Xylotex.hal:279: Pin 'iocontrol.0.tool-changed' linked to signal 'tool-change-loop'
Xylotex.hal:296: setting parameter 'bb_gpio.p8.out-26.invert' to '1'
Xylotex.hal:296: Pin 'bb_gpio.p8.out-26.invert' set to 1
Xylotex.hal:314: Pin 'bb_gpio.p8.out-07' linked to signal 'machine-on'
Xylotex.hal:314: Pin 'bb_gpio.p8.out-26' linked to signal 'machine-on'
Xylotex.hal:314: Pin 'halui.machine.is-on' linked to signal 'machine-on'
Xylotex.hal:315: setting parameter 'bb_gpio.p8.out-07.invert' to '1'
Xylotex.hal:315: Pin 'bb_gpio.p8.out-07.invert' set to 1
Xylotex.hal:319: setting parameter 'bb_gpio.p8.out-26.invert' to '1'
Xylotex.hal:319: Pin 'bb_gpio.p8.out-26.invert' set to 1
Xylotex.hal:323: Pin 'bb_gpio.p8.in-09' linked to signal 'estop-in'
Xylotex.hal:323: Pin 'iocontrol.0.emc-enable-in' linked to signal 'estop-in'
Xylotex.hal:324: setting parameter 'bb_gpio.p8.in-09.invert' to '1'
Xylotex.hal:324: Pin 'bb_gpio.p8.in-09.invert' set to 1
Xylotex.hal:331: Pin 'bb_gpio.p8.out-13' linked to signal 'Output1'
Xylotex.hal:331: Pin 'motion.spindle-on' linked to signal 'Output1'
Xylotex.hal:332: setting parameter 'bb_gpio.p8.out-13.invert' to '1'
Xylotex.hal:332: Pin 'bb_gpio.p8.out-13.invert' set to 1
Xylotex.hal:335: Pin 'bb_gpio.p8.out-19' linked to signal 'Output2'
Xylotex.hal:335: Pin 'halui.mist.is-on' linked to signal 'Output2'
Xylotex.hal:336: setting parameter 'bb_gpio.p8.out-19.invert' to '1'
Xylotex.hal:336: Pin 'bb_gpio.p8.out-19.invert' set to 1
Xylotex.hal:339: Pin 'bb_gpio.p9.out-14' linked to signal 'Output3'
Xylotex.hal:339: Pin 'halui.flood.is-on' linked to signal 'Output3'
Xylotex.hal:340: setting parameter 'bb_gpio.p9.out-14.invert' to '1'
Xylotex.hal:340: Pin 'bb_gpio.p9.out-14.invert' set to 1
<commandline>:0: Realtime threads started
task pid=2512
emcTaskInit: using builtin interpreter
libGL error: No matching fbConfigs or visuals found
libGL error: failed to load driver: swrast
X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  149 (GLX)
  Minor opcode of failed request:  3 (X_GLXCreateContext)
  Value in failed request:  0x0
  Serial number of failed request:  736
  Current serial number in output stream:  737
Shutting down and cleaning up Machinekit...
<commandline>:0: Realtime threads stopped
<commandline>:0: Realtime module 'hal_bb_gpio' unloaded
<commandline>:0: Realtime module 'hal_pru_generic' unloaded
<commandline>:0: Realtime module 'limit1' unloaded
<commandline>:0: Realtime module 'motmod' unloaded
<commandline>:0: Realtime module 'pid' unloaded
<commandline>:0: Realtime module 'tp' unloaded
<commandline>:0: Realtime module 'trivkins' unloaded
Cleanup done
Machinekit terminated with an error.  You can find more information in the log:
    /home/machinekit/linuxcnc_debug.txt
and
    /home/machinekit/linuxcnc_print.txt
as well as in the output of the shell command 'dmesg' and in the terminal

mugginsac

unread,
Sep 2, 2018, 11:50:09 PM9/2/18
to Machinekit
I found the answer in another thread.

Seems XQuartz on macOS doesn't enable indirect GLX by default, and it must be enabled:

    $ defaults write org.macosforge.xquartz.X11 enable_iglx -bool true

I fixed the enable indirect GLX on my Mac and then I could get Axis to run under ssh -X.
It still reports a couple errors but for the moment it is running.

Now I will see if I can get my Xylotex.ini and Xylotex.hal into github so that others can have a starting point that is closer to working.

Bas de Bruijn

unread,
Sep 3, 2018, 1:32:23 AM9/3/18
to mugginsac, Machinekit
Great you solved the problem.
If you need help making a PR let me know.
Reply all
Reply to author
Forward
0 new messages