Title: Hu Shaoyan
1Hu Shaoyan DSA Lab 23 Jan 1999
2Contents
Project Overview General Purpose Interface
Bus Introduction to LabVIEW TCP/IP Sockets Future
Works
3Overview
The Virtual Lab allows students to carry out
interactive experiments over the Internet as if
they are working in the actual laboratories. The
core of the Virtual Laboratory is a cluster of
general-purpose and/or specialized instruments
interfaced to a set of personal computer systems
connected to the Internet.
4Block Diagram
5General Purpose Interface Bus (GPIB)
GPIB History Signals Lines Configuration
6GPIB History
7GPIB Signals Lines
Data Lines 8 data lines carry both data and
command messages. Handshake Lines 3 lines
asynchronously control the transfer of message
bytes between devices. Interface Management Lines
5 lines manage the flow of information across
the interface.
8GPIB Configuration
- Devices are usually connected with a shielded
24-conductor cable with both a plug and
receptacle connector at each end. You can link
devices in either a linear configuration, a star
configuration or a combination of the two. - To achieve the high data transfer rate for which
GPIB was designed, the following restrictions are
typical for normal operation - A maximum separation of 4m between any 2 devices
and an average separation of 2 m over the entire
bus - A maximum total cable length of 20 m
- No more than 15 device loads connected to each
bus, with no less than two-thirds powered on
9Linear Star Configurations (GPIB)
Star Configuration
Linear Configuration
10Introduction to LabVIEW (LABoratory Virtual
Instrument Engineering Workbench)
Graphical Programming Language Virtual Instrument
11Graphical Programming Language G
G is the programming language at the heart of
LabVIEW. G, like C or BASIC, is a general-purpose
programming language with extensive libraries of
functions for any programming task. G differs
from those programming languages in one important
respect. Other programming languages are
text-based while G is graphical.
12Virtual Instruments
- G Programs are called virtual Instruments (VIs)
because their appearance and operation can
imitate actual instruments. - A LabVIEW VI consists of a front panel and a
block diagram. - G uses four structures to execute code.
- For Loop,
- While Loop,
- Case Structure ,
- Sequence Structure.
13Front Panel Block Diagram
14G Structures
total number of iterations
one of the selector values
frame number
current number of completed iterations
selector
condition
Case Structure
Sequence Structure
For Loop
While Loop
15TCP/IP Sockets
- Why Sockets?
- Stages in Establishing a TCP Connection
- Perl and C
- Java
16Why Sockets?
To provide an interface between your application
and the network you need a socket. Most of the
communication in a client-server application is
point-to-point, where the endpoint of such
communication is an application(client or
server). A socket acts as an endpoint for
communication between processes on a single
system or on different systems.
17Establishing a TCP Connection
Perl and C
Server Side
socket
listen
accept
bind
read
write
read
write
connect
Client Side
socket
18Establishing a TCP Connection
Java
Server Side
ServerSocket
accept
DataInputStream
DataOutputStream
DataInputStream
DataOutputStream
Client Side
Socket
19Future Works
Authentication mechanism is needed to enable the
administration of the user accounts of the
Virtual Laboratory. Conflict should be prevented
when two or more people try to control the same
equipment at the same moment. The refreshing
rate of the image captured by camera is supposed
to be improved.