Breadcrumbs

Export

The data is exported to a desired file (in CSV format) using filter parameters.

Syntax

  Func_FbExport_MnDataCollector.bmp

C++
METHOD PUBLIC Export : BOOL
VAR_INPUT
    sFile : STRING;
    sStartDateTime : STRING;
    sEndDateTime : STRING;
    var_name : STRING;
    var_valueMin : STRING;
    var_valueMax : STRING;
    var_type : DATACOLLECTOR_TYPE;
    var_comment : STRING;
END_VAR


Parameters

Parameter

Description

sFile 

Filename, where the whole export should be sent to 

sStartDateTime 

Filters the export by a start date.
All entries created later than sStartDateTime are exported.

sEndDateTime 

Filters the export by an end date.
All entries created earlier than sEndDateTime are exported. 

var_name 

Filters the export by name.

All entries that match var_name will be exported.
Note: advanced filtering with %.
With 'Test%' e.g. entries with 'Tester', 'Test 13' are also exported. 

var_valueMin 

Filters the export by a minimum value.
All entries with an equal or higher value than var_valueMin will be exported. 

var_valueMax 

Filters the export by a maximum value.
All entries with an equal or lower value than var_valueMax will be exported. 

var_type 

Filters the export by Var type.
All entries with the same var_type are exported. 

var_comment 

Filters the export based on a comment.
All entries that match var_comment will be exported.
As with var_name the filtering can also be advanced with %. 

Rückgabewert 

TRUE: successful export 



Example

C++
data : MnDataCollector := (m_sDatabase := '\mnplc\boot\testdata.db', m_DatabaseLimit := DATACOLLECTOR_DATALIMIT_ENTRIES, m_dwDatabaseSize := 5); 

... 

data.Export(sFile:= '\mnplc\boot\export.csv', sStartDateTime:='', sEndDateTime:='', var_name:='', var_valueMin:='', var_valueMax:='', var_type:= 0, var_comment:= '');


Requirements



Remarks