User guide

WintDrive
2
Developing a
Win+Drive
Application
2.1
What is Win+Dfive?
The control of systems by electronics was traditionally done by analog circuits. These analog circuits operate
continuously. Their structure can be described by block diagrams based on general blocks like PI controllers,
adders etc.
Using digital software control by microcontrollers for the same control tasks is possible in many cases. Now
the continuous operation is replaced by the cyclic execution of a control program. Programs consist of a
sequence of operations. For describing programs, typically text files containing program code in assembler or
high-level languages like ā€œCā€ are used. This kind of representation is often not appropriate for the description
of control tasks.
Win+Drive is a graphical program generator for the Windows
TM
operating system especially designed for
control tasks. Building control programs is as easy as drawing block diagrams. Basic pieces of code are
placed on a schematic and are connected. Parts of the whole control structure can be put into compound
blocks that are inserted into schematics once or several times. From this graphical representation code is
generated that can be compiled and executed on the PC for simulation and on the target system.
2.2 Introducing the Tools
2.2.1 The Schematic Editor
The schematic editor is the most important interactive tool of Win+Drive. It is used to create and edit the
schematics. These contain the basic blocks which represent library elements with pieces of code within them
and compound blocks which are schematics by themselves. The blocks are connected by connection lines to
make the output value of the calculation of one block the input value of another one. Texts and labels can be
inserted into the schematic as comments.
There are numerous commands to modify schematics. Schematics can be printed for documentation purposes.
22.2
The Code Generation
While the schematic editor is an interactive tool with a lot of user commands the code generation is a batch
process that is started by only a few commands. It generates C code from the schematics and compiles it to
executable binaries. The PC itself or the target system can be selected as the platform for the code generation.
2.2.3 The Simulator
The generated code can be executed on the PC. For this purpose Win+Drive includes a simulation and prob-
ing shell. Probes can be set on ports of blocks to be displayed during simulation graphically or in tabular lists.
The simulation can be run for one or several cycles.
2.2.4 The library Editor
For creating and modifying the basic blocks which build the library for Win+Drive applications some tools
for creating and modifying the library are provided. This includes an editor for the graphic symbols of the
blocks and a library tool for the administration of the source code of the basic blocks.
3