Data Acquisition Toolbox doesn't work with Simulink

조회 수: 5 (최근 30일)
Daniel P
Daniel P 2012년 10월 29일
Hello,
I am using the NI 9188 Chassis with different Modules for IO purpose. It works properly with Matlab and the Data Acquisition Toolbox, that means things like
myDAQ = daq.createSession('ni');
myDAQ.addAnalogInputChannel('cDAQ9188-AI' , 'ai0' , 'Voltage');
myDAQ.DurationInSeconds = measurement_time;
myDAQ.Rate = measurement_rate;
myDAQ.startForeground();
are working fine. But when I try the In- and Output Blocks within Simulink, the Blocks only say: Device: none, and I'm not able to configure anything.
I am using Windows XP with NIDAQmx Driver and Matlab 2012a. Things like daq.getVencors oder daq.getDevices are showing up the correct hardware.
What I found out is, that my Hardware is only able to deal with the session base interface. Isn't it supportet with Simulink?
Thanks for any efforts in advance.

채택된 답변

Pedro Villena
Pedro Villena 2012년 10월 29일
편집: Pedro Villena 2012년 11월 12일
If you use Real-Time Windows Target Blockset, check if your hardware is in the list of supported hardware.
If you use xPC Target Blockset, check if your hardware is in the list of supported hardware.
Yes, Data Acquisition Toolbox provides blocks that are only available using the Legacy interface and the 32-bit version of MATLAB.
  댓글 수: 2
Daniel P
Daniel P 2012년 10월 29일
편집: Daniel P 2012년 10월 29일
My hardware seems unfortunately not to be supported by them. I've tried another blockset, called daqlib, wich I thought is supposed to work with any of the here listed hardware:
My Chassis is the NI9188 and the Modules are NI9205 and NI9402.
Do you have any further ideas? Thanks for your help so far.
Daniel P
Daniel P 2012년 10월 30일
The Data Acquisition Toolbox appears to me as a Blockset. It's displayed in the same level as the others are.
S-Function could be a solution for e.g. outputting single values to an analog output, but what if I need a whole Signal, for example a Sine with a special duration?
Thanks so far.

댓글을 달려면 로그인하십시오.

추가 답변 (2개)

Sachin Ganjare
Sachin Ganjare 2012년 10월 29일
  댓글 수: 3
Daniel P
Daniel P 2012년 10월 29일
Hey, I was already gone through this. There is no solution for my problem.

댓글을 달려면 로그인하십시오.


Daniel P
Daniel P 2012년 11월 2일
I have tried the following: Create an s-function for analog input.
In the initialisation function i create the session. in the output fuction I call the inputSIngleScan().
Is this a proper way to do this?
THanks for helping

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by