LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Continuous insertion of elements in array

Solved!
Go to solution

Hello everyone,

 

I am relatively new to LabView, and absolute novice when talking about arrays. 

 

Here's what I would like to do. I am acquiring measured values of voltage from a voltmeter via LabView. I can easily display them and make manipulations. However, I would like to create an array (not sure if 1D would be sufficient or I need higher order of array) and continuously feed new values to this array, up to certain limit (let's say 100 values maximum). How can I do this? I read some posts about using for loop, but not quite sure how to do that. Can anyone give me a suggestion, or a simple example? Or just if I am repeating old posts, to point me to the right reading material.

 

Best regards!

0 Kudos
Message 1 of 5
(3,249 Views)

Hi DocOc,

 

use a loop with a shift register to hold your array. Then apply standard array functions on this array!

(This is pretty basic LabVIEW stuff. You can learn this by taking the free online lessons provided by NI on their website!)

 

Another approach is to use the PtByPtQueue function, which essentially does the same under the hood…

Best regards,
GerdW


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

Dear GerdW,

 

Thank you for the tip and the fast reply! Is there any example for this in the standard examples? I will take another look at the lessons, because have no memmory of the array handling.

 

Best regads!

0 Kudos
Message 3 of 5
(3,240 Views)
Solution
Accepted by topic author DocOc

Using loops, shift registers and arrays is explained in Core1 lessons.

Just open the example finder to view suitable example VIs…

 

Example:

check.png

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 4 of 5
(3,233 Views)

Million thanks GerdW!

0 Kudos
Message 5 of 5
(3,229 Views)