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:

cHook - pre-setting a tool as default


Recommended Posts

Hi,

 

I am interested in pre-setting a specific tool in chook. I want to have a tool always show up when a countouring operation is chained so I dont have to select the same tool every time. How do I do that with chooks.

 

TIA.

Girus.

Link to comment
Share on other sites

I don't understand what you mean about the operation library since I only need the tool the path will be different every time, but the tool is always the same. I am doing the geometry in chooks and would like to do the tool as well. The path as of now needs to be done manually, but eventually I will know enough chook stuff to be able to do the whole thing. For now I just need to know if anyone knows how to pre-select a tool as a default so that when a chain is created it will atomatically have a tool pre selected. Similar to how it comes up for the second chain (where the tool is there from the previous operation).

 

Girus

Link to comment
Share on other sites

Well I am no chook guy but let me take a stab at this. You need to create yourself a template that is your self loading command for the tool. If you were doing this the traditional way in Mastercam then you would have what some of us call a dummy file. This would be the MCAM file that has some dummy operations in it so you have your tools set-up to look to as you say for the next operation. What Robk is refering to is a method of time savings where for sake of your arguement would like T1 to be a 1/2 endmill doing a Contout, T2 to be a 1/4 Endmill doing a countor, T3 o be a center Drill and T4 to be a #7 Drill and T5 to be a 1/4-20 tap. If this ia a common thing you do on Families of Parts then the first tiem you do it you right click in your operation group and save those tools or operation without the geomenty as C-1/4-20TAP then for the next 20 parts you do in that family that you do as either new group operations or as new Mcam program you just import that operation group and then select the geomentry for those need operation all of the tools are there with the corect tool numbers and all the speeds and feeds and there Cleareance planes and everything just a matter of selecting the drive stuff and done hit regen and problay saved yourself about 5-10 clicks peroperation and maybe 5-20 minutes depending on the parts for common or routine operation that you do and really no need for the Chook that you are talking aboit if you were not so driven by the chook for the selection of entities. I would think that you would want ot select your entites and not have something take that control away from you but that is just my humble opinion.

 

HTH and was a clear and correct enough explaintion.

Link to comment
Share on other sites

Ronald,

 

Thanks for your suggestions, but I tried that and since I am only using one tool it becomes more work to load the library then select the tools.

 

What I am really looking for is a method of setting a tool as default so that when I do a contour and click done it automatically has that tool already there. I am trying to avoid manually filtering the tool. Also since all of the geometry is being drawn by chooks it sometimes needs different sizes of tools and at that time is when I want to tool to be set as default. Therefore it will sometimes be a 3" tool but sometimes a 4" etc.

 

This whole thing is part of a project I am working on to automate as much of the grunt work as possible so that all that is left is maybe a few chaining operations that are done manually.

 

I want to do this programatically. I dont care how I do it but it needs to be done in chooks.

 

I am guessing that since there is no way to do it manually then it goes to follow that there is no way to do it programatically but just in case it could be done I am asking for help here.

 

Girus.

Link to comment
Share on other sites

Glenn,

 

quote:

Can you create a toolpath without defining a tool? If not, Nevermind. If so, what does the operation look like once it's done?


I don't think you can do it. But I think the opposite is true that you can have a tool and operation without the chains?

 

But I am still looking for a solution to setting a tool so that when a contour path is created the default tool comes up.

 

This may be a lost cause and there is no solution out there and it may mean that I will need to add a dummy (tool path)/operation so that the tool shows up the next time, because it looks like once you have one operation the next one defaults to what the first one had.

 

Then I will need to delete the dummy operation.

 

???? Any thoughts.

 

Girus

Link to comment
Share on other sites

Girus,

 

I don't have a full answer but...

 

I'm assuming the operation already exist in the operation manager or you are creating the operation through a chook.

 

Use the list manager function list_manager with TL_ID to search for an existing tool. list_manager(TL_ID, "",...) to search the current file. list_manager(TL_ID, somefile,...) to search a mc9/op9/tl9 file. If you found the tool in a seperate file or want to create one from scratch use tool_manager function to create it.

 

I think op.tl.slot for the operation has to equal tl.op.slot for tp_tool. Actually I think the whole op.tl (op_tool_info) structure may need to match the tool.

 

look at testassc.c file for examples of tool_manager and a lot of that stuff is defined in M_ASSOC.H

 

Hope that helps point you in the right direction.

 

Bryan smile.gif

Link to comment
Share on other sites

Another solution, although not a Chook one:

 

Take a file that has a toolpath with the tool that you want to show up in your automated session and delete the toolpath operations and then delete the geomtry.

 

Save the file with some name eg T.MC9

 

Change the target line in the Mastercam shortcut properties to: C:Mcam91mill9.exe t.mc9

 

Mastercam will load normally with no geometry or toolpaths, but when you create geometry, and toolpaths, the tool will be there.

 

Not quite what you were aksing for, but it will work with no extra mouse clicks.

Link to comment
Share on other sites

Have you tried to fix the problem using default operations.

 

If yo do a contour toolpath, you choose contour parameters and import your tool (the same as you would program the toolpath). You must also be sure that preferable tool is selected. After this just save the changes.

 

When you program new operation, you show the chain, afer that the tool parameter tab is opened. You will notice that there is no tool, but the tool parameters are the same as the ones of your preferable tool. Hit OK and toolpath is being calculated with your tool's parmeters being used - no need for tool selection.

Link to comment
Share on other sites

Bryan,

 

Thanks for pointing me in the right direction.

 

code:

	tl_list *tl_head, *tl_move;

db_ptr_type e_ptr;

 

 

list_manager (TL_ID, tool_library, LSTMGR_GET, (void**)&tl_head);

 

tl_move = tl_head;

 

while (tl_move != NULL){

if (tl_move->tl.op.type == FACE_MILL && tl_move->tl.op.dia == 3.0 && !tl_move->tl.op.mm){

tool_manager (&tl_move->tl, TLMGR_ADD, &e_ptr, &succf);

if (succf) break;

}

tl_move = tl_move->next_ptr;

}

/* free up memeory from tool library list */

list_manager (TL_ID, "", LSTMGR_FREE, (void**)&tl_head);

This did the trick, and it all came from the "Testassc.c" example.

 

Thanks to all for your help, lots of good ideas, and I learned several ways to accomplish the same thing.

 

Girus.

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