1) When the lights are turned off in a building, an exit door light is to remain on for an additional 2 min, and the parking lot lights are to remain on for an additional 3 min after the door light goes out. Write a program to implement this process.
2) Write a program to implement the process illustrated in Figure 1. The sequence of operation is to be as follows:
- Normally open start and normally closed stop pushbuttons are used to start and stop the process.
- When the start button is pressed, solenoid A energizes to start filling the tank.
- As the tank fills, the empty level sensor switch closes. When the tank is full, the full level sensor switch closes.
- Solenoid A is de-energized.
- The agitate motor starts automatically and runs for 3 min to mix the liquid.
- When the agitate motor stops, solenoid B is energized to empty the tank.
- When the tank is completely empty, the empty sensor switch opens to de-energize solenoid B.
- The start button is pressed to repeat the sequence.

3) Write a program to implement the process illustrated in Figure 2. A company that makes electronic assembly kits needs a counter to count and control the number of resistors placed into each kit. The controller must stop the take-up spool at a predetermined amount of resistors (100). A worker on the floor will then cut the resistor strip and place it in the kit. The circuit operates as follows:
- A start/stop pushbutton station is used to turn the spool motor drive on and off manually.
- A through-beam sensor counts the resistors as they pass by,
- A counter preset for 100 (the amount of resistors in each kit) will automatically stop the take-up spool when the accumulated count reaches 100.
- A second counter is provided to count the grand total used.
- Manual reset buttons are provided for each counter.

4) Write a program to implement the box-stacking process illustrated in Figure 3. This application requires the control of a conveyor belt that feeds a mechanical stacker. The stacker can stack various numbers of cartons of ceiling tile onto each pallet (depending on the pallet size and the present value of the counter). When the required number of cartons has been stacked, the conveyor is stopped until the loaded pallet is removed and an empty pallet is placed onto the loading area. A photoelectric sensor will be used to provide count pulses to the counter after each carton passes by. In addition to a conveyor motor start/stop station, a remote reset button is provided to allow the operator to reset the system from the forklift after an empty pallet is placed onto the loading area. The operation of this system can be summarized as follows:
- The conveyor is started by pressing the start button.
- As each box passes the photoelectric sensor, a count is registered.
- When the present value is reached, the conveyor belt turns off.
- The forklift operator removes the loaded pallet.
- After the empty pallet is in position, the forklift operator presses the remote reset button, which then starts the whole cycle over again.
