From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
04-19-2007 01:24 PM
04-20-2007 01:27 PM
04-24-2007 08:55 AM
04-25-2007 02:12 PM - edited 04-25-2007 02:12 PM
Hello wrossi,
I would recommend that you examine a few shipping examples to see good demonstrations of how to architect this application. You can find example programs in the NI
Example finder; to open the example finder from LabVIEW click on the Help menu
and select Help>>Find Examples... Once you have opened the NI Example
Finder you can navigate to DAQ examples by clicking the Browse tab and
selecting Hardware Input and Output>>DAQmx. The examples are then
categorized by the type of operation which they perform.
There are a few examples which I think are particularly applicable to your
operation. Acq Thermocouple Sample.vi (Hardware Input and
Output>>DAQmx>>Analog Measurement>>Temperature) demonstrates
how to make temperature measurements using a thermocouple. Write Dig Chan.vi (Hardware
Input and Output>>DAQmx>>Digital Generation) demonstrates how to
write values to a digital output channel. Finally, PID Control-Single
Channel.vi (Hardware Input and
Output>>DAQmx>>Control>>General) demonstrates how to do a
control loop using Analog Input and Analog Output. You should be able to combine
the first two examples based on the structure in PID Control-Single Channel.vi
to perform the temperature control you described. You would read the
thermocouple as your input and compare it to the user defined set point. Then,
you would determine what value to write to your digital channel based on the
value of the thermocouple. An example of this operation is shown in the image
below.
In this code, the thermocouple data is compared with the user-defined Set Point control. If the temperature is less than or equal to the set point, the digital line is set to True or 5V (close SSR, turn oven on, etc). If the signal is greater than the set point, the digital line is set to False or 0V (open SSR, turn off oven, etc.)
Message Edited by Matt A on 04-25-2007 02:14 PM