- Create a "Standard project" and select CODESYS Control Win V3 as the device.
- Define the target system by means of the Network scan.
Adapt the POU PLC_PRG as follows:
Section Column width 7 Declaration
Column width 93 Code Block theme Confluence VAR verCompiler : Version; verRuntime : Version; i1, i2, i3, i4: INT; END_VAR
Section Column width 7 Implementation
Column width 93 Code Block theme Confluence verRuntime := __SYSTEM.Constants.RuntimeVersion;
verCompiler := __SYSTEM.Constants.CompilerVersion;
// as pragma
{IF RUNTIMEVERSION(>=,'3.5.16.20')}
i1 := i1 + 1;
{ELSE}
i2 := i2 + 1;
{END_IF}
{IF COMPILERVERSION(=,'3.5.16.20')}
i3 := i3 + 1;
{ELSE}
i4 := i4 + 1;
{END_IF}
- Load the project to the controller and start it.
...