I need Macros

Started by mayday, October 01, 2022, 06:22 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

mayday

#1
a tool# check of what's in the spindle for a Toyoda/Fanuc on a restart
#2
3 digit serial# increment with size and spacing percentage

thats it for now  :htu:

CNCAppsJames

#1
In your Tool Change MACRO, immediately following the change, capture #4120 or [#_BUFT]  if you want to use names. After you stage a Tool, #4120 populates with that T#.

For example;
......
G91G30X0Y0Z0M6
#906=#4120
......

or
......
G91G30X0Y0Z0M6
#906=[#_BUFT]
......

This sends the changed T# in the spindle to MACRO variable #906 immediately after the tool change

After that you can do a check of the current tool in the spindle ( #4320 or [#_ACTT] ) and compare to the variable and do whatever you want.

For example;
IF[#4320NE#906]GOTO9906
.......
M30

N9906#3000=6(TOOL COMPARE FAIL)
%

Or
 
IF[[#_ACTT]NE#906]GOTO9906
.......
M30

N9906#3000=6(TOOL COMPARE FAIL)
%

I only have an 8-Digit MACRO that only scales for size. Will that work?
"That bill for your 80's experience...yeah, it's coming due. Soon." Author Unknown

Inventor Pro 2026 - CAD
CAMplete TruePath 2026 - CAV and Post Processing
Fusion360 and Mastercam 2026 - CAM

mayday


mayday

yes I can deal with an 8 digit
it it auto increment?

CNCAppsJames

"That bill for your 80's experience...yeah, it's coming due. Soon." Author Unknown

Inventor Pro 2026 - CAD
CAMplete TruePath 2026 - CAV and Post Processing
Fusion360 and Mastercam 2026 - CAM

mayday