Hep with OSC command ONLY during the feed cycle

bevis28

Member
How can i get the OSC statement to work just during FEEDA ? I want the pumps off all the time and only want them to come on when FEEDA is active.. I have 2 korillias that i want to rock back and forth to move food around the tank. i have tried

Pump A

Fallback OFF
Set OFF
OSC 000.000/000.010/000.000 Then ON
If FEEDA Then ON
( per the above, i have tried flopping the line position
on the feed statement and the OSC statement and it just won't work )

Pump B

Fallback OFF
SET ON
OSC 000.010/000.000/000.010 Then Off


I had this working perfect on 30 second intervals and rocking the pumps back and forth (on/off/on) and while one was off for 30 seconds the other would be on for 30 seconds..This worked great until i decided to try and only make them work during the FEEDA timer. I know it works and i KNOW I'm doing something wrong. I did not document what the command line statements were when i had it working on 30 second back and forth times, so the above line statements may be wrong.. I'm trying to remember the OSC parameters from memory. Im thinking i have the octet sequence WRONG

Can someone please help me to make the pumps rock back and forth for 10 seconds ONLY during the FEEDA cycle ? Thanks for any help in advance
 
Use a virtual outlet, called FeedStir in this example.

[FeedStir]
Set OFF
If FeedA 010 Then ON

[Pump A]
Fallback OFF
Set OFF
OSC 0:30/0:30/0:00 Then ON
If Outlet FeedStir = OFF Then OFF

[Pump B]
Fallback OFF
SET ON
OSC 0:00/0:30/0:30 Then Off
If Outlet FeedStir = OFF Then OFF


BTW, Your OSC syntax is wrong... times in OSC use : as the separator between minutes and seconds, not dots. Format is MMM:SS
 
sorry for the misprint.. I'm using : instead of .

No problem. Just being thorough. I always recommend that people copy code directly out of their Apex when posting programming here so we see exactly what is on the Apex. Or for longer listings, from the Reeftronics Program/Profile report.
 
Minor nit, you don't need the Set command. The OSC command generates both states. It won't hurt, it's just redundant.

Todd
 
OK, after some frustration with the syntax placement and help from Aquamanic and RussM, here is what works to oscillate 2 pumps ONLY during the feed cycle.. I created 4 feed cycles so if someone was feeding for me and they pushed the wrong feed, it would still do the same thing..

here is the Virtual outlet programming

Set OFF
If FeedA 000 Then ON
If FeedB 000 Then ON
If FeedC 000 Then ON
If FeedD 000 Then ON

and here is the 2 outlet programming with the pumps plugged in to oscillate back and forth to move food around during the feed cycle.


here is the syntax for pump 1

Set OFF
OSC 000:00/000:10/000:10 Then OFF
If Outlet Feed = OFF Then OFF


and here is the syntax for pump 2

Set OFF
OSC 000:00/000:10/000:10 Then ON
If Outlet Feed = OFF Then OFF



This causes the pumps to cycle back and forth. when pump 1 is on for 10 seconds, pump 2 is off for 10 seconds.. when pump 2 is on for 10 seconds, pump 1 is off for 10 seconds.
If you notice the "THEN ON " AND "THEN OFF" statements at the end of the OSC statement line, this is what causes them to rock back and forth and one pump to be on while the other is off..as far as i can tell anyways.. thanks to everyone for the help..
 
OK, after some frustration with the syntax placement and help from Aquamanic and RussM, here is what works to oscillate 2 pumps ONLY during the feed cycle.. I created 4 feed cycles so if someone was feeding for me and they pushed the wrong feed, it would still do the same thing..

here is the Virtual outlet programming

Set OFF
If FeedA 000 Then ON
If FeedB 000 Then ON
If FeedC 000 Then ON
If FeedD 000 Then ON

and here is the 2 outlet programming with the pumps plugged in to oscillate back and forth to move food around during the feed cycle.


here is the syntax for pump 1

Set OFF
OSC 000:00/000:10/000:10 Then OFF
If Outlet Feed = OFF Then OFF


and here is the syntax for pump 2

Set OFF
OSC 000:00/000:10/000:10 Then ON
If Outlet Feed = OFF Then OFF



This causes the pumps to cycle back and forth. when pump 1 is on for 10 seconds, pump 2 is off for 10 seconds.. when pump 2 is on for 10 seconds, pump 1 is off for 10 seconds.
If you notice the "THEN ON " AND "THEN OFF" statements at the end of the OSC statement line, this is what causes them to rock back and forth and one pump to be on while the other is off..as far as i can tell anyways.. thanks to everyone for the help..
 
this works perfect. i just wish i understood exactly what i did..

i thought, from reading the manual, that the OSC statement was as follows

1st octet = OFF
2nd octet = ON
3rd octet = OFF

as you can see from my above syntax for pump 1 i have nothing in the 1st octet (OFF), 10 seconds (ON) in the 2nd octet and 10 seconds (OFF) in the 3rd octet and "THEN OFF

same thing in pump 2 except "THEN ON" at the end of the OSC statement.

I guess i would think, from reading the manual, it would be as follows

000:000/000:010/000:000 Then ON for pump 1
000:010/000:000/000:010 Then OFF for pump 2

But thats not the case. It appears that the 1st octet is invalid or for some other use like delay or something. Seems the octet placement and values are throwing me a curveball. Guess i need "The Complete Idiots Guide To Apex "....
 
The first param in the oscillate (Initial OFF) is really used for synching multiple oscillate statements together. The simplest example would be if you had two pumps that you wanted to oscillate for 10 seconds on, 10 seconds off, similar to what you had. Except, you want pump #2 to run opposite pump #1, essentially delay the start of the oscillate cycle.

Vortech pumps handle this internally with their sync and anti-sync modes. With the oscillate you would set it up as follows

:00/0:10/0:10 Then ON for pump #1
:10/0:10/0:10 then ON for pump #2

Both pumps would then run on a 10 sec ON, 10 sec OFF cycle but pump #2 must wait 10 seconds to start its cycle, essentially placing it on a cycle that's exactly opposite pump #1.

So again, if only using a single oscillate command, the first param "initial OFF" can be ignored. Only when trying to sync multiple pumps together would you use it.
 
Another thing, the sequence is determined by the specified state.

If using ...Then ON, the sequence is OFF > ON > OFF > OFF... (notice that the cycle wraps back to the begining OFF)

If using ...Then OFF, the sequence is ON > OFF > ON > ON... (again notice the wrap)

If the first parameter is 00:00 then it is not an issue; otherwise, the first and last paramter will add.

So you can achieve an offset like you did with oppossing states or with careful selection of the parameters and identical states.

So again, if only using a single oscillate command, the first param "initial OFF" can be ignored. Only when trying to sync multiple pumps together would you use it.
Under most situations this is true. However, if trying to notch out specific times, such as dosing alk during the night, it is important. It actually is offset from midnight, so it will determine where in the hour dosing would occur. It is easy to inadvertently clip the first and last dose if you are not careful.

Todd
 
Back
Top