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:

Operation numbers


mtnflyr
 Share

Recommended Posts

Good morning all.

 

Is it possible to have the operation number from the Toolpath Group in the Operations Manager to post as a parenthetical note in the NC file?

 

I have a large program that I would like to insert the operation number into as reference points to help with any needed edits.

 

Thanks

cheers.gif

Link to comment
Share on other sites

That is available as parameter #15240

 

format the variable

 

tpmgr_num : 0

 

code:

pparameter$ # Go get the value

if prmcode$ = 15240, tpmgr_num = rpar(sparameter$, 1)

Thanks to CNC for the info

Link to comment
Share on other sites

Thanks for the suggestions everyone.

 

John, I put in the code you suggested. It is outputting the CS#s and the rotation for the associated cut. (This is a horizontal program.)

That's better than what I had but it doesn't give the number it's related to in the operation manager. Is this correct, or I have not entered the parameter line into the post incorrectly?

  • Like 1
Link to comment
Share on other sites

mtnflyer, the problem with posting out the operation number, is that when you inevitably have to go back and add in an operation somewhere, all of the operation numbers after that are now different! I just make it a habit to label every single operation, and have at least one toolpath group for every tool. If I've got a single tool that has 20 or 30 operations, I'll separate those into smaller toolpath groups too.

Link to comment
Share on other sites

Like this Chris??

 

code:

 O0000(T)

(DATE=DD-MM-YY - 26-04-10 TIME=HH:MM - 13:22)

(MATERIAL - ALUMINUM INCH - 2024)

