LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Writing 2d array to textfile with queue cmd gives strange data file

Hi
I'm collecting data from the FPGA on cRIO 9047 on 7 channels with a sample rate of 16 kHz. 
Please see the attached snippet of the data file. I don't want the two blank lines between the data..

4 channels are data from encoders, 32 bit integer

2 channels are data from NI 9239 Voltage module, FXP

1 chanel are the Tick count of the FPGA code.

 

I have two DMA FIFO's since the encoders are 32 bit integer and NI 9239's data is FXP.
Then on my RT target I'm trying to combine the data from the two FIFO's into 1 2D array and then adding them to a queue..

The problem is the data file... 

Thanks in advance.. 

Download All
0 Kudos
Message 1 of 3
(2,304 Views)

Hi MKS,

 

(I can't open your VI because of the LabVIEW version. Stuck at LV2017 at the moment.)

 

From your "datafile" image it seems you are writing a 3D array to your file: then the ArrayToSpreadsheetString will separate the pages of that 3D array by blank lines and also write the page index (like "[20, 0, 0]") into the file.

Maybe you want to write just 2D data to your file?

Best regards,
GerdW


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

I have attached a image of my block diagram.. 

I decimated the data from the two FIFO's.

Then Interleaved the data in order to combine the data into a 1D array.
This seemed to solve the problem 🙂

I have also attached a new image of my data file.

Right now a new data "array" is starting after collum G.

Download All
0 Kudos
Message 3 of 3
(2,254 Views)