 jaraalmonte
		
			jaraalmonte
		
		
		
		
		
		
		
		
	
			12-16-2009 02:42 PM
Hi, I have a front panel with a large number of indicators on it. As updating each one is a very straight forward task, I am using the This.Panel.Controls array to step through and update each indicator appropriatly. The problem is, that because I have so many indicators, and the actual numbers aren't that important (they are also being logged elsewhere) I only wish to have 4 significant digits displayed so that the value fits into the size of the indicator. I set each indicator to have a display format of %_4f, but when I run it this is not obeyed and 7+ digits are displayed. I'm guessing this has something to do with updating the controls via the property node, but I'm not sure why that should cause an issue. Any ideas?
 altenbach
		
			altenbach
		
		
		 
		
		
		
		
		
	
			12-16-2009 02:56 PM - edited 12-16-2009 02:59 PM
Can you show us some code that demonstrates the problem?
What is the range of your numbers? If they are over 9999, there will be trailing zeroes of course.
Are you confusing "significant digits" with "digits of precision"?
Try using a g or e format, maybe?
 Darin.K
		
			Darin.K
		
		
		
		
		
		
		
		
	
			12-16-2009 03:05 PM
12-16-2009 03:22 PM
Nope, I double checked the format string. I do mean significant digits by the way. My imput values are expected to be in the range 0-100 but I've sized my indicators to fit only 4 digits, which will give me at worst a 0.1% error over the full range, which is good enough. Right now the channels from which I am grabbing data are all disconnected, so I am just getting noise. I've attached images of both the format string I'm using, the relavent part of my code where I update values, and an example of the output I get. Thanks,
Jon
12-16-2009 03:28 PM
Well, now I've tried creating an example to reproduce this porblem using a single indicator, but I'm not getting it there with the exact smae setup. Now I really have no clue what's going on.
Jon
 Darin.K
		
			Darin.K
		
		
		
		
		
		
		
		
	
			12-16-2009 03:31 PM
Those leading zeros are not significant, it appears from your screenshot that you are indeed getting 4 significant digits. If you expect values from 0-100 I suggest you double check your scaling.
If you want 0.001 for example, you need four digits of precision.
12-16-2009 03:36 PM
Ah yup that makes sense now. Anywyas, like I said, everything is offline, so 0 is okay for now since it's just noise on our lines. Thanks for the help though, I feel quite dumb right now but at least things aren't broken.
Jon
 Darin.K
		
			Darin.K
		
		
		
		
		
		
		
		
	
			12-16-2009 03:44 PM
