LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

boolean input

Solved!
Go to solution

I would like to have both a Boolean Array of 8 bits or a numeric control formatted for Hex able to control a single line. This would give the user a choice of entering there data in by either numeric(entering value) or binary(Clicking on the Boolean control). How can I have inputs control one indicator. 

Thanks

 

Jim

0 Kudos
Message 1 of 12
(3,614 Views)

Hi,

 

check the attached.

 

hope this helps

 

 

0 Kudos
Message 2 of 12
(3,612 Views)

For the previous example you have to select the suitable representation for the numeric control

0 Kudos
Message 3 of 12
(3,610 Views)

You can fairly easily do this using an event structure (see LabVIEW help for examples of an event structure).  When either of the input types is changed, you can update the other using local variables.  How you get the data to its final location will depend on the architecture of the rest of your program.  If you are using some sort of command processor loop (separate from your UI loop), this is pretty easy, since both events will trigger the same command (set line to XXX).  If you are not, you will need to use a case structure, subVI, etc. to route the two wires to the same output.

 

Let us know if you need more help and post your code so we have more to work with.

0 Kudos
Message 4 of 12
(3,609 Views)

I attached a VI with a snippet of what I am trying to accomplish. I would like to enter in a binary format and update the numeric input then display on the indicator. I would also like to be able to enter in the hex value update the binary control and display on the indicator. I would also like to not have a selection button but have the program automatically interpret the input.

0 Kudos
Message 5 of 12
(3,598 Views)

according to my understanding, the attached is what you want

0 Kudos
Message 6 of 12
(3,594 Views)

Yes, except for the requirement of the user needing to use the selector.

 

Thanks

Jim

0 Kudos
Message 7 of 12
(3,586 Views)

After attaching the vi I noticed that ther coeros dot, so I have modified the vi by adding the conversion to U8,

 

on the other hand, you can remove the selector, and use the suitable condition from you application.

 

please if like my reply add Kudos,

 

 

0 Kudos
Message 8 of 12
(3,582 Views)

This is what I came up with to get rid of the manual toggle button. Is there  a better way to structure this?

 

Thanks

 

Jim

0 Kudos
Message 9 of 12
(3,562 Views)
Solution
Accepted by Jim_Glanz

Your stop button does not work. Create a value changed event for the stop button and put the terminal inside the event case. Wire the terminal of the stop button out to the while loop stop.

 

[Rats! Submitted too soon. You don't need an event structure inside an event structure. Create events for each control. See attached]

 

 

=====================
LabVIEW 2012


Message 10 of 12
(3,550 Views)