NI-DAQmx .NET Framework 4.0 API Reference

Content Type
Programming Language
Current manual
Table of Contents

Device Class

Device Class

Device Class

Encapsulates a DAQ device and contains methods and properties that operate on devices outside the context of a task.

Inheritance Hierarchy

SystemObject
  SystemMarshalByRefObject
    NationalInstruments.DAQmxDevice

Namespace:  NationalInstruments.DAQmx
Assembly:  NationalInstruments.DAQmx (in NationalInstruments.DAQmx.dll) Version: 20.7.40.49302

Syntax

public class Device : MarshalByRefObject, IDisposable
Public Class Device
	Inherits MarshalByRefObject
	Implements IDisposable

The Device type exposes the following members.

Properties

  NameDescription
Public propertyAccessoryConnectionCount
Specifies the number of times a particular connection that results in tangible wear and tear of onboard components has been made on the accessory. This connection count is useful for tracking accessory life and usage.
Public propertyAccessoryProductNumbers
Indicates the unique hardware identification number for accessories connected to the device. Each array element corresponds to a connector. For example, index 0 corresponds to connector 0. The array contains 0 for each connector with no accessory connected.
Public propertyAccessoryProductTypes
Indicates the model names of accessories connected to the device. Each array element corresponds to a connector. For example, index 0 corresponds to connector 0. The array contains an empty string for each connector with no accessory connected.
Public propertyAccessorySerialNumbers
Indicates the serial number for accessories connected to the device. Each array element corresponds to a connector. For example, index 0 corresponds to connector 0. The array contains 0 for each connector with no accessory connected.
Public propertyAIBridgeRanges
Indicates pairs of input voltage ratio ranges, in volts per volt, supported by devices that acquire using ratiometric measurements. Each pair consists of the low value followed by the high value.
Public propertyAIChargeRanges
Indicates in coulombs pairs of input charge ranges for the device. Each pair consists of the low value followed by the high value.
Public propertyAICouplings
Indicates the coupling types supported by this device.
Public propertyAICurrentInternalExcitationDiscreteValues
Indicates the set of discrete internal current excitation values supported by this device.
Public propertyAICurrentRanges
Indicates the pairs of current input ranges supported by this device. Each pair consists of the low value, followed by the high value.
Public propertyAIFrequencyRanges
Indicates the pairs of frequency input ranges supported by this device. Each pair consists of the low value, followed by the high value.
Public propertyAIGains
Indicates the input gain settings supported by this device.
Public propertyAIMaximumMultiChannelRate
Indicates the maximum sampling rate for an analog input task from this device. To find the maximum rate for the task, take the minimum of AIMaximumSingleChannelRate or the indicated sampling rate of this device divided by the number of channels to acquire data from (including cold-junction compensation and autozero channels).
Public propertyAIMaximumSingleChannelRate
Indicates the maximum rate for an analog input task if the task contains only a single channel from this device.
Public propertyAIMinimumRate
Indicates the minimum rate for an analog input task on this device. NI-DAQmx returns a warning or error if you attempt to sample at a slower rate.
Public propertyAINumberOfSampleTimingEngines
Indicates the number of Analog Input sample timing engines supported by the device.
Public propertyAINumberOfSynchronizationPulseSources
Indicates the number of Analog Input synchronization pulse sources supported by the device.
Public propertyAIPhysicalChannels
Indicates an array containing the names of the analog input physical channels available on the device.
Public propertyAISampleModes
Gets the sample modes from devices that support sample clocked analog input.
Public propertyAISimultaneousSamplingSupported
Indicates if the device supports simultaneous sampling.
Public propertyAISupportedMeasurementTypes
Gets the measurement types supported by the physical channels of the device.
Public propertyAITriggerUsage
Indicates the analog input trigger types supported by this device.
Public propertyAIVoltageInternalExcitationDiscreteValues
Indicates the set of discrete internal voltage excitation values supported by this device. If the device supports ranges of internal excitation values, use AIVoltageInternalExcitationRangeValues to determine supported excitation values.
Public propertyAIVoltageInternalExcitationRangeValues
Indicates pairs of internal voltage excitation ranges supported by this device. Each pair consists of the low value, followed by the high value. If the device supports a set of discrete internal excitation values, use AIVoltageInternalExcitationDiscreteValues to determine the supported excitation values.
Public propertyAIVoltageRanges
Indicates pairs of input voltage ranges supported by this device. Each pair consists of the low value, followed by the high value.
Public propertyAnalogTriggerSupported
Indicates if the device supports analog triggering.
Public propertyAOCurrentRanges
Indicates pairs of output current ranges supported by this device. Each pair consists of the low value, followed by the high value.
Public propertyAOGains
Indicates the output gain settings supported by this device.
Public propertyAOMaximumRate
Indicates the maximum analog output rate of the device.
Public propertyAOMinimumRate
Indicates the minimum analog output rate of the device.
Public propertyAONumberOfSampleTimingEngines
Indicates the number of Analog Output sample timing engines supported by the device.
Public propertyAONumberOfSynchronizationPulseSources
Indicates the number of Analog Output synchronization pulse sources supported by the device.
Public propertyAOPhysicalChannels
Indicates an array containing the names of the analog output physical channels available on the device.
Public propertyAOSampleClockSupported
Indicates if the device supports the sample clock timing type for analog output tasks.
Public propertyAOSampleModes
Gets sample modes supported by devices that support sample clocked analog output.
Public propertyAOSupportedOutputTypes
Gets generation types supported by the physical channels of the device.
Public propertyAOTriggerUsage
Indicates the analog output trigger types supported by this device.
Public propertyAOVoltageRanges
Indicates pairs of output voltage ranges supported by this device. Each pair consists of the low value, followed by the high value.
Public propertyBusType
Indicates the bus type of the device.
Public propertyCarrierSerialNumber
Indicates the serial number of the device carrier. This value is zero if the carrier does not have a serial number.
Public propertyChassisModuleDeviceNames
Indicates an array containing the names of the modules in the chassis.
Public propertyCIMaximumTimebase
Indicates in hertz the maximum counter timebase frequency.
Public propertyCIMaxSize
Indicates in bits the size of the counters on the device.
Public propertyCIPhysicalChannels
Indicates an array containing the names of the counter input physical channels available on the device.
Public propertyCISampleClockSupported
Indicates if the device supports the sample clock timing type for counter input tasks.
Public propertyCISampleModes
Gets sample modes supported by devices that support sample clocked counter input.
Public propertyCISupportedMeasurementTypes
Gets the measurement types supported by the physical channels of the device.
Public propertyCITriggerUsage
Indicates the counter input trigger types supported by this device.
Public propertyCOMaximumTimebase
Indicates in hertz the maximum counter timebase frequency.
Public propertyCOMaxSize
Indicates in bits the size of the counters on the device.
Public propertyCompactDaqChassisDeviceName
Indicates the name of the CompactDAQ chassis that contains this module.
Public propertyCompactDaqChassisSlotNumber
Indicates the slot number in which this module is located in the CompactDAQ chassis.
Public propertyCompactRioChassisDeviceName
Indicates the name of the CompactRIO chassis that contains this module.
Public propertyCompactRioSlotNumber
Indicates the slot number of the CompactRIO chassis where this module is located.
Public propertyCOPhysicalChannels
Indicates an array containing the names of the counter output physical channels available on the device.
Public propertyCOSampleClockSupported
Indicates if the device supports Sample Clock timing for counter output tasks.
Public propertyCOSampleModes
Gets sample modes supported by devices that support sample clocked counter output.
Public propertyCOSupportedOutputTypes
Gets the generation types supported by the physical channels of the device.
Public propertyCOTriggerUsage
Indicates the counter output trigger types supported by this device.
Public propertyDeviceID
Gets the name of the device, as configured in Measurement Automation Explorer (MAX), to which this operation applies.
Public propertyDigitalFilterLowpassCutoffFrequencyDiscreteValues
Indicates the set of discrete lowpass cutoff frequencies supported by this device. If the device supports ranges of lowpass cutoff frequencies, use AI.DigFltr.Lowpass.CutoffFreq.RangeVals to determine supported frequencies.
Public propertyDigitalFilterLowpassCutoffFrequencyRangeValues
Indicates pairs of lowpass cutoff frequency ranges supported by this device. Each pair consists of the low value, followed by the high value. If the device supports a set of discrete lowpass cutoff frequencies, use AI.DigFltr.Lowpass.CutoffFreq.DiscreteVals to determine the supported frequencies.
Public propertyDigitalFilterTypes
Indicates the AI digital filter types supported by the device.
Public propertyDigitalTriggerSupported
Indicates if the device supports digital triggering.
Public propertyDILines
Indicates an array containing the names of the digital input lines available on the device.
Public propertyDIMaximumRate
Indicates the maximum digital input rate of the device.
Public propertyDINumberOfSampleTimingEngines
Indicates the number of Digital Input sample timing engines supported by the device.
Public propertyDIPorts
Indicates an array containing the names of the digital input ports available on the device.
Public propertyDITriggerUsage
Indicates the digital input trigger types supported by this device.
Public propertyDOLines
Indicates an array containing the names of the digital output lines available on the device.
Public propertyDOMaximumRate
Indicates the maximum digital output rate of the device.
Public propertyDONumberOfSampleTimingEngines
Indicates the number of Digital Output synchronization pulse sources supported by the device.
Public propertyDOPorts
Indicates an array containing the names of the digital output ports available on the device.
Public propertyDOTriggerUsage
Indicates the digital output trigger types supported by this device.
Public propertyExternalCalibrationDate
Gets the last date and time that the device underwent an external calibration.
Public propertyExternalCalibrationRecommendedInterval
Indicates in months the National Instruments recommended interval between each external calibration of the device.
Public propertyExternalCalibrationTemperature
Indicates in degrees Celsius the temperature of the device at the time of the last external calibration. Compare this temperature to the current onboard temperature to determine if you should perform another calibration.
Public propertyFieldDaqBankDeviceNames
Indicates an array containing the names of the banks in the FieldDAQ.
Public propertyFieldDaqDeviceName
Indicates the parent device which this bank is located in.
Public propertyIsSelfCalibrationSupported
Indicates whether the device supports self-calibration.
Public propertyIsSimulated
Indicates if the device is a simulated device.
Public propertyLowpassCutoffFrequenciesDiscreteValues
Indicates the set of discrete lowpass cutoff frequencies supported by this device. If the device supports ranges of lowpass cutoff frequencies, use LowpassCutoffFrequenciesRangeValues to determine supported frequencies.
Public propertyLowpassCutoffFrequenciesRangeValues
Indicates pairs of lowpass cutoff frequency ranges supported by this device. Each pair consists of the low value, followed by the high value. If the device supports a set of discrete lowpass cutoff frequencies, use LowpassCutoffFrequenciesDiscreteValues to determine the supported frequencies.
Public propertyMaxUserDefinedCalibrationInfoSize
Indicates the maximum length in characters of UserDefinedCalibrationInfo.
Public propertyNumberOfDmaChannels
Indicates the number of DMA channels on the device.
Public propertyPciBusNumber
Indicates the PCI bus number of the device.
Public propertyPciDeviceNumber
Indicates the PCI slot number of the device.
Public propertyProductCategory
Indicates the product category of the device. This category corresponds to the category displayed in MAX when creating NI-DAQmx simulated devices.
Public propertyProductNumber
Indicates the unique hardware identification number for the device.
Public propertyProductType
Indicates the product name of the device.
Public propertyPxiChassisNumber
Indicates the PXI chassis number of the device, as identified in MAX.
Public propertyPxiSlotNumber
Indicates the PXI slot number of the device.
Public propertyRecommendedAccessoryConnectionCountLimit
Indicates the recommended connection count limit for an accessory. If the accessory connection count exceeds this limit, the accessory could require maintenance.
Public propertySelfCalibrationDateTime
Gets the last date and time that the device underwent a self-calibration.
Public propertySelfCalibrationTemperature
Indicates in degrees Celsius the temperature of the device at the time of the last self-calibration. Compare this temperature to the current onboard temperature to determine if you should perform another calibration.
Public propertySerialNumber
Indicates the serial number of the device. This value is zero if the device does not have a serial number.
Public propertySwitch Obsolete.
Gets a Switch class for this device that contains properties and methods specific to switch devices.
Public propertyTcpipEthernetIP
Indicates the IPv4 address of the Ethernet interface in dotted decimal format. This property returns 0.0.0.0 if the Ethernet interface cannot acquire an address.
Public propertyTcpipHostname
Indicates the IPv4 hostname of the device.
Public propertyTcpipWirelessIP
Indicates the IPv4 address of the 802.11 wireless interface in dotted decimal format. This property returns 0.0.0.0 if the wireless interface cannot acquire an address.
Public propertyTedsHardwareTedsSupported
Indicates whether the device supports hardware TEDS.
Public propertyTemperature
Indicates in degrees Celsius the current temperature of the device.
Public propertyTimestampEngineCount
Indicates the number of timestamp engines available on the device.
Public propertyTimeTriggerCount
Indicates the number of time triggers available on the device.
Public propertyTimeTriggerSupported
Indicates whether the device supports time triggering.
Public propertyUserDefinedCalibrationInfo
Specifies a string that contains arbitrary, user-defined information. This number of characters in this string can be no more than MaxUserDefinedCalibrationInfoSize.
Top

