LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

EXT Display Format LabVIEW bug

Up for grab, this easy bug (tested in LV 2012.0f3 (32 bit) on Windows XP)

 

From a clean start, create a new VI, drop a "Power of x" function and create control for all input and output. Set the representation of the controls/indicators to be "Extended" (I do that for "Y" first and then the other one are automatically created with the corect type). You get this:

 

ScreenHunter_003.jpg

 

On the FP, enter 300 for Y and 0.01 for X and run the VI (you expect a result of zero).

Just for fun, set the Display Format of the output (x^y) to Scientific just to check whether there is no hidden digit somewhere.

Well, surprise!

Here is what I get first:

 

ScreenHunter_001.jpg

 

Then, after pressing OK:

 

ScreenHunter_004.jpg

 

and after Cancel:

 

ScreenHunter_001.jpg

 

The VI is password protected, so I ended up my little experiment here.

Note that if you set the Display Format of x^y BEFORE you run the VI, there is no problem at all. However, once you have run it once, the dialog will pop-up at all times. This does NOT prevent you from changing the format, but it is annoying at the very least...

 

I tried it with Exponential as well, trying a value of X = -1000 (you expect again a result of zero), to the same effect. It sounds like an underflow of some sort.

There is no such problems with type Double.

Comments welcome.

 

 

0 Kudos
Message 1 of 9
(4,411 Views)

@X. wrote:

Comments welcome.


Ignoring for a moment what the actual problem is, I think the sequence of events is fairly simple:

 

  1. You open the property page and try to set the format.
  2. The property VI calls that subVI with the relevant data.
  3. In the subVI there is a format into string primitive with an unwired error output (or it's unwired downstream).
  4. There's an error and the VI has auto error handling enabled (or possibly not and this is an internal dialog, since the AEH dialog is different), so it tries to show you where the error happened.
  5. The VI is locked, so you get a PW dialog.

 


___________________
Try to take over the world!
0 Kudos
Message 2 of 9
(4,394 Views)

You're right that this is an internal dialog from Format Into String, which had recently been identified as CAR 339791 (filed against LabVIEW 2010). The property page VI already has auto error handling disabled, and wiring the error output will not suppress the dialog either.

 

The root cause seems to have to do with the EXT number being outside the precision of a DBL. Since the indicator string displays are limited to DBL precision, we get a funky wide display format that looks like zero for the very small nonzero result.

 

I see the same behavior in 2011, and assume it existed at least as far back as 2010.

0 Kudos
Message 3 of 9
(4,371 Views)

Actually I think the fix for that CAR may not cover this behavior, so I created CAR 379095. One workaround is to convert to DBL before any indicators. That will avoid those corner cases and still give you as much display precision as you would have otherwise.

 

Jim

Message 4 of 9
(4,364 Views)

Is this EXT control/indicator precision limited to that of double documented anywhere?

0 Kudos
Message 5 of 9
(4,360 Views)

Thanks for the link. I remember this discussion now. However, if I understand it correctly, this "feature" is NOT documented anywhere in the Help. Hence my question (to NI). Mind you, some people care!

0 Kudos
Message 7 of 9
(4,352 Views)

Note added: this problem also arises when trying to change the format of an EXT CONSTANT.

If you create an EXT constant and type in, say 1E-400, you will end up with a zillion zeros. Try formatting the constant and you will get through these hoops. And eventually end up with the same meaningless result of 0 anyway, since the above value goes below the minimum DBL value.

Oh well...

0 Kudos
Message 8 of 9
(4,314 Views)

CARs 379095 and 339791 discussed in this thread has been fixed in LabVIEW 2013. For a more complete list of bugs fixed in LabVIEW 2013, check the LabVIEW 2013 Bug Fixes. You can download an evaluation copy of LabVIEW 2013 at http://www.ni.com/trylabview/ or if you have an earlier version of LabVIEW installed and an active SSP subscription, you will be able to download the latest version of LabVIEW through NI Update Service.

 

Jeff Peacock

 

Product Support Engineer | LabVIEW R&D | National Instruments

Message 9 of 9
(4,210 Views)