What's new
What's new

Fanuc 5t Post Processor edits for Fusion 360 Help needed

Tuff Luck Tom

Aluminum
Joined
Feb 14, 2010
Location
Asheville, Nc, Usa
Is any one here using a Fanuc 5t or similar with Fusion 360? I am facing 2 problems (that I know of) One is the 5t does not recognize decimal points. The other problem is the G Code that is being out put drops any trailing zeros.

I have edited my post processor Script with the following. But is only has the desired effect in part and is a poor and dangerous band aid in my opinion. X is pretty close to what it needs to be unless it ends in zero/s. The other z, etc sometimes get rounded up and also suffer the same problem with zeros being omitted.

var xFormat = createFormat({decimals:0, scale:2000}); // diameter mode
var yFormat = createFormat({decimals:0, scale:1000});
var zFormat = createFormat({decimals:0, scale:1000});
var rFormat = createFormat({decimals:0, scale:1000}); // radius
var feedFormat = createFormat({decimals:0, scale:1000});

Maybe there's some one here who is good with JavaScript? Or maybe another solution? If we can make it always post digits to the tenth I can manually edit out the decimals if need be. Any help would be very greatly appreciated!
 
Have you downloaded and read through the manual?

Page 71 has some formatting information that could be helpful, and based on what you have posted currently I'm lead to believe that you have not referenced that material yet.
 
I posted in a few places looking for help with this to no avail. I am going to try and update those threads for anyone this may help. Hopefully this is correct it seems to work as intended in preliminary tests





Ok so I have finally figured out how to assure that trailing Zeros are not dropped using a trim command, I have also added a forceDecimal command but for some reason it has no effect. I will say that I do not really know JavaScript so if you use the following edits please beware. I will just use the search and replace feature in note pad to delete the decimals. It would be nice if that were a user definable feature and I am sure it could be easily done. But I think I am happy for now. Hopefully this helps someone with a fanuc 5t or like machine.

If anyone has any ideas for upgrades or edits I would be interested to hear.


Please note I have had to add a space in the code at : ( because it shows in this thread as an emoji.

var spatialFormat = createFormat({decimals: (unit == MM ? 3 : 4), trim:false, forceDecimal:false});

var xFormat = createFormat({decimals: (unit == MM ? 3 : 4), trim:false, forceDecimal:false}); // diameter mode

var yFormat = createFormat({decimals: (unit == MM ? 3 : 4), trim:false, forceDecimal:false});

var zFormat = createFormat({decimals: (unit == MM ? 3 : 4), trim:false, forceDecimal:false});

var rFormat = createFormat({decimals: (unit == MM ? 3 : 4), trim:false, forceDecimal:false});

var feedFormat = createFormat({decimals: (unit == MM ? 3 : 4), trim:false, forceDecimal:false});
 
I actually was unaware of any such material until I found the following link this morning.

https://cam.autodesk.com/posts/posts/guides/Post Processor Training Guide.pdf

Thanks for taking the time to make the suggestion!

Of course.

I'm spitballing here, but it says that the default separator for a decimal point is '.'

Have you tried to add in an empty separator character for your formats to see if that will force it to omit the decimal? It says that the forceDecimal specifier as false will only drop it for integer values. That's the next thing I would think to try.
 
Of course.

I'm spitballing here, but it says that the default separator for a decimal point is '.'

Have you tried to add in an empty separator character for your formats to see if that will force it to omit the decimal? It says that the forceDecimal specifier as false will only drop it for integer values. That's the next thing I would think to try.

I just searched the post using the search option in word pad for '.' and came up with no such characters in the post. But I found where it says just that in the training guide.
 
I just searched the post using the search option in word pad for '.' and came up with no such characters in the post. But I found where it says just that in the training guide.

I don't think you'd find it in the post. If you don't designate your own separator it's going to go to a decimal point, which makes sense. I'd try to call out a separator in one of your format lines, but instead of using an actual character try to use nothing.
 
I don't think you'd find it in the post. If you don't designate your own separator it's going to go to a decimal point, which makes sense. I'd try to call out a separator in one of your format lines, but instead of using an actual character try to use nothing.

Gotcha! Either my implementation of where is goes in the code is no good or it does not like having the field empty. That's ok. I can edit out the decimal with word/note pad I believe. This is obviously my first round with JavaScript lol...
 
If you go back to page 72 check out the last couple lines in the blue box. I'm looking at the var zFormat line. It looks like the function you need to force it into integer output is scale, then if you keep your forceDecimal at false it should drop the decimal output. I'm wondering what kind of other effect scale will have though...
 
If you go back to page 72 check out the last couple lines in the blue box. I'm looking at the var zFormat line. It looks like the function you need to force it into integer output is scale, then if you keep your forceDecimal at false it should drop the decimal output. I'm wondering what kind of other effect scale will have though...


I edited the forceDecimal out. I think I like the idea of out puting g code with decimals and then using note/word pad to edit them out. This has been pretty easy so far. That way I can check over some of the moves more easily while there are decimals. I've been tied up with power outages and some things that are easy to run without cam so I haven't been able to give the whole shebang a real trial. Hopefully I've got this whole cam thing about in the bag. I'm ready for results lol. Thanks for the help!
 
I edited the forceDecimal out. I think I like the idea of out puting g code with decimals and then using note/word pad to edit them out. This has been pretty easy so far. That way I can check over some of the moves more easily while there are decimals. I've been tied up with power outages and some things that are easy to run without cam so I haven't been able to give the whole shebang a real trial. Hopefully I've got this whole cam thing about in the bag. I'm ready for results lol. Thanks for the help!

Makes sense. Just for your information, not long ago I programmed super old Fanuc 4t and 5t machines...the format took a bit to get used to. Fortunately I was able to get my company to shell out about $500 for Cimco Editor that featured a backplot that graphically supported 4t and 5t format (among many others). Really helpful for me.
 
Makes sense. Just for your information, not long ago I programmed super old Fanuc 4t and 5t machines...the format took a bit to get used to. Fortunately I was able to get my company to shell out about $500 for Cimco Editor that featured a backplot that graphically supported 4t and 5t format (among many others). Really helpful for me.


That is helpful! I am pretty well still at the beginning of my journey with the 5t. The early version of some of the CAN cycles, using G50 and other formatting is a bit of a curve. I feel like I've spent the entire summer getting the machine going and getting up to speed. But it has been a good lesson and the cost of the machine was right. I would have been lost without the 5T manual. Thanks a ton for the info!
 








 
Back
Top