TDM = 2 Files
The Storage VIs create a .TDM file (XML-based, for descriptive properties) and a .TDX file (binary, contains waveform / array data).
One or many channel groups
Each measurement can be appended to a file as a new channel group, or the values can be appended to channels that were stored earlier (resulting in one channel group per file). Use the "Always create new channel group/channel" switch to decide which way of appending data you want to use. You might want to use the "Data viewer" example shipping with LabVIEW to have a look at the hierarchy of channel groups and channels.
Note that when appending values to a channel, "Write Data" uses the channel name to find the right channel to append data to.
Get and set properties on particular channel groups
To modify data on a particular channel group, you need to obtain a "storage refnum (channel group)" to this channel group. There are two ways of doing that:
- Use "Read Data", configured to object type "channel group". The "channel groups" output will give you the array of refnums you need (the attached VI shows how to obtain and use these refnums).
- Wire the "storage refnum (file)" that comes out of "Open Storage" to "Get Properties". The "channel groups" property will be an array of all channel group refnums in your file (the "Write channel groups" and "Read channel groups" examples shipping with LabVIEW show how to do that).
"Read Data" should be used if you want to apply a query condition or if you are e.g. looking up channels across channel groups. "Get Properties" can give you all channel groups in the order they were stored in, or e.g. all channels of a particular group.
"Read Data" and "Set Properties"
"Set Properties" will replace all properties that you have selected and that show up on the block diagram as terminals. All other properties remain unchanged. The properties will be written only to the one file, channel group or channel that the incoming refnum refers to. "Read Data" doesn't write anything by itself, but you can use the output refnums of "Read data" to apply "Set Properties" to whatever you have read.