Muutke küpsiste eelistusi

Automating Science and Engineering Laboratories with Visual Basic [Pehme köide]

Presents techniques for solving problems that commonly arise in a laboratory using Visual Basic 6.0, including communication through an RS-232 port and TCP/IP network connection, development of instrument controllers, and the creation of interactive scientific graphical displays. The guide also provides several custom-developed software tools for building software applications such as a customizable spreadsheet class, and a class containing a variety of predefined parsing functions. Familiarity with the BASIC programming language is required. Annotation c. by Book News, Inc., Portland, Or.

A Volume in the Wiley-Interscience Series on Laboratory Automation.

The complete, step-by-step guide to using Visual Basic(r) in a laboratory setting Visual

Basic(r) is fast becoming the de facto laboratory programming language, yet existing books typically discuss applications that have nothing to do with science and engineering. This primer fills the gap in the field, showing professionals seeking to improve the productivity of their laboratories how to use Visual Basic(r) to automate laboratory processes.

Automating Science and Engineering Laboratories with Visual Basic(r) helps laboratory professionals decide when and if to use Visual Basic(r) and how to combine it with the many computing technologies used in modern laboratories such as RS-232 port communications, TCP/IP networking, and event-driven control, to name a few. With an emphasis on getting readers programming immediately, the book provides clear guidelines to the appropriate programming techniques as well as custom-developed software tools. Readers will learn how to build applications to control laboratory instruments, collect and process experimental data, create interactive graphical applications, and more.

