LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Binary word control?

I've come across this more than one time, so I thought I'd ask if there was a simple way to do it.
 
I have old test software that used binary word inputs in the procedures to access memory registers, input control words, etc. for processor based operational tests.  The interface of the old system was something like this:
 
REG:   1|0|1|0|1|1|1|0|1|1|1|1|0|0|0|0
VAL:   0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|1
 
Where the register number was input in order to obtain/control the values in those registers.
 
I've been porting over to LabView, which I should say is turning out to be more of a re-write, since LabView is so easy to get flow going from scratch.  When I come across this however, I can't see how I can have the user navigate through the bits to toggle say, bit2 of the value in order to observe some action taking place in the UUT.
 
Would the best alternative be a custom control that converts decimal 1 and 0 enums to binary word data?  Or is there an easier way to do this...?
 
Thanks in advance!
 
J Sines

--------------------

"I have made no decision...
My main concern now is to open as many options to the future as I can."
-- from Stephen Baxter's "The Time Ships"
0 Kudos
Message 1 of 2
(3,013 Views)
You have several options.
  • You could for example make a lenght 16 boolean array, then use "boolean array to number" to form the U16 number for use in the code. (depending on how you look at it, you might want to reverse the array to get the lowest bit on the right). For display of the result, just reverse the process and create a boolean array indicator.
  • You could just create a plain U16 numeric control, but set the format to binary, width 16, show leading zeroes.
  • etc.

See if this helps. 🙂

0 Kudos
Message 2 of 2
(3,007 Views)