How to Create a 3-Second LED Blinking Program in TIA Portal with S7-1200 PLC



If you’re learning automation or working on a PLC project, creating a 3-second LED blinking program in TIA Portal is a great place to start. This step-by-step guide will walk you through the process in simple terms, helping you configure and simulate the program on an S7-1200 PLC.


Step 1: Start TIA Portal and Create a New Project

  1. Open TIA Portal and click on "Create New Project."

  2. Give your project a name, for example, LED_BLINKING_3SEC, and click "Create."


Step 2: Add a New Device

  1. Navigate to the Device Configuration section.

  2. Click on "Add New Device" and choose:

    • S7-1200

    • Model: 1215C DC/DC/DC

  3. Click "Add" to include the device in your project.





Step 3: Configure PLC Tags

  1. In the project navigation pane, go to the PLC Tags section.

  2. Add the following tags:

    • START: Input, Address I0.0

    • LED: Output, Address Q0.0

    • MEMORY: Memory Bit, Address M0.0

These tags will help you control and monitor the program.


Step 4: Program the Logic in the Main Block



  1. Open the Main OB1 Program Block.

  2. Drag and drop the following elements:

    • NO Contact (Normally Open) for the START input (I0.0).

    • A Pulse Timer (TP) from the timers library. Connect the NO contact to the TP timer.

    • Set the timer's preset time to 3 seconds.

    • Add an Output Coil and connect it to the LED (Q0.0).

    • Create a branch and add a NC Contact (Normally Closed) for the timer to ensure the OFF state.

    • Add an Output Memory Bit (M0.0) to alternate states for further logic control.

  3. Ensure all elements are connected correctly and verify the timer’s behavior.


Step 5: Compile the Program

  1. Click on the Compile button in the toolbar.

  2. Check for any errors in the program. If there are errors, resolve them and recompile.


Step 6: Run the Simulation

  1. Switch to Simulation Mode by enabling the simulator in TIA Portal.

  2. Open the Simulation Table and add the following tags:

    • I0.0 (START)

    • Q0.0 (LED)

    • M0.0 (MEMORY)

  3. Start the simulation and toggle the START button to test the program.

Watch as the LED turns ON for 3 seconds and then OFF for 3 seconds, repeating continuously.


Conclusion

Congratulations! You’ve successfully created and simulated a 3-second LED blinking program in TIA Portal. This project is an excellent foundation for more advanced automation projects. Keep experimenting and learning!

If you found this guide helpful, don’t forget to share it with your fellow engineers and students. For more tutorials like this, stay tuned to Easy Electra!

Post a Comment

Post a Comment (0)

Previous Post Next Post