Temperature Control Loop

I am new to Labview and am trying to do something that I think should be simple.  It is a control loop to perform a temperature control process.  Two setpoints are entered and the loop turns on the appropriate function to either heat or cool to that first setpoint.  Then it holds that temperature for a preset time and switches to the second setpoint (haven't gotten that far yet.)  It then turns on the heater or cooler to get to that next setpoint.  Once there it holds for a preset time.  My thought was to used the timed loop counter, feed the counter to an indicator while the it was not at temp, then once at temp store that counter value.  Once the difference between the stored value and the current counter was at a preset value switch the temperature set point.
The attachment is under the heading testing case statements, that is kind of the way it turned out.
I am currently learning on Labview 7.1.
I have attached my current code: Be gentle.
DrLarry
Attachments:
Testing Case Statements.vi ‏68 KB

I cleaned up your code some, but i cant post it as 7.1, i'll post it as 2010 and a picture. You were close.
/Y
LabVIEW 8.2 - 2014
"Only dead fish swim downstream" - "My life for Kudos!" - "Dumb people repeat old mistakes - smart ones create new ones."
G# - Free award winning reference based OOP for LV
Attachments:
Testing Case Statements.vi ‏14 KB

Similar Messages

  • How to come true a constant temperature control through PCI 7344

    I have one PCI-7344 to control three motors.I also need to come true a constant temperature control through 7344.
    using "Analog Input"and "Analog Reference",is it possible to come true the control.
    To come true it, what others I need?
    Waiting for your answer!
    Thanks
    帖子被langtian在12-20-2005 08:58 PM时编辑过了

    Langtian,
    In general the PID control loop of the 7344 can be used for a wide
    variety of control applications. You can use the analog inputs to
    acquire the feedback signals and the analog outputs to control e. g.
    torque, flow rates and so on. For temperature control the board seems
    to be a bit oversized as temperatures typically change very slowly
    compared to the high control loop rates of the 7344 but this shouldn't
    result in a problem.
    Please note that the "Analog Reference" Output can't be used for
    control tasks as this is a static analog output fixed to 7.5 V which
    can't be changed.
    For more information about how to use NI motion control boards with analog feedback please refer to this link and to this document.
    Best regards,
    Jochen Klier
    National Instruments Germany

  • Usb-6009 high-speed continuous acquisition for slow control loop application

    Hi,
    After watching a few Youtube videos, I successfully built a control loop in LabVIEW using my USB-6009. Currently, this loop is limited by the speed my actuator can take and respond to commands, topping out at 200 Hz. This is completely sufficient for my application. My question is more regarding the wasted potential of the USB-6009 to acquire samples at a much higher rate than what would be obtained if I used a simple single sample-on-demand during every iteration of the loop.
    It seems to me that having the USB-6009 continuously acquire samples and having my control loop periodically check in for the latest data when it is ready to execute would have the advantage of allowing me to average groups of samples together to lower the overall noise associated with the measurement process (I am reading voltages from an amplified photodiode).
    1) Does anyone know how I would instruct the USB-6009 to continuously acquire at say 10 kHz, so that on each loop I will have 50 or so samples that can be averaged together for a more accurate measurement of my control variable? Unfortunately, I'm new to this and not too familiar with DAQmx Timing.vi.
    2) I've heard that reading into a buffer can increase latency for moving data into the computer. Given the low speed of my control loop, I don't foresee this as being a problem. Is this a correct assumption? I can probably live with an extra millisecond of latency.
    3) I goofed around briefly with DAQmx Timing and managed to see a buffer overflow error. Certain rare events will by necessity cause my control loop to take much longer to execute, so I cannot guarantee that occasionally during normal operation I will not overflow the buffer. Can I suppress this error so that the dialog box does not pop up and the program continues to run uninterrupted? If the buffer overflows and old data gets overwritten it isn't a big deal for me since the control loop is only concerned with the latest data anyway.
    Thanks for any info!

    Howdy Patrick!
    Here is a picture of the front panel:
    Here is the block diagram:
    And I've attached a copy of the VI saved for LabVIEW 7.1.
    Regards,
    Barron
    Applications Engineering
    National Instruments
    Attachments:
    most recent samples.vi ‏73 KB

  • Performance issues using control references in Analog control loop?

    My main vi of a tensile tester control application calls a number of sub-vi's, including a analog control loop which controls the test. The control loop must update some boolean and digital indicators and respond to user input on the front panel of the main vi during a test.
    To simplify my main vi, I moved the control loop code into a sub-vi, and used control references to access the controls and indicators on the front panel. However, this has dramatically affected my loop performance, and the loop can no longer keep up with the acquisition speed.
    Do control references always cause such a slowdown? Is there anything that I can do besides moving the code back into the main vi?
    Thank You,
    David Creech

    I have had the same problem. I have discovered other funny things about references also; some kind of memory management (or mismamagement?) is taking place behind the scenes.
    Regardless, you can often do away with the references by passing the initial state of a control or indicator into the subvi, changing it inside, and passing the altered state back to the caller. Once back in the caller you update the front panel control or indicator by using a local variable.
    One thing to watch out for if using this scenario is the dreaded race condition; this can be avoided using a state machine. Check out
    http://www.advmeas.com/goodies/statemachine.html
    for a good example. It is a shame that references behave in this way; it limits thier usefulness.
    Perhaps someo
    ne else will point out a way to utilize them more sucessfully?

  • Timed Loop timing source - Control Loop From Task is too slow

    I'm trying to make a Timed Loop run at a period of 2 ms, with an analog input task running at 50 kHz as timing source. The input analog signal is scaled and fed into a synchronised analog output task on the same multifunction DAQ board. Using the built-in 1 kHz or 1 MHz clock as timing source for the Timed Loop works great, except for a slight time lag between the loop and my AI/AO tasks which over time becomes unacceptable because my task will be running for up to an hour. However, when I use the DAQmx Create Timing Source: Control Loop From Task vi to create a timing source, everything slows down and the fastest loop time I can get is around 20 ms. Any suggestions to get around this would be highly appreciated!
    System: LabVIEW RT 8.0 with DAQmx 8.0 running on an NI PXI-8186; NI PXI-6251 used for analog input.

    You're welcome!
    You can build an array, and if your data is not hugh (100's of MB) this may be the easiest solution. However, we aways suggest implementing the Producer/Consumer Architecture. Keep the PID in the Producer loop, but move the File IO to the Consumer. Also, it  appears that your instrument uses some form of serial communication, so that could cause lags in your system....
    What is your application about in general, what performance are you hoping for, etc?
    Joshua B.
    National Instruments
    NI Services
    NI Support Resources
    NI Training Resources

  • Please help me with my electrical engineering homework : temperature control and watering system for greenhouse using labview and arduino

    temperature control and watering system for greenhouse using labview and arduino
    spesification :
    1. max temp : 28 celcius (when temperature is more than 28 celcius, fan ON)
    2. min temp : 20 celcius (when temperature is under 20 celcius, heater ON)
    3. watering system : aquaponic (grow plant and fish in separate tank but connect each other). Plant roots help filter water for fish. Fish poop for plants fertilizer. So I need a pump to distribute water.
    Please help me create VI file simulation.. I'm sorry I'm not fluent in English. May God bless you all
    Attachments:
    YOOOSHH.vi ‏88 KB

    Duplicate thread.   Please keep the discussion in that thread where you already have a response. It is also the more appropriate thread for your question.
    Lynn

  • Temperature controlled cooling for K7N2G - making a cheap and quiet sy

    Hi!
    My CPU and IGP fan speed is temperature controlled. The two fans in my PSU are very quiet. Beside these i have two fans blowing air into the cabinet and two fans blowing air out. At the moment I have the option to let them stay turned off, to give them 7V or 12V (by some switches).
    Now I have decided to make these temperature controlled as well. If the temperature is below 25 degrees (or something) they are turned off after that they turn on at low speed and then their speed rises as temperature rises.
    My question is now - where should I put the temperature sensors to control these fans?
    I guess it should be somewhere on the motherboard but where? Perhaps close to the RAM or at the chipset? Perhaps on my harddisks or just under the PSU to give a good idea about the temperature in the cabinet?
    I am also going to make some tunnels to make sure that the air coming from the fans gets to the right places (one should definitely go to my harddrives as they get pretty hot :-) )
    Another idea I have is to use a CPU throttle program to make the CPU stay cooler when I don't need more than 50 percent of the CPU power. I don't know if this will help at all. I already have the idle bit set. I have just installed hmonitor which can do the trick with CPU throttling. If I set the CPU throttle to 50 percent and then loads the "Toast" program the CPU doesn't get much hotter but of course it is also only working at half its speed. If for instance playing demanding 3D shooters or doing other hard calculations I turn it off to get full speed - otherwise I could just as well have "down clocked" the CPU instead.  
    Does anyone else have experiense with CPU throttling?

    Doesn't anybody know where the three temperature sensor diodes on the motherboard are placed on the motherboard?
    Of course one of them is under the CPU but where are the two others placed?

  • PID control loop slows down during execution.

    Hi, I am a attaching a LV8.6 code that i am currently using to control my engine experiment. I use PID control where the input signal is an rpm value that i measure using a counter. The ttl signal from the sensor is not clean and so i use an analog trigger to generate pulses on the counter from where i measure the frequency and hence the rpm. The output is generated as an analog voltage on an output channel. The problem i am facing is that the loop runs really good when i start off but gradually the loop keeps slowing down and this greatly affects my ability to control engine speed. I am not sure why this is happening. I tried increasing the sample size and rate (so as to increase the buffer size) but this didnt have any effect on the speed. I am guessing its a problem with the way i have my loops setup.. any suggestions would be greatly appreciated.
    Thanks, Shyam.
    Attachments:
    PID control loop.vi ‏33 KB

    Hi all..I realised my mistake soon after posting as usually is the case..the create channel vi for doing the analog output to the output channel was within the loop and slowing things down..when i moved it out..it fixed the problem!!
    Shyam.

  • Time controlled Loop faster than 1ms

    HI
    I work with Labview 8.2.1.
    I need a time controlled loop who is faster than 1ms. I tried to use the 1MHZ time source (see picture) but the loop does not work with this.
    Please help
    Message Edited by SteffenGrab on 11-30-2007 01:13 PM
    Message Edited by SteffenGrab on 11-30-2007 01:17 PM
    Attachments:
    Time loop.JPG ‏66 KB

    There is no picture to see...
    Now is the right time to use %^<%Y-%m-%dT%H:%M:%S%3uZ>T
    If you don't hate time zones, you're not a real programmer.
    "You are what you don't automate"
    Inplaceness is synonymous with insidiousness

  • Time Controlled Loop?

    I am building an application that scrolls through an panoraminc photo to make it appear as if its rotating 360 degrees.
    So far i can get the image to scroll left and right continously by having a left and right button to click on
    what i am after is some ideas/direction on how i could automate the process, as in when you click the left button the image will scroll at a certain speed.
    I was thinking that i would need a time controlled loop where the the method for scrolling the image to the left occurs every few seconds.
    Thanks in advanced

    Use a inner class that extends Thread as follow:
    class MyTimer extends Thread{
    boolean continue=true;
    public void stopScroll(){
    continue=false;
    public void run(){
    while(continue){
    try{
    xpos=pictureScroll(img, xpos, "right");
    sleep(100);
    }catch(InterrupdedException e){
    }use
    Thread t=new MyTimer ();
    t.start();to start scroll, and to stop
    t.stopScroll();in button's ActionPerformed

  • How can I get the highest control loop speed?

    currently I am doing a nonlinear control.
    whose control loop speed is higher than 20k.
    My PXI is 8145 and 8175 , with DAQ card 6040E.
    Each time I need only one point in and then processing , then output a point.

    I would recommend configuring your program like the example program, Real-Time PID Control.vi, that ships with LabVIEW. You can find it in LabVIEW by going to Help->Find Examples and type "PID" on the search tab. The Real-Time PID Control.vi shows a good way to design your program for a single point in, single point out application.
    If you're aiming for a 20KHz loop speed, you may not be able to attain this with the PXI-8175, assuming you also have a normal priority loop running to handle the communication back to the host computer. To time your code, you can use the NI Timestamp Code Time.vit template that comes with LabVIEW 7 Express. The PXI-8176, benchmarked for sinlge point PID loop rates up to 40 KHz, may be a better solution for you application.
    It is
    also a good idea to disable the USB port and to install only the RT drivers you need. For information on how this is done, follow this link.
    Please let me know if you have further questions.
    Regards,
    Kristi Hummel
    Applications Engineer
    National Instruments

  • Using LabVIEW for temperature control with AMREL SPS200-50-A022 power supply

    Hi, I hope someone can help me out. I'm an ME undergrad with pretty much no knowledge of LabVIEW. I am working a project which requires a temperature controller. Previously, we were using an SPS120-10 power supply from AMREL and a grad student wrote a LabVIEW VI which performed feedback temperature control. The VI would acquire temperature from a Benchlink which acquire the temperature from a thermocouple. The VI also monitor the output voltage & current and determine the power output and heater resistance from those values. When a desired temperature is set, the VI compares the actual temperature to the set temperature and adjust the voltage/current setting to achieve the desired temperature. The VI was designed to keep temperature deviation to within +/-0.5 deg C. I'm not sure of the data refresh rate, but it's on the order of seconds since the system has a small thermal mass and we're operating in the 800+ deg C range. When we were using the SPS120-10, the device used GPIB for communication with the PC. Due to higher power output demand for the heater, we switched to an SPS200-50, which only has an RS-232 port. First of all, I was wondering if someone could help me modify the VI so that it could communicate with the SPS200-50 through the serial port? In addition, the drivers for the SPS120-10 and SPS200-50 might be different. If modifying the VI to communicate through the serial port isn't enough, I would need to figure out where to modify the VI with the SPS200-50 drivers, which is provided by AMREL. If anyone would like, I can send you the VI files so that you can take a look at the block diagram and tell me where to modify it. I'm still not 100% certain I understand how to read LabVIEW block diagrams.
    Please let me know if you need any additional information. Any help would be appreciated. Thanks in advance!

    I have looked over your vi. First of all you have to do some changes in the "ARSPS Initialize.vi" See picture.
    The best way to check instrument communication is to send the *IDN? Command. The instrument will indentify itself in response to this command. The vi I have included is a labview example. Use this Vi to test your communication. Do not progress before this is working. The VI is also an excellent example on how to set up and close down RS232 communication.
    The VI "Tfeedbackpowercontroller-nolvdt-Dinh.vi" looks OK so I guess it will work then your RS232 communication with the SPS200-50-A022 is working
    good luck
    PS as mentioned before you will find all the RS232 details in the instrument manual
    Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
    (Sorry no Labview "brag list" so far)
    Attachments:
    sample.PNG ‏38 KB
    Basic Serial Write and Read.vi ‏29 KB

  • Eurotherm temperature controler 900EPC

    hi,
    I am looking for a vi to communicate to a eurotherm
    temperature-controler 900EPC.
    The VI is to communicate with the controler via RS232 port.
    do you have amy suggestions
    thanks
    martin

    Casper,
    I think the Info-LabVIEW infrastructure was transplanted last year to http://www.info-labview.org, and the folder archive you are looking for is here on its new filesystem. It appears that there are some Eurotherm driver files are there, as promised.
    However, I have the feeling that what is posted there was designed for older models like the 808 and might need substantial modification to work with your model. Here are a few suggestions:
    - Compare those files with the driver available on the ni.com/idnet Instrument Driver Library. The NI driver isn't designed for your model either, and is presumably based on the same code as above, but it may represent a more recent evolution.
    - Maybe best of all, try to contact known LabVIEW users who have your model. Posting here is good, and will hopefully generate some additional responses. But if you search the Info-LabVIEW discussion archives, you can find some e-mail addresses of specific individuals who have actually modified the drivers above. Examples are here and here.
    Regards,
    John

  • Modified control loop.vi URGENT!!!!

    je souhaite utiliser le "modified PID control loop.vi" pour avoir deux entrées acquisition distinctes et une seule sortie output à gérer.dois je simplement dupliquer ce vi ? Dois je imbriquer les 2 boucles dans une seule ?
    merci si vous pouvez me fournir un vi adapté car je débute avec labview."

    Bonjour,
    De quel exemple parlez-vous? Pouvez-vous le poster ou me dire où le trouver?
    Merci.
    Matthieu Gourssies
    National Instruments France

  • Soundcard in temperature control system?

    Hi!
    I would like to use soundcard's output to power heater (via amplifier, of course) in a temperature control system. I figured out I could use 2nd soundard (or a virtual one) to get rid of Windows and other applications' sounds.
    But what is the right (good) way to output a _continuous_ tone?
    Thanks everybody!
    Vitaly

    Thanks for your interest, I am in no way offended. The system is a small (1 m long, 16 mm diameter) measurements probe. It is submerged in the liquid nitrogen (helium). The sample holder (~30 mm long, ~10 mm diameter) is inside the probe, close to the bottom and has a small heater (~100 Ohm resistance, maximum necessary power ~1 W). The whole probe is filled with gas (helium) to ensure proper thermal exchange between the sample holder and the walls of the probe. It's all rather conventional in low temperature measurements.
    How? I can measure sample holder's temperature (takes a diode or a resistor sensor and a DMM connected via GPIB). You are right, PID regulator will be used to calculate the necessary power. So I want to connect PID regulator's output to the amplitude (volume) control of the soundcard. I do not quite understand what you mean by "Unless your output frequencies are very low, I cannot see any benefit of trying to use a sound card." But I will connect the soundcard's output to the amplifier/rectifier. I only rectify to avoid electromagnetic interference between the heater signal and measurements currents (very low ones), otherwise I could even connect the heater directly. For the same reason digital pulse width modulation and the like cannot be used.
    Why? Because basic analog output card costs ~$300, I think it's a real waste in my case. However, seeing (hearing) that it's not that simple to get true continuous sound, I might be forced to change my mind.
    Best wishes,
    Vitaly

Maybe you are looking for