Breadcrumbs

GetFirst

Returns the first DataCollectorItem that matches the filter parameters.

Syntax

  Func_FbGetFirst_MnDataCollector.bmp

C++
METHOD PUBLIC GetFirst : BOOL
VAR_INPUT
    sStartDateTime : STRING;
    sEndDateTime : STRING;
    var_name : STRING;
    var_valueMin : STRING;
    var_valueMax : STRING;
    var_type : DATACOLLECTOR_TYPE;
    var_comment : STRING;
    sOut : POINTER TO DATACOLLECTOR_ITEM;
END_VAR

Parameters

Parameter

Description 

sStartDateTime 

Filter parameter that filters/ignores/excludes all entries earlier than sStartDateTime. 

sEndDateTime 

Filter parameter that filters out/ignores/excludes all entries later as sStartDateTime. 

var_name 

Filter parameter that allows all entries with the same var_name. 

var_valueMin 

Filter parameter that allows all entries with a value equal to or greater than var-valueMin. 

var_valueMax 

Filter parameter that allows all entries with a value equal to or lower than var-valueMax. 

var_type 

Filter parameter that allows all entries with the same type as var_type. 

var_comment 

ilter parameter that allows all entries with the same comment as var_comment. 

sOut 

Pointer to the DATACOLLECTOR_ITEM that matches the filter parameters. 

Rückgabewert 

TRUE, if an element applies to the filtering
FALSE if no element applies to the filtering 



Example

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

... 

data.GetFirst('','','',var_valueMin:'7', var_valueMax:='8' ,var_type:= 0,'',ADR(dataItem));


Requirements



Remarks