09-15-2009 02:08 PM
Hi There,
In my program i am getting output in gram unit. I want that if value to be in readable way between 1-1000. So if value is more or less then that, i want to transfer it into either, microgram, milligram, gram and kilogram to display value and also able to display string for unit accordingly.
Is there a way to use case structure to solve this problem
BTW i am using labview 8.2.
Thanks
Yogesh
Solved! Go to Solution.
09-15-2009 02:17 PM - edited 09-15-2009 02:18 PM
How about this (attached).
You can set a case structure to accept a number as the selector.
Then you can set a range for each case.
For example '0..1000' would be 0 to 1000.
You can then multiply/divide by whatever you need to in order to get the correct units.
Then append the correct unit as a string.
09-15-2009 02:28 PM
I'm not sure if it's available in 8.2, but try to set your display indicator to SI NOTATION (under DISPLAY format).
It will automatically append "m", "u", or "k" (or others) as necessary.
Blog for (mostly LabVIEW) programmers: Tips And Tricks
09-15-2009 02:43 PM
09-15-2009 04:38 PM
I think I'm going to stop writing code from scratch.
Every time I do, LabVIEW already has a function/option for it that I dont know about or didnt see before.
09-15-2009 04:41 PM
09-15-2009 04:54 PM
09-15-2009 04:56 PM - edited 09-15-2009 04:57 PM
09-15-2009 05:03 PM
I tend to right my own software for that.
Do you write your own spell checkers, too?
Blog for (mostly LabVIEW) programmers: Tips And Tricks
09-15-2009 05:04 PM
that would be me hitting the forum spell checker and me not looking back at what was written lol:)