This content is not available in your preferred language.
The content is shown in another available language. Your browser may include features that can help translate the text.
DAQmx Driver:The DAQmx Reset VI and Self-Test functions are located in the Measurement I/O»NI-DAQmx»Dev Config palette on the Block Diagram.
LabWindows/CVI & ANSI C:
The DAQmx Reset and Self-test functions can be found in Libraries»NI-DAQmx Library»Advanced»Device Control.
DAQmx Reset: Function prototype: int32 DAQmxResetDevice (const char deviceName) Example: int errorResult = DAQmxResetDevice("Dev1");
DAQmx Self-Test: Function prototype: int32 DAQmxSelfTestDevice (const char deviceName) Example: int selfTestResult = DAQmxSelfTestDevice("Dev1");
To perform a DAQmx reset or self-test in C# you must first have a Device object for your DAQ device and then you can call the reset or self-test functions on the Device object.
DAQmx Reset:Function prototype: void Device.Reset();Example: Device dev = DaqSystem.Local.LoadDevice("Dev1"); dev.Reset();
DAQmx Self-Test:Function prototype: void Device.SelfTest();Example: Device dev = DaqSystem.Local.LoadDevice("Dev1"); dev.SelfTest();
Visual Basic. NET:
Similar to C# .NET, to perform a DAQmx reset or self-test in Visual Basic. NET you need a Device object to call the reset and self-test functions.
DAQmx Reset:Function prototype: Public Sub Reset()Example: Dim dev As Device = DaqSystem.Local.LoadDevice("Dev1") dev.Reset()
DAQmx Self-Test:Function prototype: Public Sub SelfTest()Example: Dim dev As Device = DaqSystem.Local.LoadDevice("Dev1") dev.SelfTest()
The Reset Device function is usually used at the beginning or end of a program. If the Reset Device is used in the middle of a program it will immediately abort all active tasks associated with a device, disconnect any routes, and return the device to an initialized state. Aborting a task immediately terminates the currently active operation, such as a read or a write. Aborting a task puts the task into an unstable but recoverable state. To recover the task in NI-DAQmx, use DAQmx Start to restart the task or use DAQmx Stop to reset the task without starting it. The reset process is asynchronous and the function returns before reset completion. For more information on these functions please see the NI-DAQmx help files.
LabVIEW Help: DAQmx Reset Device (VI)
Collaborate with other users in our discussion forums
A valid service agreement may be required, and support options vary by country.