Call me back | My basket | Checkout | Add to email list

     You are here: Website » Knowledge base

« back to website

PerformanceMonitor / ScriptingLanguage

Scripting language


Performance monitor works based on scripts and it will help to run the scripts and evaluate the results. Users can write their own scripts using the following keywords. The script file should be saved as *.per on scripts directory.


Keywords


  • % <Comment>

Used to add comment and comment should start with “%” Example: %this script is for a typical 0 to 60mph standing start acceleration


  • UseVariableFile “Variable file path”

This keyword is used to specify a variable file and it should be defined at the start of the script. This keyword helps to use different *.VAR files with different scripts.

Example: UseVariableFile “c:\MetricUnits.var”


  • StartTest

This keyword defines the start of a main test and also controls what is shown on the graph and the test results


  • EndTest

This keyword defines the end of main test and data logging.


  • Declare <VariableName>

Which can be used to define user variables and these variables can record temporary or intermediate results. the maximum variable length should be 30

Example:

Declare StartTime
StartTime = VAR_0001


  • VAR

A “VAR” used to define variable id as in the variable file. User need to define variable id as 4 digit number with “VAR_” keyword

Example: VAR_0015 (define speed variable)


  • TEMP

A “TEMP” is used to define temporary variables and these variables record temporary or intermediate results. User can define TEMP_0000 to TEMP_4000 variables. The temporary variable id is represented as 4 digit number with “TEMP_” keyword

Example: TEMP_0005 = VAR_0200

   (Records the current value of VAR_0200 for use later)


  • Display “Text”, <Variable ID>, <Decimal Places>, <Font Size>

On screen a “display” command controls the variable that is displayed on to the left of the “status” label. The user can define the no of decimal places and font size as optional parameters.

Example: Display “Speed”, VAR_0015 (display speed)

    Display “Speed”, VAR_0015, 3, 18


  • Prompt “Text Here”, <Font Size>

A “Prompt” command is used to display instructions back to the user in the performance monitor. These instructions may help to continue the performance test. Also user can define font size as an optional parameter.

Examples: Prompt “Accelerate to 60mph

     Prompt “Start braking NOW!”
     Prompt “TEST COMPLETE”, 24		


  • Wait <Condition>

This keyword is used to check if a particular condition is met. This can be used with “and”, “or” operators to combine in forming multiple conditions

Examples: Wait VAR_0006 < 7.667

     Wait VAR_0006 < 7.667 or VAR_0201 > 8.998
     Wait (VAR_0006 < 7.667 or VAR_0201 > 8.998) and (VAR_0010 < 2500)


  • RecordResult “Display text”, <Formula>,<Decimal Places>,

This keyword is used to record results while a test is running and display it on summary results window. The user can configure the no of decimal places needed to be shown with the value.

Example: RecordResult “Text here”, (VAR_0667-VAR_0200)


  • Graph <Variable ID>, <Min>, <Max>, < time (in seconds) along the x axis >

A “Graph” is used for defining the variable that should be displayed on the test graph which is located under summary results window. With the variable id user can specify Min, Max and time along X axis. These are optional and if nothing is specified, then scaling is automatic.

Example: 1. Graph VAR_0200, 0, 60, 20 (manual scaling)

(This would display VAR_0200 on the graph, with a minimum of 0, a maximum of 60 on the X scale and 20 seconds along the x axis.)

   2. Graph VAR_0200 (automatic scaling)

(This would display VAR_0200 on the graph, with automatic scaling and 10 seconds along the x axis.


  • Repeat (<number of times>)

{ %things to do here! }

With the “Repeat” keyword user can define a simple loop. The <number of times> specify how many times should the loop run.


  • OpenPromptWindow <Font Size>,<Display time in seconds>

This keyword is used to open a separate prompt window to display the text define by the “Prompt” keyword. With this keyword user can define prompt window font size and display time as an optional parameter.

Example: OpenPromptWindow 30, 10


  • ClosePromptWindow

This keyword is used to close the previously opened prompt window.


  • GetTestName(<Text here>)

This keyword is used to prompt a input box to enter a test name while the test is running.

Example: GetTestName(Please enter test name)


Page last modified on August 13, 2009, at 03:01 PM