Python control of LinuxCNC for prototyping machines and scientific instruments

แชร์
ฝัง
  • เผยแพร่เมื่อ 27 พ.ย. 2024

ความคิดเห็น • 34

  • @kentvandervelden
    @kentvandervelden  8 ปีที่แล้ว +3

    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 ปีที่แล้ว +1

    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.

  • @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 ปีที่แล้ว +3

    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 ปีที่แล้ว +1

    Wow. Fascinating. I had no idea that linuxcnc even had the ability to be driven from an external library. Very cool.

    • @kentvandervelden
      @kentvandervelden  7 ปีที่แล้ว +2

      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.

  • @The_Unobtainium
    @The_Unobtainium 8 ปีที่แล้ว +4

    what a great approach to the problem! superb video

    • @kentvandervelden
      @kentvandervelden  8 ปีที่แล้ว +1

      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 8 ปีที่แล้ว +1

      +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  8 ปีที่แล้ว +1

      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  8 ปีที่แล้ว

      While your approach sounds easier and more precise, you may be interested in this person's approach using image analysis. th-cam.com/video/hGzgMQDRxC0/w-d-xo.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 8 ปีที่แล้ว +1

      via LinkedIn

  • @qzorn4440
    @qzorn4440 6 ปีที่แล้ว +1

    Fascinating. Have you used usb webcams and the Kinect camera to model parts? Thanks.

    • @kentvandervelden
      @kentvandervelden  6 ปีที่แล้ว

      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.

  • @jhongesell
    @jhongesell 6 ปีที่แล้ว +1

    thanks for yours videos

  • @hariharanramamurthy9946
    @hariharanramamurthy9946 4 ปีที่แล้ว +1

    sir is it possible to add numerous external machine and integrate with linuxcnc

    • @hariharanramamurthy9946
      @hariharanramamurthy9946 4 ปีที่แล้ว +1

      i know fusion 360 but how do i simulate and build parts ?

    • @kentvandervelden
      @kentvandervelden  4 ปีที่แล้ว

      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 4 ปีที่แล้ว +1

      @@kentvandervelden i want to design wire bending machine ,i did preliminary research but how,how to proceed to prototype (undergrad student sir)

    • @kentvandervelden
      @kentvandervelden  4 ปีที่แล้ว

      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 4 ปีที่แล้ว +1

      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