"SIMULATING" is a symbol which is automatically created only when simulation is started within PE6; it is as if you had added a "#Define SIMULATING" whenever you were simulating. That can then be used with #IFDEF and #IFNDEF to determine if the program is being simulated or not and generate appropriate code for each case.