Port switch on 0 dimming

Do you have a question on how to do something.
Ask in here.
Post Reply
tyson_mitchell_88
Posts: 80
Joined: Thu Nov 05, 2015 2:45 pm
Location: Australia

Port switch on 0 dimming

Post 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.
Last edited by tyson_mitchell_88 on Mon Jan 25, 2016 11:08 am, edited 1 time in total.
Image
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Port control

Post 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.
Roberto.
tyson_mitchell_88
Posts: 80
Joined: Thu Nov 05, 2015 2:45 pm
Location: Australia

Re: Port control

Post by tyson_mitchell_88 »

Sweet I will have a play with that. Thanks mate
Image
tyson_mitchell_88
Posts: 80
Joined: Thu Nov 05, 2015 2:45 pm
Location: Australia

Re: Port control

Post 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.
Image
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Port control

Post 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.
Roberto.
tyson_mitchell_88
Posts: 80
Joined: Thu Nov 05, 2015 2:45 pm
Location: Australia

Re: Port control

Post by tyson_mitchell_88 »

This is for another job on another port mate. Trying to set up some manual water change.
Image
rimai
Posts: 12881
Joined: Fri Mar 18, 2011 6:47 pm

Re: Port control

Post by rimai »

Well, let's move to your other thread then.
Roberto.
tyson_mitchell_88
Posts: 80
Joined: Thu Nov 05, 2015 2:45 pm
Location: Australia

Re: Port control

Post by tyson_mitchell_88 »

ok mate sorry
Image
Post Reply