LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

PID with Digital output and USB 6212

I want to perform PID control using a USB-6212. I know that I can do it using counters. However the counters are only two and the digital I/O plenty. Thus, the real question is: can I perform PID using digital I/O of a USB-6212.
 
Thanks in advance
0 Kudos
Message 1 of 8
(3,409 Views)
Hi Thorfano,
 
Thanks for posting!  I have a few questions for you.
 
• Are you using the LabVIEW PID Control Toolkit?
• What exactly does your application entail (i.e. what are you using the digital lines for)?
 
The digital lines on the USB 6212 are static (i.e. not clocked).  Thus, you will have software timed DIO.  If you need a hardware sample clock, I would recommend using the analog output channels or the counters.  You can find several examples of PID control in the LabVIEW Example Finder by searching “PID”.
 
Rod T.
Message 2 of 8
(3,385 Views)

Thank you very much for your reply. Yes, I use the PID Control Toolkit and I have already manage to perform PID control using the counters. My real question is if there is a chance to use digital lines to perform PID control. If yes, I wonder if there is an example to advise.

Thanks in advance

0 Kudos
Message 3 of 8
(3,363 Views)

Hi thorfano,

I understand it will be difficult to use the digital lines of the 6212 to perform PID control since they are static, as RT4CY pointed. What exactly (what type of sensor) are you measuring in your current application? What is the input signal to your PID circuit? Are you using any kind of encoder? Is this the same you want to measure with the digital lines?

Ana P
National Instruments
Applications Engineer
Message 4 of 8
(3,335 Views)

Thank you Ana for your reply. I want to perform temperature control. I measure a voltage signal using an AI voltage DAQmx, and I use this voltage to calculate the temperature (through an equation) which is the input signal to my PID circuit.

Best Regards

0 Kudos
Message 5 of 8
(3,329 Views)

Hi thorfano,

I’m a little confused about your application; from your last post I understand you are measuring the Analog Input voltage to control the temperature. However, before you said you were using the counters. My main question is, do you want to use the Digital lines to be the output of your PID circuit or you want to connect the inputs to them. If it is the first one, I understand you can manipulate the results of the PID circuit to be digital value and output that in a Digital Output line. If it is the second case, and you want to connect the inputs to the digital lines it won’t be possible to measure an analog voltage using the Digital inputs lines. Thorfano, I hope this is helpful, if not please post back.

Ana P
National Instruments
Applications Engineer
0 Kudos
Message 6 of 8
(3,297 Views)
Hi thorfano,
 
As Ana mentioned, you can use the digital lines to be the output of your PID circuit.  However, please keep in mind that the digital lines on your device are static (software-timed).  If you would like an example on how to generate a PWM output using a digital line, please see the following  knowledge base article. 
Rod T.
0 Kudos
Message 7 of 8
(3,291 Views)

Thank you Ana and RT4CY for your help. The example that RT4CY sent seems to be exactly what I need. If I have further problem in applying it to my system I will contact again.

Best Regards

0 Kudos
Message 8 of 8
(3,269 Views)