0% found this document useful (0 votes)
16 views

14350

The document promotes ebookluna.com as a platform for seamless downloads of various eBooks across different genres, particularly focusing on scientific and engineering topics. It highlights specific titles available for download, including 'Hands-On Introduction to LabVIEW for Scientists and Engineers' and 'Introduction to Probability and Statistics for Engineers and Scientists.' The content also outlines the structure of the LabVIEW book, emphasizing a hands-on approach to learning programming skills relevant to experimental work.

Uploaded by

sefhobhokre7
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views

14350

The document promotes ebookluna.com as a platform for seamless downloads of various eBooks across different genres, particularly focusing on scientific and engineering topics. It highlights specific titles available for download, including 'Hands-On Introduction to LabVIEW for Scientists and Engineers' and 'Introduction to Probability and Statistics for Engineers and Scientists.' The content also outlines the structure of the LabVIEW book, emphasizing a hands-on approach to learning programming skills relevant to experimental work.

Uploaded by

sefhobhokre7
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 45

Experience Seamless Full Ebook Downloads for Every Genre at ebookluna.

com

(eBook PDF) Hands-On Introduction to LabVIEW for


Scientists and Engineers 4th Edition

https://ebookluna.com/product/ebook-pdf-hands-on-
introduction-to-labview-for-scientists-and-engineers-4th-
edition/

OR CLICK BUTTON

DOWNLOAD NOW

Explore and download more ebook at https://ebookluna.com


Instant digital products (PDF, ePub, MOBI) available
Download now and explore formats that suit you...

(eBook PDF) Introduction to Probability and Statistics for


Engineers and Scientists 5th Edition

https://ebookluna.com/product/ebook-pdf-introduction-to-probability-
and-statistics-for-engineers-and-scientists-5th-edition/

ebookluna.com

(eBook PDF) Modern Physics for Scientists and Engineers


4th Edition

https://ebookluna.com/product/ebook-pdf-modern-physics-for-scientists-
and-engineers-4th-edition/

ebookluna.com

(eBook PDF) Turbulence: An Introduction for Scientists and


Engineers 2nd Edition

https://ebookluna.com/product/ebook-pdf-turbulence-an-introduction-
for-scientists-and-engineers-2nd-edition/

ebookluna.com

Fortran for Scientists and Engineers 4th Edition Stephen


J. Chapman - eBook PDF

https://ebookluna.com/download/fortran-for-scientists-and-engineers-
ebook-pdf/

ebookluna.com
(eBook PDF) Physics for Scientists and Engineers A
Strategic Approach 4th Global

https://ebookluna.com/product/ebook-pdf-physics-for-scientists-and-
engineers-a-strategic-approach-4th-global/

ebookluna.com

Physics for Scientists & Engineers with Modern Physics 4th


Edition (eBook PDF)

https://ebookluna.com/product/physics-for-scientists-engineers-with-
modern-physics-4th-edition-ebook-pdf/

ebookluna.com

(eBook PDF) Applied Numerical Methods with MATLAB for


Engineers and Scientists 4th Edition

https://ebookluna.com/product/ebook-pdf-applied-numerical-methods-
with-matlab-for-engineers-and-scientists-4th-edition/

ebookluna.com

(eBook PDF) Modern Physics for Scientists and Engineers


5th Edition

https://ebookluna.com/product/ebook-pdf-modern-physics-for-scientists-
and-engineers-5th-edition/

ebookluna.com

(Original PDF) Physics for Scientists and Engineers 2nd


Canadian Edition

https://ebookluna.com/product/original-pdf-physics-for-scientists-and-
engineers-2nd-canadian-edition/

ebookluna.com
stop
rD
~

[!]-
__,...,
Contents

Preface Xlll
About the Author XVlll

1. LABVIEW PROGRAM DEVELOPMENT 1


1.1 LabVIEW Programming Environment 1
1.2 Blank VI 2
1.3 Front-Panel Editing 3
1.4 Block-Diagram Editing 11
1.5 Program Execution 22
1.6 Pop-Up Menu and Data-Type Representation 24
1.7 Program Storage 27
1.8 Quick Drop 29
Do It Yourself 32
Use It! 34
Problems 36

2. THE WHILE LOOP AND WAVEFORM CHART 39


2.1 Programming Structures and Graphing Modes 39
2.2 While Loop Basics 40
2.3 Sine-Wave Plot Using a While Loop and Waveform Chart 42
2.4 LabVIEW Help Window 48
2.5 Front-Panel Editing 50
2.6 Waveform Chart Pop-Up Menu 53
2.7 Finishing the Program 56
2.8 Program Execution 57
2.9 Program Improvements 59
2.10 Data Types and Automatic Creation Feature 70
Do It Yourself 74
Use It! 75
Problems 77

3. THE FOR LOOP AND WAVEFORM GRAPH 83


3.1 For Loop Basics 83
3.2 Sine-Wave Plot Using a For Loop and Waveform Graph 84

VII
Contents

3.3 Waveform Graph 85


3.4 Owned and Free Labels 86
3.5 Creation of Sine Wave Using a For Loop 87
3.6 Cloning Block-Diagram Icons 89
3.7 Auto-Indexing Feature 91
3. 8 Running the VI 94
3.9 X- Axis Calibration of the Waveform Graph 94
3.10 Sine-Wave Plot Using a While Loop and Waveform Graph 100
3.11 Front-Panel Array Indicator 103
3.12 Debugging with the Probe Watch Window and Error List 108
Do It Yourself 115
Use It! 117
Problems 119

4. THE MATHSCRIPT NODE AND XY GRAPH 127


4.1 MathScript Node Basics 127
4.2 Quick MathScript Node Example: Sine-Wave Plot 130
4.3 Waveform Simulator Using a MathScript Node and XY Graph 137
4.4 Creating an XY Cluster 142
4.5 Running the VI 143
4.6 LabVIEW MathScript Window 144
4.7 Adding Shape Options Using an Enumerated Type Control 148
4.8 Finishing the Block Diagram 151
4.9 Running the VI 155
4.10 Control and Indicator Clusters 156
4.11 Creating an Icon Using the Icon Editor 163
4.12 Icon Design 163
4.13 Connector Assignment 168
Do It Yourself 172
Use It! 173
Problems 174

5. INTRODUCTION TO DATA ACQUISITION DEVICES USING MAX 179


5.1 Data Acquisition Hardware 179
5.2 Measurement & Automation Explorer (MAX) 181
5.3 Analog Input Modes 185
5.4 Range and Resolution 187
5.5 Sampling Frequency and the Aliasing Effect 187
5.6 Analog Input Operation Using MAX 189
5.7 Analog Output 193
5.8 Analog Output Operation Using MAX 193
5.9 Digital Input/Output 197
5.10 Digital Input/Output Operation Using Max 198

VIII
CONTENTS

Do It Yourself 200
Use It! 202
Problems 204
6. DATA ACQUISITION USING DAO ASSISTANT 206
6.1 Data Acquisition VIs 206
6.2 Simple Analog Input Operation on a DC Voltage 207
6.3 Digital Oscilloscope 218
6.4 DC Voltage Storage 228
6.5 Hardware-Timed Waveform Generator 234
6.6 Placing a Custom-Made VI on a Block Diagram 237
6.7 Completing and Executing Waveform
Generator (Express) 240
Do It Yourself 242
Use It! 243
Problems 246

