PDA

View Full Version : Please check my programming for the AC III Pro Thank you!


Urchinhead
05/15/2008, 06:25 PM
Hi folks-

Just picked up the AC III Pro and want to make sure I am doing things right before I set it up. I ran this through Kentaro's(?) simulator with no errors but wanted a sanity check by other coders too.

I will be monitoring pH, ORP, Conductivity, and acting on Temp as well as various sensor readings. I will also use it to handle a somewhat automation of water changes.

Thanks for taking the time to look and make recommendations on how to do things better/different.

FH2

SKM$-A1 // Skimmer
RTP$-A2 // Return Pump
RP4$-A3 // Right Tunze 6045
UVS$-A4 // UV Sterilizer and power head
HTR$-A5 // Heater
LP4$-A6 // Left Tunze 6045
LP2$-A7 // Left Tunze 6025 (I have another not wired in on a UPS in case of power failure so at least there is water movement)
SDP$-A8 // Sump Drain Pump for water changes and high water issues
MHL$-A9 // Metal Halide Lights
T5L$-A10 // T5 Lights
FAN$-A11 // Cooling Fan
ATO$-A12 // JBJ ATO system I use it for ATO and free up two sensor ports on the Pro
ALR$-D0 // Alarm


// Set default state on all equipment
if Time > 00:00 Then SKM ON
if Time > 00:00 Then RTP ON
if Time > 00:00 Then RP4 ON
if Time > 00:00 Then UVS ON
if Time > 00:00 Then HTR ON
if Time > 00:00 Then LP4 ON
if Time > 00:00 Then LP2 ON
if Time > 00:00 Then SDP OFF
if Time > 00:00 Then MHL ON
if Time > 00:00 Then T5L ON
if Time > 00:00 Then FAN OFF
if Time > 00:00 Then ATO ON
if Time > 00:00 Then ALR OFF

// Normal Light Cycle
if Time > 08:59 Then T5L ON
if Time > 20:59 Then T5L OFF
if Time > 09:59 Then MHL ON
if Time > 12:59 Then MHL OFF
if Time > 15:59 Then MHL ON
if Time > 20:45 Then MHL OFF

// Temp Probe failure check
if Temp < 72.0 Then HTR OFF
if Temp < 72.0 Then UVS OFF
if Temp < 72.0 Then MHL OFF
if Temp < 72.0 Then FAN OFF
if Temp < 72.0 Then ALR ON
if Temp > 85.0 Then HTR OFF
if Temp > 85.0 Then UVS OFF
if Temp > 85.0 Then MHL OFF
if Temp > 85.0 Then FAN OFF
if Temp > 85.0 Then ALR ON

// Tank heat goes to high then turn on fan followed by shutting lights off
if Temp > 82.0 Then HTR OFF
if Temp > 78.0 Then FAN ON
if temp > 82.0 Then UVS OFF
if Temp > 80.0 Then MHL OFF
Max Change 015 M Then MHL OFF
if Temp > 81.0 Then T5L OFF
Max Change 015 M Then T5L OFF

// Backup high and low water sensors to make sure that ATO sensors are not stuck open
if Switch1 Closed Then ATO OFF
if Switch1 Closed Then SDP ON
Max Change 001 M Then SDP OFF
if Switch2 open then SDP OFF
if Switch2 open then ATO ON
if Switch2 open then ALR ON

// High water sensor in my emergency pump container and auto water change container to make sure I don't overflow
if Switch3 Closed Then SDP OFF
if Switch3 Closed Then ALR ON

// Feeding the tank. All stuff off for 20 minutes
if FeedA 000 Then RP4 OFF
if FeedA 000 Then LP4 OFF
if FeedA 000 Then LP2 OFF
if FeedA 000 Then SKM OFF
if FeedA 000 Then RTP OFF

// Tank maint and water change. All stuff off for 30 minutes or until canceled
if FeedB 000 Then SKM OFF
if FeedB 000 Then ATO OFF
if FeedB 000 Then RP4 OFF
if FeedB 000 Then LP4 OFF
if FeedB 000 Then LP2 OFF
if FeedB 000 Then SDP ON
Max Change 005 M Then SDP OFF // Pump's out N amount of water then shuts off
if FeedB 000 Then UVS OFF
if FeedB 003 Then RTP OFF // Allows water from tank to continue to enter the sump

clp
05/16/2008, 11:52 AM
You probably don't want default on conditions for any of the devices, which are controlled by a high and low temperature setpoint. Doing so will effectively eliminate the hystersis between the two setpoints.

Urchinhead
05/16/2008, 02:57 PM
Thank you sir! Any chance of being able to stack the Max Change setting? For example on the backup high and low water sensor where I turn on the SDP pump I would like to have the pump run for 2 minutes and then have it wait for 20 minutes before running again.

Urchinhead
05/20/2008, 01:51 PM
I made some modifications to the program (see below) to take out the default conditions issue raised by clp (thank you) and now I am having a problem with the ALR condition with Switch1. It doesn't trip when Switch1 is set to active using the simulator... Anyone? TIA

FH2

if Time > 00:00 Then SKM ON
if Time > 00:00 Then RTP ON
if Time > 00:00 Then RP4 ON
if Time > 00:00 Then UVS ON
if Time > 00:00 Then HTR ON
if Time > 00:00 Then LP4 ON
if Time > 00:00 Then LP2 ON

