Wednesday, August 18, 2010

Exercise 2b - Data Acquisition

To complete this exercise, you will need the IC temperature sensor available on either the BNC-2120, SCB-68, or DAQ Signal Accessory.

Front Panel
1.      Select File»New to open a new front panel.
2.      Create the thermometer indicator, as shown on the following front panel.


a.       Select the thermometer on the Controls»Numeric Indicators palette and place it on the front panel.
b.      Type Temperature inside the label and click outside the label or click the Enter button on the toolbar.
c.       Right-click the thermometer and select Visible Items»Digital Display from the shortcut menu to display the digital display for the thermometer.

1.      Create the vertical switch control.
a.       Select the vertical toggle switch on the Controls»Buttons palette.
b.      Type Temp Scale inside the label and click outside the label or click the Enter button.
c.       Use the Labeling tool to place a free label, deg C, next to the TRUE position of the switch, as shown in the previous front panel.
d.      Place a free label, deg F, next to the FALSE position of the switch.
Block Diagram
2.      Select Window»Show Diagram to display the block diagram.
3.      Build the following block diagram.
a.       Place the DAQ Assistant Express VI located on the Functions»Input palette.  Make the following configurations in the DAQ Assistant configuration wizard.
                                                                          i.      Select Analog Input as the measurement type.
                                                                        ii.      Select Voltage.
                                                                      iii.      Select ai0 as the channel from your data acquisition device.
                                                                      iv.      In the Task Timing section, select Acquire 1 sample.

b.      Place the Convert from Dynamic Data function located on the Functions»Signal Manipulation and select Single Scalar as the Resulting data type.
c.       Place the Multiply function located on the Functions»Numeric palette. This function multiplies the voltage that the AI Sample Channel VI returns by 100.0 to obtain the Celsius temperature.
d.      Select Functions»Select a VI, navigate to the Convert C to F VI, which you built in Exercise 2a, and place the VI on the block diagram. This VI converts the Celsius readings to Fahrenheit.
e.       Place the Select function located on the Functions»Comparison palette. This function returns either the Fahrenheit (FALSE) or Celsius (TRUE) temperature value, depending on the value of Temp Scale.
f.       Right-click the y terminal of the Multiply function, select Create»Constant, type 100, and press the <Enter> key to create another numeric constant.
g.      Use the Positioning tool to place the icons as shown in the previous block diagram and use the Wiring tool to wire them together.
Tip To identify terminals on the nodes, right-click the icon and select
Visible Items»Terminal from the shortcut menu to display the connector pane.
1.      Display the front panel by clicking it or by selecting Window»Show Panel.
2.      Click the Continuous Run button, shown at left, to run the VI continuously.
3.      Put your finger on the temperature sensor and notice the temperature increase.
4.      Click the Continuous Run button again to stop the VI.
Create the following icon, so you can use the Temperature VI as a subVI.
a.       Right-click the icon in the upper right corner of the front panel and select Edit Icon from the shortcut menu. The Icon Editor dialog box appears.
b.      Double-click the Select tool on the left side of the Icon Editor dialog box to select the default icon.
c.       Press the <Delete> key to remove the default icon.
d.      Double-click the Rectangle tool to redraw the border.
e.       Use the Pencil tool to draw an icon that represents the thermometer.
f.       Use the Foreground and Fill tools to color the thermometer red.
Note To draw horizontal or vertical straight lines, press the <Shift> key while you use the Pencil tool to drag the cursor.
a.       Double-click the Text tool, shown at left, and change the font to Small Fonts.
b.      Select the B&W icon and select 256 Colors in the Copy from field to create a black and white icon, which LabVIEW uses for printing unless you have a color printer.
c.       When the icon is complete, click the OK button. The icon appears in the upper right corner of the front panel.
1.      Select File»Save to save the VI. Choose a location on your hard drive and save the VI as Thermometer.vi.
2.      Select File»Close to close the VI.


End of Exercise

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

Followers