7. DATA FILES AND CHARACTER STRINGS 254


7.1 ASCII Text and Binary Data Files 254
7.2 Storing Data in a Spreadsheet-Formatted File 256
7.3 Storing a One-Dimensional Data Array 257
7.4 Transpose Option 260
7.5 Storing a Two-Dimensional Data Array 262
7.6 Controlling the Format of Stored Data 266
7.7 The Path Constant and Platform Portability 267
7.8 Fundamental File I/0 VIs 269
7.9 Adding Text Labels to a Spreadsheet File 274
7.10 Backslash Codes 277
Do It Yourself 279
Use It! 282
Problems 284

8. SHIFT REGISTERS 292


8.1 Shift Register Basics 292
8.2 Quick Shift Register Example: Integer Sum 295
8.3 Noise and Signal Averaging 299
8.4 Noisy Sine VI 301
8.5 Moving Average of Four Traces 307
8.6 Modularity and Automatic Sub VI Creation 316
8.7 Moving Average of Arbitrary Number of Traces 323
Do It Yourself 337
Use It! 337
Problems 340

IX
Contents

9. THE CASE STRUCTURE 348


9.1 Case Structure Basics 348
9.2 Quick Case Structure Example: Runtime
Options Using Property Nodes 351
9.3 State Machine Architecture: Guessing Game 363
9.4 State Machine Architecture: Express VI-Based
Digital Oscilloscope 377
Do It Yourself 386
Use It! 387
Problems 389

10. DATA DEPENDENCY AND THE SEQUENCE STRUCTURE 396


10.1 Data Dependency and Sequence Structure Basics 396
10.2 Event Timer Using a Sequence Structure 400
10.3 Event Timer Using Data Dependency 407
10.4 Highlight Execution 411
Do It Yourself 413
Use It! 414
Problems 417

11. ANALYSIS VIs: CURVE FITTING 425


11.1 Thermistor Resistance-Temperature Data File 425
11.2 Temperature Measurement Using Thermistors 428
11.3 The Linear Least-Squares Method 431
11.4 Inputting Data to a VI Using a Front-Panel Array Control 433
11.5 Inputting Data to a VI by Reading from a Computer File 436
11.6 Slicing Up a Multidimensional Array 439
11.7 Running the VI 443
11.8 Curve Fitting Using the Linear Least-Squares Method 444
11.9 Residual Plot 452
11.10 Curve Fitting Using the Nonlinear Least-Squares Method 454
Do It Yourself 457
Use It! 460
Problems 462

12. ANALYSIS VIs: FAST FOURIER TRANSFORM 470


12.1 Quick Fast Fourier Transform Example 470
12.2 The Fourier Transform 480
12.3 Discrete Sampling and the Nyquist Frequency 481
12.4 The Discrete Fourier Transform 482
12.5 The Fast Fourier Transform 484
12.6 Frequency Calculator VI 485

X
CONTENTS

12.7 FFT of Sinusoids 488


12.8 Applying the FFT to Various Sinusoidal Inputs 491
12.9 Magnitude of the Complex-Amplitude 494
12.10 Observing Leakage 500
12.11 Windowing 503
12.12 Estimating Frequency and Amplitude 509
12.13 Aliasing 513
Do It Yourself 514
Use It! 515
Problems 519

13. DATA ACQUISITION AND GENERATION USING DAOmx VIs 525


13.1 DAQmx VI Basics 525
13.2 Simple Analog Input Operation on a DC Voltage 527
13.3 Digital Oscilloscope 533
13.4 Express VI Automatic Code Generation 540
13.5 Limitations of Express VIs 541
13.6 Improving Digital Oscilloscope Using State Machine Architecture 543
13.7 Analog Output Operations 556
13.8 Waveform Generator 557
Do It Yourself 560
Use It! 561
Problems 565

14. CONTROL OF STAND-ALONE INSTRUMENTS 574


14.1 Instrument Control Using VISA VIs 574
14.2 The VISA Session 575
14.3 The IEEE 488.2 Standard 579
14.4 Common Commands 579
14.5 Status Reporting 580
14.6 Device-Specific Commands 584
14.7 Specific Hardware Used in This Chapter 586
14.8 Measurement & Automation Explorer (MAX) 587
14.9 Simple VISA-Based Query Operation 594
14.10 Message Termination 598
14.11 Getting and Setting Communication Properties
Using a Property Node 599
14.12 Performing a Measurement over the Interface Bus 603
14.13 Synchronization Methods 608
14.14 Measurement VI Based on the Serial Poll Method 616
14.15 Measurement VI Based on the Service Request Method 622
14.16 Creating an Instrument Driver 628

XI
Contents

14.17 Using the Instrument Driver to Write an Application Program 642


Do It Yourself 64 7
Use It! 648
Problems 651

APPENDIX A. FORMULA NODE PROGRAMMING FOR CHAPTER 4 653


A.1 Formula Node Basics 653
A.2 Quick Formula Node Example: Sine-Wave Plot (Section 4.2) 654
A.3 Formula Node-Based Waveform Simulator (Sections 4.3-4.4) 658
A.4 Formula Node-Based Waveform Simulator (Section 4.8) 659
A.5 Formula Node-Based Waveform Simulator (Section 4.1 0) 660

APPENDIX B. MATHEMATICS OF LEAKAGE AND WINDOWING 661


B.1 Analytic Description of Leakage 661
B.2 Description of Leakage Using the Convolution Theorem 665

APPENDIX C. PID TEMPERATURE CONTROL PROJECT 670


C.1 Project Description 670
C.2 Voltage-Controlled Bidirectional Current
Driver for Thermoelectric Device 670
C.3 PID Temperature Control Algorithm 672
C.4 PID Temperature Control System 675
C.5 Construction of Temperature Control System 676

INDEX 684

XII
Preface

Hands- On Introduction to Lab VIEW for Scientists and Engineers provides a learn-
by-doing approach to acquiring the computer-based skills used daily in experi-
mental work. This book is not a manual-like presentation of LabVIEW. Rather,
Hands-On Introduction to Lab VIEW leads its readers to mastery of LabVIEW
through the process of using this powerful laboratory tool to carry out interest-
ing and relevant projects. Readers, who are assumed to have no prior computer
programming or LabVIEW background, begin writing meaningful programs in
the first few pages.
Hands- On Introduction to Lab VIEW can be used as a text in an instructional
lab course or for self-study by individual researchers. The book is designed for flex-
ible use so that readers can easily choose the desired depth of coverage. The first
six chapters, which form the foundation appropriate for all readers, focus on the
fundamentals of LabVIEW programming as well as the basics of computer-based
experimentation using a National Instruments data acquisition (DAQ) device.
These opening chapters can be used as the basis of a three- or four-week introduc-
tion to LabVIEW-based data acquisition. Subsequent chapters have been written
as independently as possible so that an instructor or self-learner can fill out their
course of study as desired. Those who work through most of the text's chapters will
attain an intermediate skill level in computer-based data acquisition and analysis.
The progression of topics in Hands- On Introduction to Lab VIEW is as follows:
Chapters 1-4: Fundamentals of the LabVIEW Graphical Programming Lan-
guage. Central features of LabVIEW including its programming environment,
control loop structures, graphing modes, mathematical functions, and text-based
MathScript (and Formula Node) commands are learned in the course of writing
digitized waveform simulation programs.
Chapter 5: Introduction to Data Acquisition Devices Using MAX. Features of
National Instruments DAQ devices are presented, along with concepts of digitized
data such as resolution, sampling frequency, and aliasing. Then, using the Mea-
surement & Automation Explorer (MAX), readers interactively control the full
functionality (analog-to-digital, digital-to-analog, digital input/output, and pulse
counting) of a National Instruments DAQ device.
Chapter 6: Data Acquisition Using DAQ Assistant. Using the high-level
DAQ Assistant Express VI, readers write LabVIEW programs that execute

