LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

I have been trying to

use the vi with PID control. Everything is working fine on the labview. However, when I get my ruler to measure really what happened in the experimental apparatus, I do get way off results from the VI results. Can the problem due to the real time issue?To clarify the problem, I have a piston moves through the cylinder. In the simplified attached vi, the left hand side of the block diagram defines the velocity profile of the piston which is basically a trapezoidal. Then, I use the time in seconds coming from the loop delay on the right hand side of the block diagram. Then the output of the formula node goes to PID module to give the desired voltage to the selonoid valve to move the piston. Problems are;


1) When I keep the loop d
elay time at 1ms, the piston moves 2-3 times further than it suppose to move. Then, I change loop delay time to 2ms, 5ms, 10ms, 20ms... I always get DIFFERENT piston movement. Can it be due to the real time card problem? Do we need to buy a board which performs real time applications? Or Is there any other solution I can get away this problem. I only need time in seconds. I used the delay time to use the seconds. But, it is not helping me. Is there any source in labview like clock, I can get only in seconds so that I do not need to worry about delay time?

2) I am planing to use image processing tools in the Labview at the same vi? Do you think that will be a problem in terms of real time issue?

Thanks...
0 Kudos
Message 1 of 3
(2,353 Views)
use the vi with PID control. Everything is working fine on the labview. However, when I get my ruler to measure really what happened in the experimental apparatus, I do get way off results from the VI results. Can the problem due to the real time issue?Hello,

First of all, in a software-timed application, delay time is the actual control loop rate, and it has a direct effect on the system behavior. According to control theory, a control system must sample a physical
process at a rate about 10 times faster than the fastest time constant in the physical process. Therefore, you first need to determine the fastest time constant in the system ans choose your loop rate accordingly. If the required loop rate is faster then 1 ms (the fastest loop rate you can obtain in a software-timed loop) then you need to use a real-time hardware and apply hardware-timed loop. You can find many on-line example at
http://www.ni.com/devzone/dev_exchange/ex_search.htm
about this method.
Your current loop might take mo
re then 1 ms. To calculate it, you can use Sequence structure as shown in the attached VI. The problem might also be a PID tuning issue. As far as I understand this is a position control application and you are getting a very big steady-state error. You can refer the document linked below to get more information about PID tuning.
http://zone.ni.com/devzone/conceptd.nsf/webmain/4B7775373E4AE64986256B6000691505?opendocument

I hope this helps.
Best Regards,
Remzi A.
Application Engineering
National Instruments
Message 2 of 3
(2,353 Views)
use the vi with PID control. Everything is working fine on the labview. However, when I get my ruler to measure really what happened in the experimental apparatus, I do get way off results from the VI results. Can the problem due to the real time issue?Remzi,

Thanks for the answer. I attached snapshot of the front panel to introduce the problem I am facing with better. When I adjust the PID parameters, I am getting very nice trend in the set velocity (with white color) & Actual Velocity (with red color). However, when loop delay (seen in front panel) is changed, dramatic change happens in the physical set up. But, the front panel of the labview shows that everything is perfect. I would expect to see big changes between set and actual velocity diagrams at the front panel when I change the loop delay time. Basically, front panel misleads me when I change the loop delay time. So, My focus is ONLY loop delay since it is the source of the problem. I have tried to open up the file you have sent me
. However due to the version difference I could not see the file. I am using Labview 6.1

I have looked the PID tuning tutorial you sent me. Do you really think we need PID tuning problem? Can you suggest me any tool instead of using loop delay time?

Thanks for your time...
0 Kudos
Message 3 of 3
(2,353 Views)