Hi all, is it possible to detect that the program runs in the simulation mode in CoDeSys 2.3 rather than on the PLC?
Why I need this?
I own WAGO PLC 750-880 and I am using the SysRtcGetTime() function to read the PLC clock. As you know it doesn't work in the simulation mode, therefore I am using RTC() function block to simulate the clock by providing a certain date.
Any ideas are welcome!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks a lot for a hint! When I first saw your reply I hoped this is it, but... unfortunately it doesn't work since CoDeSys v2.3 says this pragma is not supported. Not only IsSimulationMode, but also the IF statement.
You inspired me to check the CoDeSys help docs and I found that it supports a few use cases for other pragmas:
It looks like it is time for a costly upgrade to e!COOCKPIT...
Hi all, is it possible to detect that the program runs in the simulation mode in CoDeSys 2.3 rather than on the PLC?
Why I need this?
I own WAGO PLC 750-880 and I am using the SysRtcGetTime() function to read the PLC clock. As you know it doesn't work in the simulation mode, therefore I am using RTC() function block to simulate the clock by providing a certain date.
Any ideas are welcome!
in v3.5 there is a pragma
I am not sure if that existed already in V2.3, try it
Thanks a lot for a hint! When I first saw your reply I hoped this is it, but... unfortunately it doesn't work since CoDeSys v2.3 says this pragma is not supported. Not only IsSimulationMode, but also the IF statement.
You inspired me to check the CoDeSys help docs and I found that it supports a few use cases for other pragmas:
It looks like it is time for a costly upgrade to e!COOCKPIT...
or use PFC100 & CODESYS.