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

DataBase and variabel name

jeffcoll
2017-07-08
2017-07-18
  • jeffcoll - 2017-07-08

    I'm currently working on a database (Microsoft SQL). However, I would like to add the variable name I use in the program. Also, I want to put it in the database now, by using a string, but by doing so I have to type each variable, Where you can make mistakes here could this also automatically make that variable name automatically converted into a string?

     
  • TimvH

    TimvH - 2017-07-18
    //Declaration
    VAR
    Β  Β MyVarInfo: __SYSTEM.VAR_INFO;
    Β  Β MyTestVar: INT;
    END_VAR
    //Code
    MyVarInfo:= __VARINFO(MyTestVar);
    //after this line of code MyVarInfo contains all information obout this variable - just watch in online mode and you will understand
    
     

Log in to post a comment.