XIII
Preface

analog-to-digital, digital-to-analog, and digital input/output tasks on a National


Instruments DAQ device. Computer-based instruments constructed include a DC
voltmeter, digital oscilloscope, DC voltage source, waveform generator, and blink-
ing LED array.
Chapters 7-10: More LabVIEW Programming Fundamentals. Implementation of
data file input/output, local memory, and conditional branching in LabVIEW is inves-
tigated while writing several useful programs (e.g., spreadsheet data storage, moving
averager) and learning the powerful state machine program architecture. Addition-
ally, LabVIEW's control flow approach to computer programming is studied.
Chapters 11 and 12: Data Analysis. Proper use ofLabVIEW's curve fitting and
fast Fourier transform (FFT) functions is investigated. Using Express VIs to con-
trol a DAQ device, two computer-based instruments-a digital thermometer and a
spectrum analyzer-are constructed.
Chapter 13: Data Acquisition Using DAQmx. Programs are written to carry
out analog-to-digital, digital-to-analog, and digital counter tasks on a DAQ device
using the conventions of DAQmx. T his lower-level approach (in comparison to the
high-level Express VIs) allows utilization of the fu ll available range of DAQ device
featu res. A DC voltmeter, DC voltage source, waveform generator, and frequency
meter are constructed, as well as a sophisticated digital oscilloscope based on the
state machine architecture.
Chapter 14: Control of Stand-Alone Instruments. Using LabVIEW's VISA
communication driver, control of a stand-alone instrument over the General Pur-
pose Interface Bu s (GPIB) as well as the Universal Serial Bus (USB) is studied.
A Keysight/Agilent 34410A Multimeter is used to demonstrate the central concepts
of interface bu s communication between a PC and stand-alone instrument.
Appendix A: Formula Node Supplement. After a brief introduction to the For-
mu la Node, instructions are given for carrying out Chapter 4 exercises using the
Formula Node (rather than the MathScript Node).
Appendix B: FFT Supplement. A mathematical description of the leakage and
windowing effects associated with fast Fourier transform analysis is presented.
Appendix C: Temperature Control Project. The LabVIEW skills acquired
throughout the book are used to construct a Proportional-Integral-Derivative
(PID) temperature control system. A design for the hardware required for this proj-
ect is included.
Key features of Hands- On Introduction to Lab VIEW include its emphasis on
real-world problem solving, its early introduction and routine use of data acquisi-
tion hardware, its Do It Yourself projects and Use It! examples at the end of each
chapter, and its healthy offering of back-of-the-chapter homework problems.
Real-World Problem Solving: Chapter topics and exercises provide examples
of how commonly encountered problems are solved by scientists and engineers
in the lab. LabVIEW features, along with relevant mathematical background, are

XIV
PREFACE

introduced in the course of solving these problems. The "best practice" strategies
presented (such as modularity and data dependency) equip readers to optimize
their use of LabVIEW.
Data Acquisition Usage Throughout: LabVIEW's Express VIs allow exercises
involving DAQ hardware to appear early and then routinely in Hands-On Introduc-
tion to Lab VIEW Express VIs package common measurement tasks into a single
graphical icon and so allow the user to write a program with minimal effort. Of
particular note, following the book's first four software-only chapters that teach
the fundamentals of the LabVIEW programming language, data acquisition using
a DAQ device is covered in Chapters 5 and 6. For a professor or self-learner who
wishes to devote only three or four weeks to instruction in computer-based data
acquisition, Chapters 1 through 6 will provide the needed instructional materi-
als. For those planning a more comprehensive study of LabVIEW, the Express VIs
allow construction of a state-machine digital oscilloscope, digital thermometer,
and spectrum analyzer in Chapters 9, 11, and 12, respectively. In Chapter 13, the
control of a DAQ device via the more advanced programming DAQmx icons is cov-
ered. In contrast to the Express VIs, the DAQmx icons enable a u ser to utilize the
full available range of the DAQ-device features. In Chapter 14, data are acquired
remotely from a stand-alone instrument using the GPIB and/or USB interface bus
and, in Appendix C, interested readers can use a DAQ device to precisely control
the temperature of an aluminum block. Additionally, commonly used interfacing
circuits consisting of low-cost integrated circuits are presented. Circuits include an
anti-aliasing filter, thermocouple signal conditioner, and digital potentiometer that
communicates via the Serial Peripheral Interface (SPI).
Do It Yourself Projects: To allow readers to gauge their understanding of the
presented material, each chapter of Hands-On Introduction to Lab VIEW concludes
with a Do It Yourself project. Each of these projects poses an interesting prob-
lem and (loosely) directs readers in applying the chapter's material to find a solu-
tion. In some chapters, this project involves writing a program that functions as
a stopwatch (Chapter 2) or determines a person's reaction time (Chapter 10); in
other chapters the reader constructs a computer-based instrument including a digi-
tal thermometer (Chapter 11), a spectrum analyzer (Chapter 12), and a frequency
meter (Chapter 13).
Use It! Examples: Ready-to-use example programs, which carry out common
tasks encountered in laboratory work, are presented at the end of each chapter.
Some of these examples involve programming solutions, for example, showing
how to input parameters at the beginning of a data run, save and plot data during
runtime, and apply a criterion to a sequence of values to selectively build a data
array. Others examples are low-cost hardware solutions, including anti-aliasing
through the use of an eighth-order Butterworth low-pass filter, amplification and
cold-junction compensation for a thermocouple temperature measurement, control

XV
Preface

of integrated circuits using SPI communication, and construction of an Arduino-


based voltmeter and digital oscilloscope.
Back-of-the-Chapter Homework Problems: A selection of homework-style
problems is included at the end of each chapter so that interested readers can fur-
ther develop their LabVIEW-based skills. In some of these problems, readers test
their understanding by applying the chapter topics to new applications (e.g., Bode
magnitude plot); in others, readers use programs written within the chapter to
explore important experimental issues (e.g., frequency resolution of a fast Fou-
rier transform). Finally, a number of problems introduce readers to features of
LabVIEW relevant to, but not included in, the chapter's text (e.g., data storage in
binary format).
Improvements to the Fourth Edition: This new edition includes the following
improvements:

• New chapter interactively introduces all features of National Instruments DAQ


devices using the Measurement & Automation Explorer (MAX). [Chapter 5]
• New Use It! examples at the end of each chapter present ready-to-use programs
that carry out common tasks encountered in laboratory work.
• Commonly used, low-cost integrated circuits (for example, eighth-order But-
terworth low-pass filter, thermocouple signal conditioner) highlighted in end-
of-the-chapter problems and Use It! examples.
• LabVIEW control of an Arduino is demonstrated through construction of
Arduino-based voltmeter and digital oscilloscope. [Chapter 14]
• All chapters are fully updated to the latest version of LabVIEW DAQ hard-
ware now commonly used in instructional laboratories and self-learning is
highlighted.
• 14 new end-of-the-chapter problems appear throughout the book.

