Dear members,
First off, I apologize for this long post.
If someone sees the challenge in this, they will read this all the way and try to make sense of it.
I am either seeking help in making my own written macro work, or explain details on or how to implement Mazak's one into my Yasnac MX3 controller.
Here is the whole story:
I have been successful in bringing a half dead Mazak VTC-41 back to life.
Unfortunately I didn't expect a basic machine function like an automatic tool change not to be part of the ladder program, and so it happened that I never made the O9000 programs visible and backed them up before regenerating the system.
Regenerating the system was necessary due to data corruption giving me constant random errors.
I did receive several ATC macros for this machine which it looks like had ATC 430-1 A installed originally (says it on old floppy drive). I did receive ATC 430-3 from Mazak the other day, but have questions regarding implementing it.
The macro is an O9000 program which would be called up by a T-command and processed as a macro if I set Pm #6134 to 1. At the same time, the value of my T command would become the argument of common variable #149, which it does, but........
well to shorten this long story, I wrote this the other day... in conjunction with an empty O9000 to get the T value put into variable 149.
It does everything but turn the carousel at all.
%
O9001 (I CAN CALL THIS MACRO WITH AN M06 COMMAND BY PUTTING A 6 INTO PARAMETER #6130)
N0010 M05;
N0020 G30 X0.0 Y0.0 Z0.0;
N0030 M19;
N0040 M16;
N0050 M12;
N0060 M11;
N0070 G0 Z4.8;
N0080 T#0149 M6;
N0130 G30 Z0;
N0150 M10;
N0170 M13;
N0190 M15;
N0210 M99;
%
The one from Mazak has conditional expressions and looks like this:
Let me one of my biggest questions right at the top before you read the whole macro.
My biggest question is:
If the macro starts a so called repeat command "DO" which states in the manual like this:
While <conditional expression> is satisfied, the blocks between DO m and END m are repeated.
When it is unsatisfied, the process branches to the block next (below) to END m. (m=1, 2, 3)
why am I seeing every single repeat command in the following macro with nothing in between DO and END?
And also, in line N10, why is the call up of the program number in there?
HOW DO I IMPLEMENT THIS MACRO PROPERLY INTO A YASNAC MX3. (SORRY FOR YELLING;-)
I put an explanation of the variables and decimal values according to my manual next to some lines.
%
O9000 (O9000 can be called up as a macro by a T command)
(AUTO TOOL CHANGE 430-3)
#1=#4003
#2=#4007
#3=#4001 (#4001-40021 gives modal G code information from group 01-21)
WHILE[#1000EQ1]DO1 (#1000 IS A SYSTEM VARIABLE: INTERFACE INPUT SIGNAL; 1 is a collectively read decimal value of 16 point (bit) input signal)
END1
IF[#4014EQ67]GOTO10 (#4014 IS A SYSTEM VARIABLE: MODAL INFORMATION OF SEQUENCE NUMBER)
G67
N10 IF[#4015EQ50]GOTO20 (#4015 IS A SYSTEM VARIABLE: MODAL INFORMATION OF PROGRAM NUMBER)
G50
N20 G00G40G80G69
G91G30XY0Z0T#4120 (#4120 IS A SYSTEM VARIABLE: MODAL INFORMATION FOF T CODE)
IF[#1001EQ0]GOTO4
IF[#1004EQ1]GOTO2
IF[#1003EQ1]GOTO3
WHILE[#1005EQ0]DO1
END1
G91G28Z0
WHILE[#1006EQ0]DO1
END1
G91G30Z0
GOTO4
N2
G91G28Z0
WHILE[#1007EQ0]DO1
END1
G91G30Z0
GOTO4
N3
WHILE[#1005EQ0]DO1
END1
G91G28Z0
N4
WHILE[#1001EQ1]DO1
END1
G#1G#2G#3
M99
%
#1000 through 1015 and 1032 are interface input signals variables.
Any help is greatly appreciated, I hope that there are some people out there that are macro gurus.
Sincerely
Oliver Hanisch