From the Getting Started page, look at:
Tutorials -> Tutorial 7 - Integrating Examples into Robot Code
Basically the Open, and the Sets go in Begin.vi, the Close in Finish.vi, and just Get Avg with the scaling factor applied might go in Teleop and/or Autonomous.