Matlab Stateflow Documentation PDF Download
Matlab Stateflow Documentation PDF Download
https://ebookbell.com/product/matlab-stateflow-
documentation-6741912
https://ebookbell.com/product/matlab-and-simulink-indepth-modelbased-
design-with-simulink-and-stateflow-user-interface-scripting-
simulation-priyanka-patankar-45320544
https://ebookbell.com/product/basic-matlab-simulink-and-stateflow-
colgren-richard-4322470
https://ebookbell.com/product/matlab-a-practical-introduction-to-
programming-and-problem-solving-6th-edition-stormy-attaway-46075418
https://ebookbell.com/product/matlab-for-engineering-
applications-5e-ise-5thise-william-j-palm-iii-46562738
Matlab And Simulink Crash Course For Engineers 1st Ed 2022 Eklas
Hossain
https://ebookbell.com/product/matlab-and-simulink-crash-course-for-
engineers-1st-ed-2022-eklas-hossain-46608958
https://ebookbell.com/product/matlab-medical-imaging-toolbox-users-
guide-the-mathworks-46611260
https://ebookbell.com/product/matlab-for-engineering-applications-5th-
edition-william-palm-46651690
https://ebookbell.com/product/matlab-for-engineering-berardino-
dacunto-48710470
https://ebookbell.com/product/matlab-for-medical-physics-reallife-
clinical-scenarios-and-projects-jidi-sun-49034592
Stateflow®
Getting Started Guide
R2016a
How to Contact MathWorks
Phone: 508-647-7000
How the Stateflow Chart Works with the Simulink Model . . 2-6
v
Defining the Interface to the Simulink Model
3
Implementing the Interface with Simulink . . . . . . . . . . . . . . 3-2
Build It Yourself or Use the Supplied Model . . . . . . . . . . . . . 3-2
Design Considerations for Defining the Interface . . . . . . . . . 3-2
Adding a Stateflow Block to a Simulink Model . . . . . . . . . . . 3-3
Defining the Inputs and Outputs . . . . . . . . . . . . . . . . . . . . . 3-7
Connecting the Stateflow Block to the Simulink Subsystem . 3-13
vi Contents
Defining Transitions Between States
6
Adding the Transitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-2
Build It Yourself or Use the Supplied Model . . . . . . . . . . . . . 6-2
Design Considerations for Defining Transitions Between
States . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-2
Drawing the Transitions Between States . . . . . . . . . . . . . . . 6-4
Adding Default Transitions . . . . . . . . . . . . . . . . . . . . . . . . . . 6-7
Adding Conditions to Guard Transitions . . . . . . . . . . . . . . . 6-10
Adding Events to Guard Transitions . . . . . . . . . . . . . . . . . . 6-12
vii
Debugging the Chart
9
Debugging Common Modeling Errors . . . . . . . . . . . . . . . . . . . 9-2
Debugging State Inconsistencies . . . . . . . . . . . . . . . . . . . . . . 9-2
Debugging Data Range Violations . . . . . . . . . . . . . . . . . . . . . 9-4
viii Contents
1
This chapter describes Stateflow event-based modeling software and its components.
With Stateflow you can design logic for supervisory control, task scheduling, and fault
management applications. Stateflow includes state machines animation and static and
run-time checks for testing design consistency and completeness before implementation.
Key Features
• Modeling environment, graphical components, and simulation engine for modeling
and simulating complex logic
• Deterministic execution semantics with hierarchy, parallelism, temporal operators,
and events
• State diagrams, state transition tables, and state transition matrices representing
finite state machines
• Flow charts, MATLAB® functions, and truth tables for representing algorithms
• State diagram animation, state activity logging, data logging, and integrated
debugging for analyzing the design and detecting runtime errors
• Static and run-time checks for cyclic problems, state inconsistencies, data-range
violations, and overflow conditions
• Mealy and Moore finite-state machines
1-2
Anatomy of a Stateflow Chart
1-3
1 Introduction to the Stateflow Product
This chart is part of an example model called sf_car that ships with the Stateflow
product. To explore the model further, open it by typing sf_car at the command prompt
in the MATLAB Command Window.
1-4
How Stateflow Software Works with Simulink Software
Stateflow charts run as blocks in a Simulink model. The Stateflow block interfaces with
other blocks in the model using input and output signals. Through these connections,
Stateflow and Simulink software share data and respond to events that broadcast
between model and chart. For example, the Stateflow shift_logic block is integrated
with the Simulink sf_car model as shown.
You can develop your Stateflow chart before or after the Simulink model in which it will
run. Stateflow software comes with its own editor, which helps you simulate and test the
chart logic before you integrate it with a Simulink model. You can test a Stateflow chart
independently of its parent model by attaching a Source block as an input and a Sink
block as an output. During simulation, you can animate the chart to get visual feedback
about its run-time behavior.
1-5
1 Introduction to the Stateflow Product
Before you start building a chart, you identify system attributes by answering these
questions:
If your system has no operating modes, the system is stateless. If your system has
operating modes, the system is modal.
After identifying your system attributes, you can follow a basic workflow for building
Stateflow charts to model event-driven systems:
1-6
Installing Stateflow Software
In this section...
“Installation Instructions” on page 1-7
“Prerequisite Software” on page 1-7
“Product Dependencies” on page 1-8
“Set Up Your Own Target Compiler” on page 1-8
“Using Stateflow Software on a Laptop Computer” on page 1-8
Installation Instructions
Stateflow software runs on Windows® and UNIX® operating systems. Your MATLAB
installation documentation provides all the information you need to install Stateflow
software. Before installing the product, you must obtain and activate a license (see
instructions in your MATLAB installation documentation) and install prerequisite
software (see “Prerequisite Software” on page 1-7 for a complete list).
Prerequisite Software
Before installing Stateflow software, you need the following products:
• MATLAB
• Simulink
• C or C++ compiler supported by the MATLAB technical computing environment
The compiler is required for compiling code generated by Stateflow software for
simulation.
The 64–bit Windows version of the Stateflow product comes with a default C compiler,
LCC-win64. LCC-win64 is used for simulation and acceleration. LCC-win64 is only
used when another compiler has not been configured in MATLAB.
Note: The LCC-win64 compiler is not available as a general compiler for use with the
command line MEX in MATLAB. It is a C compiler only, and cannot be used for SIL/
PIL modes.
1-7
1 Introduction to the Stateflow Product
For platforms other than Microsoft® Windows or to install a different compiler, see
“Set Up Your Own Target Compiler” on page 1-8.
Product Dependencies
Note: If you are using Microsoft Visual C++® 2010 Professional (or earlier) or Windows
SDK 7.1, the generated C code cannot contain any C structure greater than 2 GB. In a
single chart, do not use data with an aggregate size greater than 2 GB or 400 MB with
debugging enabled.
1 Click the right mouse button on the Windows desktop to display the desktop menu.
2 Select Properties from the desktop menu to display the Windows Display
Properties dialog box.
3 Select the Settings panel on the Display Properties dialog box.
4 Choose a setting that is more than 256 colors and click OK.
1-8
Related Products
Related Products
Several MathWorks® products extend the capabilities of Stateflow software. For
information about these related products, see www.mathworks.com/products/
stateflow/related.htm.
1-9
2
To get hands-on experience using Stateflow software, you will build a Stateflow chart
in incremental steps that follow the basic workflow described in “Use C Chart to Model
Event-Driven System” on page 1-6. To give you a context for your development efforts,
this chapter describes the purpose and function of the chart you will build and explains
how it interfaces with a Simulink model. You will also learn how to run a completed
version of the model from the MATLAB command line.
As you can see from the title bar, the chart is called Air Controller and is part of a
Simulink model called sf_aircontrol. When you build this chart, you will learn how to
work with the following elements of state-transition charts:
2-2
The Stateflow Chart
Exclusive (OR) states. States that represent mutually exclusive modes of operation.
No two exclusive (OR) states can ever be active or execute at the same time. Exclusive
(OR) states are represented graphically by a solid rectangle:
• PowerOn
• PowerOff
• FAN1.On
• FAN1.Off
• FAN2.On
• FAN2.Off
Parallel (AND) states. States that represent independent modes of operation. Two
or more parallel (AND) states at the same hierarchical level can be active concurrently,
although they execute in a serial fashion. Parallel (AND) states are represented
graphically by a dashed rectangle with a number indicating execution order:
• FAN1
• FAN2
• SpeedValue
Transitions. Graphical objects that link one state to another and specify a direction of
flow. Transitions are represented by unidirectional arrows:
2-3
2 The Stateflow Chart You Will Build
• PowerOn to PowerOff
• PowerOff to PowerOn
• FAN1.On to FAN1.Off
• FAN1.Off to FAN1.On
• FAN2.On to FAN2.Off
• FAN2.Off to FAN2.On
Default transitions. Graphical objects that specify which exclusive (OR) state is to
be active when there is ambiguity between two or more exclusive (OR) states at the same
level in the hierarchy. Default transitions are represented by arrows with a closed tail:
• At the chart level, the default transition indicates that the state PowerOff is
activated (wakes up) first when the chart is activated.
• In the FAN1 and FAN2 states, the default transitions specify that the fans be powered
off when the states are activated.
• entry (en) action in the PowerOff state. Entry actions are executed when the state
is entered (becomes active).
• during (du) action in the SpeedValue state. During actions are executed for a state
while it is active and no valid transition to another state is available.
2-4
The Stateflow Chart
There are other types of state actions besides entry and during, but they involve
concepts that go beyond the scope of this guide. For more information, see “Syntax for
States and Transitions”.
Conditions. Boolean expressions that allow a transition to occur when the expression
is true. Conditions appear as labels for the transition, enclosed in square brackets ([ ]).
The Air Controller chart provides conditions on the transitions between FAN1.On and
FAN1.Off, and between FAN2.On and FAN2.Off, based on the air temperature of the
physical plant at each time step.
• CLOCK wakes up the Stateflow chart at each rising or falling edge of a square wave
signal.
• SWITCH allows transitions to occur between PowerOff and PowerOn at each rising or
falling edge of a pulse signal.
2-5
2 The Stateflow Chart You Will Build
The Simulink model passes the temperature of the plant as an input temp to the
Stateflow Air Controller block. Based on the temperature of the plant, the controller
activates zero, one, or two fans, and passes back to the model an output value airflow
that indicates how fast the air is flowing. The amount of cooling activity depends on the
speed of the fans. As air flows faster, cooling activity increases. The model uses the value
of airflow to simulate the effect of cooling when it computes the air temperature in
the plant over time. You will learn more about these design elements in “Interface with
Simulink”.
The Signal Builder block in the Simulink model sends a square wave signal (CLOCK) to
wake up the Stateflow chart at regular intervals and a pulse signal (SWITCH) to cycle the
power on and off for the control system modeled by the Stateflow chart. You will learn
more about these design elements in “Implementing the Triggers” on page 7-2.
2-6
A Look at the Physical Plant
In this model, the internal temperature of the plant attempts to rise to achieve steady
state with the ambient air temperature, set at a constant 160 degrees (as shown in “How
the Stateflow Chart Works with the Simulink Model” on page 2-6). The rate at which the
internal temperature rises depends in part on the degree of thermal isolation in the plant
and the amount of cooling activity.
Thermal isolation measures how much heat flows into a closed structure, based
on whether the structure is constructed of materials with insulation or conduction
properties. Here, thermal isolation is represented by a Gain block, labeled Thermal
Isolation. The Gain block provides a constant multiplier that is used in calculating the
temperature in the plant over time.
Cooling activity is modeled using a constant multiplier, derived from the value of
airflow, an output from the Stateflow chart. The chart assigns airflow one of three
cooling factors, each a value that serves as an index into a multiport switch. Using
2-7
2 The Stateflow Chart You Will Build
this index, the multiport switch selects a cooling activity multiplier that is directly
proportional to the cooling factor, as follows:
Over time, the subsystem calculates the cooling effect inside the plant, taking into
account thermal isolation and cooling activity. The cooling effect is the time-derivative of
the temperature and is the input to the Integrator block in the Physical Plant subsystem.
Let the variable temp_change represent the time derivative of temperature. Note that
temp_change can be a warming or cooling effect, depending on whether it is positive or
negative, based on this equation:
temp_change = ((ambient - temp) * ( thermal isolation multiplier) ) + ((ambient - temp) * ( cooling factor))
The Integrator block computes its output temp from the input temp_change, as follows:
t
temp(t) = Ú temp _ change(t) dt + 70
t0
Note In this model, the initial condition of the Integrator block is 70 degrees.
temp is passed back to the Stateflow Air Controller chart to determine how much cooling
is required to maintain the ideal plant temperature.
2-8
Running the Model
This command starts Simulink software and opens the sf_aircontrol model:
Tip Position the Air Controller chart and the Scope window so they are both visible
on your desktop.
2-9
2 The Stateflow Chart You Will Build
5 Start simulation in the Air Controller chart by selecting Simulation > Run.
As the simulation runs, the chart becomes active (wakes up) in the PowerOff
state. Notice in the Scope that until PowerOn becomes active, the temperature rises
unchecked. After approximately 350 seconds into the simulation, a rising edge signal
switches power on and the fans become active.
When the temperature rises above 120 degrees, FAN1 cycles on. When the
temperature exceeds 150 degrees, FAN2 cycles on to provide additional cooling.
Ultimately, FAN1 succeeds in maintaining the temperature at 120 degrees until a
falling edge signal switches power off again at 500 seconds. Then, the temperature
begins to rise again.
2-10
Running the Model
2-11
2 The Stateflow Chart You Will Build
Where to go next. Now you are ready to start building the Air Controller chart. Begin
at phase 1 of the workflow: “Implementing the Interface with Simulink” on page 3-2.
2-12
3
2
Define the states 6
for modeling each Simulate
mode of operation the chart
1 3 5 7
Define the Define Decide how to Debug
interface state actions trigger the chart the chart
to Simulink and variables
4
Define the
transitions
between states
In phase 1 of this workflow, you define the interface to the Simulink model.
3 Defining the Interface to the Simulink Model
In this section...
“Build It Yourself or Use the Supplied Model” on page 3-2
“Design Considerations for Defining the Interface” on page 3-2
“Adding a Stateflow Block to a Simulink Model” on page 3-3
“Defining the Inputs and Outputs” on page 3-7
“Connecting the Stateflow Block to the Simulink Subsystem” on page 3-13
Rationale. The purpose of the chart is to control the air temperature in a physical
plant. The goal is to maintain an ideal temperature of 120 degrees by activating one or
two cooling fans if necessary. The chart must check the plant temperature over time to
determine the amount of cooling required.
Property Value
Name temp
3-2
Implementing the Interface with Simulink
Property Value
Scope Input
Size Inherit from Simulink input signal for compatibility
Data type Inherit from Simulink input signal for compatibility
Port 1
Type of Output. Speed of airflow, based on how many fans are operating
Rationale. When the Simulink subsystem determines the temperature of the physical
plant over time, it needs to account for the speed of the airflow. Airflow speed is directly
related to the amount of cooling activity generated by the fans. As more fans are
activated, cooling activity increases and air flows faster. To convey this information, the
Stateflow chart outputs a value that indicates whether 0, 1, or 2 fans are running. The
Simulink subsystem uses this value as an index into a multiport switch, which outputs a
cooling activity value, as described in “A Look at the Physical Plant” on page 2-7.
Property Value
Name airflow
Scope Output
Data type 8-bit unsigned integer (uint8)
3-3
3 Defining the Interface to the Simulink Model
The model is incomplete because it does not include the Stateflow chart that you will
build as you work through the exercises in this guide. Instead, the model contains
several nonfunctional blocks: the Terminator, Inport, and Annotation blocks.
2 Delete the nonfunctional blocks and their connectors.
Tip Hold down the Shift key to select multiple objects, and then press Delete.
3-4
Implementing the Interface with Simulink
3-5
3 Defining the Interface to the Simulink Model
6 Click the label Chart under the Stateflow block and rename it Air Controller.
7 Change the action language of the chart to C:
3-6
Implementing the Interface with Simulink
sfnew
A new, untitled Simulink model opens on your desktop, automatically configured with a
Stateflow chart. For more information, see sfnew.
3-7
3 Defining the Interface to the Simulink Model
2 Add a data element to hold the value of the temperature input from the Simulink
model:
a In the editor menu, select Chart > Add Inputs & Outputs > Data Input
From Simulink.
The Data properties dialog box opens on your desktop with the General tab
selected:
3-8
Implementing the Interface with Simulink
The default values in the dialog box depend on the scope — in this case, a data
input.
b In the Name field, change the name of the data element to temp.
c Leave the following fields at their default values in the General tab because
they meet the design requirements:
3-9
3 Defining the Interface to the Simulink Model
Note Ports are assigned to inputs and outputs in the order they are created.
Because temp is the first input you created, it is assigned to input port 1.
d In the General tab, select Add to watch window.
The Stateflow Breakpoints and Watch window lets you examine the value of
temp during breakpoints in simulation. You will try this in “Setting Simulation
Parameters and Breakpoints” on page 8-2.
e Click OK to apply the changes and close the dialog box.
3 Add a data element to hold the value of the airflow output from the Air Controller
chart:
a In the editor menu, select Chart > Add Inputs & Outputs > Data Output To
Simulink.
The Data properties dialog box opens on your desktop, this time with different
default values, associated with the scope Output:
3-10
Implementing the Interface with Simulink
Note: Because airflow is the first output you created, it is assigned to output
port 1.
b In the Name field of the Data properties dialog box, change the name of the data
element to airflow.
c In the Type field, select uint8 (8-bit unsigned integer) from the submenu.
3-11
3 Defining the Interface to the Simulink Model
The initial value is a blank expression, which indicates a default value of zero,
based on the data type. This value is consistent with the model design, which
specifies that no fans are running when the chart wakes up for the first time.
e Make the following changes for other properties in the General tab:
Notice that the input temp and output airflow have been added to the Stateflow
block:
3-12
Implementing the Interface with Simulink
Tip You might need to enlarge the Air Controller block to see the input and output
clearly. To change the size of the block:
a Select the block and move your pointer over one of the corners until it changes to
this shape:
b Hold down the left mouse button and drag the block to the desired size.
5 Save Stage1Interface.
Tip There are several ways to add data objects to Stateflow charts. You used the
Stateflow Editor, which lets you add data elements to the Stateflow chart that is open
and has focus. However, to add data objects not just to a chart, but anywhere in the
Stateflow design hierarchy, you can use a tool called the Model Explorer. This tool also
lets you view and modify the data objects you have already added to a chart. For more
information, see “Stateflow Hierarchy of Objects” and “How to Add Data Using the Model
Explorer” in the Stateflow User's Guide. You can also add data objects programmatically
using the Stateflow API, as described in “Create Stateflow Objects” in the Stateflow API
Guide.
1 In the model Stage1Interface, connect the output airflow from Air Controller to
the corresponding input in Physical Plant:
a Place your pointer over the output port for airflow on the right side of the Air
Controller block.
3-13
3 Defining the Interface to the Simulink Model
Tip You can use a shortcut for automatically connecting blocks. Select the source
block, and then hold down the Ctrl key and left-click the destination block.
2 Connect the output temp from the Physical Plant to the corresponding input in Air
Controller by drawing a branch line from the line that connects temp to the Scope:
a Place your pointer on the line where you want the branch line to start.
b While holding down the Ctrl key, press and hold down the left mouse button.
c Drag your pointer to the input port for temp on the left side of the Air Controller
block.
d Release the mouse button and the Ctrl key.
e Reposition the connection so that it looks like this:
3-14
Implementing the Interface with Simulink
Tip To reposition connections, move your cursor over the end of the line. When
the cursor changes to a circle, select the end of the line with the left mouse
button and drag the line to a new location.
3 Save Stage1Interface.
Where to go next. Now you are ready to model the operating modes with states. See
“Implementing the States to Represent Operating Modes” on page 4-2.
3-15
4
2
Define the states 6
for modeling each Simulate
mode of operation the chart
1 3 5 7
Define the Define Decide how to Debug
interface state actions trigger the chart the chart
to Simulink and variables
4
Define the
transitions
between states
In phase 2 of this workflow, you define the states for modeling each mode of operation.
4 Defining the States for Modeling Each Mode of Operation
Whether or not to use states depends on the control logic you want to implement. You can
model two types of control logic: finite state machines and stateless flow charts. Each type
is optimized for different applications, as follows:
4-2
Implementing the States to Represent Operating Modes
The Air Controller chart is a system that cools a physical plant by transitioning between
several modes of operation and, therefore, can be modeled as a finite state machine. In
the following sections, you will design the states that model each mode of operation.
States model modes of operation in a physical system. To determine the number and type
of states required for your Air Controller chart, you must identify each mode in which
the system can operate. Often, a table or grid is helpful for analyzing each mode and
determining dependencies between modes.
Analysis of Operating Modes
4-3
4 Defining the States for Modeling Each Mode of Operation
Note: Notice the use of dot notation to refer to the On and Off states for FAN1 and FAN2.
You use namespace dot notation to give objects unique identifiers when they have the
same name in different parts of the chart hierarchy.
Stateflow objects can exist in a hierarchy. For example, states can contain other states
— referred to as substates — and, in turn, can be contained by other states — referred to
as superstates. You need to determine the hierarchical structure of states you will define
for the Air Controller chart. Often, dependencies among states imply a hierarchical
relationship — such as parent to child — between the states.
4-4
Exploring the Variety of Random
Documents with Different Content
air of triumphant malignity masked under a silken courtesy. It was
the first time he and I had met in London.
"He asked me where I lodged, how long I had been in town, and
whether I was still pursuing my scientific investigations. I told him I
had other investigations on my hands, even more absorbing than
those of the laboratory; I had my granddaughter's evil fortunes to
guard from further decline.
"'Do you call it evil fortune to be mistress of such a house as this?'
he asked, looking round him at the hall in which we were standing.
"'I call it infamy to be the mistress of your master, most of all, his
slighted mistress,' I answered.
"'O, fie, sir! we all call the lady his wife. She is known here only as
Mrs. Topsparkle.'
"'An empty honour, sir, which the more strongly indicates her
dishonour. Did you ever know Mr. Topsparkle introduce his lady to
any decent woman, to any persons of standing or repute? No, his
only generosity is to surround her with a sybarite luxury, to leave her
in a gilded desolation. You all know she is not your master's wife,
and that no wife would consent to have her child carried off from
her by a stranger to a place of which she knows not the name.'
"'My master is a man accustomed to rule,' answered Fétis. 'We none
of us ever presume to thwart him.'
"I passed out of the house without another word, and waited day
after day for some sign from Margharita, to whom I had given the
address of my lodging; but none came. My illness had weakened me
considerably, and I was no longer able to loiter about within sight of
Mr. Topsparkle's door for an hour at a time; yet I dragged myself
there every evening, and generally contrived to got a word with my
ally in the servants' hall.
"One evening at dusk I saw a young man of remarkably handsome
appearance leave Mr. Topsparkle's house, as I thought with a
stealthy air, hurrying away with anxious glances to right and left, and
with the collar of his cloak pulled up about his ears.
"Two days afterwards I saw in the Flying Post that there had been a
passage of incivilities between the rich Mr. Topsparkle and young Mr.
Churchill, a brother of the famous Mrs. Arabella Churchill, the
favourite of the late King, a dispute which had nearly resulted in a
duel. I went at once to Soho Square, but was refused admittance.
Mrs. Topsparkle was dangerously ill, and her husband was in
constant attendance upon her.
"I asked to see Fétis, and, after waiting nearly an hour in the hall, he
came to me.
"In reply to my anxious questions he affected to make light of my
granddaughter's illness. 'A fit of the spleen,' he said, 'which Mr.
Topsparkle's tenderness has exaggerated into a serious malady. One
of the Court physicians is now with her.'
"I charged him with deceiving me. 'There has been a quarrel
between your master and that unhappy girl,' I said, 'and she is
reduced to a state of misery in which you will not allow me to see
her.'
"'Quarrel! What should they quarrel about?' he asked, with his
unblushing air.
"The physician came down-stairs attended by a couple of lacqueys
at this moment, and I went to him at once and questioned him
about his patient. He looked astonished at my effrontery, and turned
to Fétis for an explanation.
"'I am a near relative of the patient, sir,' I said, 'and this old heart
will break if any ill befalls her.'
"'My good man, the lady is not seriously indisposed. She is but
suffering from a languor which is natural to a woman of quality after
the ordeal of maternity; and she is somewhat vapourish from the
seclusion of convalescence. If she follows my prescriptions implicitly
she will soon be restored to good spirits and full beauty.'
"'Then she is not in danger?' I asked.
"'I can perceive none at present. I have attended her Grace of
Cleveland for the same malady; and when the Duchess of
Portsmouth returned to France she insisted on carrying my
prescriptions with her.'
"I had no confidence in an old twaddler of this order, whose gold-
headed cane and embroidered velvet suit were apparently his
strongest qualifications. I looked from him to Fétis, who, in spite of
his silken smoothness, had, I thought, a more anxious air than
usual. He was very pale, and his hollow eyes indicated a night of
watching.
"'I will not leave this house until I have seen my granddaughter,' I
said, resuming my seat in the hall; whereupon Fétis whispered to
the physician, who presently approached me and informed me with
a solemn air that although Mrs. Topsparkle's bodily health was in no
danger, her spirits were much affected, and that the agitation of an
interview with a relative might throw her into a fever.
"Alas, I knew that my presence could not bring calmness to that
wounded spirit. Unless she had been well enough to get up and
follow me out of that accursed house a meeting between us could
be of no avail. I had the physician's word that she was in no danger;
and though I put him down as a pompous pretender I yet gave him
credit for enough skill and enough honesty to answer such a plain
question as I had asked him. So I left the house soon after the
doctor, Fétis promising that if his lady were in calmer spirits next day
I should be allowed to see her.
"When I went to the house at noon next day she was a corpse. She
had gone off suddenly in a fit of hysterics soon after midnight, Mr.
Topsparkle and her waiting-woman being present. Mr. Topsparkle
was shut up in his room in an agony of grief, and would see no one.
"Had there been any medical man called in at the time of her death?
I asked. No, there had been no one. It was too sudden; but the
physician had been there this morning, and had endeavoured to
explain the cause of the death, which had taken him by surprise.
"I asked to see the dead; but this privilege was refused to me. I
inquired for Fétis, and was told he had gone out on business, and
was not expected back for some hours. The key of the room in
which Margharita was lying was in his possession. There were lights
burning in the room, but there was no one watching there. There
had been no religious ministrations. My granddaughter had perished
as the companion of an infidel, surrounded by infidels.
"I sat in the hall for some hours, despite the sneers and incivilities of
the servants, waiting for the return of Fétis; but he did not reappear
until I was worn out by agitation and fasting and the misery of my
position as the mark of insolence from overfed lackeys. I left the
house broken-hearted, and returned there next morning only in time
to see the coffin carried to the pompous hearse with its tall plumes
and velvet trappings and six Flanders horses. I followed on foot to a
graveyard in the neighbourhood, where my granddaughter was
buried in a soil crowded with the dead. Topsparkle was not present.
He was too ill to attend, I was told; and there were hootings and
hissings from the crowd as the funeral procession, with Fétis at its
head, went back to Soho Square.
"I followed him to the threshold of his master's house.
"'Do you know why the rabble hooted you?' I asked him, as we
stood side by side within the doors, which the porter shut quickly to
keep out the crowd.
"'Only because they are rabble, and hate their betters,' he answered.
"'They hooted you because a good many people in this
neighbourhood suspect that which I know for a certainty. They
suspect you and your master of having murdered that unhappy girl.'
"He called me an idiot and a liar; but I saw how his face, which had
been white to the lips as he passed through the crowd, now
changed to a still more ghastly hue.
"'O, you forget that it was I who armed your arsenal of murder. It
was in my laboratory you learnt all the arts of the old Italian
toxicologists—the poison, and the antidote, and the drug that
neutralises the antidote. You were laborious and persevering; you
wanted to master the whole science of secret murder. You had no
definite views of mischief then, only the thirst for evil, as Satan has,
revelling in sin for its own sake, courting iniquity; but you soon
found a use for your wicked power. First you snared your victim, and
then you killed her—you, the passionless hireling of a profligate
master, the venal slave and tool.'
"He made a sign to his underlings—the stalwart porter and three tall
footmen—and they came round me and thrust me out of the house,
flung me on to the pavement, helpless and exhausted. There was no
constable within call; the crowd had dispersed. I had nothing to do
but crawl back to my lodging, an impotent worm.
"Next day I was visited by a constable, who told me that I had
narrowly escaped being sent to gaol for an assault upon the
confidential servant of a gentleman of high position. He warned me
of the danger of staying any longer in the town, where I had already
made myself an object of suspicion as a foreign spy and a
dangerous person.
"I knew something about the interior of London gaols, and had
heard so many melancholy stories of the tyranny exercised even
upon poor debtors, and how much more upon common felons, that I
shuddered at the idea of being clapped into prison and kept there
indefinitely by the influence of Mr. Topsparkle. I knew that there was
no cell in our dungeons of Venice worse than some of the dens
where humanity was lodged in the Fleet, and I knew what the power
of wealth can do even in a country which boasts of freedom and
equal rights between man and man; so I did not make light of the
constable's counsel, but at all hazard to myself I obtained an
interview with the Italian consul, who was civil, but could give me no
help, and who smiled at suspicions for which I could allege no
reasonable ground. The fact that Fétis had made the art of secret
poison his especial study, to this gentleman's mind implied nothing
beyond a morbid taste.
"'You are yourself a toxicologist, sir,' he said, yet I take it you have
never poisoned anybody. Pray, what motive could Mr. Topsparkle or
his servant have had for making away with a lady who, as she was
not a wife, could have been easily provided for?'
"'Revenge. Mr. Topsparkle may have believed that she had been false
to him. It is known that he was jealous of her.'
"'And you would suspect a gentleman in Mr. Topsparkle's position, a
patron of art, a highly-accomplished person, and a man of society;
you would credit such a man with the murderous violence of an
Othello.'
"I tried to convince this gentleman that my granddaughter had been
poisoned, and that it was his duty to help me to bring the crime to
light. I entreated him to use his influence with the magistrate and to
get an order for the exhumation of the body; but he thought me, or
pretended to think me, a lunatic, and he warned me that I had
better leave England without delay, as I had no obvious business or
means of subsistence in this country, where there was a strong
prejudice against our countrymen, who were usually taken for
Jesuits and spies, a prejudice which had been heightened by the
popular dislike of the Queen and her confessor.
"In spite of this advice, I remained in London some time longer, in
the hope of obtaining some proof against the wretch I suspected,
although the thought of my laboratory drew me to Venice. I
questioned my friend in Mr. Topsparkle's household, and bribed him
to get what information he could from his fellow-servants; but all I
could hear from this source was that Mrs. Topsparkle had been
seized with a sudden indisposition late one evening, that an
apothecary, whom her waiting-woman called in hurriedly from the
neighbourhood, had been able to do nothing to relieve her
sufferings, and had been dismissed with contumely by Mr.
Topsparkle, who was angry with his lady's woman for having sent for
such a person. The sufferer took to her bed, never left it but for her
coffin, and Mr. Topsparkle remained in close attendance upon her
until the hour of her death.
"I found the apothecary in a shabby street near St. Giles's, and
discovered that he had a shrewd suspicion of poison, but was very
fearful of committing himself, especially in opposition to the Court
physician, who had given a certificate of death. And after many
useless efforts I went back to Venice, where I found my son a
broken man. He survived his daughter little more than a year.
"This is a truthful account of my granddaughter's elopement and
death, which I hope may some day assist in bringing her murderers
to shame, if it do not lead to their actual punishment. That she was
poisoned by Fétis, with the knowledge and consent of his master, I
have never doubted; but such a crime is difficult of proof where the
criminal is at once bold and crafty."
Updated editions will replace the previous one—the old editions will
be renamed.
1.D. The copyright laws of the place where you are located also
govern what you can do with this work. Copyright laws in most
countries are in a constant state of change. If you are outside the
United States, check the laws of your country in addition to the
terms of this agreement before downloading, copying, displaying,
performing, distributing or creating derivative works based on this
work or any other Project Gutenberg™ work. The Foundation makes
no representations concerning the copyright status of any work in
any country other than the United States.
1.E.6. You may convert to and distribute this work in any binary,
compressed, marked up, nonproprietary or proprietary form,
including any word processing or hypertext form. However, if you
provide access to or distribute copies of a Project Gutenberg™ work
in a format other than “Plain Vanilla ASCII” or other format used in
the official version posted on the official Project Gutenberg™ website
(www.gutenberg.org), you must, at no additional cost, fee or
expense to the user, provide a copy, a means of exporting a copy, or
a means of obtaining a copy upon request, of the work in its original
“Plain Vanilla ASCII” or other form. Any alternate format must
include the full Project Gutenberg™ License as specified in
paragraph 1.E.1.
• You pay a royalty fee of 20% of the gross profits you derive
from the use of Project Gutenberg™ works calculated using the
method you already use to calculate your applicable taxes. The
fee is owed to the owner of the Project Gutenberg™ trademark,
but he has agreed to donate royalties under this paragraph to
the Project Gutenberg Literary Archive Foundation. Royalty
payments must be paid within 60 days following each date on
which you prepare (or are legally required to prepare) your
periodic tax returns. Royalty payments should be clearly marked
as such and sent to the Project Gutenberg Literary Archive
Foundation at the address specified in Section 4, “Information
about donations to the Project Gutenberg Literary Archive
Foundation.”
• You comply with all other terms of this agreement for free
distribution of Project Gutenberg™ works.
1.F.
1.F.4. Except for the limited right of replacement or refund set forth
in paragraph 1.F.3, this work is provided to you ‘AS-IS’, WITH NO
OTHER WARRANTIES OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO WARRANTIES OF
MERCHANTABILITY OR FITNESS FOR ANY PURPOSE.
Please check the Project Gutenberg web pages for current donation
methods and addresses. Donations are accepted in a number of
other ways including checks, online payments and credit card
donations. To donate, please visit: www.gutenberg.org/donate.
Most people start at our website which has the main PG search
facility: www.gutenberg.org.
ebookbell.com