Owning Palette: Advanced TDMS VIs and Functions
Requires: Base Development System
Defines the channel information of the raw data that you want to write to the specified .tdms file. The channel information includes the data layout, name of the group, names of the channels, data type, and number of samples.
Note If you use this function multiple times in an application, the order in which you use this function determines the order of channels and groups that you write to a .tdms file. |
Add to the block diagram | Find on the palette |
data layout specifies the arrangement of the data that you want to stream to a .tdms file. You must use the same data layout for each channel under the same group.
|
|||||||||||||||||||||||||||
tdms file specifies a reference number to the .tdms file on which to perform the operation. Use the TDMS Advanced Open function to open the refnum. | |||||||||||||||||||||||||||
group name specifies the group name for the channel. If you do not wire data to this input or if you wire an empty string to this input, this function uses Untitled as the group name. | |||||||||||||||||||||||||||
channel name(s) specifies the names for the channels. | |||||||||||||||||||||||||||
error in describes error conditions that occur before this node runs. This input provides standard error in functionality. | |||||||||||||||||||||||||||
data type specifies the type of data on which you want to perform the operation. This input accepts integers, floating-point numbers, Booleans, and timestamps.
|
|||||||||||||||||||||||||||
samples per channel specifies the number of data samples that each channel contains. | |||||||||||||||||||||||||||
tdms file out returns a TDMS file reference to the .tdms file on which you performed the operation. | |||||||||||||||||||||||||||
error out contains error information. This output provides standard error out functionality. |
The following use cases demonstrate how the TDMS Set Channel Information function arranges raw data according to the data layout input.
The data layout in the file is consecutive samples per channel. In the previous figure, a single 16-bit numeric or I16 sample follows another I16 sample, which follows another I16 sample, and so on. You can write as many I16 samples as you want. For example, you can write one million I16 samples or two million I16 samples at a time.
The data layout is 8 consecutive samples per channel. In the previous figure, the data layout is eight I16 samples for the ch0 channel, eight I16 samples for the ch1 channel, and so on.
In the previous figure, the data layout is an I16 sample for the ch0 channel followed by an I16 sample for the ch1 channel. This pair repeats in the file. The total file size or the NI_ChannelLength property determines how often the pair repeats.
The data layout is 8 consecutive samples per channel per group or device. In the previous figure, the data layout contains eight I16 samples for the ch0 channel for device1, eight I16 samples for the ch1 channel for device1, eight I16 samples for the ch0 channel for device2, eight I16 samples for the ch1 channel for device2, and so on.
In the previous figure, the data layout is 8 pairs of an I16 sample for the ch0 channel and an I16 sample for the ch1 channel of device1. Following the 8 pairs is 8 pairs of an I16 sample for the ch0 channel and an I16 sample for the ch1 channel of device2. This pattern repeats in the file.
Refer to the TDMS Advanced Append Multiple Headers VI in the labview\examples\File IO\TDMS\Advanced Read and Write\Asynchronous Read and Write directory for an example of using the TDMS Set Channel Information function.