DOC PREVIEW
PSU EE 200 - Lab_14_EE200_f13

This preview shows page 1-2-3-4-31-32-33-34-35-63-64-65-66 out of 66 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 66 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 66 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 66 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 66 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 66 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 66 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 66 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 66 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 66 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 66 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 66 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 66 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 66 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 66 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

ColorGrayscaleEE 200 Fall 2013Lab 14.EE 200Design ToolsLaboratory 14Professor Jeffrey SchianoDepartment of Electrical Engineering1EE 200 Fall 2013Lab 14.Laboratory 14 Topics• LabVIEW– Mechanical Action of Booleans– Waveform Graphs– File IO2EE 200 Fall 2013Lab 14.Six Switch Mechanical Actions1. Switch when pressed2. Switch when released3. Switch until released4. Latch when pressed5. Latch when released6. Latch until released3EE 200 Fall 2013Lab 14.Switch When Pressed• The value of the control changes each time it is clicked• The frequency with which the VI reads the control does not affect this behavior• Action similar to a standard light switch4EE 200 Fall 2013Lab 14.Switch When Released• The value of the control only changes once the mouse button is released• The frequency with which the VI reads the control does not affect this behavior5EE 200 Fall 2013Lab 14.Switch Until Released• The value of the control changes only so long as the mouse button is held down• When the mouse button is released, the control returns to its default value• The frequency with which the VI reads the control does not affect this behavior6EE 200 Fall 2013Lab 14.Latched When Pressed• The value of the control is updated when the mouse button is depressed• Once the VI reads the value of the control, it returns to its default value7EE 200 Fall 2013Lab 14.Latched When Released• The value of the control is updated when the mouse button is released• Once the VI reads the value of the control, it returns to its default value8EE 200 Fall 2013Lab 14.Latched Until Released• The value of the control is updated while the mouse button is held down• The first time the value is read after the button is released, it returns to its default value9EE 200 Fall 2013Lab 14.Exercise 1• Under the Help tab, select Find Examples…• Open the Search tab, and set the keywords to Mechanical Action• Set the Search for: option to any of the words• Open and execute Mechanical Action of Booleans.vi10EE 200 Fall 2013Lab 14.Plotting Data: Waveform Chart• Special type of numeric indicator that displays one or more plots of data, typically acquired at a constant rate• The waveform chart maintains a history of data, or buffer, from previous updates• Displays single or multiple plots11EE 200 Fall 2013Lab 14.Waveform Charts• If you pass the chart a single value or multiple values at a time, LabVIEW interprets the data as points on the chart and increments the x index by one starting at zero• For multiple plots, bundle the data together into a cluster of scalar numeric values12EE 200 Fall 2013Lab 14.Exercise 2• Write a VI that generates and plots a sequence of random numbers, where each number lies between 0 and 1• Embed the operation in a While Loop that iterates once every 100 ms, and terminates when the user presses a stop button13EE 200 Fall 2013Lab 14.Exercise 214EE 200 Fall 2013Lab 14.Plotting data – Chart Update Modes• Right-click the chart and select Advanced»Update Mode from the shortcut menu• Strip chart is the default update mode• Scope chart and Sweep chart modes display plots significantly faster than the strip chart mode15EE 200 Fall 2013Lab 14.Charts & Graphs Update Modes• Strip Chart: Scrolling display similar to paper strip chart– When chart length reached, new values added at rightmost point while old values shift to the left• Scope Chart: Retracing display similar to an oscilloscope– When chart length reached, it clears display and begins plotting again from left border• Sweep Chart: – Similar to scope chart, except the plot is erased– When chart length reached, a moving vertical line marks the beginning of the new data and moves from left to right16EE 200 Fall 2013Lab 14.Exercise 3• Write a VI that generates and plots two sequence of random numbers, where each number lies between 0 and 1• Embed the operation in a While Loop that iterates once every 100 ms, and terminates when the user presses a stop button• Demonstrate operation of the Strip Chart, Scope Chart, and Sweep Chart modes17EE 200 Fall 2013Lab 14.Exercise 318EE 200 Fall 2013Lab 14.Waveform Graphs• Unlike Waveform Charts, Waveform Graphs plot pre-generated arrays of data all at once – they do not have the ability to append new values to previously generated data• LabVIEW provides several types of graphs– waveform graphs– XY graphs– intensity graphs– 3D–graphs– digital waveform graphs19EE 200 Fall 2013Lab 14.Plotting Data – Waveform Graphs• Use the Context Help window to determine how to wire multi-plot data to Waveform Graphs and XY Graphs20EE 200 Fall 2013Lab 14.Exercise 4 • Use a waveform graph to plot the sinusoidal signalversus k for k = 0, 1, 2, …,30021 kky1002sin)(EE 200 Fall 2013Lab 14.Exercise 5 • Use a waveform graph to plot two sinusoidal signalsversus k for k = 0, 1, 2, …,30022kkxkky1002cos)(1002sin)(EE 200 Fall 2013Lab 14.Exercise 6• Use a waveform graph to plot the sinusoidal signalversus t for t = 0, 0.001, 0.002, …,0.523tty102sin)(EE 200 Fall 2013Lab 14.Exercise 7 • Use a waveform graph to plot two sinusoidal signalsversus t for t = 0, 0.001, 0.002, …,0.524ttxtty102cos)(102sin)(EE 200 Fall 2013Lab 14.Exercise 8 • Use a XY graph to plot y versus x, where for t = 0, 0.001, 0.002, …,0.525,102cos)(102sin)(ttxttyEE 200 Fall 2013Lab 14.• File I/O writes to or reads from a file• A typical file I/O operation involves the following process:File I/O26Open/Create/Replace FileRead and/orWrite to FileClose FileCheck forErrorsEE 200 Fall 2013Lab 14.File Formats• LabVIEW can use or create the following file formats:– Binary: Underlying file format of all other file formats– ASCII: Specific type of binary file that is a standard used by most programs– LVM: The LabVIEW measurement data file (.lvm) is a tab-delimited text file you can open with a spreadsheet application or a text-editing application– TDMS: Type of binary file created for NI products consisting of two separate files: a binary file and a binary index file27EE 200 Fall 2013Lab 14.ASCII (text files)• Use ASCII files when– You want to access the file from another application– Disk space and file I/O speed are not crucial– You do not need to perform reads or writes to arbitrary locations within the file– Numeric


View Full Document

PSU EE 200 - Lab_14_EE200_f13

Download Lab_14_EE200_f13
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Lab_14_EE200_f13 and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Lab_14_EE200_f13 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?