Autor Thema: DLOG_STORE_FILE_CSV  (Gelesen 7174 mal)

0 Mitglieder und 1 Gast betrachten dieses Thema.

Offline tomnord

  • Newbie
  • *
  • Beiträge: 3
    • Profil anzeigen
DLOG_STORE_FILE_CSV
« am: 27. September 2017, 13:19:16 »
Hello. I'm trying to set up a datalog with dlog_store_file_csv. I'm sort of getting it to work, but I am a bit unsure as what is triggering the write to file.
Will the FB store data in buffer untill buffer is full, and then generate the file?
I'm looking to log a value once every 24h, and a new file every month.
The file renaming bit I have covered, and set up Trig_T to 86400(24h).
When Trig_M is set to high, does the FB empty buffer to file? what then happens when Trig_T does the same at timeout? Will the file be overwritten?
Does the Enable input need to be set high in order for the FB to do anything?
Is there a sample project that I could check out?


Regards
Tom

Offline tomnord

  • Newbie
  • *
  • Beiträge: 3
    • Profil anzeigen
Re: DLOG_STORE_FILE_CSV
« Antwort #1 am: 29. September 2017, 11:02:10 »
Also, is it possible to get the fb to continuously write to a new line in the csv? So that if I log a new value  it just adds it to an existing file. In that way, I can get new values without adding new files.
Is this possible?

Offline peewit

  • Moderator
  • *****
  • Beiträge: 2 378
    • Profil anzeigen
Re: DLOG_STORE_FILE_CSV
« Antwort #2 am: 29. September 2017, 19:30:35 »
open the library as a project and see the folder "demo".

take a look at the example DLOG_FILE_CSV


use the parameter "auto_close" so that the data is written regularly to the file and the file is also closed so that you can read it.

Offline juhataipale

  • Newbie
  • *
  • Beiträge: 3
    • Profil anzeigen
Re: DLOG_STORE_FILE_CSV
« Antwort #3 am: 22. August 2018, 21:19:22 »
open the library as a project and see the folder "demo".

Please, how is this done? Can this be done also codesys 3?

Zitat
take a look at the example DLOG_FILE_CSV


use the parameter "auto_close" so that the data is written regularly to the file and the file is also closed so that you can read it.
« Letzte Änderung: 22. August 2018, 21:21:28 von juhataipale »

Offline peewit

  • Moderator
  • *****
  • Beiträge: 2 378
    • Profil anzeigen
Re: DLOG_STORE_FILE_CSV
« Antwort #4 am: 23. August 2018, 07:59:24 »
the oscat_network library of codesys store does not contain the demo programs
you can export the demo programs yourself from the codesys 2.x library or you take them from the attached zip file.


[gelöscht durch Administrator]