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:

Marco helps Please


Tinhman
 Share

Recommended Posts

Good morning all

Control Fusion 640M

We just want to make sure that we dont have any tool in side the magazine(120 tools) is shorter 3" or longer 25".

 

Code

---------------------------------

O9996

(CHECK TOOL LENGHT LIMIT MARCO)

#1=1

WHILE[#1LT120]DO1

IF[#[60000+#1]LT3.]GOTO1

IF[#[60000+#1]GT25.]GOTO1

#1=#1+1

END1

GOTO2

N1#3000=1(CHECK-TOOL-LENGHT)

N2M30

---------------------------------

But this marco did not work and i dont know why.

Please help.

Thanks and have a good day

Link to comment
Share on other sites

O9996

(CHECK TOOL LENGTH LIMIT MARCO)

#1=1 (TOOL NUMBER)

WHILE[#1LE120]DO1

IF[[#60000+#1]LT3.]GOTO1

IF[[#60000+#1]GT25.]GOTO1

#1=#1+1 (TOOL NUMBER COUNTER)

END1

#1=#0 (CLEAR VARIABLE 1)

GOTO2

N1#3000=1(CHECK-TOOL-LENGTH)

N2M30

 

this is what i would start with

 

HTH

Link to comment
Share on other sites

Thanks for the input. I am going to try it after lunch.

By the way, i use this macro to check my tool on the spindle and it work very well.

Code

------------------------------

O00009997(MACRO TOOL LENGHT CHECK)

N1 IF[#[60000+#51999]GT3.]GOTO99

N10 #3000=21(CHECK TOOL LENGHT)

N99M99

-------------------------------

Link to comment
Share on other sites

O9996

(CHECK TOOL LENGTH LIMIT MARCO)

#1=1 (TOOL NUMBER)

#2=60000 (SET TOOL OFFSET)

WHILE[#1LE120]DO1

#3=#2+#1 (TOOL OFFSET ADD)

IF[#3 LT3.]GOTO1

IF[#3 GT25.]GOTO1

#1=#1+1 (TOOL NUMBER COUNTER)

END1

#1=#0 (CLEAR VARIABLE 1)

GOTO2

N1#3000=1(CHECK-TOOL-LENGTH)

N2M30

 

try that

Link to comment
Share on other sites

Thanks Tony35

well, i need to modified it a little bit to make it work.

Here is the two macro that work for me

Macro 1

------------------------------------

O00001235

(CHECK TOOL LENGHT LIMIT MARCO)

#1=1

WHILE[#1LE120]DO1

IF[#[60000+#1]LT3.]GOTO100

IF[#[60000+#1]GT25.]GOTO100

#1=#1+1

END1

#1=#0

GOTO2

N100#3000=21(CHECK*TOOL*LENGHT)

N2M30

---------------------------------

 

Macro 2

---------------------------------

O00001236

(CHECK TOOL LENGTH LIMIT MARCO)

#1=1 (TOOL NUMBER)

#2=60000 (SET TOOL NUMBER)

WHILE[#1LE120]DO1

#3=#2+#1 (TOOL OFFSET ADD)

#4=#[#3]

IF[#4 LT3.]GOTO1

IF[#4 GT25.]GOTO1

#1=#1+1 (TOOL NUMBER COUNTER)

END1

#1=#0 (CLEAR VARIABLE 1)

GOTO2

N1#3000=21(CHECK*TOOL*LENGTH)

N2M30

-----------------------------------

 

But, i do need alittle more out of it. Is there any way i can point it out the pocket number of the tool?(tools that have the lenght shorter 3" or longer 25")

Link to comment
Share on other sites

glad you got it to work,with macros whatever it takes to make them work wink.gif

 

not 100% sure where you are going with this?

but i will take a stab at it

 

is the machine tool magazine random or fixed pot?

 

well you would have to be able to check the pot number if random TC magazine, not sure if there is a variable for that off the top of my head

 

if its fixed, the pot number will be the tool number so you could check it against that

 

plus i would clear all the variables in your macro above (if i have a lot of them to clear i will make a while statement) but you only have 4 so no big deal

 

O00001236

(CHECK TOOL LENGTH LIMIT MARCO)

#1=1 (TOOL NUMBER)

#2=60000 (SET TOOL NUMBER)

WHILE[#1LE120]DO1

#3=#2+#1 (TOOL OFFSET ADD)

#4=#[#3]

IF[#4 LT3.]GOTO1

IF[#4 GT25.]GOTO1

#1=#1+1 (TOOL NUMBER COUNTER)

END1

#1=#0 (CLEAR VARIABLES)

#2=#0

#3=#0

#4=#0

GOTO2

N1#3000=21(CHECK*TOOL*LENGTH)

N2M30

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