P1.1. Resistor Voltage-Divider Measurements

Components


Programming Exercise 1.1

Use Tab to switch between Tools. Use Space Bar to switch between Wiring Tool and Position Tool (arrow). Get Tools Palette under Windows menu (or Shift/Right Click) from the Diagram.

  • Open a new VI to construct your VI_01.vi. The VI opens with a Front Panel (top) and a Diagram (under). Switch from one to the other using the Windows menu or Ctrl/E. The VI opens with the Operate Value Tool .

  • Place a Digital Control and Digital Indicator on the Front Panel (example below). (Right Click on Front Panel to get the Controls Palette.) The Digital Control and Digital Indicator are in the Numeric Palette (below). Save the file with your choice of Name.

  • Go to the Diagram (Ctrl/E) or Window>>Show Diagram. Place a Sequence Structure in the Diagram. (Right Click on Diagram to get Functions>>Structures>>Sequence Structure.) Enlarge the Structure by contacting the Arrow Tool (Position Tool) at the bottom-right corner of the Structure (drag).

  • Right Click on the edge of the Frame and Add Frame After. Click on arrows to switch between Frame 0 and Frame 1.

  • Place AO Update Channel.vi in Frame 0.

    (Functions>>Data Acquisition>>Analog Output >>AO Update Channel.vi.)

  • Place AI Sample Channel.vi in Frame 1.

    (Functions>>Data Acquisition>>Analog Input>>AI Sample Channel.vi.)

  • Position the icons, etc., with the Arrow Tool (Left Click>>Drag).

  • Wire the Digital Control (darker) terminal to the value terminal of the Analog Output VI, AO Update Channel.vi. Press the space bar to alternate between the Wiring Tool and Position (arrow) Tool.

  • To wire, get the Wiring Tool (space bar), Left Click on a terminal, release, drag the Tool to the opposite terminal, and Left Click. To clean up wiring mistakes, use Ctrl/B. Note that the terminal name (value in the example) of an icon is displayed while the Wiring Tool is over the terminal.

  • Wire the Digital Indicator terminal (lighter) to the output terminal (sample) of the Analog Input VI, AI Sample Channel.vi.

  • Place the Constant (4) and the String (0) in the Diagram as shown in the example (Frame 0). Use the Writing Tool to type in the numbers. The location of Constants and Strings, under Functions, is shown below. Place Constants (4), (10) and (0) and String (0) in Frame 1.

  • Wire the Constants and Strings as shown in the examples. To wire, get the Wiring Tool (space bar), Left Click on a terminal, release, drag the Tool to the opposite terminal, and Left Click. To clean up wiring mistakes, use Ctrl/B.

  • Change the names of the Digital Control and Digital Indicator. Use the Writing Tool. This can be done from the Diagram or the Front Panel. Click on the existing name (e.g., Numeric) and edit.

Procedure

  • Calculate the resistor values. Connect the circuit.

  • To Run a VI, from the Front Panel, use Operate>>Run or (better) use Ctrl/R. Run the VI with Chan0_out = 10V (Vout) and note the value of Chan0_in (VRG2). This should be consistent with your resistor ratio choice. Try a variety of Chan0_out values. (The maximum is 10 V.)

  • (Optional) To install the circuit Diagram on the Front Panel, open VI_01.vi from Project01.llb. Use the Arrow Tool, Click on the circuit diagram, use Window’s copy (Ctrl/C), and paste it into you VI Front Panel.


..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
13.59.100.205