Machinekit workbench

Here's the place for discussion related to CAM/CNC and the development of the Path module.
mlampert
Posts: 1381
Joined: Fri Sep 16, 2016 9:28 pm

Machinekit workbench

Postby mlampert » Sat Nov 16, 2019 5:12 am

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: 358
Joined: Wed Mar 27, 2019 10:45 am

Re: Machinekit workbench

Postby RatonLaveur » 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!
chrisb
Posts: 19662
Joined: Tue Mar 17, 2015 9:14 am

Re: Machinekit workbench

Postby chrisb » Sat Nov 16, 2019 5:01 pm

8-) Who needs Linuxcnc? 8-)
mlampert
Posts: 1381
Joined: Fri Sep 16, 2016 9:28 pm

Re: Machinekit workbench

Postby mlampert » Sat Nov 16, 2019 5:22 pm

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
Posts: 1579
Joined: Tue Oct 25, 2011 10:46 pm

Re: Machinekit workbench

Postby sliptonic » Sun Nov 17, 2019 1:47 am

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

Re: Machinekit workbench

Postby mlampert » Sun Nov 17, 2019 2:03 am

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
Posts: 1574
Joined: Mon Nov 03, 2014 3:45 pm
Location: Windsbach, Bavarya (Germany)

Re: Machinekit workbench

Postby herbk » Mon Nov 18, 2019 8:30 am

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
Posts: 1381
Joined: Fri Sep 16, 2016 9:28 pm

Re: Machinekit workbench

Postby mlampert » Mon Nov 18, 2019 4:56 pm

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
Posts: 19662
Joined: Tue Mar 17, 2015 9:14 am

Re: Machinekit workbench

Postby chrisb » Mon Nov 18, 2019 6:02 pm

The Machinekit homepage lists already the FreeCAD workbench!
mlampert
Posts: 1381
Joined: Fri Sep 16, 2016 9:28 pm

Re: Machinekit workbench

Postby mlampert » Mon Nov 18, 2019 6:55 pm

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: