Autor Thema: Rasberry Pi DLOG_FILE_CSV_DEMO  (Gelesen 6483 mal)

0 Mitglieder und 1 Gast betrachten dieses Thema.

Offline bartmarchand

  • Newbie
  • *
  • Beiträge: 8
    • Profil anzeigen
Rasberry Pi DLOG_FILE_CSV_DEMO
« am: 09. März 2017, 16:09:28 »
Hi, I'm trying to get the DLOG_FILE_CSV_DEMO to work in codesys 3 on a raspberry PI.
If I compare the running program with a Beckhoff CX, i notice that the timestamp does not change on the PI.
Also the filename stays the same and the file is not written on the SD card. There are no errors.
- What is wrong with the timestamp in the real time view, it stays like '#A-#D-#H-#N:#R:#T'
- What is the format to write to the sd card of a raspberry Pi on linux?

Offline AntonZan

  • Newbie
  • *
  • Beiträge: 10
    • Profil anzeigen
Re: Rasberry Pi DLOG_FILE_CSV_DEMO
« Antwort #1 am: 18. Februar 2018, 17:05:21 »
It has been a while since this was asked. For those that may run into this question as well: it worked for me with filename  '/home/pi/testlog_#A#D#H.csv' .
The #A#D#H part would produce a new CSV file every day.

I also tried without a path (so just 'testlog_#A#D#H.csv' for filename), but could not find the log file on the Raspberry filesystem. Don't know what the Raspberry runtime would use for default path. Using a full path as indicated above worked fine for me.

SysTimeRtcGet was used to obtain a date/time stamp in DWORD format. Convert to DT (as required by DLOG_FILE_STORE_CSV) with DWORD_TO_DT.

OSCAT_NETWORK version 1.3.5 (with NETWORK_BUFFER_LONG_SIZE = 8191, and references to namespace OSCAT_BASIC added as proposed by annD, thanks for that).
« Letzte Änderung: 18. Februar 2018, 17:07:42 von AntonZan »