NI-DAQmx Properties

Content Type
Programming Language
Current manual

DAQmx Read Properties

DAQmx Read Properties

Use the DAQmx Read properties to configure read operations, such as from what position in a buffer you want to read, and to query the current status of read operations.

PropertyDescription
RelativeTo Specifies the point in the buffer at which to begin a read operation. If you also specify an offset with Offset, the read operation begins at that offset relative to the point you select with this property. The default value is Current Read Position unless you configure a Reference Trigger for the task. If you configure a Reference Trigger, the default value is First Pretrigger Sample. Details
Offset Specifies an offset in samples per channel at which to begin a read operation. This offset is relative to the location you specify with RelativeToDetails
Channels to Read Specifies a subset of channels in the task from which to read. Details
Waveform Attributes Specifies the waveform data type attributes to return. Returning fewer attributes increases performance. Details
Read All Available Samples Specifies whether subsequent read operations read all samples currently available in the buffer or wait for the buffer to become full before reading. NI-DAQmx uses this setting for finite acquisitions and only when the number of samples to read is -1. For continuous acquisitions when the number of samples to read is -1, a read operation always reads all samples currently available in the buffer. Details
Auto Start Specifies if DAQmx Read automatically starts the task if you did not start the task explicitly by using DAQmx Start Task. The default value is TRUE. When DAQmx Read starts a finite acquisition task, it also stops the task after reading the last sample. Details
OverWrite Mode Specifies whether to overwrite samples in the buffer that you have not yet read. Details
Logging:File Path Specifies the path to the TDMS file to which you want to log data. If the file path is changed while the task is running, this takes effect on the next sample interval (if Logging.SampsPerFile has been set) or when DAQmx Start New File is called. New file paths can be specified by ending with "\" or "/". Files created after specifying a new file path retain the same name and numbering sequence. Details
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. Details
Logging:TDMS: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. Details
Logging:TDMS:Operation Specifies how to open the TDMS file. Details
Logging:Pause Specifies whether logging is paused while a task is executing. If Logging.Mode is set to Log and Read mode, this value is taken into consideration on the next call to DAQmx Read, where data is written to disk. If Logging.Mode is set to Log Only mode, this value is taken into consideration the next time that data is written to disk. A new TDMS group is written when logging is resumed from a paused state. Details
Logging:Samples Per File Specifies how many samples to write to each file. When the file reaches the number of samples specified, a new file is created with the naming convention of <filename>_####.tdms, where #### starts at 0001 and increments automatically with each new file. For example, if the file specified is C:\data.tdms, the next file name used is C:\data_0001.tdms. To disable file spanning behavior, set this attribute to 0. If Logging.FilePath is changed while this attribute is set, the new file path takes effect on the next file created. Details
Logging:File Write Size Specifies the size, in samples, in which data will be written to disk. The size must be evenly divisible by the volume sector size, in bytes. Details
Logging:File Pre-allocation Size Specifies a size in samples to be used to pre-allocate space on disk. Pre-allocation can improve file I/O performance, especially in situations where multiple files are being written to disk. For finite tasks, the default behavior is to pre-allocate the file based on the number of samples you configure the task to acquire. Details
Status:Current Read Position Indicates in samples per channel the current position in the buffer. Details
Status:Available Samples Per Channel Indicates the number of samples available to read per channel. This value is the same for all channels in the task. Details
Status:Total Samples Per Channel Acquired Indicates the total number of samples acquired by each channel. NI-DAQmx returns a single value because this value is the same for all channels. For retriggered acquisitions, this value is the cumulative number of samples across all retriggered acquisitions. Details
Status:Common Mode Range Error:Common Mode Range Error Channels Exist Indicates if the device(s) detected a common mode range violation for any virtual channel in the task. Common mode range violation occurs when the voltage of either the positive terminal or negative terminal to ground are out of range. Reading this property clears the common mode range violation status for all channels in the task. You must read this property before you read CommonModeRangeErrorChans. Otherwise, you will receive an error. Details
Status:Common Mode Range Error:Common Mode Range Error Channels Indicates a list of names of any virtual channels in the task for which the device(s) detected a common mode range violation. You must read CommonModeRangeErrorChansExist before you read this property. Otherwise, you will receive an error. Details
Status:Excitation Fault:Excitation Fault Channels Exist Indicates if the device(s) detected an excitation fault condition for any virtual channel in the task. Reading this property clears the excitation fault status for all channels in the task. You must read this property before you read ExcitFaultChans. Otherwise, you will receive an error. Details
Status:Excitation Fault:Excitation Fault Channels Indicates a list of names of any virtual channels in the task for which the device(s) detected an excitation fault condition. You must read ExcitFaultChansExist before you read this property. Otherwise, you will receive an error. Details
Status:Overcurrent:Overcurrent Channels Exist Indicates if the device(s) detected an overcurrent condition for any virtual channel in the task. Reading this property clears the overcurrent status for all channels in the task. You must read this property before you read OvercurrentChans. Otherwise, you will receive an error. Details
Status:Overcurrent:Overcurrent Channels Indicates a list of names of any virtual channels in the task for which the device(s) detected an overcurrent condition. You must read OvercurrentChansExist before you read this property. Otherwise, you will receive an error. On some devices, you must restart the task for all overcurrent channels to recover. Details
Status:Overtemperature:Overtemperature Channels Exist Indicates if the device(s) detected an overtemperature condition in any virtual channel in the task. Reading this property clears the overtemperature status for all channels in the task. You must read this property before you read OvertemperatureChans. Otherwise, you will receive an error. Details
Status:Overtemperature:Overtemperature Channels Indicates a list of names of any overtemperature virtual channels. You must read OvertemperatureChansExist before you read this property. Otherwise, you will receive an error. Details
Status:Open Channels:Open Channels Exist Indicates if the device or devices detected an open channel condition in any virtual channel in the task. Reading this property clears the open channel status for all channels in this task. You must read this property before you read OpenChans. Otherwise, you will receive an error. Details
Status:Open Channels:Open Channels Indicates a list of names of any open virtual channels. You must read OpenChansExist before you read this property. Otherwise you will receive an error. Details
Status:Open Channels:Open Channels Details Indicates a list of details of any open virtual channels. You must read OpenChansExist before you read this property. Otherwise you will receive an error. Details
Status:Open Current Loop:Open Current Loop Channels Exist Indicates if the device(s) detected an open current loop for any virtual channel in the task. Reading this property clears the open current loop status for all channels in the task. You must read this property before you read OpenCurrentLoopChans. Otherwise, you will receive an error. Details
Status:Open Current Loop:Open Current Loop Channels Indicates a list of names of any virtual channels in the task for which the device(s) detected an open current loop. You must read OpenCurrentLoopChansExist before you read this property. Otherwise, you will receive an error. Details
Status:Open Thermocouple:Open Thermocouple Channels Exist Indicates if the device(s) detected an open thermocouple connected to any virtual channel in the task. Reading this property clears the open thermocouple status for all channels in the task. You must read this property before you read OpenThrmcplChans. Otherwise, you will receive an error. Details
Status:Open Thermocouple:Open Thermocouple Channels Indicates a list of names of any virtual channels in the task for which the device(s) detected an open thermcouple. You must read OpenThrmcplChansExist before you read this property. Otherwise, you will receive an error. Details
Status:Overload:Overloaded Channels Exist Indicates if the device(s) detected an overload in any virtual channel in the task. Reading this property clears the overload status for all channels in the task. You must read this property before you read OverloadedChans. Otherwise, you will receive an error. Details
Status:Overload:Overloaded Channels Indicates a list of names of any overloaded virtual channels in the task. You must read OverloadedChansExist before you read this property. Otherwise, you will receive an error. Details
Status:Input Limits Fault:Input Limits Fault Channels Exist Indicates if the device or devices detected a sample that was outside the upper or lower limits configured for each channel in the task. Reading this property clears the input limits fault channel status for all channels in the task. You must read this property before you read InputLimitsFaultChans. Otherwise, you will receive an error. Note: Fault detection applies to both positive and negative inputs. For instance, if you specify a lower limit of 2 mA and an upper limit of 12 mA, NI-DAQmx detects a fault at 15 mA and -15 mA, but not at -6 mA because it is in the range of -12 mA to -2 mA. Details
Status:Input Limits Fault:Input Limits Fault Channels Indicates the virtual channels that have detected samples outside the upper or lower limits configured for each channel in the task. You must read InputLimitsFaultChansExist before you read this property. Otherwise, you will receive an error. Details
Status:Phase-Locked Loop:Unlocked Channels Exist Indicates whether the PLL is currently locked, or whether it became unlocked during the previous acquisition. Devices may report PLL Unlock either during acquisition or after acquisition. Details
Status:Phase-Locked Loop:Unlocked Channels Indicates the channels that had their PLLs unlock. Details
Status:Power Supply Fault:Power Supply Fault Channels Exist Indicates if the device or devices detected a power supply fault condition in any virtual channel in the task. Reading this property clears the power supply fault status for all channels in this task. You must read this property before you read PowerSupplyFaultChans. Otherwise, you will receive an error. Details
Status:Power Supply Fault:Power Supply Fault Channels Indicates the virtual channels that have detected a power supply fault. You must read PowerSupplyFaultChansExist before you read this property. Otherwise, you will receive an error. Details
Status:Synchronization:Unlocked Channels Exist Indicates whether the target is currently locked to the grand master. Devices may report PLL Unlock either during acquisition or after acquisition. Details
Status:Synchronization:Unlocked Channels Indicates the channels from devices in an unlocked target. Details
Status:Accessory:Accessory Insertion or Removal Detected Indicates if any device(s) in the task detected the insertion or removal of an accessory since the task started. Reading this property clears the accessory change status for all channels in the task. You must read this property before you read DevsWithInsertedOrRemovedAccessories. Otherwise, you will receive an error. Details
Status:Accessory:Devices with Inserted or Removed Accessories Indicates the names of any devices that detected the insertion or removal of an accessory since the task started. You must read AccessoryInsertionOrRemovalDetected before you read this property. Otherwise, you will receive an error. Details
Status:Remote Sense Error:Remote Sense Error Channels Exist Indicates if the device(s) detected an error condition of the remote sense connection for any channel in the task. You must disable the output and resolve the hardware connection issue to clear the error condition. You must read this property before you read the Remote Sense Error Channels property. Otherwise, you will receive an error. Details
Status:Remote Sense Error:Remote Sense Error Channels Indicates a list of names of any virtual channels in the task for which a remote sense connection error condition has been detected. You must read Remote Sense Error Channels Exist before you read this property. Otherwise, you will receive an error. Details
Status:Aux Power Error:Aux Power Error Channels Exist Indicates if the device(s) detected an auxiliary power supply error condition for any channel in the task. Reading this property clears the error condition status for all channels in the task. You must read this property before you read the Aux Power Error Channels property. Otherwise, you will receive an error. Details
Status:Aux Power Error:Aux Power Error Channels Indicates a list of names of any virtual channels in the task for which an auxiliary power supply error condition has been detected. You must read the Aux Power Error Channels Exist property before you read this property. Otherwise, you will receive an error. Details
Status:Reverse Voltage Error:Reverse Voltage Error Channels Exist Indicates if the device(s) detected reverse voltage error for any of the channels in the task. Reverse voltage error occurs if the local voltage is equal to the negative saturated voltage. Reading this property clears the error condition status for all channels in the task. You must read this property before you read the Reverse Voltage Error Channels property. Otherwise, you will receive an error. Details
Status:Reverse Voltage Error:Reverse Voltage Error Channels Indicates a list of names of all virtual channels in the task for which reverse voltage error condition has been detected. You must read the Reverse Voltage Error Channels Exist property before you read this property. Otherwise, you will receive an error. Details
Status:Advanced:ChangeDetection:Overflowed Indicates if samples were missed because change detection events occurred faster than the device could handle them. Some devices detect overflows differently than others. Details
Advanced:Raw Data Width Indicates in bytes the size of a raw sample from the task. Details
Advanced:Number of Channels Indicates the number of channels that DAQmx Read reads from the task. This value is the number of channels in the task or the number of channels you specify with ChannelsToReadDetails
Advanced:Digital Input:Number of Booleans Per Channel Indicates the number of Booleans per channel that NI-DAQmx returns in a sample for line-based reads. If a channel has fewer lines than this number, the extra Booleans are FALSE. Details
Advanced:Wait Mode Specifies how DAQmx Read waits for samples to become available. Details
Advanced:Sleep Time Specifies in seconds the amount of time to sleep after checking for available samples if WaitMode is Sleep. Details
Was this information helpful?