OSC
The OSC (short for Oscillation) command is great for turning things on and off in a repeating cycle. It uses three separate timers:
OSC MMM:SS/MMM:SS/MMM:SS Then [ON/OFF/Profile]
The timers define Delay before first run / Time to run / Delay until next run
The maximum value you can specify for any one of the timers is 999:99, which equates to 16 hours, 39 minutes, 59 seconds.
Here are a few examples:
OSC 000:00/005:00/005:00 Then ON
This would turn on the output for 5 minutes, then turn it off for 5 minutes, and repeat indefinitely:
OSC 000:00/007:00/002:00 Then ON
This would turn on the output for 7 minutes, then turn it off for 2 minutes, and repeat indefinitely:
OSC 007:00/002:00/000:00 Then ON
This would wait for 7 minutes, then turn on the output for 2 minutes, then turn it off for 0 minutes. It would then repeat the 7 minute off, 2 minute on cycle.
One reason to use the initial delay would be to stagger two different outputs so they don’t run at the exact same time, such as dosing pumps.
The odd thing about the initial delay timer is that it calculates from midnight of January 1, 1996. If your timer values added together are evenly divisible into 1440 (24 hours), then your output will always come on at the same times each day. If they are not divisible into 1440, then each day will be slightly different, and you’d have to do some interesting math to figure out when it would turn on on any given day.
My personal example:
I use the OSC command to activate my Swabbie skimmer neck cleaner every six hours. The Swabbie has a motor that rotates the cleaning wiper in the skimmer neck very slowly, so it needs to run for about 2 minutes to thoroughly wipe all the crud from the neck. Here is the programming for my Swabbie output:
Fallback OFF
OSC 000:00/002:00/358:00 Then ON
If Output EB_3_Skimmer = OFF Then OFF
The first line — Fallback OFF — instructs the Apex to turn off this output if the Apex ever gets disconnected from the Energy Bar where the Swabbie is plugged in. This could also apply if the Apex locks up and becomes unresponsive (which rarely happens). This just basically means don’t run the program if the Apex unit isn’t in control of the situation.
The OSC timers in this example are:
- 000:00 = zero minutes from midnight until the first run
- 002:00 = two minutes of actual run time
- 358:00 = 5 hours & 58 minutes to delay until the next run
The third line disables the Swabbie from running if my skimmer is off. This would prevent it from rotating accidentally if I’m performing maintenance on the skimmer or if it’s off during a feed mode.
Since my timers multiplied by 4 = 1440, my OSC timers trigger the Swabbie at the same times each day: Midnight, 6am, noon, 6pm.