Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC: Reading and writing data from a file

Reading and writing data from a file 13 years 9 months ago #863

  • Maden
  • Maden's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 86
  • Karma: 0
And here's already another question which I guess is easily answered by the experienced ProView user :blink:

How do I save some variables (e.g. Av, Iv objects) to a file from the PLC program. The same variables should be read again from the file at startup. Can this be done with the provided PLC objects or do I need to write some C-code for this kind of stuff?

Ondrej
The administrator has disabled public write access.

Re:Reading and writing data from a file 13 years 9 months ago #866

  • claes
  • claes's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 3179
  • Thank you received: 502
  • Karma: 133
Hi,

Use Backup objects.

This is handled by the backup process which you configure with a Backup_Conf object in the node hierachy.

/Claes
The administrator has disabled public write access.

Re:Reading and writing data from a file 13 years 9 months ago #871

  • Maden
  • Maden's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 86
  • Karma: 0
It's amazing that ProView has an answer to (almost) everyting. :)

While this actually works I am wondering if the moment the backup happens can be forced, disabling the periodic backup since this would wear out my flash disk. The data I want to store basically only changes once or very rarely.

Ondrej
The administrator has disabled public write access.

Re:Reading and writing data from a file 13 years 9 months ago #873

  • claes
  • claes's Avatar
  • OFFLINE
  • Platinum Boarder
  • Posts: 3179
  • Thank you received: 502
  • Karma: 133
Sorry, there is no force backup function.

Actually there is one, but when I checked it out it wasn't implemented for Linux. Maybe we can fix this to the text release.

/Claes
The administrator has disabled public write access.

Re:Reading and writing data from a file 13 years 9 months ago #879

  • robert
  • robert's Avatar
  • OFFLINE
  • Gold Boarder
  • Posts: 178
  • Karma: 7
Hi Maden,

You can set the cycle time by which the values are backuped. This will savesome wear on your disk. However I don't think you can explicitly force the backup write.

/Robert
The administrator has disabled public write access.

Re:Reading and writing data from a file 13 years 9 months ago #881

  • Maden
  • Maden's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 86
  • Karma: 0
Hi all,

I have another question related to this subject. I use a table object in the PLC program and I am currently defining the data in the table statically.

What would be an easy way of reading the data to be put in the table object from a text file dynamically at PLC start?
Any suggestions?

Ondrej
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Time to create page: 8.162 seconds