I am seeking assistance to understand the functionality and configuration of my PCS setup. Specifically, I have created an FB101, a global DB101, and a UDT101 within the PCS. The DB101 utilizes the UDT101 struct, and the FB101 STAT variables also reference the UDT101 struct. It seems that FB101 is being called alongside the global DB101 within the PCS environment. When I input data into these stat variables in FB (e.g. = #sequence.bool01), it is reflected in the global DB. I am interested in learning how to achieve this process manually. Despite attempting to write "call fb101, db101," it appears in red italics. Can anyone provide guidance on this matter?
To enhance the functionality of your system, consider adding an Input/Output (IO) pin to the Function Block (FB) and defining it through a User-Defined Type (UDT). Create a Database (DB) with a structure determined by the UDT, and when invoking the FB, transmit the DB structure through the pin. Remember to establish a separate instance-DB instead of using the shared DB. Another option is to convert the FB to a Function Code (FC) and exclusively handle the data transmitted via the IO pin. By implementing these strategies, you can streamline your processes and optimize performance.
Thank you for the response. I comprehend your explanation and agree that it is possible to achieve the desired outcome in that manner. However, the PCS appears to employ a distinct method as the IO pin remains unutilized. Additionally, I am unable to locate any IDBs either offline or online (unless they are hidden from view in some way?).
The compiler is indicating the importance of not using a global database (DB) when calling a function block (FB), and instead, utilizing an instance DB. While an FB can accept input from another DB or its elements, it must have its own instance DB. A user-defined data type (UDT) is essentially a structured datatype. Before utilizing a UDT, you must define an instance of it within a DB. This DB can either be global or part of an FB definition. Essentially, an FB definition can be seen as defining another structured datatype of type FB. When calling an FB, it is necessary to provide an instance of this structured datatype (an instance DB). In your scenario, the FB must first be defined with the required tags and symbols in the declaration area, followed by creating a new DB as an instance of the FB type. This newly created instance DB can then be used in the FB call.
When you refer to 'PCS', are you referring to PCS7 software? I don't have much experience with PCS7, but it's possible that PCS7 generates STL code using higher-level language and building blocks such as GRAPH and CFC. These automatically generated blocks may be hidden and not meant to be directly manipulated in STL.
Thank you, @joseph_e2, for your response and explanation. I have been trying to understand the absence of any instance DB-s in both my offline and online projects. It seems that unless they are hidden, they do not exist in either project. @JesperMP, when I refer to PCS, I am talking about a Process Control System used in various industries, including large beverage factories. This system plays a crucial role in controlling processes and includes a configurator to set up valves, pumps, equipment, and more.
It sounds like you're trying to map the instance DB (DB101 in this case) to an FB (FB101 here). To do that, you need not input "fb101, db101" directly. Instead, you should initialize the FB with a specific DB by including the DB number in your call statement like, "FB101, DB 101". Also, remember that in PCS7, blocks FB, FC, DB etc. should be declared in the OB where the PCS7 program is located, by using their block numbers (not names). And don't forget to Compile -> Hardware (Rebuild all) after this procedure. The red italics you're seeing likely indicate errors in your assignment - maybe due to a type mismatch or incorrect format. As you said, the stat variables in FB reference UDT101, so you need to ensure fields from DB101 match the UDT101 structure. Good luck!
✅ Work Order Management
✅ Asset Tracking
✅ Preventive Maintenance
✅ Inspection Report
We have received your information. We will share Schedule Demo details on your Mail Id.
Answer: 1. What is the purpose of using a global DB in Siemens Step 7? - The global DB in Siemens Step 7 allows for sharing data between different function blocks and components within the PCS setup.
Answer: - To configure a global DB for use by a function block, you can define the structure of the DB and reference it in both the DB and the function block.
Answer: - The call to a function block alongside a global DB may appear in red italics if there is an error in the syntax or configuration. Check for any mistakes in the function block call statement.
Answer: - To manually update data in the global DB through a function block, ensure that the function block is designed to reference the global DB and that the data manipulation is correctly implemented within the function block.
Join hundreds of satisfied customers who have transformed their maintenance processes.
Sign up today and start optimizing your workflow.