JamieR Frequent Poster
Joined: 30 Jun 2004 Posts: 54 Location: Chicago
|
Posted: Fri Apr 29, 2005 5:40 pm Post subject: Haas--Counting Parts per Bar |
|
|
Q:I’m using a bar puller with my SL-20, and each bar gives me 32 parts. I have a main program and a sub-program, and the sub-program ends with M99. Is there a page or screen on the control that shows what the part count is at any point in the M98 L32 loop? I found the M30 count in Current Commands, but that doesn’t tell me where I’m at in my 32-piece bar. Setting 118, M99 Bumps M30 Counters, doesn’t work when the M99 is in a sub-program.
A: Page up to the Tool Life screen in Current Commands, and monitor the USAGE count for the bar puller tool number. If you don’t have the Macro option on your SL-20, you’ll need to manually zero out the Usage column for this tool number at the beginning of each bar (cursor onto it and press the ORIGIN key). With macro variables, you could do that via the part program – or you could program an instruction that will bump the M30 counter at a sub-program M99.
Here’s a sample program, using macros, that we have used to count parts on M30 counter #1 and count bars on M30 counter #2. Setting 118 may be either on or off.
Code: | %
O00001 (Main program)
#1=0
N1
M98 P100 (sub-program call)
#3901=#1 (tells machine to count M99s on counter #1)
#1=#1+1 (add 1 to the counter every time program is run)
IF [ #1 EQ 32 ] GOTO2 (repeat program 32 times)
GOTO1 (go to N1 until #1 = 32)
N2
M30 (these will be counted on counter #2)
%
================
%
O00100 (Sub-program)
N10
G28
T101
G97 S500 M03
G00 X2.0 Z.1
Z0
G01 X1.9 F.010
G00 Z1.0 M05
G28
M99
% |
|
|