From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Help with PID control for heaters in test loop

Hello,

 

I recently started learning LabVIEW (2020), so please bear with me. 

 

I am setting up an experiment loop to collect data on compressor performance.

 

The setup is essentially: Heater > Compressor Intake > Compressor Exhaust > Flow Meter (all connected inline with 1" pipe).

 

I need to collect temp from thermocouples, 4-20mA readings from pressure transducers, and 4-20mA readings from Delta-P meters across the compressor.

 

I wrote the Temp Measuring VI which reads from 5 thermocouples and stores the data as TDMS files automatically.

There will be another VI that will collect all pressure readings and save them as TDMS automatically as well.

I am having trouble with the Heater PID control program (SSR PID Control). I have the NI 9485 SSR with a Schneider Electric 240VAC SSR. The idea is to have the NI SSR activate the SE SSR. In the VI, I started a queue that collects data (DAQ Assistant) from the 2 thermocouple channels in the heater box. The data is then dequeued and the two channel values (most recent) are averaged. This is the process variable for the PID block. The output of the PID is multiplied by the relay period, etc to get the SSR time on/off. Since there are two heater coils in the box, there are 2 SE SSRs on the NI SSR card. I used digital write (1Line 1Point) to write the data to the SSR channels. My questions are as follows:

 

How can I track % time on/off?

How do I make sure I don't overshoot and burn the heaters when using digital outputs? They heat up within seconds, I'm told.

I would also like to include a safety function where the SSRs will not go high if there is no flow detected. How do I get the live data from the pressure reading VI into the SSR VI?

I would like error dialogs to pop up and stop the program if there are any issues with heating or the thermocouples shorting. How do I use the error block to show my custom messages?

How could this be improved? This is my first time doing anything like this, so feedback is appreciated.

0 Kudos
Message 1 of 2
(547 Views)

Hi rashidat,

 


@rashidat3131 wrote:
  1. How can I track % time on/off?
  2. How do I make sure I don't overshoot and burn the heaters when using digital outputs? They heat up within seconds, I'm told.
  3. I would also like to include a safety function where the SSRs will not go high if there is no flow detected. How do I get the live data from the pressure reading VI into the SSR VI?
  4. I would like error dialogs to pop up and stop the program if there are any issues with heating or the thermocouples shorting. How do I use the error block to show my custom messages?
  5. How could this be improved? This is my first time doing anything like this, so feedback is appreciated.

  1. Set a fixed sample rate instead of reading samples "on demand". Now you can simply count the samples to track time…
  2. Use proper PID gains. And use some safety circuits in your setup: this means they should act without any computer involved…
  3. Use a notifier to send data from your pressure reading VI to your PID loop…
  4. You need to define your own errors. Use the error ring…
  5. There's a lot to improve. I strongly recommend to start with replacing the DAQAssistent by "real" DAQmx code. It's more easy than you might think
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 2
(508 Views)