if Time > 08:59 Then T5L ON
if Time > 20:59 Then T5L OFF
if Time > 09:59 Then MHL ON
if Time > 12:59 Then MHL OFF
if Time > 15:59 Then MHL ON
if Time > 20:45 Then MHL OFF

if Temp < 72.0 Then HTR OFF
if Temp < 72.0 Then UVS OFF
if Temp < 72.0 Then MHL OFF
if Temp < 72.0 Then FAN OFF
if Temp < 72.0 Then ALR ON
if Temp > 85.0 Then HTR OFF
if Temp > 85.0 Then UVS OFF
if Temp > 85.0 Then MHL OFF
if Temp > 85.0 Then FAN OFF
if Temp > 85.0 Then ALR ON

if Temp > 78.0 Then FAN ON
if Temp > 80.0 Then MHL OFF
Max Change 030 M Then MHL ON
if Temp > 81.0 Then T5L OFF
Max Change 030 M Then T5L ON
if Temp > 82.0 Then HTR OFF
if temp > 82.0 Then UVS OFF

if Switch1 Closed Then ALR ON
if Switch1 Closed Then ATO OFF
if Switch1 Closed Then SDP ON
Max Change 001 M Then SDP OFF

if Switch1 Open Then ALR OFF
if Switch1 Open Then ATO ON
if Switch1 Open Then SDP OFF

if Switch2 Open then SDP OFF
if Switch2 Open then ATO ON
if Switch2 Open Then RTP OFF
Max Change 001 M Then RTP ON
if Switch2 Open then ALR ON

if Switch2 Closed Then ALR OFF

if Switch3 Closed Then SDP OFF
if Switch3 Closed Then ALR ON


if FeedA 000 Then RP4 OFF
if FeedA 000 Then LP4 OFF
if FeedA 000 Then LP2 OFF
if FeedA 000 Then SKM OFF
if FeedA 000 Then RTP OFF


if FeedB 000 Then SKM OFF
if FeedB 000 Then ATO OFF
if FeedB 000 Then RP4 OFF
if FeedB 000 Then LP4 OFF
if FeedB 000 Then LP2 OFF
if FeedB 000 Then SDP ON
Max Change 005 M Then SDP OFF
if FeedB 000 Then UVS OFF
if FeedB 003 Then RTP OFF

kenargo
05/20/2008, 04:51 PM
It looks like ALR has some conditions which may be fighting each other; I see the following ALR statements:

if Temp > 85.0 Then ALR ON
if Switch1 Closed Then ALR ON
if Switch2 Open then ALR ON
if Switch2 Closed Then ALR OFF
if Switch3 Closed Then ALR ON

Urchinhead
05/21/2008, 10:26 AM
Ken-

Thank you!

Got it fixed by pulling the conflicting off statement out and setting the ALR default state to OFF via: If Time > 00:00 Then ALR OFF

Will this set up any potential problems though?

Also is it possible to stack the Max Change setting? In other words I want something to go on for 1 minute followed by being off for 10 minutes.

Lastly is there a FAQ on undocumented programming code for the unit?

Thanks!

FH2

clp
05/21/2008, 10:39 AM
No, I don't see a problem if your alarm statements are:

If Time > 00:00 Then ALR OFF
if Switch1 Closed Then ALR ON
if Switch2 Open then ALR ON
if Switch3 Closed Then ALR ON
if Temp < 72.0 Then ALR ON
if Temp > 85.0 Then ALR ON

You can use the OSC with the paramters 001/010 to limit the on/off duty cycle of some device.

All of the commands are documented in the owner's manual. What is not documented is all the possible combinations of code to do nonstandard control operations. For that type of info it is usually best to search RC, post a question, or send us an email.

Curt

Urchinhead
05/21/2008, 10:44 AM
Curt-

Thank you! That OSC looks perfect!

I was just searching the forum for some things but am not having much luck so I am doing a brute force from the beginning read back. ;>

So what I would like to know is how do I turn the heater on and still have it check for bad temp probe? In other words I would like the heater on if the temp in the tank is between 76 and 81 degrees but if it goes below or above those values to turn off. I don't see a way to do a <> or If Then Else so how would I go about doing that?

clp
05/21/2008, 10:48 AM
How about:

If Temp < 78.0 Then HET ON
If Temp > 79.0 Then HET OFF
If Temp < 76.0 Then HET OFF <- probe failure safe guard
If Temp > 81.0 Then HET OFF <- probe failure safe guard

I would personally expand the probe failure numbers to something like 72 and 84. Also I'd have email alarms, etc. to let you know something is wrong.

Curt

Urchinhead
05/21/2008, 10:57 AM
Thank you again Curt!

So something like this...

UVS is UV Sterilizer btw.

if Temp < 72.0 Then HTR OFF
if Temp < 72.0 Then UVS OFF
if Temp < 72.0 Then MHL OFF
if Temp < 72.0 Then FAN OFF
if Temp < 72.0 Then ALR ON
if Temp > 85.0 Then HTR OFF
if Temp > 85.0 Then UVS OFF
if Temp > 85.0 Then MHL OFF
if Temp > 85.0 Then FAN OFF
if Temp > 85.0 Then ALR ON

if Temp < 81 Then HTR ON
if Temp < 81 Then UVS ON
if Temp > 78.0 Then FAN ON
if Temp > 80.0 Then MHL OFF
Max Change 030 M Then MHL ON
if Temp > 81.0 Then T5L OFF
Max Change 030 M Then T5L ON
if Temp > 82.0 Then HTR OFF
if temp > 82.0 Then UVS OFF