12-10-2012 03:42 AM
Hi Sir/Madam,
Does anyone know how to write a increment loop counter base on a boolean input?
Basically I would like to track the number of transition of a boolean start from 0 to 3. Once it reaches 3 I would like the counter to reset to 0 again.
Your help is much appreciated. thanks in advance.
Regards,
Alfred Tan
12-10-2012 04:48 AM - edited 12-10-2012 04:49 AM
12-11-2012 02:55 AM
GerdW,
You are totally ROCK!!!! thanks for sharing.
By the way, why are you using the shift register before the Xor gate?
I connect my Boolean to the Boolean converter and follow by the + gate. It still work fine.
Please advise. Just want to learn more.
Thanks.
Regards,
Alfred Tan
12-11-2012 03:00 AM
Hi Alfred,
you said you wanted to track transitions of the boolean - but not the state of the boolean itself.
To detect transitions you can use a feedback node with an XOR. Or use the corresponding point-by-point function...