Documentation

Would you like to help?
Share your walkthrough tutorial with others

Posts: 98
Joined: Tue Nov 05, 2013 12:50 am
PostPosted: Fri Feb 20, 2015 5:54 am
And another,

Rope leak detector:

{

ReefAngel.LeakShutoffPorts = 0; // Turn off port if leaks are detected

}
I assume thats for the standard relay box.
If we use an expansion relay?

ReefAngel.LeakShutoffPorts = Box1_Port1;//
and on both?
ReefAngel.LeakShutoffPorts = 0,Box1_Port1;//
Believe it or not.... I can ask even stupider questions than this one.
User avatar
Posts: 1426
Joined: Fri Mar 29, 2013 3:51 pm
Location: Oklahoma City
PostPosted: Fri Feb 20, 2015 7:03 am
Roberto, I found the login button. Thanks. :D

How does one create a new page?

--Colin
User avatar
Posts: 2746
Joined: Fri Mar 18, 2011 6:20 pm
Location: Illinois
PostPosted: Fri Feb 20, 2015 7:47 am
cosmith71 wrote:Roberto, I found the login button. Thanks. :D

How does one create a new page?

--Colin

you need to edit a page and create a link to the new page. then it will allow you to create the new page.


Sent from my iPad mini

Posts: 12288
Joined: Fri Mar 18, 2011 6:47 pm
PostPosted: Fri Feb 20, 2015 9:33 am
I/O Expansion Module

It has 6 channels. Channel 0 through 5
We can check for status of each channel by using ReefAngel.IO.GetChannel( channel ), where channel is a value from 0 to 5.

Example

Let's check if the float switch connected to channel 3 of I/O Expansion module is floating and if it is, turn on port 1 of the relay box:
Code: Select all
if (ReefAngel.IO.GetChannel(3))
  ReefAngel.Relay.On( Port1);
else
  ReefAngel.Relay.Off( Port1);


Power Control Expansion Module
It has 8 ports. It works just like a relay expansion module. The ports are referenced the same way.
Relay and Power Control Expansion modules can be mix/matched and up to 8 can be connected to the system.
Each one needs its own ID, which can be set by changing the dip switch inside the module. The IDs can be set from 1 to 8.
Each port can be referenced using this ID. So, for example you want to reference port 3 of the box ID 1, you would use Box1_Port3.
To turn on/off a port, you can use ReefAngel.Relay.On( port ) and ReefAngel.Relay.Off( port ), where port is the name of the port depending on the ID you have set explained above.

Example

Let's check if the float switch connected to ATO Low port is floating (not active) and if it is, turn on port 3 of the Power Control Expansion module set to ID 1
Code: Select all
if (!ReefAngel.LowATO.IsActive())
  ReefAngel.Relay.On( Box1_Port3);
else
  ReefAngel.Relay.Off( Box1_Port3);
Roberto.

Posts: 12288
Joined: Fri Mar 18, 2011 6:47 pm
PostPosted: Fri Feb 20, 2015 9:45 am
You can set each port, on the main relay box or on any expansion module to be turn on/off depending on which mode or special conditions.
We have 2 modes: feeding and water change and 3 special modes: lights on, overheat and leak detection.

Example

Let's turn port 1 and port 7 of the main relay box on feeding mode:
Code: Select all
    // Ports toggled in Feeding Mode
    ReefAngel.FeedingModePorts = Port1Bit | Port7Bit;


Let's turn port 2 of the main relay box and port 5 of relay expansion box ID 1 on feeding mode:
Note: The ID is actually decremented by 1 when you reference them in this code.
Code: Select all
    // Ports toggled in Feeding Mode
    ReefAngel.FeedingModePorts = Port2Bit;
    ReefAngel.FeedingModePortsE[0] = Port5Bit;


Other modes and special conditions you can set:

Code: Select all
    // Ports toggled in Water Change Mode
    ReefAngel.WaterChangePorts = 0;
    ReefAngel.WaterChangePortsE[0] = 0;
    // Ports toggled when Lights On / Off menu entry selected
    ReefAngel.LightsOnPorts = 0;
    ReefAngel.LightsOnPortsE[0] = 0;
    // Ports turned off when Overheat temperature exceeded
    ReefAngel.OverheatShutoffPorts = 0;
    ReefAngel.OverheatShutoffPortsE[0] = 0;
    // Ports turned off when Leak is detected
    ReefAngel.LeakShutoffPorts = 0;
    ReefAngel.LeakShutoffPortsE[0] = 0;

Roberto.

Posts: 86
Joined: Sat Jan 04, 2014 10:26 am
PostPosted: Fri Feb 20, 2015 2:13 pm
You can also set a delay on ports turning on after feeding or water change

Code: Select all
ReefAngel.Relay.DelayedOn(Port7,1);


This is placed in the loop. (port,timeinminutes)


I use it to delay starting my in sump skimmer
Image

Posts: 98
Joined: Tue Nov 05, 2013 12:50 am
PostPosted: Sun Feb 22, 2015 1:34 pm
Thanks gents.

A big penny dropped with the power expander being addressed the same as a relay box.
I'll double check the layout wrt the modes, and I prefer having it all in your guys words.

WRT the delayed ports etc.
I was thinking of setting up a Wizard page.
In that page have list of those port modes etc. That you can choose for the relay boxes.
Believe it or not.... I can ask even stupider questions than this one.

Posts: 98
Joined: Tue Nov 05, 2013 12:50 am
PostPosted: Sun Mar 01, 2015 3:03 am
Work is getting the better of me. I'll get back onto it ASAP
Believe it or not.... I can ask even stupider questions than this one.

Posts: 98
Joined: Tue Nov 05, 2013 12:50 am
PostPosted: Wed Mar 11, 2015 7:35 am
Hello,

I got time again today. It's starting to flesh out but I think it still makes for easy navigation.

http://reefangelcontrollerdocuments.wik ... ments_Wiki

I havent added the last bit of code you supplied to me but hopefully I'll get that in tomorrow.

Cheers
Believe it or not.... I can ask even stupider questions than this one.
User avatar
Posts: 5361
Joined: Fri Jul 20, 2012 9:42 am
PostPosted: Wed Mar 11, 2015 12:33 pm
Andrew, it would be great if there were a link of To Do items in the wiki. Could you create a list of topics that still need to be covered so someone who wants to contribute like myself can see where their efforts are best spent :)
PreviousNext

Return to Tutorials

Who is online

Users browsing this forum: No registered users and 1 guest

cron