User:

Log in user:

(step 1 of 2)


Write your email address in the white field and then click the "Confirm" button.

Log in user:

(step 2 of 2)


Write your password in the white field and then click the "Confirm" button.
Or click the "Request password" button to request forgotten password.

Log in user - Failure:


Email address has not been found!
Click the "Previous step" button to to enter your email address again.
Or click the "Register user" button to register your email address.

Log in user - Failure:


Pasword does't match!
Click the "Previous step" button to enter the password again.
Or click the "Request password" button to request forgotten password.

Request password:

(step 1 of 2)


Write your email address in the white field and then click the "Confirm" button.

Request password:

(step 2 of 2)


Your password has been sent to your email.
Please also check your spam folder.

Request password - Failure:


Email address has not been found!
Click the "Previous step" button to enter your email address again.
Or click the "Register user" button to register your email address.

Register user:

(step 1 of 5)


Write your email address in the white field and then click the "Confirm" button.

Register user:

(step 2 of 5)


Registration code has been sent to your email.
Please also check your spam folder.
Copy the registration code from your email in the white field and then click the "Confirm" button.
Or click the "Previous step" button to request the registration code again.

Register user - Failure:


Email address already exists!
Click the "Previous step" button to enter the email address again.
Or click the "Log in user" button to log in with your email address and password.
Or click the "Request password" button to request forgotten password.

Register user:

(step 3 of 5)


Set your user name in the white field and then click the "Confirm" button.

Register user - Failure:


Registration code does't match!
Click the "Previous step" button to enter the registration code again.

Register user:

(step 4 of 5)


Set your password in the white field and then click the "Confirm" button.

Register user - Failure:


User name already exists!
Click the "Previous step" button to set another user name.

Register user:

(step 5 of 5)


User has been successfully registered.
Click the "Log in user" button to log in.

User settings:

User settings:


Please log in to be able to open user settings.
Click the "Log in user" button to log in with your email address.
Or click the "Register user" button to register your email address.

User settings:


Your subscription has been successfully canceled.

User settings:


Your subscription has been successfully established.

Write comment:

Write your comment in the white field and then click the "Add comment" button.

Choice of programming language



IEC 61131-3 languages

Choosing the right programming language helps us make the project faster and easier.
On the other hand, an improperly chosen programming language can increase the complexity of the project many times or even make it impossible to meet certain requirements.
It is important that the programming language is able to manage what we expect from it.
Program of the most PLCs can be written in one (or more) of the IEC 61131-3 programming languages - these are: LD (Ladder Diagram), SFC (Sequential Function Chart), FBD (Function Block Diagram), IL (Instruktion List) and ST (Structured Text) and also some other languages can be used e.g. C, C++ etc.

We should choose a programming language that has features and benefits that are useful for our intended purpose.
This can be, for example:

  1. Achievability of our functional, performance and safety requirements.
  2. Quick and intuitive writing of the code that is easy to read and easy to understand.
  3. Code editor with tools that make the programmer's work easier (refactoring (global renaming of variables), intellisense, color-coded syntax, code comparison, debugger, error checking, online watch and trace, keyboard shortcuts, ...)
  4. A fast and informative compiler that helps us find bugs quickly and fix them as they occur.
  5. Easy code maintenance.
  6. Applicability of version management tools.
  7. Good supplier support.
  8. Large size of the community using this programming language and availability of answers to questions through the forum.
  9. Available function libraries and examples of ready-made solutions.
  10. The perspective of a long enough existence.
  11. Portability to PLCs from other manufacturers.


It makes sense to choose a programming language that the team's programmers have practical experience with.
If more than one programming language meets our criteria, it is better to choose one that works at a higher level of abstraction, as development will then be faster.

Related previous articles:


Related next articles:


"Two downfalls of using LD as a building-block language:
1. The low density of information requires LD designs to be spread-out over dozens of pages, making it difficult or impossible to see and understand the big picture.
2. High-level details and low-level details are intermingled on the same level leading to clutter, which makes the design difficult to understand and maintain."
- https://www.controleng.com/articles/which-iec-61131-3-programming-language-is-best-part-2/

"What operations should be programmed with structured text?
While LD, SFC, and FBD/CFC are great tools for their purposes, there are some operations that do not lend themselves to graphical languages.
Some operations that favor use of ST programming include:
⇒ Iterative operations such as For, While, and Repeat
⇒ Complex conditionals and selections such as IF-THEN, and CASE
⇒ Bit manipulations such as bitwise-AND, Shift, Rotate
⇒ Text string manipulation
⇒ State machines with unusual requirements or complexity
⇒ Pure object-oriented programming (calling methods, setting properties, etc.)"
- https://www.controleng.com/articles/which-iec-61131-3-programming-language-is-best-part-2/

