|
Re: solinoid problem
This bit of code ought to do what you want. It's untested, and I might have gotten something backwards, so don't trust it until you understand it.
The feedback node remembers the last time the input boolean was true. The constant "500" is in milliseconds. When the program begins, the output boolean is false. When the input boolean goes true, the difference between the current time and the remembered time becomes zero and the output goes true. When the input boolean goes false, the difference starts increasing. The output remains true until the elapsed time reaches the constant value, then stays false until the next time the input goes true.
|