The Startup OB runs once, the first time the PLC changes from STOP to RUN. Once it has finished running, the PLC continues to run other OBs as normal.

🎯What’s In This Post?

❓When To Use?

You can use the Startup OB to initialize areas of your project, such as:

  • Alarms
  • Diagnostics
  • Sequences

This is a great way to ensure that your project is in a safe state, or that globally used variables are set to the correct values before anything in the project uses them

🔎Example

1️⃣PLC in STOP Mode

Example of Startup OB100

The above image shows a Data block called Project_Data and the Startup OB.

The Start Value for the variables in the data block are set to values that we want to clear (for example purposes)

Looking at the Monitor Value, we can see that the Sequence_Step is set to 20, the Diagnostic_Word is set to 16#0000_FFFF and the Start_Time is set to DT#1990-01-01-00:00:00

2️⃣PLC Changes To RUN Mode

OB100 updates Project_Data

The Project_Data is now updated with information due to the execution of the Startup OB.

🤔Considerations

Remember that the Startup object only runs when the PLC changes from STOP to RUN.

This does not happen when downloading to the PLC unless TIA Portal explicitly states that the PLC is being stopped. It will not execute when a normal download takes place that does not cause the PLC to stop


Check Out Another Post

Leave a Reply