I am not sure I fully understand. I think the existing code should do what you want. Using the values from your example above, if we had settings of 80 and 10, then the TCC would:
- lock if below 70 (80-10)
- unlock if the load climbs to 80.
- between 70 and 80 the TCC should remain in it's current state. So if it was unlocked (load falling), it should stay unlocked, if it was locked (load rising) it should stay locked.
At least that's the way it is supposed to work. It's certainly possible that I have missed something, of course!
Ultimately, though, there will always be conditions under which the operation is somewhat unstable (due to the on-off nature of the TCC). That's why we have the time hysteresis that prevents rapidly cycling.
The indicator colors are set in a line in the INI like this:
Code: Select all
indicator = { lock_TCC }, "TCC Off", "TCC Applied", green, black, green, blue;
Code: Select all
indicator = { lock_TCC }, "TCC Off", "TCC Applied", green, black, red, white;
(Note that 'TCC applied' is shown whenever the PWM isn't zero.)
Lance.