How do I write for ato timer?

Do you have a question on how to do something.
Ask in here.
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: How do I write for ato timer?

Post by lnevo »

It has nothing to do with the timeout memory location. As long as you don't exceed 69 seconds it won't be a problem. If you want to incorporate the memory info, you can replace the 70 with the following

Code: Select all

InternalMemory.ATOHighExtendedTimeout_read()+10; // 10 seconds more than timeout in portal - to ensure timeout gets hit. 
troylong45
Posts: 214
Joined: Sat Oct 10, 2015 9:17 pm

Re: How do I write for ato timer?

Post by troylong45 »

Sweat thanks as always lee. If I write a line like the overheat turn off port code with ato time out would that work? Cus when the float gets toggled again it cycles even tho ato time out flag is on
Image
troylong45
Posts: 214
Joined: Sat Oct 10, 2015 9:17 pm

Re: How do I write for ato timer?

Post by troylong45 »

lnevo wrote:It has nothing to do with the timeout memory location. As long as you don't exceed 69 seconds it won't be a problem. If you want to incorporate the memory info, you can replace the 70 with the following

Code: Select all

InternalMemory.ATOHighExtendedTimeout_read()+10; // 10 seconds more than timeout in portal - to ensure timeout gets hit. 
just like this ?

Code: Select all

    void loop()
    {
            if (now()%6*SECS_PER_HOUR<    InternalMemory.ATOHighExtendedTimeout_read()+10; // 10 seconds more than timeout in portal - to ensure timeout gets hit.
) {
          ReefAngel.SingleATOLow( Port7 ); // Auto top off
        } else {
          ReefAngel.Relay.Off( Port7 );
        }
    ReefAngel.Relay.Set(Port8, ReefAngel.HighATO.IsActive()); // Skimmer
    ReefAngel.DCPump.ExpansionChannel[4] = Sync; // Left Jebao RW4
    ReefAngel.DCPump.ExpansionChannel[5] = AntiSync; // Right Jebao RW4
    ReefAngel.StandardHeater(Heater);
it wont compile like that like this it will

Code: Select all

        void loop()
        {
                if (now()%6*SECS_PER_HOUR<InternalMemory.ATOHighExtendedTimeout_read()+10) {
              ReefAngel.SingleATOLow( Port7 ); // Auto top off
            } else {
              ReefAngel.Relay.Off( Port7 );
            }
        ReefAngel.Relay.Set(Port8, ReefAngel.HighATO.IsActive()); // Skimmer
        ReefAngel.DCPump.ExpansionChannel[4] = Sync; // Left Jebao RW4
        ReefAngel.DCPump.ExpansionChannel[5] = AntiSync; // Right Jebao RW4
        ReefAngel.StandardHeater(Heater);
Last edited by troylong45 on Mon Feb 08, 2016 9:44 pm, edited 2 times in total.
Image
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: How do I write for ato timer?

Post by lnevo »

I think there may be an easier way to do it. Instead of all that, you can just use this.

Code: Select all

ReefAngle.SingleATO(true, Port7, InternalMemory.ATOHighExtendedTimeout_read(), 6);
The true is used if it's for ATOLow, the port obviously, the timeout, and then the 6 represents how many hours apart since the last top off. That should be much easier to use :)
troylong45
Posts: 214
Joined: Sat Oct 10, 2015 9:17 pm

Re: How do I write for ato timer?

Post by troylong45 »

Ok that is for every 6 hours ato Will cycle one time if float is in need of top off till next 6th hour?
Does it as well do the ato time out and stop it from cycling again till ato time out is cleared?(cus I am having issue with time out when it time out it will stop and flag then next time float toggles it will cycle again even when time out is flagged)
Image
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: How do I write for ato timer?

Post by lnevo »

It should. Try it out
troylong45
Posts: 214
Joined: Sat Oct 10, 2015 9:17 pm

Re: How do I write for ato timer?

Post by troylong45 »

I think it works perfectly. The other one didn't work cus during the timer hold it didn't hold the ato timeout and would not work after the time out cus the code still thought it was running when the time out stoped it and never got to cycle after timed out. But this new one seems to be perfect.
Image
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: How do I write for ato timer?

Post by lnevo »

Sweet :)
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: How do I write for ato timer?

Post by lnevo »

I made a mistake. Used the wrong memory location.

InternalMemory.ATOHighExtendedTimeout_read()

it should be

InternalMemory.ATOExtendedTimeout_read()
troylong45
Posts: 214
Joined: Sat Oct 10, 2015 9:17 pm

Re: How do I write for ato timer?

Post by troylong45 »

O really I haven't seen a issue with it I do think angel is spelled wrong tho lol .I caught that just befor I uploaded.
Image
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: How do I write for ato timer?

Post by rimai »

lnevo wrote:I made a mistake. Used the wrong memory location.

InternalMemory.ATOHighExtendedTimeout_read()

it should be

InternalMemory.ATOExtendedTimeout_read()
I'll have to look more into this to confirm.
Roberto.
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: How do I write for ato timer?

Post by lnevo »

Roberto i confirmed already after going on a wild goose chase after updating the wrong controller. It should be without the High and I did misspell Angel
troylong45
Posts: 214
Joined: Sat Oct 10, 2015 9:17 pm

Re: How do I write for ato timer?

Post by troylong45 »

seems to work just fine today
Image
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: How do I write for ato timer?

Post by rimai »

lnevo wrote:Roberto i confirmed already after going on a wild goose chase after updating the wrong controller. It should be without the High and I did misspell Angel
Can you send a patch?
Roberto.
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: How do I write for ato timer?

Post by lnevo »

No libraries are fine. It was me giving the wrong code
troylong45
Posts: 214
Joined: Sat Oct 10, 2015 9:17 pm

Re: How do I write for ato timer?

Post by troylong45 »

I updated the code and removed the high line I don't see a effect but it is working so fine with me
Image
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: How do I write for ato timer?

Post by lnevo »

The effect is that now if you change the timeout in the portal it should adjust accordingly.
troylong45
Posts: 214
Joined: Sat Oct 10, 2015 9:17 pm

Re: How do I write for ato timer?

Post by troylong45 »

O I thought that but it was working fine at current setting so wasn't adjustin it but I figured that's what it was and updated code to correct it and still good lol some good to go. TanKS a mil as always Nevo
Image
troylong45
Posts: 214
Joined: Sat Oct 10, 2015 9:17 pm

Re: How do I write for ato timer?

Post by troylong45 »

been trying to find out y mt ato times out even when increasing the time but i just relized the ato cycle is atoextendedtimeout should that be like that or just atotimeout or do i just need to adjust both if the atoextendedtimeout need to be higher the the atotimeout?
Image
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: How do I write for ato timer?

Post by lnevo »

Should be atoextendedtimeout but I've been having a lot of problems with timeout. It ALWAYS timed out after 2 minutes then I clear it and it runs for the rest of the time. My timeout is an hour. I think something is wrong with timeout code honestly.
troylong45
Posts: 214
Joined: Sat Oct 10, 2015 9:17 pm

Re: How do I write for ato timer?

Post by troylong45 »

Makes sense. Mine is glitchie sometimes too. be fine then have to reset ato once then good sometimes gotta reset it multiple times o well I always get a email so not like ill for get with 1hr reminder lol
Image
Post Reply