timohei.net / My Courses / Production Automation Project / Siemens S7 How-to / Multiuser Engineering /
TIA Portal Project Server and Modular Programming Tutorial
This guide provides an industry-standard approach to structuring a Siemens TIA Portal project and details the step-by-step workflow for collaboration using the TIA Project Server, as recommended by Siemens documentation.
Part 1: Industry-Standard Project Structure (Modular Programming)
Adopting a modular structure is essential for team projects to ensure readability, scalability, and maintainability. This structure relies heavily on Function Blocks (FBs), data organization, and a clean main program (OB1).
1. Program Block Types and Usage
The standard programming concept in TIA Portal uses FBs and FCs for specific purposes:
- Function Block (FB): Recommended for all reusable equipment/machine modules.
- Key Feature: Retains its memory (Instance Data Block, DB) between scans.
- Purpose: Used for components that need to track a state (e.g., Motor, Valve, Drive). Each physical component gets a unique instance of the FB to store its own status and data.
- Function (FC):
- Key Feature: Stateless (no persistent memory).
- Purpose: Used for simple, non-state-dependent tasks, such as unit conversions, mathematical calculations, or signal conditioning.
2. The Role of OB1 (Main Cyclic Organization Block)
The Organization Block 1 (OB1) manages the program's execution flow. It must be kept clean to simplify troubleshooting.
- What to put in OB1: Only a structured, sequential list of calls to your main organizational FBs.
- Best Practice: Create high-level FBs (e.g.,
FB_Machine_Modules
,FB_Global_Tasks
). OB1 calls these blocks, and they, in turn, use Multi-Instance calls to execute the specific, low-level equipment FBs (likeFB_Motor_1
).
3. Tag and Data Organization
Consistent data structuring is paramount for team efficiency:
Element | Purpose | Industry Standard |
---|---|---|
User-Defined Data Types (UDTs) | Defines a common data structure for a type of component (e.g., UDT_Motor includes Start, Stop, Running_Sts, Fault_Code). |
Use UDTs extensively for FB interfaces and Global DBs to maintain consistency. |
Global Data Blocks (Global DBs) | Stores system-wide or shared data. | Store configuration parameters (e.g., DB_Config ) or HMI setpoints (e.g., DB_HMI_Data ). |
Instance Data Blocks (Instance DBs) | Automatically generated memory for a specific FB call. | Stores the current state of a component (e.g., Motor_M1's running status). |
Source Reference: Siemens Industry Online Support often details these best practices in their programming guidelines and application examples. Multiuser Engineering with TIA Project-Server (Siemens Document)
Part 2: Multiuser Collaboration Workflow (Client Side)
Assuming the TIA Project Server is set up and the initial project is uploaded with a unique server project for each group (A01, B01, etc.), follow these steps for collaborative work.
Step 1: Connect to the Project Server (Initial Setup)
- Open TIA Portal.
- Go to the main menu and select Options > Settings.
- Navigate to the Project server tab.
- In the Connections section, click Add server connection and enter the server's network name or IP address and the correct port (default is 443).
Step 2: Create Your Local Session
Each student creates an independent local copy of the server project.
- Go to Project > Project server > Manage server projects.
- Log in with your assigned Windows or local user account that has permissions for your group's project (e.g., A01).
- Select your project (e.g., "A01").
- Click Create local session and choose a location on your local computer to save your working copy.
- Open this new local session to begin working.
Step 3: Mark Objects for Editing (Checking Out)
Before modifying an object (Block, HMI Screen, Tag Table, etc.), you must reserve it.
- In the Project Tree of your local session, locate the block you are assigned to (e.g.,
FB_Valve_V1
). - Right-click the object and select Multiuser > Mark for editing.
- A blue flag icon [⚑] appears next to the object, confirming you have reserved it.
- Note: Other students will see a yellow flag [⚑] next to the object when they refresh, indicating it is locked by another user.
Step 4: Check-in Changes (Saving to the Server)
Once your assigned task is complete and tested (compiled without errors), check your changes back into the server.
- Click the Check-in button in the Multiuser toolbar (or go to Project > Project server > Check in).
- The Multiuser editor window opens, listing all objects you have modified.
- Crucially: Enter a detailed Comment describing what you changed (e.g., "Implemented safety logic for Valve V1 and updated HMI tag").
- Click Start check-in. Your changes are saved to the server and the objects are immediately released for other users.
Step 5: Refresh Local Session (Getting Others' Changes)
Periodically refresh your session to get the latest contributions from your teammates.
- Click the Refresh local session button in the Multiuser toolbar.
- The Multiuser editor displays all changes recently checked in by your teammates.
- Click Start refresh to download and integrate these changes into your local session.
Note on Conflicts: If you and another student modify the same object simultaneously, the Multiuser editor will display a red flag [⚑], indicating a conflict. You must manually resolve this within the editor before a check-in or refresh can be completed.
Source Reference: For a full overview of the Multiuser process, consult the Siemens documentation: Introduction to Multiuser Engineering (TIA Portal Documentation)