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:

Anyone know if mdrl_dir varaible?


crazy^millman
 Share

Recommended Posts

I am still working on my Mill/Turn post for my Lathe. I need 3 sets of strings for the call outs for Lathe drilling, Mill Drilling front face, and Mill Drilling Cross. If you change the drillf string it effect both the lathe and the mill G code call out. I made another string drillfm. The post however decides on the Gcode call for the drilling cycle here in the post:

 

code:

pgdrlout        #Drill Gcode output

if mdrl_dir = zero, *sgdrillf

else, *sgdrillc

I was wondering if I could have something like this:

 

code:

pgdrlout        #Drill Gcode output

if mdrl_dir = zero, *sgdrillf

if mdrl_dir = one, *sgdrillfm

else, *sgdrillc

With one being the milling front face, and whatever the other value is being the condition to make the else statement work. I think I could do a Misc integer something like so if there is only 2 values for the above variable:

 

code:

pgdrlout        #Drill Gcode output

if mi8$ = 1,

[

*sgdrillfm

]

else,

[

if mdrl_dir = zero, *sgdrillf

else, *sgdrillc

]

Not what I want to do. There should be something coming out of the NCI I can use that the post is using with regards to the mdrl_dir without me having to use a Misc interger to accomplish this.

 

What are you thoughts? Do you know of another variable I could use that would act as the logic trigger here? As always thanks for any response or ideas or suggestions.

 

And Bill if you are looking this is something else they can address in Lathe. biggrin.gifbiggrin.gifwink.gifwink.gif

Link to comment
Share on other sites

It looks to me like you should be able to set as many choices as you want with mdrl_dir. The two current choices are set in pdrill0$.

 

You could try;

 

code:

pdrill0$         #Pre-drill postblock call

if cuttype = five, #Don't allow 5 axis, rests at toolchange

[

usecandrill$ = zero

usecanpeck$ = zero

usecanchip$ = zero

usecantap$ = zero

usecanbore1$ = zero

usecanbore2$ = zero

usecanmisc1$ = zero

usecanmisc2$ = zero

]

else,

[

if abs(cuttype) < three, mdrl_dir = zero

if opcode$ = 105, mdrl_dir = two #<<<<<<<<<<<<<

else, mdrl_dir = one

code:

pgdrlout        #Drill Gcode output

if mdrl_dir = zero, *sgdrillf

if mdrl_dir = two, *sgdrillfm #<<<<<<<<

else, *sgdrillc

Link to comment
Share on other sites

I found this on the post reference guide;

 

quote:

Postblock calls for Gcode 81 and 100 in Mill/Lathe

Canned drilling cycles can be output as long code or as canned drilling cycles. See Working with Drill

Cycles for more information. The structure here represents the calling order when output has been

designated for canned cycles. Long code output calls to the Postblock calls for Gcode 0 and 1 in

Mill/Lathe output structure.

Postblock calling for NCI Gcode 81

! drillcyc = 0 –

# posttype = 1 (Mill) –

• mdrill in post – Call mdrill

• otherwise – Call pdrill

# posttype = 2 (Lathe) –

• ldrill in post – Call ldrill

• otherwise – Call pdrill

! drillcyc = 1 –

# posttype = 1 (Mill) –

• mpeck in post – Call mpeck

• otherwise – Call ppeck

# posttype = 2 (Lathe) –

• lpeck in post – Call lpeck

• otherwise – Call ppeck

! drillcyc = 2 –

# posttype = 1 (Mill) –

I only copied from one page, but they all have posttype = 2. You could try "pinging" posttype$ or posttype to see if you get a hit.

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