Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Interesting issue with dosing schedule
#21
Yeah not sure at this point, I would be surprised if 10:15 caused a problem. I just set mine to match yours as I can see with the log now so I'll know tomorrow if mine doesn't like that time as well.
Reply to top
#22
Yesterday I changed the dosing schedule to this:

Pump 1:
01:00 X X X X X X X
05:00 X X X X X X X

Pump 4:
10:16 X X X X X X X
15:15 X X X X X X X

Pump 5:
10:30 X X X X X X X

Pump 6:
10:45 X X X X X X X

So the only thing that was changed is the first dosing time of pump 4.
This was changed to be activated one minute later, from 10:15 to 10:16.
I wasn't home today, so I cannot tell you whether pumps actually worked or not but here are the log results:

Pump 1:
01:00 X X X X X X X Logged
05:00 X X X X X X X Logged

Pump 4:
10:16 X X X X X X X NOT logged
15:15 X X X X X X X NOT logged

Pump 5:
10:30 X X X X X X X NOT logged

Pump 6:
10:45 X X X X X X X NOT logged

So after 05:00, no dosing pumps actions were logged.
I will change the first dosing of pump 4 to 10:18 and let you know what happened tomorrow... ;-)

Maybe it's important to notice that when I tested the 10:18 back then, it was quickly set directly after the 10:15 was missed.
Now I have set it prior to dosing.

Reply to top
#23
I emailed you a new sketch to load on the display, I made some changes and added a line to the log. Try this and see what happens.
Reply to top
#24
Thanks Rob, I will give it a try... ;-)

BTW, the 10:18 dosing was skipped, so no scheduled dosing at 10:18.

Rob, can you clear up something for me?
Overwriting is something different then removing the old library and put the other one in place...
The same with the files on the memory cards.
Could it be that something went wrong there? Because the old dosing "format" seems to work fine and the new one doesn't...

Is there a way to say: v3.6 should have these files in the library and these files on both the cards?
A fresh start from scratch so to speak... ;-)

When I think about it, this is something that could be wrong in my case, because I have used different laptops to update Robotank.
I might have removed files once and put all the new ones in place...
Could I have messed up the files?

I trust your program skills, so when you say it should work, then it should work.
I'm thinking then, why it's not working in my case and what I could have done diffently compared to you... ;-)

Rob, did your test schedule run fine?

Reply to top
#25
Overwriting the existing library is the same as removing and replacing, same with the files on the SD cards. If the sketches compile and upload all the files are set correctly, I sent that library again just in case as there's a setting in it which enables a certain about of alarms, possible yours wasn't set correct. I have a bunch of schedules set and all have been logged, I haven't been able to miss a schedule yet so its difficult trying to find it. In the log on the sketch I sent you I added a line that should be added after the pump starts, this is when the next schedule time is set. This will tell us if the schedule is being set.
Reply to top
#26
Okay Rob, thanks... ;-)
So it's okay when I remove all files and replace them with the ones in the zip files?

It is so strange, now the only dosing missed was the one after 10, the others worked.
But the day before, the others, after 10, were missed too...

Reply to top
#27
Yeah you can delete all files from computer and replace with ones in zip file. Remember to always close all Arduino IDE programs otherwise it won't see the changes. Do you have any other schedules set for other equipment, if so do they all get logged? Does anything else happen around 10:15?
Reply to top
#28
No Rob, no other schedules, only the lights and dosing pumps.
My lights go ON (from moon --> low sun) at 10:00 and run for one hour to low sun.
Light is getting logged perfectly by the way.

What I will do in the morning, it's close to 24:00 overhere, is remove the library and put the new one (you've send) in place.
To be sure, I will also clean the display sd card and put the files on it again.

I'm not sure what to try anymore... :-(

Reply to top
#29
Sounds good, after you change the library upload that sketch I sent to the display as I changed a couple things in it that may help. Have a good night!
Reply to top
#30
This is top of my list tomorrow morning Rob.
I will let you know as soon as possible... ;-)
Thanks!

Reply to top
#31
Hi Rob,

Uploaded the test sketch this morning.
I will show you what I did:

- checked Arduino IDE version 1.6.5, used document "First Time Proframming Guide"
- closed Arduino program
- put the files "platform.txt" and "RingBuffer.h" into place again according to the FTPG
- removed the complete "libraries" folder in documents/arduino
- copied the complete "libraries" folder from v3.6 unzipped to documents/arduino
- overwritten the "TimeAlarms" folder with the one you mailed me
- copied the calibration file for my display (CPLD 7 inch) to Arduino/libraries/Utouch and have overwritten the one already there
- uncommented correct display in the DisplayV2_OOP.ino you've send me
- removed all files from both the SD cards
- copied all original files from v3.6 unzipped, controller and display, to SC cards
- uploaded original v3.6 sketch to controller
- uploaded the DisplayV2_OOP.ino to display

I haven't touched the controller sketch and the only thing modified in the display sketch (DisplayV2_OOP.ino) was setting the display right.
I also left the original pump names as they are, just to be sure.

I changed the pump 4 schedule to 10:15 again, checked the others but did not change any further settings.
After that I pressed "resume".

Hopefully turned on the light in the cabinet to see whether dosing happens...

   

As you can see: NO dosing at 10:15...
Finally I dosed manually (pump 4).

It's a little later now, made some new pics to show you my settings.

These are the settings of pump 4:
   

Here's a complete overview of the pump schedules:
   

   

   

   

As you can see, pump 5 didn't run either, pump 6 did however...
   

   

Rob, I know it sounds strange but it more and more looks like the pumps are activated randomly.
This time it is pump 5 that isn't running either, next time I think it will be another one.

Reply to top
#32
Hi Arne, thanks, everything you did was done correctly and more than required. No need to do that all again unless you change programming computers. Can you go back to a single daily dose for a couple days? It's a mystery why some of the schedules are skipped, I do have lots of faith in my code and don't think it's what I've done. All the schedules are handled by that library, I've been trying to find something in it I could change but couldn't so last night I stayed up all night trying to figure out a system of my own so I can dump that library as it seems more complex than it needs to be. Happy to report I'm almost there, with this schedules won't be skipped. ;)
Reply to top
#33
Sure I can Rob, I will change dosing times to one dosing again.
Strange, pump 1 run perfect last night (01:00 and 05:00), why is the schedule around 10:00 always an issue...?

Rob, I'm not a programmer but for what I understand the libraries have to do with the scheduler?
Could there be something wrong with the Arduino IDE setting, not using this library correctly?
I do get some amber collored messages before compiling...

Confused
These are some questions that keep spinning in my head:
why does it work in your case?
What do you do differently compared to what I do?
And why does the "one dose schedule" seems to work okay?

I think you are like me in this case, I HATE it when I can't explain why something is not working... Angry
I would be "easier" for you if you could simmulate this for yourself.

Reply to top
#34
Thanks, just till I can get things changed. Unfortunately I can't answer a lot of your questions, the only thing I can do is replace the TimeAlarm library as I believe that's the cause. That library has full control over the schedules, a function from it is used which sends a time to the library and tells it what function to run when the alarm triggers. I know the correct time is always being sent so its up to the library at that point. Managing all the schedules is a difficult task, a lot of times that need to be tracked etc. It was using about 150 alarm slots (max is 255) the way it was setup so only thing I can see it being is the library didn't trigger that alarm. When I go through the library I can't make sense of it and there's quite a few flags involved.

I've now got my own functions made that will handle all the schedules, it seems to be working good just need to do some final testing and thought for odd scenarios. This is basically how it works now. When the controller is turned on all the schedule times are converted to a unix time stamp, then all time stamps are placed in an array, an array is basically a sheet of paper holding info. Then the array is shorted so all schedule times are in order. It then searches through all the schedules and finds the next schedule time. Once it finds that time it checks to see if that schedule is enabled, if not it moves on to the next schedule. When it finds the next one that's enabled it sets a variable holding the unix time stamp. Then in the main loop that cycles over and over its always comparing the current time with the schedule time and when it passes it runs that schedule. It then searches for the next schedule and repeats itself. When a schedule is adjusted the list is regenerated.

The way its setup now I can't imagine a schedule ever being skipped, I'm quite happy with how its working and feel good about it.
Reply to top
#35
That's great news Rob.
I have changed the schedule this morning to the "one dosing schedule".
No dosing what so ever happened yet, maybe tomorrow...
I experienced this before, after changing the schedule, no dosing was performed.

Rob, could it be the Arduino IDE settings and/or messages I get?
Or isn't uploading possible when things don't match?

Reply to top
#36
Hello Rob, hello Arne,
I read the thread, very strange.
Perhaps is the difference between rob and arne the format of the time (rob 12 am/pm and arne 24 hours?)
If I find time the next days I'll try to complete my new controller and test my dosingpump ...
Reply to top
#37
Yeah it's strange Roland, I am running the 12hr format but everything is done in 24hr format, there's just a function to convert for display so it shouldn't matter. I'm confident what I'm doing will make the difference though. I don't think it has anything to do with the IDE settings Arne, those messages you get are just messages, not errors. If there were any problems you wouldn't be able to compile and upload. If it goes on the Arduino the IDE did its job, I wish I could blame it on that. :) It's nothing you're doing.
Reply to top
#38
Thanks Roland, thanks Rob...

Rob, yesterday morning I changed the dosing schedule to the "one dose" version.
It skipped all dosings that same day, 10:15, 10:30, 10:45 and 11:00.
I dosed manually but today dosing worked again.

It looks like RT needs "one cycle" to understand the schedule has changed.
Does that make sence to you Rob or is this something strange too?

Reply to top
#39
That could be possible I guess but that doesn't explain why the 10:15 gets missed. Even though you're only using one schedule it still generates the times and everything else the same, that's what's strange as well. Also the fact pump1 didn't skip and it also had 2 schedules like pump4. I've been quite busy with work the last couple days so haven't done much since but I should have something soon.
Reply to top
#40
In the "one time dose" the 10:15 works, in fact all dosing times work in that case Rob...

Reply to top


Possibly Related Threads…
Thread Author Replies Views Last Post
  Issue with Upgrade to 5.20 aquaalgae 1 2,493 01-12-2020, 09:23 PM
Last Post: Rob F
  Problem with dosing pumps Arne 37 29,191 01-31-2017, 03:00 AM
Last Post: Arne
  Disable dosing pump Arne 2 4,175 01-25-2017, 03:30 AM
Last Post: Arne

Forum Jump:

Current time: 04-28-2024, 02:59 AM