Hi,
I’m in process of building wire edm machine where I’d like to use LinuxCNC as an interpreter/controller. One of the features this kind of machine needs is a reverse run (possibility to do a step back in Gcode). The platform I’d like to use is a BeagleBone Black with a custom cape. I’m aware of branch “feature/reverserun_master2” of LinuxCNC, however, there’s no HAL libs for running on BBB. On the other hand, there’s a Machinekit which is crafted for BBB, but there’s no reverse run feature. My intention is to customize LinuxCNC reverse run branch to run BBB PRU’s GPIO or to add reverse run feature to Machinekit. A couple of last weeks I worked on both and I did some progress, however, things are not fully functional and that’s why I’d appreciate help from you guys. Here’s a summary of my work up to now:
- Machinekit with reverserun:
I compared work of Rob here:
github.com/LinuxCNC/linuxcnc/compare/mas...e/reverse-run-master
And implemented these differences in Machinekit build. Some of the things had to be changed because some of the functions/structures have changed compared to LinuxCNC. I can build from source, Machinekit runs, but when changing adaptive-feed pin value < 0 in Axis program freezes and even when pin value is changed back to a positive value nothing happens… There’s also an error in terminal: USRMOT: ERROR: command timeout.
Here’s the link to my fork of Machinekit with changes:
github.com/bosston88/machinekit
- LinuxCNC reverse run with BBB drivers:
Using guidelines for RPI:
wiki.linuxcnc.org/cgi-bin/wiki.pl?RPi3BPreemptRT#buildhalgpio
I’ve built from source reverse run branch on BBB, added hal_bb_gpio libs to hal dir, changed Makefile in src dir and added a function in rtapi to be able to open /dev/mem with root privileges. After a few changes I was able to compile and with simple hal commands I’m able to blink with user leds. When it comes to running a demo gcode it seems that reverse run works – changing adaptive-feed < 0 changes direction and when changing back to > 0 program runs forward (ran in axis_mm.ini).
Here are files I changed and uploaded to BBB:
github.com/bosston88/Linuxcnc.RR
Now I have a couple of questions/requests.
- Is there someone who could have a look at code for Machinekit reverse run? After many trials I simply have no idea what goes wrong…
- Is hal_bb_gpio fast/reliable to use it for the generation of steps signals? What step rate can be achieved?
- Looking at PRU files it seems that there will be a chunk of work to do to implement it to LinuxCNC reverse run. Does it make sense to start with that? Will it work with LCNC?
I hope that this work can help many other users who are wishing to implement a tiny SOC for their EDM, WEDM, plasma cutters etc.
Many thanks,
Pawel