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:

Macro Language


romer
 Share

Recommended Posts

Thanks for the replies.

 

quote:

All version of Fanuc contron (sic)

manual has this topic with detail

Ashan, this is true. However, the key words here are "Fanuc manual". Probably 'nuff said right there, but I don't have a Ph.D. in Language Origami or Illogical Layout, so that part of the manual just tends to be a bit more than my two brains cells can handle.

 

I found that thread and others in a previous search,(thanks, Jimmy) but am looking for something specific.

 

I would like to make tool offsetting easier in a 16i controller by being able to bring all tools down to a pre-determined point on the machine (say the table),touch them off, and have this value subtracted from a stored value held in a parameter and the result entered into the proper tool offset register.

 

This would allow a "standard" load of tools to be kept in the machine. Then regardless of change of workpiece or fixture height, a person would only need to touch off one tool at the proper height, enter that in your work offset Z register, and all tools would now be at the correct height to run. (Hopefully that made sense.)

 

I've been told that this is possible, but my macro skills are very basic at best.

 

Thanks,

romer

Link to comment
Share on other sites

Romer !

 

The easiest way will be to use presetter .

Now contact in your area a dealer ,that deals with presetters and he will guide you in the right direction and also the good chances are that he has a needed program too .

 

 

Presetter is a good thing to have especially when your personal is not so skilled !

Link to comment
Share on other sites

When I say presetter I mean that gadget that you mount in the far corner of the table ,put in the magasine all your tools and run macro program ,where machine automatically changes tools and takes offsets at least for height for every tool ,automatically putting them to the offset table .

I used one on the rather old Okuma and was very satisfied ,although an accuracy was a bit less than by hand ,it was good enough for most of things ,and very fast .

Considering that things had changed from that times for better ,I think that on the modern presetter the accuracy is even higher smile.gif

HTH

Link to comment
Share on other sites

What you seek to do is possible, but I agree with Iskander to use a touch probe to set tool length.

 

If you use one tool, a ball ended shaft works, as a standard of arbitrary length, you can then touch that standard off on any new part setup and have a macro set G54, G55... and leave the individual tool length offsets alone. This method works whether you have the probe that Iskander mentioned, or an off machine device.

 

Anything is better than touching off each tool on a new setup and redoing each offset for each job.

 

quote:

Language Origami

biggrin.gif

Link to comment
Share on other sites

Here is one i made that works really well for us.

 

177.28 is the top of the block or whatever your using to set the hiegths off of. Get that number by touching a tool off the table, then using that tool to set the height of the setter. This one is for a Fanuc clone so double check the variables but i think they are the same. And you might need to add in a G53Z0 for retracts if M6 doesnt take you home.

 

code:

  

%

O9111(TOOL SETTING ALL)

(STARTS WITH TOOL IN SPINDLE)

(TOUCHES TOOLS OFF IN ORDER)

(AUTOMATICALLY GETS NEXT TOOL)

(START IN AUTO, HIT CYCLE START)

(HIT RESET WHEN DONE)

 

G0G90G80G40G49G17

G56X0Y0(TOOL SETTING POS)

#1=#4120(TOOL COUNTER)

DO1

M6T#1(TOOL TO SET)

#3006=1(JOG TO BLOCK)

(BACK TO AUTO CYCLE START)

#[11000+#4120]=[#5023-177.728](SETZ Z)

#[12000+#4120]=0(SETS WEAR COMP TO 0)

 

