Data collection using the LabPro and Excel
Updated 4/24/03
Written by:
Ray Wisman (rwisman@ius.edu)
Kyle Forinash (kforinas@ius.edu)
What it does and how it works:
The software available from this web page allows an Excel spreadsheet
to
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. Versions choices include:
-
Download the Excel spreadsheet. Note that Internet Explorer may attempt
to execute Excel (use a right click to 'Save As').
-
Plug your LabPro into the serial port of the computer where the
TCP2Serial
software is running.
-
Launch the TCPSerial 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 sawtooth 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 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.
- The newest version of MS Office using Visual Studio.NET has a
bug which prevents the script from running. A work around is to go back
to VB6. Another work around is to add the following file to the registry following these instructions. You will need the
installation disks to do this.
- The
TCP2Serial software will not run under Windows XP without this ActiveX Control (unzip and move the
MSCOMM32.OCX file to the C:\Windows\System32 directory).
An Example:
For the past few years introductory calculus based physics class here
at IUS have 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:
Return to the IUS
Physics Top Page.
Contact Kyle Forinash, kforinas@ius.edu,
for comments/suggestions/corrections.