As part of thrust measurement system, I am have setup a VI to output PWM and log RPM, temperatures and power. I have grouped my read channels into different loops (mostly based on cards) and they output at rates from 10 Hz - 1 KHz. I am read trying to use TDMS advanced palletes to log this data together possibly in same .tdms file under different column headers but no success so far(as based on my reading so far it appears I need to use advanced TDMS than simple since I have mulpile data inputs). My questions are;
1. Can we use TDMS advanced or standard version to log data from multiple loops ?
2. If so, whats the best way to setup this ? Do I setup "TDMS file open", "TDMS set file info" for each loop and first loop creates the file and rest just opens it OR should I just use this once and branch it to different loops ?
I had a success of logging 2-3 loops output to a single file with standard TDMS but when I added more loops it didn't work very well.
I have attached a part of my VI where I am trying to get 2 loops to output the data to same file.
PS: This is my first post, so please let me know if I can post additional info or use different board for this topic.
Solved! Go to Solution.
What I like to do is have a seperate loop that does nothing but handle the logging. It should be a Queued Message Handler, a variation of the Producer/Consumer. So the idea is that you create a queue that the other loops can use to send the data to the logging loop. You can go OOP if you want, but the simple solution is to make the data type of the queue a cluster with a string and a variant. The string is used to tell what the data is and the variant actually holds the data.
Oh, and you can just use the simple TDMS functions.
Using a proper QMH is just better, but here I show you the basic idea how to use Queue with variant data (this is just an example, lots of things need to be changed/improve/added!):
Thank you all for your prompt responses, I actually recently learned about Producer/Consumer loops and working to integrate it. This is very interesting way and deffinietly seemed to be more efficient way of logging.
I ran my RPM measurement loop and setup logging. (due to some reason I don't see the producer Enqueue outputing and data, I am still working on debugging it, VI attached if you are curious)
And yes, it's much more easier to use simple TDMS functions.
Still many things to be improved/fixed in your VI, some hints: