Section 6.2: From Flat Programming to OOP | SimpleMotor FB | PLC + SCADA Hands-on Guide

This video is a hands-on guide for Section 6.2 of the textbook Control and SCADA Systems by Dr. Chau Truong. In this exercise, we convert a simple motor start/stop control program from flat programming into an object-oriented PLC structure. The motor logic is encapsulated inside a SimpleMotor Function Block, and multiple independent motor instances are created using separate Data Blocks. The video also demonstrates how WinCC Unified can connect to these motor instances using flat HMI tags and absolute DB addresses. Main steps covered: Create a new PLC and HMI setup for the OOP exercises Create the SimpleMotor Function Block Define Start, Stop, and Cmd inside the FB Implement the motor latch logic inside the FB Disable optimized block access for absolute SCADA addressing Create SimpleMotor instances for Motor 1, Motor 2, and Motor 3 Call the SimpleMotor instances in OB1 Create flat HMI tags for each motor instance Use absolute DB addresses for Start, Stop, and Cmd Create the flat SCADA screen for three motors Configure Start and Stop button events Configure motor status and rotation animations Compile and download the PLC program Run HMI Runtime and verify that each motor works independently Textbook: Control and SCADA Systems Author: Dr. Chau Truong #PLC #SCADA #TIAPortal #PLCSIMAdvanced #WinCCUnified #OOP #FunctionBlock #IndustrialAutomation