
Hi Caludio,
I'm currently also working with CANopen (and CAN in general). Busy trying to get socketCAN to work with Lazarus (Free Pascal).
At the moment the program compiles/runs on a PC, Raspberry Pi and a BeagleBone. With the PC I'm using the Lawicel CANUSB dongle and have it also working on the Pi and the BBB without issues as a USB serial device.
With socketCAN the standard candump.c program also works with the Lawicel CANUSB and either an MCP2515 HAT for the Pi or the internal CAN device on the BBB. So I know the hardware can function with the socketCAN driver. Just making it work with Lazarus is still the challenge.
The full source code will be released when I have it working. Here are a couple of screen shots.
This is just a terminal program for dealing with the CANUSB or any other serial port based CAN dongle.

Now we're more into CANopen with the ability to send a number of SDO messages to find the node ID etc.

And finally the ability to send specific CANopen SDO messages to a CANopen device.

Ultimately I'll add a logging/playback function so I can receive and timestamp messages. Then be able to parse that file and play back specific nodes messages to simulate a larger system without all the hardware in place.
And of course instead of the serial port CANUSB be able to use the socketCAN interface on the Pi and BBB.
This will run on MachineKit (I do have a microSD card with MachineKit for the BBB) and once I add Lazarus to my LinuxCNC (on Pi or a PC) can also run it on the milling machine system.
I'm almost at the point where I can start building a power draw bar and would like to make it and an automatic tool changer be CANopen based.
John Dammeyer
i built EMCA from sources and configured to use hachinekit-hal (i think)
./configure --with-hal=machinekit-hal
but launching any configuration for linuxcnc i get some sort of this error:
....
4:rtapi_app:5413:user pid=5413 flavor=rt-preempt gcc=6.3.0 20170516 git=unknown
Traceback (most recent call last):
File "/home/zus/EMCApplication/bin/hal_manualtoolchange", line 11, in <module>
import linuxcnc, hal
File "/home/zus/EMCApplication/lib/python/hal.py", line 30, in <module>
import _hal
ImportError: No module named _hal
I think i miss some very basic step, i tried to look for some basic how-to but could not find anything useful...
can someone point me in the right direction?
--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/machinekit/56395dda-e594-4d81-9a68-3a411c4ac6f4n%40googlegroups.com.