ConfigureLogging(string, TdmsLoggingOperation, LoggingMode, string)
- Updated2026-02-03
- 1 minute(s) read
Configures logging to a .tdms file when the acquisition starts with the specified TDMS channel group name.
Syntax
Namespace: NationalInstruments.DAQmx
public void ConfigureLogging(string filePath, TdmsLoggingOperation loggingOperation, LoggingMode loggingMode, string groupName)
Remarks
When you enable TDMS logging, NI-DAQmx streams the data acquired to the specified file once the acquisition starts. The data written on the file is in TDMS file format, and the driver also creates a TDMS index file. Refer to TDMS Streaming for more information.
Parameters
| Name | Type | Description |
|---|---|---|
| filePath | string | The path to the .tdms file to which you want to log data. If you use this method to create a new file, the file extension of the filename you specify in filePath must be .tdms. Otherwise, this method automatically appends .tdms to the filename you specify. If you use this method to open or update an existing file, you do not have to ensure that the file extension is .tdms. |
| loggingOperation | TdmsLoggingOperation | A TdmsLoggingOperation value which specifies how to open the .tdms file. |
| loggingMode | LoggingMode | A LoggingMode value which specifies how to log data. |
| groupName | string | The name of the channel group to create within the .tdms file for data from this task. When set to null, Empty, or a string with only white space, the driver sets the TDMS channel group name to the task name. |