Hands- On Introduction to Lab VIEW is fully compatible with the Full Devel-
opment System, Professional Development System, and Student Edition of Lab-
VIEW. In addition, all chapters may be carried out by Base Development System
owners, with the exception of Chapters 11 and 12 (since the Base Development
System does not include curve fitting and fast Fourier transform functionality). An
instructor might consider having students purchase personal copies of the low-cost
Student Edition software (the Student Edition can now be purchased by itself at a
very affordable price; that is, it is no longer necessary to buy an expensive bundled
book/software package). With their own LabVIEW software, students can perform
non-hardware-related chapter sections and/or back-of-the-chapter problems as
homework on their own computers.
To aid readers in creating their LabVIEW programs, the following conventions
are used throughout the book: Bold text designates the features such as graphical
icons, palettes, pull-down menus, and menu selections that are to be manipulated

XVI
PREFACE

in the course of constructing a program. The descriptive names that label controls,
indicators, custom-made icons, programs, disk files, and directories (or folders)
are given the straight font. Italic text highlights character strings that the program-
mer must enter using the keyboard and also signals the first-time use of important
terms and concepts.
Any suggestions or corrections are gladly welcomed and can be sent to John
Essick, Reed College, 3203 SE Woodstock Boulevard, Portland, OR 97202, USA,
or [email protected].
Updates, answers to frequently asked questions, and ancillary materials for
Hands- On Introduction to Lab VIEW are available at http://academic.reed.edu/
physics/faculty/essick.
Additionally, solutions to the even-numbered back-of-the-chapter problems
can be downloaded at www.oup.com/us/essick. Instructors who adopt this book
for a course can obtain a password-protected link to the solution set for every prob-
lem from Oxford University Press.
For their advice and assistance in preparing this revision of Hands- On Intro-
duction to Lab VIEW, I thank Dan Kaveney, Megan Carlson, and Claudia Duke-
shire of Oxford University Press. For their helpful comments and suggestions, I
express my appreciation to the reviewers.

• Prathap Basappa, Norfolk State University


• Armando Carrasco, Austin Community College
• James Doyle, Macalester College
• Hector G utierrez, Florida Institute of Technology
• Aubri Hanson, Chipola College
• Robert Haring-Kaye, Ohio Wesleyan University
• Saliman Isa, South Carolina State University
• Robert Muratore, Hofstra University
• Robert Polak, Loyola University Chicago
• John Viator, Duquesne University
• Zifeng Yang, Wright State University

Finally, to my family: Thank you for your love and support while I worked on this
project.

John Essick
Portland, Oregon

XVII
About the Author

John Essick is a professor at Reed College with research interests in the optoelec-
tronic properties of semiconductors. Since 1993, he has taught computer-based
experimentation using LabVIEW as part of Reed's junior-level Advanced Labora-
tory and used LabVIEW to carry out many research projects.

XVIII
CHAPTER 1

LabVIEW Program Development

1.1 LABVIEW PROGRAMMING ENVIRONMENT


Welcome to the world of Lab VIEW, an innovative graphical programming system
designed to facilitate computer-controlled data acquisition and analysis. In this
world, you-the LabVIEW user-will be operating in a programming environ-
ment that is different from that offered by most other programming systems (for
example, the C and Python computer languages). Rather than creating programs
by writing lines of text-based statements, in LabVIEW, you will code programming
ideas by selecting and then properly patterning a collection of graphical icons.
A LabVIEW program consists of two windows, the front panel and the block
diagram. Once you have completed a program, the front panel appears as the
face of a laboratory instrument with your own design of knobs, switches, meters,
graphs, and/or strip charts. The front panel is the program's user interface; that is,
it facilitates the interaction of supplying inputs to and observing outputs from the
program as it runs.
The block diagram is the actual LabVIEW programming code. Here reside
the graphical images that you have appropriately selected from LabVIEW's
well-stocked libraries of icons. Each icon represents a block of underlying execut-
able code that performs a particular useful function. Your programming task is
to make the proper connections between these icons using a process called wiring
so that data flow amongst the graphical images to accomplish a desired purpose.
Because the icon libraries are designed specifically with the needs of scientists and
engineers in mind, LabVIEW enables you-the modern-day experimentalist-to
write programs that perform all of the laboratory tasks required for your state-
of-the-art research and industrial applications, including instrument control, data
acquisition, data analysis, data presentation, and data storage.
To begin developing your skill in LabVIEW graphical programming, in this
first chapter, I will guide you through the steps of creating a LabVIEW program.
Together, we will explore key features of the LabVIEW programming environment

1
Chapter 1 LabVIEW Program Development

as we write a program that detects the parity of a given integer, that is, whether it
is even or odd. The parity of an integer is defined by the following test: Using long
division, divide the integer by 2. If the remainder is 0 (that is, it "divides evenly"),
the integer is even; if the remainder is 1, the integer is odd (by convention, there-
mainder is assumed to be positive when dividing a negative integer by a positive
integer). According to this definition, for example, the integers 0, 4, and -4 are
even, while 3 and -3 are odd. To write a program that carries out this parity test,
we begin with a blank slate.

1.2 BLANK VI
Quite commonly, a LabVIEW program is written to create a computer-based
system that has the same functionality as a traditional stand-alone laboratory in-
strument. The input and output objects on such a program's front panel (called
controls and indicators, respectively) mimic the appearance of the physical instru-
ment, while code contained on the block diagram directs the computer in carry-
ing out the intended instrumental operations. Given that LabVIEW was chiefly
developed for this purpose-that is, as a tool for morphing a computing system
(consisting of a PC and data acquisition device) into the form and function of a
physical instrument-a LabVIEW program is called a virtual instrument (or VI, for
short), even those programs designed for tasks much smaller in scope than a full
computer-based instrument.
To begin writing our parity-detecting program (or, in LabVIEWspeak, our
parity-detecting VI), find the LabVIEW application on your computer (which may
have a desktop icon or may be in a folder named National Instruments, LabVIEW,
or LabVIEW Student Edition, depending on your particular computing system) and
launch it by double-clicking on its icon or name.
After a few moments, a Getting Started Window labeled LabVIEW (in older
LabVIEW versions, this window was labeled Getting Started) will appear. Place
your mouse cursor over the Blank VI selection (depending on your version of
LabVIEW, you may have to select Create Project first) and then click. Alternatively,
you can select New VI in the Getting Started Window's File pull-down menu. An un-
titled front panel will appear in the foreground of your screen with a slightly offset
block diagram in the background. In addition, a menu bar for an array of pull-down
menus that contain LabVIEW editing items will appear at the top of the window.

2
1.3 FRONT-PANEL EDI TING

• U f tled : 31ock Diag ram * l c:J I @) I ~ J


~

I ~
F.
1- • U f tled : =ron: Pane l ~. lc:JI@l '
- -
File Edit View Project Operate Tools Window Help m1~1

I ~ ~~ ~~~[ill l t5pt App lication Font "" I ~o"" II ~. . ~~ ~. . ~~ ~ "" ~~[!] 1


A

~ ~ .::

There are three ways to toggle the block diagram between the background and
foreground:

• Select Show Block Diagram (when it is in the background) or Show Front


Panel (when the block diagram is in the foreground) from the Window
pull-down menu.
• Click your mouse cursor on a visible region of the window (block diagram or
front panel) that is currently in the background.
• Use the keyboard shortcut by typing <Ctrl+E>.

Practice toggling the block diagram between the foreground and background
using each of the three available methods.

1.3 FRONT-PANEL EDITING


To begin adding programming elements to your VI, situate the blank front panel
in the foreground. The objects to be placed on this front panel as you write your
LabVIEW program are found in a repository called the Controls Palette. If a
Controls Palette is not already visible, activate one by selecting Controls Palette
from the View menu.

3
Chapter 1 LabVIEW Program Development

• Urft led : .vi Fro nt Panel >t

Fil e Project Operate Tools 1Nind ow Help

Tools Palette
Qui c Drop Ctrl +Space

Breakpo int fv1anager


Probe \".'atch 1Nindow
Event Inspector Vvindow
Error Li st Ctrl +L
Loa a ana a e \t\'a1nmg L1st

\II Hi erarchy
LabVIPN Class Hierarchy
Browse Relationships
Bookmark Manager
I IlL. l m ~I OJt: l t1l +Sh1ft+E

Class Browser Ctrl +Shift+ B


.NET Assembli es in fv1emory
ActiveX Contro l Pro pelt'J Browser
Getting Started ',"lindow ...
Navig ati on V'-li ndow Ctrl +Shift+ N
I OOJIJal.;}

A "floating" Controls Palette will appear on your screen, which can be placed
in a convenient spot by "clicking and dragging" on its title bar.
The Controls Palette is an organized collection of categories (such as Modern ,
Silver, and Express), where each category contains a palette of related program-
ming objects. The Controls Palette may be configured in a multitude of ways, and
the particular configuration that you see will depend on choices made by past users
(if any) of your LabVIEW system.
For our work, configure the appearance of the Controls Palette as follows:

• Click on the Customize button I ~ Cust onlize"' 1near the top of the Controls Palette
(for older LabVIEW versions, it is called the View button). In the menu that
appears, select the Change Visible Palettes ... option. In the dialog window
that follows , click on Select All and then press the OK button.

4
1.3 FRONT-PANEL EDITING

• Click on the Customize button again. This time, in the menu, click on
Options.... In the dialog window that appears, select Controls/Functions
Palettes, and then, under Formatting, choose Category (Icons and Text) for
the Palette option. Finally, press the OK button.

The Controls Palette is now configured. A particular category's palette can be


toggled between visible ("open") and hidden ("closed") by clicking on its name.
Open the Modern palette and close all others so that your Controls Palette appears
as follows (where I've resized the Controls Palette's window so that it better fits on
the page). The categories listed on your Controls Palette may differ slightly from
this illustration if your system has some optional LabVIEW add-ons.

Cont ro ls

~Search 'Customize~ OJ
-----------------
~• Modern A

u;] qmj
[~] li!l
Num eric Boolea n String & Path Array, Matrix &
Cluster
- - -I
[ ~rt l
Ring "'I
ffi Enum I
List, Tabl e & Graph Ring & Enum Contain ers
Tree -
....-

I/0 Variant & Class Decorations Refnum

~ Silver
~ System
~ Classic
~ Express -
~ Addons
Select a Control ... T"

Briefly familiarize yourself with the contents of the Modern palette. Then place
the cursor over the Numeric button and click.

5
Chapter 1 LabVIEW Program Development

Controls

~Sea rch "Customize~ C}l


======================================~

II .., Mo dern
-
~
~"'
qffi]
u.23 ~ (~] li!l
Numeric Boolea n St ri ng & Path Array, Matrix &
Cluster

l ~rc l
IRing • J
ffi Enum I
List,Tabl e & Graph Ring & Enum Containers
Tree --

110 Vari ant & Class Decorations Refnum

II ~ Silver
ll ~ ~~rn

The Numeric subpalette will then appear as shown below.

~n~ls ~

~ Search " Customize~ :jl


II ,.. Modern
LN umenc
.

1 o-
1~:oo 1~ :oo 5-
11/07 11/07
0-

Numeric Numeric Tim e Stamp Time Stamp Vertical Fill Slide Vertical Pointer Vertical Progress
Control Indicator Control Indicator Slide Bar
s s
I I I I I I
0 5 10 0 5 10

Vertical Horizontal Fill Horizontal Horizontal Horizontal Knob Dial


Graduated Bar Slide Pointer Slide Progress Bar Graduated Bar
111l•
a• ~.
0
. \ lill•
II•

Meter Gauge Tank Therm ometer Horizontal Vertica l Framed Color


Scroll bar Scroll bar Box
Silver
.Svdem

You will find that some of the objects here are controls (such as the Numeric
Control and Horizontal Pointer Slide), which offer a user the opportunity to input
numeric data to the VI. Other objects are indicators (such as the Numeric Indicator
and Meter), which output results from the VI for viewing by the user. To close this
subpalette and return to the Modern palette, simply click on Numeric.

6
Random documents with unrelated
content Scribd suggests to you:
Cet astre de la nuit noire,
Roi, ce n’est pas le bonheur,
Ni l’amour, ni la victoire,
Ni la force; c’est l’honneur.

Et moi qui sur mon armure


Ramasse mes blancs cheveux,
Moi sur qui le soir murmure,
Moi qui vais mourir, je veux

Que, le jour où sous son voile


Chimène prendra le deuil,
On allume à cette étoile
Le cierge de mon cercueil.

Ainsi le Cid, qui harangue


Sans peur ni rébellion,
Lèche son maître, et sa langue
Est rude, étant d’un lion.
LE ROI DE PERSE

Le roi de Perse habite, inquiet, redouté,


En hiver Ispahan et Tiflis en été;
Son jardin, paradis où la rose fourmille,
Est plein d’hommes armés, de peur de sa famille;
Ce qui fait que parfois il va dehors songer.
Un matin, dans la plaine il rencontre un berger
Vieux, ayant près de lui son fils, un beau jeune homme.
—Comment te nommes-tu? dit le roi.—Je me nomme
Karam, dit le vieillard, interrompant un chant
Qu’il chantait au milieu des chèvres, en marchant;
J’habite un toit de jonc sous la roche penchante,
Et j’ai mon fils que j’aime, et c’est pourquoi je chante,
Comme autrefois Hafiz, comme à présent Sadi,
Et comme la cigale à l’heure de midi.—
Et le jeune homme alors, figure humble et touchante,
Baise la main du pâtre harmonieux qui chante,
Comme à présent Sadi, comme autrefois Hafiz.
—Il t’aime, dit le roi, pourtant il est ton fils.
LES DEUX MENDIANTS

LA TAXE AU SAINT-EMPIRE.—LA DIME AU SAINT-SIÉGE

L’un s’appelle César, l’autre se nomme Pierre.


