Returns the N-th DataCollectorItem that matches the filter parameters. N stands for any offset.
Syntax
METHOD PUBLIC GetFirstByOffset : 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;
udiOffset : UDINT;
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 |
Filter parameter that allows all entries with the same comment as var_comment. |
|
sOut |
Pointer to the DATACOLLECTOR_ITEM that matches the filter parameters. |
|
udiOffset |
The Nth DATACOLLECTOR_ITEM applicable to the filtering can be determined by the offset. N stands for any offset. Offset = 0 corresponds to the call of GetFirst() |
|
Rückgabewert |
TRUE, if the Nth element exists.
|
Example
data : MnDataCollector := (m_sDatabase := '\mnplc\boot\testdata.db', m_DatabaseLimit := DATACOLLECTOR_DATALIMIT_NONE , m_dwDatabaseSize := 5);
dataItem:DATACOLLECTOR_ITEM;
...
data.GetFirstByOffset('','','',var_valueMin:'7', var_valueMax:='8' ,var_type:= 0,'',ADR(dataItem), udiOffset:=1);
Requirements
Remarks