Troubleshooting Tips
Find Devices and Create Data Acquisition Interface
Identify the devices you can access.
dev = daqlist
dev = 9×5 table VendorID DeviceID Description Model DeviceInfo _____________ ___________ ____________________________________________________ ________________________________________ ____________________ "ni" "Dev1" "National Instruments(TM) USB-6211" "USB-6211" [1×1 daq.DeviceInfo] "ni" "Dev2" "National Instruments(TM) USB-6218" "USB-6218" [1×1 daq.DeviceInfo] "ni" "Dev3" "National Instruments(TM) USB-6255" "USB-6255" [1×1 daq.DeviceInfo] "ni" "Dev4" "National Instruments(TM) USB-6509" "USB-6509" [1×1 daq.DeviceInfo] "ni" "PXI1Slot2" "National Instruments(TM) PXIe-6341" "PXIe-6341" [1×1 daq.DeviceInfo] "directsound" "Audio0" "DirectSound Primary Sound Capture Driver" "Primary Sound Capture Driver" [1×1 daq.DeviceInfo] "directsound" "Audio1" "DirectSound Headset Microphone (Plantronics BT600)" "Headset Microphone (Plantronics BT600)" [1×1 daq.DeviceInfo] "directsound" "Audio2" "DirectSound Primary Sound Driver" "Primary Sound Driver" [1×1 daq.DeviceInfo] "directsound" "Audio3" "DirectSound Headset Earphone (Plantronics BT600)" "Headset Earphone (Plantronics BT600)" [1×1 daq.DeviceInfo]
Create a DataAcquisition
object for a specific
vendor.
d = daq("ni")
For more information, see The DataAcquisition Object.
To learn more about how to communicate with CompactDAQ devices, see Interface Workflow.
Is My Device Driver Supported?
For information on device drivers supported by the toolbox, see Hardware Support from Data Acquisition Toolbox and click the link for your vendor. To view the version number of your driver, in MATLAB® type:
v = daqvendorlist
v = 5×4 table ID FullName AdaptorVersion DriverVersion _____________ ____________________________ ______________ _________________ "ni" {'National Instruments(TM)'} "4.1 (R2020a)" "18.5.0 NI-DAQmx" "adi" {'Analog Devices Inc.' } "4.1 (R2020a)" "1.0" "directsound" {'DirectSound' } "4.1 (R2020a)" "n/a" "digilent" {'Digilent Inc.' } "4.1 (R2020a)" "3.7.20" "mcc" {'Not Operational' } "4.1 (R2020a)" "unknown"
If the DriverVersion
field does not match the minimum
requirements specified on the product page on the MathWorks® website, use the Add-Ons panel to update your support
package.
If your driver is incompatible with Data Acquisition Toolbox™, verify that your hardware is functioning properly before updating drivers. If your hardware is not functioning properly, you might be using unsupported drivers.
NI-DAQmx Drivers
Data Acquisition Toolbox software is compatible with only specific versions of the NI-DAQmx driver, and is not guaranteed to work with other versions. For a list of the NI-DAQmx driver versions that are compatible with Data Acquisition Toolbox software, see NI-DAQmx Support from Data Acquisition Toolbox.
For the latest NI-DAQmx drivers, visit the NI™ website at
https://www.ni.com/
.To find your installed driver version in the NI Measurement & Automation Explorer use these steps:
In the Windows® taskbar, click Start > NI MAX.
In the Measurement & Automation Explorer select Help > System Information.
Measurement Computing™ (MCC) Drivers
For a list of the MCC driver versions that are compatible with Data Acquisition Toolbox software, see Measurement Computing DAQ Support from Data Acquisition Toolbox.
Cannot Find Hardware Vendor
Using daqvendorlist
to find vendor information can
result in one of the following errors:
No vendors found:
No data acquisition vendors available.
Missing toolbox components:
Diagnostic Information from vendor: NI: The required MEX file to communicate with National Instruments hardware is not in the expected location.
Corrupted toolbox components:
Diagnostic Information from vendor: NI: The required MEX file to communicate with National Instruments hardware exists but appears to be corrupt.
Possible Solution: Reinstall Data Acquisition Toolbox software and applicable support packages.
Cannot Initialize Driver
You can get an error with code -226
when you query for
information on a Measurement Computing (MCC) device using daqlist
. This error
indicates that the MCC adapter is not working because it failed to
initialize with the toolbox.
Possible Solution: Modify the incorrect entry in the Windows registry using these steps:
On your Windows machine, open the Registry Editor. You can do this by searching for "Registry Editor" in the taskbar or by right-clicking the "Start" button, selecting "Run," and typing
regedit
in the search box.Navigate to the folder:
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Measurement Computing\Instacal & Universal Library
.Make sure the folder is named "Instacal & Universal Library". For example, if the folder is named "Instacal", rename the folder to "Instacal & Universal Library" to fix the issue.
Close and restart MATLAB, then attempt to connect to your device again.
Cannot Detect My Device
If you try to find information using daqlist
and do not see the expected device listed, refresh
the toolbox and get a new device listing with these commands:
daqreset daqlist
If you still do not see the expected devices, try these steps.
Make sure that your system is properly set up as described in Set Up Your System for Device Detection.
NI Devices:
Go to the NI Measurement & Automation Explorer (NI MAX) and examine your devices to make sure your device is listed as available.
If you cannot see your device in NI MAX, check all device connections and power sources.
If you can see your device in NI MAX, run
daqreset
anddaqlist
in MATLAB again.If you are using an Ethernet or Wi-Fi® network CompactDAQ chassis or FieldDAQ device, reserve the chassis or device in NI MAX first. Only one system can reserve a network device at any one time. For more information, see Why can't Data Acquisition Toolbox detect my NI DAQ devices connected through a cDAQ network chassis?
Measurement Computing (MCC) Devices:
If your MCC device does not appear in the output of
daqlist
, close MATLAB and make sure that the device is working correctly in Instacal. You must configure the device in Instacal before MATLAB can recognize it.If your device is still not recognized in MATLAB, make sure your device is supported by checking Measurement Computing DAQ Support from Data Acquisition Toolbox.
ADALM Analog Devices®
If your ADALM device does not appear in the output of
daqlist
, close MATLAB and make sure that the device is working correctly in Pixelpulse. You must configure the device in Pixelpulse before MATLAB can recognize it.If your device is still not recognized in MATLAB, make sure your device is supported by checking Analog Devices ADALM1000 Support from Data Acquisition Toolbox.
Digilent® Devices
If your Digilent device does not appear in the output of
daqlist
, close MATLAB and make sure that the device is working correctly in WaveForms. You must configure the device in WaveForms before MATLAB can recognize it.If your device is still not recognized in MATLAB, make sure your device is supported by checking Digilent Analog Discovery Support from MATLAB.
Windows Sound Devices
If your Windows sound device does not appear in the output of
daqlist
, close MATLAB and make sure that the device is working correctly using Windows device manager.If your sound card is still not recognized in MATLAB, make sure your device is supported by checking Sound Card Support from Data Acquisition Toolbox.
Why Doesn’t My NI Hardware Work?
Use the Test Panel to troubleshoot your NI hardware. The Test Panel allows you to test each subsystem supported by your device, and is installed as part of the NI-DAQmx driver software. Right-click the device in the Measurement & Automation Explorer and choose Test Panel.
For example, to verify that the analog input subsystem on your PCIe-6363 device is working, connect a known signal (similar to the signal produced by a function generator) to one or more channels, using a screw terminal panel.
If the Test Panel does not provide you with the expected results for the subsystem, and you are sure that your test setup is configured correctly, then the hardware is not performing correctly.
For NI hardware support, visit https://www.ni.com/
.
Why Was My DataAcquisition
Object Deleted?
An interface object can be silently deleted while executing a background
operation. This can be caused by the object going out of scope at the end of
a MATLAB function, before the background task completes. To avoid this
issue, insert a pause
after starting the
operation.
What Is Hardware Reserved Error?
You can receive the following error:
The hardware is reserved. If you are using it in another object use the release function to unreserve the hardware. If you are using it in an external program exit that program. Then try this operation again.
If you receive this error, identify the DataAcquisition
object that is currently not using this device but has reserved it, and
release the associated hardware resources. If the device is reserved
by:
Another
DataAcquisition
object in the current MATLAB session, do one of the following:Use
release
to release the device from the otherDataAcquisition
object.Delete the other
DataAcquisition
object.
Another
DataAcquisition
object in a separate MATLAB session, do one of the following:Use
release
to release the device from the otherDataAcquisition
object.Delete the other
DataAcquisition
object.Exit the other MATLAB session.
Another application, exit that application.
If these measures do not work, reset the device from NI MAX.
Network Device Appears Unsupported
If your network device appears as unsupported or unavailable, make sure that the device is connected and reserved in the NI Measurement and Automation Explorer. Use
daqreset
to reset devices settings.You might receive this timeout error when communicating with a network device:
Network timeout error while communicating with device 'cDAQ9188-1595393Mod4'
If you receive this error, reconnect the device in the NI Measurement and Automation Explorer and execute
daqreset
in MATLAB to reset the devices settings.
Cannot Add Channels
Missing Subsystem
When you add a channel the toolbox can generate this error:
The requested subsystem does not exist on this device
This error can result from:
Using an output device to add input channels, or an input device to add output channels.
Using an unsupported device. See Data Acquisition Toolbox Supported Hardware.
Counter Channels
If you are using an NI 9402 with a counter/timer subsystem in a cDAQ-9172 chassis, plug the module only into slot 5 or 6. If you plug the module into any other slot, it does not show any counter/timer subsystem.
ADC Overrun Error with External Clock
When you synchronize acquisition using an external clock, the toolbox can generate this error:
ADC Overrun Error: If you are using an external clock, make sure that the clock frequency matches scan rate.
Check your external clock for the presence of noise or glitches.
Check the frequency of your external clock. Make sure that it matches the value of the
Rate
property of theDataAcquisition
object.
Cannot Add Clock Connection to PXI Devices
When you try to synchronize operations using a PXI 447x series device, the toolbox can generate this error:
DSA device 'PXI1Slot2' does not support sample clock synchronization. Check device's user manual.
NI DSA devices such as the PXI 447x do not support sample clock
synchronization. You cannot synchronize these devices in the data
acquisition interface using the addclock
function.
Cannot Complete Long Foreground Acquisition
When you try to acquire data in the foreground for a long period, you might get an out-of-memory error. Switch to background acquisitions and process data as it is received or save the data to a file to mitigate this issue.
Cannot Use PXI 4461 and 4462 Together for Synchronization
You cannot use a PXI 4461 and a 4462 devices together for synchronization when the PXI 4461 device is in the timing slot of the chassis.
Cannot Get Correct Scan Rate with Digilent Devices
The scan rate of a Digilent device can be limited by the hardware buffer size. See Digilent Analog Discovery Hardware Limitations for more information on maximum and minimum allowable rates.
Cannot Simultaneously Acquire and Generate Data with myDAQ Devices
You cannot acquire and generate synchronous data using myDAQ
devices because they do not share a hardware clock. If you have both input and output channels
in a DataAcquisition
object, when you start it you achieve near-simultaneous
acquisition and generation. See Automatic Synchronization for more
information.
Simultaneous Analog Input and Output Not Synchronized Correctly
To simultaneously acquire and generate synchronized analog signals in the
same DataAcquisition
object, try using an external
trigger.
Counter Single Scan Returns NaN
A single scan on counter input channels can return a NaN
result. If this occurs:
Make sure that the signal voltage complies with TTL voltage specifications.
Make sure that the channel frequency is within the specified frequency range.
External Clock Will Not Trigger Scan
Adding an external clock to your DataAcquisition
object
might not trigger a scan unless you set the Rate
property value to match the expected external clock frequency.
Why Does My S/PDIF Device Time Out?
S/PDIF audio ports appear in the device list even when you have no devices plugged in.
If you add this device (port) to your
DataAcquisition
object and you have no device plugged into the port, the operation times out.If you have a device plugged into the S/PDIF port, you might need to match the data acquisition rate to the device scan rate to get accurate readings. Refer to your device documentation for more information.
MOTU Device Not Working Correctly
MOTU devices Ultralight-mk3 and Traveler-mk3 might not work with DirectSound and Data Acquisition Toolbox. If you have these devices, specify the device to use stereo pairs:
In your MOTU Audio Console, select the Use Stereo Pairs for Windows Audio check box.
Specify the required sample rate in the Sample Rate field.