FirstStepsAsText

From emotive
Jump to navigation Jump to search

In this section, we would like to step-by-step help you get started in the Open Test Framework. We assume that the OTF is already installed and activated.

Creating and configuring a new solution

  1. Start the OTF.
  2. Click on the "New Project..." command in the Start Page.
  3. Leave all the settings in the dialog box unchanged and click "OK" button.
  4. In the Solution Explorer, right-click on the new project in the new solution and select the "Properties" entry in the context menu.
  5. In the project settings dialog box, click on the tab "DiagCom (ODX Diagnostic Data)" and select the database "Demo".
  6. Click "OK" button.

Preparing a sequence for reading the error memory status

  1. Select the "Diagnostic Database View" tab in the Toolbox.
  2. Click on the Odx View Mode drop-down button ("OdxViewMode.png") in the Toolbox, and select the "Semantic" view mode.
  3. Expand the logical connection ("LogicalLink16.png") and expand the base variant node "ECU 1" ("BaseVariantSemantic16.png").
  4. Drag the semantic attribute node "FAULTREAD" ("DiagComSemantic16.png") and drop it on the green plus sign in the Workflow Designer, then select the "ExecuteDiagService" entry in the popped up context menu.
  5. After the new ExecuteDiagService activity is created, select the property RequestParams in the Properties tool window and click on the "..." button.
  6. In request parameters section, set the value of "Group of DTC" to "gesamter Fehlerspeicher".
  7. In response parameters section, open the "DTC" combo box and select the entry "<Create new variable...>".
  8. Leave the pre-set values of the new variable unchanged and click "OK" button (the "DTC1" variable is created and applied).
  9. Click the button "OK" on the dialog box for setting diagnostic service.
Result: you now have an activity to read out the status of the fault memory with a produced semantic-atrribute, a set request parameter and a response parameters tied to a new variable. The sequence is now ready for execution.

Preparing the sequence for reading the individual fault memory entries with looping

  1. Select the "Core" tab in the Toolbox.
  2. Drag and drop the activity ForEachLoop|"ForEachLoop" under the ExecuteDiagService activity.
  3. In the Properties tool window, open the "Collection" combo-box and select the "DTC1" variable.
  4. Open the "Locator" combo-box and select the entry "<Create new variable...>", leave the pre-set values unchanged and click "OK" button (the Locator1 variable is created and applied).
  5. Select the tab "Diagnostic Database View" in the Toolbox and set the View Mode to "Diagnostic", and search below the base variant node ECU 1 for the diagnostic service "ECU 1 \ Fault Memory \ FaultMemoryReadStatusOfDtc". Drag this service and drop it inside the ForEachLoop activity to create a new ExecuteDiagService activity.
  6. In the Properties tool window, open the dialog box for setting diagnostic service and input the "DTC" request parameter with the expression "DTC1[Locator1]" (using the variable Locator1 as an index to access each value in the list DTC1).
  7. Create and bind new variables to the response parameters "DTC Fault symptom", "DTC Test Complete", "DTC Storage State", "DTC Warning Lamp", see above.
Result: Now you can read all diagnostic trouble codes, extract the related environment data and bind it to new variables. The sequence is now ready for execution.

Starting the newly created sequence

  1. Click on the "Start sequence" command in the tab "Start" of the Ribbon.
  2. You can view the recorded diagnostic communication and the variables changes in the Trace window.
    Exclamation.png Note: When running a sequence, the corresponding OTX document is automatically saved but the changes can be undone or redone with Undo / Redo command.

Modifying the sequence by adding an HMI activity

  1. Select the tab "HMI" in the Toolbox.
  2. Drag the activity ConfirmDialog into the Workflow Designer and drop it at the end of the sequence.
  3. In the Properties tool window, select the "Title" property and input the string "Error memory".
    Exclamation.png Note: The input string must be quoted!
  4. Open the "Message" combo-box and select the "<Expression...>" entry.
  5. Search for the term "Terms \ String \ StringConcatenate(«string», «string», «....»)" and double-click on the term to apply it.
  6. Click on the first "«string»" argument and enter the string "Number of errors:" with quotation marks
  7. Select the second "«string»" argument and search for the term "Terms \ Conversion \ ToString(«term»)", double-click on the term.
  8. Select the "«term»" argument and search for the variable "Local Variables \ Locator1", double-click on the variable.
  9. Delete the third ", «string»" argument (also the comma), the final expression should be presented as follows:
    "StringConcatenate("Number of errors:", ToString(Locator1))".
  10. Click "OK" button to apply the newly created term to the "Message" property.

Starting the sequence after modifying

  1. Click on the "Start sequence" command again.
  2. A dialog box occurs displaying the number of errors found.


You have now created, executed, and saved your first sequence. We recommend that you look at the included OTX Sample solution now. It contains numerous OTX sample documents, which represent the essential OTX principles. You can find the Sample solution in the Start Page under the "Recent Solutions".