Next: 4.2 Extending the labAlive
Up: 4 Using and extending
Previous: 4 Using and extending
It's only one object, a java subclass of the class Wiring, that defines a specific wiring. To start, an applet or an application creates an instance of it. To get such a new labAlive Wiring, all you have to do is programming this class.
A simple example should demonstrate how to create a new labAlive Wiring. The circuit arrangement consists of a sine-wave generator, a low pass filter and a sink (figure 1, upper part).
The steps the labAlive technician has to do are:
- 1.
- Create the systems needed
- 2.
- Create the wires needed
- 3.
- Make up wiring, connect wires and systems
- 4.
- Define the layout
- 5.
- Initialize
- 6.
- Start simulation
Steps 1 to 3 are similar to the procedure in an electronics laboratory: First you gather the required systems like a generator and a low-pass filter (1.). Then you take the wires you need to connect all systems (2.) and connect up the wiring (3.).
After that you have to define the arrangement of the components to be
displayed (4.). The rest is simple formality: To initialize the wiring (5.) you just have to supply
the generators (i.e. StartableSystem) to the wiring
adminstrator. This is only one codeline. Just as starting the
simulation (6.), where you can define the simulation speed.
While a wiring is running, a click on wires shows a corresponding oscillograph displaying the signal. The oscillographs have a moving beam like real oscillographs. A click on systems opens a corresponding property window where parameters--like frequency and amplitude of the sine-wave generator--can be changed interactively. The appearance of this example wiring looks similar in style to the later referred radar system in figure 2.
The example above was kept as simple as possible in order not to confuse by many optional features. When using a labAlive Wiring for on-line teaching, its appearance should be according to didactic requirements. A more elaborate example is the radar system shown in figure 2.
Figure 2: An example for a labAlive Wiring: A radar system
with animations. The sent electromagnetic wave moves to the right,
is reflected and moves backwards. Switch and downsampler switch in
time.
In the labAlive Wiring class several parameters can be set in
order to determine the wanted appearance:
- Automatic opening and positioning of oscillograph and property windows.
- Not every system has to be displayed. E.g. the noise generator and adder of the radar channel in figure 2 are necessary for the simulation, but remain hidden.
- The display of wiring components (systems or wires) can be varied. E.g. a wire can be displayed by a horizontal or vertical wire or by a L-shape.
- Various parameters of oscillographs can be defined, e.g. size, range, colours, labels, optional triggered by the generator etc..
- Delay times of systems can be set which will be used to correct delays of signal displays in oscillographs. E.g. you may compare the source and the delayed sink signal of a digital transmission in a way that corresponding impulses appear synchronously.
Next: 4.2 Extending the labAlive
Up: 4 Using and extending
Previous: 4 Using and extending
Erwin Riederer
Wed Jun 16 11:01:00 MET DST 1999