09-12-2016 06:24 AM - edited 09-12-2016 06:29 AM
Hello,
I need to turn on a ventilator when the temperature gets to 65°C, and then only turn it off when the temperature gets to 55°C. Basically I need to turn it on with a higher value, and turn it off when it gets to a smaller value. I tried everything that I could, and none made this happen.
The image shows what I have right now. I have a PT100 that convert the temperature to voltage, and then I have to multiply the voltage to a specific number (60,1403.. in this case - linear coefficient) to know the temperature in Labview (minus the offset of each PT100). Then I put two exits in the module c-daq 9178. If the temperature is greater than 65°C, it turns one port of the module on, and if its smaller than 55°C it turns another port on. But i don't want it like this, because between 55°C and 65°C both ports are off, and i can't do anything with that. So, everything is wrong. I hope you can help me.
Solved! Go to Solution.
09-12-2016 06:31 AM
I would use shift registers to get information about the pervious state of the system. That will let you turn on the vent when the value is greater than 65 and the previous value is less than 65 and turn it off when the current value is less than 55 and the previous value was greater than 55. If neither of those two conditions are met, simply use the previous state of the boolean.
http://www.ni.com/getting-started/labview-basics/shift-registers
09-12-2016 07:24 AM
I did this and it didn't work.
09-12-2016 07:26 AM
Can you attach your code?
09-12-2016 07:33 AM
There is it. I haven't found a way to put the 55 code in it. How would I do it?
09-12-2016 07:44 AM
09-12-2016 07:48 AM
You don't have a "binary" (two-choice) situation, you have a "ternary" (three-choice) one -- do one thing when temperature is below 55, do another thing when temperature is above 65, and "keep doing the same thing" otherwise.
You have a "binary" action, namely the Ventilator is either On or Off. One easy way to handle ternary situations is to use a Shift Register to hold the current Action (On or Off). You now need two tests -- if the Temperature is <55, change the value on the Shift Register to Off, else (if the Temperature is >65, change the value on the Shift Register to On, else leave it alone).
Can you construct such a code? You'll need a Loop (to hold the Shift Register) and two Case Statements with appropriate "comparitors".
If it works, you're done. If it doesn't work, feel free to come back and attach your VI (do not attach a PNG picture of the Block Diagram -- we want to be able to edit your VI and to run it ...).
Bob Schor
09-12-2016 08:15 AM
Hi GerdW,
I'm sure it's simple for people that have the necessary knowledge of that. I don't understand automation as such, and i was just needing help. I'm sure I will need much more help for "simple things" like this one.
Thank you.
09-12-2016 08:18 AM
Hi Bob Schor,
Thank you so much for your explanation. As I said, i don't understand automation properly, but i'm learning slowly. You are very attentive and aren't ignorant with people that are new in this big world of automation.
Thank you so much.
09-12-2016 08:47 AM - edited 09-12-2016 08:51 AM
Hi 1234,
I don't understand automation as such
That's not related to such an understanding at all.
To start programming doesn't mean to start coding (in LabVIEW) - it means to think about the problem, to analyze the problem, to break up the problem in subproblems and then create an algorithm on a sheet of paper. When you have an idea of your algorithm you can start to create it in LabVIEW.
If you would have done it in this way you should have come up with a solution similar to mine…
(Having some understanding of or experience in "automation" might be helpful too as you requested a "simple control with hysteresis behaviour".)