Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

Can i have more than 1 PID closed loop in a VI?

Hai

I need to have 64 closed loop to control 64 temperature values, read using thermocouple's. Also i need to supply the option of if the closed loop should be P, PI, PD, or PID. Does any one have already built VI which does this?, or can anyone give me some suggestion on how to achive this?, I have used the Simple PID VI, supplied along with LV RT and have modified it as per my needs, i mean i have added an extra input to the PID through which i can specify the "control type", array of "setpoints" and "process variable, this PID gives an "array of output". This VI seems similar to the one supplied along with LV, but internally is quite different . I would be willing to supply this VI to any one if they will look in to it and would certify that the modification is valid and will not cause any errorneous output.

Regards
Arun
0 Kudos
Message 1 of 2
(2,962 Views)
Hello Arun,

It is certainly possible to implement multiple PID control loops. There are two methods you could use to implement this.

The first method is to implement parallel loops in a VI for each temperature sensor/heater system. Each one of these loops would contain a PID VI and would operate on one temperature sensor. This could become tedious to implement with 64 systems to control.

The second method is to implement all 64 channels of PID within one control loop. This method exploits the fact that the PID VI included with the RT Module is polymorphic. This means that the VI can take in inputs and outputs of several different datatypes. One of the allowed datatypes for the PID VI is an array of doubles (DBL). To see this just wire an array of doubles to the setpoint input of the PID VI. You’ll notice that the setpoint, PID gains, output, and output range terminals all change to arrays. These arrays of inputs and outputs allow you to implement multi-channel PID loops in a single while loop.

Implementing P, PI, PD, or PID controllers can be done by manipulating the PID gains that are inputted to the PID VI. This is discussed in more detail in this thread:

http://forums.ni.com/ni/board/message?board.id=170&message.id=98087

I hope this helps out. Please let me know if there is anything I can clarify or help with.

Ken S.
Applications Engineering
National Instruments
0 Kudos
Message 2 of 2
(2,947 Views)