Курс 16 • Урок 5 из 15 • 2 академических часа

Addressing, tags and symbolic programming

Цель: Изучить тему «Addressing, tags and symbolic programming» и закрепить её практическими заданиями и самопроверкой.

2 акад. часа чтение и разбор теории, решение задач, работа со схемой или виртуальным стендом и проверка понимания.

Основной материал

Legacy PLC often used absolute addresses: I0.0, Q4.2, MW100, DB addresses. Modern programming favors symbolic tags: Pump_RunCmd, Tank_Level_PV. Symbols improve readability and allow hardware abstraction.

Data types

BOOL, BYTE, WORD, INT, DINT, REAL, TIME, STRING and user-defined structures. Choosing correct type prevents overflow and interpretation errors. Analog calculations usually use REAL or scaled integer carefully.

Naming convention

A good tag name conveys equipment, function and direction. Example P101_RunFb, P101_RunCmd, P101_Fault. Consistency matters more than one perfect standard.

Практическая работа

Create tag list for one motor, one valve and one analog pressure transmitter with at least 15 tags. Assign data types.

Самопроверка

• Why symbolic names better?

• What is BOOL?

• What is REAL?

• Why naming standard needed?

• What risk of wrong data type?

Что нужно запомнить

  • Legacy PLC often used absolute addresses: I0.0, Q4.2, MW100, DB addresses.
  • Modern programming favors symbolic tags: Pump_RunCmd, Tank_Level_PV.
  • Symbols improve readability and allow hardware abstraction.
  • BOOL, BYTE, WORD, INT, DINT, REAL, TIME, STRING and user-defined structures.
  • Choosing correct type prevents overflow and interpretation errors.
Проверка знаний

Вопросы по уроку

Нужно 75%
Загрузка вопросов…