What's new
What's new

FeatureCAM post modding

wheelieking71

Diamond
Joined
Jan 2, 2013
Location
Gilbert, AZ
So, I am tweaking on my Brother post. Basically copied my current post, and created a G100 post.
I am also trying to figure out if it is possible for me to add a dwell after the Through-Spindle-Coolant call.
It takes the pump a second to build pressure, and with no dwell I get the occasional machine error.
I also run a couple small carbide TSC drills that really need the coolant at full pressure before they enter the material.
It is no big deal to finger bang the dwell in the code after posting. But, it sure would be neat to figure out how to post it already there.
Only way I can think it might be possible is through the "post variables".
But, I have never really figured out how to use that function, or what you can actually do with it.
Anybody?
 
Okay, I was gonna play with the logic but I actually just found the easiest way ever to do this. Leave your current logic alone, and go to the coolant setting under cnc info in xbuid.

In one of the empty fields, create one that says TSC Dwell or something, and put in G4 P(whatever you want) for the "on" command. Then anytime you want the dwell, check both boxes for the coolant on those toolpaths. Boom, done.
 
Okay, I was gonna play with the logic but I actually just found the easiest way ever to do this. Leave your current logic alone, and go to the coolant setting under cnc info in xbuid.

In one of the empty fields, create one that says TSC Dwell or something, and put in G4 P(whatever you want) for the "on" command. Then anytime you want the dwell, check both boxes for the coolant on those toolpaths. Boom, done.

How were you able to check both boxes? It will only let me select one option.
 
Oh damn, I hope that's not something they added to newer versions. Mine will let me check as many boxes as I want

Capture.JPG

Edit: If that's the case though, you could probably still do the same thing. Just have one of your TSC coolant options include the G4 PXXX command after the coolant call on the "on" line.

Capture.JPG
 
Oh damn, I hope that's not something they added to newer versions. Mine will let me check as many boxes as I want

View attachment 312787

Edit: If that's the case though, you could probably still do the same thing. Just have one of your TSC coolant options include the G4 PXXX command after the coolant call on the "on" line.

View attachment 312788

Yea, I am still running 2015 (by choice! LOL)

Anyways, we are getting somewhere! Thanks.
Now I just need to figure out how to get the dwell on its own line after the M494.
Like so:

M494;
G4 P3.0;

It doesn't work if they are both on the same line.
 
after the

coolant<eob>

add

<if>[eq(<coolant>,"M494")]<then>
G04 P3.0<eob>
<endif>

Gregor to the rescue. I wrote this exact thing out but it wasn't working. You just made me realize I had missed the quotes.

Edit: Not that you'd ever need to do this, Wheelie, but you could also set up as many of these as you like. The "M494" is reading the coolant "on" field in the coolant options menu. So theoretically you could set up different dwells or whatever you'd like if you just add a comment after the M494 under different coolant options and add another string.

Ie.

<if>[eq(<coolant>,"M494 (Three Second Dwell)")]<then>
G04 P3.0<eob>
<endif>
<if>[eq(<coolant>,"M494 (Five Second Dwell)")]<then>
G04 P5.0<eob>
<endif>

I can't think of a situation I would need this for, but after playing with it in this thread I think it's neat.
 
after the

coolant<eob>

add

<if>[eq(<coolant>,"M494")]<then>
G04 P3.0<eob>
<endif>

Tried that, here is what I put at the end of the tool-change format:

