LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to show condition based string in lcd

Solved!
Go to solution

If you use mine use it like this.

Round to -infinty and convert

---

UnCertified LabVIEW Student
Mistakes are for learning, that's why suggestions are always welcome!
0 Kudos
Message 11 of 18
(678 Views)

You guys are the main reason I am loving labview 🙂

0 Kudos
Message 12 of 18
(677 Views)

Checked it on benchmark (from altenbach).

As I already mine was the slowest, because structures take time.

Apok was slightly the fastest Smiley Very Happy

LCD.PNG

---

UnCertified LabVIEW Student
Mistakes are for learning, that's why suggestions are always welcome!
0 Kudos
Message 13 of 18
(670 Views)

Though using insert into array instead of build array, will make it a very little bit faster. Using Apok's idea

LCD.PNG

---

UnCertified LabVIEW Student
Mistakes are for learning, that's why suggestions are always welcome!
Message 14 of 18
(667 Views)

wow 😮

still how can i understand the methods used by them ?

0 Kudos
Message 15 of 18
(663 Views)

I'll explain you the last one i posted with benchmark.

 

You have your percentage let's say 54. You add it to an array of the different turning points. Which are in your case:  10, 50, 90, 100 Plus your percentage 54

Then you sort the array which will give: 10, 50, 54, 90, 100. And search at what index this is: 3.

Now you know what index it has you will count it down with 1 because you've added an extra element.

Then you index the array of strings at the index you just found. The array of strings has to be in this order to work properly!

 

Hope this'll help you!

 

Koen

---

UnCertified LabVIEW Student
Mistakes are for learning, that's why suggestions are always welcome!
0 Kudos
Message 16 of 18
(657 Views)

@arghya139 wrote:

wow 😮

still how can i understand the methods used by them ?


Might as well explain mine, even if it looks like I am not the fastest but still close.  

 

You have an array of lower limits and upper limits, these two arrays must be the same size because for each condition you need to have a limit to see if you are within that range or not.  Using the Coerce In Range you can see if your Tank Level is within each of the ranges given.  This means that you will get an array of booleans out.  Each boolean value will correspond to if the tank is in that range of lower and upper limits.  Now we want to find the first place that we are in range so we search for the first TRUE within that array of booleans.  The search function returns the index that it is found in, meaning if it was the first range of numbers that it was within it will return a 0.  We then have a constant array of strings where each range that we checked corresponded to a string.  We then grab the string at the index that the TRUE was found at and return that string value.  For all of this to work properly we assume that the Tank value is between 0 and 100, and that the array size of the Lower Limits, Upper Limits, and Strings are the same size.

0 Kudos
Message 17 of 18
(645 Views)

Thanks to both of you 🙂
now i understand and doing it 🙂
labiew simulation is completely 🙂 🙂

Below is the front end of my vi

 

Tank.png

 

Now i need to do the circuit simulation in Multisim

By any chance any of you know that too ? 
I have made 90% circuits, need help with 1/2 component ....

and again, thanks a lot, i dont know how else I can express my gratitude 🙂

0 Kudos
Message 18 of 18
(643 Views)