Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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.

...

Below this is the event structure that is designed to activate when the "Enable Advanced Controls" bool is selected. Once the condition is activated, the  ____ indicating the "PID gains", "Recalibrate", "Save PID gains", "Load PID gains" and "Current Position" become visible. The event structure runs for 125 milliseconds, and has two cases: (0) Timeout, and (1)____) Enable Advanced Controls. Case (0) is irrelevant is it shows that nothing occurs during a timeout.

 

 

Case (1), shown above, contains a case structure that is wired to the bool, "Enable Advanced Controls". If the bool is True, then a message first appears to the user warning them about changing the default values of the PID Controls. The values should not be changed if the user does not have an understanding of the PID coefficients.

 

Running the VIs

  1. 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

  2. In the response VI:
    1. the Run VI icon at the top left should be green
    2. 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
    3. 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).
    4. the Log Data icon should be green
    5. the Motor Enabled icon should be green, but grayed out

  3. 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.

  4. 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.

...