Upload
others
View
4
Download
0
Embed Size (px)
Citation preview
KEEP I. T. EASY
Primary 3D Mimic Pack 1: Activities
K EEP I . T . EA SY
Primary 3D Mimic Pack 1: Activities
2010 Keep I.T. Easy
www.flowol.com
Copyright © 2010 Keep I.T. Easy
This documentation is subject to copyright.
If you have a licensed copy of the Primary 3D Mimic Pack 1, you may print as many copies of all or part of this tutorial for your use under your software end user license.
If you do not have a licensed copy of the mimic pack, you may use this documentation to understand more about it and whether it may be suitable for your purposes. In this case you may not print and use this documentation in a teaching setting.
Keep I.T. Easy acknowledge that there may be errors or omissions in this publication for which responsibility cannot be assumed. No liability will be accepted for loss or damage resulting from the use of information contained in this documentation or from uses as described.
F L O W O L 4 T U T O R I A L
3
Downloading and Installing the Mimic Pack
The mimic pack is distributed as an internet download for both Windows PC and Apple Mac computers.
Downloading the Mimic Pack
1. Navigate to http://www.flowol.com/Download.aspx.
2. Enter the license key that was delivered with your purchase. The license key is of the form XXXX-XXXX-XXXX-XXXX-XXXX-XXXX where X is either a letter or number. Letters will be capitalized as you type them, but you do need to enter the dashes. If your license key was delivered to you in an e-mail, you may find it easier to copy and paste the key into the field. Click on OK.
3. If you have a multi-machine license, or a whole-site license, then you will be given the opportunity to register your purchase at this stage.
4. At the top of the page is a link to the end-user license agreement for the level of license that you have. Please click on the link, read and print the license for your records. Note that installing the software indicates your acceptance of the terms of the license agreement.
5. Every license key provides the mimic pack for either Windows PC computers, or Apple Mac computers (or both if you have a multi-computer license).
Installing the Mimic Pack
Follow the instructions on the webpage for installing the mimic pack onto either a single computer or onto multiple computers (e.g. a school network).
For more detailed information on installing, please consult the following webpage: http://www.flowol.com/flowol4/Installation.aspx
Using the Primary 3D Mimic Pack 1
Launch Flowol 4 and from the Welcome dialog box, choose Use a Mimic and scroll down the list of available mimics to find the new Primary 3D Mimics:
The first time one of these mimics is opened, you may be prompted to activate and register your Mimic Pack purchase. This will only need to be done once and follows the same process as for the Flowol 4 software.
F L O W O L 4 T U T O R I A L
4
The Horse Ride
Coin operated rides are very popular in shopping malls, but rarely do we
have the chance to see inside. While servicing this Horse Ride, the
maintenance worker has removed the side cover so we can see the
mechanism.
Open the Horse Ride
mimic and click on the
Front and Rear motors
on the Status Panel to
see what it can do.
There are two virtual
inputs on the ride:
Rear Sw and Front Sw.
They are switched on
by the motors when
the crank is at the
lowest position.
Activity 1
Build and complete this flowchart to drive both motors
forward for 35 seconds when a coin is placed in the slot
(Click on the grey Coin Slot). How does the ride move?
Activity 2
To make it easy for a person to dismount the horse, it
should stop in its lowest position. Use one of the virtual
inputs (e.g. Front Sw) and modify your flowchart so the ride
stops at its lowest position.
Activity 3
It might be a more interesting ride if the rear motor
rotates slightly slower than the front. Adjust the top
output symbol in your flowchart to run the Rear motor at 90% power. How
does the ride move now? Does the ride still stop at its lowest position?
Activity 4
Create a second, separate flowchart (thread) to control the rear motor, so
that the ride stops with both motors at their lowest positions.
Start
Is
Coin Slot on?
Turn Rear fd,
Front fd
Delay 35
YES
NO
F L O W O L 4 T U T O R I A L
5
The Teacup Ride
Having a ride in a teacup should be fun and safe.
Open the Teacups
mimic and click on
the Status Panel to
see how the ride
operates.
When the ride
rotates (Turntable
motor), the virtual
input named Switch
is turned on when
the two triangles
match up.
Activity 1
Create and complete this flowchart to control the rotation of
the ride with the left Button1. Run the program and click on
the left red button on the mimic to toggle it on and off.
Activity 2
To make the ride more exciting, spin the teacups (Cups
motor) as well as rotating the turntable.
You could use delays with forward and reverse directions to
make the ride even more interesting.
Activity 3
The lights around the turntable rim (digital outputs Yellow,
Red, Green and Blue) can add to the fun. Build a separate,
independent flowchart to control these lights. You do not need to use the
input since these lights should be attracting people’s attention the whole
time. It might be interesting to use subroutines of different light
sequences called (invoked) by the main flowchart to give variety to the
light sequence.
Start
Is
Button1 on?
Is
Button1 off?
YES
NO
YES
NO
F L O W O L 4 T U T O R I A L
6
Activity 4
For this activity, you need to use the right button (Button2) to
open and close the mechanical Doors on the cups. Create this
subroutine to open the doors, and a similar one to close the
doors. Now produce another separate flowchart (thread) to
use these subroutines.
Activity 5
For safety reasons perhaps the doors should only be allowed
to open if the ride is stationary (e.g. if Button1 is off). Also
the doors should close automatically if the ride is started with
them open.
Make changes to your flowchart to add these safety features.
Activity 6
It is useful to get off the roundabout at the same
place where you got on. On the front of the turntable
is a virtual input (named Switch) which is turned on by
the triangle on the turntable.
Modify your flowchart so the ride stops at the right
place when it is turned off.
Extension Ideas
• How can the virtual input, Switch, make the door opening procedure
even safer?
• What other use can you think of for the virtual input Switch?
• How could you use power control of the turntable motor to make the
ride more realistic?
• Use the Sound feature of Flowol to include sound in your solution.
Sub DoorOpen
Turn Doors fd
Delay 2
Turn Doors off
Stop
F L O W O L 4 T U T O R I A L
7
The Pirate Ship
This Pirate Ship can be made to do exciting movements, but the theme
park owner and safety inspectors would not allow them. Since you are the
software engineer you need to create a control program which produces a
thrilling, but realistic and safe ride.
Open the Pirate Ship
mimic and use the
Status Panel to
explore what the
mimic can do.
The Doors Sw and
Steps inputs (the
yellow triangles) are
virtual inputs and
are triggered by the
ride.
Activity 1
To get the ship swinging we need to keep changing the
motor direction about 0.7 seconds after the ship has passed
its mid position.
Build and complete the Swing subroutine to
reverse the Ship motor 0.7 seconds after
the ship starts moving.
After it has swung back through the mid
position (Steps input on), make the motor
go forward again 0.7 seconds later. Adjust
the 0.7 seconds value if needed.
Now use the Button1 digital input and build
the main flowchart to call (invoke) the
Swing subroutine.
Sub Swing
Turn Ship fd
Delay 0.7
Is Steps on?
Delay 0.7
Is Steps on?
Stop
YES
NO
YES
NO
Start
Is
Button1 on?
Sub Swing
Is
Button1 off?
Turn Ship off
YES
NO
YES
NO
F L O W O L 4 T U T O R I A L
8
Activity 2
The next task is to operate the passenger doors in the side of the ship.
Create two subroutines to open and close these doors (Doors motor) and
build a second main flowchart which uses Button2 to call (invoke) the doors
subroutines.
Activity 3
After running your programs from activities 1 and 2 together, you may
have observed a dangerous safety issue! What is the problem?
Overcome this safety issue by controlling all the subroutines with just one
main flowchart.
Extension Ideas
• Add some sound to your ride.
• Gradually increase and decrease the speed of the swing. [Hint: build
two more subroutines changing the speed (power %) of the motor in
stages].
• Improve the safety by ensuring the doors are closed (Door Sw input)
before the ship can start to move.
• (Advanced: Use variables to smoothly increase/decrease the speed
and extent of the swing of the pirate ship for a very realistic ride).
F L O W O L 4 T U T O R I A L
9
Grabber Game/Claw Game (Two button version)
To begin with, use this mimic in its default, two button, configuration.
Open the Grabber Game/Claw
Game mimic and use the Status
Panel to see how the mimic
behaves.
The mimic has 4 motors. MoveY,
MoveX and Extension move the
grabber. The Claw motor opens
and closes the fingers of the
claw.
Inputs Forwards and Right are
push buttons which stay on while
the mouse button is held down
(or use the arrow keys on the
keyboard).
The Grab input is a virtual
sensor which is on if a teddy
bear has been caught.
Activity 1
Build this subroutine to move the hoist forwards. Build
another subroutine to move the hoist to the right.
A third subroutine (named Home) is now needed to return
the hoist to its near, left position. [hint: reverse both
motors for about 2 seconds].
Now construct a main flowchart which calls (invokes) these
subroutines when a coin is placed in the slot (Coin Slot
input).
Activity 2
Construct 4 more subroutines to open, lower, close and raise
the grabber/claw and include them into your main flowchart
to complete the game.
Sub Move Forw
Is
Forwards on?
Turn MoveY fd
Is
Forwards off?
Turn MoveY off
Stop
YES
NO
YES
NO
F L O W O L 4 T U T O R I A L
10
Grabber Game/Claw Game (Four button version)
Now click on the Mimic
Options button in the Status
panel to set the mimic to use Four Buttons.
Now there are 4 directional inputs:
Forwards, Backwards, Left and
Right.
Activity 3
Extend the solution in activity 2 by
adding backwards and left control
to the hoist. Modify the main
routine to move the hoist with the
buttons Forwards, Backwards,
Right and Left in this order.
This gives the player an
opportunity to correct if they
overshoot the location of their
target teddy bear.
Activity 4
The 4-button game normally runs a
little differently. It allows the
player to push any of
the 4 buttons in any order, for a pre-determined time limit
before the grabber drops and attempts to grab a bear.
We therefore need a timer to interrupt the player operating
the buttons. First add the Variables to you flowchart by
pressing the button at the top-right of the Flowol window.
Then, add this flowchart to your workspace. Once the Coin
Slot is activated, it increases the variable x at 1 second
intervals to a maximum of 6.
Modify your main routine to allow the buttons to be pressed in
any order until the time limit is reached, after which the
grabber lowers to see if a bear has been won.
Start
Is
Coin Slot on?
Let x = 0
Delay 1
Let x = x + 1
Is x = 6?
YES
NO
YES
NO