Jump to content

Welcome to eMastercam

Register now to participate in the forums, access the download area, buy Mastercam training materials, post processors and more. This message will be removed once you have signed in.

Use your display name or email address to sign in:

Does anyone know if Conditional Output works for N blocks?


crazy^millman
 Share

Recommended Posts

Trying to get a post for a wire finished up. Problem I am having is the prapid line is putting a N number with no output of code. There is nothing to output for the line, yet I get a blank N line. I ran through the debugger and see nothing to call anything all the down to full debug mode in the NCI and there are values, but they have already been called in the G92 line so they are not needed. I tried the ` Conditional output character and it does not help. I can make it not output with removing the n$, but then if I ever need a G0 it will not have the n number for the posted code.

 

Here is the line of code in question.

 

prapid{:content:}nbsp; # Linear line movement - at rapid feedrate 0

`n$, sgcode, sccomp, x$, y$, z$,e$

 

Here is what the NC doe looks like:

 

N1 G90

N2 G92 X1.131 Y1.1967

N3 M82

N4 M81

N5 M83

N6 M28

N7 <------ This nothing line is the trouble right now.

N8 G1 G41 X1.0179 Y1.2018

N9 X.7711

N10 X.493 Y1.2579

N11 X-3.4103 Y1.2498

N12 X-3.7117 Y1.1967

N13 G40 X-3.7082 Y1.177

N14 M27

N15 M21

N16 M42

N17 M41

N18 M43

N19 M30

%

 

I am open to suggestions or comments. Thanks for any assistance you can give.

Link to comment
Share on other sites

Instead of putting the ` at the n$, try removing it from the n$ and put it on the other variables.

 

 

Another thing to try... before that line put a line in that outputs the previous values of all variables in the line, then on the line after force the current output of the variables. Just to make 100% sure nothing is changing.

Does the post have odd tolerance settings that would see a change in rounding of a variable but not enough of a change to warrent outupt? (never heard of such a thing, just thinking outloud)

 

After looking at your code again, I don't see any G00's. Could it be that it wants to output a G00 but there is no change in position so the line gets omitted altogether???

Link to comment
Share on other sites

I tired forcing the G0 and it will output if I force it. This is a V7 post and was hoping I could update and get out of having to redo one for X5, but I knew when I started on this road it was a iffy road to start down. Well I am going to have to take a X5 post and make it work the same as they were use to in V9. Such fun.

 

Thanks for taking a look.

Link to comment
Share on other sites

Try putting it under it's own conditional statement...

 

if prv_sgcode <> sgcode | prv_sccomp <> sccomp | or prv_x$ <> x$ | prv_y$ <> y$ | prv_z$ <> z$,
 [
 n$, sgcode, sccomp, x$, y$, z$,e$
 ]

 

 

I start all my output lines with pbld. (not sure what it does or what it means.... I just do...)

 

can you try using different variables for the locations? xabs$ xinc$....

 

Lastly, I noticed there is no space between

z$,e$

i.e.

z$, e$

Link to comment
Share on other sites

If you are getting line numbers output with nothing else it is most likely due to the n$ format being set to non-modal. This commonly occurs with old posts that have been updated. Prior to X MP treated n as a "special" variable and ignored the non-modal setting on a format statement, this is no longer the case. Look for the fmt for n$, find the fs or fs2 it is using and make sure it does not have an n at the end. You may have to create an additional fs or simply point to another pre-existing fs to fix the issue.

Link to comment
Share on other sites

I had it in my head as "print block delete"

 

yup, block delete, line skip

 

 

or were you actually thinking it would delete the block in the post?

 

:)

 

anything with a p in front "should" be a post block call.

 

you'll find a post block for pbld if you search the post for it

Link to comment
Share on other sites

IIRC there is a switch in the post to turn them on or off (/)

when on, anytime pbld is encountered a / will be output.

 

^That would have been my guess but I wasn't sure. I don't use em and I guess I just put it in out of habit....

 

 

pbld            #Canned text - block delete
     if bld, '/'

pfbld           #Force - block delete
     "/"

 

 

Yup, thar she blows....

 

 

 

Ron, are you getting these empty N lines all over the place or just here and there?

I have a couple old pre X posts and all have the N formatted to fs3, which is modal (no n at the end of the format statement. ) But it seems to be a bulls eye educated guess...

Link to comment
Share on other sites

On the block skip you can also do a mi or mr and get /1, /2 or so forth if you configure your post accordingly.

 

Here is something I commented out in a post I did years ago that worked with mr9:

 

pbld #Canned text - block delete

if bld, '/'

#if mr9$ = 1, '/1'

#if mr9$ = 2, '/2'

#if mr9$ = 3, '/3'

 

HTH

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.

Join us!

eMastercam - your online source for all things Mastercam.

Together, we are the strongest Mastercam community on the web with over 56,000 members, and our online store offers a wide selection of training materials for all applications and skill levels.

Follow us

×
×
  • Create New...