NI-DAQmx VI and Function Reference

Content Type
Programming Language
Current manual

DAQmx Configure Logging (VI)

DAQmx Configure Logging (VI)

Owning Palette: DAQmx Advanced Task Options VIs and Functions
Installed With: NI-DAQmx

Configures TDMS file logging for the task.

Note  To maximize performance and to minimize file size, DAQmx TDMS files store raw data and scaling information separately, and do not need defragmentation. Attempting to pass a DAQmx TDMS file to the TDMS Defragment VI results in an error.

DAQmx Configure Logging

civrn.gif

task/channels in is the name of the task or a list of virtual channels to which the operation applies. If you provide a list of virtual channels, NI-DAQmx creates a task automatically.

cpath.gif

file path specifies the path to the TDMS file to which you want to log data.

cstr.gif

group name specifies the name of the group to create within the TDMS file for data from this task. If you append data to an existing file and the specified group already exists, NI-DAQmx appends a number symbol and a number to the group name, incrementing that number until finding a group name that does not exist. For example, if you specify a group name of Voltage Task, and that group already exists, NI-DAQmx assigns the group name Voltage Task #1, then Voltage Task #2. If you do not specify a group name, NI-DAQmx uses the name of the task.

For digital input tasks, NI-DAQmx creates a group for each virtual channel in the task. For each created group, NI-DAQmx appends a hyphen and the virtual channel name to the group name.

ci32.gif

logging mode specifies whether to enable logging and whether to allow reading data while logging. Log mode allows for the best performance. However, you cannot read data while logging if you specify this mode. If you want to read data while logging, specify Log and Read mode.

Off (10231)

Disable logging for the task.

Log (15844)

Enable logging for the task. You cannot read data using DAQmx Read when using this mode. If you require access to the data, read from the TDMS file.

Log and Read (15842)

Enable both logging and reading data for the task. You must use DAQmx Read to read samples for NI-DAQmx to stream them to disk.

cerrcodeclst.gif

error in describes error conditions that occur before this VI or function runs. The default is no error. If an error occurred before this VI or function runs, the VI or function passes the error in value to error out. If an error occurs while this VI or function runs, the VI or function runs normally and sets its own error status in error out. Use the Simple Error Handler or General Error Handler VIs to display the description of the error code. Use error in and error out to check errors and to specify execution order by wiring error out from one node to error in of the next node.

cbool.gif

status is TRUE (X) if an error occurred before this VI or function ran or FALSE (checkmark) to indicate a warning or that no error occurred before this VI or function ran. The default is FALSE.

ci32.gif

code is the error or warning code. The default is 0. If status is TRUE, code is a negative error code. If status is FALSE, code is 0 or a warning code.

cstr.gif

source identifies where an error occurred. The source string includes the name of the VI that produced the error, what inputs are in error, and how to eliminate the error.

ci32.gif

operation specifies how to open the TDMS file.

Open (10437)

Open an existing TDMS file, and append data to that file. If the file does not exist, NI-DAQmx returns an error.

Open or Create (15846)

Open an existing TDMS file, and append data to that file. If the file does not exist, NI-DAQmx creates a new TDMS file.

Create or Replace (15847)

Create a new TDMS file, or replace an existing TDMS file.

Create (15848)

Create a new TDMS file. If the file already exists, NI-DAQmx returns an error.

iivrn.gif

task out is a reference to the task after this VI or function runs. If you wired a channel or list of channels to task/channels in, NI-DAQmx creates this task automatically.

ierrcodeclst.gif

error out contains error information. If error in indicates that an error occurred before this VI or function ran, error out contains the same error information. Otherwise, error out describes the error status that this VI or function produces. Right-click the error out indicator on the front panel and select Explain Error from the shortcut menu for more information about the error.

ibool.gif

status is TRUE (X) if an error occurred or FALSE (checkmark) to indicate a warning or that no error occurred.

ii32.gif

code is the error or warning code. If status is TRUE, code is a nonzero error code. If status is FALSE, code is 0 or a warning code.

istr.gif

source identifies where and why an error occurred. The source string includes the name of the VI that produced the error, what inputs are in error, and how to eliminate the error.

Was this information helpful?

Help us improve your future ni.com experience.

What software will you be using with this product?

Submit