Hi everyone,
I’m currently trying to transfer a project from Siemens TIA Portal to B&R Automation Studio 6.x, and I have a few questions regarding function block organization, variable scope, and program execution.
1. How should I structure and call function blocks in B&R?
In my TIA Portal project, I have several FBs, such as Robot, Robot_Input, and Robot_Output. These FBs are called from the Main block, which coordinates the overall program execution.
What would be the recommended way to implement a similar structure in B&R Automation Studio?
Specifically:
-
How should I organize these FBs and their associated variables in B&R?
-
What is the recommended approach for managing variable scope, such as global variables versus local variables or FB instance variables?
-
Should I create separate programs or function blocks for
Robot,Robot_Input, andRobot_Output, and then call them from a main program? Or is there a more idiomatic B&R approach?
2. Execution order of programs within the same cyclic object
If I assign multiple programs containing _CYCLIC sections to the same cyclic object (for example, Cyclic #1), are these programs executed sequentially in a defined order during each cycle, or can they execute asynchronously or in parallel?
For example, if Robot_Input updates some variables and Robot reads those variables in the same cycle, can I rely on Robot_Input executing first, so that Robot reads the updated values?
If execution order is configurable, where can I configure or verify it in Automation Studio 6.x?
I would appreciate any recommendations, examples, or documentation for structuring a B&R project in a way that is conceptually similar to a typical Siemens TIA Portal project.
Thanks in advance for your help!


