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:

prmcode


K2csq7
 Share

Recommended Posts

Hi All,

I have some 5ax multisurf parallel cut ops and I wanted to use the parameter for the "limits" that I set inside the tool axis control branch for some post work (see pic attached).

I tried prmcodes 12324 - 12333, all gave me an output of zero.

 

I added the cminangle variable

# --------------------------------------------------------------------------
fmt  A  20  p_out   	#Primary output axis position
fmt  B  20  s_out   	#Secondary output axis position
fmt  C  20  cminangle   #angular limit defined in operation parameters

and this to the pparameter$ postblock

if prmcode$ = 12331, cminangle = rpar(sparameter$, 1)

 

Not sure what is wrong, any help is appreciated.

Link to comment
Share on other sites

Edit my last post, I thought I had found them, but just reposted & tried to find them... I can't, even tried looking for that # in radians (65.425003 degrees = 1.14188 radians), can't find either # in the NCI.... I can post as much of the NCI as you would like but it's huge. here is the beginning

 

1050

14 42 11 2 2011 9 54 6 \\A1SBS\COMPANY\ENGINEERING\MCAMX\EXOTIC METALS FORMING COMPANY\12584 REV D\MILLING LESS TOOLS.MCX-5

999

440 0 82

1051

MH

1053

Machine Group-1

1008

FINISH K-K

1011

2. 0. 0. 0. 0. 0. 0. 0. 0. 0.

1012

0 0 0 0 0 1 1 1 2 0

1013

0 0.375 0.1875 1 1 0. 0. 0. 0 C:\DOCUMENTS AND SETTINGS\ALL USERS\DOCUMENTS\SHARED MCAMX5\MILL\TOOLS\SPHERMIL.MCX-5

1014

1. 0. 0. 0. 1. 0. 0. 0. 1.

1016

82 11 440 1 0. 0. 0. 41 0 0 4 0 0. 0 1 4 82 1

1017

1. 0. 0. 0. 1. 0. 0. 0. 1.

950

0 0 0 352200 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

1025

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

1027

1. 0. 0. 0. 1. 0. 0. 0. 1. 0. 0. 0.

1028

0 0 0. 0. 1. 0. 0. 1. 0 0 0 0

1029

0. 0. 0. 0. 0. 0. 0. 0. 0. 0 0

1020

0. 0. 0. 0. 0. 0. 0 1. 0. 0. 0. 0 50000 ALUMINUM inch - 2024

20010

TOP

20011

 

20012

TOP

20013

 

20014

TOP

20015

 

20016

ALUMINUM inch - 2024

20017

 

20018

part

20019

 

20001

3/8 BALL ENDMILL

20002

 

20003

 

20004

4 11 1 2 0.375 0.1875 0. 180. 0 0 6.332032 36.6 6.332032 1426 16 4

20006

0 50. 50. 25. 25. 0. 0. 0.

20007

0. 0.75 2.5 0.8 0.375 2. 1. 0 100. 37. 0

20008

0. 0. 1. 0 0. 0. 0 0. 0.

20009

0 0

20800

0.

20600

352181 66EC8677-FBBA-11DA-991B-001111AFFC59 "" "" Machine Base

20600

352182 66EC8679-FBBA-11DA-991B-001111AFFC59 "X" "X" HMC X Axis

20600

352183 66EC867B-FBBA-11DA-991B-001111AFFC59 "" "" Mill Machine Table

20600

352184 66EC867D-FBBA-11DA-991B-001111AFFC59 "B" "B" HMC B Axis

20600

352185 66EC867F-FBBA-11DA-991B-001111AFFC59 "C" "C" HMC C Axis

20600

352186 66EC8681-FBBA-11DA-991B-001111AFFC59 "" "" Fixture/Holder

20600

352216 26527C57-35EC-11E0-B76D-0026B98C7C03 "" "" Stock

20600

352187 66EC8683-FBBA-11DA-991B-001111AFFC59 "Z" "Z" HMC Z Axis

