LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

cant create a multichannel multidevice tdms file

I have posted this question in my last thread which has been solved and I'm hoping it'll get more attention in it's own thread. Sorry for the duplicates. I am attempting to continuously acquire data from 3 different channels on 3 different daq cards (so multichannel and multidevice). I am using a producer/consumer architecture for obvious reasons as well as the tdms file type for saving the data. Between the producer and the consumer loop, I have a queue setup. I have the multichannel single device code working; however, when I add the multidevice functionality, I am unable to get the data to write to the tdms file. Any help is greatly appreciated. I have included the code as well as its dependencies in the attached zip file. To check my tdms file when it is actually created, I simply use the tdms viewer.
0 Kudos
Message 1 of 13
(3,581 Views)

TDMS does not support 3d arrays, if I were you I would use 3 seperate groups, one for every card, with 3 seperate writes

 

Ton

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 2 of 13
(3,574 Views)
I'm not sure I follow. I do not have but one 3 d array and it is indexed in the for loop. Can you be a little more explicit? Thanks.
0 Kudos
Message 3 of 13
(3,571 Views)

What he's suggesting is probably best. Instead of indexing the 3D array in the for loop, use an "index array" function to split the array into 3 2D arrays. Then pass each of those 2D arrays to separate TDMS files (one file for each device).

 

Here's a partial idea of what I'm talking about:

2010-03-16_180840.png

Caleb Harris

National Instruments | Mechanical Engineer | http://www.ni.com/support
0 Kudos
Message 4 of 13
(3,546 Views)
Thank you for the insight about the tdms files. Also, thanks for the pictoral representation of what he meant. I am still unable to produce a tdms file though or at least one with data. What is the best way to name the group channels? i.e. card 1 channel 1, card 1 channel 2, ....card 3 channel 1... and have it seen this way when I used the tdms viewer? Also, what is the most efficient way to combine the three tdms files and delete the separte files programmatically? Thank you very much for your help. Attached is the new .vi. _NIhelp.
0 Kudos
Message 5 of 13
(3,541 Views)

In your previous post you had a 3-d array in the queueu, now you have a 2d array, good.

However the code you posted is only for one channel, you can use the code you made 3 times inside your code.

NO need for the for-loop when writing to the TDMS-file.

 

Ton

Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 6 of 13
(3,532 Views)
I believe that you are looking at the wrong .vi. I included the single channel .vi for comparison. The one that I am working on is labeled _NIhelp. 🙂 Is the diagram what you said to do? If so, please look at my previous questions again. Thank you.
0 Kudos
Message 7 of 13
(3,520 Views)

I wasn't able to test this, since the DAQmx tasks/channels were all nonexistent on my machine, but I think this might be what you're looking for. This should get your TDMS writes to all occur on the same file.

 

3 cards to one TDMS file.png

 

The snippet messed with the code a little, but I had the variables for the task 1/2/3 wired into the channel info VIs.

Caleb Harris

National Instruments | Mechanical Engineer | http://www.ni.com/support
0 Kudos
Message 8 of 13
(3,510 Views)
Charris, thank you for your help. I am still learning about property nodes and do not know where to find or how to create teh DAQmxName strict property node that you have in the snippet. Also, It's not clear to me what is wired to them. I am also receiving a crash error if I run the program when I just wire in the task names to the channel info vi. Any ideas what the cause of this is?
0 Kudos
Message 9 of 13
(3,500 Views)
I would also like to add, why are the property nodes needed? What are they doing for us?
0 Kudos
Message 10 of 13
(3,499 Views)