CODESYS 3.5 - PLC Programming With Structures - Lesson 14 - Using Temporary Structures
Автор: Liam Bee
Загружено: 2025-11-25
Просмотров: 4
Описание:
🔹This course is from 2023 and is now free. You can still access it ad free at https://liambee.me
if you become a member or purchase the course.
🔹Downloadable content for this course is available here for free:
https://liambee.me/codesys-structured...
In this lesson we look at how to create temporary instances of structures and how to populate them with data so you can reuse existing function blocks in new contexts. This is a simple concept but a very powerful one when you are building large structured systems.
The example in this lesson uses two structures: the main product structure and a calculated product structure. Under normal conditions the system reads live sensor data into the real product structure. When the sensors are not active, we switch to a temporary structure inside the program and manually populate it with values. The same function block is then used to check specifications regardless of where the data originated.
This technique is incredibly useful when you already have a proven, tested function block that expects a very specific structure. Rather than rewriting new logic or building a new FBD or ST routine, you can pack equivalent data into a temporary instance of that structure and make use of the existing block. It saves time, maintains consistency and avoids duplicating logic.
The lesson also highlights real world use cases. For example, a totaliser designed for a flow meter can still be used for other analogue sources by packing the required information into a temporary flow meter structure. Instead of reinventing the wheel, you populate the structure with whatever values the block needs and reuse your existing and reliable logic.
By the end of the lesson you will understand how to assemble structured data dynamically, how to switch between real and calculated values and how to use temporary structures to support functionality that would otherwise require new blocks. It is a simple but important pattern that helps keep your projects clean and maintainable.
#AlwaysLearning #Automation #Codesys #PLC #HMI
Повторяем попытку...
Доступные форматы для скачивания:
Скачать видео
-
Информация по загрузке: