Filter löschen
Filter löschen

Error while Using USB 6001 with Simulink 2017a

4 Ansichten (letzte 30 Tage)
Ankit Gupta
Ankit Gupta am 31 Jul. 2017
Beantwortet: Ankit Gupta am 10 Aug. 2017
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 Kommentare
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 am 7 Aug. 2017
thank you, it works.

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Ankit Gupta
Ankit Gupta am 10 Aug. 2017
Thank you setting block size was the problem I was having with the error.

Weitere Antworten (0)

Community Treasure Hunt

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

Start Hunting!

Translated by