This doesn't really answer your question but why don't you have one ON-time and one OFF-time?

For example
Code:
If Output1 = OFF THEN
   If Counter1 = Output1OnTime Then
     Output1 = ON
  ENDIF

ELSE    ' Output is ON

  If Counter1 = Output1offTime Then
    Output1 = OFF
  ENDIF

ENDIF
Now, there are 1440 minutes in 24hours.
If Output1OnTime = 1438 and OutputOffTime = 2 the output will turn on at 23:58 and off at 00:02.
If OutputOnTime = 2 and OutputOffTime = 1438 the output will turn on at 00:02 and off 23:58.

If you have multiple outputs then you can preferably use arrays to store states, on and off times and simply index thru them each time your minutes counter "tick" to see if any needs changing state.

/Henrik.