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:

Variable Z feed


CADin & CAMin
 Share

Recommended Posts

I have two machines that have different z feed speed requirements, when I do not ramp. The controlers will do math and can use variables. If I have a linear move that is only a Z move, I want to include a multiplication to the feed. This is the code I have tried. It does not work when there is only a Z move.

 

Can anyone help me fix this code or give me a better way to do this?

 

Thanks in advance.

Bert :confused:

 

if (xabs<>prv_xabs) | (yabs<>prv_yabs),

[

pcan1, pbld, `sgcode, sgabsinc,

pxout, pyout, pzout,

pcout, feed, strcantext, e

]

else,

if zabs<>prv_zabs,

[

pcan1, pbld, `sgcode, sgabsinc,

pzout, pcout, *feed, "*V23",

strcantext, e

prv_feed = -9999

]

Link to comment
Share on other sites
Guest CNC Apps Guy 1

I'd set this for starters - prv_feed=c9k

 

I'm a bit confused by the "*V23". Is this what you want to come out in the code? or are you trying to perform a calculation based on that value?

 

Have you ocntacted your reseller? I'm sure they'd be more than happy to assist you.

 

JM2C

Link to comment
Share on other sites

Thanks for your reply James.

 

In the opening of my g-code I have two intialization sections, one for each of the two machines we have. Part of this section sets variables specific to the machine. The V23 is a variable factor to calculate the different z speeds.

 

My reseller in Huntington Beach is very knowledgeable and has been helpful when I have ocntacted them. My problem is that I almost never have time to work on my post processor during the day.

 

Thanks, Bert

Link to comment
Share on other sites

Hey Bert.

 

Use the motst variable:

 

motst = 4 if Z only motion.

 

if motst <> 4,

[

pcan1, pbld, `sgcode, sgabsinc,

pxout, pyout, pzout,

pcout, feed, strcantext, e

]

else,

[

pcan1, pbld, `sgcode, sgabsinc,

pzout, pcout, *feed, "*V23",

strcantext, e

prv_feed = -9999

]

 

Your code looks OK except that you have:

 

else,

if...

[

.

.

]

 

the nested if has to be inside [ ]'s

 

Have fun!

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