-Menü

Beiträge anzeigen

Dieser Abschnitt erlaubt es Ihnen, alle Beiträge anzusehen, die von diesem Mitglied geschrieben wurden. Beachten Sie, dass Sie nur Beiträge sehen können, die in Teilen des Forums geschrieben wurden, auf die Sie aktuell Zugriff haben.

Beiträge anzeigen-Menü

Beiträge - PhilipInc

#1
oscat.lib fuer CoDeSys 3 / FILTER_MAV bug
24. September 2018, 20:20:17
Hello,

FILTER_MAV function works wrong if the values goes down.

ELSE
   tmp := UINT_TO_INT(N);
   i := INC1(i, tmp);
   Y := Y + (X - buffer) / N;
   buffer := X;
END_IF;

when buffer is bigger than X their difference going bellow 0 and become very large.
#2
I find out the problem: it writes after collect 4090 bytes in buffer only.
I cannot understand why. I use TRIG_T:=1 and TRIG_M:=TRUE.
#3
Does anybody have any example of DLOG_STORE_FILE_CSV usage?
#4
Hello,
I try to use the DLOG_STORE_FILE_CSV function to write some log to disk on Raspberry Pi device with Codesys V3. ERROR_T and ERROR_C have '0' in them but no file is written to disk.
Here is a part of my code:

   x1(X:= X, FMT:= '#A-#D-#H-#N:#R:#T', COLUMN:= 'Timestamp');
   x2(X:= X, STR:= log_text, COLUMN:= 'Message');
   x3(X:= X, STR:= 'INFO', COLUMN:= 'Category');
   x4(X:= X, STR:= strProjectName, COLUMN:= 'Project');
   x5(X:= X, STR:= strAppName, COLUMN:= 'POU');
   
   dLOG_CSV(
   X:= X,
   ENABLE:= ENABLE,
   TRIG_M:= TRUE,
   //TRIG_T:= 1,
   FILENAME:= 'log.csv',
   DTI:= curTimeDT,
   SEP:= 44,
   ERROR_C=> ERROR_code,
   ERROR_T=> ERROR_type);

I tried '/root/log.csv' it also doesn't work. I already created the file log.csv with 777 permissions at '/root' directory where Codesys Control works.