PLC OOP Programming Language Examples

PLC OOP Programming Language Examples :

Learn By Doing IEC-61131-3 OOP Programming Examples In CODESYS


PLC OOP Programming Language

As PLC programming has been coming more focused on Structured Text and other computer-like programming languages as opposed to Ladder Logic (the simple language of electricians), those working with PLCs need to have at least a basic understanding of object-oriented programming (OOP) programming method.

About The Object-Oriented Programming Language in PLCs

 

OOP is a way to package computer code or PLC (Programmable Logic Controller) instructions into reusable blocks or "objects" that can be used multiple times in a program or in other programs. OOP is a way to add structure to a program and keep program sections separate from one another so that the program does not end up with "spaghetti code" where multiple instructions affecting multiple elements are all mixed up together. OOP is not a new programming language in-and-of-itself, but rather a way to package code to make programs more efficient, reusable, and modifiable. High-level computer languages like C and C++ have used OOP for years, and recently OOP has crept into the programming of PLCs and has been added to IEC-61131-3 OOP.  

 

OOP is not a specific programming language, it is a methodology. Another PLC Object-Oriented Programming example is the one the PLC programming software uses itself. The learner from this course will be well familiar with dragging a timer instruction onto the output of a rung of logic. That timer instruction dragged is an object class, and the resulting copy on the rung is an instance(copy) of that class. It is encapsulation in object-oriented programming.


To learn more see and share the OOP Programming in the PLC tutorial

What you will learn by doing in the above tutorial?


  1.     PLC OOP Introduction
  2.     About Programming a Class
  3.     Adding Properties to a Class
  4.     Adding Methods to a Class
  5.     Encapsulation Programming
  6.     Programming Inheritance
  7.     Passing Parameters to a Method
  8.     Access Modifiers
  9.     Polymorphism of a Class Examples
  10.     Multi-class Interface Examples

Comments

Popular Posts