I had the opportunity to compare programming with ST and C on the B&R PLC.
Yes, I could 'trick' a bit more with C, but some important PLC background functions were missing!
1. Monitoring of 'static' variables was not possible.
2. Simple access (dot notation) to individual bits of BYTE and WORD variables was missing.
3. 'CheckLib' didn't work.
4. Compiler messages weren't always that informative.
5. 'IntelliSense' / 'SmartEdit' didn't always work.
6. 'GoToDefinition' functionality didn't always work.
I'm a big fan of ST in PLC programming because it works and the programmer is flexible enough with ST.
Of course, it also depends on how well we design the architecture and concept of the program.

When I teach engineers new to PLCs how to build a solution, I start with ladder logic because it’s easy to understand the flow of decision making the processor follows. Next I introduce function block diagram to demonstrate process flow applications. Next structured text for iterative processing. Sequential function chart comes last to show the S-88 equipment module idea as it relates to the control modules written in the previous languages. All of the languages can be used to most efficiently for different control methods.

"Use of high-level programming languages such as Structured Text or SCL are absolutely essential to the successful management of complex software. High-level languages offer a significantly simpler, clearer means of describing a software solution. It becomes easier to read and interpret program codes.
That notwithstanding, it is still justifiable to use LAD or FBD for the purpose of expressing logic combinations because logic programs written in these graphical languages are extremely easy to understand and analyze. Each programming language should be used according to its own merits."
- Michael Braun and Wolfang Horn. Publicis Pixelpark Erlangen (2017). Object-Oriented Programming with SIMOTION.

"The debugger is used the same way for all text-based programming languages. In the programming language Sequential Function Chart (SFC), user-defined breakpoints are only possible to steps. Setting breakpoints is not possible in the programming languages Ladder Diagram (LD), Function Block Diagram (FBD), Continuous Function Chart (CFC) and reACTION Technology Diagram."
- B&R Automation Help 4.12.2.65. GUID = 9e5bf6ef-b512-4b52-97cf-df6602791c61.

"TwinCAT uses XML to for storage of all their source code instead of plain text. For someone with an pure automation background this might not matter too much as version control is more an exception than a rule, but for me it makes my life tougher. Doing diffs and automatic merges between branches of code using the standard tools I'm used to unnecessarily difficult. Even if I don't change anything in a function block, TwinCAT can make some obscure changes to some row in the file just because I opened and saved it.

There are certain things that you can do to minimize the amount of unnecessary changes to TwinCAT source code, like enabling separate line ids (and ignoring the source control of the LineIds.dbg-file) , using the "Minimize ID changes in TwinCAT files" and most importantly making sure to use the same version of TwinCAT XAE and settings when developing the software together.

To give Beckhoff some slack, this can be compared to other PLC brands in which some cases all code is stored in binary blobs making it completely impossible to use standard VCS as Git or SVN, and where you then will depend on proprietary solutions (either the manufacturers own solution or third party like Auvesy's version dog)."
- https://www.linkedin.com/pulse/five-best-worst-things-twincat-jakob-sagatowski/

IEC 61131-3: Methods, Properties and Inheritance
- See more on: https://stefanhenneken.net/2017/04/23/iec-61131-3-methods-properties-and-inheritance/

"The essential function of the PLC is to receive data from sensors or other field devices; make a decision on what to do with that information based on its programming instructions, for example, to open or close a valve based on fluid levels or direct a robot to pick up an object based on its presence in the work cell; and send the correct signal to the actuator (such as a valve or robot gripper) to perform the task."
- David Greenfield. AutomationWorld (2023). Peer-to-Peer FAQ: Controllers.
- https://www.automationworld.com/control/article/22724233/industrial-controller-technologies

"By continuously improving the design of code, we make it easier and easier to work with.
This is in sharp contrast to what typically happens: little refactoring and a great deal of attention paid to expediently add new features.
If you get into the hygienic habit of refactoring continuously, you'll find that it is easier to extend and maintain code."

- Joshua Kerievsky. Addison-Wesley (2004). Refactoring to Patterns.

If you choose the path to the left at the crossroads, you will not be able to pick the fruit that grows on the path to the right.
So collect all the requirements and decide which ones you want to choose and which ones you want to eliminate by weighing up the pros and cons.

Is your native language not English and do you work in an international team? Have you agreed on English as the project language within the team? Then please:

1. Install and use all project tools in English.
2. Use English help files for the tools.
3. Write English variable names and comments in the code.

These rules make collaboration between team members, documentation and support tasks easier. Because people will use the same terms.

Do you agree with these rules?
Would you add anything else?