| Contents | Index |
| On this page… |
|---|
Session-Based Interface and Legacy Interface |
You can use National Instruments devices with both the session-based interface and the legacy interface. To see which interface you need to use, refer to National Instruments Usage Based on Functionality. For more information on the session-based information, see Using the Session-Based Interface.
daqhwinfo('nidaq')
AdaptorDllName: [1x63 char]
AdaptorDllVersion: '3.0 (R2011b)'
AdaptorName: 'nidaq'
BoardNames: {'PCI-4472'}
InstalledBoardIds: {'Dev4' '1'}
ObjectConstructorName: {2x3 cell}If the daqhwinfo('nidaq') command returns a warning about session-based interface, you have devices that require the session-based interface.
daqhwinfo('nidaq')
Warning: Devices were detected that require the DAQ Session Based Interface.
For more information, see documentation on the session-based interface
ans =
AdaptorDllName: [1x103 char]
AdaptorDllVersion: '3.0 (R2011b)'
AdaptorName: 'nidaq'
BoardNames: {1x13 cell}
InstalledBoardIds: {1x13 cell}
ObjectConstructorName: {13x3 cell}Refer to Introduction to the Session-Based Interface to learn how to communicate with CompactDAQ devices.
Data Acquisition Toolbox software is compatible only with 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, refer to the product page on the MathWorks Web site at http://www.mathworks.com/products/daq/supportedio.html and click on the link for this vendor.
To see your installed driver version in the session-based interface, type:
v = daq.getVendors
v =
Data acquisition vendor 'National Instruments':
ID: 'ni'
FullName: 'National Instruments'
AdaptorVersion: '3.0 (R2011b Prerelease)'
DriverVersion: '9.2.3 NI-DAQmx'
IsOperational: true
If the version in the DriverVersion field does not match the minimum requirements specified on the product page on the MathWorks Web site, you need to update your drivers.
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. Visit the National Instruments Web site at http://www.ni.com/ for the latest NI-DAQ drivers.
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 that 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 your National Instruments hardware support visit their Web site at http://www.ni.com/.
If you try to create a session using daq.createSession, and you see the following error:
??? The vendor 'ni' is not known. Use 'daq.getVendors()' for a list of vendors.
get vendor information by typing:
v = daq.getVendors
v =
Data acquisition vendor 'National Instruments':
ID: 'ni'
FullName: 'National Instruments'
AdaptorVersion: '2.17 (R2010b)'
DriverVersion: '9.1 NI-DAQmx'
IsOperational: true
If you do not see output like the one shown, see .
This warning:
A session was deleted while it was running.
occurs when you start background operations in the session and the session is silently deleted. This could be caused by the session going out of scope at the end of a MATLAB function, before the background task completes. To avoid this, insert a pause after daq.session.startBackground.
If you try to get vendor information using daq.getVendors in the session-based interface, 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.
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.
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.
If you try to find information using daq.getDevices and:
Do not see the expected device listed. For example, if you are looking for an NI 9263 and NI 9265 and you type:
d = daq.getDevices d = Data acquisition devices: index Vendor Device ID Description ----- ------ --------- ------------------------------ 1 ni cDAQ1Mod1 National Instruments NI 9205 2 ni cDAQ1Mod3 National Instruments NI 9203 3 ni cDAQ1Mod4 National Instruments NI 9201 4 ni cDAQ1Mod6 National Instruments NI 9213 6 ni cDAQ1Mod8 National Instruments NI 9265
To refresh the toolbox, type
daqreset
If you still do not see the 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 error
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 powered on and connected your chassis.
If you have powered 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 'AnalogInput' does not exist on this device.
You could be:
Using an output device to add input channels. See daq.getDevices to learn more about an installed device.
Using an unsupported device. See Unsupported Devices.
??? The requested subsystem 'AnalogOutput' does not exist on this device.
You could be:
Using an input device to add output channels. See daq.getDevices to learn more about an installed device.
Using an unsupported device. See Unsupported Devices.
If you are using NI 9402 with the counter/timer subsystem with the cDAQ-9172 chassis, you must 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 CompactDAQ chassis, reserve the chassis in National Instruments Measurement & Automation Explorer first. Only one system can reserve this chassis at a time.
If you receive the following error:
??? The hardware associated with this session is reserved. If you are using it in another session 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 session 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 daq.Session.release to release the device from the session that is not using the device.
Delete the session object.
Do one of the following:
Use daq.Session.release to release the device from the session that is not using the device.
Delete the session object.
Exit the MATLAB program.
Exit the other application.
In none of these measures work, reset the device from NI MAX.
Note Your network device may also appear as unsupported in the device information if it is reserved or disconnected. |
If you get device information and see a device listed with an asterisk (*) next to it, then the toolbox does not support this device.
d = daq.getDevices d = Data acquisition devices: index Vendor Device ID Description ----- ------ --------- ------------------------------- 1 ni cDAQ1Mod1 National Instruments NI 9401 2 ni cDAQ1Mod7 National Instruments NI 9219 3 ni cDAQ2Mod1 National Instruments NI 9205 4 ni cDAQ2Mod2 National Instruments NI 9263 5 ni cDAQ2Mod3 National Instruments NI 9203 6 ni cDAQ2Mod4 National Instruments NI 9201 7 ni cDAQ2Mod5 National Instruments NI 9265 8 ni cDAQ2Mod6 National Instruments NI 9213 9 ni cDAQ2Mod7 National Instruments NI 9227 10 ni cDAQ2Mod8 National Instruments NI 9422 11 ni Dev2 National Instruments PCIe-6363 12 ni Dev3 National Instruments USB-6255 13 ni Dev4 National Instruments USB-9233 14 ni Dev5 * National Instruments PCI-6601 15 ni Dev6 National Instruments PCI-6220 16 ni Dev8 * National Instruments PCI-6509 * Device currently not supported. See documentation on Unsupported Devices for more information.
Make sure your network device is not reserved and not disconnected.
Go to the Supported Hardware area in Data Acquisition Toolbox page on the MathWorks Web site for a list of supported devices.
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. Issue daq.reset 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 issue daq.reset to reset 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 session rate.
check your external clock for the presence of noise or glitches.
check the frequency of your external clock. Make sure it matches the session's rate.
When you try to synchronize operations using a PXI 447x series device, you will 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 currently synchronize these devices in the session-based interface using daq.Session.addClockConnection.
![]() | Hardware and Device Drivers | Legacy Interface Using All Devices | ![]() |

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |