Hello all, I'm writing my first ladder program and I've a rung in which a boolean variable (FLAG) and a digital output (O3.1) that should follow a digital input switch (I2.0), but it happens that the output O3.1 follows the input, but the variable FLAG toggle continuously without following the input.
I inserted a wait of 200-300 ms to avoid input debauncing, is it ok?
The rungs:
What the hell? Thanks to all
I inserted a wait of 200-300 ms to avoid input debauncing, is it ok?
The rungs:
| +-----+ +------+ |
|---||-----| TON |---||----(L)----(L)---|RETURN|-|
| I2.0 +-----+ I2.0 FLAG O3.0 +------+ |
0-300 ms
|---(U)----()------------------------------------|
FLAG O3.0
What the hell? Thanks to all
Last edited: