LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

fill a 1000 dimension array with data from serial port using VISA

Hi there, I'am trying to store data from serial port into an array of dimension 1000, which I want to plot afterwords but doesn't seem to work. After getting 1000 elements from serial I only have two in my array. What I want to do is append every one of the 1000 values to the same array, but it doesn't seem to work. What am I doing wrong?Capture.PNG

 

 

0 Kudos
Message 1 of 6
(2,251 Views)

Hi samo,

 

What am I doing wrong?

I never used LabVIEWNXG before but I guess from your image you are building an array of 2 elements (displayed in "output array") in your loop. You create that array in each iteration and after the last iteration that 2-element array is output from the loop.

Does NXG support shift registers? Why don't you use them?

Best regards,
GerdW


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

Or have the output tunnel be autoindexing.  Also, your loop should be a FOR loop since you know beforehand how many times it should iterate.

 

Your use of "dimension" is completely wrong.  You are trying to create a 2 dimensional (2D) array with 1000 rows.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 3 of 6
(2,220 Views)

Thanks for info, but can you be a little bit more specific? 

I' am  relative new to LabVIEW especially NXG.

0 Kudos
Message 4 of 6
(2,192 Views)

Hi samo,

 

I' am relative new to LabVIEW

What about that "Training" section in the header of this LabVIEW board, dedicated to LabVIEW beginners?

All our suggestions are VERY basic stuff…

Best regards,
GerdW


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

@crossrulz wrote:

..

 

Your use of "dimension" is completely wrong.  ...


That is what brought me into this thread. I once created a 100-D array just to see if I could break LV. You can imagine what the wire looked like! But then actually putting data in that wire... Out of memory.

 

Ben

 

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 6 of 6
(2,172 Views)