Welcome to our new forum
All users of the legacy CODESYS Forums, please create a new account at account.codesys.com. But make sure to use the same E-Mail address as in the old Forum. Then your posts will be matched. Close

pragma instruction to know if the software is in simulation mode?

Joan M
2017-02-13
2017-02-14
  • Joan M - 2017-02-13

    Hello all,

    Is there any instruction that tells the system is in simulation mode?

    I'm thinking on a pragma to avoid adding code into the PLC but at the same time getting the desired result...

    Anyone knows about this?

    Thank you!

     
  • eschwellinger

    eschwellinger - 2017-02-14

    Hi,

    you could use:

    __SYSTEM.Constants.bSimulationMode

    BR
    Edwin

     
  • Joan M - 2017-02-14

    Perfect!

    This combined with the pragma "hasvalue" will do it, thank you!

     

Log in to post a comment.