Borrar filtros
Borrar filtros

Error while Using USB 6001 with Simulink 2017a

4 visualizaciones (últimos 30 días)
Ankit Gupta
Ankit Gupta el 31 de Jul. de 2017
Respondida: Ankit Gupta el 10 de Ag. de 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 comentarios
Sharan Paramasivam Murugesan
Sharan Paramasivam Murugesan el 3 de Ag. de 2017
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 el 7 de Ag. de 2017
thank you, it works.

Iniciar sesión para comentar.

Respuesta aceptada

Ankit Gupta
Ankit Gupta el 10 de Ag. de 2017
Thank you setting block size was the problem I was having with the error.

Más respuestas (0)

Community Treasure Hunt

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

Start Hunting!

Translated by