Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

nidaqmx tools with Matlab 2008a

I downloaded these tools and when I run Matlab, I get the following error:
 
??? XML-file failed validation against schema located in:
C:\Program Files\MATLAB\R2008a\sys\namespace\info\v1\info.xsd
XML-file name: c:\program files\matlab\r2008a\toolbox\natinst\daq\info.xml
To retest the XML-file against the schema, call the following java method:
com.mathworks.xml.XMLValidator.validate(...
    'c:\program files\matlab\r2008a\toolbox\natinst\daq\info.xml',...
    'C:\Program Files\MATLAB\R2008a\sys\namespace\info\v1\info.xsd', true)
Errors:
org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was found starting with element
'area'. One of '{MathWorksID, type}' is expected.
 
Any thoughts?

>>
0 Kudos
Message 1 of 8
(5,867 Views)

Hi dbarth,

 

Could you provide more details about the problems you are getting? I'm a bit unclear on what you are trying to accomplish and the error you are getting. What exactly do you have to do (steps) to get this error? Does this happen when you open specific software or does it happen when you try to run a specific application? What version of the DAQmx drivers did you download? Did this error started to happen after downloading the drivers? Did you have another version of the drivers before? Was it working before? Thanks,

Ana P
National Instruments
Applications Engineer
0 Kudos
Message 2 of 8
(5,844 Views)
Thanks Ana,

The error occurs when I first load MatLab.

Actually the fix is simple. The 'info.xml' needs a slight fix. The folks at Mathworks are aware of this and editted it for me.

I haven't tested all of the NIDAQmx tools on my M series boards, but the ones I have tested work fine with 2008a.

It turns out that all of these "tools" were written in LabView and compiled into a library using the Math Interface Toolbox. So anyone who really wants to access all of their NI board functions from Matlab (i.e. the timer/counter calls) should master this approach.

I have installed the full LabView development software (including Math Interface Toolbox) but am a bit overwhelmed. All I want to do is to be able to write some routines (without GUI stuff) that I can call from MatLab and get around weaknesses in the Data Acquisition Toolbox by MathWorks (which is great by the way for most things). If I can get quick at this, I may just use this approach instead of the MathWorks toolbox.

There doesn't seem to be any comprehensive documentation to lead a novice to the Math Interface Toolbox through some examples on how to proceed. So let me pose a specific example.

I want to write a "VI" (mex file compiled for MatLab) that will accept an ARRAY of channel numbers to perform AD of a specified number of points from an M series board at some specified speed, with external trigger, and return the data to an array in MatLab. Could you or the engineer who wrote the great NIDAQmx tools guide me through this basic process or lead me to a tutorial that does so?

Remember, the point is to stay in the MatLab environment and have the flexibility to call mex files that I create with your Math Interface Toolbox to get precision IO done with no limitations on the remarkable features that your boards offer.

I assure you that if you can make this bridge easy for me, a LARGE number of folks will benefit!

Thanks,

Dan

0 Kudos
Message 3 of 8
(5,832 Views)

Hi dbarth,

These are some good resources to get started with the Math Interface Toolkit. This video demonstrates how to use the toolkit; also this developer zone might be really helpful. In case that you need more information there are some good links at the product page. I suggest looking at this forum for further help, and also you may want to post your question there because it is actively monitored. I hope this is helpful,

Ana P
National Instruments
Applications Engineer
0 Kudos
Message 4 of 8
(5,766 Views)
Thanks Ana,

The Develpoer site was quite helpful.


0 Kudos
Message 5 of 8
(5,757 Views)
Dear bdarth,

Can you tell how exactly did you fix file info.xml?

I have the same error message and it's annoying...
0 Kudos
Message 6 of 8
(4,927 Views)

This worked for me.  Edit the info.XML file at the path indicated in MATLAB's err message.  First lines may look like this:

<productinfo>
<matlabrelease>12</matlabrelease>
<name>NI-DAQmx Tools</name>
<area>toolbox</area>
<icon>$toolbox/natinst/daq/ni_eagle.gif</icon>

 

That 4th line, which tries to set the 'area' to be 'toolbox' is confusing MATLAB.  Must set 'type' not 'area'.  Change that line to this:

<type>toolbox</type>

0 Kudos
Message 7 of 8
(4,807 Views)

P.S.

 

Only edit the NI 'info.XML'   Edit one with path like:

c:\program files\matlab\r2008a\toolbox\natinst\daq\info.xml

 

Not the one in \toolbox\daq\daq 

0 Kudos
Message 8 of 8
(4,806 Views)