Adjust dosing pumps with app?

Community contributed apps
Post Reply
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Adjust dosing pumps with app?

Post by lnevo »

void Channel0PWMSlope(int MinuteOffset);
void Channel1PWMSlope(int MinuteOffset);
void Channel2PWMSlope(int MinuteOffset);
void Channel3PWMSlope(int MinuteOffset);
void Channel4PWMSlope(int MinuteOffset);
void Channel5PWMSlope(int MinuteOffset);
void Channel0PWMSlope(int PreMinuteOffset, int PostMinuteOffset);
void Channel1PWMSlope(int PreMinuteOffset, int PostMinuteOffset);
void Channel2PWMSlope(int PreMinuteOffset, int PostMinuteOffset);
void Channel3PWMSlope(int PreMinuteOffset, int PostMinuteOffset);
void Channel4PWMSlope(int PreMinuteOffset, int PostMinuteOffset);
void Channel5PWMSlope(int PreMinuteOffset, int PostMinuteOffset);

Those are the functions we have for Slope on the PWM Dimming expansion. It means you could just change what you have for Channel 0 to just the following

ReefAngel.PWM.Channel0PWMSlope();

Now since you have an offset, the default behavior is like the actinic offset which will start the lights early and end them later. Since you're just shifting your start time and end time to match you would do the following channels

ReefAngel.PWM.Channel1PWMSlope(-5,5);
ReefAngel.PWM.Channel2PWMSlope(-10,10);
ReefAngel.PWM.Channel3PWMSlope(-15,15);
ReefAngel.PWM.Channel4PWMSlope(-20,20);
ReefAngel.PWM.Channel5PWMSlope(-25,25);
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Adjust dosing pumps with app?

Post by lnevo »

jjdezek wrote:Ok do I just delete the numbers from the temp and ato?
Pretty much :)

If you look at the API search at http://www.easte.net/ra/html you'll find this when you search for StandardATO

ReefAngelClass::StandardATO(byte ATORelay, int ATOTimeout)
ReefAngelClass::StandardATO(byte Relay)

Which means we have one function that just needs the relay and one that needs the relay and the timeout. If you don't set things in the function call then it will usually get from memory :)
jjdezek
Posts: 329
Joined: Fri May 17, 2013 1:35 pm

Re: Adjust dosing pumps with app?

Post by jjdezek »

ReefAngel.PWM.SetChannel( 0, PWMSlope(8,0,20,0,5,55,180,5) );
ReefAngel.PWM.SetChannel( 1, PWMSlope(8,5,20,5,5,45,180,5) );
ReefAngel.PWM.SetChannel( 2, PWMSlope(8,10,20,10,5,55,180,5) );
ReefAngel.PWM.SetChannel( 3, PWMSlope(8,15,20,15,5,45,180,5) );
ReefAngel.PWM.SetChannel( 4, PWMSlope(8,20,20,20,5,55,180,5) );
ReefAngel.PWM.SetChannel( 5, PWMSlope(8,25,20,25,5,45,180,5) );
so for the light I would change the part in () to the -5,5 -10,10 and so on?
Image
jjdezek
Posts: 329
Joined: Fri May 17, 2013 1:35 pm

Re: Adjust dosing pumps with app?

Post by jjdezek »

ok heres what I have changed. does this look right before I load it? also how do my light know when to turn on with this code? when I went into the internal memory and set the lights for the duration it only allowed me to set it at 60 mins. does this mean my lights will only be on for an hour? or is that how long there at the top %? I didn't mess with the ato because I wasn't sure what to put in the internal memory and im not worried about needing to adjust that.

ReefAngel.DosingPumpRepeat1( Port1);
ReefAngel.DosingPumpRepeat2( Port2);
ReefAngel.StandardATO( Port3,30 );
ReefAngel.StandardHeater( Port7);
ReefAngel.PWM.Channel0PWMSlope();
ReefAngel.PWM.Channel1PWMSlope(-5,5);
ReefAngel.PWM.Channel2PWMSlope(-10,10);
ReefAngel.PWM.Channel3PWMSlope(-15,15);
ReefAngel.PWM.Channel4PWMSlope(-20,20);
ReefAngel.PWM.Channel5PWMSlope(-25,25);
Image
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Adjust dosing pumps with app?

Post by lnevo »

You can change this one and set the timeout in the ATO section.

ReefAngel.StandardATO( Port3,30 );

to

ReefAngel.StandardATO( Port3 );
jjdezek
Posts: 329
Joined: Fri May 17, 2013 1:35 pm

Re: Adjust dosing pumps with app?

Post by jjdezek »

What would I put in the internal memory for the ato?
Image
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Adjust dosing pumps with app?

Post by lnevo »

30
jjdezek
Posts: 329
Joined: Fri May 17, 2013 1:35 pm

Re: Adjust dosing pumps with app?

Post by jjdezek »

Ok got the lights and dosing codes loaded going to see how they work before I mess with ato.
Image
jjdezek
Posts: 329
Joined: Fri May 17, 2013 1:35 pm

Re: Adjust dosing pumps with app?

Post by jjdezek »

My lights aren't dimming down. Is there something I need to do to control when they ramp up and down?
Image
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Adjust dosing pumps with app?

Post by lnevo »

Is everything set in the portal / app? You also need to set the time schedule for 8:00-20:00
jjdezek
Posts: 329
Joined: Fri May 17, 2013 1:35 pm

Re: Adjust dosing pumps with app?

Post by jjdezek »

Yeah I found that after I posted. Changed it and everything seems to be working good. Thanks for all the help. Made my task easier.
Image
User avatar
lnevo
Posts: 5430
Joined: Fri Jul 20, 2012 9:42 am

Re: Adjust dosing pumps with app?

Post by lnevo »

Cool. This is a good thread. Gonna try and rename and pin it later. Great exercise to convert from hard coded config to memory based. Glad it worked out good for you.
jjdezek
Posts: 329
Joined: Fri May 17, 2013 1:35 pm

Re: Adjust dosing pumps with app?

Post by jjdezek »

That works for me hopefully others can get some good info from this.
Image
Post Reply