csv data logger stops working after 30 minutes

linux
2022-08-15
2022-08-17
  • linux - 2022-08-15

    Created a CSV data logger that runs in the background of the HMI. For some reason the logger stops logging after 30 minutes, any idea on why this is happening?

     
    πŸ‘
    2
  • andrax

    andrax - 2022-08-16

    Hello,

    I know the problem.
    How do you access the .csv?

     
    • linux - 2022-08-16

      The directory path is the C drive.

       
  • andrax

    andrax - 2022-08-16

    how do you write the csv file. can you show the code in question?

     
    • linux - 2022-08-16

      Not the whole code but this should give you an example on how I'm doing it.

      csvInitDataLog (xExecute := TRUE, sDirectoryPath := 'C:/DataLogging', sFileName := 'DataLogging2.csv', sColumnSeparator := ';', rCSVWriter := gCSVWriter);

      IF(//conditions) THEN
      timer1 (ENABLE := TRUE, TIMEHIGH := T#7.5S, TIMELOW := T#7.5S);
      // timer to log data every 15 seconds
      END_IF

      RTrig1 (CLK := timer1.OUT);
      // log upon the rising edge of timer

      csvSysDateTime (xExecute := (csvInitDataLog.xDone AND RTrig1.Q), sInput := SYS_DATE_TIME_SCRN, rCSVWriter := gCSVWriter);
      csvSysHours (xExecute := (csvSysDateTime.xDone AND RTrig1.Q), lrInput := System_Hours, rCSVWriter := gCSVWriter);
      csvAddNewLine (xExecute := csvSysHours.xDone, rCSVWriter := gCSVWriter);
      csvWriteFile (xExecute := csvAddNewLine.xDone, rCSVWriter := gCSVWriter);

       

      Last edit: linux 2022-08-16

Log in to post a comment.