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:

Reading 20601 prmcode


Recommended Posts

Hello,

 

I have a question about reading parameters in Mastercam posts.

 

I have a problem getting the axis combination name from a 20601 prmcode:

 

 

test.jpg

The method I am using is this:

 

pparameter$ #Information from parameters

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

if prmcode$ = 20601,

[

axis_combo = rparsngl(sparameter$, 4)

]

 

 

saxis_combo : ""

 

This method gives no results and I don't get the correct axis combination.

I guess the problem is the combination of strings and numbers in a 20601 line (rpar probably can only read numbers), but the fourth parameter (name) is a string.

 

Is there any other known method to read the current axis combination name?

 

 

Best regards.

 

Gorazd

Link to comment
Share on other sites

rparsngl is a function used to convert string data to numerical values. It cannot be used to parse a string and return only a portion of a string as you are attempting to do here. What exactly do you need the axis combination name for? If you are looking for the name of the current axis combination used in an operation you will need to read the machine definition parameters rather than reading the 20601 lines (if the MD contains multiple axis combos you will have multiple 20601's). If you can give me an idea of what it is you are trying to achieve I should be able to give you the code you need.

Link to comment
Share on other sites

My machine definiton has two separate axis combinations. I would like to know which of those is currently used in the operation.

The problem is that both of these axis combinations use exactly the same machine components .

 

axis.jpg

 

The reason for this is that the machine has TWO upper left turrets which can achieve totally the same movements but are programed with two separate NC programs.

 

By selecting appropriate axis combination by the user the postprocessor will then output the toolpath code to the approprite NC program using the subout$.

 

Regards.

Link to comment
Share on other sites

Goraz,

 

This is the closest I could get for ya...


N100 G00 G91 G28 Z0.
N110 G0 G17 G20 G40 G49 G80 G90 G94 G98 H00
( .501 SPOT DRILL   )
( POINT )
1125 66EC8697-FBBA-11DA-991B-001111AFFC59 0 keiths axis   <<<<<<<<<<<<<
N120 M21 (UNLOCK C)
N130 M11 (UNLOCK 

 

"keiths axis" is the name that I gave the axis combo.

Maybe there is something you can do with formatting to get rid of the beginning of the string.... (the other 3 params that are on the 20601 line)

 

here is what I put in the post to get it...

saxis 	: ""

  	pbld, *saxis, e$

 	if prmcode$ = 20601, saxis = sparameter$

 

Let me know how it works out.

Link to comment
Share on other sites

The 20601 lines will not tell you which axis combination is currently used. I would suggest using the syncaxis$ variable for this purpose. Each axis combination has a unique ID which is placed in the 950 line in the NCI file. This line is read by MP while processing and the value is automagically placed in syncaxis$. You should be able to look at the NCI file, determine the two unique values and base your output logic on them.

Link to comment
Share on other sites

Thanks Paul, no big surprise, your right.

I posted a few ops which had different axis combos selected and the all posted as the same...

but without formatting anything or pulling any param, just outputting the syncaxis$ variable, I can see the different axis combos.

 

I have been running into these pre-defined variables a lot lately, is there anywhere I can get a list of them?

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