Boasting many working examples with the complete source code and backward compatibility to previous versions of Visual Basic(r), Automating Science and Engineering Laboratories with Visual Basic(r) is an indispensable teaching tool for nonprogrammers and a useful reference for more experienced practitioners.
Introduction xiii
PART 1: VISUAL BASIC® AND THE INTEGRATED DEVELOPMENT ENVIRONMENT 1(56)
Background
2(4)
Objects and Controls
3(1)
Event-Driven Programming
3(3)
IDE Fundamentals
6(22)
The Menu Bar and Standard Toolbar
9(1)
The Toolbox and Form Designer
10(3)
Project Explorer
13(1)
Properties Window
14(1)
Running, Modifying, and Debugging Applications
14(3)
A Summary of the Steps for Creating a New Program
17(1)
A Quick Start
18(1)
Selecting the Project
18(1)
Setting Project and Form Properties
19(2)
Adding ActiveX Controls
21(1)
Adding Code to Event Procedures
21(3)
Running a Program
24(1)
Charting the Data
25(1)
Integrating the MSChart
25(2)
In Summary
27(1)
A Review Of The Visual Basic® Language
28(10)
Data Types and Arrays
28(4)
Execution Control
32(1)
Procedures
33(1)
Argument Passing
34(4)
The Structure Of A Visual Basic® Application
38(5)
Modules
38(3)
Scope and Lifetime
41(2)
Object-Oriented Programming In Visual Basic®
43(14)
Object-Oriented Programming
43(2)
Defining New Classes in Visual Basic+
45(5)
Some Useful Objects in VB
50(2)
Handling Run-Time Errors With On Error and the Err Object
52(1)
Understanding Collections
52(2)
The Object Browser
54(2)
Wrapping Up
56(1)
PART 2: DEVICE COMMUNICATIONS 57(80)
Introducing The Virtual Instrument
58(5)
Dynamic Data Exchange
63(2)
The DDE Model
63(1)
Establishing a DDE Conversation
64(1)
Using Dynamic Data Exchange In Visual Basic®
65(18)
Initiating an Automatic Link Mode DDE Conversation with Excel
65(2)
DDE Links-Types of DDE Conversations
67(1)
A Manual Link Mode DDE Conversation with Excel
68(1)
A Notify Link Mode DDE Conversation with Excel
68(2)
Creating a DDE Source Application
70(2)
Remotely Executing Commands in a DDE Source Application
72(3)
Handling DDE Errors
75(1)
DDE-Related Methods and Event Procedures
76(1)
Communicating with the Virtual Instrument Using DDE
76(7)
RS-232 Communications
83(11)
Configurations
83(1)
Transmission Styles
84(1)
Synchronizing Communications
85(1)
Data Bits
85(1)
Error Checking
86(1)
Transmission Rate-BAUD
87(1)
RS-232 Pin Assignments
87(1)
Flow Control
87(2)
The Physical Connection
89(4)
Cable Lengths
93(1)
RS-232 Communication Options Summary
93(1)
RS-232 Communications In Visual Basic®
94(9)
The MSComm ActiveX Control
94(1)
MSComm Properties
94(1)
A Quick Start
94(3)
MSComm Properties in More Detail
97(3)
Building an RS-232 Commander for the Virtual Instrument
100(3)
TCP/IP Networking
103(10)
Networking Protocols
103(1)
Internet Protocol
104(1)
Transmission Control Protocol
105(1)
User Datagram Protocol
106(1)
Ports
106(1)
Well-Known Service Ports
107(1)
Sockets
107(1)
The Client-Server Model
108(1)
Windows Sockets (Winsock)
108(2)
Ethernet Networks
110(3)
TCP/IP Networking In Visual Basic®
113(14)
The Winsock ActiveX Control
113(1)
Winsock Control Properties
113(1)
Winsock Control Methods
114(1)
Winsock Control Events
115(1)
Elements of VB TCP/IP Clients and Servers
115(5)
Multiclient Servers
120(5)
A VI Winsock Commander
125(2)
File Communications
127(10)
A File Communications Class
127(5)
Communicating Through Files
132(3)
Wrapping Up
135(2)
PART 3: DEVICE CONTROL AND DATA HANDLING 137(69)
Multithreading
139(2)
Multitasking versus Multithreading
139(1)
Threads
139(2)
Multithreading In Visual Basic®
141(4)
Apartment-Model Threading
141(1)
Visual Basic® and the Single Thread
141(4)
Concepts Of State
145(4)
State Diagrams
145(4)
State Machines-Implementing State Diagrams In Visual Basic®
149(8)
An Implementation of the VI State Diagram
149(4)
Testing the VI State Machine
153(4)
Parsing-Understanding Message Content
157(5)
Parsing
158(1)
Lexical Analysis versus Syntactic Analysis
158(1)
Grammars
158(2)
Parse Trees
160(1)
Parsing Methods
161(1)
A Visual Basic® Parser Class
162(15)
Parser Class Design
162(1)
How The Parser Class Works
163(8)
Using the Parser Class
171(6)
Device Monitoring And Control
177(6)
Monitoring a Device through Polling
178(3)
Polling as a ``Background'' Task
181(1)
Interrupt-Driven Device Monitoring
182(1)
Device Controllers In VB
183(23)
The Core Input Buffer Processing Procedure
183(2)
Implementing Device Polling in VB
185(1)
Device Communications through File Polling
185(5)
The MSComm OnComm Event
190(1)
An Event-Driven RS-232 Controller for the VI
190(9)
Similarities between MSComm and Winsock
199(2)
An Event-Driven Winsock Controller for the VI
201(3)
Wrapping Up
204(2)
PART 4: GRAPHICAL INTERFACES AND DATA PRESENTATION 206(105)
Scientific Plotting With MSChart
207(24)
Introducing the MSChart Control
207(1)
A Quick Start
208(3)
MSChart Properties
211(1)
MSChart Methods
211(1)
MSChart Events
212(1)
Specifying an MSChart Type
213(1)
Specifying MSChart Data
213(5)
Titles and Legends
218(1)
Series Statistics
219(2)
Interactive Features of MSChart
221(5)
The MSChart Object Model
226(5)
Tabular Data Display And Editing
231(34)
A Quick Start
232(2)
MSFlexGrid Properties
234(3)
MSFlexGrid Methods
237(1)
MSFlexGrid Events
237(2)
A VB Spreadsheet
239(1)
Creating an Instance of the clsSheet Class
240(1)
Properties of clsSheet Class
241(1)
Methods of the clsSheet Class
242(1)
Events of the clsSheet Class
243(1)
Using the clsSheet Class
243(5)
clsSheet Class Implementation
248(17)
Visual Basic® Graphics Fundamentals
265(18)
A Quick Start
266(1)
Graphics Methods
267(4)
Graphics Properties
271(7)
AutoRedraw, Persistent Graphics, and the Paint Event
278(1)
Coordinate Systems
279(4)
Active Graphic Displays
283(13)
A Model for Active Graphic Displays
283(1)
An Active StripChart Graphic Display Object
284(5)
An Active GasGauge Graphic Object
289(7)
Interactive Graphic Displays
296(15)
An Interactive Knob Graphic Object
297(5)
An Interactive Thermometer Graphic Object
302(7)
Wrapping Up
309(1)
References
310(1)
APPENDIX A: ASCII CHARACTER SET AND CODE TABLE 311(3)
APPENDIX B: DESCRIPTIONS OF EXAMPLE PROGRAMS 314(5)
APPENDIX C: INSTRUCTIONS FOR BUILDING THE VIRTUAL INSTRUMENT 319(26)
The Main Form
319(18)
Transmission Formats Dialog
337(3)
Communication Settings Dialog
340(3)
Network Settings Dialog
343(2)
Index 345
MARK F. RUSSO is Senior Researcher with Bristol-Myers Squibb's Combinatorial Drug Discovery Group and an Adjunct Professor in the School of Biomedical Engineering, Science, and Health Systems at Drexel University. He is the developer of several laboratory computer applications and robot systems and has published extensively on related topics.

MARTIN M. ECHOLS is Site Manager for Combinatorial Chemistry Automation for Bristol-Myers Squibb. He has authored several software applications for automating laboratory systems.