Brett Scott wrote:
>  Wireworkers
> How can I do a comparison in that, I have a machine witch travels up
> and down and the linear transducer sends this data position
> (displacement) to my application, I have a vi witch will accept a t/f
> and will flash arrow pointing down or up . I want to wire this up to
> the rest of my app so when the displacement increases it makes the
> arrow flash accordingly, Basically have done everything except the
> bit were I make a comparison and send the T/F ,to my little custom
> indicators. Any help or example code in V6 Base would be greatly
> appreciated.

If you have only a true or false input, what happens when it's not moving?

There's a lot of ways of doing it, but essentially you have to remember the
previous displacement value, subtract it from the present one and the sign
of the answer is the direction. You then use a "less than zero" or "greater
than zero" to get your boolean direction. There are things called shift
registers that you can put in a loop to let you pass values to the next
iteration.

-- 
Dr. Craig Graham, Software Engineer
Advanced Analysis and Integration Limited, UK. http://www.aail.co.uk/




Reply via email to