Saturday, September 25, 2010

Voltage Output VI

Summary: In this exercise, the objective is to output an analog voltage using a DAQ device. Complete the following steps to finish a VI that outputs voltage from 0 to 9.5 V in 0.5 V steps.


  1. Connect Analog Out CH0 to Analog In CH1 on the DAQ Signal Accessory.

1.A) Front Panel

  1. Open the Voltage Output VI located in the C:\Exercises\LabVIEW Basics I directory. The front panel is already built.
    Figure 1
    Figure 1 (voltoutex.png)
    Voltage Output displays the current voltage output.

1.B) Block Diagram

  1. Display and examine the block diagram.
    Figure 2
    Figure 2 (voltoutexbd.png)
    • waitms.png The Wait Until Next ms Multiple function located on the Functions>>All Functions>>Time & Dialog palette causes the For Loop to execute every 500 ms.
    • selecttherm.png The Select VI located on the Functions>>Arithmetic & Comparison>>Express Comparison palette checks if the loop is in its last iteration. If the loop is in its last iteration, then the DAQ device outputs 0 volts. This is a good technique to reset the output voltage to a known level. It is always a good idea to reset the output voltage to something that will not damage a device that is connected to the DAQ device.
  2. Modify the block diagram as shown in Figure 3.
    Figure 3
    Figure 3 (voltouteditbd.png)
    DAQAssistantIcon.png Place the DAQ Assistant Express VI, located on the Functions>>Output palette, in the For Loop. Complete the following steps to configure this Express VI to generate an analog output voltage.
    1. Select Analog Output>>Voltage for the measurement to make.
    2. Select Dev1>>ao0 for the physical channel and click the Finish button.
    3. In the Analog Output Voltage Task Configuration dialog box that appears, configure the Task Timing to Generate 1 Sample. Change the output range minimum to 0 and maximum to 10.
    4. Click the OK button to close the Analog Output Voltage Task Configuration dialog box. This saves the settings specified for the task in the DAQ Assistant Express VI.
  3. Save the VI.
  4. Close the block diagram but leave the front panel open.

1.C) Front Panel

  1. Open the Voltmeter VI.
  2. Configure the meter scale minimum to 0.0 and maximum to 10.0.

1.D) Block Diagram

  1. Display the block diagram for the Voltmeter VI and double-click the DAQ Assistant Express VI to open the Analog Input Voltage Task Configuration dialog box.
  2. Right-click Voltage in the Channel List section and select Change Physical Channel. Select ai1 for the channel because you wired the DAQ signal accessory to output a voltage on Analog Out CH0 and acquire the voltage from Analog In CH1.
  3. Select No Scale from the Custom Scaling pull-down menu.
  4. Change the voltage range to 0 to 10.
  5. Click the OK button to close the dialog box.
  6. Display the front panel and run the Voltmeter VI.
  7. To acquire and display the voltage output, run the Voltage Output VI. The Voltage Output VI outputs the voltage in 0.5 V increments from 0 to 9.5 V. When the For Loop executes its last iteration, the VI outputs 0 V to reset the analog output channel.
    Figure 4
    Figure 4 (voltoutexfinal.png)
  8. Close both VIs.

Content actions


No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...

Popular Projects

My Blog List

Give support

Give support
Encourage Me through Comments & Followers