Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

pid conrol

im trying to program a system for my final year college project. basicaly its a pneumatic actuator with a proportional valve 5/3 connected to it and i have to keep it at the setpiont which is determined by a ldvt , im using a 6221 card on one analog input and one analoug output using pid control.

my problem is that the valves input is 0-10v ie 0v =in at full speed, 4.5 =in at low speed, 5 valve is closed fully, 5.5 is out at low speed and 10 is out at full speed.

and im having trouble getting it sorted as i keep using pid circuts which output  0-10 v but usually their output for 0 is off 5is half and 10 is full .if you know what i mean..

i know the solution is probably fairly simple i just  cant get my head around it. any help would be much appriciated

 

gordon g

 

 

0 Kudos
Message 1 of 6
(3,334 Views)

it's  all a question of scaling 😛

 

Subtract 5 and you have a -5,0,5 scale ... divide by 5  and you have a -100% (-1) ,0, 100% (1) scale .....

 

Later you might find that a simple linearisation doesn' perfectly fit for your valve  ....   

 

Browse the PID examples  (Help / Find examples ....) to get a starting point. 

 

 

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 2 of 6
(3,326 Views)
thanks il give that a try . my sensor is acting up and cant get the output rite so may be a while before i can try these methods but i dont think itl b quite that simple .. hope it is tho 🙂
0 Kudos
Message 3 of 6
(3,315 Views)

ok ok time for an update .. got the sensor working and hooked up, and its output range is aprox +6V to

-6V, ..

 

i tryed scaling the inputs and outputs , but some how the two pid blocks are still outputting 100 evebn though i have them set Max10 min 5 and max 0 and min 5 to control the valve correctly. iv attached the Vi the top half is of the vi is the bit im talking about the bottom bit is only the control for a distrubance actuator and it works fine ,any tips or help would be great

thanks

Gordon..

0 Kudos
Message 4 of 6
(3,284 Views)

I had a short look at your code.

Why are you using two PID control vis?

Why you convert the setpoint from DBL to dynamic data when the input of the PID is DBL? 

I have the impression that you currently have no idea about how PID controls are used ...    It is essential to know what the Three letters P I D stand for 😉     Hint: These are parameters you have missed to provide to the vi 😮

 Still a lot of homework to do.  

 

 

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 5 of 6
(3,260 Views)

"I have the impression that you currently have no idea about how PID controls are used ...  "

yes you are right. my understanding of pid was way off! i had a talk wit lecturer and he expalined it to me properly, now i realise that pid was way to complex for my relitivly simple system., therefore iv totaly scrapped it and i am now using just proportional control and its kinda working ok, but im sure il get it going with a bit of fiddling and tweeking with the values etc. iv attached the new one just to show you the diffrence hahaha thanks for your help

gordon

0 Kudos
Message 6 of 6
(3,252 Views)