Procedure

                                        PLC SET UP
Hardware set up:
1. Set the DIP(Dual Inlie Package) switch to 0100 reading.
2. Connect PC/PPI cable to the serial ports of the PLC and the computer.
3. Plug in the power cord of PLC.
4. On the PLC, set the CPU mode switch located under the access door to the "stop" position.
             ***Note: THE YELLOW "STOP" INDICATOR LIGHT SOULD BE ON***
5. Insert the input simulator into the input terminals of the PLC and tighten with screwdriver.
        a. Check connections: if the first switch of the input simulator is on, the I0.0 green indicator light should be on.
        b. Check all switches. Afterwards, turn off all switches.

Software Set up:
1. In the start menu click "programs". Next, click the simatic icon and open up the program: Step 7-microwin.
2. In the center colun, right click "Project 1" and select "type".
3. Change the CPU settings to CPU-212 and the CPU version to 01.10. Click OK.
          ****This step should be done every time when you write a new program****
4. Saving Project: Under "File" in the toolbar, select the "Save As" command, select the document file, then type your file name and click the "Save" button.
          
1. After connecting the PLC and computer using the PC/PPI cable, open the software-Step 7-Microwin.
2. Open a new project.
3. Using ladder diagram, and scimatic table write your program.
4. After, the program is written, download the program in PLC.

How to download the program to PLC?
1. On the PLC, turn the CPU mode switch to "stop" position.
2. On the computer, click the file tab in the toolbar click "Download".
3. Click the download button located in the window.
4. The button window will indicate weather or not the downoad was successful.
5. Using the CPU mode switch, place the PLC in the "run" mode.
6. Under Debug "Debug" in the toolbar click "Progrsam Status". Turn off the use execution status button if it is checked.
7. Test your program.

Ladder Diagram:
buzzer_D = (motion_sensor_A + light_sensor_B + light_sensor_C) . emergency_switch_E
Laser is reflected by mirrors and is connected to all the sensors. If the light is disconnected and the emergency switch is ON, the alarm would go on.
The emergency switch is a basic toggle switch which is used to turn off the alarm after being activated. All the sensors are connected in parallel connection, and emergency switch is conected in series with the sensors.