LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

save data in tdms

Hello EveryOne,

I used RT FIFO functions to acquired data from My Controller and read it, so far everyThing goes very Well. But when I tried to save data in TDMS'file, my data is saved in one column as  shown in picture "File2"

I attempted To read data without using RT FIFO process, and it works

I think I made a Mistake in RT FIFO Process. Did-I?

 

Thank you in advance

 

Download All
0 Kudos
Message 1 of 12
(3,192 Views)

I believe that it's the turning of your data into a 2D array that is confusing the channel designations.

 

You are telling the write that there are 4 channels of data coming and give it a 2D array. The write interprets this as writing multiple samples to each channel, but you only have one row so all the data goes into the first channel.

 

Try taking out the array function that changes the 1D array into the first row of a 2D array and write the 1D array with the same number of channels.

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
Message 2 of 12
(3,132 Views)

Hi,

 

I'm not sure I have understood your last phrase. Could you explain more

Thank you.

0 Kudos
Message 3 of 12
(3,110 Views)

You have a function that turns the 1D array of values into a 2D array with 4 columns and one row. Get rid of that and save the 1D array itself, leaving everything else as is.

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 4 of 12
(3,081 Views)

If I delete this function, I will the result Shown in the attached file "Result". And I like to have the result in the attached file 'File1'

 

Download All
0 Kudos
Message 5 of 12
(3,077 Views)

Ok, I see what is happening. Go back to original code, but modify it so you are writing a 2D array with one column and 4 rows.

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 6 of 12
(3,061 Views)

 first of all, Thank you for your reply.

I did what you say me but it doesn't work. So I decided to replace RT FIFO function by a shared Variable with RT FIFOs Enabled and it works perfectly

I let my code in The attached File if you wanna see it.

 

Best Regards

0 Kudos
Message 7 of 12
(3,037 Views)

What do you mean that it didn't work. What was the result? What did the code look like that you tried?
The way you pass data has no impact on how it is formatted. The code you showed will produce the same output as the original version. If it doesn't that is a bug in LV. Can you post the actual code?

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 8 of 12
(3,020 Views)

below it's my code with RT FIFO functions

VI-RTFIFO.JPG

 

 

And in this one I used Shared Variable

VI-SVFIFO.JPG

 

You will find in the attached Files the result of each code

Download All
0 Kudos
Message 9 of 12
(3,005 Views)

Can you post the code?

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 10 of 12
(2,992 Views)