The general aim of this project was to hook up all lab instruments necessary for a particular experiment onto a server so that select users present at a remote locations can access and set parameters on these instruments and view the results on an interactive web page in real time(web traffic delays overlooked).
The virtual lab project aims to allow scientific folk with limited resources or otherwise, access to all necessary equipment hooked up to a common server, the controls to which are hosted by it on a web-page which has the necessary framework enabling them to set parameters, obtain readings etc.
The GPIB dongle interfacing the instruments used in this project is manufactured by National Instruments.
A simple Oscilloscope using ADC readings from ATMEGA16 microcontroller based device “PHM” communicating via USB.
The user is allowed access to a webpage that displays a dynamically refreshed graph-plot of ADC data and an accompanying form with fields[name , password, samples, delay and cycles] which he may fill and submit to a queue of requests from other users stored in a database on the server. A real time plot with parameters set by the first user in the queue is visible. The entry is deleted on completion of the experiment and the next entry in the queue is executed.
The user adds his choice of parameters to a database. This database is accessed by a program running on the server and this program then writes a bunch of data onto a datafile continuously updating it with new readings. This file contains the latest readings from the oscilloscope.
A PHP script generates a plot of this data and creates a png image of it using PHP-GD each time it is run and it also zooms the plot according to a zoom variable passed to it which may vary from fixed values to auto zoom wherein it zooms the Y- axis to the image size.
• The main page which displays this page in an i-frame
• Serverprog.py- which acts as a mediator.
• Plot.php- which generates a graph of the data in datafile and makes a PNG image.
Resistance versus Temperature Characteristics study using LakeShore 336 Temperature Controller and KEITHLEY 2001 Multimeter
Again, the user is allowed can access a webpage that displays experiment reults as a plot and an accompanying form with fields[name , password, samples, starting temperature and ending temperature] which they may fill and submit by connecting to a socket created by a program running on the server which actually handles the instruments and data.
The user is required to provide authorization details and may take control of the experriment if no other user is controlling it. A real time plot which is refreshed continuously is visible on the page.
They may also modify certain parameters while the experiment is in progress by reconnecting to the server, providing identification and then requesting necessary changes.
How it works.
Source codes to the programs written for this particular purpose are attached. These include
• restemp.psp -the client page
• restemp_server.py- the mediator program running on the server
• restemp_plot.php – graph generator
#Author : Jithin B.P.
Indian Institute of Science Education and Research (IISER) Mohali,
Chandigarh , India
contact the author:
jithinbp %$# gmail com
ToDo: Insert complete instructions for setting up apache for python-psp, and also linux-gpib. Just google the heading text to locate the full pdf report I had submitted at the end of this summer project.