Error while Using USB 6001 with Simulink 2017a

4 次查看(过去 30 天)
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
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-10
Thank you setting block size was the problem I was having with the error.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Inputs 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by