11-18-2013 09:07 AM
If you use mine use it like this.
Round to -infinty and convert
11-18-2013 09:08 AM
You guys are the main reason I am loving labview 🙂
11-18-2013 09:22 AM
Checked it on benchmark (from altenbach).
As I already mine was the slowest, because structures take time.
Apok was slightly the fastest
11-18-2013 09:30 AM
Though using insert into array instead of build array, will make it a very little bit faster. Using Apok's idea
11-18-2013 09:45 AM
wow 😮
still how can i understand the methods used by them ?
11-18-2013 10:08 AM
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
11-18-2013 10:40 AM
@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.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
16 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
11-18-2013 10:45 AM
Thanks to both of you 🙂
now i understand and doing it 🙂
labiew simulation is completely 🙂 🙂
Below is the front end of my vi
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 🙂