Shared variables work exactly as they were physical I/O's. However they are meant to be used as virtual I/Os in the following scopes:
At the beginning of a task, values of shared variables are sampled from a memory table. The sampled values remain unchanged during the whole task execution. At the end of a task computation, the current values of the shared variables are updated into their memory table.
The diagram below can be used to illustrate the general process:

Figure 1 - Diagram using Shared Variable Input and Output blocks

Figure 2 - Simulation Information
In Figure 2, it is possible to see how long each block takes to be executed and complete the computation cycle:
Three additional examples illustrate the most common principles applicable when using shared variables:
About MWF
MWF is a traditional Brazilian company that provides a wide range of electronic and mechatronic products for industry sectors such as automotive, agricultural machinery and aerospace.
Contact Us
Rua Doutor Siqueira, 139 / Sala 804 Campos dos Goytacazes - RJ, Brasil
contact@mwf-technologies.com
© 2018-2026 MWF. All rights reserved.