:Revision=8
:html
<<
128.178
MeasData-object|MeasData
--
The IP-Object <!RW>MeasData has access to the information about test steps which have been exectued already. 

Threfore, most functions are reasonable only in real test steps, not in system steps, with the exception of the end steps!

Access is made in form of a list, where the first record is selected with <!RW>First and afterwards, the following records, are selected with <!RW>Next. <!RW>EOF can be used to check, whether the end of the list has been reached. In addition, it is possible to filter certain test step results.

Example:
<!CODE>
MeasData.First;                  // Important must be called first for initialization. 
MeasData.Filter (12);            // Fail + Invalid Steps
while not MeasData.EOF do begin
  Printer (1, MeasData.Name);    // print name of step
  MeasData.Next;                 // next record
end;
<!TXT>
>>

<<
128.178.1
Functions of the MeasData-object|Functions
--
>>
<<
128.178.1.1
MeasData.Number|Number
--
<!DEF>
function <!TW>MeasData.Number : real;
<!TXT>
Returns the test step number of the selected measurement record.
>>
<<
128.178.1.2
MeasData.Name|Name
--
<!DEF>
function <!TW>MeasData.Name : string;
<!TXT>
Returns the test step name of the selected measurement record.
>>
<<
128.178.1.3
MeasData.IPName|IPName
--
<!DEF>
function <!TW>MeasData.IPName : string;
<!TXT>
Returns the name of the interpreter step of the selected measurement record.
>>
<<
128.178.1.4
MeasData.Precision|Precision
--
<!DEF>
function <!TW>MeasData.Precision : real;
<!TXT>
Returns the number of decimal places for results of the selected measurement record.
>>
<<
128.178.1.5
MeasData.Unit|Unit
--
<!DEF>
function <!TW>MeasData.Unit : string;
<!TXT>
Returns the measurement unit of the selected measurement record.
>>
<<
128.178.1.6
MeasData.LowerLimit|LowerLimit
--
<!DEF>
function <!TW>MeasData.LowerLimit : real;
<!TXT>
Returns the lower limit of the selected measurement record.
>>
<<
128.178.1.7
MeasData.UpperLimit|UpperLimit
--
<!DEF>
function <!TW>MeasData.UpperLimit : real;
<!TXT>
Returns the upper limit of the selected measurement record.
>>
<<
128.178.1.8
MeasData.Parameter|Parameter
--
<!DEF>
function <!TW>MeasData.Parameter (rParaNr : real) : string;
<!TXT>
Returns the test step parameter <!PW>rParaNr (1..32) as string for the selected measurement record, as it has been read from the parameter data base.
>>
<<
128.178.1.9
MeasData.GetStepResult|GetStepResult
--
<!DEF>
function <!TW>MeasData.GetStepResult : real;
<!TXT>
Returns the step result of the selected measurement record.

Return values:
<!STBL>
<!>0<!>none<!>
<!>1<!>Pass<!>
<!>2<!>Fail<!>
<!>3<!>invalid<!>
<!ETBL>
>>
<<
128.178.1.10
MeasData.GetTypeCode|GetTypeCode
--
<!DEF>
function <!TW>MeasData.GetTypeCode : real;
<!TXT>
Returns the type of the measured value of the selected measurement record.

Return values:
<!STBL>
<!>1<!>Real<!>
<!>2<!>String<!>
<!>-1<!>undefined<!>
<!ETBL>
>>
<<
128.178.1.11
MeasData.GetValue|GetValue
!128.178.1.16
--
<!DEF>
function <!TW>MeasData.GetValue : real|string;
<!TXT>
Returns the measured value for the selected measurement record. 

Attention: the type of the expression can be Real or String, according to what has been indicated by the test step. 

