Kkula
Browse Questions » STEP 7 / STEP 7 Lite: Fc/fb only called Within Ob1?

About User

Questions Asked: 37.9K

Answers Given: 32

0
  • Open

STEP 7 / STEP 7 Lite: Fc/fb only called Within Ob1?

I need clarification on the calling of FBs and FCs in OB1, Is it alawys a must that FBs and FCs should be called in OB1 in every written program, I have seen a Program where FBs and FCs are not called in OB1, Please help.
------------------------------------------------------------------------------------------
Split from
Call FCs from Ob1
.

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

Calling FBs & FCs in OB1 - Clarification

No, it is not always mandatory to call FBs and FCs directly within OB1. OB1 is the main cyclic execution block, but program organization doesn't *require* all logic to reside there.

Here's why you might see programs without direct FB/FC calls in OB1:

  • Hierarchical Structure: FBs can call other FBs and FCs, creating a hierarchical structure. OB1 might only call a few 'top-level' FBs, which then manage the rest of the logic.
  • Event-Driven Programming: Some FBs/FCs might be called indirectly through interrupts (OB35, OB36, etc.) or via hardware triggers, bypassing direct OB1 calls.
  • Modularization: Breaking down the program into reusable FB/FC blocks improves maintainability and reduces complexity in OB1.

Best Practice: While not *required*, OB1 typically contains calls to FBs that perform essential, continuous tasks. However, a well-structured program will distribute functionality appropriately across multiple blocks.

For more detailed information, please refer to the Siemens documentation on OB1 and FB/FC organization: OB1 - Organization Block

0