DOC PREVIEW
PSU EE 200 - Lab_13_EE200_s14

This preview shows page 1-2-3-4-5-35-36-37-38-39-70-71-72-73-74 out of 74 pages.

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

Unformatted text preview:

ColorGrayscaleEE 200 Spring 2014Lab 13.EE 200Design ToolsLaboratory 13Professor Jeffrey SchianoDepartment of Electrical Engineering1EE 200 Spring 2014Lab 13.Laboratory 13 Topics• LabVIEW– Error Handling– DAQmx VIs– Realization of a FSM using the myDAQ2EE 200 Spring 2014Lab 13.Error Checking and Error Handling• Not practical to predict every problem a user can encounter• Without a mechanism to check for errors, you know only that the VI does not work properly• Error checking tells you why and where errors occur• Two error handling methods– Automatic error handling– Manual error handling3EE 200 Spring 2014Lab 13.Automatic Error Handling• LabVIEW automatically handles any known error when a VI runs by– suspending execution,– highlighting the subVI or function where the error occurred, and – displaying the Error Dialog Box4EE 200 Spring 2014Lab 13.Exercise 1• Exercise_1.vi executes the following tasks sequentially1. Opens a dialog box that asks the user to connect the device under test (DUT) to the myDAQ2. Sequentially writes two digital commands to the DUT using DIO 0 – DIO 3i. Command 1: F T F Tii. Command 2: T F T F3. Reads and displays the response from the DUT using DIO 4 – DIO 74. Opens a dialog box that asks the user to disconnect the DUT from the myDAQ5EE 200 Spring 2014Lab 13.Exercise 1• Use the following myDAQ connections• Connect the myDAQ to the PC and open Exercise_1.vi6DI0 0 DI0 4DI0 1 DI0 5DI0 2 DI0 6DI0 3 DI0 7EE 200 Spring 2014Lab 13.Exercise 1• Set the constant labeled Device Name to that of the myDAQ connected to the host computer– Avoids opening each Express VI7EE 200 Spring 2014Lab 13.Exercise 1: First Experiment8• Verify Automatic Error handling is enabled– Select File >> VI Properties and select Executionfrom the Category pull-down– Check Enable automatic error handling • Run the VI once using – Click on Done each time the dialog box opens– The expected DUT Response (TFTF)should appear with no error messagesEE 200 Spring 2014Lab 13.Exercise 1: Second Experiment9• Verify Automatic Error handling is enabled• Run the VI once using – Before clicking on Done in the first dialog box, disconnect the myDAQ from the host computer– After clicking on Done in the first dialog box• Program operation is suspended• The Express VI in the second frame of the Flat Sequence Structure is momentarily highlighted• An Error Dialog Box appears (see page 10)• Click on stop button in the dialog box and reconnect the myDAQEE 200 Spring 2014Lab 13.Exercise 1: Second Experiment10• Error Dialog boxEE 200 Spring 2014Lab 13.Exercise 1: Third Experiment11• Set the DUT Response indicator elements to False by clicking on them while the VI is not running• Disable Automatic Error handling– Select File >> VI Properties and select Execution from the Category pull-down– Uncheck Enable automatic error handling • Run the VI once using – Before clicking on Done in the first dialog box, disconnect the myDAQ from the host computer– After clicking on Done in the first dialog box, the program completes executing without reporting any errorsEE 200 Spring 2014Lab 13.Disabling Automatic Error Handling• Method I:– Select File >> VI Properties and select Executionfrom the Category pull-down– Uncheck Enable automatic error handling • Method II – Use Manual Error Handling– Disable automatic error handling for a subVI or function by wiring its error out cluster to the error in cluster of another subVI, function, or an error out indicator12EE 200 Spring 2014Lab 13.Manual Error Handling• When the Status of the input error cluster is true, a subVItypically does not execute and passes the error cluster appearing at its input to its error cluster output• Use the LabVIEW error handling VIs, functions, and parameters to manage errors13EE 200 Spring 2014Lab 13.Error Clusters• Use the error cluster controls and indicators to create error inputs and outputs in subVIs14• Status (Boolean)• Code (32-bit signed integer)• Source (string)EE 200 Spring 2014Lab 13.Exercise 2• Exercise_2.vi executes the same sequential tasks as Exercise_1.vi• Method for sequential programming (see Lab 9 Slide 24)– Exercise 1: Flat Sequence Structure – Exercise 2: Error Cluster routing (preferred)• As Exercise 2 wires the error cluster output from the Express VIs, automatic error handling is disabled for these VIs15EE 200 Spring 2014Lab 13.Exercise 2• Open Exercise_2.vi• Set the constant labeled Device Name to that of the myDAQ connected to the host computer16EE 200 Spring 2014Lab 13.Exercise 2: First Experiment17• Run the VI once using – Click on Done each time the dialog box opens– The expected DUT Response (TFTF) should appear with no error messagesEE 200 Spring 2014Lab 13.Exercise 2: Second Experiment18• Run the VI once using – Before clicking on Done in the first dialog box, disconnect the myDAQ from the host computer– After clicking on Done in the first dialog box the following Dialog box appearsEE 200 Spring 2014Lab 13.myDAQ Application Software• Two palettes of VIs for working with the myDAQ– Measurement I/O >> NI ELVISmx– Measurement I/O >> DAQmx• What are the differences between the two palettes?19EE 200 Spring 2014Lab 13.NI ELVISmx Palette• NI Educational Laboratory Virtual Instrumentation Suite• High-Level Express VIs– Digital Multimeter, Digital Oscilloscope, Bode Analyzer, Function Generator, Arbitrary Waveform Generator, Dynamic Signal Analyzer, Digital Writer, Digital Reader• The foundation for these high-level VIs are the low-level VIs available in the DAQmx palette20EE 200 Spring 2014Lab 13.NI DAQmx Palatte• Low-level VIs for controlling instrumentation for controlling hundreds of multifunction DAQ hardware devices• VIs available for analog input, analog output, digital I/O, and counter control (frequency measurement, pulse width, etc.)• VIs in the NI ELVISmx palette are constructed using the DAQmx VIs21EE 200 Spring 2014Lab 13.NI ELVISmx and DAQmx• NI ELVISmx– Advantages: Realizes high-level functionality, for example, an oscilloscope or Bode analyzer– Disadvantages: Cannot perform simple low-level functions, for example, generating a pulse-width modulated signal• NI DAQmx– Advantages: Designed for realizing low-level functions, for example, generating a pulse width modulated signal– Disadvantages: High-level functions not available22EE 200 Spring 2014Lab


View Full Document

PSU EE 200 - Lab_13_EE200_s14

Download Lab_13_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_13_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_13_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?