|
Simulink block library Function Chart:
essential features
- all rights reserved - Dr. Geitner ETI/TU Dresden |
The software tool Function Chart block library has been
developed for the design, simulation, code generation and the
description of event-driven systems especially in the fields of
mechatronics, mechanical and electrical engineering. It is an
add-on block set for
MATLAB/Simulink.
Its essential features are:
- Function Chart is an open system with block-oriented design
and the possibility to generate C-code for real-time applications.
It may be handled like standard
Simulink
blocks, i.e. there is no special window and no additional run of
a compiler in case of simulations or of a function chart coder in
case of a real-time application.
- With regard to the graphical presentation, i.e. the block icons, it
is intended to approach the
VDI /
VDE
guideline 3684 "Description of event-driven motion processes by
function charts". This guideline has been worked out by the
GMA committee 4.12 "Motion control of machine tools and processing
machines" and is published by
Beuth Berlin.
- Examples for important unavoidable variances of the graphical
presentation of the library Function Chart in comparison with
guideline 3684 are the connection of the
KB
block (
comment block) with the output of a state block (originally on
the right side of a
state block, e.g.
ZA),
the general graphical marker of the action direction via arrows
(originally for upward action direction only) and the connection of
events to event blocks via "goto" blocks (originally event names
without squared brackets and not within a block). The comment block
is able to transmit parameters of different definition but no
mathematical equation in contrast to the guideline.
- There are no limitations with reference to the nesting of
branching and junction in a function chart, i.e. parallel and
alternativebranches may be arbitrarily nested according to the syntax.
- There are no limitations with reference to the creation of sub
function charts (subsystems). Consequently large function charts may
be arbitrarily divided for screen-compatible programming of the
motion processes. Please note however that the block icons containing
these subsystems will not have any specific block icon. For this
case it is recommended to choose a text for good recognition
(display command in block mask menu).
- The state numbers are freely selectable as natural numbers from
1 to 9999 without zero. There is no connection between the internal
Simulink
automatic block numbering and the freely selectable state numbers.
- The definition of a function chart number and a state number makes
it possible to handle several function charts simultaneously.
Optionally in different function charts the same state numbers may
be applied. Natural numbers from 1 to 9 without zero can be chosen
as function chart numbers.
- Comment
blocks (
KB
as a sender) and
Variable blocks (
FUP_V as a receiver) serve as
interfaces between function charts and motion cells (drives) -
without any graphical connection. The transmitted control variables
may be numerical or logical ones. Unlike state numbers these
variables are valid between different functioncharts and process
models on demand, if the same names are used.
- The continuous programming of the functionality by means of
S-functions and MEX-files on the basis of C-code as well as the
economic usage of standard blocks guarantee minimum run times.
- Function Chart enables the handling of motion errors as transitions
from normal operation to separate error sub function charts without
any graphical connection. Starting from any normal state it is
possible that a transition to one of several error handling sequences
may be made. The graphical clearness will not worsen. If an error
signal is initiated all normal operation states of the paticular
function chart get inactive while the
common error state
ZF
gets active
for that moment. Afterwards one of several prepared error handling
states gets active, which depends on the pre-error states and the
Boolean equations. Re-entry points to the normal operation can be
selected freely according to the technological reqirements.
- A system check-up is possible by displaying active states.
Optionally the
AZFx
block performs the display of all active states
of a function chart or the
DA
block shows the active states of a
selected number of states in different function charts.
- Function Chart implies extensive automatic design support. Based on
a browser each block offers help text with due regard to
the intended purpose and the use limitations. Easy block parameter
setting errors cause an acoustic signal and the display of an error
text. Structure errors, such as defined variable names and related
accesses, defined state numbers and related Boolean error equations,
dead ends or competitive signal transmission may be
detected and displayed with add-on software tools.
- Real-time code generation may be done as easy as it is prepared for
Simulink itself. No special window, no special function chart coder
is necessary. If a PC based motion control is to be performed, it
is merely necessary to use MATLAB Compiler and add-on software
Simulink Coder
(formerly RTW, Real-Time Workshop) as well as
xPC-Target
(formerly RealLink/32) as target support package and hardware driver library.
Existing xPC-Target make-files may be used without modification. Function
Chart library registration is the only condition.
- Run time savings are possible by use of compiler switches for block
parameter setting errors. This is useful at the end of a development
cycle. The user can also influence the necessary memory hardware for
real-time operation by specification of the maximum number of
parallel states and parallel function charts as well as the
transmitted variables.
- The software provides help for error search in technological
cycles and for easy explorations of technological variants. At
early design cycles and for selected errors event generation
may be replaced by on-line switches. Alternative paths and switches
for variants enable the comparison of different technological cycles
for simulation and real-time operation. Both operation modes may
work using on-line switch generated events in order to enable the
stepping mode totally or partially. State variables and events may
be scanned not only at simulation but also at real-time operation.