void - 2021-12-30

Running "CODESYS V3.5 SP16", is what is mentioned in the title by design?

PROGRAM PLC_PRG
{IF defined (TEST)}
    {info 'TEST defined'}
{ELSE}
    {info 'TEST not defined'}
{END_IF}

Compiling the above with


yields

[INFORMATION]   TestProject: PLC_PRG [Device: PLC Logic: Application](Line 4, Column 1 (Impl)): TEST not defined

whereas compiling the above with


yields

[INFORMATION]   TestProject: PLC_PRG [Device: PLC Logic: Application](Line 2, Column 1 (Impl)): TEST defined




Asking because documentation at https://help.codesys.com/webapp/_cds_dlg_properties_build;product=codesys;version=3.5.17.0 says nothing about it working only for applications but not POUs

 

Last edit: void 2021-12-30