Can ChatGPT Program Your CNC Machines?

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
an AI program your CNC machines today in this video we're going to look at chat GPT and see what it can do first up a little info on what we're looking at here chat GPT is a tool created by open AI open AI is an artificial intelligence research and development company with the goal of creating systems that will outperform humans chat GPT is the most recent program they have released for testing but they have also developed the text to picture AI system called dolly dolly will create an image based on the text prompts you give it and even in its infancy Dahlia's cause quite the reaction in the art and Graphics creation worlds in fact the picture used in the thumbnail for this video was created by Dolly image creation from text won't help as much in the Machining world but chat GPT might chat GPT is a trained AI model that interacts in a conversational way put it simply it's Google on steroids if you ask Google what is Mastercam it will return some websites that may provide the answer you're looking for chat GPT it will directly answer your question and even provide some insights into the answer as you can see here chat GPT is letting us know that matchcam is used to create tool paths for various types of Machining operations such as Milling turning and wire EDM it then goes on to explain that Mash cam includes a wide range of tools and features for creating and editing toolpaths Etc you can even ask it follow-up questions or even ask that the answer is explained differently an example on screen I ask it to explain in fewer words and you can see it condenses its answer quite nicely now it's just stating that Mash cam is used to create tool paths for Machining operations and generates machine code for CNC machines I then ask it to explain it to me as if I'm a five-year-old and then you can see it really simplifies its answer it helps people who work in factories make really cool parts for lots of different things I then ask it to explain to me as if I was a PhD student and it goes into much greater depth this question and answer stuff is interesting but not earth-shattering is there something more chat GPT can do yes but we should point out that there are some limitations chat GPT is not able to browse the internet it cannot provide advice or make recommendations it also cannot access external programs so unfortunately chat GPT cannot run Mastercam for you but it does know several programming languages and it even knows G-Code okay so let's give this G-Code a world here I've got chat GPT on one side and I've got Simco edit on the other to backplot whatever G-Code uh we can get out of it so let's see what we can make here and I'm going to intentionally make this vague so you know if you're ever programming a computer you have to tell it exactly what to do step by step if you wanted to have it make you a peanut butter sandwich you would say open the bread bag take out one piece of bread open the peanut butter jar Etc you have to tell it every single thing to do so what I've done here is I've only said make a program that drill four holes I've left everything else for it to interpret and here's what we're getting it is a G-Code program there is some things missing but that is the beauty of this chat GPT is you can tell it that it's missed something and it will correct itself so for example here we'll start at the very top we've got g90 Set uh it's moving to x0 Y zero z0 for some strange reason obviously no no cutter length compensation has been applied yet and then it hops into a Canned Cycle now I've done this a few times and in previous operations or previous attempts it did not immediately come out with a Canned Cycle it was doing it long hands so it's interesting to see that it's actually doing canned Cycles right off the go here so I'm going to tell that it's missed the tool call and we'll see what it comes back with again I'm going to be vag and just see what it can take from what I'm I'm telling it to do so I told it just simply you missed the tool call and here is now sticking in the t01m06 into the program you can see as it's explaining the code to us it gives us the code and it also gives us an explanation of what it is that it's trying to do uh so what I see here in this one here there's a lot of comments going on and I don't personally want to see the comments in the program um I can understand the cheat code just fine so I'm going to tell it the to remove the comments from from the g code so again it's understood what a comment is just by me simply asking about it we are still missing some things in our program but this somewhat resembles what a G-Code program should look like let's grab this code throw it over into Simcoe and see what it does so I've got a button here copy code let's paste this over into Simcoe I'm already in my back plot let's just zoom out so it fixes this here or it fits in and yeah it's making motion but it's not uh it's not doing what we want it to do and throughout your session you can keep on correcting chat GPT so that the resulting code is what you're after it can be a bit of a back and forth and as you can see in the background here I had to try and uh finesse the results quite a bit and we eventually did get somewhere close so after a bit of fighting with uh with the program here we finally gotten somewhat uh close to a useful program so we've got our two length compensation being called out we've got the can cycle being called and then just the positions of the holes called after it and if we stick that over into our NC Editor to back plot it and I make a few tweaks a few minor tweaks we get some code that will actually run so it's obvious that this program is not trained in G-Code um I think they've probably focused more on other programming languages that are more often used but there is some other neat things you can do in here with G-Code and that's when you get into using some variables or even macros so given this same program here let's tell it to use variables for the X and Y locations of of these holes so again it's kind of missed the mark but it's still somewhat accomplishing what I've asked it knows the variables it can use and it knows how to assign them did it do it correctly uh not so well but again let's take it one step farther and get this into an actual macro now to get into doing some sort of calculation so I've asked it to create a program to create drilled holes that are evenly spaced and that that spacing of the drilled holes is controlled by a variable again it's missed the mark a little bit you can see here's the program it's created and I plug this into Simcoe and try and run it and it doesn't do a whole lot it gets one whole drill but we didn't get the holes that we were after and the loop seems to have broken down Midway through so as far as G-Code goes today uh not so good but obviously you can see a glimpse into what this could actually do if it was actually trained in G-Code so another popular software that machinists use is Excel and let's let's try something quick in there and see if we can get a better result with something more common like an Excel VBA program so let's ask it to maybe look at values in a column and see if they can find matching values within that column so here's the code it's made us it made us this program let's copy this up and we'll open this up inside of a Visual Basic plug it in and here's the program it gave us I made an alteration here just so it looks at row C instead of row a and you can see I've got some values here and I've got two number 45s so if I run this program there it go it highlights the the duplicate number 45. so there you go I was able to create this this program here in VBA with knowing nothing other than telling it what I was trying to do in plain English so I guess it's safe to say that as of today uh G-Code programmers your jobs are still safe but no this stuff is moving extremely quickly and before you know it you'll be able to make programs just by simply typing in text commands on what it is that you want I should also point out open AI has just released its newest piece of software it's called Point e and point e takes the dolly concept of pictures and expands it into 3D objects so now you're going to be able to type in words and create 3D objects from that so I'm looking forward to playing with this a little bit once I can wrap my head around how to implement it but I think uh the first little bit of this would be fun to do with 3D printing you know throw in some words it creates a model for you and then you go over and 3D print it out but then again where this ends up in two five ten years from now uh sky's the limits foreign
Info
Channel: CamInstructor
Views: 91,006
Rating: undefined out of 5
Keywords: Mastercam, Mastercam 2021, camInstructor
Id: r0J2mz2i5DE
Channel Id: undefined
Length: 8min 43sec (523 seconds)
Published: Thu Dec 22 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.