Help coding virtual switch for frozen food dosing.

Enderg60

Well-Known Member
View Badges
Joined
Jun 7, 2019
Messages
538
Reaction score
532
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?
 
I can’t help with the question, but I can bump the thread to see if we can get you some assistance.
 
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.
 
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
 
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:
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.
 
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
 
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?
 
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
 
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.
 
I ve been looking at dosing from a refrigerator too. Why can I just have another doser or even a small pump tee in the food line inside the fridge and blow out the line/lines with aquarium water periodically? I would use a check valve in each line to make sure water does not flow back into food.
 
I ve been looking at dosing from a refrigerator too. Why can I just have another doser or even a small pump tee in the food line inside the fridge and blow out the line/lines with aquarium water periodically? I would use a check valve in each line to make sure water does not flow back into food.
If you are using peristaltic pumps putting a tee just on the outlet side of the food pump will prevent any back feeding and will clean out the tube.
 

IF YOU HAD TO TAKE A REEFING EXAM, WOULD YOU PASS?

  • Yes!

    Votes: 32 45.7%
  • Not yet, but I have one that I want to buy in mind!

    Votes: 9 12.9%
  • No.

    Votes: 26 37.1%
  • Other (please explain).

    Votes: 3 4.3%
Back
Top