Home    Current Courses    Publications/Presentations    Current Projects    Links    Resume/Vita  
 

SCI2150 Computer Technology for the Sciences

Course Homepage

 

Classwork File Upload

Enter your login name:  

Choose a file to upload:

 

 

Syllabus

Here are the files that go with the Labview 8 student edition book :   learning_lv8_03012007.zip

Here are some Labview vis that will be useful

ReadTemp.vi  This vi reads a temperature sensor plugged in to channel 1 of the sensorDAQ.  If no sensorDAQ is connected, a window with a manual control will pop up, allowing the temperature sensor to be simulated.

TurnstyleFSM.vi implements a Finite State Machine for a turnstyle.

XYGraph.vi implements an x-y graph that remembers previous points and always displays the front panel. R theta to xy is the subvi that we made in class that converts polar coordinates to xy (Cartesian) coordinates.

classlist.vi is the start of the array and cluster example

shapes start.vi is the file from the class on graphs: Shapes start.vi

EXAM FILES

Exam 1: The song notes VI for the first exam can be found here.

Exam 2: The timeclock_partial.vi is located here, and the grade data is here.

LAB FILES

The reaction timer example is located here, and you will need the register read/write vi here.   If you need the example and read/write vi for labview 8, they are located in a zip file here.

 

Robot Project:

The Lego NXT labview toolkit for windows is here.  A command server and a test application for communicating to the NXT brick are here.  Here is the programming guide and the getting started guide for the labview NXT toolkit.  An updated version of the command server that lets you tune the motors is located here.

Here is an example vi that sends a single command to the commandserver running on the NXT.  Here is a simple vi that can serve as the start of your robot vi.

Here is a link to the sensordaq drivers and the installation instructions if you want to run any of the experiment vis on your own computer.  You will also need to install DAQmx 8.6 (or later) from the NI website.

Homework Assignments

Homework #1  Bishop E2.2, E2.4, E2.5, P2.3, P2.6, D2.2 

Homework #2  Bishop E4.5, P4.2, D4.3

Homework #3  Bishop E5.5, E5.6, P5.3, D5.2

Homework #4  Bishop E6.4, E6.8, P6.2, P6.3, P6.6, D6.2 (use a case structure), D6.3

Homework #5  Bishop E7.5, E7.7, P7.5 (use ReadTemp.vi above), P7.7, D7.1, D7.2

Homework #6  Bishop E10.1, D10.2, and the following:

C1. Write a "temperature logger" vi that reads the temperature (using ReadTemp.vi) and outputs the time (in seconds since the vi started) and temperature to a file every 10 seconds.  Each data point should be on a separate line, and the time and temperature should be separated by a "tab" character. When the vi is started, the current time and date should be written to the file.  The file name should be entered in a file dialog box only once when the vi is started.  Load the file into Microsoft Excel and use Excel to plot the temperature versus time. 

C2.  Write a vi that parses a "command" string that has a text command followed by three integer numbers. The numbers and command may be separated by any number of spaces, but the command will contain no spaces.  The command string should be input on a front-panel control. Show the command and the three numbers using indicators on the front panel.  For example, a command might be "Move 5 3 1"

C3.  Write a vi that scrambles a text message by adding a number between 1 and 10 to the ASCII value of each character.  The original text message should be in all CAPITAL letters.  The vi should have a "encode/decode" switch on the front panel to select if the text string should be either encoded or decoded.

Homework #7  Bishop E8.3, D8.3, and the following:

C4 Write a vi that displays a graph showing a red triangle inside a blue circle.  The vertices of the triangle should be on the circle.

C5  Write a vi that displays a rotating polygon with N sides.  Create a control for the rotation rate and the size of the polygon.

C6. Write a vi that reads the temperature and time data generated in c1 above and displays it on a graph.

Homework #8   C7. Draw a state diagram for a combination lock finite state machine.  The combination lock should have an "acknowledge" input and four "number" inputs (1-4).  The lock should have an "unlock" output that should assert when the correct combination is entered and turn off when "acknowledge" is pressed.  The lock should have a 4-digit combination of 3-2-1-4.  Any numbers can precede the correct combination (for example, 4-5-3-2-1-4 should unlock the lock, but 4-5-3-2-1-1 should not. 

C8.  Implement the combination lock above in Labview.

Projects

