LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

multiple cases

Solved!
Go to solution

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 

0 Kudos
Message 1 of 11
(3,912 Views)

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.

Message Edited by Cory K on 09-15-2009 02:18 PM
Cory K
Message 2 of 11
(3,902 Views)

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.

 

 

 Display.PNG

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

Message 3 of 11
(3,892 Views)
Solution
Accepted by topic author Yogesh9ic

Hi Yogesh,

 

when switching on "unit display" for indicators LabView will do the part of (SI-)unit scaling for you...

 

unit-display.png

 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 11
(3,883 Views)

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. Smiley Very Happy

Cory K
0 Kudos
Message 5 of 11
(3,851 Views)
I hear you cory lol you do all that work and BAM!! already done with labview
Harold Timmis
htimmis@fit.edu
Orlando,Fl
*Kudos always welcome:)
0 Kudos
Message 6 of 11
(3,848 Views)
Yeah lol, I wrote a ton of programming for DAQ, then found the express DAQ assistant Smiley Tongue
Tyler C. | Certified LabVIEW Associate Developer

0 Kudos
Message 7 of 11
(3,836 Views)
in all honesty I never use the DAQ Assistant I tend to right my own software for that
Message Edited by Harold Timmis on 09-15-2009 05:57 PM
Harold Timmis
htimmis@fit.edu
Orlando,Fl
*Kudos always welcome:)
0 Kudos
Message 8 of 11
(3,831 Views)

I tend to right my own software for that.

 

Do you write your own spell checkers, too?

 

Smiley Wink 

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 9 of 11
(3,824 Views)

that would be me hitting the forum spell checker and me not looking back at what was written lol:)

Harold Timmis
htimmis@fit.edu
Orlando,Fl
*Kudos always welcome:)
0 Kudos
Message 10 of 11
(3,822 Views)