20600

352188 66EC8685-FBBA-11DA-991B-001111AFFC59 "Y" "Y" HMC Y Axis

20600

352189 66EC8687-FBBA-11DA-991B-001111AFFC59 "" "" HMC Tool Spindle

20600

352190 A1DF5B0B-1DB1-11E0-84D0-0026B98C7C03 "" "" Aggregate

20600

352191 66EC8689-FBBA-11DA-991B-001111AFFC59 "" "" Automatic Tool Changer

20601

352200 66EC8697-FBBA-11DA-991B-001111AFFC59 0 Default

20700

0 0 0 0 0 0 0 0 0 0

1001

0 100 10 4 4 4 0 921 98.1 0 -8.00439098 15.33112489 -0.72718845 10. 10. 10. 0 0.

11

-7.92898068 15.16620161 -0.77483137 -8.00439098 15.33112489 -0.72718845 10. 40 0 0. 0. 0.

11

-7.92093692 15.1486098 -0.77991328 -7.99634722 15.31353308 -0.73227036 -1. 40 0 -0.44767439 0.85732602 0.25412543

11

-7.71412815 15.25536963 -0.77991328 -7.78953845 15.42029291 -0.73227036 98.1 10 1000 -0.43608497 0.86328066 0.25411887

Link to comment
Share on other sites

You need to look at the NCI documentation they should be listed in there. You are going to need to pull differently than what you are currently thinking IMHO. This might need to be a assigned to a buffer to then pull out the limits like zmin and zmax. I would shoot off an email to [email protected] and see what they recommend.

 

HTH

 

I heard some rumors about a new post section on the forum so mabye if that happens othefs might chime in.

Link to comment
Share on other sites

In playing a little with this type of toolpath, it appears that this particular data is not passed to the NCI file. If that is indeed the case, there is no way for the post to access the data directly.

 

That being said, however, it is possible to pass the data to the NCI by placing the values in an area that is accessible, mr1 & mr2 (Miscellaneous Real 1 & 2) for example. That means a little more work on your part, but is an easy fix for transferring data to the post.

 

Hope this helps a little.

Link to comment
Share on other sites

If you want to see all the prmcodes put this in your pparameter$ post block

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

It may already be there, if so then just unblock it.

It will show you everything the post sees. Alot more than whats shown in the nci file.

Make your angles something unique like "22.2222" and "33.3333" so you can search for them.

Post out the nc code and see what prmcodes they are.

 

Also some prmcodes are accessed the fprmtbl function. Search for fprmtbl in the documentation to see how that works.

Link to comment
Share on other sites

Some general notes on parameters for everyone with regards to MP posts:

 

- There are several ways parameters must be obtained.

 

* some parameters are available in the NCI file and can sometimes be read using sparameter$ or via existing variables.

* Some values with existing variables do not need a parameter read, but a parameter read could be used to fill a new variable with the same information. * There is a long list of existing variables in the V9 documentation and you can also find several in some of the newer documentation

 

- Contrary to popular belief there are many parameters that do not appear in the NCI file in any form, but they still exist. They are passed by some method directly from mastercam to MP and then to the post when called for.

 

* in order to call for parameters not available via the NCI file some commands like rd_params$, rd_cd$, rd_md$, rd_tlpathgrp$, etc must be present in the correct location in the post. This can be difficult to troubleshoot. Some of this information is in mpmaster already but there are no guarantees it is all there, especially for newer parameters that are not used in any of the mpmaster output currently.

* some parameters are only accessible via parameter tables.

 

parameter table calls:

 

#Read parameter lookup tables -

if prmcode$ >= 17000 & prmcode$ < 18000, result = fprm(1) #Run the parameter table for Machine Definition Parameters

#Leave lines below commented until you enter values in related lookup tables

if prmcode$ >= 18000 & prmcode$ < 19000, result = fprm(2) #Run the parameter table for Control Definition Parameters

