What's new
What's new

Brother Macro Sub Call problem

PriddyShiddy

Cast Iron
Joined
Mar 1, 2011
Location
anaheim, ca
I've had my S700 for a couple months. I've been running catch up of small mix quantities on my fixtures. Yamazen helped me figure out the nuances of the Brother macros (SUB 2mb) and all has been well. Time to start running larger mix sizes (Pierson workholding pallets just arrived) and now I am at a brick wall. Yamazen was out today and figured out WHY my macros started crashing, but I can't find a solution.

I need to be able to run quite a few subs from one file so any changes in fixtures etc are changed in the master and the hundreds and hundreds of subs don't have to be re-posted. Problem is as soon as gross file size exceeds 2mb I can't use any H or L commands. Normally I call:


Code:
#700=5 (QTY OF PARTS TO MAKE)

#601=1 (SUB PROGRAM 1)
#602=2 (SUB PROGRAM 2)

M98 P#601 H100 L#700 (RUNS PROGRAM 1, TOOL 1)
M98 P#601 H110 L#700 (RUNS PROGRAM 1, TOOL 2)

You get the drift. The H calls which tool to run on that row of the fixture and the L sets the QTY. These constantly change and Haas has no issues running this way. The Brother is fine if all the files involved are less than 2mb but over 2mb I'm canned.

I spent the last 6 hours trying new macros instead of making parts since Yamazen left and no dice.

I got really close and NO IDEA why the new one is hanging up.

Now Master is:

