|
Re: NEED HELP with Delay loop for compressor relay switch
Posted by Mike Gray at 03/12/2001 2:20 PM EST
Engineer on team HOT from Huron Valley Schools sponsored by GM Milford Proving Ground.
In Reply to: NEED HELP with Delay loop for compressor relay switch
Posted by Erik on 03/12/2001 11:54 AM EST:
Here's one way to do it. Simple, and uses only one byte.
First declare a new variable and initialize it:
compdelay var byte
compdelay=1
Set the upper limit constant
complimit con 30
Increment or decrement the variable as a function of rc_sw1 (or whatever input you use).
compdelay=compdelay+rc_sw1 - (1-rc_sw1) min 1 max
complimit
Then add a LOOKDOWN table to the main loop:
lookdown compdelay,
__________________
This message was archived from an earlier forum system. Some information may have been left out. Start new discussion in the current forums, and refer back to these threads when necessary.
|