Популярное

Музыка Кино и Анимация Автомобили Животные Спорт Путешествия Игры Юмор

Интересные видео

2025 Сериалы Трейлеры Новости Как сделать Видеоуроки Diy своими руками

Топ запросов

смотреть а4 schoolboy runaway турецкий сериал смотреть мультфильмы эдисон
dTub
Скачать

CODESYS 3.5 - PLC Programming With Structures - Lesson 5 - Passing Structured Data Between Functions

Автор: Liam Bee

Загружено: 2025-11-25

Просмотров: 64

Описание:

🔹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 pass structured data to function blocks in Codesys. This is a key lesson in the course because this is where the real power of structures becomes clear. Once you understand how to move structured data through function blocks, you can start building cleaner, more scalable systems with far less repetitive work.

We begin by revisiting the setup from the previous lesson, but with the addition of a System structure that contains values relevant across the entire application, such as alarms active, emergency stop status, and timed pulses. These are the type of signals that many blocks may need, so grouping them in a structure makes them easy to share.

In the PLC program the logic from the previous lesson has been consolidated into a single PressureManager function block. Instead of many rungs and large interfaces, everything is now handled inside this manager. The key concept introduced here is passing structures using inout parameters. When passed this way, the structure is not copied. Only a reference is passed, which dramatically reduces memory usage, especially when working with larger structures.

Inside the PressureManager we see a scaling stage and a status stage. The scaling stage uses a dedicated AnalogScale function block which receives only a DUT_Analog structure. This keeps the interface small and lets the scale logic focus purely on scaling. The status stage uses another block, AnalogStatusManager, which receives both the DUT_Analog structure and the System structure to manage out of range alerts and capture timestamps using the system clock.

We also see that nested structure access becomes simple when passed by reference. For example, data.analog inside the PressureManager connects directly to the nested analog structure within the pressure instance. No copying takes place. The function blocks simply operate on the same underlying data.

A key benefit demonstrated in this lesson is that adding new elements to a structure immediately makes them available inside every function block that uses that structure. There is no need to edit dozens of interfaces. The function block expects a DUT_Pressure structure and any new variables inside that structure become available automatically, keeping your system consistent and scalable.

We finish by adding a second PressureManager instance and passing in the second pressure structure. Because the interfaces are standardised, creating new instruments becomes as simple as creating a new instance and connecting the structure.

By the end of the lesson you will understand how passing structures to function blocks keeps interfaces small, reduces memory usage, simplifies updates, and creates a highly reusable architecture for structured programming in Codesys.

#AlwaysLearning #Automation #Codesys #PLC #HMI

CODESYS 3.5 - PLC Programming With Structures - Lesson 5 - Passing Structured Data Between Functions

Поделиться в:

Доступные форматы для скачивания:

Скачать видео mp4

  • Информация по загрузке:

Скачать аудио mp3

Похожие видео

CODESYS 3.5 - PLC Programming With Structures - Lesson 6 - Why Use InOut Interfaces With Structures

CODESYS 3.5 - PLC Programming With Structures - Lesson 6 - Why Use InOut Interfaces With Structures

CODESYS 3.5 - PLC Programming With Structures - Lesson 13 - Evaluating & Dynamizing Types

CODESYS 3.5 - PLC Programming With Structures - Lesson 13 - Evaluating & Dynamizing Types

Как взломать любое программное обеспечение

Как взломать любое программное обеспечение

CODESYS 3.5 - PLC Programming With Structures - Lesson 8 - Standard & Bespoke Structures

CODESYS 3.5 - PLC Programming With Structures - Lesson 8 - Standard & Bespoke Structures

CODESYS 3.5 - PLC Programming With Structures - Lesson 12 - Managing Alarms In Structured Projects

CODESYS 3.5 - PLC Programming With Structures - Lesson 12 - Managing Alarms In Structured Projects

Как правильно соединять светодиоды по науке

Как правильно соединять светодиоды по науке

LLM и GPT - как работают большие языковые модели? Визуальное введение в трансформеры

LLM и GPT - как работают большие языковые модели? Визуальное введение в трансформеры

Основы Tableau для начинающих — Tableau за две минуты

Основы Tableau для начинающих — Tableau за две минуты

CODESYS 3.5 - PLC Programming With Structures - Lesson 16 - Structured And Good Commenting Practices

CODESYS 3.5 - PLC Programming With Structures - Lesson 16 - Structured And Good Commenting Practices

Основы ПЛК: релейная логика

Основы ПЛК: релейная логика

Как установить Windows 11, если будет «Чебурнет».

Как установить Windows 11, если будет «Чебурнет».

ESP32: распознавание речи нейросетью (TensorFlow Lite)

ESP32: распознавание речи нейросетью (TensorFlow Lite)

Как профессионально структурировать свою программу ПЛК в TIA Portal (глава полного курса) | Подро...

Как профессионально структурировать свою программу ПЛК в TIA Portal (глава полного курса) | Подро...

Как производятся микрочипы? 🖥️🛠️ Этапы производства процессоров

Как производятся микрочипы? 🖥️🛠️ Этапы производства процессоров

Полная история программирования, Часть 2: BASIC, язык C, создание ООП (с разбором кода)

Полная история программирования, Часть 2: BASIC, язык C, создание ООП (с разбором кода)

Объяснение тензорных процессоров (TPU)

Объяснение тензорных процессоров (TPU)

CODESYS 3.5 - PLC Programming With Structures - Lesson 1 - What Are Structures?

CODESYS 3.5 - PLC Programming With Structures - Lesson 1 - What Are Structures?

Как данные проходят по сети: от компьютера до сервера и обратно

Как данные проходят по сети: от компьютера до сервера и обратно

Где начало СХЕМЫ? Понимаем, читаем, изучаем схемы. Понятное объяснение!

Где начало СХЕМЫ? Понимаем, читаем, изучаем схемы. Понятное объяснение!

Механизмы, которые должен знать КАЖДЫЙ инженер-механик

Механизмы, которые должен знать КАЖДЫЙ инженер-механик

© 2025 dtub. Все права защищены.



  • Контакты
  • О нас
  • Политика конфиденциальности



Контакты для правообладателей: [email protected]