LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

PID controller with generated data as input

Hello there ,

 

1. I am trying to build a PID controller using my sensor which gives the output in voltage.

 

2. Already i have done some experiments and have the out of the sensor with me. The sensor data has 5 columns (1st column - Date , 2nd column - Computer time , 3rd column - Time in secs , 4th Sensor value 1, 5th column -  Sensor value 2) . The data from 3rd column and the 4th should be taken as the X and Y axis respectively .

 

3. I have attached the Vi that i have built (loading text file.vi) for getting the data from the sensor and displaying that.

 

4. I like to build a PID controller with the data i have given (Sensor data.txt) as the input to the PID controller.

 

5. I tried to connect the data that i have generated using the loading text file.vi to the PID controller , by using PID controller simulation example (which is already given in the PID tool kit).

 

6. There is a subVi named system in the PID controller i like to make this subvi to give out my data as the output to the feedback loop and take in the same .

 

Thanks in advance for the help,

Bala

 

 

0 Kudos
Message 1 of 15
(3,669 Views)

Hello Bala,

 

I would like to help you, but I have a few questions:

 

a) which LabVIEW version are you using?

b) which simulation example do you mean?

 

As I could extract from your post, I think that you would like to simulate an PID for this sensor, but what is the sense of the whole simulation, when it statically streams the data in and out from/to the PID? You want to replace a system SubVI, which calculates the PID and this should - in your opinion - just stream the data.

 

Best regards

 

Marian Vorderer
0 Kudos
Message 2 of 15
(3,599 Views)

Thank you for your reply Mr.Marian

 

Here are the explanations for the questions that you have asked ...

 

a) I am using the LabVIEW  7.0

 

b) i am talking about the "General PID simulation.vi" which has the sub vi named  " system ".

 

As you explain just the system need to stream the data that i have attached and that to be controlled  . Thank you..my mail id is   " balamurugan.varadarajan@draeger.com "

 

here i have also attached the general PID simulation. vi

0 Kudos
Message 3 of 15
(3,578 Views)

Hello Bala, we had a lot to do here, today. I will reply tomorrow!

Marian Vorderer
0 Kudos
Message 4 of 15
(3,566 Views)

Hello Bala,

 

I just installed LabVIEW 7.1 and found the necessary toolkit somewhere on our servers. Technically speaking: which input of the PID do you mean for connecting the text data: Do you want to connect the SetPoint (SP)-Input at the PID-Controller with your Sensor -Out? Which of the Sensor Out - Data do you want to use?

 

Best regards

 

Marian Vorderer
0 Kudos
Message 5 of 15
(3,548 Views)

Hello Marian....

 

Thanks for the effort . I will give the set point value for the PID seperately . I would like to connect the connect the sensor data that i have obtained as the process variable . Just like a sensor giving the output in its real time environment. So only i tried to put the generation of the output from the "system" subvi ( In the general PID simulation .vi example ). so that the system subvi can act as a virtual system.

 

i hope you get what i am trying to explain now.

 

thank you..

regards,

Bala

 

Message Edited by bala1234 on 02-11-2009 03:06 PM
0 Kudos
Message 6 of 15
(3,530 Views)

Hello Bala,

 

did you find the solution as explained on the phone?

 

Best regards

Marian Vorderer
0 Kudos
Message 7 of 15
(3,434 Views)

Hello Marion ,

 

I was a little busy and also i tried to contact you but you were not availble. I tried build a much simple version what i am trying to do . I have used two sine generator Vis one as the sensor input and another for the actuator to be controlled . But when i in the program when i try to run it The data is not transfered out of the PID.vi.

 

I hope this is a much simple problem and you can guide  me. I have attached the vi that i have built.

 

Thank you,

 

Bala

0 Kudos
Message 8 of 15
(3,416 Views)

Hello Bala,

 

I took a look at your VI. The data is not transfered to your graphs, because they are outside the while-loop! Keeping the Data-Flow-Model from LabVIEW in your mind, all output tunnels are written, as soon as the loop is finished. That means, that you see your data when you stop the loop.

 

Best regards

Marian Vorderer
0 Kudos
Message 9 of 15
(3,413 Views)

Hello Marion ,

 

Thank you as you said now i have put the graph inside the loop and i can can have a output in the graph but it stops. The out put is not getting controlled when the amplitute increases above the setpoint the output from the PID also increases in the negative dirtection and getting stopped at -100.

 

Hope when you run the vi also you will can get the problem.

 

Thank you,

 

Bala

0 Kudos
Message 10 of 15
(3,401 Views)