#if prmcode$ >= 19000 & prmcode$ < 19900, result = fprm(3) #Run the parameter table for Toolpath Group Parameters

 

 

parameter table contents:

 

fprmtbl 1 42 #Table Number, Size

# Param Variable to load value into

17008 spostname #Post Processor Filename

17060 minfrdeg_old #this parameter no longer functions MU00008b

17054 minfeedpm #Limit for feed in inch/min

17055 maxfeedpm #Limit for feed in inch/min

17058 maxfrinv #Maximum feedrate - inverse time - inch - Minimum value from MD as this is inverse time

17059 minfrinv #Minimum feedrate - inverse time - inch - Minimum value from MD as this is inverse time

17922 maxfrdeg #Maximum feedrate deg/min

....

....

 

* there are other parameters still that are only available as a filled group of variables. essentially the parameter number is called and a bunch of variables are filled at once in sequence all from the main call parameter, like so:

 

declaration of all variables associated with the parameter:

 

fmt 2 slot # 20004 Parameter line

fmt 2 tool_type

fmt 2 matl_type

fmt 2 corner_rad_type

fmt 2 diameter

fmt 2 corner_rad

fmt 2 threads

fmt A 2 tip_angle

fmt 2 dia_off

fmt 2 len_off

fmt 2 tool_feed

fmt 2 plunge

fmt 2 retract

fmt 2 rpm

fmt 2 coolant1

fmt 2 n_flutes1

fmt A 2 tip_angle_ch

 

call of the parameter group to fill the variables in pwrttparam or pparameter:

 

if prmcode$ = 20004, slot = rpar(sparameter$,16) - note the total number of variables is the 2nd argument in the function.

 

- i have probably forgotten a thing or two but that's most of the critical stuff. In summary obtaining information from parameters in MP can vary in complexity depending on how they must be obtained. Also the system of information itself is somewhat more complex than it needs to be, which is mainly due to the MP language being built upon over a number of years and the needs for information expanding beyond the original scope of older MP post processors.

 

Regards,

 

Your local post processor Guru

Link to comment
Share on other sites

Thanks M30..............(I guess)......you know anything about the parameters for the limits shown in the pic attached to the first post in this topic?

 

haha. Sorry i would have commented if i had tried pulling those before. I haven't run into a situation where i've had to pull those variables, and currently don't have mastercam to test.

 

I wish I could help further.

 

Regards,

 

Your local post processor Guru

Link to comment
Share on other sites

M30,

 

I'm glad you've taken an interest in editing Post Processors, but some of the information you posted is incorrect, so I'm going to take a minute and clear some of that up.

 

Mastercam passes information to the post processor in two general ways: as information in the NCI file (this infomation populates Pre-Defined variables automatically), and as Parameters that are written to a Temporary file called the .OPS file. This .ops file is then read by the Parameter Read functions, and certain values are extracted. These values are then put into user defined variables as either a String, or a Numeric variable.

 

Some of the information is available Multiple times. For example, Tool Information is available for every Operation directly in the NCI file. But Parameters from your individual toolpaths (like Depth Cuts, or # of Multi-passes) are also written to the .ops file, for every Operation. This is infomation that is available in the .ops, but you have to write custom logic in your Post in order to extract these values and do something useful with it. So if you had 5 Contour Operations that used Depth Cuts, and you had a Parameter Read/Write setup to capture that, you'd have to make sure you were using a Buffer, because the Depth Cut parameter would change for each toolpath.

 

You mentioned that some Parameters are in a group of Variables. The reason we do this is to create an Implied Array. This Array is used in combination with a Buffer. A Buffer is used to read, sort, and output information.

 

So just creating an ordered list of variables and then using a Parameter read/write routine does you no good, unless you use it in combination with a Buffer read/write routine. Why? because that ordered list of variables will only contain the information for the last Operation, without using a Buffer.

 

By the way, you can all thank Paul Decelles for coming up with the Parameter Read functionality.

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