[operating system] command to detect whether runtime is over LINUX or WIN ?

2020-02-24
2020-02-24
  • andre-teprom - 2020-02-24

    I need to call an external script which obviously has distinct content and folder depending on if the code runs at Linux or Windows OS.

    Is there any library with functions capable of doing that ?

     
  • i-campbell

    i-campbell - 2020-02-24

    Hmm, I imagine there is more info about the enumeration of OS, but check out the sysTarget library as mentioned in this FAQ.
    https://faq.codesys.com/display/CDSFAQ/ ... ing+System

    Edit: In fact here is the Library information with the OS ID's

    IMG: Screen Shot 2020

     
  • andre-teprom - 2020-02-24

    Hi Campbell,

    Wow, it is really kind and helpful; in the meantime before you added the above picture I was searching for the legend of the return OS on the function, but you did that. It is exactly what I need.

    Many thanks !

     
  • i-campbell

    i-campbell - 2020-02-24

    Happy to help, teprom

     

Log in to post a comment.