Airplane Landing Gear

From Flowcode Help
Jump to navigationJump to search

Aeroplanes are some of the most sophisticated systems, consisting of hundreds of electronic, mechanical and hydraulic parts all combined.

In this series of worksheets you will begin to develop a high-level program to deploy and retract an aeroplanes landing gear. Despite being powered by large and expensive hydraulic systems, the landing gear of an aeroplane is a system that will be controlled by a small, yet powerful, microcontroller.

ALG1.jpg


Exercise 1

The safety systems in aeroplane landing gear is critical. Landing gear doors feature locks to ensure they cannot be opened accidentally and cause damage by unexpected opening.

Create a flowchart that will lock/ unlock the door locks when appropriate switches are pressed. To do this you will need to use the door unlocking/ locking component macros.


Tasks

  • Create a new flowchart, and select ‘No chip’ as the target device. We choose no chip as this is a simulation only exercise.
  • Add the ‘Airplane Landing Gear’ component to the 3D Panel, from the ’Simulation -> Scenarios’ category.
  • Add two ‘Simulation Push Switch’ components to the 2D Panel, from the ’Simulation’ components category.
  • Rename the simulation switch components to LockOpenSw and LockCloseSw by editing the Handle section of the properties window.
  • Add a ‘Component Labels’ component to the 2D Panel from the ’Shapes -> Advanced Shapes’ components category.
  • Edit the component labels properties so that Show = Names, Auto Update = Yes, Auto Target = Yes.
  • Create a variable of type ‘Bool’ named SwitchValue to save the state of the switch presses.
  • Add a loop to your program to loop forever and add component macros to read the state of the switch and store into the variables.
  • Use the component macros ‘FrontDoorLocks’ and ‘RearDoorLocks’ to unlock and lock the doors.
  • Note, you should see the small door locks rotate around when unlocked/ locked.
  • You will need 4 switches to open/ close the front and rear door locks independently.


Working Example

Below you will see a working example to open and close the rear door locks only. You should create a program that allows both doors to be locked/ unlocked independently.

FC6 Icon.png Landing Gear - Worksheet 1

ALG2.jpg


What to do next

Create a flowchart program that opens both the front and rear door locks with one single switch. If the switch is pressed, it opens both locks. If it is pressed again it should close both locks.


Exercise 2

In this exercise you will program the opening and closing of both the front and rear doors of the landing gear. Momentary switches should be used to control either the front or rear doors. You will need to make use of the limit switches in the simulation, to determine when the doors are fully open or fully closed. You should ensure that the program limits the doors opening and closing if the locks are in place.


Tasks

  • Open the flowchart from Ex1 and continue working from there.
  • Add more switches to the simulation panel to allow you to now control the front and rear doors alongside the locks.
  • You will need to use the appropriate component macros to operate the doors, and also determine whether the front and rear doors are fully open/ fully closed.
  • Use the component macros;
    • Front/ RearDoorCloseSwitch
    • Front/ RearDoorOpenSwitch
    • Front/ RearDoors


Working Example

Below you will see a working example to open and close the door locks and open and close the doors.

FC6 Icon.png Landing Gear - Worksheet 2


What to do next

Once you’ve completed the above activity, you could expand on this by adding feedback systems to show the status of the landing gear locks and doors. Use LEDs to alert the user of their status.


Exercise 3

In this exercise you will now also control the landing gear of the plane. You will have to implement previous techniques to control both the opening and closing of the doors, and the locking mechanisms. Ensure that once the landing gear is open, you can close only the front doors, leaving the rear doors open.


Tasks

  • Open the flowchart from Ex2 and continue working from there.
  • Add the necessary switches to the simulation panel to allow you to control all 3 elements;
    • Door locks
    • Doors
    • Landing gear
  • Create a program that allows the user to combine all elements learned so far. You must first, unlock the doors, then open them. Once opened you should lower the landing gear and close the rear doors ONLY.
  • You should also be able to reverse the process to retract the landing gear correctly.


Exercise 4

You will note that you now have many switches to control the landing gear. In this final exercise you should automate the control of the landing gear to work at the press of a single switch. Once pressed, both doors should unlock, open and the landing gear retract. The rear doors should then close. When pressed again the reverse sequence to retract the landing gear should execute. Use 3 LEDs to alert the pilot of the status; open, closed and in progress


Tasks

  • Continue from Ex3
  • Remove all switches, except one.
  • Create a program to operate the landing gear as described above.
  • Add 3 LEDs to the simulation panel to allow you to notify the user of the current system status.
  • Note, you must create the necessary variables to allow your program to know its current state