Kkula
Browse Questions » STEP 7 (TIA Portal): Safety Software execution Duration

About User

Questions Asked: 37.9K

Answers Given: 32

0
  • Open

STEP 7 (TIA Portal): Safety Software execution Duration

I have a 1512-F cpu that runs at a cycle time of about 5ms. This cycle time is normal for the amount of code in OB1.
This PLC communicates with 3 other PLCs over F-link.
The F-runtime group is set to run every 200ms.
The safety program contains around 15 EMS block instances and a few bit logic networks, so nothing special. In the CPU diagnostics i can see that the current runtime for the safety program is around 28ms. This is a lot, especially compared to the amount of code in the safety program.
in the cycle and response times manual i can see a normal bit operation for a 1512-F cpu takes around 48ns. 
https://support.industry.siemens.com/cs/ww/en/view/59193558
I was wondering if bit operations take longer in the safety program but i can't find any information about this?
Ideally i'm looking for a solution that shortens the safety cycle time, any questions or tips are welcome.
All safety code is programmed according the Siemens guidelines.

0 Likes 0 Favourites 0 Followers 0 Comments
Answers(1)

Safety Program Runtime Analysis - 1512-F CPU

You're observing a higher-than-expected runtime (28ms) for your safety program on the 1512-F CPU, despite a relatively small code size. This is a valid concern, especially given the fast base cycle time (5ms) and typical bit operation speed (48ns as per Siemens documentation).

While bit operations shouldn't inherently take longer within the safety program, the safety execution environment introduces overhead. Several factors could contribute to the 28ms runtime:

  • F-link Communication Overhead: The communication with 3 other PLCs over F-link, even with a 200ms runtime group, can introduce significant latency and impact the safety program's execution, as safety checks might be triggered by or dependent on F-link data.
  • EMS Block Overhead: 15 instances of EMS blocks, while not complex individually, can accumulate overhead due to internal safety checks and data handling.
  • Safety Program Structure: Even with adherence to Siemens guidelines, the *way* the safety program is structured can affect runtime. Complex logic or unnecessary calculations can add to the execution time.
  • Diagnostic Overhead: The CPU diagnostics themselves contribute to the cycle time.

Recommendations:

  1. Monitor F-link Load: Analyze the F-link communication load during the safety program execution. High load can directly impact safety runtime.
  2. Optimize EMS Block Usage: Review each EMS block for potential simplification or consolidation.
  3. Code Profiling: Use the TIA Portal's profiling tools (if available for safety code) to identify specific sections of the safety program consuming the most time.
  4. Check Task Priority: Confirm that the safety program task has the highest priority and isn't being preempted by other tasks.
  5. Siemens Support: If optimization efforts don’t yield sufficient improvement, consider opening a support request with Siemens, providing the TIA Portal project for detailed analysis.

To provide more targeted advice, could you share information about the nature of the EMS blocks and the specific data exchanged over F-link?

0