Multiple s codes on one line

I have an .nc file that i want to load onto universal gcode platform. When i open it i get a message 'problem opening file:multiple s codes on one line. Sometimes it is multiple f codes on other files.
First, what does this mean.
Second, what should i look for in the gcode file.
Third, how do i fix it?
Last, when i am creating an image in a cad program, are there anything i should avoid to not have code issues.

What cam program are you using to generate your gcode?

What post processor do you have it set to?

UGS is pretty strict about gcode formatting, and doesn’t include 100% of the standard gcode vocabulary. Some things, including arcs and circles, are especially limited. I have had numerous problems with rounding errors with code generated by Fusion 360 which, I believe, uses the full standard library of M and G codes.

Many other programs that create gcode also use the full vocabulary and can create code that would run successfully on Mach 3 or Tormachs don’t run n UGS. One of the frequent errors is caused by putting multiple commands on one line which sometimes, not always, gives UGS heartburn. When it identifies a line it doesn’t like and stops the run, note the line number of the bad line and edit the program in UGS. Go to the end of the first M or G command and hit enter to start a new line, then remove the spaces at then ends of the edited line and the beginning of the new line. Save the program and try again. Make sure you reload the edited program. This has usually worked for me. There are some M and G codes that UGS will not accept even on their own line. You can find them on the the UGS site.

As far as avoiding the error, I see the problem most often dealing with very small arcs. Fusion 360 uses some toolpath strategies that apparently call on gcode subroutines that UGS cannot handle. Switching to a different toolpath, like changing from 2D adaptive to morphed spiral, can get you the results you want, and make UGS happy.

I hope this helps a little, and I hope others who know more about gcode and UGS than I do jump in. The guys on this forum are pretty sharp and are accumulating and sharing a lot of good info. Please report back when you get your issues resolve so we can all learn.

Have fun. Stay safe.

Bill

1 Like

hi
i am using carbide create and ugs platform

If you’d like you can upload the gcode file here on the forum so we can take a look at it :slight_smile:

The gcode program is a simple text file.
It can be edited in Notepad or any other text editor.
Unless you are a running a spindle no S commands are necessary and can be deleted.
Most post processors can also be edited to delete header and footer output so it’s not a recurring issue.