Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

PID on cRIO- 2 channels temperature control

Dear all,

 

I would like to control the output temperature coming from two differents inductions machines using PID on cRio.  So I should acquire temperature values from thermocouples try to correct them to the setpoint values, and accordingly send the output value to the machines via an Analog output module. The script should compare the SP to the PV, and sent frequency and PWM values (PWM is taken directly from the machine depending on the Voltage sent via the AO module) via Serail communication.

 

 

In the beginning, I wrote a script for one machine, which was completely written a real-time scan engine mode (control + serial communication). However, it was impossible to send data using an adapter for the RS 232 Dsub cable of the machine. the latter works perfectly when it is connected directly to the computer.

 

So I decided the use it in hybrid mode: Host + RT.  I've found a perfect reference example, which can be very good used for my application.  

I used it here, however, it is not sending out any information. The output value of the PID is all the time 0.

I tried to debug it, in different ways, but it is the same problem.

 

 

Hardware:  crio9035 

                   Ni 9212 temperatuee module

                   NI 9263 voltage output

 

here is the code to the reference example : 

 

https://forums.ni.com/t5/Example-Code/Reference-Example-Multi-channel-PID-Control-with-Operator/ta-p...

 

And you can find attached the code, combined with the serial com code.

 

I've been really struggling with this for a long, and the deadline to submit the work is soon.

For that, I would really appreciate any help/ hint/ idea from you, It would be very helpful.

 

Thanks in advance...

 

 

Tanieta

 

 

 

0 Kudos
Message 1 of 2
(717 Views)

As a start I would bypass the PID feedback control loop / temperature measurements and drive the output signal (via PWM) in open loop, so that you can make sure the connection from the LV variable through the PWM to the machine and then to the variable you want to regulate (temperature) works as it should.  It is easy to have one thing wrong within the feedback control loop, and because of the loop it will propagate around the loop and be difficult to find. By breaking the loop and operating in open loop, it becomes much easier to trace any problem.

Consultant Control Engineer
www-isc-ltd.com
0 Kudos
Message 2 of 2
(680 Views)