LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

displaying extended numbers in LV 6i

Highlighted
Hi, I am using LV 6i on Mac and trying some numerical modelling of a physical process. I tried using extended numerical representation and it works, but there is an anoying thing. When I enter "0.0" as an extended numerical constant, the program treats it as "0.0", but the displayed number in constant'sa box is something different, for example "0.1". The same happens with other extended numbers in constants, controls and indicators. Has this been a bug in LV 6i, or am I doing anything wrong?
0 Kudos
Message 1 of 12
(901 Views)
Hey g4danny!  What is the OS that you are using for Mac?  So when you use extended representation the display for controls seem to be off, is this the case?  Could you include a screen shot of the display error (basically what you are seeing) and a simple VI the can reproduce the issue.  Thanks!

Andy F.
-----------------------------------------------------------------
National Instruments
0 Kudos
Message 2 of 12
(890 Views)
Hi Andy,
I am using Mac OS 9 and OS 9 subsystem of Mac OS X (10.3.9). I attached two screenshots to demonstrate my issue. Say I want to set the middle control "maximum energy step (meV)" to 0.01. The "pre-enter.tiff" is to show the control after I wrote the number in, before I hit enter. The "post-enter.tiff" is the display I see after I hit enter. The same thing happens with constants, see my following post...
Cheers!
0 Kudos
Message 3 of 12
(873 Views)
... this is a follow-up of my previous post, which demonstrates the issue with constants. In the field of interest I entered the electron mass and I leave it to you to see what happened.

Thanks a lot for helping me with this!
Daniel
0 Kudos
Message 4 of 12
(873 Views)
Hey Daniel.  So can you create a small VI with just the control and maybe a constant that replicates the behavior and attach that?  This doesn't happen if you are using anything less than extended correct?  I checked around and I found the following link which seems to indicate that this is fixed in a later version, but if you don't have access to another version this doesn't help you very much.

Please repost with a small VI.  Thanks!
Andy F.
-----------------------------------------------------------------
National Instruments
0 Kudos
Message 5 of 12
(855 Views)
Hark!
Now THIS is weird: when I just put together a simple VI (just a constant hanging in midair), the issue does not come up. When using my large VI, it is there all the time. I will do more testing...
Daniel
0 Kudos
Message 6 of 12
(845 Views)
Hi,
so I have made a simple VI that does behave the weird way. It seems to me that the problem might have something to do with the unit conversions. See for yourself. BTW, I don't know if the same thing happens or not in later LV versions and right now I don't have a chance to check.
Daniel
0 Kudos
Message 7 of 12
(842 Views)
Hey Daniel,

Does this behavior change if you go to the block diagram and right click on the control and select Representation, then change the constant to a Extended data type?  Would be good to see if it was the coersion is what is causing the problem or if it is the actual Addition.  Thanks!

Andy F.
-----------------------------------------------------------------
National Instruments
0 Kudos
Message 8 of 12
(832 Views)
Hi,
I tried to change the Representation of all 3 elements to DBL in the posted VI, run it and then switch back to EXT. The displayed values in the control and indicator didn't change, while the displayed value for the constant changed from 1.00E+0 to 1.10E+0. However, the calculation still behaves correctly, i.e. so that it treats the constant as 1.00! The 1.10 display just acts as a fuzzy disguise of the real value.
Daniel
0 Kudos
Message 9 of 12
(828 Views)
Hey Daniel!  I think I might have figured out what is going on with your controls and indicators.  I believe I have traced this error to the unit associated with these controls and indicators.  If I have the unit set to meV^-1 I get the same behavior for the control, but if I remove the unit I can press 4 and when I press enter it stays 4.  I believe that this is a bug that has been fixed long ago, since I no longer see this behavior in later versions on LabVIEW.  I guess a workaround to this problem would be to not include the units and do all of the unit processing programmatically.  I do realize that this isn't a very good work around since it does make it difficult to use the unit functionality.  You might also consider dissociating the unit from the control and then on the block diagram multiply by a constant with units.  I would think that this could be a better solution since this will allow you to continue to use units.  Let me know if you have any other questions!

Andy F.
-----------------------------------------------------------------
National Instruments
0 Kudos
Message 10 of 12
(815 Views)