02-16-2013 03:15 PM
Solved! Go to Solution.
02-16-2013 05:39 PM
Different "tabs" in a TDMS files are for different groups (I'm assuming that you're using the Excel TDM plugin). So every hour, you need to start writing to a different group.
In order to get a column of time data, you simply need to write time data as well as your other data. I can't remember if you can write a timestamp value for a channel, but at the very least you can write a double for seconds.
However, I would recommend writing waveforms or a start time and dt value as properties of each channel or group. The time data can easily be calculated later and would really just be wasting space in your file.
02-16-2013 09:04 PM
If you are using Excel TDM plugin, tabs means "groups" and columns means "channels" for TDMS files.
TDMS supports writing array of timestamps to a channel.
02-16-2013 10:33 PM
My question now is how do I assign instead of writing in a new file, to write to a new tab (group) for 24 times (hours) and then start a new file again.
02-18-2013 02:26 PM
Hello Settler,
I would suggest you look into Functional Global Variables, and have an event every hour that records either a new page or a new file, depending on the information stored in the FGV. You can find information on functional global variables here:
https://decibel.ni.com/content/docs/DOC-2143
02-18-2013 07:34 PM
Just to enlighten you more, this is the code I'm using.
02-19-2013 11:22 AM
I know I have to create a condition after the buffering is done. My question is how to write the file then.
02-19-2013 04:43 PM
02-19-2013 07:44 PM
My hard time is how to create the "create new tab" loop.
02-20-2013 08:02 AM
Hi Settler,
You should not have to have a loop to create a new group, if you use code similar to what I posted previously. If you have the group name include an hours part, and change that dependent on the system time it should create a new group every time the hour updates.
You could do something similar for the new file every day as well.
I will try and get a quick example showing what I mean written today or tomorrow.
-N