08-19-2016 10:00 AM
i created this VI this vi generate random values and set reference at specifec value to make boolean LED ( light ON)
when random values exceed reference and number shown in indicator
NOW : THE PROPLEM IS To Store max vlaues which exceed reference
i set in array or list box or cluster or any indicator (just sorting them in one place to show it at front panel )
at least store ten values from start
Thanks For HelpinG ............
08-19-2016 10:45 AM - edited 08-19-2016 10:50 AM
I would suggest you to check basicc tutorials on arrays:
http://www.ni.com/getting-started/labview-basics/data-structures
http://www.ni.com/white-paper/7571/en/
-You don't need case structure and then use local variables to update boolean indicator and the Max values. You can directly update to Boolean indicator and Max Value indicator.
08-19-2016 12:24 PM
08-22-2016 11:37 PM
Find the attached snippet, may solve your problem!
08-23-2016 01:43 AM
08-23-2016 01:50 AM
can you PLEASE explain the reason for using this FOR loop in your snippet?
😄
Acutally i downloaded the code developed by Mr.shaban and i got error for Normal Distribution VI and not able to access the properties and i hope anyway it will take last index of value.
As his intention is to index the values which are above reference, i just modified the code th do the same and failed to correct his existing logic.
08-23-2016 02:18 AM - edited 08-23-2016 02:22 AM
Hi Palanive,
As his intention is to index the values which are above reference, i just modified the code th do the same
Ok, let's analyze your snippet:
- You create a normal distribution noise just to pick the last element of the waveform in a very convoluted way
- with this random value (well, there's a function to create random values) you feed the GaussianWhiteNoise function. Even more interesting: you use the random value for number of samples input!?
- So you generate a 1D array of random values to find the max value in this array.
- Then you decide to append this single max value to your output array, when it is greater than a reference value.
So all your snippet shows is how to append a single value to an array based on a condition.
The user wanted to appen ALL values in an input array appended to an output when they are greater than the reference …
Just an example to do exactly this:
(Using LV2011 without conditional tunnels.)
08-23-2016 02:42 AM
08-23-2016 06:05 AM
09-23-2016 06:02 PM