logSaveToFile saves an open Datalogger to a file on the file system.
Only file- and memory-based Dataloggers are supported.
Input:
filename : STRING
The path to the file to save the datalogger to.
handle : SYSHANDLE
A handle to the datalogger to save.
Returns: INT
0
|
- Successful.
|
1
|
- Failed to create file.
|
4
|
- Log is not initialized.
|
6
|
- Failed to read from the log.
|
7
|
- The log could not be found. This function is only supported on file- and memory-based Dataloggers.
|
8
|
- The drive is not writable.
|
9
|
- Invalid drive.
|
10
|
- Failed to write to the file.
|
Declaration:
FUNCTION logSaveToFile : INT;
VAR_INPUT
filename : STRING;
handle : SYSHANDLE;
END_VAR;
Example:
INCLUDE rtcu.inc
PROGRAM test;
VAR
handle:SYSHANDLE;
END_VAR;
BEGIN
...
logSaveToFile(handle:=handle, filename:="A:\LOG.BIN");
...
END;
END_PROGRAM;
|