M6T[#4120+1]

 

#1=[#1+1](TOOL STEP)

END1

M30

%

Link to comment
Share on other sites

Thanks for all the replies.

Sorry it takes so long sometimes to get back to you.

 

Iskander,

 

A tool pre-setter might be nice but it definitely is not in the budget. Besides, it defeats the purpose of learning macros through real live applications.

 

Try-on,

 

I played with your program some but the 16i does not like it. Some of the variables are not quite the same. The Fanuc book gives some insight and I was able to get some of what I want to work, but the details and examples are a bit less than in- depth. I would like to find a book, site, database, brain etc., that I can peruse for specific questions.

 

Mmetzinger,

 

Thanks for the site, I have been there before but had not run across that tip. The example given was a bit dated but very helpful just the same.

 

I think coming up with what I want is possible after seeing some of the other things people are doing with macros. It will most likely be similar to learning how to tweak a post, - ya just got to tweak n' try over and over.

 

If anyone knows of a particular book that might have more specifics that would be great, or better yet if someone wouldn't mind corresponding off-list, I have a few questions specific to the Fanuc manual that I would like to ask.

 

Thanks again all,

 

romer

Link to comment
Share on other sites

quote:

Iskander,

 

A tool pre-setter might be nice but it definitely is not in the budget. Besides, it defeats the purpose of learning macros through real live applications.


I don`t think touch probe is very expensive ,

at least not as honey smile.gif

Really !

Check how much does it costs and consider headscratch.gif

It will give you the boost in production .

Check it out !

Link to comment
Share on other sites

Romer, I don't think that you need a macro for this at all if I understand you correctly. If you have the same tools in the magazine and you just want to adjust the zero position I think that the easiest way to do it would be to touch off on the table or something else fixed in the machine and then just measure from the touch-off point to Z0 of your part and enter that number in the Z of your WOFS. This should work without any of the rigamarole

 

Am I all wet here?

 

C

Link to comment
Share on other sites

The book Andrew just mentioned is what made the macro programming thing make sense for me. It is a very good book. Also the white fanuc books that came with the machines will tell you about all the system variables. Almost anything is possible.

 

Learning on the fanuc controls i have noticed that when your running the program say in single block, that you will see what value the machine is useing for a cerain variable.

 

ex. say this is what you programmed

#1=2.54

G1Z-#1F432.

 

when you run this on a fanuc you will see in the program buffer this

#1=2.54

G1Z-2.54F432.

 

Mazaks and Yasnaks will look like this

#1=2.54

G1Z-#1F432.

 

If you know what value to expect it makes it easier to troubleshoot.

Link to comment
Share on other sites

Chris and Iskander,

 

This is exactly what I want to do. The part you are misunderstanding is what allows a person to do this simple one tool/one stroke procedure.

 

The value entered in the tool length offset registries must be the actual length of the tools as measured to the tip from the spindle (such as with a tool pre-setter).

 

By using a macro, I can have the machine do the math and enter the correct value for example,

 

for T1 #10001=[#5023-17.369]

 

this enters the aforementioned length so that no matter where I set the Z in the WCS register, it will compensate correctly.

 

Perhaps I'm wrong in assuming that most controllers do not automatically do this for you. This particular 16i does not. We have a new Mazak Nexus that does. (Hence the interest in standardizing the tool setting procedure for both machines without the use of a tool presetter).

 

I know sometimes trying to communicate an idea with the written word as opposed to verbally (along with all the obligatory hand getures), is difficult sometimes, but hopefully that helps make it a bit clearer.

 

Andrew and Try-on,

 

Thanks for the book recommendation, I will order one today.

 

Thanks again for the help,

romer

Link to comment
Share on other sites

quote:

The value entered in the tool length offset registries must be the actual length of the tools as measured to the tip from the spindle

If all you are trying to do is use a standard tool load and not have to touch off different parts I disagree with this statement.

 

1) Touch your tools of the table

2) Put a part in the machine

3) Zero an indicator on the table and set Z0 in your Relative Position register

4) Move the indicator up and zero on the part

5) Enter the relative distance from the table to the part in the 'Z' coord of your work offset

 

The machine should then 'know' where the part is in relationship to the zero from which you established your TLO and you should be rockin'

 

C

Link to comment
Share on other sites

Chris,

 

I agree that your procedure will work just fine. As long as the RELATIVE distance is entered (a positive value).

 

I believe you took my quote out of context. If you go to my original description of what I am trying to accomplish I think you will agree.

 

I'll try one more time.

 

If I take a standard load of tools (ones we wish to keep in the machine at all times) and touch them off on the table (qualify them), on this 16i the value will be a -Z number measured from the spindle home down to the table. In this example, let's say they are all -20.0 inches.

 

I would like to have that number added to the RELATIVE distance measured from the spindle home position down to the table with no tool installed. Let's say it's 25.0 inches.

 

The macro can accomplish this and enter a value of +5.0 inches in this example in the tool register automatically.

 

Now without using any other tools (dial indicator, etc.) The operator can take any one of the pre-qualified tools, touch off on the part just once enter that height in the WCS (it will be -Z something)and all tools are now ready to run at this height.

 

The reason for all this is,

 

1) to try and establish tool setting uniformity (as much as possible)in set-up between the different machines in the shop.

 

2) to try and make it easier on the operators by automating a particular task - it also takes away one more thing for them to whine about.

 

3) hopefully learn something new for myself in the process!

 

Anyway, thank you for all the helpful responses.

 

romer

 

quote:

Distance-To-Go is your friend


Unless your waist-deep in poop and know you're not even halfway to the bottom biggrin.gif

Link to comment
Share on other sites

I see what you're saying, just trying to make sure that you knew there was another way to skin that cat. If that's what you want it to be like for your particular application then I'm sure it can be done. In an Okuma it is very simple but I don't know Fanuc macros very well at all.

 

Sorry

 

C

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