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:

Misc. Values - Integer/Real


CNCGUY
 Share

Recommended Posts

What are you trying to use it for?

This is the formatting for their usage

code:

fmt T 2 uptol

fmt U 2 lowtol

fmt C 2 retract

Here's how I define them for a probing cycle

code:

uptol = mr1$   #UPPER TOLERANCE LIMIT                   #### MISC REALS mr1 and mr2  ARE USED

lowtol = mr2$ #LOWER TOLERANCE LIMIT #### TO SET THE UPPER AND LOWER TOLERANCES

retract = mr10$

Place the variable where you need the output in the post and enter the value in your misc int

 

Then I call it out like this

 

code:

pdrlcommonb                                              ###FIND OUTSIDE X CENTER PROBE CYCLE ADDED 08/01/05 - JMP

#~drillcyc, e

if drillcyc$ = 14,

[

"(FIND X CENTER OUTSIDE)", e$

"(AUTO CENTERING CYCLE)", e$

"(ON THE X AXIS)", e$

pbld, n$, "G65 P8006",*drl_prm1$, *drl_prm2$, *retract, "D0.", *drl_prm3$, *drl_prm6$, *uptol, *lowtol, "V0.", *drl_prm7$, *drl_prm8$, *drl_prm10$, e$

pbld, "G04 P100", e$

pcom_movea

]

Link to comment
Share on other sites

To simplify what I need. . . . .

 

If any operation, other than the first, has mi10 = 1, I need to put that as a comment in at the beginning of the program.

 

code:

lsof

if mi10=1, "(MI10 = 1)", e


The problem is that this only reads the first op. How do I read all ops then post it in lsof ??????

 

Hope that explains it better

Link to comment
Share on other sites

Yes, there is a way around that. You need to check the value if mi1 in the preparatory postblock pwrtt. You do that like this:

 

Set the variable tooltable to 1 or 3 (don't change it if it is already 1 or 3) to enable the preparatory postblocks.

 

Declare and initialize a flag to hold whether mi1 was set in an operation:

 

code:

mi1_used : 1

Then you check the value of mi1 in pwrtt:

 

code:

pwrtt

if mi1 >= 0, mi1_used = 1

Last, you check the value of mi1_used in lsof:

 

code:

losf

if mi1_used, "(MI1 = 1)", e

I hope that helps.

Link to comment
Share on other sites

Your post may not have a pwrtt post section so you may have to create it. Basically pwrtt looks thru the post first to gather information for lists at the start of the file.

 

I use this in my posts fo create a tool list at the start. This loops around and counts the tools ans numbers the operations. It then creates a list with the tools they use.

 

pwrtt # Tool table at start of file

tnote = t

toffnote = tloffno

tlngnote = tlngno

opcnt = tcnt + 1 # operation counter = tool counter +1

if t >= 0,

[

"(", "OP", 35, *opcnt , " IS ", *tnote, " -",*tldia, " - ", "OPERATION IS ", *sopcode,")", e

"( ", *toffnote, " -",*tlngnote, ")", e

"( ", "TOOL TYPE = ", pstrtool, ")", e

tcnt = tcnt + 1

]

Link to comment
Share on other sites

Mike,

 

Its in there. But you bring up something else I want to do. Numbering operations so they coincide with tool number and number of times it is used.

 

This is what I have now

First time for tool 3

N3

T303

 

Second time for tool 3

N3

T303

 

This is what I want

First time for tool 3

N31

T303

 

Second time for tool 3

N32

T303

 

etc., etc.

 

Ive been putting this of for a while!!!

Link to comment
Share on other sites

You might be able to do this in the ptlchg0 section. This is for null tool changes. In english that means "what to do between operations when your using the same tool again". So you contour the outside and the cut a pocket. In between the post looks at ptlchg0 to see hoe to handel the "In-Between Cuts" part of the program.

 

In there you can create a counter for the tool and add to it. tnum = (tnum * 10 ) + 1. So you should probably set tnum = to t just after the toolchange (in ptlchg) to tnum = t.

 

Mike Mattera

Link to comment
Share on other sites

Troy,

 

To do you your special sequence numbering at each toolchange you need to know..

1> If the tool# has already been used.

2> If so, how many times has it been used.

 

For that part of the solution, take a look at the ToolTracking.DOC on the fourm ftp site in the '/Mastercam_forum/Text_&_post_files_&_misc/' folder.

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