02-23-2010 02:38 PM
Solved! Go to Solution.
02-24-2010 09:05 AM
Hi,
What kind of hardwares are availabe to you? You are dealing with a control problem, so you can either go analog or digital. If you go analog, you can do everything with circuit. You can build your PID with op-amps and caps.
If you want to go to the digital route, you still need some hardware for acquiring signal from pot and for driving servo motor, and the processing with be done digitally through LabVIEW. The only digital part is the PID. You still need to feed the pot output to an analog input through which the labview can receive the value for processing, and a analog output that would drive a driver circuit to drive your servo motor.
Pot signal -> Analog input -> PID (LabVIEW) processing
PID (LabVIEW) output -> Analog output -> driver circuit -> servo motor
Yik
02-24-2010 10:35 AM
Thanks for the reply.
I have a DAQPad-6015 available for acquiring the signals. I was planning on going digital as much as I can because I may have to change to a lead/lag controller later on.
So I will have to build a physical servo driver circuit that will move the servo based on the analogue output signal that labview will generate? Will I have to find these analogue values first, before I design the circuit or will I be able to somehow calibrate it when the circuit is built? Sorry if these are ridiculous questions, I am new to working with motors and have never used the control side of labview before.
Adam
02-24-2010 11:46 AM
Your LabVIEW PID control will generate a digital output through your hardware. The digital output out be a PWM that has variable duty cycle. That PWM will be fed into a driver, which is pretty much a high gain transistor that give you the current needed.
Think of it this way.
digital output -> driver -> motor
The driver is like a switch and the digital output is turning that switch on and off as needed to achieve the reference. Remember to put some transient protection in place, so that nothing blow up in your circuit. If you go digital, all control and calculations should be done in LabVIEW.
yik
02-24-2010 02:24 PM
Ah ok I think I see now.
Will I get the PWM output sinmply from the PID.vi in the PID control section or will I have to use the advnace one?
02-24-2010 04:52 PM
Try the regular one.
02-25-2010 06:42 AM
02-25-2010 09:01 AM
There is a very good example in LabVIEW that you an look at. To answer you question, you are going going to get a analog signal from the PID block. You need to generate your own digital waveform. For example, let say that the analog signal that you get from the PID block has value from 0-10. When the value is 0, you generate a pulse with 0% duty cycle. When the value is 10, you generate a pulse with 100% duty cycle. 5 -> 50%, 7 -> 70%.
Yik
02-25-2010 11:15 AM
Can you please tell me the name of this example? I tried searching duty cycle in the examples but I really dont know what I am looking for.
Sorry if this should be obvious.
02-25-2010 11:23 AM
PWM-Counter Output.vi would be perfect for you.