I think I have what might be useful for setting up a job in UGS after posting from CAM software
I think what I need to figure out is the following set up.
I used this site as a reference for G Code:
linuxcnc.org/docs/html/gcode/g-code.html#cha:g-codesI also found this G Code Translator to be really helpful:
www.warrensbrain.com/gcode-to-english-translator.html - Thank you Warren
I am using Fusion 360, but the following should work with other CAM software.
First, open the .NC file (G Code) in a text editor and clean up the G Code by removing everything except the G20/G21 command prior to the first milling operation (it is easy to find if you have named the milling operations in CAM). Then go to the end of the file and remove everything after the last G0 (Rapid positioning command). There are probably some commands that can be entered here that will safely move the router back to either the start position or home, i.e., G90 G0 Z0 or $H
If you have figured out how to not include all these commands from within your CAM software even better but I am always going to check just to be sure.
Second, run a setup and clean up routine (some steps below can saved as a Macro in UGS. Hoping to figure that out after confirming that it is correct)
1. G21 //Programming in millimeters (if the G Code from Fusion was done in inches, then G20)
2. G43.1 Z0 //Tool height offset compensation negative
3. G49 //Tool length offset compensation cancel
4. G92.1 //Position register (programming of vector from part zero to tool tip)
5. G90 //Absolute programming - Using just G90 should clear the settings because no values are provided
6. G94 //Feed rate per minute - Using just G94 should clear the settings because no values are provided
7. G17 //XY plane selection (make sure this matches your Fusion 360 settings)
8. Home the machine ($H) - Home on my system is the back, left corner with Z at the top.
~ If you have homing switches, then $H, otherwise jog the machine into position.
9. Set the home position using G92 X0 Y0 Z0 so that Soft Limits will work (Maybe this command G10 P0 L20 X0 Y0 Z0)
~ The UGS Soft Limits are available via Machine >> Firmware Setting >> $130, $131, & $132 -- set these up to avoid crashing and system damage
10. If you have an XYZ touch plate
~ Place the XYZ touch plate on the stock
~ Jog to the corner of the XYZ touch plate
~ Run the UGS XYZ Probe macro (there does not seem to be any documentation on how to configure the Macro. There are some old YouTube Videos. With UGS, you do get what you pay for.
~ Remove the touch plate
~ Click Return to Zero
11. If not, locate the starting corner by jogging in small increments and using the paper method
12. Set the G54 origin using G10 L2 P1 X0 Y0 Z0 (G10 tells the system to input data, L2 tells the system which register G10 will edit, P1 in this case is G54, X0Y0Z0 says this is the location
13. Instantiate P1 using G54
14. Load the job file
~ If this is the first attempt, consider removing the stock, fixtures and the bit so you can cut air and not risk a broken bit, crashing, damaged stock etc.
15. Send the job file
I would really like a recipe for bit changes. I assume it would include the use of G28 and G28.1 to set a location for the flipped over XYZ touch plate, setting compensation values to accommodate the bit length difference using G43 G49 or some combination with reference to the G54 Z position, etc. Then retuning to G54 position with the adjusted Z height. This may be a waste of time since G Code does not seem to have commands to pause a job for manual bit changes. But even if I have to create multiple NC files to accommodate bit changes, I still need to be able to get back to the original G54 location with the Z adjusted for the bit length.
If anyone has suggestions or comments, please share. Sorry, I probably cannot answer any questions as I really don't know what I am doing.