10-20-2021 04:55 AM
10-20-2021 10:08 AM - edited 10-20-2021 10:14 AM
@Ahmed_Shoihy wrote:- As the output has to be Function in time. for example, (PID=0 output the SSR =0, PID Output = 10% relay has to be open for x seconds, ....)
You are going to have to code this yourself. But basically you need to come up with a "timing interval" and use the PID output to set a "duty cycle" for the relay during that timing interval.
10-20-2021 11:28 AM
@RTSLVU wrote:
@Ahmed_Shoihy wrote:- As the output has to be Function in time. for example, (PID=0 output the SSR =0, PID Output = 10% relay has to be open for x seconds, ....)
You are going to have to code this yourself. But basically you need to come up with a "timing interval" and use the PID output to set a "duty cycle" for the relay during that timing interval.
- Lets say you are measuring your temperature at 10 second intervals
- %10 duty cycle would be Relay ON for 1 second and OFF for 9 seconds.
- %20 duty cycle would be Relay ON for 2 seconds and OFF for 8 seconds.
- See where I am going with this?
This could work but could also have the temperature have swings that are pretty big instead of steadying out.
Most SSRs could probably switch on in under a millisecond. So instead of 1 second on and 9 off, consider you could speed it up a lot and turn it on for 5 milliseconds then off for 20 if you needed a 20% duty cycle, and it would be a lot closer to an analog value.
What hardware do you have for this? Is it a NI DAQ or something else?
10-20-2021 11:43 AM - edited 10-20-2021 11:44 AM
@Kyle97330 wrote:
@RTSLVU wrote:
@Ahmed_Shoihy wrote:- As the output has to be Function in time. for example, (PID=0 output the SSR =0, PID Output = 10% relay has to be open for x seconds, ....)
You are going to have to code this yourself. But basically you need to come up with a "timing interval" and use the PID output to set a "duty cycle" for the relay during that timing interval.
- Lets say you are measuring your temperature at 10 second intervals
- %10 duty cycle would be Relay ON for 1 second and OFF for 9 seconds.
- %20 duty cycle would be Relay ON for 2 seconds and OFF for 8 seconds.
- See where I am going with this?
This could work but could also have the temperature have swings that are pretty big instead of steadying out.
Most SSRs could probably switch on in under a millisecond. So instead of 1 second on and 9 off, consider you could speed it up a lot and turn it on for 5 milliseconds then off for 20 if you needed a 20% duty cycle, and it would be a lot closer to an analog value.
What hardware do you have for this? Is it a NI DAQ or something else?
That was just a simple example but... Our Thermotron thermal chambers default to 60 second integral time for heating and they don't overshoot by more than a degree or two when using a static setpoint.
BTW: Tuning the PID can be a task in itself.
10-20-2021 12:02 PM
@RTSLVU wrote:
@Kyle97330 wrote:
@RTSLVU wrote:
@Ahmed_Shoihy wrote:- As the output has to be Function in time. for example, (PID=0 output the SSR =0, PID Output = 10% relay has to be open for x seconds, ....)
You are going to have to code this yourself. But basically you need to come up with a "timing interval" and use the PID output to set a "duty cycle" for the relay during that timing interval.
- Lets say you are measuring your temperature at 10 second intervals
- %10 duty cycle would be Relay ON for 1 second and OFF for 9 seconds.
- %20 duty cycle would be Relay ON for 2 seconds and OFF for 8 seconds.
- See where I am going with this?
This could work but could also have the temperature have swings that are pretty big instead of steadying out.
Most SSRs could probably switch on in under a millisecond. So instead of 1 second on and 9 off, consider you could speed it up a lot and turn it on for 5 milliseconds then off for 20 if you needed a 20% duty cycle, and it would be a lot closer to an analog value.
What hardware do you have for this? Is it a NI DAQ or something else?
That was just a simple example but... Our Thermotron thermal chambers default to 60 second integral time for heating and they don't overshoot by more than a degree or two when using a static setpoint.
BTW: Tuning the PID can be a task in itself.
I think a while back, there were cars with poorly tuned cruise control which was just a closed loop PID, and they would end up oscillating wildly out of control and cause crashes.
10-20-2021 12:25 PM
Hi,
@Kyle97330 wrote:
Most SSRs could probably switch on in under a millisecond. So instead of 1 second on and 9 off, consider you could speed it up a lot and turn it on for 5 milliseconds then off for 20 if you needed a 20% duty cycle, and it would be a lot closer to an analog value.
Depending on the switched circuitry you are limited to main supply frequencies: 50Hz in most of Europe, 60Hz in the US.
In this case you (should) use AC-SSR switching at zero voltage crossing.
In our lab we used an interval of 4s, which relates to 50Hz*4=200 full sine waves or 400 half waves. This allows us to set the PWM at 0.25% steps while avoiding switching ON at higher voltages…
10-21-2021 05:49 AM
As Hardware I used:
It is a third party from a company called Tinkerforge.
10-21-2021 08:33 AM - edited 10-21-2021 08:44 AM
Thanks for replying! really Appreciate it!
I divided the Output Signal into 11 stages using event structure starting form PID.
For this, i used a Numeric Slider "represent Virtual PID output just for testing now" in the range 0 %_ 100%.
by the way: There is block that allows the Relay to be On in a specific time, which is used it for this Loop.
Now i have 3 different time range that needed to be in right sequence:
I put it in a way that:
Questions:
Attached the desired code named: Heater_Control.Vi
Thanks for your Attention!
what shall I do to transfer the PID output range to be a readable signal for the Relay?
- As the output has to be Function in time. for example, (PID=0 output the SSR =0, PID Output = 10% relay has to be open for x seconds, ....) how can I initiate such a function using LABVIEW
- OR are there any other options to get this Done?
The system that I used is: "Master Brick connected with SSR Bricklet and Thermocouple Bricklet" Tinkergorge third party and Programmed using LabVIEW.
Thanks