Deutsch English Français Italiano |
<vgg8a7$26lt0$1@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!eternal-september.org!feeder2.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Bob La Londe <none@none.com99> Newsgroups: rec.crafts.metalworking Subject: Re: Yet Another New Machine Date: Wed, 6 Nov 2024 10:16:56 -0700 Organization: A noiseless patient Spider Lines: 112 Message-ID: <vgg8a7$26lt0$1@dont-email.me> References: <vfuc8v$2ap2c$1@dont-email.me> <vfvqb4$2m434$1@dont-email.me> <vg0fsg$2pe7j$2@dont-email.me> <vgbl3p$15ami$1@dont-email.me> <vgbv1l$17h7a$1@dont-email.me> <vgdohv$16n6e$1@dont-email.me> <vgei81$1q30n$1@dont-email.me> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Wed, 06 Nov 2024 18:16:56 +0100 (CET) Injection-Info: dont-email.me; posting-host="755b367b7e7131e3350f2fb6944e0909"; logging-data="2316192"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+SXmYcpeyXaFEe6q7PuTBU" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:ANsdYbwaoowws0B7bFrvYwZM5V4= X-Antivirus: AVG (VPS 241106-8, 11/6/2024), Outbound message In-Reply-To: <vgei81$1q30n$1@dont-email.me> X-Antivirus-Status: Clean Content-Language: en-US Bytes: 7475 On 11/5/2024 6:53 PM, Jim Wilkins wrote: >> So is it a compiler? ... No I think its best described as a >> specialized interpreter. > I simply wondered if CAD systems typically generated readable and > editable G code. Ready for it? No. Cad generates pretty pictures. CAM generates g-code (or other code possibly). Yes, generally g-code is a simple text file with no hidden characters other than a line break. I'm not sure that's the correct character. It might be a hard return. Whatever notepad generates when you hit the enter key is it. I forget. Its been a long time since I looked at that stuff. Anyway a simple text file can be edited in windows notepad. In fact its my default to open an .nc file in Windows if I click on it. ..nc .tap .txt or virtually any other extension will work as long as your control software will show and open the file. .nc is the default I use. Mach 3 used .tap by default, but I prefer .nc because it says what it is. A numerical control file. Embedded documentation is a mixed bag. Some CAM programs will document basics automatically if set to do so. Most probably. Most modern controllers will just ignore comments, but some (mostly early g-code adopters on under powered processors) will reject anything that is not an executable line of code and not execute at all or throw an error. "Well, WELL! WELLL!," you might say. "What about Fusion360?" you might ask. There are lots of CAD/CAM programs, but CAD and CAM are two different things. In Fusion the functions are tied together so a CAD modification will automatically create different code (if it doesn't cause a failure) the next time you generate code. With no other steps it will generate code based on the new CAD model. There are a fair number of seemingly commingled CAD/CAM programs these days. Fusion360, BobCAD/CAM, etc. Even many purely CAD programs of the past now have plugin's or integrations with CAM programs. Even FreeCAd now has available a "workbench" that can be used for CAM, and CamBam has many simple CAD tools built in. Still CAD and CAM are two different things. CAD generates pretty pictures and CAM generates g-code. G-Code is just text. For a programmer its pretty easy to read and understand, but except for a few global settings (work offsets, base scale, velocity mode, and some parameters) each line is standalone. It executes the current line base on the information you have and the current position and status of the machine. If you have a list of simple "G01 X(x) Y(y) F(f)" it will execute each one in order doing what you told it to do. If you used four of those bracketed by other overhead commands to cut a rectangle it will cut your rectangle one line at a time by going from the current location (whatever it is) to X(x) Y(y) in a straight line at a speed of F(f). If you decide you need to modify your rectangle you would need to modify TWO (2) lines of code. This is an over simplification, but it illustrates why some people get in trouble hand editing code. Understanding what a line of code does it a matter of looking up that code and how its executed based on the parameters given, and to a limited extent how the control software implements it. The number of commands (G Codes and M Codes) is rather small. There are also parameters for a single code that can be global until changed. For example drilling operations often will pass on all parameters except the coordinates. If you are drilling a list holes all the parameters that apply may only be in the first line of code to drill the first hole. If you decided to change one in the middle of that list by adding parameters every hole after that would have the new parameters. Maybe that's what you want, and maybe you just blew your part. Yes, its readable. I think any even hack programmer would pick up the basics pretty quickly. Yes its editable. You really need to understand the whole string of events before you do. I actually started out CNC machining functionally without CAD or CAM. I wrote out g-code by hand and used a spreadsheet to generate iterative code, and exported the text values of my formulas to copy into a text file. An issue I ran into is that often the CAM software does not output parameters or lines of code that it doesn't know (because of something I did) that it needs to. A tool change macro would be such an example. If I move the machine in order to execute a tool change the CAM software that did its job at most recent minutes ago, and maybe days or years ago, didn't know that was going to happen. When it starts the next operation it thinks its still in the same place. I had to go back into my macro (part of the control software), save the current coordinates in the current work offset, execute the rest of the tool change, and then return to those coordinates. Specifically for tool changes I would move the table back out of the way, or on a router I might move the gantry to the front of the table either automatically in the macro or manually with the jog functions of the machine (if it allowed it). On another machine for tool changes it would just STOP. On that one I modified my post processor insert a machine coordinate Z height move that brought Z to zero leaving room for the tool change. Even if you ONLY have CAM generate code for the program you still may need to write a machine specific macro or modify the post processor of the CAM program to add necessary code. Even if you never manually edit program code you still may find it beneficial to know how. On the other hand if you are just an operator then other people will do all of that. You just load the stock and push the start button. You may not even have to check your parts. The quality control people will do that. Then somebody will determine if you are running the machine wrong, if its setup wrong, or its designed (CAD/CAM) wrong. -- Bob La Londe CNC Molds N Stuff -- This email has been checked for viruses by AVG antivirus software. www.avg.com