In case of doubt, check the result type with <!RW>GetTypecode.
>>
<<
128.178.1.12
MeasData.Count|Count
--
<!DEF>
function <!TW>MeasData.Count : real;
<!TXT>
Returns the number of the measurement records which match the selected filter.
>>
<<
128.178.1.13
MeasData.EOF|EOF
--
<!DEF>
function <!TW>MeasData.EOF : real;
<!TXT>
Returns <!RW>true if the end of the list has been reached.
>>
<<
128.178.1.14
MeasData.Comment|Comment
--
<!DEF>
function <!TW>MeasData.Comment : string;
<!TXT>
Returns the comment saved for the selected measurement record.
>>
<<
128.178.1.15
MeasData.TestTime|TestTime
--
<!DEF>
function <!TW>MeasData.TestTime : real;
<!TXT>
Returns the duration of the step (in seconds) which generated the selected measurement record.
>>
<<
128.178.1.16
MeasData.GetValue.String|GetValue.String
!128.178.1.11
--
<!DEF>
function <!TW>MeasData.GetValue.String : string;
<!TXT>
Returns the measured value for the selected measurement record as <!RW>String. 
>>
<<
128.178.1.17
MeasData.User.Count|User.Count
--
<!DEF>
function <!TW>MeasData.User.Count : real;
<!TXT>
Returns the number of user defined measdata fields. 
>>
<<
128.178.1.18
MeasData.User.Name|User.Name
!128.178.1.17
--
<!DEF>
function <!TW>MeasData.User.Name (rIndex : real) : string;
<!TXT>
Returns the name of the <!PW>rIndex-th user defined measdata fields. Counting starts with 1.
>>
<<
128.178.1.19
MeasData.User.Get|User.Get
!128.178.2.7
!128.178.1.17
--
<!DEF>
function <!TW>MeasData.User.Get (rIndex : real) : string;
<!TXT>
Returns the value of the <!PW>rIndex-th user defined measdata fields. Counting starts with 1.

<!DEF>
function <!TW>MeasData.User.Get (sName : string) : string;
<!TXT>
Returns the value of the user defined measdata fields with the name <!PW>sName. 
>>

<<
128.178.1.20
MeasData.Field|Field
--
<!DEF>
function <!TW>MeasData.Field (sField : String) : string;
<!TXT>
Returns the value of the user defined field <!PW>sField as string.
>>
<<
128.178.1.21
MeasData.MDA|MDA
--
<!DEF>
function <!TW>MeasData.MDA : real;
<!TXT>
Returns true if the field MDA is activ for the selected measurement record.
MDA stood for Meas Data Acquisition and saves the meas data to the database if the field is active.
>>
<<
128.178.1.22
MeasData.TestStartTime|TestStartTime
--
<!DEF>
function <!TW>MeasData.TestStartTime : real;
<!TXT>
Returns the start time of the test step for the selected measurement record.
>>
<<
128.178.1.22
MeasData.TestEndTime|TestEndTime
--
<!DEF>
function <!TW>MeasData.TestEndTime : real;
<!TXT>
Returns the end time of the test step for the selected measurement record.
>>

<<
128.178.2
Procedures of the MeasData-object|Procedures
--
>>
<<
128.178.2.1
MeasData.First|First
--
<!DEF>
procedure <!TW>MeasData.First (rDUTNr : real);
<!TXT>
Sets the internal list pointer to the first measurement record of the DUT <!PW>rDUTNr which matches the filter that has been set.

Sets <!RW>EOF on <!RW>true, if there is no record match.

In simultaneous test mode <!SW>Single (only one DUT at a time), rDUTNr may be <!SW>0, this will select the active DUT.

In the other simultaneous test modes the Number of the DUT must be given (1..Number of DUTs). 

<!DEF>
procedure <!TW>MeasData.First;
<!TXT>
This special form is only allowed in simultaneous test mode <!SW>Single. It works like:
<!CODE>
MeasData.First (0);
<!TXT>
>>

<<
128.178.2.2
MeasData.Next|Next
--
<!DEF>
procedure <!TW>MeasData.Next;
<!TXT>
Sets the internal list pointer to the next measurement record which matches the set filter criteria. 

Sets <!RW>EOF on <!RW>true, if no other record match is found.
>>

<<
128.178.2.3
MeasData.Filter|Filter
--
<!DEF>
procedure <!TW>MeasData.Filter (rArt : real);
<!TXT>
Sets the filter for the 'visibility' of the measured value records. 

 <!PW>rArt is a bit pattern.

Significance of the single bits, if set:
<!STBL>
<!>1<!>measured value records with step result PASS are visible<!>
<!>2<!>measured value records with step result INVALID are visible<!>
<!>4<!>measured value records with step result FAIL are visible<!>
<!>8<!>measured value records with step result NONE are visible<!>
<!ETBL>

<!CODE>
MeasData.Filter (1);
<!TXT>
Only good test steps appear

<!CODE>
MeasData.Filter (14);
<!TXT>
All test steps that are not good appear

<!CODE>
MeasData.Filter (4);
<!TXT>
All real error-test steps appear 

<!CODE>
MeasData.Filter (10);
<!TXT>
All test steps which have no reasonable result appear (Invalid or none)

<!CODE>
MeasData.Filter (0);  IS NOT PERMITTED !!!
<!TXT>
>>

