News & Articles Applications

Schedule applications in real-time

Alex@PLCnextTeam 15 August 2022 10 min. read
841 views 0 comments LoadingSave

Programmable Logic Controllers (PLCs) have been used in industry for over 50 years to control industrial machines or installations. PLCs are ideal for this because they offer special functions that are crucial for the perfect, real-time control of industrial machines or installations. PLCs provide the certainty that the various (sub) applications can be executed exactly at predefined times and in a predeter-mined sequence. We also call this Realtime Scheduling and Synchronization of the various applications.

The importance of task management

In industrial control technology, tasks and processes are managed in order to use the available capacity of the control more efficiently. For example, processes that are slow or less important don’t have to run every 10 milliseconds. In this way we can get more out of the existing control system – and thus avoid (to a certain extent) investments in a more expensive control system with more capacity.

Unfortunately, managing tasks and processes in the classic PLC only works for software applications developed with the manufacturer’s software tool and in the classic PLC (IEC) programming languages. This limits the possibilities, since certain (sub) applications can be developed faster or better with other programming tools and languages.

Task handlig

Use of other programming tools and languages

It would be much more convenient if PLCs could also be programmed with other commonly used software tools and languages. But this is not the only advantage: just as important is that this enormously increases the range of programmers and of already available (sub)applications (for example, Open Source Software). After all, modern technology is sometimes so complex that a company can no longer develop everything itself within the limited time available for a fast time-to-market.

In order to be able to offer the above advantages, industrial control must be based on a widely used and open Operating System. But we are not there yet! It is not for nothing that PLCs have the typical deterministic, or exactly predictable behaviour. For the correct control of industrial machines and installations, it is very important that the control system retains its deterministic behaviour. That is why it must also be possible to manage those (sub)applications in real time that were not developed in the classic PLC programming languages and with the classic PLC programming tools.

Extra functionality with PLCnext Technology

The PLCnext Technology does offer this functionality thanks to the so-called Execution and Synchronization Manager (ESM). As a result, (sub) applications written in, for example, C++ or developed with Matlab Simulink can also be managed perfectly in real-time, whereby the handy functions of the open Operating System (Linux) can also be used.

We can demonstrate by means of a simple example that the ESM can also manage other, non-PLC-typical applications. For this we have written two very simple software applications: a classic PLC application (in Function Block Diagram) and an application written in a higher programming language (in C++).

Applications can run in two places on a PLCnext Control:

  1. within the PLCnext Technology Runtime, where the applications can be scheduled real-time by the ESM, and
  2. outside the PLCnext Technology Runtime, directly on Linux
Sequence of runtime

The classic PLC application (yellow) from this example ensures that – every time it is run through – the output variable is inverted and thus generates a block pulse. The C++ application (blue) ensures that the input variable is passed 2 times inverted to the output. We have made a copy (purple) of this (C++) application which runs directly on Linux and apart from the PLCnext Technology Runtime. 

All 3 output variables are linked to a separate physical digital output of the PLCnext Control.

When we connect an oscilloscope to the digital outputs, it can be seen that when the PLCnext Control is more under load, the behaviour of the two identical C++ applications is different.
The output variable of the Linux-executed C++ application (purple) is NOT always synchro[1]nous with the output variable of the PLC application (yellow). This is in contrast to the output variable of the same ESM managed C++ application (blue). It DOES run exactly in sync with the output variable of the PLC application (yellow).

Oscilloscope connected to the PLCnext Control

This shows that thanks to the PLCnext Technology, in addition to the classic PLC applications, other applications (e.g. C++) can also be used for real-time control of machines and installations. These other applications can make use
of the functions that the Linux Operating System offers.

This ensures that the software engineer can focus on his main task: developing innovative control applications, instead of ensuring that the system continues to work properly.

Alex @PLCnextTeam
841 views 0 comments LoadingSave

Discussion

Please login/register to comment

Login/Register

Leave a Reply

Newsletter
Never miss a new article
Sign up for the newsletter
Never miss news about PLCnext Technology
Get interesting content via newsletter four times a year
Receive exclusive information before all other users