web viewwhen it hits trip c we want it to reduce the speed of the train as it passes the platform....
TRANSCRIPT
Train SimulationTask 1: Making the train move.
There are 2 inputs (Input 1 and Input 2). We will be using INPUT 1 to control the train. When INPUT1 has been pressed the train should move forward (clockwise) around the track.
You need to create a flow chart like this
Rules
IF input 1 has been turned on
THEN the train motor will be set to forward
ELSE keep checking
Extension:
1. Add a 2nd output symbol to the flow chart so that once the train is moving forward the forward lights are switched on.
2. Add a 2nd decision to test whether input 1 has been switched off. If it has, the train should stop and the lights go out.
Train SimulationTask 2: Making the barriers open and close
In the simulation there are several trip points. These are sensors which sense when the train is passing. We will use trip A to sense if the train is coming.
You need to create a flow diagram like this
Rules
IF trip A on
THEN close barriers
ELSE
IF trip D on
THEN open barriers
LOOP
Extension
Create a sub routine for the flashing lights at the crossing. These should flash when the train is approaching and stop when the train has passed. Add the sub routine to the button of the flow chart you have created.
Train SimulationTask 3: Making the train slow down as it approaches the platform
We can control the speed of the motor. When it hits trip C we want it to reduce the speed of the train as it passes the platform. When it hits trip D it will speed up again
Rules
IF trip C on
THEN Reduce motor speed to 20%
ELSE
IF trip D on
THEN increase motor speed to 100%
Extension
1. Use the same flow chart layout to control the interior lights in the train. When the train enters the tunnel the interior lights should go on. As soon as the train leaves the tunnel the lights should turn off.
2.
Rules
IF trip E on
THEN interior lights on
ELSE
IF trip A on
THEN interior lights off
Train SimulationTask 4: Extension
There are a number of things that you can do to improve your train simulation
1. Make your train stop when it reaches the station. Remember you have another input that you haven’t used(input 2)
2. Make the train go clockwise and anticlockwise. Instead of the train stopping when input 1 is switched off, it can go backwards instead.
Train Simulation 2Open the mimic called Train Set 2
There are lots of similarities including
The tunnel – Program the lights to go on and off
The barrier and lights – the barrier should close and the lights flash as the train approaches
But there are some of differences
There are now 2 trains. You need to program them to move around the circuit together. If they bump into each other the program with stop.