Basics of program execution
6.2 Asynchronous instructions
CPU 1516pro-2 PN (6ES7516-2PN00-0AB0)
Operating Instructions, 11/2019, A5E35873416-AC
51
6.2 Asynchronous instructions
Introduction
In program processing, a differentiation is made between synchronous and asynchronous
instructions.
The "synchronous" and "asynchronous" properties relate to the temporal relationship
between the call and execution of the instruction.
The following applies to synchronous instructions: When the call of a synchronous instruction
is complete, execution of the instruction is also complete.
This is different in the case of asynchronous instructions: When the call of an asynchronous
instruction is complete, execution of the asynchronous instruction is not necessarily
complete yet. This means the execution of an asynchronous instruction can extend over
multiple calls. The CPU processes asynchronous instructions in parallel with the cyclic user
program. Asynchronous instructions generate jobs in the CPU for their processing.
Asynchronous instructions are usually instructions for transferring data (for example data
records for modules, communication data, diagnostics data).
Difference between synchronous/asynchronous instructions
The figure below shows the difference between the processing of an asynchronous
instruction and a synchronous instruction. In this figure the CPU calls the asynchronous
instruction in five cycles before its execution is complete, e.g. a data record has been
completely transferred.
First call of the asynchronous instruction, start of execution
Intermediate call of the asynchronous instruction, execution continues
Last call of the asynchronous instruction, completion of execution
A job is fully processed by a synchronous instruction with each call.
Duration of a fully executed job
Figure 6-1 Difference between asynchronous and synchronous instructions