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.
...
To the right of this section of the interface there are indicators for the current valve position, the current iteration number and the new level as calculated by the VI. These values are calculated every 1 second (the length of time of one iteration of the code).
Code
...
The Measuring VI code uses the reading of the valve position from the Response VI (which will be described later in this link), creates an equation for flow rate (using an exponential equation which can be edited by the user) and uses that position to change the level in the "tank".
Of the two VIs, it is the smaller one and does not connect to machinery, its only role in the system is to interact with the Response VI. Some of the data as far as the flow rate equation may need to be edited according to differing experimental constants for liquid helium. The constants used in the equation below are NOT ACCURATE.
The First Half of the Sequence Structure
The VI is set to initially wait one second in the first half of the sequence structure before starting the VI, and currently begins at the arbitrary number 10. The initial number does not matter so much, as long is it doesn't reflect a certain initial level in the tank that is known to the user (for instance, if you want the tank to be empty when the program first starts running, then you should set the initial level of the tank to zero).
The Second Half of the Sequence Structure
The second half of the sequence structure contains the main part of the VI, and works in steps to measure the level. These steps include reading the incoming Response VI file, identifying the flow rate, changing the level and writing to the new text file.
Incoming File IO
In order to read the valve position for a specific iteration, it must be read into the Measuring VI through a text file. The file that contains the valve position data must be accessed, and it is opened outside the while loop in order to keep the VI running as smoothly as possible (when the file is opened inside the while loop with each iteration, the VIs tend to communicate slower and therefore do not have as long of a run time). When the file is accessed, it takes the last 8 characters from the txt file, which include the width of the number string itself and two end of file characters. The width must be carefully looked at before running, as it is sometimes difficult to get the correct one. If you are receiving an error about how one of the characters is unrecognizable, then it is likely that the width is off. Also, if you check and see while the VIs are running that the valve positions displayed in both VIs do not match, the same issue is present and the width should be altered.
...