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:

Recommended Posts

Hi All,

 

I have create a chook (VC++2003) for create milling-tools. (MasterCam X MR2)

The chook for ToolInterface works fine but only the coolant property NOT.

I can set what I want (1,2,3), always is it "off=(0)" .

I use follow struct :

 

tp_tool McTool;

McTool.op.coolant = 1; //0=off 1=Flood,2=Mist,3=spindle

 

 

Nothing happens,, all other properties there is no problem, please advise me for the correct coolant-datafield.

 

Thanks

 

Andy

Link to comment
Share on other sites

Hi, andy

In v9 chook, coolant is (1,2,3)..

but in X it is not like before.

 

 

I've not checked code below.

it would be like this..

 

 

McTool.op.coolant=CFLAG_COOL_MIST|CFLAG_COOL_TOOL;

 

McTool.op.coolant |= CFLAG_COOL_FLOOD;

 

to check if coolant is on/off

code:

operation op;

////blah

if(op.tl.coolant&CFLAG_COOL_OFF){;}

if(op.tl.coolant&CFLAG_COOL_FLOOD){;}

if(op.tl.coolant&CFLAG_COOL_MIST){;}

if(op.tl.coolant&CFLAG_COOL_TOOL){;}

 

 

tl_list *tl;

//list_manager (TL_ID, ToolLibrary().GetBuffer(0), LSTMGR_GET, (void **)&tl);

list_manager (TL_ID, "", LSTMGR_GET, (void **)&tl);//current tool library

while (tl != NULL)

{

//op.tl.ltool

if(tl->tl.op.tlno==op.tl.tlno)

{

 

//tl->tl.op.coolant;

if(tl->tl.op.coolant&CFLAG_COOL_OFF){;}

if(tl->tl.op.coolant&CFLAG_COOL_FLOOD){;}

if(tl->tl.op.coolant&CFLAG_COOL_MIST){;}

if(tl->tl.op.coolant&CFLAG_COOL_TOOL){;}

 

break;

}

 

tl=tl->next_ptr;

}

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

 

 

 

 

 


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