From: Sara Brunner on
Hi!

I'm trying to read data from a NI PCI-6052e data acquisition card via
Simulink.
The card works in Matlab and even in LabView. But I can't fix the
errors in Simulink.
Maybe I did the wrong settings.

I use a "PCI-6052E-AnalogInput"-Block from the Library:
Simulink\xPC Target\A/D\NationalInstruments\
and connect it to a scope (or a toFile block - the result doesn't
change).

When I built the model the following error message occurs in
Simulink:
Matlab Error Message: Error using ==> RTW.genMakefileAndBuild

In the Matlab-Workspace the list of errors is even longer. Most of
them detecting syntax-errors in .h files.

I use Matlab 7.2 and Simulink 6.4.

Simulation Parameters:
Solver: discrete Fixed-Step
Real-time-workshop: Interface: External Mode

Is there anything I forgot?

I'm thankful for any ideas.

cu Sara
From: Jan Houska on
Hi Sara,

it is best to start with some xPC Target demo model. This will help you
to verify that you have xPC Target set up correctly, running a simple
model, without the need to worry about the data acquisition board. When
you have this verified, you can add the driver block to the model.

However, I'm not sure if you are aware that to run xPC Target, you need
two connected computers. One will be the host, running MATLAB and
Simulink, the second will contain the data acquisition board and will be
the target. If you are looking for a single-computer solution, you may
want to try Real-Time Windows Target
<http://www.mathworks.com/products/rtwt> instead.

Good Luck, Jan


Sara Brunner wrote:
> Hi!
>
> I'm trying to read data from a NI PCI-6052e data acquisition card via
> Simulink.
> The card works in Matlab and even in LabView. But I can't fix the
> errors in Simulink.
> Maybe I did the wrong settings.
>
> I use a "PCI-6052E-AnalogInput"-Block from the Library:
> Simulink\xPC Target\A/D\NationalInstruments\
> and connect it to a scope (or a toFile block - the result doesn't
> change).
>
> When I built the model the following error message occurs in
> Simulink:
> Matlab Error Message: Error using ==> RTW.genMakefileAndBuild
>
> In the Matlab-Workspace the list of errors is even longer. Most of
> them detecting syntax-errors in .h files.
>
> I use Matlab 7.2 and Simulink 6.4.
>
> Simulation Parameters:
> Solver: discrete Fixed-Step
> Real-time-workshop: Interface: External Mode
>
> Is there anything I forgot?
>
> I'm thankful for any ideas.
>
> cu Sara


--

--
Jan Houska HUMUSOFT s.r.o.
houska(a)humusoft.com Pobrezni 20
http://www.humusoft.com 186 00 Praha 8
tel: ++ 420 284 011 730 Czech Republic
fax: ++ 420 284 011 740