CODESYS - the IEC 61131-3 automation software
https://forum.codesys.com/

File read/write
https://forum.codesys.com/viewtopic.php?f=21&t=5994
Page 1 of 1

Author:  urbanlarsson [ Mon Dec 15, 2014 3:38 pm ]
Post subject:  File read/write

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

Author:  Edwin Schwellinger [ Mon Dec 15, 2014 8:00 pm ]
Post subject:  Re: File read/write

Hi,

sure possible ro do it by anyone, but another option might be to use:
http://store.codesys.com/mixedsearch/mi ... duct_area=

BR
Edwin

Author:  urbanlarsson [ Tue Dec 16, 2014 7:25 am ]
Post subject:  Re: File read/write

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

Author:  jzhvymetal [ Wed Dec 17, 2014 3:58 am ]
Post subject:  Re: File read/write

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

Author:  Edwin Schwellinger [ Wed Dec 17, 2014 5:57 am ]
Post subject:  Re: File read/write

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 BASIC
OSCAT NETWORK
OSCAT BUILDING


are available.

BR
Edwin

Author:  urbanlarsson [ Wed Dec 17, 2014 12:42 pm ]
Post subject:  Re: File read/write

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

/U

Author:  jzhvymetal [ Fri Dec 19, 2014 4:53 am ]
Post subject:  Re: File read/write

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

Author:  Edwin Schwellinger [ Fri Dec 19, 2014 5:22 am ]
Post subject:  Re: File read/write

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

Author:  urbanlarsson [ Fri Dec 19, 2014 8:18 am ]
Post subject:  Re: File read/write

jzhvymetal, please post the demo for me.

Author:  urbanlarsson [ Mon Feb 02, 2015 9:30 pm ]
Post subject:  Re: File read/write

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?

Page 1 of 1 All times are UTC+01:00
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/