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 on the DataAcquisition interface, see The DataAcquisition Object.
To learn more about how to communicate with CompactDAQ devices, see Interface Workflow.
Data Acquisition Toolbox™ software is compatible with only specific versions of the
NI-DAQ driver, and is not guaranteed to work with any other versions. For a
list of the NI-DAQ driver versions that are compatible with Data Acquisition Toolbox software, see https://www.mathworks.com/hardware-support/data-acquistion-software.html,
and click the link for this vendor.
To see your installed driver version, 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 version in the DriverVersion field does not match
the minimum requirements specified on the product page on the MathWorks
website, use the Add-On Manager 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 are
using unsupported drivers. For the latest NI-DAQ drivers, visit the
National Instruments® website at https://www.ni.com/.
To find driver version in the National Instruments Measurement & Automation Explorer:
Click Start > Programs > National Instruments > Measurement & Automation Explorer.
Select Help > System Information.
Use the Test Panel to troubleshoot your National Instruments 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 operating, 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 National Instruments hardware support, visit https://www.ni.com/.
An interface object can might silently be deleted while executing a
background operation. This could be caused by the object going out of scope
at the end of a MATLAB function, before the background task completes. To
avoid this, insert a pause after starting the
operation.
If you try to get vendor information using
daqvendorlist, and receive one of the following
errors:
NI-DAQmx driver mismatch:
Diagnostic Information from vendor: NI: There was a driver error while loading the MEX file to communicate with National Instruments hardware. It is possible that the NI-DAQmx driver is not installed or is older than the required minimum version of '8.7'.
Install the NI-DAQmx driver of version specified in the error message.
If you have a version of the NI-DAQmx driver already installed, update your installation to the minimum required version suggested in the error message.
No vendors found:
No data acquisition vendors available.
Reinstall Data Acquisition Toolbox software and applicable support packages.
Corrupted or missing toolbox components:
Diagnostic Information from vendor: NI: The required MEX file to communicate with National Instruments hardware is not in the expected location.
Reinstall Data Acquisition Toolbox software and applicable support packages.
Diagnostic Information from vendor: NI: The required MEX file to communicate with National Instruments hardware exists but appears to be corrupt.
Reinstall Data Acquisition Toolbox software and applicable support packages.
If you try to find information using daqlist
and:
Do not see the expected device listed, refresh the toolbox, with
daqreset
If you still do not see the expected devices, go to the National Instruments Measurement & Automation Explorer (NI MAX) and examine the devices installed on your CompactDAQ chassis.
Receive one of the following errors
No data acquisition devices
available.
Go to NI MAX and examine the devices installed on your CompactDAQ chassis.
If you cannot see your devices in NI MAX, check to see if you have turned on and connected your chassis.
If you have turned on and connected your
chassis and issued daqreset,
and you can see the devices in NI MAX, reinstall
Data Acquisition Toolbox software.
The requested subsystem does not exist on
this device.
You could be:
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.
If you are using NI 9402 with the counter/timer subsystem with the cDAQ-9172 chassis, plug the module into slots 5 or 6 only. If you plug the module into one of the other slots, it will not show any counter/timer subsystem.
If you are using an Ethernet or WiFi network CompactDAQ chassis, reserve the chassis in National Instruments Measurement & Automation Explorer (NI Max) first. Only one system can reserve this chassis at a time. For more information, see Why can't Data Acquisition Toolbox detect my NI DAQ devices connected through a cDAQ network chassis?.
If you 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.
Identify the DataAcquisition that is currently not using this device but has reserved it, and release the associated hardware resources. If the device is reserved by:
Do one of the following:
Use release to release
the device from the other DataAcquisition.
Delete the other DataAcquisition object.
Do one of the following:
Use release to release
the device from the other DataAcquisition.
Delete the other DataAcquisition object.
Exit the other MATLAB program.
Exit the other application.
In these measures do not work, reset the device from NI MAX.
Note
Your network device might also appear as unsupported in the device information if it is reserved or disconnected.
If your network device appears as unsupported or unavailable,
make sure that the device is connected and reserved in
National Instruments Measurement and Automation Explorer. Use
daqreset to reset devices
settings.
If you see this timeout error when communicating with a network device:
Network timeout error while communicating with device 'cDAQ9188-1595393Mod4'
reconnect the device in National Instruments Measurement and Automation Explorer and execute
daqreset in MATLAB to reset the devices
settings.
If you see this error when you synchronize acquisition using an external clock,
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 DataAcquisition Rate property
value.
When you try to synchronize operations using a PXI 447x series device, you see this error:
"DSA device 'PXI1Slot2' does not support sample clock synchronization. Check device's user manual.
National Instruments DSA devices like the PXI 447x, do not support sample clock
synchronization. You cannot synchronize these devices in the DataAcquisition
interface using addclock.
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.
You cannot use a PXI 4461 and a 4462 together for synchronization, when the PXI 4461 is in the timing slot of the chassis.
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.
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, when you start it you achieve near-simultaneous acquisition and generation. See Automatic Synchronization for more information.
To simultaneously acquire and generate synchronized analog signals in the same DataAcquisition, try using an external trigger.
An input single scan on counter input channels might return a
NaN. 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.
Adding an external clock to your DataAcquisition might not trigger a scan
unless you set the Rate property value to match the
expected external clock frequency.
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 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 may need to match the DataAcquisition rate to the device scan rate to get accurate readings. Refer to your device documentation for information.
MOTU devices Ultralight-mk3 and Traveler-mk3 may not work with DirectSound and Data Acquisition Toolbox versions R2014a and R2014b. If you have these devices, specify the device to use stereo pairs:
In your MOTU Audio Console check "Use Stereo Pairs for Windows Audio" check box.
Specify desired sample rate in the Sample Rate field.