LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

record results in array

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 ............

0 Kudos
Message 1 of 10
(3,518 Views)

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.

Thanks
uday
0 Kudos
Message 2 of 10
(3,502 Views)
If you need to store only max values in an array use conditional indexing which will index only the values greater than your reference...

The Boolean input for the conditional indexing should be your comparision value of your random number and reference number...

Then the array formed will be connected to any of your choice....array or list box
----------------------------------------------------------------------------------------------------------------
Palanivel Thiruvenkadam | பழனிவேல் திருவெங்கடம்
LabVIEW™ Champion |Certified LabVIEW™ Architect |Certified TestStand Developer

Kidlin's Law -If you can write the problem down clearly then the matter is half solved.
-----------------------------------------------------------------------------------------------------------------
0 Kudos
Message 3 of 10
(3,485 Views)

Find the attached snippet, may solve your problem!

 

ResultRecordingArray.png

----------------------------------------------------------------------------------------------------------------
Palanivel Thiruvenkadam | பழனிவேல் திருவெங்கடம்
LabVIEW™ Champion |Certified LabVIEW™ Architect |Certified TestStand Developer

Kidlin's Law -If you can write the problem down clearly then the matter is half solved.
-----------------------------------------------------------------------------------------------------------------
0 Kudos
Message 4 of 10
(3,426 Views)

Hi Palanive,

 

can you PLEASE explain the reason for using this FOR loop in your snippet?

😄

Best regards,
GerdW


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


 

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.

 

----------------------------------------------------------------------------------------------------------------
Palanivel Thiruvenkadam | பழனிவேல் திருவெங்கடம்
LabVIEW™ Champion |Certified LabVIEW™ Architect |Certified TestStand Developer

Kidlin's Law -If you can write the problem down clearly then the matter is half solved.
-----------------------------------------------------------------------------------------------------------------
0 Kudos
Message 6 of 10
(3,408 Views)

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:

check.png

(Using LV2011 without conditional tunnels.)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 10
(3,399 Views)
Thank you all 😌
I appreciate your help and i will use two codes you are mention in your replys
But now this code for infinity array
If i want to access ( eg: 10 times ) should i set for loop [N=10] or what is the change must occur ?
Thank you again 😌
0 Kudos
Message 8 of 10
(3,390 Views)

Hi Shaban,

 

But now this code for infinity array

Please explain the term "infinity array"!


If i want to access ( eg: 10 times )

What do you want to access? A whole array? Or the first 10 elements in an array?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 9 of 10
(3,372 Views)
thanks  your soultions lead my to do my work  Thanks again 🙂
0 Kudos
Message 10 of 10
(3,190 Views)