Error while Using USB 6001 with Simulink 2017a

조회 수: 4 (최근 30일)
Ankit Gupta
Ankit Gupta 2017년 7월 31일
답변: Ankit Gupta 2017년 8월 10일
Hi All,
I am using NI USB 6001 with Matlab 2017a with DAQmx 16.0. I have created a simple simulink block (see attached) to test my daq device and I am getting while setting up block and sample rate. If I select "Input sample rate to be : 1000( or anything more then 200 and black size to be 200 I get following error:
Error in port widths or dimensions. Output port 1 of 'block_2017a/Analog Input' is a [200x1] matrix.
Component:Simulink | Category:Model error
Error in port widths or dimensions. Input port 1 of 'block_2017a/Selector' has 2 elements. This port does not accept the dimensions (or orientation) specified by the input signal.
Where as if I select Input sample rate to be 200 and block size to be 2 I dont get any error. I dont get it USB 6001 can accept up to 20KS/s thenwhy its giving error. Is there something wrong with the input settings of the Analog input .
Please let me know how can I troubleshoot this problem.
  댓글 수: 2
Sharan Paramasivam Murugesan
Sharan Paramasivam Murugesan 2017년 8월 3일
The error is occurring because of the "Input port size" parameter in the selector block being "2" while you are trying to pass in data of size 200 by giving "Block size" as 200 in "Analog input" block. If you are trying to get 200 samples in every block (i.e., Block size = 200), then modify the selector block parameters accordingly as well.
For details about Block size :
Ankit Gupta
Ankit Gupta 2017년 8월 7일
thank you, it works.

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

채택된 답변

Ankit Gupta
Ankit Gupta 2017년 8월 10일
Thank you setting block size was the problem I was having with the error.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by