Python

Páginas: 634 (158282 palabras) Publicado: 1 de agosto de 2012
Download from Wow! eBook

Real World Instrumentation with Python

Real World Instrumentation with Python

J. M. Hughes

Beijing • Cambridge • Farnham • Köln • Sebastopol • Tokyo

Real World Instrumentation with Python
by J. M. Hughes
Copyright © 2011 John M. Hughes. All rights reserved. Printed in the United States of America. Published by O’Reilly Media, Inc., 1005 GravensteinHighway North, Sebastopol, CA 95472. O’Reilly books may be purchased for educational, business, or sales promotional use. Online editions are also available for most titles (http://my.safaribooksonline.com). For more information, contact our corporate/institutional sales department: 800-998-9938 or corporate@oreilly.com.

Editor: Julie Steele Production Editor: Adam Zaremba Copyeditor: RachelHead Proofreader: Sada Preisch Printing History:
November 2010: First Edition.

Indexer: John Bickelhaupt Cover Designer: Karen Montgomery Interior Designer: David Futato Illustrator: J. M. Hughes and Robert Romano

Nutshell Handbook, the Nutshell Handbook logo, and the O’Reilly logo are registered trademarks of O’Reilly Media, Inc. Real World Instrumentation with Python, the image of a hoodedcrow, and related trade dress are trademarks of O’Reilly Media, Inc. Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and O’Reilly Media, Inc., was aware of a trademark claim, the designations have been printed in caps or initial caps.
While every precaution has been taken in thepreparation of this book, the publisher and author assume no responsibility for errors or omissions, or for damages resulting from the use of the information contained herein.

TM

This book uses RepKover™, a durable and flexible lay-flat binding.
ISBN: 978-0-596-80956-0 [M] 1289573686

Table of Contents

Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii 1. Introduction to Instrumentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Data Acquisition Control Output Open-Loop Control Closed-Loop Control Sequential Control Applications Overview Electronics Test Instrumentation Laboratory Instrumentation Process Control Summary 2 4 5 6 9 9 9 11 13 132. Essential Electronics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Electrical Charge Electric Current Basic Circuit Theory Circuit Schematics DC Circuit Characteristics Ohm’s Law Sinking and Sourcing More About Resistors AC Circuits Sine Waves Capacitors Inductors Other Waveforms: Square, Ramp, Triangle, Pulse InterfacesDiscrete Digital I/O Analog I/O 15 17 19 20 24 25 27 27 30 30 32 36 38 39 40 44

v

Counters and Timers PWM Serial I/O Parallel I/O Summary Suggested Reading

49 50 51 54 55 56

3. The Python Programming Language . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
Installing Python The Python Programming Language The Python Command Line Command-Line Options andEnvironment Objects in Python Data Types in Python Expressions Operators Statements Strings Program Organization Importing Modules Loading and Running a Python Program Basic Input and Output Hints and Tips Python Development Tools Editors and IDEs Debuggers Summary Suggested Reading 60 61 61 63 64 65 77 78 84 91 96 106 108 110 115 117 117 120 120 120

4. The C Programming Language . . . . . . . . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
Installing C Developing Software in C A Simple C Program Preprocessor Directives Standard Data Types User-Defined Types Operators Expressions Statements Arrays and Pointers Structures Functions The Standard Library
vi | Table of Contents

123 124 125 128 132 133 134 143 143 150 153 156 158

Building C Programs C Language...
Leer documento completo

Regístrate para leer el documento completo.

Estos documentos también te pueden resultar útiles

  • Python
  • Por Qué Python?
  • PYTHON
  • python sonido
  • python
  • python
  • Python
  • Python

Conviértase en miembro formal de Buenas Tareas

INSCRÍBETE - ES GRATIS