Machinekit workbench

Here's the place for discussion related to CAM/CNC and the development of the Path module.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
mlampert
Veteran
Posts: 1772
Joined: Fri Sep 16, 2016 9:28 pm

Machinekit workbench

Post by mlampert »

I've been writing a Machinekti workbench which lets you control a CNC running Machinekit from within FC. It's in its infancy but has become quite useful to me over the past couple of months and I thougth maybe some other folks use Machinekit and might find it useful.

Currently you can jog around, set the work coordinates, load a Job directly from FC into the Machinekit controller, run it pause/resume. My favourite feature is the HUD which displays a DRO and tool visualisation based on live feedback from Machinekit directly in the 3d View. So you get to see the tool as it follows the g-code with the model and all.

As always, it comes with a healthy dosage of bugs but you might find it useful anyway :mrgreen:
https://github.com/mlampert/Machinekit-Workbench

Edit: sneak peak Image
RatonLaveur
Posts: 991
Joined: Wed Mar 27, 2019 10:45 am

Re: Machinekit workbench

Post by RatonLaveur »

I dont use machinekit and i have access to state of the art machine tools but that is awesome!

Second coolest thing I've seen this week. Well done!
chrisb
Veteran
Posts: 53945
Joined: Tue Mar 17, 2015 9:14 am

Re: Machinekit workbench

Post by chrisb »

8-) Who needs Linuxcnc? 8-)
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
mlampert
Veteran
Posts: 1772
Joined: Fri Sep 16, 2016 9:28 pm

Re: Machinekit workbench

Post by mlampert »

RatonLaveur wrote: Sat Nov 16, 2019 4:47 pm I dont use machinekit and i have access to state of the art machine tools but that is awesome!

Second coolest thing I've seen this week. Well done!
Second coolest thing? You sure are a tough customer ;)

Even if you don't use Machinekit, what the demo shows is actually a PocketBeagle running Machinekit with mkwrapper-sim. You see the Machinekit output at the bottom, it's the terminal where I ssh'ed into the PocketBeagle and started Machinekit.

In other words, for less than $30,- (US) you get an industrial grade realtime simulatur for your FreeCAD.Path g-code output.
User avatar
sliptonic
Veteran
Posts: 3457
Joined: Tue Oct 25, 2011 10:46 pm
Location: Columbia, Missouri
Contact:

Re: Machinekit workbench

Post by sliptonic »

Very very cool.
Can it sync tool tables between fc and the mk machine?
mlampert
Veteran
Posts: 1772
Joined: Fri Sep 16, 2016 9:28 pm

Re: Machinekit workbench

Post by mlampert »

When uploading a job it also uploads all tools which are defined in the job into the Machinekit tool table, at the position as specified in the TC. So yes, regardless if you use a defined tool table for your job, or just the tools you need Machinekit will know about it. It also sets the tool offset according to whatever its set in the Tool definition.
herbk
Veteran
Posts: 2657
Joined: Mon Nov 03, 2014 3:45 pm
Location: Windsbach, Bavarya (Germany)

Re: Machinekit workbench

Post by herbk »

Good Morning Markus,

thats very great stuff... :o

It seams you are familiar with machinekit and it's use with a BB, maybe you can tell me a few things i'm not found (or understand) an answer at machinekit HP.

First thing is about the hardware:
If i use a BB (or RPI or...), at which way the signal gos to the stepper driver? Do i have to use a BoB with Parport input and the signal comes from BB IO Pins or do i have to use a special (mesa?) card.
Which Latency rate you get with the BB?
Is it possible to use the BB also for linear drives or only for steppers? Also with 5 Axis?
Gruß Herbert
mlampert
Veteran
Posts: 1772
Joined: Fri Sep 16, 2016 9:28 pm

Re: Machinekit workbench

Post by mlampert »

I'm by no stretch of imagination a Machinekit expert. I started using it earlier this year because I want to use a 4th axis. I do use a BBB as the controller for my CNC, was planning to use the PocketBeagle but due to the network and USB port on the BBB it's currently more convenient.

The BBB has 2 independent processor for real time apps and MK has a driver to use those for step/dir/pwm/encoder. You can get all details (except for the jitter) at: http://www.machinekit.io/docs/man/man9/hal_pru_generic/

In summary, you can use any BBB IO pin as a step/dir/pwm output and hook it directly to your stepper driver (assuming input voltage/current are compatible). For encoder inputs you do need to use IO pins which are directly connected to the PRU you are using. Closed loop control (which I assume you mean by "linear drive") is definitely possible and I don't think there's a special restriction on the # axes - having said that I have not done this myself, yet.

I found the MK google group very helpful and friendly.
chrisb
Veteran
Posts: 53945
Joined: Tue Mar 17, 2015 9:14 am

Re: Machinekit workbench

Post by chrisb »

The Machinekit homepage lists already the FreeCAD workbench!
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
mlampert
Veteran
Posts: 1772
Joined: Fri Sep 16, 2016 9:28 pm

Re: Machinekit workbench

Post by mlampert »

chrisb wrote: Mon Nov 18, 2019 6:02 pm The Machinekit homepage lists already the FreeCAD workbench!
Bwoa, didn't know about that - I guess I should start fixing some of those bugs tonight :mrgreen:
Post Reply