Celui-là fait le guet, celui-ci la prière;
Tous deux sont embusqués au détour du chemin,
Ont au poing l’escopette et la sébile en main,
Vident les sacs d’argent, partagent les maraudes,
Et l’on règne, et l’on fait payer les émeraudes
Des tiares à ceux qui n’ont pas de souliers.
Les dogmes et les lois sont de profonds halliers
Où des tas de vieux droits divins mêlent leurs branches;
Qui mendie en cette ombre a ses allures franches;
Nul n’échappe. Arrêtez! il faut payer, de gré
Ou de force, en passant dans le noir bois sacré.
Les peuples, que l’infâme ignorance ravage,
Ont au front la sueur de l’antique esclavage.
Christ, c’est pour eux qu’au pied de ta croix tu prias!
Ils sont les travailleurs; ils sont les parias;
Ils sont les patients qu’on traîne sur des claies.
Certes, rien ne leur manque; ils ont beaucoup de plaies,
Beaucoup d’infirmités qu’ils ne peuvent guérir,
Beaucoup de maux, beaucoup de petits à nourrir;
C’est à ces riches-là que demandent l’aumône
Ce meurt-de-faim, l’autel, et ce pauvre, le trône.
M O N T FA U C O N

I
POUR LES OISEAUX

A l’heure où le soleil descend tiède et pâli,


Seul à seul, près du bois de Saint-Jean-d’Angely,
L’archevêque Bertrand parlait au roi Philippe:

—Roi, le trône et l’autel sont le même principe;


Défendons-nous ensemble; il faut de tous côtés
Du front du peuple obscur chasser les nouveautés.
Sauver l’église, ô roi, c’est vous sauver vous-même.
L’état devient plus fort par la terreur qu’il sème,
Et par le tremblement du peuple s’affermit;
Toujours, quand elle eut peur, la foule se soumit.
Il n’est qu’un droit: régner. Le nécessaire est juste.
Les quatre grands baillis du roi Philippe-Auguste,
Toutes les vieilles lois, c’est trop peu désormais;
Pour arrêter le mal, sur de hautains sommets,
Il faut la permanence étrange de l’exemple.
Sire, les schismes vont à l’attaque du temple;
Le peuple semble las d’être sur les genoux;
La révolte est sur vous, l’hérésie est sur nous;
D’où viennent ces essaims tumultueux d’idées?
Des profondeurs que nul prophète n’a sondées,
Peut-être de la nuit, ou peut-être du ciel.
Parlons bas. Écoutez, roi providentiel.
Rien n’est plus effrayant que ces sombres descentes,
D’instincts nouveaux parmi les foules frémissantes;
Ces chimères d’en haut s’abattant tout à coup
Volent, courent, s’en vont, reviennent, sont partout,
Ouvrent les yeux fermés, fouillent les têtes pleines,
Se mêlent aux esprits, se mêlent aux haleines,
Blessent les dogmes saints dans l’ombre, et, fatal jeu,
Frappent l’homme endormi de mille becs de feu;
Elles tentent, troublant le mystère où nous sommes,
Un travail inconnu sur le cerveau des hommes,
Leur ôtant quelque chose et leur donnant aussi;
Quoi? c’est là votre perte et c’est là mon souci.
Que font-elles? du jour, du mal? Qu’apportent-elles?
Un souffle, un bruit, le vent qui tombe de leurs ailes,
Je l’ignore; ici Dieu m’échappe; mais je sai
Qu’il ne nous reste rien quand elles ont passé.

Le roi Philippe écoute; et l’archevêque songe,


Et vers la papauté son bras pensif s’allonge.

—Chassez les nouveautés, roi Philippe.

En marchant,
Tous deux rêveurs, ils sont arrivés près d’un champ
Qu’emplit de son frisson toute une moisson mûre;
Au-dessus des épis jetant un long murmure,
Sous de hauts échalas plantés parmi les blés,
Flottent, mouillés de pluie et de soleil brûlés,
A des cordes que l’air pousse, éloigne et ramène,
De hideux sacs de paille ayant la forme humaine;
Nœuds de débris sans nom, lambeaux fous, balançant
On ne sait quel aspect farouche et menaçant;
Les oiseaux, les moineaux que le blé d’or invite,
L’alouette criant aux autres: vite! vite!
Accourent vers le champ plein d’épis; mais, au vent,
Chaque haillon devient lugubrement vivant,
Et tout l’essaim chantant s’effraie et se dissipe.

Quel est donc le moyen de régner? dit Philippe


—Quel est donc le moyen de régner? dit Philippe.

Comme le roi parlait, l’archevêque pieux


Vit ce champ, hérissé de poteaux et de pieux,
Où pendaient, à des fils tremblant quand l’air s’agite,
Des larves qui mettaient tous les oiseaux en fuite.

Et, le montrant au roi, Bertrand dit:—Le voici.


II
POUR LES IDÉES

Et c’est pourquoi, dans l’air par la brume obscurci,


Depuis ces temps de deuil, d’angoisse et de souffrance,
Au-dessus de la foule, au-dessus de la France,
Comme sur Babylone on distingue Babel,
On voit, dans le Paris de Philippe le Bel,
On ne sait quel difforme et funèbre édifice;
Tas de poutres hideux où le jour rampe et glisse,
Lourd enchevêtrement de poteaux, de crampons,
Et d’arcs-boutants pareils aux piles des vieux ponts.
Terrible, il apparaît sur la colline infâme.
Les autres monuments, où Paris met son âme,
Colléges, hôpitaux, tours, palais radieux,
Sont les docteurs, les saints, les héros et les dieux;
Lui, misérable, il est le monstre. Fauve, il traîne,
Sur sa pente d’où sort une horreur souterraine,
Son funeste escalier qui dans la mort finit;
Tout ce que le ciment, la brique, le granit,
Le fer, peuvent avoir de la bête féroce,
Il l’a; ses piliers bruts, runes d’un dogme atroce,
Semblent des Irmensuls livides, et ses blocs
Dans l’obscurité vague ébauchent des Molochs;
Baal pour le construire a donné ses solives
Où flottaient des anneaux que secouaient les dives,
Saturne ses crochets, Teutatès ses menhirs;
Tous les cultes sanglants ont là leurs souvenirs;
Si le lierre ou le houx dans ses dalles végète,
Si quelque ronce y croît, la feuille horrible jette
Une ombre onglée et noire, affreux stigmate obscur,
Qui ressemble aux cinq doigts du bourreau sur le mur.
Vil bâtiment, des temps fatals fatal complice!
Il est la colonnade immonde du supplice,
L’échafaud que le Louvre a pour couronnement,
q p ,
La caresse au tombeau, l’insulte au firmament;
Et cette abominable et fétide bâtisse
Devant le ciel sacré se nomme la Justice,
Et ce n’est pas la moindre horreur du monument
De s’appeler l’autel en étant l’excrément.
Morne, il confine moins aux Paris qu’aux Sodomes.
Spectre de pierre ayant au front des spectres d’hommes,
Inexorable plus que l’airain et l’acier,
Il est, il vit, farouche, et sans se soucier
Que le monde à ses pieds souffre, existe ou périsse,
Et contre on ne sait quoi dans l’ombre il se hérisse;
A de certains moments ce charnier qui se tait
Frissonne, et comme si, triste, il se lamentait,
Mêle une clameur sourde aux vents, et continue
En râle obscur le bruit des souffles dans la nue;
Là grince le rouet sinistre du cordier.
Du cadavre au squelette on peut étudier
Le progrès que les morts font dans la pourriture;
Chaque poteau chargé d’un corps sans sépulture
Marque une date abjecte, et chaque madrier
Semble le signe affreux d’un noir calendrier.

La nuit il semble croître, et dans le crépuscule


Il a l’air d’avancer sur Paris qui recule.

Rien de plus ténébreux n’a jamais été mis


