Herunterladen Inhalt Inhalt Diese Seite drucken

First Programming Steps; Programming Tasks - Part I; Hand Dryer; Programming Tips - fischertechnik Computing Starter Pack Begleitheft

Inhaltsverzeichnis

Werbung

Verfügbare Sprachen

Verfügbare Sprachen

Because many of you already have these fischertechnik components, no
power supply is included in the "Starter Pack" package.
Here's wishing you success installing and connecting the software and
interface. Then you can continue.

2.3 First Programming Steps

After the hardware and software are running properly, you can finally start
programming. Use the LLWin 3.0 handbook for this too. No better introduc-
tion to programming exists than in Chapters 3 and 4. Consequently, refer to
those chapters now and work through them.
You will notice that "Testing the First Control Program" in Chapter 3.5 refers
to the "Motor Control" model in the Computing Starter construction kit.
Construct this model following the instructions and
then test your first program. Have fun!
3. Programming Tasks – Part I
After you have read through Chapters 3 and 4 of the LLWin 3.0 handbook,
you can then program a few models of the Computing Starter construction
kit. Let's start right now. Every time you have completed a model and wired
it, check using the Check Interface diagnosis tool whether all outputs and
inputs are connected correctly and whether the sensors, motors and lamps
function properly.
3.1 Hand Dryer (see assembly instructions page 6 )
New hand dryers were installed next to the
sink in the rest rooms of your school. They
are equipped with a light barrier via which a
blower is switched on and off. First construct
the model.
Task 1:
Program the hand dryer, so that as soon as the light barrier is interrupted,
the blower is switched on and then off after five seconds. Create a new
project for this in LLWin 3.0.

Programming tips:

x
First switch on the lamp at M2 for the light barrier (OUTPUT block).
x
Then wait a second, so that the phototransistor has time to react to the
light (WAIT block).
x
Then query the phototransistor E1 (INPUT block). If the value equals 1
(light barrier not interrupted), the phototransistor should be queried in
a loop continually. If the value is 0 (light barrier interrupted), switch
the motor M1 on (OUTPUT block) and then off again after five seconds
(WAIT and OUTPUT blocks). Then the phototransistor should be queried
again.
Start the project with Run – Start and check whether the pro-
gram functions properly. If yes, then you are on the right path to becoming
a professional LLWin programmer.
If it does not function properly, try to find out where the problem is:
You can check in Run – Init whether all blocks are con-
x
nected with lines and whether the entries in the function blocks are
correct. If a line or an entry is missing for a block, the block appears
violet.
x
When the program runs in online mode (Run – Start),
you can trace the program process using the red-marked building
blocks. Then you can also detect quickly where the error crept in
(e.g., if the process does not continue at the INPUT block, perhaps
because E2 is queried instead of E1).
x
If you still cannot get your program running, you can load the ready-
to-use example project Hand dryer 1.mdl from the "Computing
Starter" subdirectory of your LLWin directory and compare it with your
flowchart. Then at the latest you will see where the error is.
After you have passed this first hurdle, we want to change the task a bit.
Task 2:
The principle, who is always looking for ways to save energy, is not happy
that the hand dryer continues to run for a certain time even when hands
are already dry. He asks you to modify the program, so that the blower
switches off immediately when the hands are removed from it. No problem
for you, isn't that right?
Programming Tips:
x
You query the phototransistor E1 again (INPUT block). If the value equals
0, switch the motor M1 on (OUTPUT block). If the value is 1, switch the
motor M1 off (OUTPUT block), and so on.
x
A ready-to-use project also exists for this task for an emergency situa-
tion, Hand dryer 2.mdl.
3.2 Traffic Light (see assembly instructions page 8)
A traffic light was installed in front of your home. Because the installation
engineer from the traffic light company is in a hurry, you offer to program
the traffic light control for him.
The man explains to you how
the control should function, but
first you should assemble the
model.
GB+USA
13

Werbung

Kapitel

Inhaltsverzeichnis
loading

Inhaltsverzeichnis