Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

PID in Simulink with USB 6009 NI

Hi Folks,

 

I got a problem with the USB 6009 NI when I connect a PID Controller to an Analog Output in the Simulink.

 

PID with Simple Sample Analog Output Error.JPG

 

I would like to know how do I use the PID Controller without select a Discrete-Time in the Time Domain (in the PID Controller Block Configuration), because I need to use a Continuous-Time.

 

Thank in Advantage.

 

Best Regards

Pedro Ivo Allevato

0 Kudos
Message 1 of 4
(5,013 Views)

Hello Pedro,

 

Based on your picture, I believe you are using the Data Acquisition Toolbox for MATLAB®.This product was created and is currently supported by The MathWorks, Inc. As such, I recommend contacting them with any further questions or issues with this toolbox.

 

That being said, I found a DAQ in Simulink tutorial that contains your exact error (page 24) and a potential solution (using an Embedded MATLAB function with a PUTSAMPLE operation). Also, you can easily use the USB 6009 to perform PID control using:

 

LabVIEW

LabVIEW PID & Fuzzy Logic Toolkit

 

MATLAB® is a registered trademark of The MathWorks, Inc. Other product and company names listed are trademarks and trade names of their respective companies.

 

Regards,

 

Andrew Brown

Software Engineer
National Instruments
0 Kudos
Message 2 of 4
(4,991 Views)

Hi Andrew,

 

Thanks for the reply, I had this Tutorial in which you said, It's fantastic! I've solved this problem using a Zero-Order Hold Block to discretize my signal instead using the Embedded Block, because my Matlab doesn't have this one.

 

I have one more question, do you have some materials about Level Controller using USB 6009 NI with Matlab (Simulink)?

 

Thanks in advantage.

 

Best Regards,
Pedro Allevato

0 Kudos
Message 3 of 4
(4,971 Views)

Hello Pedro,

 

The following may be useful:

 

KnowledgeBase 23KH8MG4:

 

http://digital.ni.com/public.nsf/allkb/1F8D330AA1DDC7448625699F000168D3

 

Regards,

 

Tom L.
0 Kudos
Message 4 of 4
(4,953 Views)