Sur ce tas imbécile et triste de fourmis
Que la hautaine histoire appelle populace.
O pâle humanité, quand donc seras-tu lasse?

Lugubre vision! au-dessus d’un mur blanc


Quelque chose d’informe et qui paraît tremblant
Se dresse; chaos morne et ténébreux; broussaille
De silence, d’horreur et de nuit qui tressaille;
On ne voit le nuage, et l’ombre aux vagues yeux,
Et le blêmissement formidable des cieux,
Et la brume qui flotte et l’astre qui flamboie
Et la brume qui flotte, et l astre qui flamboie,
Qu’à travers une vaste et large claire-voie
De poutres, dont chacune est un sanglant barreau;
On dirait que Satan, l’infâme ange-bourreau,
Dont la rage et la joie et la haine, acharnées,
Exécutent Adam depuis six mille années,
Sur ces fauves piliers a posé de sa main
La grande claie où fut traîné le genre humain.
C’est, dans l’obscurité lugubrement émue,
De la terreur, bâtie en pierre, et qui remue;
C’est délabré, croulant, lépreux, désespéré;
Les poteaux ont pour toit le vide; le degré
Aboutit à l’échelle et l’échelle aux ténèbres;
Le crépuscule passe à travers des vertèbres
Et montre dans la nuit des pieds aux doigts ouverts;
Entre les vieux piliers, de moisissure verts,
Blêmes quand les rayons de lune s’y répandent,
Là-haut des larves vont et viennent, des morts pendent.
Et la fouine a rongé leur crâne et leur fémur,
Et leur ventre effrayant se fend comme un fruit mûr,
Si la mort connaissait les trépassés, si l’homme
Valait que le tombeau sût comment il se nomme,
Si l’on comptait les grains du hideux chapelet,
On dirait:—Celui-ci, c’est Tryphon, qui voulait
Fêter le jour de Pâque autrement qu’Irénée;
Ceux-là sont des routiers, engeance forcenée,
Gueux qui contre le sceptre ont croisé le bâton;
Cet autre, c’est Glanus, traducteur de Platon;
Celui-ci, que des lois frappa la prévoyance,
Osa propager l’art du sorcier de Mayence,
Et jeter à la foule un Virgile imprimé;
C’est Pierre Albin; l’oubli sur lui s’est refermé;
Cet autre est un voleur, cet autre est un poëte.
Derrière leur tragique et noire silhouette,
L’azur luit, le soir vient, l’aube blanchit le ciel;
Le vent, s’il entre là, sort pestilentiel;
Chacun d’eux sous le croc du sépulcre tournoie;
Et tous, que juin les brûle ou que janvier les noie,
S’entre-heurtent, fameux, chétifs, obscurs, marquants,
Et sont la même nuit dans les mêmes carcans;
Le craquement farouche et massif des traverses
Accompagne leurs chocs sous les âpres averses,
Et, comble de terreur, on croirait par instant
Que le cadavre, au gré des brises s’agitant,
Avec son front sans yeux et ses dents sans gencives,
Rit dans la torsion des chaînes convulsives.
L’exécrable charnier, sous ses barres de fer,
Regardant du côté de Rome et de l’enfer,
Dans l’étrange épaisseur des brumes infinies
Semble chercher au loin ses sœurs les gémonies,
Et demander au gouffre où nul astre n’a lui
Si Josaphat sera plus sinistre que lui.
Et toujours, au-dessus des clochers et des dômes,
Le vent lugubre joue avec tous ces fantômes,
Hier, demain, le jour, la nuit, l’été, l’hiver;
Et ces morts sans repos, où fourmille le ver
Plus que l’abeille d’or dans le creux des yeuses,
Cette agitation d’ombres mystérieuses,
L’affreux balancement de ces spectres hagards,
Ces crânes sans cheveux, ces sourcils sans regards,
Ce grelottement sourd de ferrailles funèbres,
Chassent dans la nuée, à travers les ténèbres,
Les purs esprits de l’aube et de l’azur, venus
Pour s’abattre au milieu des vivants inconnus,
Pour faire leur moisson sublime dans la foule,
Dire aux peuples le mot du siècle qui s’écoule,
Et leur jeter une âme et leur apporter Dieu;
Et l’on voit, reprenant leur vol vers le ciel bleu,
La sainte vérité, la pensée immortelle,
L’amour, la liberté, le droit, heurtant de l’aile
Le Louvre et son beffroi, l’église et son portail,
Fuir, blancs oiseaux, devant le sombre épouvantail.
LES REITRES

CHANSON BARBARE

Sonnez, clairons,
Sonnez, cymbales!
On entendra siffler les balles;
L’ennemi vient, nous le battrons;
Les déroutes sont des cavales
Qui s’envolent quand nous soufflons;
Nous jouerons aux dés sur les dalles;
Sonnez, rixdales,
Sonnez, doublons!

Sonnez, cymbales,
Sonnez, clairons!
On entendra siffler les balles;
Nous sommes les durs forgerons
Des victoires impériales;
Personne n’a vu nos talons;
Nous jouerons aux dés sur les dalles;
Sonnez, doublons,
Sonnez, rixdales!

Sonnez, clairons,
Sonnez, cymbales!
On entendra siffler les balles;
Sitôt qu’en guerre nous entrons
Les rois ennemis font leurs malles,
Et commandent leurs postillons;
N j dé l d ll
Nous jouerons aux dés sur les dalles;
Sonnez, rixdales,
Sonnez, doublons!

Sonnez, cymbales,
Sonnez, clairons!
On entendra siffler les balles;
Sur les villes nous tomberons;
Toutes femmes nous sont égales,
Que leurs cheveux soient bruns ou blonds;
Nous jouerons aux dés sur les dalles;
Sonnez, doublons,
Sonnez, rixdales!

Sonnez, clairons,
Sonnez, cymbales!
On entendra siffler les balles;
Du vin! Du faro! Nous boirons!
Dieu, pour nos bandes triomphales
Fit les vignes et les houblons;
Nous jouerons aux dés sur les dalles;
Sonnez, rixdales,
Sonnez, doublons!

Sonnez, cymbales,
Sonnez, clairons!
On entendra siffler les balles;
Quelquefois, ivres, nous irons
A travers foudres et rafales,
En zigzag, point à reculons.
Nous jouerons aux dés sur les dalles;
Sonnez, doublons,
Sonnez, rixdales!

Sonnez, clairons,
Sonnez, cymbales!
On entendra siffler les balles;
On entendra siffler les balles;
Nous pillons, mais nous conquérons;
La guerre a parfois les mains sales,
Mais la victoire a les bras longs;
Nous jouerons aux dés sur les dalles;
Sonnez, rixdales,
Sonnez, doublons!

Sonnez, rixdales,
Sonnez, doublons!
Nous jouerons aux dés sur les dalles;
Rois, nous sommes les aquilons;
Vos couronnes sont nos vassales;
Et nous rirons quand nous mourrons.
On entendra siffler les balles;
Sonnez, clairons,
Sonnez, cymbales!
LE COMTE FÉLIBIEN.

Dessiné par F. Flameng. - Gravé par H.


Lefort.
LE COMTE FÉLIBIEN

Attendu qu’il faut mettre à la raison la ville,


