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

I cannot use SysFile to open/read/write/close - RTS_IEC_HANDLE not defined

Volvo742
2017-09-21
2017-09-22
  • Volvo742 - 2017-09-21

    Hello!

    I have a problem. I want to write text to a file but cannot use the SysFile library. I have that included in my project, but RTS_IEC_HANDLE is not defined. Why?

    My goal is to write to a MS SQL database, but I don't know how to do that, so I create a file insted and later a MS SQL database is going to pick up that file.

    I'm using Codesys 3.5 SP8.

    IMG: Capture4.PNG

    IMG: Capture3.PNG

    IMG: Capture2.PNG

    IMG: Capture.PNG

     
  • Lo5tNet - 2017-09-21

    Have you tried adding the namespace before the type like:

    SysOpenFile: SysFile.SysTypes.RTS_IEC_HANDLE;
    njkk: SysFile.ACCESS_MODE;
    
     
  • Volvo742 - 2017-09-21

    Comingback4u hat geschrieben:
    Have you tried adding the namespace before the type like:

    SysOpenFile: SysFile.SysTypes.RTS_IEC_HANDLE;
    njkk: SysFile.ACCESS_MODE;
    

    No. I will try that tomorrow. I give you a reply then.

     
  • Volvo742 - 2017-09-22

    Comingback4u hat geschrieben:
    Have you tried adding the namespace before the type like:

    SysOpenFile: SysFile.SysTypes.RTS_IEC_HANDLE;
    njkk: SysFile.ACCESS_MODE;
    

    No that doesn't work.

    IMG: Capture.PNG

     
  • Volvo742 - 2017-09-22

    I change library.

    IMG: Capture.PNG

     

Log in to post a comment.