LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can I pass a string value to a double numeric indicator?

Solved!
Go to solution

I am doing a sequence of tests and saving each tests datas. When I bypass one of the tests, I need the string value 'BP' to get saved ( in the double numeric indicator ) for that particular test. Is there any possible way to do that?

0 Kudos
Message 1 of 8
(3,957 Views)

When I have had to do this before I have placed a string control over the top of the numeric control, same size & shape, and made it invisible. When you bypass that test, just set the string to visible.

0 Kudos
Message 2 of 8
(3,947 Views)
Solution
Accepted by topic author Rashme_SR

Maybe just use 'NaN' instead of 'BP'. You can store NaN in the numeric indicator.

Message 3 of 8
(3,943 Views)
Or change the numeric indicator to a string.
0 Kudos
Message 4 of 8
(3,927 Views)

The numeric indicator works like a "Format into String" function with a hardwired numeric input.

So it really is a string indicator in the end.

You can use the "Format String" property node to modify how the numeric is displayed.

(Also available in Display Format ... --> Advanced Edit Mode.)

I don't think you can avoid displaying the numeric value, but you can add text.

 

So you could, for example, display: "0  BP".

Format string normal = "%#.2f";
Format string adding "  BP" text  = "%#.2f  BP";

 

Some of the suggestions by others on this thread might be easier to manage and give a better result.

(You have to swap Format Strings around and still have the numeric displayed.)

 

 

*Note however, that this technique can be used to do interesting things like add Units to your numeric indicator.*

 

steve

----------------------------------------------------------------------------------------------------------------
Founding (and only) member of AUITA - the Anti UI Thread Association.
----------------------------------------------------------------------------------------------------------------
0 Kudos
Message 5 of 8
(3,909 Views)

@stevem181 wrote:

I don't think you can avoid displaying the numeric value, but you can add text.

 


Here is an old discussion about the possibilities. Pretty flexible.

0 Kudos
Message 6 of 8
(2,632 Views)

What am I missing here? Why did the 5 year old thread get resurrected?

0 Kudos
Message 7 of 8
(2,601 Views)

@johntrich1971 wrote:

What am I missing here? Why did the 5 year old thread get resurrected?


Hard to tell, but it showed as new and unread here. Maybe it got bumped by a spam posts that got deleted soon after ... 😉

0 Kudos
Message 8 of 8
(2,593 Views)