DOC PREVIEW
PSU EE 200 - Lab_15_EE200_s14

This preview shows page 1-2-3-4-5-6-42-43-44-45-46-47-85-86-87-88-89-90 out of 90 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 90 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 90 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 90 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 90 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 90 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 90 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 90 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 90 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 90 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 90 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 90 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 90 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 90 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 90 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 90 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 90 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 90 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 90 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 90 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

ColorGrayscaleEE 200 Spring 2014Lab 15.EE 200Design ToolsLaboratory 15Professor Jeffrey SchianoDepartment of Electrical Engineering1EE 200 Spring 2014Lab 15.Laboratory 15 Topics• LabVIEW– Implementing a finite state machine with an asynchronous reset using the myDAQ– Mechanical Action of Booleans– File Input/Output– Waveform Charts and Graphs2EE 200 Spring 2014Lab 15.Realizing Asynchronous Resets for a FSM Realized in LabVIEW• Method I: Polling– While waiting for the next clock tick, continuously poll (read) the reset line and take appropriate action when it is set• Method II: Hardware Interrupt (preferred approach)– An interrupt is a signal that commands LabVIEW to immediately execute block diagram code– As the myDAQ does not support interrupts, use Method I3EE 200 Spring 2014Lab 15.Lab 4: Parity Detector Design40S/01S/11100State DiagramPresentStateInputNextStateOutput0011010101100011DQoutputinputclockEE 200 Spring 2014Lab 15.Lab 13 Exercise 5• Realizes the parity detector FSM without an asynchronous reset to state S0• Assumes the following myDAQ connections – DIO output line 0 connects to DIO input line 4• Generates an input to the parity detector using the myDAQ DIO output line 0• Reads the input bit stream on myDAQ DI0 input line 4• Outputs the parity on myDAQ DIO output line 15EE 200 Spring 2014Lab 15.Lab 13 Exercise 56EE 200 Spring 2014Lab 15.Lab 13 Exercise 57EE 200 Spring 2014Lab 15.Exercise 1• Modify Lab 13 Exercise 5 for asynchronous reset via polling• A tactile switch and 27 k pull-up resistor generates the bit stream at DIO input line 4• A tactile switch and a 27 k pull-up resistor generates an asynchronous reset at DIO input line 7• Pressing a tactile button generates a logic-low signal at the myDAQ input and a logic-high level input at the FSM input• A LED and 330  series resistor at DIO output line 0 shows the parity detector output; off indicates even parity8EE 200 Spring 2014Lab 15.Exercise 19EE 200 Spring 2014Lab 15.Exercise 1• Read the bit stream input once a second• Pressing the bit stream button sends a bit 1 to the FSM• Poll the front panel Stop Button and asynchronous reset button once every 10 ms• Pressing the reset button drives the FSM to state S0(even parity); both the state and output must change as soon as the reset is observed• Display the bit stream input and parity detector output using front panel Boolean indicators• Open and complete Exercise_1.vi, then verify the code10EE 200 Spring 2014Lab 15.Exercise 111EE 200 Spring 2014Lab 15.Exercise 1• Create a DAQmx Channel for writing to lines 4 and 7 on the myDAQ 12Select Browse…EE 200 Spring 2014Lab 15.Exercise 113EE 200 Spring 2014Lab 15.LabVIEW Boolean Controls14• Six Mechanical Switch Actions1. Switch when pressed2. Switch when released3. Switch until released4. Latch when pressed5. Latch when released6. Latch until releasedEE 200 Spring 2014Lab 15.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 switch15EE 200 Spring 2014Lab 15.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 behavior16EE 200 Spring 2014Lab 15.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 behavior17EE 200 Spring 2014Lab 15.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 value18EE 200 Spring 2014Lab 15.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 value19EE 200 Spring 2014Lab 15.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 value20EE 200 Spring 2014Lab 15.Exercise 2• Under the Help tab, select Find Examples…• Open the Search tab, and set the keywords to Mechanical Action• Open and execute Mechanical Action of Booleans.vi21EE 200 Spring 2014Lab 15.Exercise 2• Follow the demonstration of Mechanical Action.vi22EE 200 Spring 2014Lab 15.Exercise 2• Open the block diagram to see how the VI operates• Later in the semester you will learn how to use Tab Control to change the Front Panel appearance in response to user inputs23EE 200 Spring 2014Lab 15.Plotting Data• Specialized numeric indicators for displaying one or more data plots data• Two Types of Waveform Indicators– Waveform Charts maintain a history of data, or buffer, from previous updates– Waveform Graphs plot pre-generated arrays of data all at once – they do not have the ability to append new values to previously generated data24EE 200 Spring 2014Lab 15.Exercise 3• 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 button25EE 200 Spring 2014Lab 15.Exercise 326EE 200 Spring 2014Lab 15.Plotting data – Chart Update Modes• Right-click the chart and select Advance >> 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 mode27EE 200 Spring 2014Lab 15.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 right28EE 200 Spring 2014Lab 15.Exercise 4• 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


View Full Document

PSU EE 200 - Lab_15_EE200_s14

Download Lab_15_EE200_s14
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_15_EE200_s14 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_15_EE200_s14 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?