logCreateMem (Function) |
Top Previous Next |
logCreateMem creates a new Datalogger in memory. This is useful for data that does not need to be persistent and is written often, as it can not be worn out. To save the data persistently, logSaveToFile can be used to store the log on the filesystem. The maximum size of a datalogger is 1 MB.
Input: rec_size : INT The maximum size of each record in bytes. This does not include the data for the timestamp, tag and other fixed data.
rec_count : DINT Number of records that should be contained in the Datalogger (before wrap-around). If 0 is specified on the number of records will be the maximum number available (depends on the "rec_size").
key : DINT User-defined key-value.
Output: handle : SYSHANDLE A handle to the created datalogger.
Returns: INT
Declaration: FUNCTION logCreateMem : INT;
Example: INCLUDE rtcu.inc |