CODESYS - the IEC 61131-3 automation software

Welcome to the official CODESYS Forum by 3S-Smart Software Solutions GmbH | A member of the CODESYS Group
Deutsche Version English version russian version 
It is currently Sun Sep 15, 2019 8:34 am

All times are UTC+01:00




Post new topic  Reply to topic  [ 10 posts ] 
Author Message
 Post subject: File read/write
PostPosted: Mon Dec 15, 2014 3:38 pm 
Offline

Joined: Mon Feb 17, 2014 12:05 pm
Posts: 30
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


Top
   
 Post subject: Re: File read/write
PostPosted: Mon Dec 15, 2014 8:00 pm 
Offline
Site Admin

Joined: Mon Sep 05, 2005 9:42 am
Posts: 3446
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


Top
   
 Post subject: Re: File read/write
PostPosted: Tue Dec 16, 2014 7:25 am 
Offline

Joined: Mon Feb 17, 2014 12:05 pm
Posts: 30
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


Top
   
 Post subject: Re: File read/write
PostPosted: Wed Dec 17, 2014 3:58 am 
Offline
User avatar

Joined: Tue Aug 30, 2011 1:21 am
Posts: 96
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

_________________
The Original SoMachine Ninja


Top
   
 Post subject: Re: File read/write
PostPosted: Wed Dec 17, 2014 5:57 am 
Offline
Site Admin

Joined: Mon Sep 05, 2005 9:42 am
Posts: 3446
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


Top
   
 Post subject: Re: File read/write
PostPosted: Wed Dec 17, 2014 12:42 pm 
Offline

Joined: Mon Feb 17, 2014 12:05 pm
Posts: 30
jzhvymetal; do you have any code-example that i can look at?

/U


Top
   
 Post subject: Re: File read/write
PostPosted: Fri Dec 19, 2014 4:53 am 
Offline
User avatar

Joined: Tue Aug 30, 2011 1:21 am
Posts: 96
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

_________________
The Original SoMachine Ninja


Top
   
 Post subject: Re: File read/write
PostPosted: Fri Dec 19, 2014 5:22 am 
Offline
Site Admin

Joined: Mon Sep 05, 2005 9:42 am
Posts: 3446
Hi,
you have updated the oscat libraries to where in the oscat forum or where could we find them?
BR
Edwin


Top
   
 Post subject: Re: File read/write
PostPosted: Fri Dec 19, 2014 8:18 am 
Offline

Joined: Mon Feb 17, 2014 12:05 pm
Posts: 30
jzhvymetal, please post the demo for me.


Top
   
 Post subject: Re: File read/write
PostPosted: Mon Feb 02, 2015 9:30 pm 
Offline

Joined: Mon Feb 17, 2014 12:05 pm
Posts: 30
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?


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 10 posts ] 

All times are UTC+01:00


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Limited