<<
128.178.2.4
MeasData.New|New
!128.178.2.5 - MeasData.Set
!128.178.2.6 - MeasData.Add
--
<!DEF>
procedure <!TW>MeasData.New;
<!TXT>
Generates a new, synthetic measured value.

The measured value contains all the characteristics of the current test step (description, limits, unit etc.). 

The characteristics must be set with <!RW>MeasData.Set.

If a synthetic measured value already exists, it will be destroyed and a new one will be generated.

For example see <!RW>MeasData.Set
>>
<<
128.178.2.5
MeasData.Set|Set
!128.10.3.5 - SetStepResult
!128.10.3.4 - SetValue
!128.178.2.4 - MeasData.New
!128.178.2.6 - MeasData.Add
--
<!DEF>
procedure <!TW>MeasData.Set (sIdent : string; .Value : real|string);
<!TXT>
Sets a characteristic for a synthetic measured value. 

First a synthetic measured value must be generated with <!RW>MeasData.New;.

The characteristics are addressed by their names. The data type of the value must match the type of the characteristic.

The characteristics defined at the moment and the data types

<!STBL>
<!+>Name<!+>Data type(s)<!+>Description<!>
<!>Number      <!>Real         <!>Test step number<!>
<!>Info        <!>String       <!>Designation<!>
<!>LowerLimit  <!>Real         <!>Lower limit<!>
<!>UpperLimit  <!>Real         <!>Upper limit<!>
<!>Unit        <!>String       <!>Unit<!>
<!>Precision   <!>Real (0..9)  <!>Decimal places<!>
<!>SaveData    <!>Real (bool)  <!>Save measured value ?<br>0 / false : no<br>1 / true  : yes<!> 
<!>Duration    <!>Real         <!>test step duration<!>
<!>MeasValue   <!>String/Real  <!>measured value<!>
<!>StepResult  <!>Real (0..3)  <!>Result<br>0 : none<br>1 : Pass<br>2 : Fail<br>3 : invalid<!>
<!>Comment     <!>String       <!>Comment<!>
<!ETBL>

The characteristics can be overwritten as often as needed. The names can be specified with lower- or upper case.

If the characteristics 'LowerLimit', 'UpperLimit' or 'MeasValue' are set, the StepResult is calculated automatically, if the MeasValue is a number.

Example:
<!CODE>  
  // generate measured value
  MeasData.New;
  // set characteristics 
  MeasData.Set ('Info',       'only an example!');
  MeasData.Set ('UpperLimit',  55);
  MeasData.Set ('LowerLimit',  45);
  MeasData.Set ('MeasValue',   50);
  // save measured value
  MeasData.Add;
<!TXT>
>>

<<
128.178.2.6
MeasData.Add|Add
!128.178.2.4 - MeasData.New
!128.178.2.5 - MeasData.Set
--
<!DEF>
procedure <!TW>MeasData.Add (rDutNr : real);
<!TXT>
Writes the previously generated and characterized synthetic measured value in the measured value list of the DUT specified by the <!PW>rDUTNr.

In simultaneous test mode <!SW>Single (only one DUT at a time), rDUTNr may be <!SW>0, this will add the data to the value list of the active DUT.

In the other simultaneous test modes the Number of the DUT must be given (1..Number of DUTs). 

The measured value is treated and analysed as a normally generated measued value. The test step generates anyhow another 'normal' measured value.

First a synthetic measured value with <!RW>MeasData.New must have been generated.

After this command there is no synthetic measured value available any longer. However, if another is needed, it must be generated also with <!RW>MeasData.New. 

<!DEF>
procedure <!TW>MeasData.Add;
<!TXT>
This special form is only allowed in simultaneous test mode <!SW>Single. It works like:
<!CODE>
MeasData.Add (0);
<!TXT>
>>
<<
128.178.2.7
MeasData.User.Set|User.Set
!128.178.1.19
--
<!DEF>
procedure <!TW>MeasData.User.Set (rIndex : real; sValue : string|real);
<!TXT>
Sets the value of the <!PW>rIndex-th user defined measdata field to <!PW>sValue. Counting for <!PW>rIndex starts with 1. 

<!DEF>
function <!TW>MeasData.User.Set (sName, sValue : string) : string;
<!TXT>
Sets the value of the user defined measdata field with then name <!PW>sName to <!PW>sValue.

The values defined with <!RW>MeasData.User.Set will be transfered to the particular measured data sets, when these are added to the DUT measured data list. For normal measured data sets, this happens after the step is finished, for synthesized measured datasets, the happen with the <!RW>MeasData.Add command.

The fields themselves keep their value as long as defined in the baisc setup.
>>