{N<SEQ> }{<MOTION> }<CANCEL-COOL><EOB>
{N<SEQ> }G00 G91 G28 Z0 M05 <EOB>
{N<SEQ> }M1<EOB>
<10>
{N<SEQ> }( <OP-PASS> <SEGM-ID> )<EOB>
{N<SEQ> }N<TOOL> G00 G91 M05 <EOB>
{N<SEQ> }( [uppercase(<TOOL-NAME>)] <TOOL-DIAM> DIA. )<EOB>
{N<SEQ> }T<TOOL> G100 G90 G<FIXTURE> X<X-COORD> Y<Y-COORD> S<SPEED><SPINDLE> G43 H<OFFSET#> Z<Z-COORD><EOB>
<IF><INDEXING><THEN>
<BOL> A<ROT1-WIND>
<ENDIF>
{N<SEQ> }<COOLANT><EOB>
<IF>[EQ(<COOLANT>,M494]<THEN>
G04 P3.0<EOB>
<ENDIF>

FeatureCAM did not like that. And gave me this error message:

Error in [] code of the CNC file:

Expression [EQ(_ccoolant,M494]: Syntax error.

(Just like that, underscore, misspelled ccoolant with lower-case, and all, LOL)
 
Tried that, here is what I put at the end of the tool-change format:

{N<SEQ> }{<MOTION> }<CANCEL-COOL><EOB>
{N<SEQ> }G00 G91 G28 Z0 M05 <EOB>
{N<SEQ> }M1<EOB>
<10>
{N<SEQ> }( <OP-PASS> <SEGM-ID> )<EOB>
{N<SEQ> }N<TOOL> G00 G91 M05 <EOB>
{N<SEQ> }( [uppercase(<TOOL-NAME>)] <TOOL-DIAM> DIA. )<EOB>
{N<SEQ> }T<TOOL> G100 G90 G<FIXTURE> X<X-COORD> Y<Y-COORD> S<SPEED><SPINDLE> G43 H<OFFSET#> Z<Z-COORD><EOB>
<IF><INDEXING><THEN>
<BOL> A<ROT1-WIND>
<ENDIF>
{N<SEQ> }<COOLANT><EOB>
<IF>[EQ(<COOLANT>,M494]<THEN>
G04 P3.0<EOB>
<ENDIF>

FeatureCAM did not like that. And gave me this error message:

Error in [] code of the CNC file:

Expression [EQ(_ccoolant,M494]: Syntax error.

(Just like that, underscore, misspelled ccoolant with lower-case, and all, LOL)

Add the quotes and you will be golden. That is the same error I was getting. And you need another ) before the bracket
 
Add the quotes and you will be golden. That is the same error I was getting. And you need another ) before the bracket

NICE!!!!!!!!!!!

I tried the quotes first. Straight up copied gregor's comment. And, got the error. Tried removing the quotes, still error.
That was the one I copy/pasted in my reply here.
But, when I copied gregor's comment, I sure enough forgot that 2nd ).

Thank you gentlemen!
 
Gregor to the rescue. I wrote this exact thing out but it wasn't working. You just made me realize I had missed the quotes.

Edit: Not that you'd ever need to do this, Wheelie, but you could also set up as many of these as you like. The "M494" is reading the coolant "on" field in the coolant options menu. So theoretically you could set up different dwells or whatever you'd like if you just add a comment after the M494 under different coolant options and add another string.

Ie.

<if>[eq(<coolant>,"M494 (Three Second Dwell)")]<then>
G04 P3.0<eob>
<endif>
<if>[eq(<coolant>,"M494 (Five Second Dwell)")]<then>
G04 P5.0<eob>
<endif>

I can't think of a situation I would need this for, but after playing with it in this thread I think it's neat.

Yep, and after you've done that you can go into the tool properties, overrides, and select the default coolant you want for that tool, so that you don't have to remember to select it specifically every time.
 
So, while were all here..........
I have another one!

Sample code:

(ADCOM FAN SHROUD 1)
( T1 = 2.5" KENNA SHOULDER )
( T17 = .5 2FL CARB EM. )
( T21 = .250 2FL CARB EM )
( T24 = .375 2FL 90' )

( FINISH FACE1 )
N1 G00 G91 M05 G80
( 2.5" KENNA SHOULDER 2.5 DIA. )
T1 G100 G90 G54 X5.0 Y-3.0 S7333 M3 G43 H1 Z1.02
M8
.
.
.
.

I would like a blank line between the program name, and tool-list. Like so:

(ADCOM FAN SHROUD 1)

( T1 = 2.5" KENNA SHOULDER )
( T17 = .5 2FL CARB EM. )
( T21 = .250 2FL CARB EM )
( T24 = .375 2FL 90' )

( FINISH FACE1 )
N1 G00 G91 M05 G80
( 2.5" KENNA SHOULDER 2.5 DIA. )
T1 G100 G90 G54 X5.0 Y-3.0 S7333 M3 G43 H1 Z1.02
M8
.
.
.
.


I have tried a bunch of stuff to get this blank line, but no success yet. It seems like it should be easy.
I managed to make it happen after the tool-list. But, can not get it before.
Here is my current program start format:

<INCLUDE:init>
([uppercase(<FM-NAME>)])<EOB>
{N<SEQ> }<EOB>
<10>
(TOOL-LIST)
{N<SEQ> }<EOB>
<10>
{N<SEQ> }( <OP-PASS> <SEGM-ID> )<EOB>
{N<SEQ> }N<TOOL> G00 G91 M05 G80 <EOB>
{N<SEQ> }( [uppercase(<TOOL-NAME>)] <TOOL-DIAM> DIA. )<EOB>
{N<SEQ> }T<TOOL> G100 G90 G<FIXTURE> X<X-COORD> Y<Y-COORD> S<SPEED> <SPINDLE> G43 H<OFFSET#> Z<Z-COORD><EOB>
<IF><INDEXING><THEN>
<BOL> A<ROT1-WIND>
<ENDIF>
{N<SEQ> }<COOLANT><EOB>

The:

{N<SEQ> }<EOB>
<10>

After the tool-list got me a blank line. But, does not work before.
I do not claim to know what I am doing! That is for sure! LOL.
I just copied that from someplace else that I knew had a blank line, and it worked (after, but not before).
 
You can remove the {N<SEQ> }<EOB> lines as xbuild ignores <EOB> on any line that doesn't otherwise output anything.

The <10> is what's getting you the blank line there.

I don't understand how the tool list is generated from that code. Are you using an addin for that (ISTR there used to be a tool list addin) or multiple stream posting (don't think that existed in 2015 version?).
 
You can remove the {N<SEQ> }<EOB> lines as xbuild ignores <EOB> on any line that doesn't otherwise output anything.

The <10> is what's getting you the blank line there.

I don't understand how the tool list is generated from that code. Are you using an addin for that (ISTR there used to be a tool list addin) or multiple stream posting (don't think that existed in 2015 version?).

Yes, I use the: Add stock tool list and setup sheet.bas file as an add-in.

So, I now understand the {N<SEQ> }<EOB> lines are not doing anything.
But, why am I not getting the blank line before the tool list? It must have something to do with the add-in?

EDIT: hang on a sec,
I just went and removed the {N<SEQ> }<EOB> after (TOOL-LIST), and the blank line disappeared.
 
Oh, huh. I had <EOB>s at the end of all of mine and they work so I figured that was it. But I just took them out and left only the <10>s and they still work, so I'm not sure what you've got going on.
 
Yes, I use the: Add stock tool list and setup sheet.bas file as an add-in.

So, I now understand the {N<SEQ> }<EOB> lines are not doing anything.
But, why am I not getting the blank line before the tool list? It must have something to do with the add-in?

EDIT: hang on a sec,
I just went and removed the {N<SEQ> }<EOB> after (TOOL-LIST), and the blank line disappeared.

Well that definitely shouldn't happen!

It really has to be the addin interfering with the output.

There a few things you could try - I'm at home right now so can't test any of this myself.

<32><10> will output a single whitespace followed by a line feed. If empty lines are being suppressed that should sort that. <32><eob> is the same thing.

<13><10> outputs a carriage return and then a line feed.

Edit: One other thing of note, none of my posts output modal sequence numbers like that (that was a prehistoric convention that really old FC posts always had, and works in combination with the N numbers settings in the post dialog). All my posts output explicit N numbers at tool changes with calculated increments, such that there are zero occurences of {N<SEQ> } anywhere in any of my posts. There may be some odd behaviour with that that I am not aware. Kind of skeptical on that one though.

Edit again:
Oh, huh. I had <EOB>s at the end of all of mine and they work so I figured that was it. But I just took them out and left only the <10>s and they still work, so I'm not sure what you've got going on.

This is exactly what I would expect to happen. Not sure why Wheelie's is behaving differently...
 
Well that definitely shouldn't happen!

It really has to be the addin interfering with the output.

There a few things you could try - I'm at home right now so can't test any of this myself.

<32><10> will output a single whitespace followed by a line feed. If empty lines are being suppressed that should sort that. <32><eob> is the same thing.

<13><10> outputs a carriage return and then a line feed.

Edit: One other thing of note, none of my posts output modal sequence numbers like that (that was a prehistoric convention that really old FC posts always had, and works in combination with the N numbers settings in the post dialog). All my posts output explicit N numbers at tool changes with calculated increments, such that there are zero occurences of {N<SEQ> } anywhere in any of my posts. There may be some odd behaviour with that that I am not aware. Kind of skeptical on that one though.

Edit again:


This is exactly what I would expect to happen. Not sure why Wheelie's is behaving differently...

Thanks gregor! <32><EOB> got me my blank line! Sweet!

So, are you saying I can get rid of all the {N<seq> } bullcrap? I hate sequence numbers!
I use one N number that corresponds to the tool number at the beginning of each sequence. Like so:

(ADCOM FAN SHROUD 1)

( T1 = 2.5" KENNA SHOULDER )
( T17 = .5 2FL CARB EM. )
( T21 = .250 2FL CARB EM )
( T24 = .375 2FL 90' )

( FINISH FACE1 )
N1 G00 G91 M05 G80
( 2.5" KENNA SHOULDER 2.5 DIA. )
T1 G100 G90 G54 X5.0 Y-3.0 S7333 M3 G43 H1 Z1.02
M8
.
.
.
.

And turn them off in the post options by simply putting zeros in the Block Start, and Block Increment boxes, LOL.
 








 
Back
Top