Data collection using the LabPro and Excel
Updated 2/4/05
Ray Wisman
Kyle Forinash
What it does and how it works:
The software available from this web page allows an Excel spreadsheet to
control and collect data from a LabPro (from Vernier
Software) connected on a serial port. The Excel and LabPro can be on
the same computer or on remote computers connected over the Internet. We
have used this arrangement for student labs and an ongoing student research
project.
We are providing two pieces of software:
-
An example Excel spreadsheet - A Visual Basic (VB) macro controls
the LabPro and retrieves data into the spreadsheet. The data can be graphed,
analyzed etc. as normal.
-
A small communications server program - A TCP to serial convertor (TCP2Serial)
which facilitates the communication between the spreadsheet macro or other
networked application and the serial port where the LabPro is plugged in.
TCP2Serial runs in the background on the computer where the LabPro is connected.
Also:
-
You can modify the VB macro to make the LabPro control other probes or
make other measurements (you will need the LabPro technical manual, available
from Vernier).
-
For that matter, you can modify the macro to control ANY
serial port device (if you know what commands the device is expecting).
-
The setup works locally or over the Internet (the LabPro can be located
on the local computer or a remote computer anywhere on the Internet).
How to set this up:
-
Download the TCP2Serial source software (from Internet Explorer right click
on one of the following and 'Save Target As'). Versions choices of TCP2Serial
include:
-
C++ for Linux
- Windoz Version 2005
-
Mac TCP2Serial software is available for older Mac OS (pre- 8.1) from other
sources on the Internet. A version for newer Mac OS may become available
in the future.
-
Download the Excel spreadsheet. Note you have two options here: a left
click will run the spreadsheet in the browser, a right click with allow
you to 'Save Target As'. The spreadsheet will work either way but some
functions do not work in the browser.
-
Plug your LabPro into the serial port of the computer where the TCP2Serial
software is running.
-
Launch the TCP2Serial software on the computer where the LabPro is attached.
You may need to modify some parameters for your systems serial port assignments.
-
Start the DataLogger Spreadsheet by double clicking on it. Say yes to 'Enable
Macros'. Don't worry- this is no virus.
-
Double clicking on the 'Start' box will retrieve data and load it into
the spreadsheet.
-
To point the spreadsheet to a different computer change 'localhost' in
the spreadsheet box to the IP number or DNS name of the target PC (where
TCP2Serial is running and a LabPro is plugged in).
-
The spreadsheet can be modified to draw graphs of the data, change collection
parameters, analyze the data etc.
-
You can test just the spreadsheet part of this package by changing 'localhost'
to 'physics.ius.edu'. You should see new voltage data from a LabPro in
my office come up. This will tell you if at least the spreadsheet part
is working. Change back to 'localhost' to use your local LabPro.
-
Potential problems:
-
The entire Excel software package has to be loaded (the standard install
does not load everything).
-
The Excel spreadsheet may not work properly if loaded into a browser other
than Internet Explorer (you have to save it to disk and open it from Excel).
-
Mac versions of Excel do not (thus far) have all of the necessary functions
to make this work.
-
TCP2Serial has to be running on the machine with the LabPro. This can be
the same computer where the Excel is running but does not have to be.
An Example:
For the past few years an introductory calculus based physics class here at IUS has done
a Fast Fourier Transform lab on sound using a microphone, the LabPro and
our software. Students first sampled local sound sources (from instruments
which they brought to class) and then (through the Internet) sampled an
"unknown" source hidden in my office. Here are the student
instructions for the FFT lab and here is how the Excel spreadsheet
appears:
Physics at IUS: http://physics.ius.edu/
Contact Dr. K. Forinash,
for comments/suggestions/corrections.