Help coding virtual switch for frozen food dosing.

Enderg60

Well-Known Member
View Badges
Joined
Jun 7, 2019
Messages
536
Reaction score
523
Rating - 0%
0   0   0
Im trying to figure out how to code a virtual outlet to dose my tank with frozen food.

I currently have a DOS im using for this. I have 3 profiles set up for this. One to prime the feed tube, one to dose the food, and one to reverse prime the pump so the food goes back into the fridge. I have it coded as follows.

Fallback OFF
If Time 09:00 to 09:03 Then FEED-1-A : This adds 90 ml, which is the volume of the tubing.
If Time 09:05 to 09:07 Then FEED-1-B : This adds 40 ml, which is the volume of food I dose per feeding.
If Time 09:08 to 09:10 Then FEED-1-C : This removes 90 ml, the volume of the tubing.

How would I code this series of events into a virtual outlet Id like to use as a "Feed NOW" button?
 

SPR1968

No, it wasn’t expensive dear....
View Badges
Joined
Feb 21, 2017
Messages
20,047
Reaction score
124,743
Location
Nottinghamshire England
Rating - 0%
0   0   0
I can’t help with the question, but I can bump the thread to see if we can get you some assistance.
 

GK3

Valuable Member
View Badges
Joined
Jan 16, 2017
Messages
1,852
Reaction score
1,339
Location
Cincinnati
Rating - 100%
2   0   0
Im trying to figure out how to code a virtual outlet to dose my tank with frozen food.

I currently have a DOS im using for this. I have 3 profiles set up for this. One to prime the feed tube, one to dose the food, and one to reverse prime the pump so the food goes back into the fridge. I have it coded as follows.

Fallback OFF
If Time 09:00 to 09:03 Then FEED-1-A : This adds 90 ml, which is the volume of the tubing.
If Time 09:05 to 09:07 Then FEED-1-B : This adds 40 ml, which is the volume of food I dose per feeding.
If Time 09:08 to 09:10 Then FEED-1-C : This removes 90 ml, the volume of the tubing.

How would I code this series of events into a virtual outlet Id like to use as a "Feed NOW" button?
To my knowledge of apex programming, you can’t. What you are asking for is to run a script. Apex would let you run one of those profiles upon the switch being pressed but I’ve never known if a way to then have two more follow the first one. You would need the ability to program upon switch high run A, then B, then C. Which you can’t. Or you need the ability to programmatically change the start times to the time of the pressed switch, which you can’t do in apex programming.
 

Sisterlimonpot

Effortless Perfection
View Badges
Joined
Jul 15, 2009
Messages
3,877
Reaction score
7,920
Location
Litchfield Park
Rating - 0%
0   0   0
Can't verify, but this would be the path I'd go down.
Create 3 virtual outlets A, B, C.

VO A
Fallback OFF
If FeedNOW CLOSED Then ON

VO B
Fallback OFF
If FeedNOW CLOSED Then ON
Defer 005:00 Then ON

VO C
Fallback OFF
If FeedNOW CLOSED Then ON
Defer 008:00 Then ON

Then in your dos outlet

If Output VO A = ON Then profile feed 1
If Output VO B = ON Then profile feed 2
If Output VO C = ON Then profile feed 3
 

GK3

Valuable Member
View Badges
Joined
Jan 16, 2017
Messages
1,852
Reaction score
1,339
Location
Cincinnati
Rating - 100%
2   0   0
Im trying to figure out how to code a virtual outlet to dose my tank with frozen food.

I currently have a DOS im using for this. I have 3 profiles set up for this. One to prime the feed tube, one to dose the food, and one to reverse prime the pump so the food goes back into the fridge. I have it coded as follows.

Fallback OFF
If Time 09:00 to 09:03 Then FEED-1-A : This adds 90 ml, which is the volume of the tubing.
If Time 09:05 to 09:07 Then FEED-1-B : This adds 40 ml, which is the volume of food I dose per feeding.
If Time 09:08 to 09:10 Then FEED-1-C : This removes 90 ml, the volume of the tubing.

How would I code this series of events into a virtual outlet Id like to use as a "Feed NOW" button?

Can't verify, but this would be the path I'd go down.
Create 3 virtual outlets A, B, C.

