CNC, Mechatronics Integration and Custom Machine Design
“Logic will get you from A to B. Imagination will take you everywhere.”
Albert E.
Anybody else notice that the first move would be a rapid to the UNDERSIDE of the job?Not a good idea in anybody's book.For goodness sake don't try to run any program until we have seen the first few lines of code.
Pick a system of units and stick with it and make sure the post processor that is selected from the huge range is the right one for those units.You won't be the first one to try to send a machine to a point yards outside it's physical limits because of picking the wrong one but you have been warned about it.
Importantly,set a safe height at a height equal to the workpiece plus a bit because your 1/8" could well be referenced from the part datum at the bottom.Which will lead to gouging through the piece if it actually is configured like this.
A few diagrams will help us get to the root of the problem.
CNC, Mechatronics Integration and Custom Machine Design
“Logic will get you from A to B. Imagination will take you everywhere.”
Albert E.
Mactec54
Your glasses must be fogged up, the first Z move is up not down, no matter how you look at it.
He set his tool to the top of the work, so no chance of this happening.
It's as simple as looking at the program code, nothing more to it, no diagrams needed, the program code tells you every move, so you can make your own drawing of what he is trying to do.
Mactec54
Well then you should know you don't use a G00 with a G28 a G28 is already a rapid move all by itself it is used in more than one different way. this is just 2 examples of how it should be used
You also would never do a G00G54X0Y0Z0. this is what someone new to CNC programming would do, not someone with 35 years' experience.
G91G28Z0
G91G28X0Y0
G90G28Z0
G90G28X0Y0
Mactec54
I don't know if you are quite as bombastic in person and when sober.We have a newbie who is mixing up absolute and incremental programming,creating in a mixture of metric and imperial and using a controller which from it's own website seems to use the parked position of the machine as a home position.If we don't have a clear idea of what he believes he has done and what it might have led to,it will be hard to overcome any misapprehensions he/she may have.Which is why a diagram would ensure we all see the same things and from which we might devise a solution.
...you were close. the format would look like this G10L20P1X0Y0Z0 (P1 is Work Offset storage for G54) maybe this will help explain Work Coordinates G54-G59 Linuxcnc works the same way as UGS most likely.
https://linuxcnc.org/docs/html/gcode...#gcode:g10-l20
https://linuxcnc.org/docs/2.5/html/g...rdinate-system
CNC, Mechatronics Integration and Custom Machine Design
“Logic will get you from A to B. Imagination will take you everywhere.”
Albert E.
[QUOTE=missgeneralidea;2491530]Hi,
Most of the replies so far make a lot of assumptions about your understanding of the processes you need to know. Although I’m no expert, I’ll try to make a beginner’s step-by-step checklist.
1. Know what units your CAD design uses, Imperial (inches) or Metric (mm) This is in your CAD software. Your CAM software settings should match. If your software is a CAD/CAM package, make sure the CAM setup matches the design.
2. Check that your CNC controller firmware is properly configured. You should be able to see and change the configuration settings or firmware settings by typing commands in the console panel of the UNIVERSAL GCODE SENDER. Within the control board firmware, you can set defaults such as units, flatbed XYZ limits and a host of other settings. Your machine or controller documentation should explain how to read and change all of the settings.
3. In CAD go through and understand the job setup parameters. The most important are:
a. Raw stock dimensions and margins or offsets. Margins/ offsets tells the machine the location of the part within the stock. Make sure there is at least enough margin to accommodate the tool diameter. If you don’t, the tool will likely go up against the physical limits of your machine and stall it out or crash the Gcode. There should also be clearance settings to accommodate hold downs and fixtures.
b. XY zero location. This establishes where The starting point will be. Some people prefer bottom left and others use center of workpiece. It just depends on a number of factors like workpiece mounting, repeatability, multiples of the same part and other factors.
c. Define where you want to set the Z zero point. Most of the time you will want that to be the top surface of the stock but other options are top of the table or center of the stock.
d. Go through the other setups such as tooling, speeds and feeds, type of operation and so on.
5. Check and select your Post Processor. This is the version or dialect of Gcode you need that is compatible with your machine. Most commercial software comes preloaded with a bunch of different industrial machines and many of the most popular hobbyist or desktop machines. Many of these have proprietary or specialized versions of the Gcode language. If your machine is not listed use Generic or GRBL. Generate your toolpaths (Gcode).
5. Most CAD/CAM software packages have built in simulators. Test your Gcode to make sure it’s doing what you intend. There are also free Gcode simulators out there. Make sure the tool starting point is where you want it. This might be shown as a triad of arrows or representation of the tool.
6. Home your machine via UGS. This should send the tool to the XY zero point (usually bottom left) and the Z uppermost limit of your machine.
7. Jog the tool down until it just touches the top of the workpiece.
8. In UGS click on the “Zero Machine” button. This sends a G54 code to the controller and tells the controller “This is the starting point. Everything after this is referenced off of this point.” UGS should show XYZ all set to zero.
A few other notes:
G90 vs G91:
G90 is Zero referenced which means all subsequent XYZ moves are referenced off of the machine starting point of X0, Y0, Z0. X10 means the tool will go to a position 10” from X0. The next X move to X12 means go to a position 12” from X0.
G91 is additive. It tells the controller that all subsequent moves will be the distance from the previous move. So, if starting from X0, X10 means go to 10” from X0. With the next X move, say X12, the machine will go another 12” which will be 22” from X0.
G20 and G21: This tells the machine that all subsequent moves will be in inches (G20) or in mm (G21). G20 X2 moves the tool 2”. G21 X2 moves it 2mm. If you see G21 and your design is in inches, go back and check your CAM setup.
Z10 vs Z-10: Z10 moves the tool up 10” or 10mm depending on your setup. Z-10 move it down 10” or 10mm. If your first Z move doesn’t make sense, your machine zero is wrong. Go back to step 7 and establish your machine zero.
I hope this helps.
Thanks. I've reworked the G-code file and still have a few problems but not as many as before. I think, I had multiple set-up worng, First, I reconfigured all my settings to match my post-processor. They all work in metric now. This seems to have elimated the error. I also set up a few of the tools that I will be testing and the file seems to be running. I am currently air running a job as I type. It looks fine except that I could probably increase the speed but I dont know how to do that yet and afraid of jumping seteps. I do think I will need to change from using USG. There seems to be loads o problems when I upload the new file, for example, it doesn't reconginze T1M6 and I have to run the file from the following line. I'm also not able to use the console command keys when the machine is running which I think is strange since I would assume you could run G-code commands like '!' or '?" incase something goes wrong. I'll look into LinuxCNC and try this program.
Thank you again. I appreciete your support while I am learning!
I think the main issue is me being a newbie and mixing up everything. I think using metric helped and the positioning now works once it's set above the material. I'm still a bit confused, but I guess this is huge learning curve.
this is my current code for some text:
T1
G17
G0Z12.700
G0X0.000Y0.000S12000M3
G0X10.214Y13.611Z3.175
G0Z0.000
G1Z-3.175F1200.0
G1X10.244Y13.204F3600.0
[QUOTE=joejoemoejoe;2491792]Joejoemoejoe!!! Thank you for this step by step. Super clear and helpful! I got most of the steps correct except for the measurements, I am now only working in mm becauase USG seems to have that preference. I may try Linux CNC because I am finding USG runs many errors. Unfortunatly, I bought a desktop milling machine (dremmel) that has no support. A mistake I won't do again. Community, like this one is super important. I think what I did wrong as well was using the default tool measurements to run the program. After I adjusted my design setting for both the tool and metric, the files are sending the correct coordinates.
I'm printing out your notes to reference again. I'm going to be cutting in foam at some point today and I hope everything works!
Thank you @joejoejoemoejoe
I started using UGS only recently and have found it to be much easier and more reliable than what I was using before. If you haven't already, go through the setup wizard. It's under the "Machine" tab of the app window's top menu. You can also change your units on the "State" tab in the left pane.
Thanks! I have gone through the set-up wizard and some online videos. I find a few things challenging. I'm not sure why when I run a program, everthing gets greyed out. You would think you could write commands in the console but you can't in USG (from what I know). Also, I'm not sure how you can run from this line when a program fails. I was air running the prgram right now (without the dremmel on) and it as working fine untill I decide to turn on the dremmel while running to see what would happen. The system alarm went on right away (without touching anything). I wanted to see if I could resume the job at the last position and found USG not allowing me to 1.) find the last line 2.) enter anything in the console.
I'm now going to write another thread to see if someone can help with some issues in GRBL, G-code and USG.
What a learning curve!!! @joejoemoejoe