Max Change Statement Help?

jnarowe

New member
Below is my statement series to control the re-start of my halides, but something is not going well. I have used this statement since I first started about 2 years ago, but have recently lost two lamps when the power came back on. I know that the re-start may not be what blew the lamp, and that it could be one of the many spikes I have had recently blowing all sorts of equipment, but today I was present for a power outage and watched the restart.

All the lamps listed restarted at the same time!


If Power 000 Then LT1 OFF
Max Change 010 M Then LT1 ON
If Power 000 Then LT2 OFF
Max Change 015 M Then LT2 ON
If Power 000 Then LT3 OFF
Max Change 020 M Then LT3 ON
If Power 000 Then ALM ON

So does anyone know what is wrong with this code?
 
Max Change is not in effect during power outage, when power is turned back on, you should use the value which is part of the 'if Power' statement to control the time to hold a device in a specified state.

For example, is you want to keep the LT1 off for 10 minutes after power returns use the following:

If Power 010 Then LT1 OFF
 
I am confused (again). First of all I believe I pulled my original code out of the Neptune manual.

Second, doesn't your statement tell the lamp to turn off when the power has been on for 10 minutes?
 
It always looks backwards to me too. It seems that the programming language is not designed for us to think logically :)
We have to just learn some things even though they are different than what we would imagine them to be.

I have seen the IF FeedA 005 then SKM OFF and thought ... isn't that turning the skimmer off at 5 minutes left in the feed cycle? LOL

Nope it turns it back on when the feed timer has been off for 5 minutes.
 
doesn't your statement tell the lamp to turn off when the power has been on for 10 minutes?

The 'If Power 010 Then LT1 OFF' statement causes the following to happen:

1) If power is lost to the AC controller, turn off the LT1 timer
2) When power comes back on, leave LT1 off for an additional 010 minutes

For 'Feedx' and 'Power' the time you specify in the statement is additive to the event completing (e.g., feed cycle completing or power coming back on).

Does this make sense?
 
:lol: no. But I certainly will try it! :D

I really appreciate the input guys. I have to go back and look at my manual just for grins.

These power outages and subsequent surges are tearing up my stuff. I have lost so much equipment over the last month I have lost count.
 
Does it matter where in the program such a statement is placed. The Power command is completely new to me, and I'm glad Jonathan asked the question. By the way, I feel your pain. I have a degree in Computer Science, but the AC programming code still doesn't make any sense to me half the time. . .though strangely enough, I do see the logic in this particular statement (not that I would have gotten it right).
 
I don't belive it matters, I would have to test it to be 100% sure but I think that 'If Power' and 'If FeedX' can be placed anywhere in the program and they will take precedent over any other program statement. I think 'Max Change' can also be placed anywhere but again I would need to test to be 100% certain.
 
Well, I guessed the top, and if it does matter, it seems like that's where it would go. As for the Max Change, I do believe the manual says that placement matters. I'll just have to cut the power and see if it works. Thanks.
 
I did a quick test, moving the 'Max Change' at the beginning and ending of the program and in both cases it worked as expected.

I checked the manual and I see where it suggests that the Max Change should be at the end but I think that the manual text is being descriptive of the example than the position of the statement.
 
I just checked with Curt and he confirmed the test. Curt reports:

It doesn’t matter where the max change statement is located in the program for a particular timer name. If it is present then the ‘max change’ constraint for the timer will be used. The last max change statement is the one that is used.
 
what about the Power statement? Does the same hold true for that? Seems to me that should be right at the top or at least above any code related to the particular timer right?
 
Those can appear at any place; those conditions override normal program flow.
 
Well, I do not knowwhere I got that original MAx Change statement. Must have been on the boards because I do not see it in the manual. Changed it as suggested and it is working fine. That also solved another problem by re-reading about the max change I have improved my doser program so it won't switch on and off erratically.
 
Back
Top