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:

Macro B question


MIL-TFP-41
 Share

Recommended Posts

I dug around and can't find the answer to this

I want to make a statement saying something like this:

If #3 and #18 are not equal to #0 then go to N400

would the correct format be this?

IF[#3AND#18NE#0]GOTO400

I dug around in a bunch of Renishaw macros & could't find anything like that. There was some that looked like this:

IF[#3AND18NE#0]GOTO400

So the # sign is missing from the 18

 

What would be the correct way?

Link to comment
Share on other sites
23 hours ago, JParis said:

IF[#3NE#0]AND[#18NE#0]GOTO400

I think that'll get it

OK, I tried that & got an illegal expression alarm.

It did take both this IF[#3AND#18NE#0]GOTO400 and IF[#3AND18NE#0]GOTO400

however.....It didn't react as I hoped so back to the drawing board

Link to comment
Share on other sites

#0 is typically an un-assignable NULL or 0. value used in MTB "stuff."  At least, every Fanuc based control I've had my hands on. I typically try to use all #500 and higher as you get down into the variables the MTB and probe use down in the #0 to #199 area.  I have generally had bad luck with #0 and I always just assign one such as #599=0. for my use.

Then you should be able to use what John offered but subbing #599 for #0.

In my experience any way, hope that helps.

Link to comment
Share on other sites

I got it worked out. Later in the program there is a line, IF[#18EQ#0]THEN#18=0.

The fanuc's read ahead even when you turn high speed off with a G5.1Q0, so it was giving R or #18 a value of zero when it hit that statement ( IF[#3AND#18NE#0]GOTO400 ), even tho the program had not progressed to that point.

So I changed it to read if #3 and #18 had a value other than zero, an error came up. Got it working...so all is well.

Link to comment
Share on other sites
11 hours ago, Tim Johnson said:

I ended up doing that also. Renishaw told me what it was but I forgot. (2002?) They told me to comment it and see if that worked. It did.

We have 1604 bit zero on and the install guys put the g5.1q0 in the settings sub program. 

But the ots macro where it spins the tool to touch off isn't working. The guy is coming to look at it but I may try turning the parameter off to see if it makes a difference

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...