Hello,

I'm working on a bipod (polargraph) style drawing robot. I'm using 
machinekit on beaglebone.

I'm moving the pen up and down with a radio (xbee) controlled servo. I've 
written a hal component in C that opens (non blocking) a serial port on the 
beaglebone and then reads and writes to it. The component takes just over 
25ms to run.
This component is added to a slow thread (50ms). I don't get realtime error 
messages or joint following errors.

Most of the time everything works fine, but sometimes I'll get timeouts 
when machinekit starts, lots of:

USRMOT: ERROR: command timeout

If I comment out the line in bipod.hal that adds the xbee component to the 
thread then it will start. So I think it's to do with my component.

I've done a lot of testing with halrun, and I've never had a problem with 
just starting a thread, adding my component to it and then moving the servo 
manually.

I've attached the component code, bipod.ini, bipod.hal, as well as stdout, 
dmesg and linuxcnc.log that shows what happens when it doesn't start up.
Any help on this would be greatly appreciated! This is only the 2nd 
component I've written!

Thanks,
Matt

-- 
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 [email protected].
Visit this group at https://groups.google.com/group/machinekit.
For more options, visit https://groups.google.com/d/optout.

Attachment: dmesg
Description: Binary data

Attachment: screenlog.0
Description: Binary data

Jul  1 14:13:32 beaglebone msgd:0: startup pid=1706 flavor=xenomai rtlevel=1 
usrlevel=1 halsize=524288 shm=Posix gcc=4.9.2 version=unknown
Jul  1 14:13:32 beaglebone msgd:0: ØMQ=4.0.5 czmq=2.2.0 protobuf=2.4.1 
libwebsockets=<no version symbol>
Jul  1 14:13:32 beaglebone msgd:0: configured: sha=ee98758
Jul  1 14:13:32 beaglebone msgd:0: built:      May 28 2016 12:17:33 sha=ee98758
Jul  1 14:13:32 beaglebone msgd:0: register_stuff: actual hostname as announced 
by avahi='beaglebone.local'
Jul  1 14:13:32 beaglebone msgd:0: zeroconf: registering: 'Log service on 
beaglebone.local pid 1706'
Jul  1 14:13:33 beaglebone msgd:0: zeroconf: registered 'Log service on 
beaglebone.local pid 1706' _machinekit._tcp 0 TXT 
"uuid=a42c8c6b-4025-4f83-ba28-dad21114744a" 
"instance=3a92dc40-3f85-11e6-854c-689e198f4ee9" "service=log" 
"dsn=ipc:///tmp/0.log.a42c8c6b-4025-4f83-ba28-dad21114744a"
Jul  1 14:13:34 beaglebone msgd:0: rtapi_app:1711:user accepting commands at 
ipc:///tmp/0.rtapi.a42c8c6b-4025-4f83-ba28-dad21114744a
Jul  1 14:13:48 beaglebone msgd:0: hal_lib:1711:rt memmapped gpio port 0 to 
0xb6680000, oe: 0xb6680134, set: 0xb6680194, clr: 0xb6680190
Jul  1 14:13:48 beaglebone msgd:0: hal_lib:1711:rt pin 22 maps to pin 0-2, mode 
85
Jul  1 14:13:48 beaglebone msgd:0: hal_lib:1711:rt pin 21 maps to pin 0-3, mode 
85
Jul  1 14:13:48 beaglebone msgd:0: hal_lib:1711:rt pin 11 maps to pin 0-30, 
mode 85
Jul  1 14:13:48 beaglebone msgd:0: hal_lib:1711:rt memmapped gpio port 1 to 
0xb667e000, oe: 0xb667e134, set: 0xb667e194, clr: 0xb667e190
Jul  1 14:13:48 beaglebone msgd:0: hal_lib:1711:rt prussdrv_init
Jul  1 14:13:48 beaglebone msgd:0: hal_lib:1711:rt prussdrv_open
Jul  1 14:13:48 beaglebone msgd:0: hal_lib:1711:rt prussdrv_pruintc_init
Jul  1 14:13:48 beaglebone msgd:0: hal_lib:1711:rt prussdrv_map_prumem
Jul  1 14:13:48 beaglebone msgd:0: hal_lib:1711:rt PRU data ram mapped
Jul  1 14:13:48 beaglebone msgd:0: hal_lib:1711:rt num_pwmgens : 0
Jul  1 14:13:48 beaglebone msgd:0: hal_lib:1711:rt num_stepgens: 3
Jul  1 14:13:48 beaglebone msgd:0: hal_lib:1711:rt num_encoders: 0
Jul  1 14:13:48 beaglebone msgd:0: hal_lib:1711:rt Init pwm
Jul  1 14:13:48 beaglebone msgd:0: hal_lib:1711:rt Init stepgen
Jul  1 14:13:48 beaglebone msgd:0: hal_lib:1711:rt hpg_stepgen_init
Jul  1 14:13:48 beaglebone msgd:0: hal_lib:1711:rt Init encoder
Jul  1 14:13:48 beaglebone msgd:0: rtapi_app:1711:user signal 11 - 
'Segmentation fault' received, dumping core (current dir=/home/machinekit/bipod)
Jul  1 14:13:48 beaglebone msgd:0: rtapi_app:1711:user  --- rtapi_app 
backtrace: ---
Jul  1 14:13:48 beaglebone msgd:0: rtapi_app:1711:user b5316e19 ?? ??:0
Jul  1 14:13:48 beaglebone msgd:0: rtapi_app:1711:user b5315961 ?? ??:0
Jul  1 14:13:48 beaglebone msgd:0: rtapi_app:1711:user b67e80ff ?? ??:0
Jul  1 14:13:48 beaglebone msgd:0: rtapi_app:1711:user b67f80c7 ?? ??:0
Jul  1 14:13:48 beaglebone msgd:0: rtapi_app:1711:user  --------------------
Jul  1 14:13:48 beaglebone msgd:0: rtapi_app exit detected - scheduled shutdown
Jul  1 14:13:50 beaglebone msgd:0: msgd shutting down
Jul  1 14:13:50 beaglebone msgd:0: zeroconf: unregistering 'Log service on 
beaglebone.local pid 1706'
Jul  1 14:13:50 beaglebone msgd:0: log buffer hwm: 0% (17 msgs, 1156 bytes out 
of 524288)
Jul  1 14:13:50 beaglebone msgd:0: normal shutdown - global segment detached

Attachment: bipod.ini
Description: Binary data

Attachment: bipod.hal
Description: Binary data

Attachment: xbee.comp
Description: Binary data

Reply via email to