Qu’il faut tout écraser dans la guerre civile
Et vaincre les forfaits à force d’attentats,
Cosme vient d’égorger, pêle-mêle, des tas
De misérables, vieux, jeunes, toute une foule,
Dans Sienne où la fierté des grands siècles s’écroule.
Tous les murs sont criblés de biscayens de fer.
Le massacre est fini; mais un reste d’enfer
Est sur la ville, en proie aux cohortes lombardes.
La fumée encor flotte aux gueules des bombardes;
Et l’horreur du combat, des chocs et des assauts
Est visible partout, dans les rouges ruisseaux
Et dans l’effarement des morts, faces farouches;
On dirait que les cris sont encor dans les bouches,
On dirait que la foudre est encor dans les yeux,
Tant les cadavres sont vivants et furieux.
Cependant les marchands ont rouvert leurs boutiques.
Des gens quelconques vont et viennent; domestiques,
Patrons, clercs, artisans, chacun a son souci;
Chacun a ce regard qui dit:—C’est bien ainsi.
Finissons-en. Silence! un nouveau maître arrive.—
L’indifférence aux morts qu’on a, pourvu qu’on vive,
L’acceptation froide et calme des affronts,
Cette lâcheté-là se lit sur tous les fronts.
—Pourquoi ces vanupieds sortaient-ils de leurs sphères?
Ils sont morts. C’est bien fait. Nous avons nos affaires.
Les rois qui sont un peu tyrans sont presque dieux.
Nous serons muselés et rudoyés; tant mieux.
Enterrons. Oublions. Et parlons d’autre chose.—
p
Ainsi le vieux troupeau bourgeois raisonne et glose.
Et tous sont apaisés, et beaucoup sont contents.

Seul, un homme,—on dirait qu’il a près de cent ans


Et qu’il n’en a pas vingt, et qu’un astre est son âme,
A voir son front de neige, à voir ses yeux de flamme,—
Cet homme, moins semblable aux vivants qu’aux aïeux,
Rôde, et, quand il s’arrête, il n’a plus dans les yeux
Qu’un vague reste obscur de lueurs disparues,
Tant il songe et médite! et les passants des rues,
Voyant ce noir rêveur qui vient on ne sait d’où,
Disent: C’est un génie; et d’autres: C’est un fou.
L’un crie:—Alighieri! c’est lui! c’est l’homme-fée
Qui revient des enfers comme en revint Orphée:
Orphée a vu Pluton, et Dante a vu Satan.
Il arrive de chez les morts; Dante, va-t’en.—
L’autre dit:—Ce n’est pas Dante, c’est Jérémie.—
La plainte a presque peur d’avoir été gémie
Et se cache devant le vainqueur irrité,
Mais cet homme est un tel spectre dans la cité
Qu’il semble effrayant même à la horde ennemie.
Et pourtant ce n’est point Dante ni Jérémie,
C’est simplement le vieux comte Félibien
Qui ne croit que le vrai, qui ne veut que le bien,
Et par qui fut fondé le collége de Sienne;
Il porte haut la tête étant une âme ancienne,
Et fait trembler; cet homme affronte les vainqueurs;
Mais, dans l’écroulement des esprits et des cœurs,
On le hait; le meilleur semble aux lâches le pire,
Et celui qui n’a pas d’épouvante en inspire.

Qu’importe à ce passant? Dans ce vil guet-apens,


Les uns étant gisants et les autres rampants,
Les uns étant la tombe et les autres la foule,
Il est le seul debout; il songe; le sang coule,
Le sang fume, le sang est partout; sombre, il va.
Tout à coup au détour de la Via Corva,
Il aperçoit dans l’ombre une femme inconnue;
Une morte étendue à terre toute nue,
Corps terrible aux regards de tous prostitué
Et dont le ventre ouvert montre un enfant tué.

Alors il crie:—O ciel! un enfant! guerre affreuse!


Où donc s’arrêtera le gouffre qui se creuse?
Massacrer l’inconnu, l’enfant encor lointain!
Supprimer la promesse obscure du destin!
Mais on poussera donc l’horreur jusqu’au prodige!
Mais vous êtes hideux et stupides, vous dis-je!
Mais c’est abominable, ô ciel! ciel éclatant!
Et les bêtes des bois n’en feraient pas autant!
Qu’on ait tort et raison des deux côtés, qu’on fasse
Au fond le mal, croyant bien faire à la surface,
Vous êtes des niais broyant des ignorants,
Cette justice-là, c’est bien, je vous la rends;
Je vous hais et vous plains. Mais quoi! quand l’empyrée
Attend du nouveau-né l’éclosion sacrée,
Quoi! ces soldats, ces rois, sans savoir ce qu’ils font,
Touchent avec leur main sanglante au ciel profond!
Ils interrompent l’ombre ébauchant son ouvrage!
Ils veulent en finir d’un coup, et, dans leur rage,
D’avoir bien fait justice et d’avoir bien vaincu,
Ils vont jusqu’à tuer ce qui n’a pas vécu!
Mais, bandits, laissez donc au moins venir l’aurore!
Brutes, vous châtiez ce qui n’est pas encore!
La femme que voilà morte sur le pavé,
Qui cachait dans son sein l’enfant inachevé,
L’avenir, l’écheveau des jours impénétrables,
Était de droit divin parmi vous, misérables,
Car la maternité, c’est la grande action;
Sachez qu’on doit avoir la même émotion
Devant Ève portant les races inconnues
Que devant l’astre immense entrevu dans les nues;
Sachez-le, meurtriers! les respects sont pareils
, p p
Pour la femme et le ciel, l’abîme des soleils
Étant continué par le ventre des mères.
Rois, le vrai c’est l’enfant; vous êtes des chimères.
Ah! maudits! Mais voyons, réfléchissez un peu.
Crime inouï! l’enfant arrive en un milieu
Ignoré, parmi nous; il sort des sphères vierges;
Il quitte les soleils remplacés par vos cierges;
Sa mère, qui le sent remuer, s’attendrit;
Il n’est pas encor l’homme, il est déjà l’esprit,
Il cherche à deviner sa nouvelle patrie;
Et, dans le bercement de cette rêverie
Où tout l’azur divin est vaguement mêlé,
Voilà que, brusque, affreux, de mitraille étoilé,
L’assassinat, au fond de ce flanc qu’on vénère,
Entre avec le fracas infâme du tonnerre,
Et se rue et s’abat, monstrueux ennemi,
Sur le pauvre doux être, ange encor endormi!
Qu’est-ce que ce réveil sans nom, et cette tombe
Ouverte par l’orfraie horrible à la colombe!
Ah! prêtres, qu’a domptés César, vous qu’à leurs plis
Toutes les actions des grands ont assouplis,
Vous qui leur amenez chez eux cette servante,
La prière, et mettez le Te Deum en vente,
Vous qui montrez devant les rois le Tout-Puissant
Agenouillé, lavant les pavés teints de sang,
Vous qui pourtant parfois, fronts chauves, barbes grises,
Avez des tremblements dans vos mornes églises
Et sentez que la tombe est peut-être un cachot,
Prêtres, que pensez-vous qui se passe là-haut,
Dans l’abîme du vrai sans fond, dans le mystère,
Dans le sombre équilibre ignoré, quand la terre
Sinistre, renvoyant l’innocence au ciel bleu,
Jette une petite âme épouvantée à Dieu!
VII

ENTRE LIONS ET ROIS


Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade

Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.

Let us accompany you on the journey of exploring knowledge and


personal growth!

ebookluna.com

You might also like