Changes

Jump to navigation Jump to search
Line 25: Line 25:  
The overarching logic behind the program is to turn the hotplate off when the box is too hot and on when it is too cold. All of the code is contained in a sequence structure consisting of two frames. The first frame contains nearly all of the code and is what drives all operating functions, the second frame contains the sub VI HP 1 Outlet 1 OFF, which shuts off the netbooter's outlet one (and therefore the hotplate). A while loop contains all of the code in the first frame, which can be split up into four major groups of functional purpose: Initialization of DAQ interface, temperature conversion and storage, temperature regulation, and stop conditions.<br/><br/>
 
The overarching logic behind the program is to turn the hotplate off when the box is too hot and on when it is too cold. All of the code is contained in a sequence structure consisting of two frames. The first frame contains nearly all of the code and is what drives all operating functions, the second frame contains the sub VI HP 1 Outlet 1 OFF, which shuts off the netbooter's outlet one (and therefore the hotplate). A while loop contains all of the code in the first frame, which can be split up into four major groups of functional purpose: Initialization of DAQ interface, temperature conversion and storage, temperature regulation, and stop conditions.<br/><br/>
 
[[File:IntlznofDAQ.jpg|250px|thumb|right|upright|Temperature Conversion and Storage Section.]]
 
[[File:IntlznofDAQ.jpg|250px|thumb|right|upright|Temperature Conversion and Storage Section.]]
 +
 
In the initialization of the DAQ section there is only one unique sequence of code, which is repeated six times, once for each analog input connected to a thermistor. The sequence begins (from left to right) with the specification of the desired analog channel; a drop down menu shows all available options. Then, the minimum and maximum voltages are set to -5V and 5V in accordance with DAQ parameters. Next, the sample rate and samples per channels are read from the controls on the front panel. The function "Start task" then allocates memory for interaction with the DAQ, which is used in the following function "Read". "Read" stores the voltage signals from the DAQ and outputs them to a conversion equation, which is part of the temperature conversion and storage section. Finally, the sequence ends by clearing allocated memory with "Clear task". There is also error propagation from the voltage setting through "Clear task" to a display, but this has no effect on the functionality of the sequence.<br/><br/>
 
In the initialization of the DAQ section there is only one unique sequence of code, which is repeated six times, once for each analog input connected to a thermistor. The sequence begins (from left to right) with the specification of the desired analog channel; a drop down menu shows all available options. Then, the minimum and maximum voltages are set to -5V and 5V in accordance with DAQ parameters. Next, the sample rate and samples per channels are read from the controls on the front panel. The function "Start task" then allocates memory for interaction with the DAQ, which is used in the following function "Read". "Read" stores the voltage signals from the DAQ and outputs them to a conversion equation, which is part of the temperature conversion and storage section. Finally, the sequence ends by clearing allocated memory with "Clear task". There is also error propagation from the voltage setting through "Clear task" to a display, but this has no effect on the functionality of the sequence.<br/><br/>
 +
[[File:Tempconv.jpg|250px|thumb|right|upright|Temperature Conversion and Storage Section.]]
   −
[[File:Tempconv.jpg|250px|thumb|right|upright|Temperature Conversion and Storage Section.]]
   
The initialization of the DAQ section leads directly into the temperature conversion and storage section. Here the voltage readings are converted to temperature in Fahrenheit with an equation block. The temperature values are then all merged into one wire connected to a waveform chart, which displays the temperatures separately on a line graph (waveform chart) on the front panel. The combined signals are also sent to a user defined VI named TemperatureSpread, which stores the highest temperature out of all the signals in a variable called Highest Temperature. Each individual temperature value in fahrenheit is converted to celsius and displayed (in both fahrenheit and celsius) on the front panel. Additionally, each temperature in Fahrenheit is stored as a variable named after the location of its respective thermistor. These variables are combined and stored as one variable called WriteToFile (this section of the code is above the Initialization of the DAQ section at the time of this documentation). WriteToFile connects to a "save to measurement file" block, which itself is in a case structure that skips saving the data if there are zero or not a number (NaN) values coming from the DAQ.
 
The initialization of the DAQ section leads directly into the temperature conversion and storage section. Here the voltage readings are converted to temperature in Fahrenheit with an equation block. The temperature values are then all merged into one wire connected to a waveform chart, which displays the temperatures separately on a line graph (waveform chart) on the front panel. The combined signals are also sent to a user defined VI named TemperatureSpread, which stores the highest temperature out of all the signals in a variable called Highest Temperature. Each individual temperature value in fahrenheit is converted to celsius and displayed (in both fahrenheit and celsius) on the front panel. Additionally, each temperature in Fahrenheit is stored as a variable named after the location of its respective thermistor. These variables are combined and stored as one variable called WriteToFile (this section of the code is above the Initialization of the DAQ section at the time of this documentation). WriteToFile connects to a "save to measurement file" block, which itself is in a case structure that skips saving the data if there are zero or not a number (NaN) values coming from the DAQ.
 
<br/><br/>
 
<br/><br/>
179

edits

Navigation menu