Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Matlab Data Acquisition Toolbox 2.11 not registering PCI MIO-16-E4

I am using Matlab DAQ toolbox 2.11, but for some reason it is not registering the NI PCI MIO-16-E4 card installed on the computer. But for everything else (winsound, parallel) it works.
The NI automation software interacts with the device, and we can see the card under the windows device manager, so it is not because we installed the card improperly. The DAQmx driver we're using is 8.6.1.

We've been talking to the matlab technicians over the phone for the past week and there seems to be no progress at all, so I thought i'd try my luck here. Thanks!

0 Kudos
Message 1 of 4
(3,758 Views)

Hi Jumbugale,

It is good to know that your card is seen under device manager and works in Measurement and Automation explorer. I may suggest also posting to this forum for further help, as it is actively monitored.



Message Edited by David L. on 01-30-2008 01:37 PM
David L.
Systems Engineering
National Instruments
0 Kudos
Message 2 of 4
(3,738 Views)
Hi,

Could you post the results of the command DAQSUPPORT?

Thanks,
-Rob
-----
Rob Purser
Manager, Test and Measurement
MathWorks
rob.purser@mathworks.com
0 Kudos
Message 3 of 4
(3,703 Views)
It turns out that the root problem was that the user did not have privileges to register the necessary file.

Under extremely rare circumstances, users with Administrative privileges may not have permissions to modify the registry.  Before proceeding you should check the following:

1) Contact your IT department and/or verify that you actually have administrative privileges.  Administrative privileges are always required to register Data Acquisition Toolbox adaptors.  

2) If you are using Windows Vista with User Account Control (UAC) enabled, you need to verify that you are running MATLAB in elevated mode.

3) Execute the following command in MATLAB.  

    system(['regsvr32 ' fullfile(matlabroot,'toolbox','daq','daq','private','mwnidaqmx.dll')])

The dialog box should produce an error message saying the "Return code was: 0x8007005".  This error code means E_ACCESSDENIED.  See the "invalid_permissions_error.png" link below for a sample of this dialog.  If the command produced a different error, then you have a different issue.

If you are confident that both of the above are satisfied, the issue may be that users in the "Administrators" group do not have permissions to modify or create the necessary registry keys.  Each key in the registry has its own permissions settings.

In order to resolve this issue, you need to track down the individual keys for which you do not have permissions and modify the permissions of those keys.  One way to do this is to use Process Monitor.   Process Monitor is an advanced monitoring tool for Windows that shows real-time file system, Registry and process/thread activity.  Process Monitor can be downloaded from:

http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx

After installing Process Monitor, start the application and have it capturing events.  please have it monitor the registering of DLL. You can then execute the following command again:

   system(['regsvr32 ' fullfile(matlabroot,'toolbox','daq','daq','private','mwnidaqmx.dll')])

Then stop the event capture.  Process Monitor should have at least one entry with an Access denied error.  The Process monitor generates quite a lot of output in one second. Make sure to stop monitoring quickly after the above command has completed.

For example, you may see that you do not have permissions to set the registry entry "HKCR\mwnidaqmx.adaptor.1".  Below is the Process Monitor line where the error is reported.  The output below was exported into CSV format.

"28381","3:10:18.6384469 PM","regsvr32.exe","1364","RegCreateKey","HKCR\mwnidaqmx.adaptor.1","ACCESS DENIED","Desired Access: Set Value","C:\WINDOWS\system32\regsvr32.exe","regsvr32 mwnidaqmx.dll"

This means that you can not set this specific key or perhaps its parent key.  HKCR stands for "HKey_CLASSES_ROOT".  In order to remedy the issue you will need to modify the permissions in the registry.  Modifying the registry is risky; therefore we recommend backing up the registry and any critical data on the computer prior to proceeding.

What you need to do is run "regedit" (from Start->Run) and then right-click the HKey_CLASSES_ROOT top level folder and select "permissions".  If necessary change the permissions on the key to grant local Administrators ‘Full Control’. Below are some screen shots showing permissions from a good entry.  If this key already has full control then search for the subkey "mwnidaqmx.adaptor.1" and verify its permissions.  Then try registering mwnidaqmw.dll again.  

This may not resolve the issue completely, as other keys may also be affected.  You may need to repeat the process of using Process Monitor to find what commands fail with the "ACCESS DENIED" error message and adjust their permissions also.
Sherryl Radbil
Data Acquisition Engineer
The MathWorks
0 Kudos
Message 4 of 4
(3,620 Views)