VO A
Fallback OFF
If FeedNOW CLOSED Then ON

VO B
Fallback OFF
If FeedNOW CLOSED Then ON
Defer 005:00 Then ON

VO C
Fallback OFF
If FeedNOW CLOSED Then ON
Defer 008:00 Then ON

Then in your dos outlet

If Output VO A = ON Then profile feed 1
If Output VO B = ON Then profile feed 2
If Output VO C = ON Then profile feed 3
This is a great idea. I didn’t even think about using defer statements. Only challenge is the switch has to stay high until the whole sequence is done.

You could do the same but have each of the VOs turn on another Vo that each step follows so they are immediately triggered.
 
Last edited:

Sisterlimonpot

Effortless Perfection
View Badges
Joined
Jul 15, 2009
Messages
3,877
Reaction score
7,920
Location
Litchfield Park
Rating - 0%
0   0   0
This is a great idea. I didn’t even think about using defer statements. Only challenge is the switch has to stay high until give whole sequence is done.

You could do the same but have each of the VOs turn on another Vo that each step follows so they are immediately triggered.
Good point, create a 4th VO that the other 3 point to. The 4th stays on for 15 minutes once feed button is pressed with a defer off code. Then the other 3 VOs point to that outlet.
 

GK3

Valuable Member
View Badges
Joined
Jan 16, 2017
Messages
1,852
Reaction score
1,339
Location
Cincinnati
Rating - 100%
2   0   0
Good point, create a 4th VO that the other 3 point to. The 4th stays on for 15 minutes once feed button is pressed with a defer off code. Then the other 3 VOs point to that outlet.
Exactly. This would totally work. Very Cool.

Too bad apex won’t just let you write “if this then this” lol
 
OP
OP
E

Enderg60

Well-Known Member
View Badges
Joined
Jun 7, 2019
Messages
536
Reaction score
523
Rating - 0%
0   0   0
Thanks! I will try this out as soon as I can!

Too bad apex won’t just let you write “if this then this” lol

Ive been complaining about that for 20 years. Why cant we have an advanced coding mode?
 

Sisterlimonpot

Effortless Perfection
View Badges
Joined
Jul 15, 2009
Messages
3,877
Reaction score
7,920
Location
Litchfield Park
Rating - 0%
0   0   0
It appears that they're focused more on streamlining normal tasks and taking the guess work out of that.

Their tasks menu has made things much easier for the average user. It's the unique tasks that don't fit into the normal users tool box that doesn't have an easy solution and forces you to think outside the box.

If you ask me, they have made great strides in UI. And just knowing that there's usually a solution to achieve a unique objective, is good enough for me. It may not be the prettiest or easiest, and you'll have to create a few extra VOs and possibly Profiles to support it, but having the ability to achieve such a goal is priceless for me. Otherwise everything would need to be controlled with arduinos or raspberry pi's. Hehe
 

GK3

Valuable Member
View Badges
Joined
Jan 16, 2017
Messages
1,852
Reaction score
1,339
Location
Cincinnati
Rating - 100%
2   0   0
It appears that they're focused more on streamlining normal tasks and taking the guess work out of that.

Their tasks menu has made things much easier for the average user. It's the unique tasks that don't fit into the normal users tool box that doesn't have an easy solution and forces you to think outside the box.

If you ask me, they have made great strides in UI. And just knowing that there's usually a solution to achieve a unique objective, is good enough for me. It may not be the prettiest or easiest, and you'll have to create a few extra VOs and possibly Profiles to support it, but having the ability to achieve such a goal is priceless for me. Otherwise everything would need to be controlled with arduinos or raspberry pi's. Hehe
Everyone has their preferences. I think the point of the above was to say you can have a world with both.
 

Reefing threads: Do you wear gear from reef brands?

  • I wear reef gear everywhere.

    Votes: 20 13.8%
  • I wear reef gear primarily at fish events and my LFS.

    Votes: 10 6.9%
  • I wear reef gear primarily for water changes and tank maintenance.

    Votes: 1 0.7%
  • I wear reef gear primarily to relax where I live.

    Votes: 22 15.2%
  • I don’t wear gear from reef brands.

    Votes: 82 56.6%
  • Other.

    Votes: 10 6.9%
Back
Top