Kkula
Hello,
I want to do universal solution for making some technological process. I want to have recipe, for example like this:
Recipe name
Sugar [kg]
Sirup [litres]
Cola
2
1
Pepsi
1
1
..
..
..
I want to have recipe inside PLC and i want watch(read) recipe, add new(write) recipe, delete bad recipe,see whole list of recipes from S7 1200 web server & 3rd party HMI. 3rd party HMI posibilities are read/write PLC tags (I,Q,M) and Program blocks ( User_data_type_1_Classic[DB1], User_data_type_1_Retain[DB1], User_data_type_1_Volatile[DB1] )
Some good idea?
Karel Fryd, Czech Republic
Hello Karel,
For a universal recipe solution in your S7-1200 PLC, consider utilizing a structured data type to represent your recipes, stored within a Data Block (DB). Here’s a recommended approach:
Define a UDT in TIA Portal that mirrors your recipe format (Recipe Name, Sugar [kg], Syrup [litres], Cola, Pepsi, etc.). Use appropriate data types for each ingredient (REAL for kg/litres, INT for quantities).
Create a DB (e.g., DB1) to store an array of your recipe UDT. The size of the array determines the maximum number of recipes you can store. Consider a 'RecipeCount' tag (INT) within the DB to track the number of valid recipes currently stored.
Utilize the S7-1200's built-in web server to create web pages for recipe viewing, adding, and deleting. You’ll need to map PLC tags (your 'RecipeCount' and the recipe array) to web HMI elements (tables, input fields, etc.).
Leverage your HMI’s ability to read/write PLC tags and access DBs.
This approach provides a flexible and scalable solution for managing recipes within your PLC. Remember to consider error handling and data validation within your PLC logic to ensure data integrity.
Best regards,
Siemens Self Support
Our flexible community website is a platform that allows users to connect, share information, and collaborate on various topics of interest. The website offers a range of features such as discussion forums, messaging, user profiles, event calendars, and more. Users can customize their experience by creating and joining different groups or communities based on their interests or location. The website is designed to be user-friendly and adaptable to the needs and preferences of our diverse user base. Whether you are looking to network professionally, share hobbies and interests, or simply connect with like-minded individuals, our flexible community website has something for everyone. Join us today and become a part of our thriving online community!
India
Copyright ©2026
Share this page with your family and friends.