DaqSystem Class
- Updated2026-02-05
- 7 minute(s) read
Contains methods that access tasks, scales, and global channels stored in Measurement & Automation Explorer (MAX), performs immediate operations on DAQ hardware, and creates classes from which you can get information about the hardware.
Derives from
- MarshalByRefObject
- ISynchronizeCallbacks
- ISupportSynchronizationContext
Syntax
Namespace: NationalInstruments.DAQmx
public class DaqSystem : MarshalByRefObject, ISynchronizeCallbacks, ISupportSynchronizationContext
Remarks
Example applications are located in the <Public Documents>\National Instruments\NI-DAQ\Examples\DotNET4.x directory or in the Start menu at National Instruments»NI-DAQmx»NI-DAQmx Examples.
'Print the name of each task saved in MAX to the console
For Each taskName As string In DaqSystem.Local.Tasks
Console.WriteLine(taskName)
Next
//Print the name of each task saved in MAX to the console
foreach (string taskName in DaqSystem.Local.Tasks)
{
Console.WriteLine(taskName);
}
Thread Safety
All members of this type are safe for multithreaded operations.
Properties
| Name | Description |
|---|---|
| Devices | Indicates the names of all devices installed in the system. |
| DriverMajorVersion | Indicates the major portion of the installed version of NI-DAQmx, such as 7 for version 7.0. |
| DriverMinorVersion | Indicates the minor portion of the installed version of NI-DAQmx, such as 0 for version 7.0. |
| DriverUpdateVersion | Indicates the update portion of the installed version of NI-DAQmx, such as 1 for version 9.0.1. |
| GlobalChannels | Indicates an array that contains the names of all global channels saved on the system. |
| IsReadOrWriteLate | Obsolete: The IsReadOrWriteLate property is deprecated. Please use the Timing.SinglePoint.WaitForNextSampleClock method instead. Will warn if used |
| LastDaqWarning | Gets the DaqWarningEventArgs for the last DaqWarning event that occurred. |
| Local | Gets an instance of the DaqSystem class that represents the local DAQ system. |
| Scales | Indicates an array that contains the names of all custom scales saved on the system. |
| SwitchChannels | Obsolete: This property is obsolete. Will warn if used |
| SwitchRelays | Obsolete: This property is obsolete. Will warn if used |
| SwitchTopologies | Obsolete: This property is obsolete. Will warn if used |
| SynchronizeCallbacks | Specifies how events and callback delegates are invoked. |
| SynchronizingObject | Obsolete: Use SynchronizeCallbacks to specify that the object marshals callbacks across threads appropriately. Will warn if used |
| Tasks | Indicates an array that contains the names of all tasks saved on the system. |
Methods
| Name | Description |
|---|---|
| AddCDaqSynchronizationConnection(string) | Adds a cDAQ Sync connection between devices. The connection is not verified. |
| AddNetworkDevice(string, string, bool, double) | Adds a Network cDAQ device to the system and, if specified, attempts to reserve it. |
| AddNetworkDevice(string, string, double) | Adds a Network cDAQ device to the system. This method does not attempt to reserve the device after the device is successfully added. |
| AutoConfigureCDaqSynchronizationConnections(string, double) | Detects and configures cDAQ Sync connections between devices. |
| ClearLastDaqWarning() | Clears the value of the LastDaqWarning property, by setting the error code to zero and the error string to a blank string. |
| CloseSwitchRelays(string, bool) | Obsolete: This method is obsolete. Will warn if used |
| ConnectSwitchChannels(string, string, bool) | Obsolete: This method is obsolete. Will warn if used |
| ConnectSwitchChannels(string, bool) | Obsolete: This method is obsolete. Will warn if used |
| ConnectTerminals(string, string) | Creates a route between a source and destination terminal. |
| ConnectTerminals(string, string, SignalRoutingModifiers) | Creates a route between a source and destination terminal with the specified signal modification. |
| CreateSwitchScanTask(string, string) | Obsolete: This method is obsolete. Will warn if used |
| CreateWatchdogTimerTask(string, string, double, string[], WatchdogDOExpirationState[]) | Creates a task to configure and control the watchdog timer of a static DIO device. The timer activates when you start the task. |
| DeleteGlobalChannel(string) | Deletes the specified global channel that is stored in Measurement & Automation Explorer (MAX). |
| DeleteScale(string) | Deletes the specified custom scale that is stored in Measurement & Automation Explorer (MAX). |
| DeleteTask(string) | Deletes the specified task that is stored in Measurement & Automation Explorer (MAX). |
| DisconnectAll(string, bool) | Obsolete: This method is obsolete. Will warn if used |
| DisconnectSwitchChannels(string, string, bool) | Obsolete: This method is obsolete. Will warn if used |
| DisconnectSwitchChannels(string, bool) | Obsolete: This method is obsolete. Will warn if used |
| DisconnectTerminals(string, string) | Removes signal routes you created by using ConnectTerminals(string, string, SignalRoutingModifiers). |
| GetAnalogPowerUpStatesWithOutputType(string, out double[], out AOPowerUpOutputBehavior[]) | Gets the states that analog physical channels on a device are set to when the device powers up or when the device is reset. |
| GetDevicePowerUpState(string, out string[], out double[], out string[], out double[]) | Gets the power up states for analog physical channels. |
| GetDevicePowerUpState(string, out string[], out DigitalPullUpPullDownResistorState[]) | Gets the resistor level for lines when they are in tristate logic. |
| GetDevicePowerUpState(string, out string[], out DigitalPowerUpState[]) | Gets the power up states for digital physical lines. |
| GetDisconnectedCDaqSynchronizationPorts(string, double, out bool) | Verifies configured cDAQ Sync connections between devices. |
| GetLogicFamilyPowerUpState(string) | Gets the digital logic family for a device. |
| GetPhysicalChannels(PhysicalChannelTypes, PhysicalChannelAccess) | Gets an array that contains the physical channel names of devices installed in the system. |
| GetSavedChannelInfo(string) | Creates a SavedChannelInfo object that you can use to retrieve information about the specified global channel stored in Measurement & Automation Explorer (MAX). |
| GetSavedScaleInfo(string) | Creates a SavedScaleInfo object that you can use to retrieve information about the specified custom scale stored in Measurement & Automation Explorer (MAX). |
| GetSavedTaskInfo(string) | Creates a SavedTaskInfo object that you can use to retrieve information about the specified task stored in Measurement & Automation Explorer (MAX). |
| GetSwitchRelayCount(string) | Obsolete: This method is obsolete. Will warn if used |
| GetSwitchRelayCounts(string) | Obsolete: This method is obsolete. Will warn if used |
| GetSwitchRelayPosition(string) | Obsolete: This method is obsolete. Will warn if used |
| GetSwitchRelayPositions(string) | Obsolete: This method is obsolete. Will warn if used |
| GetTerminals(TerminalTypes) | Gets an array that contains the terminal names of devices installed in the system. |
| LoadDevice(string) | Creates a Device that you can use to control the specified device or get information about that device. |
| LoadPhysicalChannel(string) | Creates a PhysicalChannel that you can use to configure and retrieve TEDS information for the specified physical channel. |
| LoadScale(string) | Loads a scale that is stored in Measurement & Automation Explorer (MAX). |
| LoadSwitchChannel(string) | Obsolete: This method is obsolete. Will warn if used |
| LoadTask(string) | Loads a task that is stored in Measurement & Automation Explorer (MAX). |
| OpenSwitchRelays(string, bool) | Obsolete: This method is obsolete. Will warn if used |
| ReadIDPinMemory(string, string, out byte[], out uint) | Reads bitstream and format code from the memory connected to selected ID Pin. |
| RemoveCDaqSynchronizationConnection(string) | Removes a cDAQ Sync connection between devices. The connection is not verified. |
| SaveGlobalChannel(Channel, string, SaveOptions) | Saves the specified local or global channel to Measurement & Automation Explorer (MAX) as a global channel, under the virtual name it was given when it was created and with specified author and options values. |
| SaveGlobalChannel(Channel) | Saves the specified local or global channel to Measurement & Automation Explorer (MAX) as a global channel, under the virtual name it was given when it was created. |
| SaveGlobalChannelAs(Channel, string, string, SaveOptions) | Saves the local or global channel to Measurement & Automation Explorer (MAX) as a global channel, under the specified name and specified author and options values. |
| SaveGlobalChannelAs(Channel, string) | Saves the local or global channel to Measurement & Automation Explorer (MAX) as a global channel, under the specified name. |
| SaveScale(Scale) | Saves the specified custom scale to Measurement & Automation Explorer (MAX) under the name it was given when it was created. |
| SaveScale(Scale, string, SaveOptions) | Saves the specified custom scale to Measurement & Automation Explorer (MAX) under the name it was given when it was created and with specified author and options values. |
| SaveScaleAs(Scale, string, string, SaveOptions) | Saves the specified custom scale to Measurement & Automation Explorer (MAX) under the specified name and with specified author and options values. |
| SaveScaleAs(Scale, string) | Saves the specified custom scale to Measurement & Automation Explorer (MAX) under the specified name. |
| SaveTask(Task, string, SaveOptions) | Saves the specified task and any local channels it contains to Measurement & Automation Explorer (MAX) under the name it was given when it was created, with specifed author and options values. |
| SaveTask(Task) | Saves the specified task and any local channels it contains to Measurement & Automation Explorer (MAX) under the name it was given when it was created. |
| SaveTaskAs(Task, string) | Saves the task and any local channels it contains to Measurement & Automation Explorer (MAX) under the specified name. |
| SaveTaskAs(Task, string, string, SaveOptions) | Saves the task and any local channels it contains to Measurement & Automation Explorer (MAX) under the specified name and with specified author and options values. |
| SetAnalogPowerUpStatesWithOutputType(string, double[], AOPowerUpOutputBehavior[]) | Sets the states that analog physical channels on a device are set to when the device powers up or when the device is reset. |
| SetDevicePowerUpState(string, string[], double[], string[], double[]) | Updates the power up states to which to set analog physical channels on a device when the device powers up or when you reset the device. |
| SetDevicePowerUpState(string, string[], DigitalPullUpPullDownResistorState[]) | Sets the resistor level for lines when they are in tristate logic. |
| SetDevicePowerUpState(string, string[], DigitalPowerUpState[]) | Updates the power up states to which to set digital physical channels on a device when the device powers up or when you reset the device. |
| SetLogicFamilyPowerUpState(string, LogicFamily) | Sets the digital logic family to use when the device powers up. |
| SwitchFindPath(string, string) | Obsolete: This method is obsolete. Will warn if used |
| TristateOutputTerminal(string) | Sets a terminal to high-impedance state. |
| WriteIDPinMemory(string, string, byte[], uint) | Writes provided bitstream and format code to the memory connected to selected ID Pin. |
Events
| Name | Description |
|---|---|
| DaqWarning | Occurs when the NI-DAQmx driver issues a warning. |