Project 1:  Using the provided "command server" and lego bluetooth communication vis, write a labview program that will send your lego robot along a path.  You will need to implement commands to turn left or right and go forward and backward.  The forward and backward commands should accept distances in inches, and the left and right commands should accept angles in degrees.  Your labview program should have a means of calibrating the robot so that you can obtain the most accurate results.  On the last day of class, a course will be specified and we will have a "robot contest".  The robot that completes the course and is closest to the proper end position will win the contest. 

 

 

Project 2 :  Using the reaction timer apparatus and the interface vis provided above, conduct an experiment on human reaction time.  The apparatus is capable of generating an audio or visual stimulus (or both), and varying the properties of the stimulus.  Once the apparatus is configured, it is commanded to "start" the test, and when the subject pushes the button on the apparatus the test is complete and the reaction time can be read.   There are two main types of experiments you can perform.  One type of experiment could measure the effects of a controlled parameter that can be varied continuously over a range.  For example, you may wish to explore the dependence of reaction time on the frequency of the sound used as the "stimulus".   The other type of experiment could test different external conditions.  For example, you may wish to determine if a person's reaction time improves after the person has exercised for a certain amount of time.    For both types of experiments, be sure to take enough samples to properly analyze your data.  Write a labview vi that controls the experiment and saves the data to a file.  Your data should be analyzed in Excel.

Presentation:  Create a powerpoint presentation for a 10 minute talk about your reaction time results.  The presentation should begin with an outline and an introduction, and the data should be presented in graphical form.  The results should then be presented, and the presentation should end with a brief conclusion. 

Paper:  Using this example as a guide, prepare a paper about your reaction time experiment.  Be sure to include any relevant data tables, illustrations and graphs.  Also be sure to format your paper to duplicate the "scientific journal" format used in the example handout.

 

TENTATIVE schedule

Wed, Sep 02

Introduction

First day of Class

Fri, Sep 04

LabVIEW Basics (1 hour class at 11:00)

Mon, Sep 07

Virtual Instruments (Build a VI)

Wed, Sep 09

Virtual Instruments (DataFlow)

Fri, Sep 11

1- hour Lab Session + Editing and Debugging

Homework 1 Due

Mon, Sep 14

Editing and Debugging

Wed, Sep 16

Editing and Debugging

Fri, Sep 18

1-hour Lab Session + SubVIs

Homework 2 Due

Mon, Sep 21

SubVis

Wed, Sep 23

Structures

Revival

Fri, Sep 25

1- hour Lab Session + Structures

Homework 3 Due

Mon, Sep 28

Structures

Wed, Sep 30

Structures Lab Session

Homework 4 Due

Fri, Oct 02

Exam 1

Mon, Oct 05

Arrays and Clusters

Wed, Oct 07

Arrays and Clusters

Fri, Oct 09

2-hour Lab Session

Mon, Oct 12

Fall Break

Fall Break

Wed, Oct 14

Strings and File I/O

Homework 5 Due

Fri, Oct 16

1-Hour Lab Session + Strings and File I/O

Mon, Oct 19

Strings and File I/O

Wed, Oct 21

Review / Help Session

Homework 6 Due

Fri, Oct 23

Exam 2

Mon, Oct 26

Robot Project

Wed, Oct 28

Robot Project

Fri, Oct 30

Robot Contest!!

Mon, Nov 02

Excel

Wed, Nov 04

Excel

Fri, Nov 06

1-Hour Lab Session + Charts and Graphs

Mon, Nov 09

Charts and Graphs

Wed, Nov 11

Charts and Graphs

Fri, Nov 13

2-hour Lab Session

Homework 7 Due

Mon, Nov 16

Finite State Machines

Wed, Nov 18

Finite State Machines

Fri, Nov 20

Exam 3

FSM HW Due

Mon, Nov 23

Microsoft Word and Final Project Intro.

Project Proposal Due

Wed, Nov 25

Thanksgiving Break

Thanksgiving Break

Fri, Nov 27

Thanksgiving Break

Thanksgiving Break

Mon, Nov 30

Microsoft Word

Wed, Dec 02

PowerPoint

Fri, Dec 04

2-hour Lab Session (Project)

Mon, Dec 07

Project

Wed, Dec 09

Project

Project Data Report Due

Fri, Dec 11

2-hour Lab Session (Project)

Mon, Dec 14

Project Report and PowerPoint Due

Last day of Class

 

 

 

 

 
   
 
Home    Current Courses    Publications/Presentations    Current Projects    Links    Resume/Vita