cclarsencc
Guest
C
where can i see some sample logic looking for a momentary input/"maintianed on state" then the same momentary input for fot the maintained off state thanx cc
|
|Input1 Internal 1
|--] [-------------------------------------------------( )--
|
|
|
|Internal 1 Output1 Out 1
|--] [--------]/[--------------------------------------( )--
| |
|Out 1 Internal 1 |
|--] [--------]/[------|
If you ever want to alternate between 2 outputs just add another line.
Out 1 Out 2
|--]/[-------------------------------------------------( )----
Input Internal2 Internal1
-----] [-----+-----]/[---------( )---
|
| Internal2
+------------------( )---
PB CHECK LIGHT LIGHT
---| |---+---|/|-----|/|---+---(L)
| |
| | CHECK
| +---( )
|
| CHECK LIGHT LIGHT
+---|/|-----| |---+---(U)
| |
| | CHECK
| +---( )
|
| CHECK
+---------------------( )
ld ixPushButton
r_trig (* rising edge on shot *)
xor oxLamp
st oxLamp
ld idPushButtons (* double word of push button inputs *)
xor mdLastPushButtons (* changed pushbuttons *)
and idPushButtons (* rising edge pushbuttons *)
xor odLamps (* toggle lamps that have rising edge *)
st odlamps
ld idPushButtons (* update lastpushbuttons for next scan *)
st mdLastPushButtons