Detecting Automation runtime simulation in program

Hello,
I want to detect in program whether my PLC in real or simulation device? Based on data i want to change few variables.

Regards
Sachin

Hi Sachin,

you can simply use DiagCpuIsSimulated().

See in help:

Sincerly Simon :slight_smile:

3 Likes

Hi Simon,

Thank you for quick reply.I have checked both in simulation and with real PLC hardware . It is working.

Regards
Sachin Jangam

1 Like

Hi Sachim,

You can use DiagCpuIsARsim to check if ARsim is running.

Regards
David DUPREY