File read/write

2014-12-15
2015-02-02
  • urbanlarsson - 2014-12-15

    Hi!

    Can somebody give me a working example how to write 10 rows of text to a file
    and another example hopw to read back those 10 rows.

    I wanna do some kind of settingsfile for my Project, and wanan retain the settings no matter what happens, powerfailure or new PLC-program download for example,
    an old-school settings.ini file

    /U

     
  • urbanlarsson - 2014-12-16

    Of course its an option, but I don't need it to be that fancy

    just want to save ten variables to a file, and on "first scan" read the variables from the file.

    /U

     
  • jzhvymetal - 2014-12-17

    This is very easy with OsCat Network Library. Network Library has file system Function blocks.

    There are include demo programs with the library. Here a link to latest version.

    http://www.oscat.de/community/index.php ... g9460.html m

     
  • eschwellinger

    eschwellinger - 2014-12-17

    Hi,

    thanks jzhvymetal, I would recommend to use the versions from CODESYS Store,
    namespaces are registered etc... and aditional advantage you get a notification in package manager if an update is availabe.

    http://store.codesys.com/mixedsearch/mi ... duct_area=

    OSCAT BASICOSCAT NETWORKOSCAT BUILDING

    are available.

    BR
    Edwin

     
  • urbanlarsson - 2014-12-17

    jzhvymetal; do you have any code-example that i can look at?

    /U

     
  • jzhvymetal - 2014-12-19

    urbanlarsson,

    I only have the structure text demo program that was included inside the library. I can attach them if you want. If you install the package you should be able to see them in the demo directory of the library.

    Edwin Schwellinger
    I have updated the libraries can someone update the packages? Plus my network library uses the new CoDeSys 3 libraries. The latest are as follows:

    Updated Network Library 1.30
    Updated Basic Library 3.33

     
  • eschwellinger

    eschwellinger - 2014-12-19

    Hi,
    you have updated the oscat libraries to where in the oscat forum or where could we find them?
    BR
    Edwin

     
  • urbanlarsson - 2014-12-19

    jzhvymetal, please post the demo for me.

     
  • urbanlarsson - 2015-02-02

    jzhvymetal, if you could, I'll gladly want you to post the demos.

    Also, i downloaded the oscat files from codesys-store, and i got network v1.2.1 not 1.3 as you was speaking of?

     

Log in to post a comment.