Page 1 of 1
Port switch on 0 dimming
Posted: Sun Jan 24, 2016 2:31 pm
by tyson_mitchell_88
Hi all
Wondering if there is a way to set a port so it will activate according to lights. So when a certain channel is above 0 a certain port is activated.
Re: Port control
Posted: Sun Jan 24, 2016 4:40 pm
by rimai
Do you mean a dimming channel?
If so, something like this:
Code: Select all
if (ReefAngel.PWM.GetActinicValue()>0)
ReefAngel.Relay.On(Port1);
else
ReefAngel.Relay.Off(Port1);
Or a simplified version:
Code: Select all
ReefAngel.Relay.Set(Port1,ReefAngel.PWM.GetActinicValue()>0);
If not the actinic channel, change it to GetDaylightValue() for daylight or GetChannelValue(0) for channel 0 of dimming expansion module.
Re: Port control
Posted: Sun Jan 24, 2016 4:48 pm
by tyson_mitchell_88
Sweet I will have a play with that. Thanks mate
Re: Port control
Posted: Sun Jan 24, 2016 10:50 pm
by tyson_mitchell_88
Worked well thanks Roberto.
How would I set up a port so it's usually off, though if I manually activate it, through portal or app, it works to ATOHigh.
Re: Port control
Posted: Mon Jan 25, 2016 7:51 am
by rimai
What do you mean ATOHigh.
That code has nothing to do with ATOHigh.
It will be off when Actinic channel is 0 and on for anything greater than 0. That's that the request was for.
Not sure what you mean as usually off.
Re: Port control
Posted: Mon Jan 25, 2016 10:15 am
by tyson_mitchell_88
This is for another job on another port mate. Trying to set up some manual water change.
Re: Port control
Posted: Mon Jan 25, 2016 10:18 am
by rimai
Well, let's move to your other thread then.
Re: Port control
Posted: Mon Jan 25, 2016 10:40 am
by tyson_mitchell_88
ok mate sorry