Phil,
The simplest method is to set your the TIMER ON logic command to set the millisecond time interval 60000 for 1 minute for the lube I/O and use a variable counter to toggle back and forth between on and off
Select an un-used variable for this:
In the TIMER.FIL file write:
\333={\333+1}
IF \333<4 THEN #7=0 ' I/O for Lube OFF
IF \333=4 THEN #7=1:\333=0 ' I/O for Lube ON
Alternative:
Or else you could always replace SLEEP with the IF THEN GOTO and TIME commands in a loop until the time elapses with the need for the TIMER.FIL file.
In the Macro.Mac Library you can modify this macro which is checking for time elapsed into a routine that uses the TIME to do the lube.
[TIMED IO CHECK]
' The following routine checks to see if a prox switch is hit within 500 ms if not then display a message
' Change time 500 ms and I/O relay # as needed
#83=1 ' Engage air cylinder to move
TIME RESETMS ' set millisecond time counter to zero
LOOP:
TIME MS;\55 ' read how many milliseconds has elapsed
IF \55>500 THEN LABEL1 AIR TOO LOW;12:EXIT
IF #59=0 THEN GOTO :LOOP ' if switch not hit then re-check again
' If made it here then switch was hit within 500 ms
(Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)