Gcode Simulator

0 views
Skip to first unread message

Lida Rick

unread,
Aug 4, 2024, 4:27:20 PM8/4/24
to fisuhatos
GCode simulators have experienced a resurgence in popularity over recent years thanks to the rise of 3D printing. Hobbyists and professionals alike need a way to see a 3D printed item before they spend hours printing it. A good simulator provides a quick and easy way to achieve this.

For example, RoboDK users often use the free tool Slic3er when they are using robotic 3D printing. This tool allows them to visualize the item that they are going to print before they send it to the robot.


There are some situations where you might want to perform some more advanced analysis on your G-Code or link with your own programming. Perhaps you are using the code as part of a research project or you are developing your own 3D printer.


Many of the leading CAM packages also have the capacity to simulate your G-Code. Often, if you want to link the software directly with your CNC machine or 3D printer, it will require you to purchase an extra add-on license, so weigh up the pros and cons beforehand. However, simple simulation can usually be achieved within the CAM software itself.


Hello everyone,

I would like to get some suggestions about G-CODE SIMULATOR. As you guys may already know that MASTERCAM does not verify CNC G-CODES but only NCI, I am now looking for an affordable CNC-GCODE simulator. I did use my own money for NCPlot like other people suggested ($300 I paid), it's Okay for VERTICAL. I believe it is only 32BIT software, lagging a bit of graphic. I am looking for a simple HORIZONTAL NC BACKPLOT, any of you guys know other software than CIMCO and NCPLOT backplot?


As said above NCPlot works great as a g-code backplotter for horizontals when properly configured. Give the author an email if you need help setting it up, he's very helpful. Yes, it was written by one guy.


If you want/need to step up to full cut simulation you need a package like Vericut or Predator virtual CNC. I'm using the former for 5 axis medical parts with excellent results; I can feel comfortable programming the holder less than .100" from collision with the trunnion. Well, maybe comfortable isn't the word, but it hasn't gone wrong on me yet!


For Eagle there exists the cool plugin pcb-gcode, which can create GCodefrom a board design. The problem is that GCode is not portable and verymachine dependent. And the plugin is designed more for professional CNCmilling machines in mind, so I was unsure if this could work with my homemade3D printer / CNC milling machine.


Was used for gaming engines like in the good old Comanche game. Actually thiswas just a height map, a 2D array where each byte is the height of the voxelwhich builds the terrain surface.A voxel is a cube (volumetric pixel) that is used to create 3D objects,which is different to the typical 3D game of today which is created usingpolygons. But enough on 3D games.


It would be possible to create the simulation for PCB etching purely using aheightmap like in Comanche, but I decided to use a real 3D matrix of voxels,so that I can produce all kind of shapes including overhangs. The workpartconsists of a voxel space and the milling cutter too, to be able to simulate theinteraction of both.


The gray map file can be created quickly and is all you need to inspect theresults of Eagle exported GCode. But of course I wanted to see some nice 3Danimation of my simulation. Because 3D programming is a lot of work I decided tosimply produce a series of workpart gray map files for all the individual stepsand use POVRay to produce nice 3D images, which then get combined into a videousing ffmpeg.For workpart gray map is used as an heigh field in POVRay, the tool is writteninto a density file (.d3f), because it contains overhangs and height fieldswould not be very useful here. The density file represents the 3D voxel spaceand is rendered using an isosurface (this was the trickiest part).The final result you can see in animation at the top of this blog.


Best is relative. PrusaSlicer 2.3.0alpha3 includes a very good gcode viewer. ideaMaker also has a a good viewer. Simplify 3D has a basic one. Octoprint has a good viewer for layer-by-layer progress of a print in progress. There's always gcode.ws if you want to do more detailed analysis.


A g code simulator or g code viewer is a software tool that lets you test g code you created. The software reads the .nc file just as your CNC machine would and creates a graphical representation of the tool paths and movements of the machine.


The X, Y, Z = 0 location is represented by the intersection of the red green and blue lines. This is very helpful if you are not exactly sure where to set the origin when setting up your part on the machine.


The plot area image can be manipulated by using the view cube in the top right section of the plot area. For example, this is helpful if you want to confirm the Z = 0 location relative to the tool paths.


Very nice as an alternative I make a holder for a ball pen in the same place as the original tool so I run the machine and check if everything is perfect

But I really like the simulator and I will try it

Thank you Tim


Hi Jack, Good question. The answer is yes, you can combine multiple gcode programs with different tools and run them in NCviewer. I just did a test where I took operation 1 (OP1) from a part I designed that used a 1/8 endmill and combined that will OP2 that used a 1/4 endmill. I just copied and pasted the code from my text editor into the gcode window of NCviewer. I placed the OP1 code first and then pasted the OP2 code directly after then end of the OP1 code and clicked plot.


Christopher, great to hear from you. I appreciate the comment. Glad you found the Gcode Simulator useful. NC Viewer can be used offline as its automatically cached by your web browser. As for integrating with a CAM package, you would need to contact the creator of NC Viewer, Xander Luciano.


A 3D print head is a physical object with mass and it is impossible to instantaneously achieve 500mm/minute. The printer IS applying (i.e. using) Acceleration and Jerk to assure that the print head does NOT miss its mark).


As long as you are measuring and simulating a physical system, you will have to simulate the physics to get anywhere close to accurate comparisons. For example, here is a project to improve the estimate of print time. It includes a firmware simulator written in Python.


This is my second project with my cutter. I have tried to get through the Fusion 360 manufacture multiple times and I cannot get it to where it will simulate the cutting (which I did successfully on my previous project) and I am assuming you need to do so you verify it will cut. It looks like I have the cut paths correct, but when I run the simulator, it just sits there when I hit the start button. I have attached the .SVG file I am using and also the .nc file.


To resolve, reduce the Springback value in Post Procesing to -0.015. This will still provide 0.005" of Springback if needed. (Best case scenario is to measure what the cut height is with the given values and adjust accordingly.)


That is a great tool. I am out of town trying to set this up for when I get back. It showed me that none of the text showed up in the .nc file. It is literally just the exterior box cut that outlines the text.


Like Terrance said, that cut height may give you a really poor cut if the machine is setting the torch at 0.103 inches. With all of that lettering, it will be miserable to clean up. There is likely to be both top and bottom dross with a cut height of 0.103 inches. I had terrible dross when my cut height was 0.095 inches.


In the case that you are programming around the center of rotation, or you know your work offsets are set correctly, the next thing to double check is your TLO (tool measurement). It is important that you have measured the tool number that the program is expecting. Once you have done this, please provide us with that value as well since it is also necessary for an accurate simulation.


My part is programmed around WCS.

I have done TLO on the tool. I have the extended spindle with a 30mm long tool on it. If i try to enter the gcode manualy step by stepp there is no problem. Also when i just move the machine manualy using keyboard comands no problem there either, it can reach wherever it needs.


The problem is your G54 offsets. The shift in Y is causing a shift in Z when A is at 90 degrees. The shift in X also causes your toolpaths to exceed the X travel limits further along. Make sure the G54 offsets represent the origin of your WCS setup when A is at 0.


I recommend commanding A to 0 and touching off the appropriate faces to figure out the X, Y, and Z values of the top left corner of your stock (that is of your G54 offset). You can find an example here: -6.4%3A--Locate-the-Stock-with-Work-Offsets


The G54 offset is your origin point. It should represent the WCS origin of your setup in Fusion 360. The way you mount your stock, though, may be different than how it is represented in Fusion, so you need to use the machine to know exactly where that point is. The link above demonstrates how to touch off the various faces, taking into account the radius of your tool, to appropriately set that point.


3D printing is cool stuff. But it is often annoying that you have to keep the PC running for hours or days during printing process. You can also buy a SD Card slot + LCD screen for the printer but that is expensive. What if there was a way for you to print 3D objects without the need for a computer?


Since most printers use a serial communication over USB, your Android device must support the USB Host feature (USB OTG). Once the printer is connected to the Android device with a USB OTG cable, Android will detect the USB device and start the App. When the printer has responded successfully, the printer control panel on your phone screen can be used to send manual commands like X/Y/Z movements, home axis, temperature control etc. Dietz says most Android devices are able to achieve an average IO latency of 5-10ms which is enough for printing at high speed. Dietz has also added Bluetooth support to allow users to print wireless with a serial bluetooth module (e.g. JY-MCU).

3a8082e126
Reply all
Reply to author
Forward
0 new messages