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:

How to modify *progno$


Recommended Posts

Hi all

 

I have been modifying the "Generic Fanuc 4X post" that I received with X5 to suit a Mazak FH8800 with a Fusion Control

 

Things I have managed to do

 

Seperate the M6 and T number

Prestage tools

Remove "G43 H00" output ( as the tools have tool lengths stored on the machine Mazak Style )

Reformat the index axis to output for 0.001 Deg increments

Use X style coolants and rename to suit

 

Now here is where I need some help.

 

When I am prompted for a file name after pressing the post button in mastercam, I input a four digit number say 1000 and this saves the program as 1000.eia

 

The file save name can be 8 digits long

 

However inside the program the start or header of the program looks like this

 

O0000(1000)

( DATE=DD-MM-YY - 25-07-11 TIME=HH:MM - 18:35)

( MAZAK FH8800 )

( T51 | 54MM SANDVIK LONG EDGE ENDMILL | H51 )

 

I want my save file name to be the program name and also to have 4 leading zeros.

 

I understand how to make new fs statements

 

So the 1000 in brackets is sprogname$, how do I associate or relate this to the forced *progno$

 

I would also like to be able to input a desciptive name rather inside the bracket, so for the programe name to be Left Rotor Plate as this appears in the Mazak program file on the machine.

 

Example of the code above like I need it

 

O00001000 (Left Rotor Plate)

( DATE=DD-MM-YY - 25-07-11 TIME=HH:MM - 18:35)

( MAZAK FH8800 )

( T51 | 54MM SANDVIK LONG EDGE ENDMILL | H51 )

 

Look forward to hearing from someone

 

Thanks

Link to comment
Share on other sites

Hey NANO,

Welcome to the forum

Try this out...

 

 	pbld, "O", "0000", sprogname$, "(", *smcname$, ")", e$

 

Hey Keith

 

Yeah, thanks for you reply

I tried that and I understand what you suggested. Anything in "" gets output in the NC code, and that would have worked if all the program numbers where only 4 digits and not 8. If I save a program with the number 12345678 it will appear as O000012345678.

 

I need a way to find the variable or parameter from the NCI file which stores what I input at the save NC file prompt I tried something I found in the Post Parameter reference guide I got from my reseller but it does not seem to work.

 

Extracting a numeric variable using rpar function with a variable i defined as my_prog_num :0

 

This is the code

 

pparameter$ # Predefined parameter postblock

if prmcode$ = 10042, my_prog_num = rpar (sparameter$, 1)

 

I then tried to force that variable in the code with *my_prog_num .... no joy

 

Let me know if you have any other ways to skin a post

 

 

:) :)

Link to comment
Share on other sites

Nano,

To output a specific program # you will need to open the machine group properties in the operations manager. Go to the page for tool settings and you can enter a program # there. You would need to do this when you start a file before you start writing toolpaths. To change the program number in your toolpaths after you've already written them, select all toolpaths, with the cursor in the operations manager use the right mouse button to open "Edit Selected Operations" and select "change program #".

Link to comment
Share on other sites

Nano,

To output a specific program # you will need to open the machine group properties in the operations manager. Go to the page for tool settings and you can enter a program # there. You would need to do this when you start a file before you start writing toolpaths. To change the program number in your toolpaths after you've already written them, select all toolpaths, with the cursor in the operations manager use the right mouse button to open "Edit Selected Operations" and select "change program #".

 

 

Cheers CJep

 

Worked like a charm. I did try setting the program number in the machine group properties, files, tool settings tab but after I had already created toolpaths which was not working.... Now I know why....

 

No problem at all really only my lack of knowledge. Thanks again

 

I might need some more assistance as I havent finished all my post modifications... I'll be in touch.

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