Realtime NI Daq data to Simulink using MATLAB's Data Acquisition Toolbox, session interface

조회 수: 17 (최근 30일)
For a university project I have been given a National Instruments' USB-6002 Data Acquisition Device and am trying to figure out a way to connect it to Simulink, where we develop most of our systems, for the purpose of using real data.
Reading about the Data Acquisition Toolbox, I understand that there have been Simulink blocks in the past, but the support for them was removed in R2016a together with the whole legacy interface. I read a vague suggestion that it would be "no problem to call matlab functions from simulink as a substitution for the blocks", but so far I am stumped.
In the session interface, first you have to create the said session, then add a channel, set parameters and either get a single read, or setup a listener that calls a function periodically to dump data. I understand how to capture data for a limited time frame, I found a few examples to get a graph that refreshes with new data almost as in real time, but I have troubles wiring that data to Simulink the way the blocks did. Was there a reason for their removal? How could I simulate their functionality?

채택된 답변

Swarooph
Swarooph 2016년 10월 20일
Much of this discussion depends on which version of MATLAB you are on. For the latest release, MATLAB R2016b, there ARE Simulink blocks for the Data Acquisition Toolbox.
  1. Here are the available Simulink blocks in the Data Acquisition Toolbox
  2. Here are a couple of examples with Simulink and National Instruments data acquisition device (USB-6211)
  댓글 수: 1
Stefan Gramatikov
Stefan Gramatikov 2016년 10월 20일
I am on R2016a, i just saw the release notes that they have been added as a new feature. Lost in versions, yeah. Thanks for pointing it out.

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

추가 답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by