Apex Code Help Please

yepreef

Active Member
View Badges
Joined
Jun 8, 2018
Messages
215
Reaction score
72
Rating - 0%
0   0   0
So, i currently set my effluent output ( pinch valve run via 24v port ) as follow:
Set OFF
OSC 000:00/000:02/002:00 Then ON ( dose every 2 second and off for 2 minute ).

Now i want to keep the same dosage for daytime and dose less at night as alk consume more when light is up.

Day ( from 6AM to 12 PM ) suppose to be : OSC 000:00/000:02/002:00 Then ON
Night ( From 12PM to 6 AM) suppose to be : OSC 000:00/000:02/002:20 Then ON

Can someone please guide me this?
Thanks alot.
 

SuncrestReef

That Apex guy
View Badges
Joined
Jan 18, 2018
Messages
4,214
Reaction score
9,217
Location
Oregon
Rating - 0%
0   0   0
This is commonly done by moving the OSC code to a couple of virtual outputs, one for day and one for night, then on the pump itself just have it turn on and off according to the state of the virtual outputs:

[Day_OSC] -- virtual output
OSC 000:00/000:02/002:00 Then ON
If Time 12:00 to 5:59 Then OFF

[Night_OSC] -- virtual output
OSC 000:00/000:02/002:20 Then ON
If Time 06:00 To 11:59 Then OFF

[Pump]
Fallback OFF
Set OFF
If Output Day_OSC = ON Then ON
If Output Night_OSC = ON Then ON

If you're not familiar with virtual outputs, see my tutorial here:

Note: the tutorial is written for the current Apex and Apex-EL. If you have the Apex Classic or other older model, the process to create virtual outputs is different. Let me know if you need those instructions.
 
OP
OP
yepreef

yepreef

Active Member
View Badges
Joined
Jun 8, 2018
Messages
215
Reaction score
72
Rating - 0%
0   0   0
This is commonly done by moving the OSC code to a couple of virtual outputs, one for day and one for night, then on the pump itself just have it turn on and off according to the state of the virtual outputs:

[Day_OSC] -- virtual output
OSC 000:00/000:02/002:00 Then ON
If Time 12:00 to 5:59 Then OFF

[Night_OSC] -- virtual output
OSC 000:00/000:02/002:20 Then ON
If Time 06:00 To 11:59 Then OFF

[Pump]
Fallback OFF
Set OFF
If Output Day_OSC = ON Then ON
If Output Night_OSC = ON Then ON

If you're not familiar with virtual outputs, see my tutorial here:

Note: the tutorial is written for the current Apex and Apex-EL. If you have the Apex Classic or other older model, the process to create virtual outputs is different. Let me know if you need those instructions.
You’re awesome. Thank you very much
 
OP
OP
yepreef

yepreef

Active Member
View Badges
Joined
Jun 8, 2018
Messages
215
Reaction score
72
Rating - 0%
0   0   0
I forgot to ask. Does the hour have to be in 24h format?
Turn on night time mode from 22:00 to 6:00. Turn on day time mode from 6:00 to 22:00. Should it be like this?
[Day_OSC] -- virtual output
OSC 000:00/000:02/002:00 Then ON
If Time 22:00 to 5:59 Then OFF

[Night_OSC] -- virtual output
OSC 000:00/000:02/002:20 Then ON
If Time 6:00 To 21:59 Then OFF
 

DaneGer21

Valuable Member
View Badges
Joined
Jun 18, 2018
Messages
2,137
Reaction score
2,880
Location
Creston, 44217
Rating - 0%
0   0   0
I forgot to ask. Does the hour have to be in 24h format?
Turn on night time mode from 22:00 to 6:00. Turn on day time mode from 6:00 to 22:00. Should it be like this?
[Day_OSC] -- virtual output
OSC 000:00/000:02/002:00 Then ON
If Time 22:00 to 5:59 Then OFF

[Night_OSC] -- virtual output
OSC 000:00/000:02/002:20 Then ON
If Time 6:00 To 21:59 Then OFF
Yes, 24hr format
 

Creating a strong bulwark: Did you consider floor support for your reef tank?

  • I put a major focus on floor support.

    Votes: 59 40.4%
  • I put minimal focus on floor support.

    Votes: 33 22.6%
  • I put no focus on floor support.

    Votes: 49 33.6%
  • Other.

    Votes: 5 3.4%
Back
Top