PDA

View Full Version : Program Review


bconn
08/20/2008, 07:39 PM
Just moving this program into production and I wanted to get some feedback.

Any suggestions on reducing lines of code?

Any other, perhaps better way to accomplish?

Thank in advance,
bconn

kenargo
08/20/2008, 08:08 PM
Just a few ideas.....

You could use an OSC for the FRF like this:

OSC 240/15 ON/OFF Then FRF ON

It will turn the FRF on for 15 minutes every 4 hours (unless you want the specific time of day as you have programmed) (save .

Since many light timers are on/off at the same time have you thought about using the state of 1 to control the others like this (and save 20 lines of code):

If Time > 12:30 Then T51 ON
If Time > 21:00 Then T51 OFF
If Temp > 82.0 Then T51 OFF
Max Change 030 M Then T51 OFF

If Time > 00:00 Then T52 OFF
If Time > 00:00 Then T53 OFF
If Time > 00:00 Then TL1 OFF
If Time > 00:00 Then TL2 OFF

If Timer T51 = On Then T52 ON
If Timer T51 = On Then T53 ON
If Timer T51 = On Then TL1 ON
If Timer T51 = On Then TL2 ON

bconn
08/20/2008, 09:44 PM
Thank you.