190 likes | 313 Views
Hu Shaoyan DSA Lab 23 Jan 1999. Contents. Project Overview General Purpose Interface Bus Introduction to LabVIEW TCP/IP Sockets Future Works. Overview.
E N D
Hu Shaoyan DSA Lab 23 Jan 1999
Contents Project Overview General Purpose Interface Bus Introduction to LabVIEW TCP/IP Sockets Future Works
Overview 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.
General Purpose Interface Bus (GPIB) GPIB History Signals & Lines Configuration
GPIB 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.
GPIB 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
Linear & Star Configurations (GPIB) Linear Configuration Star Configuration
Introduction to LabVIEW (LABoratory Virtual Instrument Engineering Workbench) Graphical Programming Language Virtual Instrument
Graphical 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.
Virtual 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.
G 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
TCP/IP Sockets • Why Sockets? • Stages in Establishing a TCP Connection • Perl and C • Java
Why 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.
Establishing a TCP Connection Perl and C Server Side socket bind listen accept read write write read socket connect Client Side
Establishing a TCP Connection Java Server Side ServerSocket accept DataInputStream DataOutputStream DataOutputStream DataInputStream Socket Client Side
Future 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.