Methods

  NameDescription
Public methodChangeExternalCalibrationPassword
Changes the external calibration password of the device.
Public methodCreateObjRef
Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
(Inherited from MarshalByRefObject.)
Public methodDeleteNetworkDevice
Deletes a Network DAQ device previously added to the host.
Public methodDispose
Releases all resources used by Device.
Protected methodDispose(Boolean)
Releases the managed and unmanaged resources used by Device or optionally releases only the unmanaged resources.
Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodGetHashCode
Serves as a hash function for a particular type.
(Inherited from Object.)
Public methodGetLifetimeService
Retrieves the current lifetime service object that controls the lifetime policy for this instance.
(Inherited from MarshalByRefObject.)
Public methodGetPhysicalChannels
Gets an array that contains the names of the physical channels on this device.
Public methodGetPossibleSCExpressCalibrationAccessoryConnections
Gets the available connections on an SC Express accessory for the specified physical channel(s).
Public methodGetTerminals
Gets an array that contains the names of the terminals on this device.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodInitializeLifetimeService
Obtains a lifetime service object to control the lifetime policy for this instance.
(Inherited from MarshalByRefObject.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Protected methodMemberwiseClone(Boolean)
Creates a shallow copy of the current MarshalByRefObject object.
(Inherited from MarshalByRefObject.)
Public methodReserveNetworkDevice
Reserves the Network DAQ device for the current host. Reservation is required to run NI-DAQmx tasks, and the device must be added in MAX before it can be reserved. This method does not override any existing reservations on the device.
Public methodReserveNetworkDevice(Boolean)
Reserves the Network DAQ device for the current host. Reservation is required to run NI-DAQmx tasks, and the device must be added in MAX before it can be reserved. Use this method to specify whether to override an existing reservation.
Public methodReset
Immediately aborts all active tasks associated with a device and returns the device to an initialized state.
Public methodRestoreLastExternalCalibration
Sets the self-calibration constants of the device to the current external calibration constants.
Public methodSelfCalibrate
Measures the onboard reference voltage of the device and adjusts the self-calibration constants to account for any error caused by short-term fluctuation in the operating environment.
Public methodSelfTest
Performs a brief test of the device resources. If a failure occurs, refer to your device documentation for more information.
Public methodStartExternalCalibration
Starts an external calibration session on a device.
Public methodToString
Returns a string representation of the object.
(Overrides ObjectToString.)
Public methodUnreserveNetworkDevice
Unreserves or releases a Network DAQ device previously reserved by the host.
Top

Remarks

Tip Tip
Example applications are located in the Public Documents\National Instruments\NI-DAQ\Examples\DotNET4.x directory or in the Start menu at National InstrumentsNI-DAQmxNI-DAQmx Examples.
You can use the Device class to perform operations on an NI-DAQmx device. You cannot instantiate the Device class directly. Instead, use the LoadDevice(String) method to obtain an instance of the Device class. For example, you can self-calibrate an NI-DAQmx device with the Device class.

Examples

Dim dev as Device
dev = DaqSystem.Local.LoadDevice("dev1")
dev.SelfCalibrate()

Examples

Device dev = DaqSystem.Local.LoadDevice("dev1");
dev.SelfCalibrate();

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Was this information helpful?