07-22-2014 02:52 AM
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
07-23-2014 12:40 AM
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...
07-23-2014 02:54 AM
Hi,
I'm not sure I have understood your last phrase. Could you explain more
Thank you.
07-23-2014 08:44 AM
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...
07-23-2014 09:07 AM
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'
07-23-2014 10:28 AM
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...
07-24-2014 03:58 AM
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
07-24-2014 05:57 AM - edited 07-24-2014 05:59 AM
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...
07-24-2014 10:07 AM
below it's my code with RT FIFO functions
And in this one I used Shared Variable
You will find in the attached Files the result of each code
07-24-2014 01:53 PM
Can you post the code?
Mike...