Code:
(TOOL #1)
#710=100 (TOOL NUMBER)
#699=#601 (POSITION #)
M98P7003

Sub #1 7003:

Code:
(1) M98 P#699
IF[#701EQ#700]GOTO9999

(2) M98 P#699
IF[#701EQ#700]GOTO9999

This allows me to run the qty per row required and call any sub/sub from it and works

The problem I have now I'm stumped. It runs Tool1 (N100), Tool2 (N110), (N120), then says sequence number not found for N130. It's there. Same as before. I'm sure I'm just running in circles but I can't for the life of me see what's wrong. The second S700 on it's way was purchased to run larger files so my loss on lights out machining vs Haas exceeds ALL time saved on reduced cycle times from the Brother if I can only run 7 or 8 subs instead of 20+ which is the plan.

Master:
( RUN FILE )
#601= 1
#602= 2
#603= 3
#604= 4
#605= 5
#606= 6
#607= 7
#608= 8
#609= 9
#610= 10
#611= 11
#612= 12

#700= 09 (** # OF PARTS PER ROW **)
#701= 0 (COUNTER)

G0G17G40G49G80G90 (SAFETY)

G52X0Y0Z0
M352
( ROW 1 #601)
IF[#601EQ0]GOTO999
G54.1P1

(FACE) M98 P7001 L1
G52 X0.
#701=0 (COUNTER)
M98P#601H100L#700 (T03 1/2 60* CHAMFER)
G52 X0.
#701=0 (COUNTER)
M261
M98P#601H110L#700 (T04 1/2 60* CHAMFER)
G52 X0.
#701=0 (COUNTER)
M98P#601H120L#700 (T12 .02 60* ENG)
G52 X0.
#701=0 (COUNTER)
M98P#601H130L#700 (T09 .01 60* ENG)
G52 X0.
#701=0 (COUNTER)
M98P#601H140L#700 (T06 .005 60* ENG)
G52 X0.
#701=0
N999

SUB 1:
Code:
(STAMP CUT SUB)

G52 X0.
#701=0 (COUNTER)

(1) M98 P#699
IF[#701EQ#700]GOTO9999

(2) M98 P#699
IF[#701EQ#700]GOTO9999

(3) M98 P#699
IF[#701EQ#700]GOTO9999

(4) M98 P#699
IF[#701EQ#700]GOTO9999

(5) M98 P#699
IF[#701EQ#700]GOTO9999

(6) M98 P#699
IF[#701EQ#700]GOTO9999

(7) M98 P#699
IF[#701EQ#700]GOTO9999

(8) M98 P#699
IF[#701EQ#700]GOTO9999

(9) M98 P#699
IF[#701EQ#700]GOTO9999

(10) M98 P#699
IF[#701EQ#700]GOTO9999

(11) M98 P#699
IF[#701EQ#700]GOTO9999

(12) M98 P#699
IF[#701EQ#700]GOTO9999

(13) M98 P#699
IF[#701EQ#700]GOTO9999

(14) M98 P#699
IF[#701EQ#700]GOTO9999

(15) M98 P#699
IF[#701EQ#700]GOTO9999

(16) M98 P#699
IF[#701EQ#700]GOTO9999

(17) M98 P#699
IF[#701EQ#700]GOTO9999

(18) M98 P#699
IF[#701EQ#700]GOTO9999



N9999
G52 X0.
M99


RUN FILE:
Code:
( O0002 )

GOTO#710 (JUMPS TO CURRENT TOOL)

( ROUGH CONTOUR @@@@@ )
N100 IF[#701GE1]GOTO200 (SKIPS WASTED Z RETRACT AFTER FIRST PART)
T3 M6
N200
G0 G90 X-.0688 Y.2904 S5000 M3
G43 H3 Z-.1
M8
G1 Z-.128 F400.
G41 D3 X-.0677 Y.2654 F40.
G3 X-.0427 Y.2415 I.025 J.0011
G1 X-.0416
X-.0356 Y.2418

........


G3 X-.0185 Y.2664 I-.0019 J.0249
G1 X-.0186 Y.2683
G40 X-.0204 Y.2932
G0 Z-.1
G0 Z.5
#701=#701+1 (COUNTER)
G52 X[[#800 *#701]*-1] (MOVES OFFSET OVER TO NEXT PART)
M99

Code:
N130 IF[#701GE1]GOTO200 (SKIPS WASTED Z RETRACT AFTER FIRST PART)
T9 M6
N200
G0 G90 X0. Y0. S15000 M3
G43 H9 Z.06
M8
G98 G81 Z.05 R.05 F12.
G80
( .01 POCKET OOOOO )
X-.0304 Y-.023 Z.025
G1 Z0. F9.
X-.0298 Y-.0233 Z-.0002 F12.
 
N130 is there and comes up under search in the Brother. Variable #710 shows 130.0000. Still get Sequence number not found.

I don't want to add a ton of junk to the individual files (over 1,000 files). These are production parts. I'm trying to 'LEAN' up and stop having so much tied up in tons of inventory so I need to mix smaller quantities of more parts on the table which means more files = WAY more than 2mb. I create 50+ files a week so 'manual coding' / changing them is just insane. All have N100 for tool 1, N110 tool 2 etc and I can't figure out why it can see N100, N110, N120, but N130 is "not found"
 
Trying to solve using while commands to loop every tool of every file until ## is reached and getting Macro Command Error. I checked all the rules it says cause it and don't see how any are broken. This is my first attempt using WHILE[conditions are good]DOcoolstuff:

Code:
( ROUGH CONTOUR @@@@@ )
N100
T3 M6
WHILE[#701LE#700]DO1
G0 G90 X-.061 Y.2937 S5000 M3
G43 H3 Z-.08
M8
G1 Z-.1067 F400.
G41 D3 X-.0625 Y.2688 F40.
Y.2673
G3 X-.039 Y.2424 I.025 J0.


Code:
G3 X-.0156 Y.2673 I-.0016 J.0249
G1 X-.0157 Y.2689
G40 X-.0172 Y.2939
G0 Z-.08
G0 Z.5
#701=#701+1 (COUNTER)
G52 X[[#800 *#701]*-1]
END1
G52 X0.
#701=0
 
Are you listing nested subs after M30 in the main? I think there is a rule about that. Check the sub portion of the NC Programming manual I think it is a bolded note. Don't have the book here, but there is some certain set of circumstances that require you to do that.
 
"G52 X[[#800 *#701]*-1]"

I have no idea of your control, but try keeping -1 within brackets.
 
Are you listing nested subs after M30 in the main? I think there is a rule about that. Check the sub portion of the NC Programming manual I think it is a bolded note. Don't have the book here, but there is some certain set of circumstances that require you to do that.

Yes. It's never been fed a program that was not variable based macro so they all have the:

M30

M98P1
M98P2
M98P3
M98P4
etc....
 
"G52 X[[#800 *#701]*-1]"

I have no idea of your control, but try keeping -1 within brackets.

The machine is 2 months old with the C00 control. That portion of the program works perfectly.

What doesn't work in the "Expanded Memory Mode" is H, L, and seemingly GOTONNNN and WHILE.... Worked on this until 3am and no dice. Still doesn't find all of the NNNN (seems like a glitch), WHILE just errors out on the WHILE line.
 
I tried creating a loop with

IF[#701LE#700]GOTO((current NNNN)) which also didn't find the NNNN. The manual says it looks from current position to the end of the file and if not found starts over at the beginning of the file which doesn't seem to be the case here.
 
Are you sure, macro option is enabled on the machine with full functionality?

Up to 2mb it works perfectly. The manual says over 2mb you can not use H or L codes and it seems WHILE and occasionally GOTO as well. Yamazen had me check the 'multiple M code enabled' which was already on. We installed the extended memory option as well which didn't make any change. It just seems that over 2mb it can't run macros unfortunately.

For now I'm going to have to try having the files contain all the copies of the parts in them so they will be 900% larger files and when I change fixtures I have reprogram every file I've reprogrammed... again.
 








 
Back
Top