Python control of LinuxCNC for prototyping machines and scientific instruments

  Рет қаралды 17,444

Kent VanderVelden

Kent VanderVelden

Күн бұрын

Controlling LinuxCNC with Python can be used to prototype new machines and instruments. Data can be integrated from external sensors, analyzed, and used to direct LinuxCNC. In addition to describing the theory, we look at a real example to view magnet fields. Instead of building a motorized stage for to scan magnetic fields with a fluxgate magnetometer, we use Python to coordinate LinuxCNC motion and measurements using LXI and VXI-11 from a networked multimeter.
Channel Love: Likes are free. paypal.me/KentVanderVelden
Business Inquiries, I'm a freelance scientific programmer: kent@confluencerd.com
The probe is a AIM-TTI I-Prober 520 and is normally used to measure the current flowing through traces in circuit boards, but also has wire and field settings. The multimeter is a Keysight (Agilent) 34461A multimeter.
Program: github.com/kentavv/linuxcnc_v...
Amazon Affiliate links:
AIM-TTI I-Prober 520 probe: amzn.to/2cWOggY
Keysight (Agilent) 34461A multimeter: amzn.to/2dxJkhH
#KvvCreates, #LinuxCNC, #DIYCNC

Пікірлер: 34
@kentvandervelden
@kentvandervelden 7 жыл бұрын
Check out my most recent video: goo.gl/Jj7cU1 Building mechanized stages is expensive and time consuming. A CNC machine with LinuxCNC can be controlled by an external program and used as a prototyping tool. Thank you for watching.
@keithscott9774
@keithscott9774 2 жыл бұрын
Thanks very much Kent. I was previously using UCCNC which used macros, macroloops, and plugins. It seemed a lot easier to find "how to" information for those. With Linuxcnc, as a beginner I'm finding clearly explained examples to be much harder to find, much to my surprise. Your video will certainly get me one step closer. Much appreciated.
@kentvandervelden
@kentvandervelden 2 жыл бұрын
Hi Keith, that's fantastic! Thank you for telling me. Glad to help if you need anything.
@FilterYT
@FilterYT 6 жыл бұрын
This is a great demo of what can be done with python and linuxcnc, thanks so much for sharing!
@kentvandervelden
@kentvandervelden 6 жыл бұрын
Thank you. It's a stupidly precarious setup for an expensive test probe, but a quick way to test out an idea. I've tried to use the setup to read the magstripe on a hotel key card. It can sense changes the edges of the low resolution stripe, but the read out didn't quite make sense. Perhaps there is some cancellation of neighboring stripes given the probe's resolution. Easier to readout optically with iron powder.
@GavinBath
@GavinBath 7 жыл бұрын
Wow. Fascinating. I had no idea that linuxcnc even had the ability to be driven from an external library. Very cool.
@kentvandervelden
@kentvandervelden 7 жыл бұрын
Hi Gavin, thank you for the comment. If I understand correctly, the LinuxCNC motion controller is separate from the GUI, so mechanisms like I used can be used to build new GUIs on top of the kernel. Maybe this is how Tormach made PathPilot? There's are also other methods including RPC and RSH. Should work well except for situations where low latency is required, but then the latency is probably still better than a PLC scan time. The people who made LinuxCNC really had some great foresight to put the extra work into the architecture.
@jhongesell
@jhongesell 5 жыл бұрын
thanks for yours videos
@kentvandervelden
@kentvandervelden 5 жыл бұрын
Thank you, that's appreciated
@The_Unobtainium
@The_Unobtainium 7 жыл бұрын
what a great approach to the problem! superb video
@kentvandervelden
@kentvandervelden 7 жыл бұрын
Thank you, your comment means a lot. If you have any interest, recently I've used a similar setup to try to read the data from a magstripe and a slightly modified setup to profile the linearity of a SoftPot sensor. I'm still working on these videos. The magstripe video will be to ask for some help. I can sense the magnetic bands, but they don't quite agree with what should be present, as read by a commercial reader.
@The_Unobtainium
@The_Unobtainium 7 жыл бұрын
+Kent VanderVelden i can see You are magnetism fan:) it is related to your job, hobby? but your python programming skills are awesome. I'm at the beginning of the learning curve in python. i proggramed in assembeler in 8051 uC times (who can remember that?). the reason is i need to create some sort of setup using linuxcnc and my mill/lathe to probe a profile chucked in the lathe and then skim it. Apparently linuxcnc itself is not ready to do that. All the probing procedures like straightprobe, smartprobe use grid concept in XY plane. I tried Autoleveller from Scorch but there is no option to select just one row of points (2 is minimum - as it use some bilinear interpolation?). What i need is probe along one axis only and after probing apply some math (linear interpolation?) to smoothen probed profile. Smooth profile should then be converted to g-codes and thats it. These are my assumptions but i found it hard to start. do You think python is good for that? wow i just saw the rest of your vids! u got my sub:)
@kentvandervelden
@kentvandervelden 7 жыл бұрын
I humbly thank you. You may be #100... although I'm afraid the prize is pretty paltry. :) The LinuxCNC forum would give you access to many LinuxCNC experts. Given the little bit that I know, yes, I would probably do something along the lines of what you are suggesting. Previously, I mainly programmed in C and I'm a Python convert. It lets one build applications so fast (available powerful modules, no compilation, multiple platforms, etc.) that learning Python is time well spent if you use programming to aid your work as opposed your work being to produce full applications. For your application, seems like Python, the LinuxCNC module, and scipy.interpolate. Within the last module, a spline could be used to fit and smooth the points, and the interpolate routines could be used to generate a piecewise list of points which can easily be converted to g-code. My Arduino CNC lathe video used a simple version of that to generate its "g-code." If you don't have "valleys" in your profile, the g-code generation would be easier. If you have multiple valleys, they would need to be done one at a time. I hope that makes some sense. Your project sounds really cool. I hope you post a video of it. (Magnetism is awesome, but here it was an interesting example. It's hidden normally, so anyway to show what's hidden is interesting.)
@kentvandervelden
@kentvandervelden 7 жыл бұрын
While your approach sounds easier and more precise, you may be interested in this person's approach using image analysis. kzfaq.info/get/bejne/nq2qmrCCqbjcc2Q.html The welding scene is a nice. Also, if you need any help with Python, etc. send me a personal message. I'd be glad to help.
@The_Unobtainium
@The_Unobtainium 7 жыл бұрын
via LinkedIn
@keithscott9774
@keithscott9774 2 жыл бұрын
Hello again Kent. Just sent you a small thankyou via Paypal. Buy yourself a couple of drinks on me. I've done some beginner/intermediate coding in C and C# but have never touched Python so am learning from scratch, spending plenty time on Google, etc. As I slowly get to understand your code I realise how stuffed I would be without this tutorial. You've very likely saved me a lot of time getting started with custom control of Linuxcnc. Thanks again.
@kentvandervelden
@kentvandervelden 2 жыл бұрын
Thank you Keith! That means a lot! You can always drop me an email if something comes up. Might be a question I've solved before.
@qzorn4440
@qzorn4440 5 жыл бұрын
Fascinating. Have you used usb webcams and the Kinect camera to model parts? Thanks.
@kentvandervelden
@kentvandervelden 5 жыл бұрын
Thank you. No, I have not done that. The closest would be old school line laser scans with David. I do have Autodesk ReCap which I think is supposed to help with reconstruction from photos. If you have any advice on scanning parts please let me know. I have a couple of ToF cameras that I've just started to experiment with and they are pretty decent close in depth (~0.1% when < 1m I think) but the sensor resolution is not great, only 38kP or so so the lateral measurements are course. I'd like to make a video about them eventually.
@NuttyforNissan
@NuttyforNissan 4 жыл бұрын
I was surprised the spindle didn't distort your readings.
@kentvandervelden
@kentvandervelden 4 жыл бұрын
This is a good point. Might have been how the probe was aligned to the spindle or stationary with respect to the spindle (but the table and vise do move.) The probe is pretty sensitive but also picky with alignment to fields. Most rejection surely comes from baseline adjustment: scan without sample and subtract these values from a scan with a sample. Thank you for your interest
@hariharanramamurthy9946
@hariharanramamurthy9946 3 жыл бұрын
sir is it possible to add numerous external machine and integrate with linuxcnc
@hariharanramamurthy9946
@hariharanramamurthy9946 3 жыл бұрын
i know fusion 360 but how do i simulate and build parts ?
@kentvandervelden
@kentvandervelden 3 жыл бұрын
You can coordinate at least nine axes in LinuxCNC. That's realtime coordination. If you don't need realtime, your options will increase a lot. A large number of digital inputs and outputs can be controlled as well as analog limited by the connected board. Check out the Mesa 7i76e for example.
@hariharanramamurthy9946
@hariharanramamurthy9946 3 жыл бұрын
@@kentvandervelden i want to design wire bending machine ,i did preliminary research but how,how to proceed to prototype (undergrad student sir)
@kentvandervelden
@kentvandervelden 3 жыл бұрын
That's very cool. I've looked at a few wire bending machines. Wouldn't take many axes to get something nice going. You have many options. Hard part will be settling on something. Could use motors with integrated drives and just send simple commands like home and advance 20 degrees, for a basic controller and focus on mechanics. Or could control step direction pulses of motors and do more electronics and software.
@hariharanramamurthy9946
@hariharanramamurthy9946 3 жыл бұрын
how do i understand the existing bending machines g code generator,i need to understand it to customize but how it works and how do i reverse engineer it sir
Tool Length Automatic Touch Off Probe Error Analysis LinuxCNC
19:10
Kent VanderVelden
Рет қаралды 19 М.
Building a Conveyor for the Pick and Place!
13:14
Stephen Hawes
Рет қаралды 30 М.
ВОДА В СОЛО
00:20
⚡️КАН АНДРЕЙ⚡️
Рет қаралды 26 МЛН
Эффект Карбонаро и нестандартная коробка
01:00
История одного вокалиста
Рет қаралды 9 МЛН
TCD1304-based spectrometer - Part 1
38:56
Curious Scientist
Рет қаралды 10 М.
Using LinuxCNC on My CNC Router Using a Raspberry Pi 5
9:31
Byte 2 Bot
Рет қаралды 31 М.
Mechanical circuits: electronics without electricity
19:22
Steve Mould
Рет қаралды 7 МЛН
Raspberry Pi CNC Controller
5:08
Make:
Рет қаралды 329 М.
DIY sonar scanner (practical experiments)
14:30
bitluni
Рет қаралды 1 МЛН
Companion High Speed Spindle, LinuxCNC
20:37
Kent VanderVelden
Рет қаралды 8 М.
Reverse Engineer Parts with Computer Vision
5:02
Kent VanderVelden
Рет қаралды 9 М.
Здесь упор в процессор
18:02
Рома, Просто Рома
Рет қаралды 406 М.
Смартфон УЛУЧШАЕТ ЗРЕНИЕ!?
0:41
ÉЖИ АКСЁНОВ
Рет қаралды 1,2 МЛН
Xiaomi SU-7 Max 2024 - Самый быстрый мобильник
32:11
Клубный сервис
Рет қаралды 440 М.
Самые крутые школьные гаджеты
0:49
Это Xiaomi Su7 Max 🤯 #xiaomi #su7max
1:01
Tynalieff Shorts
Рет қаралды 2 МЛН