08-07-2009 11:08 AM
Hi,
I am trying to reach a target value at a specified rate (say at the rate of 0.2 per minute until it reaches 10) without inserting the loop time delay vi. I do not want to delay the loop time. I need the loop to run as fast as it can for my PID control.
I have written the vi for increasing the variable to the target value but it seems I am missing something. I tested the logic in debug mode and the logic seems good to me but when I run the vi the target value is reached instantaneously.
I have attached the vi, can someone please tell me what am I missing here?
Thanks.
08-10-2009 01:53 PM
Good Afternoon sharmaa,
Is this ramp the setpoint for the PID control or is it an independent function? If it is independent, put the ramp and the PID in parallel loops so they can run at their own rates.
Either way, you can use the iteration count to decide when to change the output value because you know how fast the loop will run.
If you are using Emulation mode as your debug mode, then the timing will not accurate because it only tests logic.
08-11-2009 12:52 PM
Hi AE Charlie,
Thank you for your reply.
The ramp is the setpoint for the PID control.
How will I know how fast the Loop is going to run unless I have a timing VI? Is there a way? If so please do let me know. I am new to Labview. I wanted to avoid the timing VI in the loop, but if I have to place that there then I can do as you have suggested.
Thanks,
Aashish
08-12-2009 10:18 AM
Good Morning Aashish,
You will need to use a timing VI or a Timed Loop (in the Structures palette) to set how fast the loop is running.
If you want the loop to run as fast as possible and simply monitor the loop rate, you can use the tick count (ms) VI. There are very few cases when you would want a loop on your PC VI without some kind of timing. Timing VIs allow your computer to properly assign resources so that all programs can run smoothly together.
08-14-2009 08:42 AM