Herunterladen Inhalt Inhalt Diese Seite drucken
Inhaltsverzeichnis

Werbung

Verfügbare Sprachen

Verfügbare Sprachen

GB+USA
Task 1:
The traffic light should normally be green. If a pedestrian presses the
pushbutton E1, the light should switch to yellow three seconds later
and then to red four seconds after that. The red phase should last 10
seconds, the subsequent red-yellow phase lasts three seconds, and
then it should turn green again.
Programming Tips:
x
The different lamps belong to the following interface outputs: green =
M3; yellow = M2; red = M1. Simply switch the lamps on and off one
after another (OUTPUT block), so that the required switching sequence
is achieved.
x
Use the INPUT block to query the pushbutton E1.
x
Ready-to-use: Traffic light 1.mdl
Task 2:
The installation engineer calls the traffic light company the next day. He for-
got to tell you that a switch E2 is in the switchbox on the sidewalk, which
should switch the light to a blinking yellow as soon as it is activated. You
assure the installation engineer that you will integrate this function quickly
into the program.
Programming Tips:
x
Query with another INPUT block between the pushbuttons E1 and E2.
If E2 is pressed, you branch the flowchart to a blinking light. If E1 is
pressed, the light control runs as in task 1.
x
You program the blinking light by switching lamp M2 on and off again
0.5 seconds. Write a "blinking light" subprogram for this. You learned
in Chapter 4 of the LLWin handbook how to do this.
x
Consider carefully at which point of the flowchart you query E2, so
that the switch to a blinking light is not only possible at the start
of the program, but instead during every green phase.
x
The ready-to-use project is called Traffic light 2.mdl by the way. But
don't look at it right away. Try your hand at it first.
3.3 Sliding Door (see assembly instructions page 10)
The supermarket in which you have a part-time job stocking the shelves has
14
Programming Tips:
x
x
x
x
You have set yourself a difficult task! But actually, it's not all that difficult.
Maybe you need to think it over a bit. But don't look at the finished project
yet. A bit of mind-training never hurt anybody!
Programming Tips:
x
received a new entrance
x
door. The control software
must be written for this
x
now. The store manager
knows that you are an ex-
pert in programming and
asks you to handle it. But
You did it! Your boss is proud of you. The door now operates flawlessly and
first build the model.
safely. The boss doubles your hourly wage.
Task 1:
When pushbutton E3 is pressed, the door should open and then close again
after five seconds.
First close the door. Then it is in the starting position. Let the motor M1
run to the left for this until the limit switch E1 becomes "0" (INPUT
block).
Query pushbutton E2 (INPUT block). If it is pressed, the door opens.
Run the motor M1 to the right for this until the limit switch E2
changes to "1".
Close the door again (loop back to the beginning) after five seconds
(WAIT block).
Ready-to-use project: Sliding door 1.mdl.
Task 2:
The door control works well. However, when the first customer gets
a leg stuck in the door because he tried to pass through just at the
moment when it closed, you decide to improve the program. The door
has a light barrier, which should prevent the door from closing when
somebody is passing through. You want to expand the program, so
that:
1. The door is only closed when the light barrier is not interrupted.
2. The door opens again when the light barrier is interrupted during
closing.
3. The door also opens without the button being pressed as soon as
the light barrier is interrupted.
First switch – exactly as for the hand dryer – the lamp for the light
barrier on and wait one second before the process continues.
Query the phototransistor at every place where it is necessary and open
the door when the phototransistor has the value of 0.
Ready-to-use project: Sliding door 2.mdl

Werbung

Kapitel

Inhaltsverzeichnis
loading

Inhaltsverzeichnis