( T1 | 2" FACE MILL | H1 )

( T2 | 1/2 BALL ENDMILL | H2 )

( T3 | 1/4 SPOTDRILL | H3 )

( T4 | NO. 22 DRILL | H4 )

N100 G20

N102 G0 G17 G40 G49 G80 G90

N104 T1 M6

(OP NUMBER 1)

N106 G0 G90 G54 X-2.2 Y-.5001 S1069 M3

N108 G43 H1 Z.25

N110 G1 Z0. F1.07

N112 X5.1136

N114 Y-1.3062

N116 X-1.2

N118 Y-2.1123

N120 X5.1136

N122 Y-2.9183

N124 X-2.2

N126 G0 Z.25

N128 M5

N130 G91 G28 Z0.

N132 M01

N134 T2 M6

(OP NUMBER 2)

N136 G0 G90 G54 X1.4568 Y1.25 S1069 M3

N138 G43 H2 Z2.

N140 Z.1

N142 G1 Z-.5 F6.42

N144 Y.75

N146 G3 X1.9568 Y.25 R.5

N148 G1 X3.9136

N150 G2 X4.1636 Y0. R.25

N152 G1 Y-3.4184

N154 G2 X3.9136 Y-3.6684 R.25

N156 G1 X0.

N158 G2 X-.25 Y-3.4184 R.25

N160 G1 Y0.

N162 G2 X0. Y.25 R.25

N164 G1 X1.9568

N166 G3 X2.4568 Y.75 R.5

N168 G1 Y1.25

N170 Z-.4

N172 G0 Z2.

N174 M5

N176 G91 G28 Z0.

N178 M01

N180 T3 M6

(OP NUMBER 3)

N182 G0 G90 G54 X.9282 Y-.8292 S1069 M3

N184 G43 H3 Z.1

N186 G99 G81 Z-.08 R.1 F1.07

N188 X3.0255 Y-.8623

N190 X3.0807 Y-2.6285

N192 X1.0496 Y-2.6506

N194 G80

N196 M5

N198 G91 G28 Z0.

N200 M01

N202 T4 M6

(OP NUMBER 4)

N204 G0 G90 G54 X.9282 Y-.8292 S1703 M3

N206 G43 H4 Z.1

N208 G99 G81 Z-.5 R.1 F4.09

N210 X3.0255 Y-.8623

N212 X3.0807 Y-2.6285

N214 X1.0496 Y-2.6506

N216 G80

N218 M5

N220 G91 G28 Z0.

N222 G28 X0. Y0.

N224 M30

%

I formatted another variable

 

code:

 fmt     21  op_num      # Operation Number 

Then added this

 

code:

op_num = tpmgr_num

"(", no_spc$, "OP NUMBER", " ", op_num, no_spc$, ")", e$

Link to comment
Share on other sites

John,

Your example is spot on what I'm trying to achieve. My ability to manage the post editing however is sorely lacking.

I've tried plugging in the code you've suggested with no results.

My post does not have the parameter 15240, so I added it to:

# Parameter read postblocks:

pparameter$ # Run parameter table

 

I tried tpmgr_num : 0 in a few different variable tables.

Lastly I tried the fmt comment in a few different Variable Format tables again with no luck.

 

Is there a specific place in the post these settings need to be or is there possibly some conflicting code that would affect these settings?

 

Feeling mighty humbled...

Link to comment
Share on other sites

Chris,

 

Look for the pparameter$ section of the post

 

code:

pparameter$     #Read operation parameters

#rd_params is used to call pparameter postblock and read the parameters of the operation specified in rd_param_op_no

#"pparameter", ~prmcode$, ~sparameter$, e$

if prmcode$ = 15240, tpmgr_num = rpar(sparameter$, 1)<<<<<<<<<<<

I formatted the variable in the section of the post near the top

 

code:

use_gear     : 0     #Output gear selection code, 0=no, 1=yes  

min_speed : 50 #SET_BY_MD Minimum spindle speed

nobrk$ : no$ #CD_VAR Omit breakup of x, y & z rapid moves

progname$ : 1 #Use uppercase for program name (sprogname)

prog_stop : 1 #Program stop at toolchange: 0=None, 1=M01, 2 = M00

tool_info : 2 #Output tooltable information?

#0 = Off - Do not output any tool comments or toolpable

#1 = Tool comments only

#2 = Tooltable in header - no tool comments at T/C

#3 = Tooltable in header - with tool comments at T/C

tlchg_home : no$ #Zero return X and Y axis prior to tool change?

tpmgr_num : 0 #Operation number <<<<<<<<<<<<<

I formatted this variable here

 

code:

fmt  G  4   g_wcs       #WCS G address

fmt P 4 p_wcs #WCS P address

fmt S 4 speed #Spindle Speed

fmt M 4 gear #Gear range

fmt 21 op_num # Operation Number <<<<<<<<<<

Then in the toolchange sections of the post added this

 

code:

op_num = tpmgr_num

"(", no_spc$, "OP NUMBER", " ", op_num, no_spc$, ")", e$

Link to comment
Share on other sites

Well, I'm closer than I was. smile.gif

The post outputs up to (OP NUMBER 14.) then blank (OP NUMBER) on every op after that.

 

Spade, I'm using MPMASTER post modified for a Makino A88 4axis.

 

Joe, I have 438 operations and 45 tools.

 

Thanks for the help. I'll keep working at it.

 

cheers.gif

Link to comment
Share on other sites

John,

 

Is OP number the same as OPID?

 

I ask because X+ uses OPID and we wanted to match our "N" numbers with OPID even if they are not in order so we can restart based on the OPID and it would match X+.

 

Our reseller had a problem with manual entry OPID's

Link to comment
Share on other sites

Dave,

 

No, the op_id is different, this helps determine what "kind" of operation

 

also, it would help if I coded it correct.

 

It DOES pull multiple ops with the same tool

Link to comment
Share on other sites

John,

I had one at ptlchg0$ if that's the one your referring to. I looked for other null commands and added the command to ptlchg1002$ also. It is outputting all the operations now but it is also outputting

(OP NUMBER )

(OP NUMBER )

(OP NUMBER )

in numerous places. The quantity and location of the note seems to change according to the sequence the command is read in. I'll keep tweeking it until I get it.

 

Thanks John.

Link to comment
Share on other sites

Chris,

 

The only 2 places you should need in the MPMaster is in the ptlchg_com & ptlchg0$

 

 

That should do it

 

You might try adding this to the ptlchg0$ section as the first thing

 

rd_params$

Link to comment
Share on other sites

That helped greatly John. It looks like what is going on is a (OP NUMBER ) note posts for each pass on the cut definition.

For example I have three chains on one contour cut. Each chain has multiple passes including a cleanup pass. It is posting (OP NUMBER ) for each of those passes. I can live with that but if you can minimize the notes to the first pass that would be preferred.

 

Thanks again John. You da man!

cheers.gif

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