PDA

View Full Version : Are more robust programming statements on the horizon?


collins
06/13/2006, 06:52 PM
The AC script language is pretty good, but I would love to see multiple condition statements to determine ON/OFF states.

Curt, I realize that you likely understand what I am asking about, but just in case…

If( Sun 000/000 && Temp < RT+2.0 ) Then LT1 ON

Any chance that a simple scripting language addition such as this being added to the library?

dhoch
06/13/2006, 07:33 PM
You can allready do this... Yeah it takes more than one statement but so?

I don't see how this would enchance anything?

Dave

collins
06/13/2006, 07:43 PM
How do you actually do this dhoch? I am interested in my MH lights staying off when the temp is too high, even if the time indicates they should be on.

Currently I use a Max Change 030 M statement to allow the lights to cool before re-firing, but when the time elapses, they turn on based on the Time then shut off immediately if the temp is still too high. I would like to avoid the cycling altogether.

dhoch
06/13/2006, 07:50 PM
I don't see why if you didn't do this:

If( Sun 000/000) Then LT1 ON
If (Temp > RT+2.0) Then LT1 OFF

This should make it on when sun, but it will turn off if the temp > RT + 2.0

Dave

dhoch
06/13/2006, 07:52 PM
For example: (from my program)

If Sun -030/030 Then DCT OFF
If pH > 08.40 Then DCT OFF

DCT is my dosing controller for my kalk drip... Basically it turns off during the sun cycle (therfore dosing at night), but if the pH is to high (above 8.4) I turn the dosing controller off at that point as well.

Dave

collins
06/13/2006, 07:55 PM
These are my script lines for the MH lights

If Sun 120/-120 Then LTK ON ; 13K HQI MH lighting ON 2 hours after sunrise and OFF 2 hours before sunset
If Temp > RT+3.0 Then LTK OFF ; 13K HQI MH lighting OFF if tank temp exceeds 2.0F above seasonal temp (RT) of the day
Max Change 030 M Then LTK OFF ; allow 30 minutes to pass before retesting condition – allow cooling of LTK

the problem is that the you get a quick cycle ON and then OFF

dhoch
06/13/2006, 08:06 PM
The quick cycle happen everytime the condition is checked (i.e. every 30 mins) or only when the 2 hours after sunrise happens?

Dave

collins
06/13/2006, 08:13 PM
After the 30 minute max change elapses and the time indicates that the lights should be on, they turn on. If the temperature is still too high, they will immediately turn off (and the max change timer starts again).

If a multiple condition statement was available, then the cycling would not occur because the lights would remain off until suitable conditions exist.

dhoch
06/14/2006, 03:09 AM
I see interesting... Curt any comments?

clp
06/14/2006, 10:49 AM
There isn't really any benefit in having multiple conditionals in one program statement. Carefully ordering the statements, and the addition of the 'Timer' statement allows for pretty much any type of arbitrary control to be configured.

In this code sample:
If Sun 120/-120 Then LTK ON
If Temp > RT+3.0 Then LTK OFF
Max Change 030 M Then LTK OFF

There will be no momentary turn on of the light when the max change timer has expired. If the temperature is still above RT + 3.0 then LTK will remain off. The only way a momentary turn on would occur is if the max change timer had expired, the light was off and the temperature was just below RT + 3.0, and then the temperature immediately went above RT + 3.0 when the light turned on.
The AquaController evaluates all the program statements associated with a particular timer name from top to bottom. At the completion of the evaluation phase if the state of the timer has changed from on to off or off to on, then a command is sent out. Using this evaluation method the glitch mentioned isn't possible.

Curt

dhoch
06/14/2006, 10:54 AM
Curt,

Thats why I thought... But that's not what he was seeing and or saying...

Dave

clsanchez77
06/14/2006, 11:09 AM
If( Sun 000/000 && Temp < RT+2.0 ) Then LT1 ON

I have three ideas on this:

1.Maybe was just a typo and thus a stupid suggestion, but collins, do you have the comparator sign backwards such that the MH turns off when the tank temperature is below the seasonal temperature plus two degrees? In other words, the tank has to b warmer than the 'tank temp + 2' in order to remain on?

2.Another look at this is what if the problem is with the tank temperatures and not the programming statement.

For example, given:
If Sun 000/000 Then LT1 ON
If Temp > RT+2.0 Then LT1 OFF
Max Change 030 M Then LT1 OFF

Now as log as the tank temp remains below RT+2.0, the light will turn on during the solar period. As long as the tank temp remains above RT+2.0, the light will remain off.

If during the solar period, the tank temp were to rise above RT+2.0, the light would then turn off for 30 minutes.

But what if the tank has a high temp problem and during the 30 minutes LT1 off period, the tank temp only drops to RT+2.0 degrees, passing the catch statement, so that once the MH light turns on, the tank temp rises to RT+2.1, turing off the MH1 light off pretty quickly.

3. Finally, what if the problem does not exist with the temp statement at all, but is rather a MH ballast noise issue such that it is turning itslef off. How are you controlling the ballast, DC unit or X-10 module?

Remove the temp line and Max Change line and see if the MH still turns off as it is currently doing.

I have no idea if any of these suggestions will help, but good luck.

Chris

collins
06/14/2006, 02:13 PM
<a href=showthread.php?s=&postid=7559170#post7559170 target=_blank>Originally posted</a> by clsanchez77
1.Maybe was just a typo ...
3. ...How are you controlling the ballast, DC unit or X-10 module?



1) It was a typo in the post only. my actual script lines were posted later

3) I have the lights on a DC4HD

I used to have my CO2 solenoid setup in a similar fashion where the default state was on and low PH would shut it down for 10 minutes. I can hear the solenoid toggle so I do know that it would cycle on and then turn off immediately after with the PH remaining below acceptable levels the entire time.

Curt... if you are saying that this shouldn't happen, I will test this more thoroughly and let you know what my findings are.

clp
06/15/2006, 06:01 PM
Situation #2 in clsanchez77 post above can happen, but as long as the temp remains above RT + 2.0 then the light will not ever turn back on. What you discribe should not happen.

Curt

collins
06/17/2006, 12:28 PM
Curt,

I'm not sure what was causing my CO2 solenoid to cycle, but after testing using a light that would not cook with toggling off and on, I have verified that what you said, was of course correct.

Does this mean that the entire script is continuosly read and the last TRUE statement is executed?

clp
06/19/2006, 11:03 AM
Yes, the entire script is evaluated, and then if necessary only the last True statement's on/off command is sent.

Curt

collins
06/19/2006, 11:18 AM
Thanks Curt, that clears things up