Example of using the evaluation parameters

You can configure the evaluation with SetEvaluationParameter first before enabling the evaluation process using SetEvaluationParameter with evalEcatControl. Below is an example of a general procedure from launching the evaluation to read the evaluation result.

 

  1. This step is optional. Using SetEvaluationParameter with evalEcatTriggerMode to select the Trigger Mode.
  2. This step is optional. Using SetEvaluationParameter with evalEcatTriggerParam to set up the Trigger Parameter for the corresponding Trigger Mode.
  3. This step is optional. Using SetEvaluationParameter with evalEcatTriggerDelay to set up the Trigger Delay for the evaluation process to start when the trigger condition is met.
  4. This step is optional. Using SetEvaluationParameter with evalEcatMode to set up the Evaluation Mode.
  5. This step is optional. Using SetEvaluationParameter with evalEcatEndParam to set up the End Parameter for the corresponding Evaluation Mode.
  6. Write 1 to Control (using SetEvaluationParameter with evalEcatControl) to enable the evaluation process.
  7. Using GetEvaluationParameter with evalEcatStatus to check if Status switches to 1, which presents the evaluation process is enabled as expected.
  8. The enabled evaluation process will wait for the trigger after the master state switches to Op (Operational) state.
  9. The evaluation process starts and Status switches to 2 (using GetEvaluationParameter with evalEcatStatus to check for the evaluation process status), which represents Running.
  10. Wait until Status switches to 3 (using GetEvaluationParameter with evalEcatStatus), which represents Finished.
  11. Try using GetEvaluationParameter with any Result Parameters such as evalEcatProcessingTime to retrieve the evaluation results.

 

NOTE:  The configuration is not allowed when Status is 2 (Running). In such case, using the SetEvaluationParameter with any configuration parameters will get a wrong environment error.

NOTE:  Setting evalEcatControl will get a corresponding evalEcatStatus, please make sure the evalEcatStatus is as expected before setting the next evalEcatControl. Furthermore, each Control command has its own allowed Status, please refer to the matrix below. If a Control command is input for an invalid Status, then the Error Code will be -1 (Wrong Control) and the new Control will not be downloaded, e.g., using GetEvaluationParameter with evalEcatControl will retrieve the value before the new Control is commanded.

New Control Allowed Status Next Status Descriptions
0 (Disable) 3 (Finished) or 4 (Error Stop) 0 (Idle) It is an ACK (Acknowledgment) for the finished evaluation. The kept evaluation result gets cleared and the evaluation process is released so that it can be enabled again.
1 (Enable) 0 (Idle) 1 (Enabled) or 2 (Running) It enables the evaluation and the process starts to wait for trigger. If the trigger condition is met right away, the Status will directly switch to 2 (Running).
2 (Pause) N/A N/A N/A
3 (Stop) 2 (Running) 3 (Finished) It stops the evaluation but the unfinished evaluation result is kept.

Below is the evaluation process status switching scenarios not presented above.

Status Next Status Descriptions
2 (Running) 3 (Finished) The end condition is met.
2 (Running) 4 (Error Stop) The master state switches away from Op (Operational).

 

NOTE:  The evaluation will stop itself when the master state switches away from Op (Operational).