The ITS Team will be performing maintenance on Confluence beginning at 6:00 pm Tuesday, May 6. During this time the service may go offline. It should be available again by 8:00 pm. Please refrain from editing pages during this time to avoid losing your work.
Table of Contents |
---|
LINK TO MEASURING VI
LINK TO RESPONDING VI
LINK TO RUNNING
Introduction
In order to measure the amount of liquid helium in the system at any given moment, a user interface with the platform LabVIEW is needed. The level of liquid helium is controlled by the position of the run valve, which allows it to flow from the separator to the nose (for more information on this process, follow THIS LINK and find Low Temperature: Cryogenics). The run valve has can have any position between 0 and 3 "turns", with 0 turns being completely closed and 3 turns being completely opened. LabVIEW is used to provide a means of automatically measuring and responding to the helium level inside the tank. This is done by running two separate Virtual Interfaces in unison, a Measuring VI and a Response VI.
...
Measurement VI
Interface
When the VI is first opens up, the first panel to appear is the interface. This panel is where you can comprehensively see how full the tank is at any given moment, and can change a few control factors of the code.
...
Once the text file has been created and written, and the VI is done running, the text file is closed outside of the loop. It is possible to open the text file while it is still running, but it will only contain the data up to the time you opened it, and will not keep updating while open.
Response VI:
...
Interface
This is an example of what the Response VI Interface will look like when first opened.
...
If Advanced Controls are not enabled, then the box is disabled and grayed out in the first while loop.
VISA Motors *****************************************************************************************************************************
In order to connect to machinery, ..... something about that box.
...
- this VI is nearly identical to the other sanitizing VI, except this one ensures that a position is never written that defies the limits of operation of the valve as a mechanical device (for the valve in our lab, the min and max positions are, respectively, 0 and 3 turns, which in the VI are immediately converted into steps).
- The input is still collected in steps and the sanitized input is still returned in steps, but in a value that is able to be read into the motor controlling the valve without breaking it.
Manual Mode
In manual mode, the user has the option to change the valve position manually, and the PID loop is not active. The min and max open controls are grayed out, as that is only for the PID loop. The "Current Position", "Recalibrate", "Set # of Turns Open (Man)" controls and the "Motor Enabled" bool are all enabled.
...
Case 3 is activated when the "Motor Enabled" bool is selected. If it is selected,nothing within the VI is changed, but because the motor is reading the position output from the VI the physical position of the motor changes with it.
Automatic Mode
In automatic mode, the VI reads the level and, from it, produces a new valve position to bring the level closer to the target level. In this mode, the PID loop is active and continuously reading the level and assigning a new valve position.
...
In this mode, the "Current Position", "Recalibrate", "Set # of Turns Open (Man)" controls and the "Motor Enabled" bool are all disabled and grayed out, but the "Min Open" and "Max Open" controls are enabled. The Min and Max Open values are set by the user, and represent the minimum position that the valve can close to and the maximum position it can open to while running. These values can be changed while the PID loop is active.
Creating the Proportional-Integral-Derivative (PID) Response
...
The PID response operates by calculating an error from the designated target level and corrects that by using proportional, integral and derivative terms.
The above picture shows the code which creates the PID response.
...
- Ensure that all controls in both VIs are accounted for. In the response VI this includes...
- text file paths are indicated, preferably in the computer's hard drive
- min and max valve position
- target level
- the COMPort is correctly configured
...and in the Measuring VI...
- the text filepath is indicated, in the same folder as the response filepath on the computer's hard drive
- the standard deviation, which shouldn't be any greater than 1 - In the response VI:
- the Run VI icon at the top left should be green
- the "Motor Connected" bool icon will be red when the VI is not running, but if it does not turn green after about a second of the VI running then the motor is not connected
- if you want the VI to automatically change the valve position for a trial, then you should select automatic. This should be done after the connection between the VI and the motor are tested (see Step 3).
- the Log Data icon should be green
- the Motor Enabled icon should be green, but grayed out
- Before running the VIs, you should do a test of the Response VI to make sure everything is working properly. This is done by enabling manual mode and changing the set number of turns open icon to any number between 0 and 3. Once it is determined that this does in fact change the run valve position connected to the motor, then the VI is connected correctly. Once you are done testing, automatic mode should be reselected in order to run a trial.
When the above steps are completed, and the Response VI test has run successfully, the two VIs are ready to be run. Simply run click the run button of both VIs. If this is the first time using one of the text files, you may need to run the VI with the respective new text file first.\
Retrieving Data from the VIs
...
Data is also retrieved from the VI in a format of a text file, which can be easily understood by the user.
Motor Connection
Text Files
There are two main text files that would be constantly in use during a test. This includes the Response VI text file, logfile.txt, and the Measuring VI text file, which should be changed with each test, preferably to the date or time the test took place.
...
The measuring VI text file contains the date and timestamp, iteration number, new flow rate based on the valve position, the valve position recorded from the Response VI, and the new level created by the Measuring VI.
If you want to save the data from your trials, you should change the name of this text file every time before you begin running.
Development Text Files
If either the Measuring VI or the Response VI do not already have a text file with data recorded saved on your computer, you will initially need to run with a development text file. This text file simply contains any number between 0 and 100 that will serve as the temporary Measuring VI text file containing the "level". With this as a replacement for the text file containing the new level data, you can run the two VIs and create a brand new logfile.txt. The next time you run the two VIs you can use logfile.txt with a new Measuring VI text file named after whatever your little heart desires.
CONGRATS ON MAKING IT TO THE END!!!
Please indulge in this quality image of an inspirational kitten. - E