LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

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

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
(146 Views)

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

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
CLAD expired, using 2009SP1 + LV2011SP1 + LV2017 (+LV2018 sometimes) on Win7+cRIO
Kudos are welcome Smiley Wink

0 Kudos
Message 2 of 6
(143 Views)

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

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.


There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
Message 3 of 6
(115 Views)

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

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
(87 Views)

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

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
CLAD expired, using 2009SP1 + LV2011SP1 + LV2017 (+LV2018 sometimes) on Win7+cRIO
Kudos are welcome Smiley Wink

0 Kudos
Message 5 of 6
(83 Views)

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


@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

 

0 Kudos
Message 6 of 6
(67 Views)