Hauptmenü

DLOG_STORE_FILE_CSV

Begonnen von tomnord, 27. September 2017, 13:19:16

Vorheriges Thema - Nächstes Thema

0 Mitglieder und 1 Gast betrachten dieses Thema.

tomnord

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

tomnord

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?

peewit

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.

juhataipale

#3
Zitat von: peewit in 29. September 2017, 19:30:35
open the library as a project and see the folder "demo".

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

Zitattake 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.

peewit

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]