05-03-2011 05:16 AM
Hi All,
I have been searching and I can't find a simular solution to this issue, so I hope somone can help me. It is probably pretty simple, but as I am new to Labview, it takes some time for me to get used to the programming language.
I have a custom built rotating selector valve with 16 positions. The valve has 5 inductive sensors mounted to a rotating plate with holes drilled for positions.
With 4 sensors there is a binary code created for the 16 positions.
v1 v2 v3 v4
1 1 1 1 pos 1
0 1 1 1 pos 2
1 0 1 1 pos 3
0 0 1 1 pos 4
1 1 0 1 pos 5
0 1 0 1 pos 6
1 0 0 1 pos 7
0 0 0 1 pos 8
and so on..
The fifth sensor is (1) when the valve is rotating and (0) when the valve is in a position.
What I am building with LV is a monitoring system for this valve.
How can I use the 5 digital inputs(simulated with boolean switch) into labview and convert it to a numeric indicator for the position of the valve?
I hope someone can guide me in the right direction with this issue.
Thank you.
Solved! Go to Solution.
05-03-2011 05:21 AM
Hi LeifJoh,
do you know the function "boolean array to number"?
Is this what you need?
Mike
05-03-2011 05:45 AM - edited 05-03-2011 05:48 AM
here is a solution
put it together into in an array, invert it, convert it to a number, add 1, DONE 😉
the red dot could be avoided, but that is your homework now 🙂
05-03-2011 09:55 AM
Thanks Henrik and Mike. Very simple problem but, it takes some time getting used to the block diagram for me 🙂