06-03-2011 01:16 PM
Hi all, I recently started working in a lab and was charged with my first task to create a program on LabVIEW using a loop to control the amount of current supplied by my power source a Mastech HY3020MR in order to keep the evaporation rate of our substrate at a constant level which is monitored by a Sycon STM-100/MR. I have been doing a lot of research on trying to figure out how to implement this but am running into a lot of problems involving how to create the loop and have the two devices communicate with one another. They are both capable of being connected to the computer using RS-232 ports.
I found a LabView program for controlling the voltage and current levels through the company forum but am unsure how to then use this with the data logger provided by Sycon in order to control one with the other. I atttached the labview vi for the power supply and can provide the data logger for the monitor if need be. Any assistance would be greatly appreciated as I am currently at a standstill in figuring this out. Thanks!
06-03-2011 01:36 PM
I think I would set up a producer / consumer architecture. You put the vi that you sent in the consumer loop so it sets the voltage and current The other loop would read from the sensor and feed the results to the vi that you sent to adjust the voltage and current. If you send the other vi's I might be able to help you on your way. You should look at the examples for the producer / consumer architecture in the examples and try to put something together that way and if you can not get it working then we can help guide you on your way.
06-06-2011 09:10 AM
Thanks Tim. I'm still a litle new to LabView, but following through with the examples should definitely help out. The vi for my Sycon montior can be found here: http://www.sycon.com/download_data.php?n=STM-100/MF
I think what I'm most confused about is getting the two devices to communicate with one another. In the past, I have really only done basic tasks in Labview, most of which don't involve something as complicated as this. The company that provided the vi for the power supply says it should be relatively easy to set up their vi in a control loop allowing data from elsewhere to regulate the current, but I am having a lot of difficulty making that happen. Thanks again for the help.
06-07-2011 01:08 PM
If someone could please help out with this, I would really appreciate it!
I am changing my approach slightly for the time being to simply set up a thermocouple with my NI USB-6211 that in turn will communicate with my power supply software on Labview (posted earlier) to control the amount of current being supplied so that the temperature remains constant.
I know that I must set up some type of PID temperature control, but since I am new at Labview would greatly apprecaite assistance in making this work. I have Omega fine wire thermocouples and as I mentioned a USB-6211 DAQ. What would be a good first step in using NI provided PIDs to setup a control like this one?
06-07-2011 03:17 PM
Hi Will_F,
Let's tackle this in three steps
1) Make sure that the VI that you referenced in your first post works in controlling the power supply. I did not find a manual for your power supply. So, I don't know if the commands being sent to your power supply is working or not
(I found this post, and it seems like the admins of the power supply aren't aware of a command list either)
2) Get data from the sensor, the thermocouple. This will be simple, and it will require reading an analog input*. Reading an analog input can either be done by looking at the examples for DAQmx in the Example Finder (Hardware Input and Output >> DAQmx >> Analog Measurements >> Voltage), or using the DAQ Assistant.
*Keep in mind that because you're using a thermocouple, we normally recommend that you perform signal conditioning on the signal to filter the signal and
3) Set up the PID control
In Example Finder, search for pid. However, it would be useful to look at information and understand how it works before looking at the examples.
Let me know what happens in step 1 and 2, and we can move on from there.
Regards,
06-08-2011 02:03 PM
Hi Che,
So far I have tested the VI referenced in my first post and it does appear to be communicating properly with my computer and the power supply. I can effectively use the VI to control the amount of power delivered by the PS. I had also found that post on the Mastech forums and by emailing the person in the thread, I came across the VI that I am currently using.
However, I am running into problems getting my thermocouple to work properly. I know that thermocouples should be easy enough to configure, but cannot seem to get mine to register temperatures as this is my first time working with thermocouples. I have done a lot of research and am trying to use the example thermocouple acquisition sample provided in LV under Temperature opposed to voltage to read data from my thermocouple hooked up to the USB-6211 DAQ. Based on reading through other forums and websites involving thermocouples and DAQ setup, it would seem that I both need to set-up a CJC as well as perform signal conditioning because of the amount of voltage being transmitted.
I am trying to use an OMEGA type T thermocouple and hooking it up in an Reference Singled Ended (RSE) manner to the DAQ by attaching the positive end of the thermocouple to an analog input port and the negative the the analog ground. This is where I'm running into the biggest problem and not reading any temperature data despite having messed around with all these settings and reading everything I can get a hold of. If you could help me figure this part out, I think that would be a huge step in my progress. Thanks again!
Will
06-08-2011 04:49 PM
Yes, Measuring temperautre with a thermocouple is easy- if you have a reference- the 62xx daqs do not so you need to establish a known temperature (the cjc).
Get yourself one of these NI USB-TC01
06-08-2011 05:17 PM
Dear Will,
Recently I was setting up a power supply to be controlled by the computer and set to certain values.
The issue was the remote control was limited from ranges 0 to 5 volts and the scale for the outputs was unknown.
I made the attached code to:
A: Limit the signal from the input voltage to stay between 0 and 5 volts
B: Check the output voltage
C: Adjust the input voltage to stay at the Desired output voltage
😧 Limit the output voltage to stay between below 11 volts
The way It is setup I also measure current.
The VI can be easily adapted to calibrate the system to current, but that isn't what i was using it for.
I hope this helps at all.
I am still stuck on how to save the data and some other issues.
Good luck
-Tom
06-09-2011 05:30 PM
Hi Will,
I'm glad that step 1, the first VI, is running correctly.
I would have to agree with Jeff that an actual thermocouple module would be best to accomplish this task. The device referenced by Jeff is a good module to use. However, if you'd like to continue using your DAQ, keep in mind that most thermocouple modules have changes mV range. So, it will be even more susceptible to noise. In addition, connecting the thermocouple in RSE will also increase the noise. The thermocouple module will condition the signal to filter out noise and amplify it. Let me know if you're interested.
What do you mean by "not reading any temperature data"? Is it reading 0 volts? does it look like a small voltage (mV range)? Is it railing??
Regards,
06-13-2011 01:53 PM
Hi all,
So once again I have changed my method slightly but am now getting some results, which is definitely a good sign. Instead of using a thermocouple system, I have now made it possible to directly communicate with my rate monitor and the computer receiving the data to my computer that I want to monitor and use to regulate my power supply.
The data that I receive is a standard ASCII character combination that I want to compare with a set input and then somehow connect with a PID control to regulate the current provided by my power supply in a feedback loop. I know that this shouldn't be that difficult since I have seen other people do similar things but as I am still learning the basics of LV, this is easier said than done.
Could someone possibly recommend a first step or the best approach to going about this task?
Thanks!