I am working on trying to figure out a wash down program for a Haas Mill I am currently running one on my Okuma machines that works really well but having problems figure out the Haas so thought I would ask to see if anyone has any ideas. The program is set to come on between 220 to 230 for day time and 1520 to 1530 for 2nd shift.
1st Part here is what I wrote for the Okuma. The bottom is what I had started for the Haas does anyone have any ideas
Thanks

OTIME

(RECORD TIME AND CONVERT TO WHOLE NUMBER)
YR=VTIME[1] ( YEAR )
MT=VTIME[2] ( MONTH )
DY=VTIME[3] ( DAY )
HR=VTIME[4] ( HOUR )
MN=VTIME[5] ( MINUTE )
SC=VTIME[6] ( SECOND )
TIME=[HR*100]+MN
( THIS LINE SETS AT WHAT TIME TO RUN )
IF[TIME LT 220]NSKP (END OF SECOND SHIFT WASH)
IF[TIME GT 230]NCHK2
GOTO NWASH
NCHK2
( THIS LINE SETS AT WHAT TIME TO RUN )
IF[TIME LT 1520]NSKP (END OF FIRST SHIFT WASH)
IF[TIME GT 1530]NSKP
NWASH
CALL OWASH ( CALLS THE OWASH SUB )

NSKP
NEND





HAAS MILL FORMAT
%
O9000 ( WASH DOWN PROGRAM )
( #3012 is time format for Haas Mill and laid out in Hour / MIN / SEC )
IF [#3012 LT 022000] GOTO 100
IF [#3012 GT 023000] GOTO 100

IF [#3012 LT 152000] GOTO 100
IF [#3012 GT 153000] GOTO 100

END1
M98 P0002 ( Calls Wash Program )
N100 M99
%

Similar Threads: