对于ST编辑器内的条件编译使用此指令。
#IF IsSystemVariableSupported('sys_bIsPlcInTestMode') <> 0 #THEN
(*condition TRUE: first part is compiled and executed*)
#ELSE
(*condition FALSE: second part is compiled and executed*)
OutputCompilerWarning('PLC does not support the test mode');
#END_IF;
带有S PLC的此代码返回以下警告: