Dosing Pump not running on Schedule

Do you have a question on how to do something.
Ask in here.

Posts: 167
Joined: Mon Apr 29, 2013 6:50 am
PostPosted: Sun May 19, 2013 7:26 pm
I am using port 3 for ALK and port 4 for CAL dosing pumps. In the Wizard I entered port 3 to run every 60 minutes for 120 seconds with 0 offset. On Port 4 I entered to run every 60 minutes for 120 seconds with a 30 minute offset.

The problem is that when I look at my relay history in the portal I only see ports 3 and 4 running properly for a 9 hour period where they will run their 120 seconds at the top of the hour and then at half past. But the rest of the day they do not trigger on/off. I haven't actually hooked up the dosing pumps yet so don't worry about my tank being out of whack. I want to make sure the relays are firing correctly before I put my 2part in the hands of the RA.

What am I missing?
Image

Posts: 12457
Joined: Fri Mar 18, 2011 6:47 pm
PostPosted: Sun May 19, 2013 8:15 pm
The portal only logs every 5 minutes.
If the pump turns on and off in between the 5 minute interval, you won't see it in the portal.
Roberto.

Posts: 471
Joined: Sat Jan 14, 2012 2:08 pm
Location: Montgomery Village, MD
PostPosted: Mon May 20, 2013 3:53 am
I tested this by setting the times to be long enough for the portal to catch them in its 5 minute window. Worked like a charm.
Roscoe's Reefs - Starting Over Again:

Building new 29g Nano after landlord went berserk over my 4 75 gallon tanks, Multiple RA's, Water mixing stations, etc. Your help welcomed in remembering all I've forgotten.

Posts: 167
Joined: Mon Apr 29, 2013 6:50 am
PostPosted: Mon May 20, 2013 5:32 am
rimai wrote:The portal only logs every 5 minutes.
If the pump turns on and off in between the 5 minute interval, you won't see it in the portal.



Ok. With that being the case I would expect to see a lot more randomness in when the portal logs the relay activity. Instead it logs consecutively on 9 runs of ports 3 and 4 and then it will not log for about 15 hours.

The most important aspect of the relay functionality in the Portal to me is to be able to monitor my dosing pump activity to ensure that it is running the specified amount of time each day to ensure that I am dosing the proper amount. After overheat control, this is the 2nd most important function that my RA controls.
Image

Posts: 12457
Joined: Fri Mar 18, 2011 6:47 pm
PostPosted: Mon May 20, 2013 2:01 pm
You would have to make the running time longer than 5 minutes if you want it to show in the relay activity 100% of the time.
Or, you could code an expansion outlet port to be triggered on dosing pump port, but it would stay on for more than 5 minutes.
Roberto.

Posts: 167
Joined: Mon Apr 29, 2013 6:50 am
PostPosted: Mon May 20, 2013 6:54 pm
rimai wrote:You would have to make the running time longer than 5 minutes if you want it to show in the relay activity 100% of the time.
Or, you could code an expansion outlet port to be triggered on dosing pump port, but it would stay on for more than 5 minutes.


The RA Wizard only allows you to enter a MAXIMUM of 255 seconds of run time. How do i make it run for over 300 seconds?

I just generated the code in the Wizard and manually changed 255 to 340. It worked. Now I will monitor to see if the relays fire every 2 hours.
Image
User avatar
Posts: 5416
Joined: Fri Jul 20, 2012 9:42 am
PostPosted: Mon May 20, 2013 7:17 pm
I bet we can use a few custom variables to log the hour when the dosing pump goes on and the minute when the pump goes off. Then you can graph those values instead of the relay and have them be more persistent then the relay status.

How does that sound?

Posts: 167
Joined: Mon Apr 29, 2013 6:50 am
PostPosted: Mon May 20, 2013 8:53 pm
lnevo wrote:I bet we can use a few custom variables to log the hour when the dosing pump goes on and the minute when the pump goes off. Then you can graph those values instead of the relay and have them be more persistent then the relay status.

How does that sound?


After temperature control, managing my dosing pumps is the second most critical issue for my RA to control. So any feature that can be added that would allow me to see the port pumps operating for the specified amount of time on every cycle is greatly appreciated.
Image
User avatar
Posts: 5416
Joined: Fri Jul 20, 2012 9:42 am
PostPosted: Tue May 21, 2013 1:08 pm
Ok, so here's some code that will use two of the CustomVar variables (per pump) to report to the portal. Since the variables are byte and can only hold 0-255, I am using one to store minutes and the other to store seconds that the pump is running. The numbers reset at midnight. You can then use the portal to chart the variables. You should see them increment on your schedule and at the end of the day the total number of minutes / seconds should be viewable to see what the total was.

We could also use memory locations to store and then we could store an int. You would lose the graphing capabilities, unless you did something on your own, but it would store the variables if the controller reboots and we could use one location and store total seconds run for the day. For ease of use, this is probably your easiest bet for now.

The URL to use to chart the variables would be:

http://forum.reefangel.com/status/chart.aspx?id=kirkwood&filter=c0
http://forum.reefangel.com/status/chart.aspx?id=kirkwood&filter=c1
http://forum.reefangel.com/status/chart.aspx?id=kirkwood&filter=c2
http://forum.reefangel.com/status/chart.aspx?id=kirkwood&filter=c3

Below is the code to log both pumps to the first four variable locations. Change DPump1 and DPump2 to the relays you use for your pumps.

Code: Select all
 
static time_t running1, running2;

  // Reset the counter each day
  if (now()%SECS_PER_DAY==0) {
    running1=0;
    running2=0;
  } 
 
  // If the Dosing Pump 1 is on and it's a new second...
  if (ReefAngel.Relay.Status(DPump1) && (millis()%1000==0)) {
    running1++; // increment the counter;
  }

  // If the Dosing Pump is on and it's a new second...
  if (ReefAngel.Relay.Status(DPump2) && (millis()%1000==0)) {
    running2++; // increment the counter;
  }
 
  // Normalize and assign to CustomVar for reporting on the portal
  ReefAngel.CustomVar[0]=running1/60; // Number of Minutes for DPump1
  ReefAngel.CustomVar[1]=running1%60; // Number of Seconds for DPump1
  ReefAngel.CustomVar[2]=running2/60; // Number of Minutes for DPump2
  ReefAngel.CustomVar[3]=running2%60; // Number of Seconds for DPump2

Posts: 167
Joined: Mon Apr 29, 2013 6:50 am
PostPosted: Fri May 24, 2013 9:04 am
Inevo,

Thank you very much for your input. I really like where you are going with this. Reporting a cumulative log on the number of minutes that my dosing pumps run is very helpful. Taking this one step further, if I know my pump doses 1.1ml per minute could we add in the simple math and instead of producing minutes run produce mililiters dosed?

Also, is it possible to integrate into the RA Main Screen a daily running tally of MLs dosed per pump? I don't have dimmable LEDs nor powerheads so I have some room on my RA Display to show some other data. I haven't seen anyone compliling daily ALK and CAL data on the main screen so it would be cool to go a different direction with it.

Where do I paste the code you provided?
Image
Next

Return to How do I code ...

Who is online

Users browsing this forum: No registered users and 4 guests

cron