Este analisis es sobre la Hija del Puma un libro de Monica Zak. Es del capitulo 1 al 10 espero poder ayudarlos :)
DOCFull description
,Full description
Analiza SWOT si analiza STEEP pentru compania PumaFull description
Full description
03/2015 AT4105E, Rev. 24
User´s Guide
SCRIPTING IN PUMA OPEN AVL PUMA OPEN 2012 PUMA Open v1.5.3
Copyright 2015 AVL List GmbH, Graz - Austria The contents of this document may not be reproduced in any form or communicated to any third party without the prior written consent of AVL. While every effort is made to ensure its correctness, AVL assumes no responsibility neither for errors and omissions which may occur in this document nor for damage caused by them. All mentioned trademarks or registered trademarks are owned by their respective owners. All rights reserved.
Table of Contents
Table of Contents 1 What You Should Know.................................................................................................... 7 1.1
Product Version ........................................................................................................................ 8
1.4
Product-specific Information ..................................................................................................... 8
1.5
About this Documentation ........................................................................................................ 8 1.5.1 Abbreviations and Glossary Terms..................................................................................... 9 1.5.2 Typographic Conventions ................................................................................................... 9 1.5.3 Online Help ....................................................................................................................... 10 1.5.4 We Want to Hear from You............................................................................................... 10
2 Scripting in BSQ/SSQ ..................................................................................................... 11 2.1
Script Context Elements in Detail ........................................................................................... 11
2.2
Standard Elements of a Script Context .................................................................................. 12 2.2.1 Editing Scripts ................................................................................................................... 14
2.3
Creating and Setting Up Script Contexts................................................................................ 16
2.4
Activating Scripts in BSQ/SSQ ............................................................................................... 17 2.4.1 Via Script Context ............................................................................................................. 17 2.4.2 Via Script Activation Command ........................................................................................ 19
Modifying Scripts .................................................................................................................... 20 2.6.1 Delete Script Context ........................................................................................................ 20 2.6.2 Delete Script Function from a Script Context.................................................................... 20 2.6.3 Modify Signature of a Script.............................................................................................. 21
3 Activating Scripts via Other Components .................................................................... 23 3.1
Defining Script Contexts in the TFP, SYS and UUT Parameters ........................................... 23
3.2
Activating Scripts via POI ...................................................................................................... 23 3.2.1 Execute Script in Default Context .................................................................................... 24 3.2.2 Execute Script In User-Defined Context ........................................................................... 25
3.3
Using Script Functions to React to Limit Violations ............................................................... 25 3.3.1 Contents of the Script Context .......................................................................................... 26 3.3.2 Contents of the Script Functions....................................................................................... 27 3.3.3 Define Limit Monitoring ..................................................................................................... 27
4 Application Example ....................................................................................................... 29 4.1
Contents of the Script Functions ............................................................................................ 32
4.5
Contents of the Script Context................................................................................................ 33
5 Testing and Debugging................................................................................................... 37 5.1
Interactive Testing via the System Explorer ........................................................................... 37
5.2
Step-by-step Testing in the BSQ ............................................................................................ 39
5.3
Debugging .............................................................................................................................. 40 5.3.1 Use Messages and Tracer Windows ................................................................................40 5.3.2 Use MSTM Script Debugger ..............................................................................................41 5.3.3 Open Script Debugger ......................................................................................................42 5.3.4 Debugging of the Script Context's Setup Function ...........................................................44 5.3.5 Set Breakpoints .................................................................................................................44 5.3.6 Values of Variables ...........................................................................................................45
6 Functions of the PUMA Open Script API....................................................................... 49 6.1
Dataflow.................................................................................................................................. 63 6.2.1 Filter Functions..................................................................................................................63 6.2.2 Flexible Parameters ..........................................................................................................67 6.2.3 Formula Calculator ............................................................................................................68 6.2.4 Lookup Table ....................................................................................................................69 6.2.5 Multi Function Generator...................................................................................................79
6.3
General Purpose Control........................................................................................................ 80 6.3.1 PID Control........................................................................................................................81 6.3.2 Test Cell Controller ...........................................................................................................83 6.3.3 Test Cell Devices ..............................................................................................................87 6.3.4 Two/Three Point Control ...................................................................................................88
Parameter Access ................................................................................................................ 311 6.9.1 Parameters ..................................................................................................................... 311 AVL PUMA Open 2012 — Scripting in PUMA Open
5
6
Table of Contents
6.10 UUT Control.......................................................................................................................... 317 6.10.1 EMCON Support .............................................................................................................317 6.10.2 Advanced UUT support ...................................................................................................317 6.10.3 Engine Electronic Interface .............................................................................................318 6.10.4 Testrun Executor .............................................................................................................343 6.10.5 Step Sequence Commands ............................................................................................345 6.10.6 EC-Recorder ...................................................................................................................346 6.10.7 MCD3D ...........................................................................................................................346 6.11 Chassis Dyno Control........................................................................................................... 348 6.11.1 Driver´s Aid .....................................................................................................................348 6.11.2 VECON ...........................................................................................................................351 6.12 Scripting................................................................................................................................ 355 6.12.1 Script Activation ..............................................................................................................355 6.13 Service.................................................................................................................................. 359 6.13.1 Dyno Access ...................................................................................................................359 6.14 Miscellaneous....................................................................................................................... 361 6.14.1 Common Commands ......................................................................................................361 6.14.2 CameoAgentConnection .................................................................................................372 6.14.3 Global resources .............................................................................................................372 6.14.4 Central Data ....................................................................................................................372 6.15 Monitoring............................................................................................................................. 373 6.15.1 Limit Monitoring ...............................................................................................................373 6.15.2 Operational Data Monitoring ...........................................................................................375 6.15.3 PostMortem .....................................................................................................................377 6.15.4 Reference Cycle Monitoring ............................................................................................377
7 Important Changes Since PO 1.2 ................................................................................. 379 Index............................................................................................................................................................ 381
AVL PUMA Open 2012 — Scripting in PUMA Open
What You Should Know
1
What You Should Know PUMA Open offers the possibility to use scripting also in automation systems. This enables users to access a selected set of functions of the automation system via these scripting components. The scripting components can also be accessed from the automation system (test run definition BSQ/SSQ and test cell control definition TCC). This allows users to extend the capabilities of the automation system on their own.
1.1
Safety Instructions This documentation contains important warnings and safety instructions that must be observed by the user. Smooth operation can only be ensured if the requirements are met and the safety instructions are followed. Information Scripting is based on functions provided by Microsoft in the MS Windows operating system.
NOTICE Script execution can seriously affect the performance of the test bed system by:
lengthy mathematical operations
blocking requests via the network
intensive access to the file system
access to third-party software components that are not compatible with the test bed system, etc.
Thus it is recommended that scripts are developed by trained users only. Any damage is within the responsibility of the user!
NOTICE As the performance of the automation system can be affected seriously by scripting, administrator privileges are required to create, modify or delete script contexts. The use of existing script contexts in the BSQ, SSQ, etc., however, is not restricted by user rights.
1.2
Intended Application The product is only intended for the area of application which is described in the documentation. If used contrary to its intended purpose or if the requirements and safety measures mentioned are not observed, no guarantee and/or liability shall be assumed.
AVL PUMA Open 2012 — Scripting in PUMA Open
7
8
What You Should Know
1.3
1.4
Product Version Product version
AVL PUMA Open 2012
Internal version
PUMA Open v1.5.3
Product-specific Information Information Scripting is based on functions provided by Microsoft in the MS WindowsTM operating system. The MS Script Debugger can be found on Vendor CD1:
VBScript documentation (part of the 'Microsoft WindowsTM Script 5.6 Documentation'):
MS\Scripting\scrdoc56en.exe
Information Part of the automation system's functionality is excluded from use in scripts, e.g:
Steady-state step sequences
Dynamic step sequences
Road profiles
Information For information on the functions that may be used in scripts, refer to the documentation "Activation Objects".
1.5
About this Documentation Target group
This manual has been written to assist users (test run preparators, application engineers, test bed operators) in creating scripts and script contexts in PUMA Open. Simple examples are given which illustrate and describe the procedures clearly and in detail.
Contents and scope
The manual provides information on the following topics:
Secondary literature
Scripting in BSQ/SSQ on page 11.
Activating Scripts via Other Components on page 23.
Application Example on page 29
Testing and Debugging on page 37
For information on the functions that may be used in scripts, refer to the documentation BSQ and Toolbox
AVL PUMA Open 2012 — Scripting in PUMA Open
What You Should Know
1.5.1
1.5.2
Abbreviations and Glossary Terms AO
Activation Object
BSQ
Block Sequence Editor
POI
PUMA Open Interface
TCC
Test Cell Control
SSQ
Step Sequence Editor
SOX
System Explorer
Typographic Conventions The following symbols and standard text styles are used within this document: NOTICE This text indicates situations or operation errors which could result in property damage or data loss.
Information This text indicates important information or operating instructions. Not observing these instructions could inhibit or impede you from successfully completing the tasks described in this documentation. Example This text gives an example. Standard text styles: Bold
Parameters; control elements in windows and dialog boxes; important text
Italics
Cross-references; foreign-language or new terms; wild-card for elements that need to be entered by the user, i.e. characters or text. If you read, for example, macro name, you are required to type the name of a macro.
UPPERCASE LETTERS
Operating modes
Courier
Programming examples; source code
Times New Roman
Formulas
Menu | Option
Description of how to select a menu item from a given menu
Lists: 1.
Step-by-step procedures with a given sequence
2. •
One-step instructions
Unordered series of concepts, items or options
– –
AVL PUMA Open 2012 — Scripting in PUMA Open
9
10
What You Should Know
1.5.3
Online Help This printed manual is also available as online Help. To access online Help:
open the PUMA Open Help menu
or press the [F1] key for context-sensitive help.
1.5.4
We Want to Hear from You Your comments and suggestions help us to improve the quality and practical relevance of our manuals. If you have any suggestions for improvement, please send them to: [email protected] We look forward to hearing from you!
AVL PUMA Open 2012 — Scripting in PUMA Open
Scripting in BSQ/SSQ
2
Scripting in BSQ/SSQ Scripts for customer-defined applications are provided by means of individual "script contexts" in PUMA Open. These contexts are embedded into the PO Script API and constitute a separate execution environment with its separate thread (i.e. script contexts can operate in parallel), variable space (context-local variables) and function space (context-local helper functions and subroutines). Based on the definition of such a context, the customer can define scripts that can directly be invoked within the BSQ or SSQ.
2.1
Script Context Elements in Detail
Any execution context has its own individual "context-local" variables. They can neither be seen from other contexts nor from the global PUMA Open "variable space" that is formed by all of the normnames. Although these variables are referred to as "context-local" variables, they are "global" for all scripts that are defined for that context. Variables in the context are defined using the statement "Dim": Dim A Dim B Dim C .....
A default "Initialize" and "Terminate" sub-routine can be defined to initialize and release global variables. "Initialize" is executed before the system enters the state that is capable of running a test (MANUAL). "Terminate" is executed shortly before MANUAL mode is about to be left for MONITOR mode. Sub Initialize ( ) .... End Sub Sub Terminate ( ) End Sub
Any execution context can have its own set of individual "helper scripts" that are organized in functions and sub-routines. These user-defined helpers can be accessed from script functions in addition to the functions of the PUMA Open Script API. Function xyz (...) .... End Function Sub uvw (...) .... End Sub
AVL PUMA Open 2012 — Scripting in PUMA Open
11
12
Scripting in BSQ/SSQ
2.2
Standard Elements of a Script Context The figure below shows the script context editor:
Fig. 1 Name
Description
Range
Name
Name of script context
Up to 32 characters
Description
Purpose of script context
-
Edit Context...
Opens an editor for the base script, which contains global variable definitions, Initialize and Terminate subroutines as well as user-defined help functions.
-
Add new script function to context
Up to 32 characters
Remove script function
-
Description of currently selected script function
Up to 1000 characters
Box "Context"
Box "Scripts"
Description Box "Parameters" Tab. 1
AVL PUMA Open 2012 — Scripting in PUMA Open
Scripting in BSQ/SSQ
Name
Description
Range
Add new parameter in the Name box
-
Remove parameter in the Name box
-
Define parameter sequence
-
Name
Shows the names of the arguments of the selected script function.
Up to 32 characters
Default Value
Values for the arguments are entered. However, there is no checking of types or values.
-
Note: The values and value types are interpreted according to the script definitions. For example, type "String" parameters can be interpreted as normnames internally in the script and, with the relevant functions, be used to access normnames. Monitor Timeout
Script execution time-out in seconds can be entered in the input box. The valid range is 1 <=Timeout<=65535. If this check box is not selected, the default value will be used.
-
Load...
Retrieves and loads a script context definition from the file system..
-
Save
Stores the current script context definition as file on the file system.
-
OK
Saves the script context.
-
Cancel
Cancels the procedure.
-
Tab. 1
AVL PUMA Open 2012 — Scripting in PUMA Open
13
14
Scripting in BSQ/SSQ
2.2.1
Editing Scripts The Edit Script button in the parameter group Scripts opens the editor with which the script body is defined (without Sub... and End Sub) - see figure below.
Fig. 2 The script editor's shortcut menu provides the commands Cut, Copy, Paste, Save as, Find, Replace and Properties. The Properties command can be used to change the formatting of the script code in the script editor (see the figure below):
Fig. 3 Scripting in PUMA Open offers support during function input, similar to the "autocomplete" functions in conventional integrated development environments (IDEs). For this purpose, press Ctrl+SpaceBar on the keyboard. All functions and subroutines of the PUMA Open Script API will appear in a list box (see figure below).
AVL PUMA Open 2012 — Scripting in PUMA Open
Scripting in BSQ/SSQ
Fig. 4 When a function is selected by pressing the space bar or "(", a list of all necessary parameters for this function will be shown in a tooltip.
Fig. 5
Information The functions and subroutines in the list cover all functions of the current PUMA Open software release. The availability of a function depends, however, on the current software configuration and the functions installed on the test bed.
AVL PUMA Open 2012 — Scripting in PUMA Open
15
16
Scripting in BSQ/SSQ
2.3
Creating and Setting Up Script Contexts To create and set up a script context, a test must have been defined and opened in PUMA Open. 1.
Select the Library tab in the Toolbox.
2.
Select New in the Library's shortcut menu (right-click on background of library). In the submenu that appears, select Script Context. A new script context with a default name ("Script Context") will be created. This name can be changed in the Library pane or later on in the script context editor.
3.
Double-click the new script context object in the Library pane to open the script context editor.
4.
Click the Edit context button in the parameter group Context to open the editor for making basic definitions (global variables, Initialize and Terminate subroutines, additional helper functions). Define the base script and click OK return to the script context editor.
5.
In the parameter group Scripts, click this button to create a new script function within the script context. This script function can be used later on in the BSQ/SSQ via specific activation modules. The default name "Script" is assigned to the new script function. If you want to change the name, select it in the list and change it as desired.
6.
Add parameter(s) for the selected script function in the box provided in the lower section of the dialog box and double-click the selected line to assign default values under Default Value.
7.
Click Edit script to open the editor for the script body. Define the script body and click OK to return to the script context editor. In the field for the description, a comment can be entered for each script.
8.
Click OK in the script context editor to save the script context. Information
It is possible to read in complete script context definitions or to output them in text format on the file system.
Information If the maximum size of 100000 characters for the script context definition or a script function body is exceeded, the script cannot be saved. The script context editor will remain open. In this case, shorten the script and click OK again.
Information In the AO Server is a limit of 500 pending requests for each context . If this requests exceed the limit of 500 the Ao Server stops to prevent malfunctions in different areas. In almost all cases this occurs related to a high frequency TCC flooding the AO Server.
AVL PUMA Open 2012 — Scripting in PUMA Open
Scripting in BSQ/SSQ
Information Script contexts can also be created in the AVL Explorer: 1.
Select Projects | AVL | Project Data in the AVL Explorer.
2.
Double-click the system parameters in the list view.
3.
Add a new SCR block.
Double-click the new block to open the script context.
2.4
Activating Scripts in BSQ/SSQ It is possible to insert script functions into a test (BSQ, steady-state SSQ or dynamic SSQ). This can be done in two ways, as described below.
2.4.1
Via Script Context 1.
Drag a script context from the test library into the BSQ (or into the script track of a steady-state or dynamic SSQ) to create a script activation component.
2.
Double-click the new component to open the script activation editor. Select a script function and fill in values for its arguments or accept the predefined default values. Information
The script activation editor looks like the activation object editor. Additionally, the Details button is available, which opens the script context editor. 3.
Change the Monitor timeout setting, if needed.
AVL PUMA Open 2012 — Scripting in PUMA Open
17
18
Scripting in BSQ/SSQ
4.
Click OK in the script activation editor to save the script activation.
Fig. 6
Information As an alternative to using the script context directly, you can also use the "Script Context" item from the Toolbox and drag it into the BSQ/SSQ. The editor, which opens automatically, looks like this:
Fig. 7
AVL PUMA Open 2012 — Scripting in PUMA Open
Scripting in BSQ/SSQ
2.4.2
Via Script Activation Command As an alternative to using a script context object from the Library, the "Scripting" activation object from the "Commands" folder in the Toolbox can be used.
Fig. 8 1.
Drag the Scripting activation object from the Commands folder of the Toolbox into the BSQ (or into the command track of a steady-state or dynamic SSQ). This will create an activation for a script context function.
2.
Double-click the script activation to open the activation object editor. Select the Execute function. Enter the script context name in the input box Name under Device and the script invocation under Value in parameter group Command (e.g. in figure above: DoThis 123, "ABC").
3.
Click OK in the activation object editor to save the script activation. Information
The generic script activation object does not contain default values (script parameters, etc.).
Information If no script context name is indicated under Device / Name, the defined script will be processed in the default test bed context. In the default context, only predefined functions from the PUMA Open Script API can be used.
AVL PUMA Open 2012 — Scripting in PUMA Open
19
20
Scripting in BSQ/SSQ
Information Scripts defined in TFP, SYS and UUT can only be activated in the BSQ by using the 'Scripting' activation object.
2.5
Copying Script Contexts Script contexts can be copied within a test or from one test to another. For this purpose, a test with at least one script context must have been opened in PUMA Open.
2.6
1.
Select the Library tab in the Toolbox.
2.
Right-click the script context in the source test settings. Select Copy.
3.
Right-click the background of the target test library (or the source test). Select Paste. The script context will be copied to the target test. If target test and source test are identical, the copy will get the default name "Copy of ". If target test and source test are different, the copy will get the same name as the source script context
Modifying Scripts You can modify a script or script context in the following ways:
Delete a script context
Remove a script function from a script context
Modify the signature (name of the function or argument list) of a script function
For this purpose, a test with at least one script context must have been created in PUMA Open. The script context must contain at least one script.
2.6.1
Delete Script Context 1.
Right-click a script context in the test library.
2.
Select Delete from the shortcut menu to delete the script context. Information
If the script context activation is already being used in the BSQ or in an SSQ, the script context cannot be deleted.
Information If the script context is already being used via a "Scripting" activation object from the Commands folder, deletion will not be prevented.
2.6.2
Delete Script Function from a Script Context Select a script function in the script context editor and click this button. The script function will be deleted and removed from the list.
AVL PUMA Open 2012 — Scripting in PUMA Open
Scripting in BSQ/SSQ
Information Using the selected script function in the BSQ or an SSQ does not prevent its deletion! The system recognices and shows, if you want to delete a used script function. It asks you to decide wheter to proceed or undo the action.
Information Description of an element in the editor: Rename: Corresponds to the functions delete and add function under new name.
2.6.3
Modify Signature of a Script 1.
Select a script function in the scripts list of the script context editor.
2.
Add, remove or re-arrange parameters. Information
Using the selected script function in the BSQ or an SSQ does not prevent its deletion! The system recognices and shows, if you want to delete a used script function. It asks you to decide wheter to proceed or undo the action.
AVL PUMA Open 2012 — Scripting in PUMA Open
21
22
Scripting in BSQ/SSQ
AVL PUMA Open 2012 — Scripting in PUMA Open
Activating Scripts via Other Components
3
Activating Scripts via Other Components The examples given in this chapter describe how scripts can be executed via other components.
3.1
Defining Script Contexts in the TFP, SYS and UUT Parameters Sie können auch außerhalb des BSQ Editors Skript Kontexte erzeugen.
3.2
1.
Select Projects | AVL | Project Data in the AVL Explorer.
2.
Double-click a system parameters set in the list view. PAM will open, displaying the selected parameter set.
3.
In PAM, select New to open the Block Name Browser and select SCR.
4.
Click OK to create a new SCR block.
5.
Double-click the new block to open the script context.
Activating Scripts via POI Scripts functions can be activated in POI via the Command Window. Scripts assembled during runtime can be executed by specifically interconnecting the elements by using POI’s ADE (Advanced Display Editor) function. Two modes are distinguished, which are explained below by giving examples:
Script execution in a default context
Script execution in a user-defined context
You can tailor your own specific windows for your script contexts by following the procedures described in the examples. Information A further, interactive method of executing scripts is to use the Command Window. For information on how to use the individual commands, refer to section Using Script Functions to React to Limit Violations on page 25.
AVL PUMA Open 2012 — Scripting in PUMA Open
23
24
Activating Scripts via Other Components
3.2.1
Execute Script in Default Context The example window shown below allows you to execute a script within the default context by activating the Execute button. In this context, all functions available in the PUMA Open Script API can be called up.
Fig. 9 The principal mechanism of this window can be seen from the internal interconnection of its elements.
Fig. 10 Please note that using a "string substitution" component, a command with the format Scriptlet is assembled here.
AVL PUMA Open 2012 — Scripting in PUMA Open
Activating Scripts via Other Components
3.2.2
Execute Script In User-Defined Context With the following window, scripts can be executed in a user-defined script context. Scripts that are executed in a user defined script context can access all user defined script functions as well as all functions of the PUMA Open Script API.
Fig. 11 Elements are interconnected in a similar way as in the previous variant, with the only difference that the additional parameters are also taken into account.
Fig. 12 Using a "string substitution" component, a command with the format ContextName, Timeout, Scriptlet
is assembled.
3.3
Using Script Functions to React to Limit Violations A simple example is given below to show how user defined script functions can be used to react to limit violations.
AVL PUMA Open 2012 — Scripting in PUMA Open
25
26
Activating Scripts via Other Components
In our example, the upper/lower limit violations are counted and the current count output on system channels. For this purpose, a script context is created (see figure below):
Fig. 13
3.3.1
Contents of the Script Context
Fig. 14
AVL PUMA Open 2012 — Scripting in PUMA Open
Activating Scripts via Other Components
3.3.2
Contents of the Script Functions Setup
Sets the names of the system channels on which the current count is output:
Fig. 15 Reset
Resets the counter to zero:
Fig. 16 UpperReaction
An upper limit violation increases the relevant count:
Fig. 17 LowerReaction
A lower limit violation increases the relevant count:
Fig. 18
3.3.3
Define Limit Monitoring The figure below shows how to define the limit monitoring:
Fig. 19
AVL PUMA Open 2012 — Scripting in PUMA Open
27
28
Activating Scripts via Other Components
Information If a script function requires parameters, these have to be indicated explicitly in the Script field, as shown in the example below. Example In the script context "MyContext", the function "MyFunction" is defined using 2 parameters (e.g. 123, "ABC"). This function is to be executed if an upper limit violation occurs. Thus, the following must be specified in the limit definition for the field Context for upper reaction and the associated field Script: "Context for upper reaction": MyContext "Script": MyFunction 123, "ABC"
AVL PUMA Open 2012 — Scripting in PUMA Open
Application Example
4
Application Example The following example gives an overview of how scripting can be used in a test run. A list of demand values (control mode, speed, torque, alpha) are retrieved from an Excel sheet and the corresponding operating points are adjusted one after the other. NOTICE The application with the Excel sheet below is only described for illustration purposes. Only software which is authorised by AVL can be installed on the test bed computer. Any other software packages including MS-Office must not be installed on the computer.
4.1
Excel File The Excel sheet contains eight named regions, which contain the normnames and demand value tracks (see figure below).
SPEED demand value track
TORQUE demand value track
Alpha demand value track
C-Mode demand value track
Normname for the speed track
Normname for the torque track
Normname for the alpha track
Normname for the control mode track
Fig. 20
AVL PUMA Open 2012 — Scripting in PUMA Open
29
30
Application Example
The names of the regions are shown in the drop-down list (see figure below). Any names can be used. However, the names used in the test (i.e. the script context) must match the names in the Excel sheet. The name of the sheet is also used in the test, which is important when there are several sheets. The control mode determines the two demand values to be used.
Fig. 21
AVL PUMA Open 2012 — Scripting in PUMA Open
Application Example
4.2
Test Procedure The figure below shows the test run:
1 2 3
4
5 Fig. 22 1..... First, the relevant Excel file is loaded. 2..... The number of operating points is retrieved from the Excel sheet and provided via the normname RESCHA47 for the susequent iteration loop. 3..... The engine is started. 4..... The operating points are processed one after the other. For each of the operating points a steady-state step is run, depending on the control mode. The relevant demand values are passed when the steady-state step is activated. 5..... The engine is stopped. Information If the Excel sheet is opened before the test run is started, demand values can be modified during test run processing. The modified values will be used in the test immediately when the relevant demand values are adjusted the next time.
4.3
Script Context The example in the figure uses a script context definition that contains the following script funtions:
Setup
GetCount
AVL PUMA Open 2012 — Scripting in PUMA Open
31
32
Application Example
GetNext
Fig. 23 Defining three functions in contect
4.4
Contents of the Script Functions The contents of the script functions are shown below: Setup
Opens the Excel file.
Fig. 24 GetCount
Retrieves the number of operating points.
Fig. 25 GetNext
Retrieves the next demand values. The parameter "Row" is the normname with the current line number.
AVL PUMA Open 2012 — Scripting in PUMA Open
Application Example
Fig. 26
4.5
Contents of the Script Context
The first part defines the names of the eight Excel regions. The second part defines the Initialize and Terminate routines, which are executed at the beginning of the test and after test completion. The main part of the code, i.e. the actual functionalities, is defined in the internal class (OperatingPoints).
The following pages show the script context contents.
Fig. 27
AVL PUMA Open 2012 — Scripting in PUMA Open
33
34
Application Example
Fig. 28
AVL PUMA Open 2012 — Scripting in PUMA Open
Application Example
Fig. 29
AVL PUMA Open 2012 — Scripting in PUMA Open
35
36
Application Example
Fig. 30 Contents of the script context
AVL PUMA Open 2012 — Scripting in PUMA Open
Testing and Debugging
5
Testing and Debugging Your scripts and their functions can be tested in PUMA Open. There are two ways to do this:
Interactive testing via the System Explorer (SOX)
Step-by-step testing in the BSQ
The following two sections describe these testing and debugging methods available in PUMA Open, based on the example given in the previous chapter.
5.1
Interactive Testing via the System Explorer Activation objects are created automatically for every user-defined script context and can be used like all other predefined PUMA Open activation objects. 1.
Click this toolbar button to open the System Explorer (SOX) and select the desired script context from the Sequence component folder.
2.
Right-click the selected script context to open the shortcut menu. Select the script function Setup. The activation object dialog opens and shows the selected script function with its default parameters.
Fig. 31
AVL PUMA Open 2012 — Scripting in PUMA Open
37
38
Testing and Debugging
3.
Modify the parameters, if necessary.
4.
Click the Execute button. The script function will be exectued.
Fig. 32
AVL PUMA Open 2012 — Scripting in PUMA Open
Testing and Debugging
5.2
Step-by-step Testing in the BSQ The other way of testing your scripts and functions is to use the test run window: 1.
Select the required script activation in the BSQ and declare it to be the statement that is to be executed next (see the figure below).
2.
Select Single Step from the shortcut menu. The script function will be invoked according to parameterization.
Fig. 33
Fig. 34
AVL PUMA Open 2012 — Scripting in PUMA Open
39
40
Testing and Debugging
5.3
Debugging Information IFor debugging, you can send messages to the POI Messages window or the PUMA Open Tracer window or use the MSTM Script Debugger (for advanced users only).
5.3.1
Use Messages and Tracer Windows If problems occur during script execution, messages can be displayed in the PUMA Open Messages window or the TBTracer window which help to identify and eliminate the errors. Messages can be sent to the Messages window by means of the function PoiSendMessage of the PUMA Open Script API. PoiSendMessage Severity, Message, Destination
Fig. 35 Tracer messages can be displayed using the function PoiSendDebug. Information ITo enable the Tracing function, select OMP7Tracer in the AOServer\ObjectModel folder. PoiSendDebug Severity, Message
Fig. 36
AVL PUMA Open 2012 — Scripting in PUMA Open
Testing and Debugging
Information For details, refer to the documentation "BSQ and Toolbox ", chapter "User Interface".
5.3.2
Use MSTM Script Debugger Information The MS Script Debugger can be found on Vendor CD1.
Script Debugger: MS\Scripting\scd10en.exe
or download from Microsoft: http://msdn.microsoft.com/downloads/
NOTICE For debugging using the MS Script Debugger, basic knowledge of software development is required (This is not a skill that test bed personnel is usually required to have).
Information Reboot the PUMA Open system after installing the Script Debugger and after activating the debug support. Activation
For activating the debug function in the PO System, some modifications of processes for the AO server are required. These modifications can be found in the configuration file:%PUMAROOT%CFG\Monitor.INI Process AOServer { Image
= "AOServer.exe"
Path
= "..\bin"
StartDir
= "..\bin"
WorkDir
= "..\bin"
Arguments
= -i..\cfg\AOServer.ini -o790 -t1001 -d0 -s0
StartInvisible }
Debugging deactivated
Arguments
= -i..\cfg\AOServer.ini -o790 -t1001 -d0 -s0
Debugging activated:
Arguments
= -i..\cfg\AOServer.ini -o790 -t1001 -d1 -s0
Information The activation of the debugging mode can enormously increase your memory requirements.
AVL PUMA Open 2012 — Scripting in PUMA Open
41
42
Testing and Debugging
5.3.3
Open Script Debugger Now we will debug the script function "Setup" and check whether the channel that will later contain the "Torque" operating points has been sufficiently defined. 1.
Open Script Debugger.
2.
Select View | Running Documents from the menu system or click this toolbar button. The window "Running Documents" will open. This window lists all script contexts available for debugging. Select the entry for the script context used in our example. The subentry Module: User contains the scripts Context, Setup, GetCount and GetNext. The context script contains the subroutines "Initialize" and "Terminate" as well as all helper functions and subroutines.
3.
Right-click the script context entry. Select Break At Next Statement from the shortcut menu. The Debugger will stop script execution at the next statement of the context.
Fig. 37
Fig. 38
AVL PUMA Open 2012 — Scripting in PUMA Open
Testing and Debugging
4.
Activate a script function (e.g. via SOX). Execution will be interrupted and the debugger will indicate the interruption.
Fig. 39 The Debugger’s toolbar is now enabled. 5.
Click the button Run (F5) to continue script execution. Execution will stop at the first breakpoint.
6.
Click Stop Debugging (Shift+F5) to stop debugging.
7.
Click Step Into (F8).If the current debugged statement contains a function or subroutine and if the button Step Into (F8) is pressed, the Debugger will stop at the first statement within this function or subroutine.
8.
Activate Step Over (Shift+F8). If the debugged statement contains functions or subroutines, these will be executed after pressing Step Over (Shift+F8) and the Debugger will stop again at the next statement.
9.
Use Step Out (Ctrl+Shift+F8) to perform all subsequent statements in the current subroutine and stop at the statement following immediately after the statement that invoked this subroutine.
AVL PUMA Open 2012 — Scripting in PUMA Open
43
44
Testing and Debugging
5.3.4
Debugging of the Script Context's Setup Function •
Click Step Into in the Debugger's toolbar to debug the "Setup" subroutine. The following window will open.
Fig. 40
5.3.5
Set Breakpoints 1.
Click the button Toggle Breakpoint (F9) in the toolbar. A breakpoint will be inserted at the current cursor position or in the next line in which a breakpoint can be set (e.g. if current line is a comment line). In our example, we set the breakpoint in the first line after the statement My TorqueChannel= ..... By pressing F5 (Run) processing is continued until the breakpoint is reached.
2.
Execution is interrupted at statements that contain errors. Press F5 (Run). Lines that are identified as correct (such as e.g. the input evaluation code)
Fig. 41
AVL PUMA Open 2012 — Scripting in PUMA Open
Testing and Debugging
are not run through. After clicking OK, execution is stopped at the breakpoint.
Fig. 42
5.3.6
Values of Variables 1.
Use this toolbar button to open the Command Window.
Information Selecting a different entry in the Call Stack window does not change the statement to be executed next.
Fig. 43
AVL PUMA Open 2012 — Scripting in PUMA Open
45
46
Testing and Debugging
2.
Variables can also be changed in the Command Window.
3.
Stay in the Debugger and use this button to open the Call Stack window. This window shows the current execution hierarchy. The subroutine last called is the first subroutine listed in the window.
Fig. 44
Fig. 45
AVL PUMA Open 2012 — Scripting in PUMA Open
Testing and Debugging
4.
Double-click an item to open the relevant subroutine window. Statements that are called up in the Command Window only have an influence on the subroutines that were selected in the Call Stack window.
5.
After debugging, click Run to resume execution.
Fig. 46
Information If debugging is terminated with Stop Debugging, execution of the interrupted script will not be resumed but canceled. The execution status will be set to "Aborted".
AVL PUMA Open 2012 — Scripting in PUMA Open
47
48
Testing and Debugging
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
6
Functions of the PUMA Open Script API All functions of the PUMA Open Script API are categorized in the same way as the BSQ Toolbox.
6.1
Operator Interface
6.1.1
Operator Interface
6.1.1.1
Close Window Closes the selected window within POI. Parameters
Description
WindowName
Name of the POI window to be closed. String.
Script function/command: Sub PoiCloseWindow(WindowName)
6.1.1.2
Debug Message Assembles a message and sends it to the POI service message window (TBTracer). ‘
Parameters
Description
Severity
Determines the importance and urgency of the debug message. Numeric value. 1…'Information' 2…'Warning' 4…'Error'
Message
Message. String. If the string contains "$c(ChannelName).v" sequences, they will be replaced by the online value of the specified channel at runtime and the resulting string will then be used as the new message string.
Script function/command: Sub PoiSendDebug(Severity, Message)
Example PoiSendDebug eSTLInfo, "Hello World"
AVL PUMA Open 2012 — Scripting in PUMA Open
49
50
Functions of the PUMA Open Script API
6.1.1.3
Message Assembles a message and sends it to the POI message window. Parameters
Description
Severity
Determines the importance and urgency of the debug message. Numeric value. eSTLInfo
=1
eSTLWarning = 2
Message
eSTLError
=4
eSTLAlarm
=8
Message. String. If the string contains "$c(ChannelName).v" sequences, they will be replaced by the online value of the specified channel at runtime and the resulting string will then be used as the new message string.
Destination
Specifies whether to add this message to the logbook, print it or output it in a message window. Enumerator. The following combinations of values can be used: eSDPOI
Example PoiSendMessage eSTLInfo, "Hello World", eSDPOI+eSDMessageBox
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
6.1.1.4
Message Extended Assembles a message based on a multi-language capable message template and sends it to the POI message window. Parameters
Description
Severity
Determines the importance and urgency of the debug message. Numeric value. eSTLInfo
=1
eSTLWarning = 2 eSTLError
=4
eSTLAlarm
=8
MessageFacility
Name of the message facility which is providing the message template. The message is stored in an MLG file which is located in the folder \mlg and named .mlg; e.g.: UserMessage.mlg
MessageKey
Name of the message key within the MLG file; e.g.: UserMessage_Demo
MessageParameter
Optional message parameters which can be passed to the message text, separated by semicolon.
UserInterface
Specifies whether to add this message to the logbook, print it or output it in a message window. Enumerator. The following combinations of values can be used: eSDPOI
= 2
eSDAcknowledge = 4 eSDMessageBox
= 8
eSDPrinter
= 16
eSDTestDiary
= 32
eSDEngineDiary
= 64
eSDTestcellDiary
= 128
eSDTestNotes = 256 eSDTestcellNotes = 512 Printer
No/Yes
Diary
Specifies the diary. Test Diary Test Cell Diary User Notes Test Cell Diary Notes
Script function/command: Sub PoiSendMessageEx(Severity, MessageFacility, MessageKey, MessageParameter, UserInterface, Printer, Diary)
AVL PUMA Open 2012 — Scripting in PUMA Open
51
52
Functions of the PUMA Open Script API
Example PoiSendMessageEx eSTLInfo, "UserMessage", "UserMessage_Demo", "Msg;Demo", eSDPOI
Based on the defined message This is a user defined demo-message with parameter 1 ’1%s’ and parameter 2 ’2%s’
the output will look like: This is a user defined demo-message with parameter 1 ’Msg’ and parameter 2 ’Demo’
6.1.1.5
Message with Client Name Assembles a message which is providing the name of the sender and sends it to the POI message window. Parameters
Description
Severity
Determines the importance and urgency of the debug message. Numeric value. eSTLInfo
=1
eSTLWarning = 2
Message
eSTLError
=4
eSTLAlarm
=8
Message. String. If the string contains "$c(ChannelName).v" sequences, they will be replaced by the online value of the specified channel at runtime and the resulting string will then be used as the new message string.
Destination
Specifies whether to add this message to the logbook, print it or output it in a message window. Enumerator. The following combinations of values can be used: eSDPOI
Specifies the name of the sender which is displayed in the "From" column of the POI message window. Default: Name of the script context where the message has been issued; e.g.: Scripting.MySCR
Script function/command: Sub PoiSendMessageWithClientname (Severity, Message, Destination, ClientName)
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
Example PoiSendMessageWithClientName eSTLInfo, "MyMessage", eSDPOI+eSDMessageBox, "MyClient"
6.1.1.6
Message with Client Name Extended Assembles a message based on a multi-language capable message template which is providing the name of the sender and sends it to the POI message window. Parameters
Description
Severity
Determines the importance and urgency of the debug message. Numeric value. eSTLInfo
=1
eSTLWarning = 2 eSTLError
=4
eSTLAlarm
=8
MessageFacility
Name of the message facility which is providing the message template. The message is stored in an MLG file which is located in the folder \mlg and named .mlg; e.g.: UserMessage.mlg
MessageKey
Name of the message key within the MLG file; e.g.: UserMessage_Demo
MessageParameter
Optional message parameters which can be passed to the message text, separated by semicolon.
Destination
Specifies whether to add this message to the logbook, print it or output it in a message window. Enumerator. The following combinations of values can be used: eSDPOI
Specifies the name of the sender which is displayed in the "From" column of the POI message window. Default: Name of the script context where the message has been issued; e.g.: Scripting.MySCR
Script function/command: Sub PoiSendMessagewithClientnameEx(Severity, MessageFacility, MessageKey, MessageParameter, Destination, ClientName)
AVL PUMA Open 2012 — Scripting in PUMA Open
53
54
Functions of the PUMA Open Script API
Example PoiSendMessageWithClientNameEx eSTLInfo, "MyClient", "UserMessage", "UserMessage_Demo", "Msg;Demo", eSDPOI, MyClient"
6.1.1.7
Open Window Opens the selected window within POI and brings it to the front. Parameters
Description
WindowName
Name of the POI window that is to be opened and brought to the front. String.
Script function/command: Sub PoiOpenWindow(WindowName)
6.1.1.8
Operator Inquire Opens the inquiry window in POI. The indicated channel contains the value that has been entered. The entries 'Min. Value', 'Max. Value' and 'List' are effective depending on the selected 'Check Mode'. In the case of 'List', enter the list in the format 'A,B,C'. Parameters
Description
Text
Text that is displayed in the inquiry window. String.
Channel
After the inquiry, the specified channel holds the result and can be used for further action. Normname
Value
Default value that will be used if the operator cancels the request or the specified time-out expires. Variant
CheckMode
The input can be checked against upper and lower limits or taken from a list. Enumeration: eSICMNone … 0 eSICMRange … 1 eSICMList … 2
MinValue
Minimum value if the specified Check Mode is 'eSICMRange'. Numeric value.
MaxValue
Maximum value if the specified Check Mode is 'eSICMRange'. Numeric value.
List
If the specified 'Check Mode' is 'eSICMList', define the list in the format 'A,B,C'. String.
ListSeparator
',' is used as a list separator, by default. String.
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
Parameters
Description
MonitorTimeout
The inquiry can be monitored via a time-out.
Timeout
The window closes after the specified time-out [s] has elapsed. Numeric value [s].
Operator Inquire (simple) Opens the inquiry window in POI. The specified channel holds the inquiry status: 0,1...Timeout, 2...Ok, 3...Cancel. Parameters
Description
Text
Text that is displayed in the inquiry window. String.
Channel
After the inquiry, the specified channel holds the result and can be used for further action. Enumeration: eSISInactive … 0 eSISActive … 1 eSISDoneOk … 2 eSISDoneCancel … 3 Normname
MonitorTimeout
The inquiry can be monitored via a time-out. Enumeration: No ...0 Yes …1
Timeout
The window closes after the specified time-out [s] has elapsed. The inquiry result is set to 'eSISDoneCancel = 3'. Numeric value [s].
Script function/command: Sub PoiInquireSimple(Text, Channel, MonitorTimeout, Timeout)
6.1.1.10
Operator Inquire (custom) Opens the inquiry window in POI. The specified channel holds the inquiry status: 0,1...Timeout, 2...Ok, 3...Cancel. When this function is used in the BSQ, test run execution pauses and the operator continues the test after clicking "OK" or "Cancel". After the inquiry, the result can be used to determine the further course of action.
AVL PUMA Open 2012 — Scripting in PUMA Open
55
56
Functions of the PUMA Open Script API
Parameters
Description
WindowName
POI window that is opened. The window supports the inquiry control, depending on the active inquiry object. String.
Channel
After the inquiry, the specified channel holds the result and can be used for further action. Enumeration: eSISInactive … 0 eSISActive … 1 eSISDoneOk … 2 eSISDoneCancel … 3 Normname
MonitorTimeout
The inquiry can be monitored via a time-out. Enumeration: No … 0 Yes …1
Timeout
The window closes after the specified time-out [s] has elapsed. The inquiry result is set to 'eSISDoneCancel = 3'. Numeric value [s].
Script function/command: Sub PoiInquireCustom(WindowName, Channel, MonitorTimeout, Timeout)
Information All "Inquire" functions from the AO section "Operator Interface" are based on the basic functions described below. You can use these functions to define your own individual "Inquire" mechanisms. The three main functions of "Inquire", i.e. 'PoiInquire', 'PoiInquireSimple' and 'PoiInquireCustom', are based on the ´PoiInquireEx´ function: Sub PoiInquire(…) PoiInquireEx … End Sub
Sub PoiInquireSimple(…) PoiInquireEx … End Sub
Sub PoiInquireCustom(…) PoiInquireEx … End Sub
´PoiInquireEx´ is based on the following basic ‘Inquire‘ script functions: Function PoiCreateInquire(Name, WindowName) Sub PoiSetupInquire(Name, Text, Value, _
Sub PoiOpenInquire(Name) Function PoiWaitForInquire(Name) Function PoiGetInquireState(Name) Function PoiGetInquireValue(Name) Sub PoiCloseInquire(Name) Sub PoiRemoveInquire(Name) Example:
With the functions described above, you can create your own individual Inquire function, which may vary from the basic implementations. Sub MyInquire(WindowName, Text, Channel, ResultMode, Value, _ CheckMode, MinValue, MaxValue, List, ListSeparator, _ MonitorTimeout, Timeout) ''- Create inquire request 'Dim InquireName InquireName = PoiCreateInquire(eSIDefName, WindowName).Name ''- Setup inquire request 'PoiSetupInquire InquireName, Text, Value, _ CheckMode, MinValue, MaxValue, List, _ ListSeparator, _ ListSeparator, MonitorTimeout, Timeout ''- Open inquire request 'PoiOpenInquire InquireName ''- Monitor inquire request 'PoiWaitForInquire InquireName ''- Close inquire request 'PoiCloseInquire InquireName ''- Process inquire result 'Dim State State = PoiGetInquireState(InquireName) If State = eSISDoneOk Then Value = PoiGetInquireValue(InquireName) End If ''- Remove inquire request 'PoiRemoveInquire InquireName ''- Output inquire result
AVL PUMA Open 2012 — Scripting in PUMA Open
57
58
Functions of the PUMA Open Script API
'If ResultMode = eSIRMState Then ChnSet Channel, State Else ChnSet Channel, Value End If End Sub
6.1.1.11
PoiCreateInquire Creates an inquire control object and connects it to a window via the specified name. Parameters
Description
Name
Name of the inquire control object. String.
WindowName
Name of the POI window that is used as an inquiry window. This window supports the PO ActiveX control 'SCRPuma7Controls InquireControlCustom'. String.
Script function/command: Function PoiCreateInquire(Name, WindowName)
Example PoiCreateInquire "MyInquire", "MyInquire.wnd"
6.1.1.12
PoiSetupInquire Specifies a number of parameters that can be displayed by the selected "PO Inquire ActiveX Control". The parameters are stored in an internal inquire control object, which is identified by its name. Parameters
Description
Text
Text that is displayed in the inquiry window. String.
Value
Default value that will be used if the operator cancels the request or the specified time-out expires. Variant
CheckMode
The input can be checked against upper and lower limits or taken from a list. Enumeration: eSICMNone … 0 eSICMRange … 1 eSICMList … 2
MinValue
Minimum value if the specified Check Mode is 'eSICMRange'. Numeric value.
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
Parameters
Description
MaxValue
Maximum value if the specified Check Mode is 'eSICMRange'. Numeric value.
List
If the specified 'Check Mode' is 'eSICMList', define the list in the format 'A,B,C'. String.
ListSeparator
',' is used as a list separator, by default. String.
MonitorTimeout
The inquiry can be monitored via a time-out. Enumeration: No … 0 Yes …1
Timeout
The window closes after the specified time-out [s] has elapsed. Numeric value [s].
Example PoiSetupInquire "MyInquire", "Please press OK to continue.", 0, _ ESICMNone, 0, 0, "", "", _ 0, 0
6.1.1.13
PoiOpenInquire Opens the POI window connected to the inquire control object by calling "PoiCreartInquire". Parameters
Description
Name
Name of the inquire control object. String.
Script function/command: Sub PoiOpenInquire(Name)
Example PoiOpenInquire "MyInquire"
6.1.1.14
PoiWaitForInquire Checks the status of the inquire control object at a rate of approx. 250 ms and returns it: eSISInactive …0, eSISActive …1, eSISDoneOk …2, eSISDoneCancel …3
AVL PUMA Open 2012 — Scripting in PUMA Open
59
60
Functions of the PUMA Open Script API
If not time-out monitoring has been defined, a defined time-out value of 300 s is taken. Parameters
Description
Name
Name of the inquire control object. String.
Script function/command: Function PoiWaitForInquire(Name)
Example PoiWaitForInquire "MyInquire"
6.1.1.15
PoiGetInquireState Returns the status of the inquire control object: eSISInactive …0, eSISActive …1, eSISDoneOk …2, eSISDoneCancel …3 Parameters
Description
Name
Name of the inquire control object. String.
Script function/command: Function PoiGetInquireState(Name)
Example Dim MyState MyState = PoiGetInquireState "MyInquire" If MyState = eSISDoneOk Then : End If
6.1.1.16
PoiGetInquireValue Returns the specified inquire value as specified by the user or as preset. Parameters
Description
Name
Name of the inquire control object. String.
Script function/command: Function PoiGetInquireValue(Name)
Example Dim MyValue MyValue = PoiGetInquireValue "MyInquire" If MyValue > 100 Then : End If
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
6.1.1.17
PoiCloseInquire Closes the POI window connected to the inquire control object. Parameters
Description
Name
Name of the inquire control object. String.
Script function/command: Sub PoiCloseInquire(Name)
Example PoiCloseInquire "MyInquire"
6.1.1.18
PoiRemoveInquire Removes the specified control object. Parameters
Description
Name
Name of the control object. String.
Script function/command: Sub PoiRemoveInquire(Name)
Example PoiRemoveInquire "MyInquire"
6.1.1.19
PoiConvertMessage Uses a key to read a string from the Cus/*.mlg file in the selected language for further use. Parameters
Description
FileName
Name of MLG file
LanguageKey
Language key
MessageKey
Message key
ByVal_MessageParamet Message parameter er Script function/command: Function PoiConvertMessage(FileName, LanguageKey, MessageKey, ByVal_MessageParameter)
6.1.2
Managed Dialogs
6.1.2.1
Open Dialog Opens the specified dialog.
AVL PUMA Open 2012 — Scripting in PUMA Open
61
62
Functions of the PUMA Open Script API
Parameters
Description
DialogName
Name of the dialog.
Synchron
Waits until dialog is closed. Value = 0...Function is terminated even if dialog is still open. Value <> 0 ... Function is terminated only after dialog has been closed.
Script function/command: Sub DlgOpenDialog(DialogName, Synchron)
Example DlgOpenDialog "OilConsumption"
6.1.3
Manual Data Entry
6.1.3.1
Open Adapter Window Opens the Manual Data Entry Adapter Window within a POI window. Parameters
Description
windowName
PUMA NN for the MDE Status. Status values are: 0=closed 1=open 2=saved -1=cancelled Default is "MDE.wnd".
statusChannelName
PUMA NN for the MDE Status. Status values are: 0=closed 1=open 2=saved -1=cancelled Default is "MDE.wnd".
Script function/command: Sub MDE_OpenAdapter(windowName, statusChannelName)
6.1.3.2
Open Datasheets Opens the specified Datasheets and displays them to the user. Multiple datasheet files can be opened. Parameters
Description
DeviceName
Name of the device
FileName
Contains full/relative path for the datasheet. If multiple files need to be opened their paths can be separated using the pipe (|) character e.g. "C:\\sheet1.dsh|D:\\sheet2.dsh".
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
Parameters
Description
ReadOnly
Specifies whether the datasheet is opened in the read only mode or not.
AllowBrowse
Specifies whether the user is able to browse for datasheets himself. Setting it to "No" disables the "Open" button in the toolbar.
Script function/command: Sub MDE_Datasheets(DeviceName, fileNames, readOnly, allowBrowse)
6.1.3.3
Close Datasheets Closes the open datasheets and ManualDataEntry window. Parameters
Description
DeviceName
Name of the device
Script function/command: Sub MDE_CloseDatasheets(DeviceName)
6.2
Dataflow
6.2.1
Filter Functions
6.2.1.1
Start Activates all entries of the relevant Channels Service block. Can be used if the "CmdOnly" start mode is offline or the block has been stopped before. Parameters
Description
Name
Fil block name in PAM; if this name is not provided, the generated name must be used: "Fil" + short english loadset name ("Sys", "Tfp", "Uut") + two-digit block number in loadset. e.g. "FilSys01", "FilSys02", "FilTfp01", "FilTfp02"
Script function/command: Sub FilStart(Name, Entry)
Example FilStart "FilSys01", ""
6.2.1.2
Stop all Deactivates all entries of the relevant Channels Service block. Can be used if the "AutoStart" mode is offline or the block has been started before.
AVL PUMA Open 2012 — Scripting in PUMA Open
63
64
Functions of the PUMA Open Script API
Parameters
Description
BlockName
Fil block name in PAM; if this name is not provided, the generated name must be used: "Fil" + short english loadset name ("Sys", "Tfp", "Uut") + two-digit block number in loadset. e.g. "FilSys01", "FilSys02", "FilTfp01", "FilTfp02"
Script function/command: Sub FilStop(Name, Entry)
Example FilStop "FilSys01", ""
6.2.1.3
Start entry Activates the channel service entry specified via the target channel. Can be used if the "CmdOnly" mode is offline or the entry has been started before. Parameters
Description
BlockName
Fil block name in PAM; if this name is not provided, the generated name must be used: "Fil" + short english loadset name ("Sys", "Tfp", "Uut") + two-digit block number in loadset. e.g. "FilSys01", "FilSys02", "FilTfp01", "FilTfp02"
TargetNormname
Normname of the target channel of the CHS entry. If there is more than one target channel, each of the normnames can be used.
Stop entry Deactivates the channel service entry specified via the target channel. Can be used if the "AutoStart" mode is offline or the entry has been started before.
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
Parameters
Description
BlockName
Fil block name in PAM; if this name is not provided, the generated name must be used: "Fil" + short english loadset name ("Sys", "Tfp", "Uut") + two-digit block number in loadset. e.g. "FilSys01", "FilSys02", "FilTfp01", "FilTfp02"
TargetNormname
Normname of the target channel of the CHS entry. If there is more than one target channel, each of the normnames can be used.
Script function/command: FilStop "BlockName", "TargetNormname" Example FilStop "FilSys01", "Distance"
6.2.1.5
Modify Cut-off frequency Modifies the cut-off frequency of the relevant entry; is only permissible for COF type filters. It can be used to find the cut-off frequency best suited for the filter results required. Parameters
Description
BlockName
Fil block name in PAM; if this name is not provided, the generated name must be used: "Fil" + short english loadset name ("Sys", "Tfp", "Uut") + two-digit block number in loadset. e.g. "FilSys01", "FilSys02", "FilTfp01", "FilTfp02"
TargetNormname
Normname of the target channel of the CHS entry. If there is more than one target channel, each of the normnames can be used.
Frequency
New value for the cut-off frequency in Hz units; Range: 0.001...499 Alternatively, you can specify a normname for using the current channel value as the cut-off frequency.
Script function/command: FilModify "BlockName", "TargetNormname", eFilCOF, Frequency
Example FilModify "FilSys01", "EngineGrad", eFilCOF, 0.2
6.2.1.6
Modify Duration Modifies the duration of the relevant entry; admissible for 'MAA' and 'VAL' type filters only. It can be used to find the duration best suited for averaging.
AVL PUMA Open 2012 — Scripting in PUMA Open
65
66
Functions of the PUMA Open Script API
Parameters
Description
BlockName
Fil block name in PAM; if this name is not provided, the generated name must be used: "Fil" + short english loadset name ("Sys", "Tfp", "Uut") + two-digit block number in loadset. e.g. "FilSys01", "FilSys02", "FilTfp01", "FilTfp02"
TargetNormname
Normname of the target channel of the CHS entry. If there is more than one target channel, each of the normnames can be used.
Duration
Value for the new duration in seconds. Unit: seconds. Range for MAA: 0.001...200, range for VAL >= 0 Range: 0.001...499 Alternatively, you can specify a normname for using the current channel value as the duration.
Example FilModify "FilSys01", "SPEED", eFilDuration, 2.0
6.2.1.7
Modify Timeout value Modifies the time-out value of the relevant entry; is only permissible for FIV type filters. Can be used to find the optimal time-out for filtering errored values. Parameters
Description
BlockName
Fil block name in PAM; if this name is not provided, the generated name must be used: "Fil" + short english loadset name ("Sys", "Tfp", "Uut") + two-digit block number in loadset. e.g. "FilSys01", "FilSys02", "FilTfp01", "FilTfp02"
TargetNormname
Normname of the target channel of the CHS entry. If there is more than one target channel, each of the normnames can be used.
Timeout
Value for the new time-out. Unit: seconds. Range >= 0 Alternatively, you can specify a normname for using the current channel value as the time-out.
Example FilModify "FilSys01", "TireTemp", eFilTimeout, 5.0
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
6.2.1.8
Modify Timeout mode Modifies the time-out mode of the relevant entry; is only permissible for FIV type filters. Parameters
Description
BlockName
Fil block name in PAM; if this name is not provided, the generated name must be used: "Fil" + short english loadset name ("Sys", "Tfp", "Uut") + two-digit block number in loadset. e.g. "FilSys01", "FilSys02", "FilTfp01", "FilTfp02"
TargetNormname
Normname of the target channel of the CHS entry. If there is more than one target channel, each of the normnames can be used.
Example FilModifyTimeoutMode "FilSys01", "TireTemp", eForever
6.2.2
Flexible Parameters Flexible Parameters are used to manipulate constants within the FLX block.
6.2.2.1
Activate Writes FLX constants or path referenced values to the related normnames. Parameters
Description
Name
Name of FLX block.
Script function/command: Sub FlxActivate(Name) Example Sub FlxActivate(FlexibleParameter_UUT_1)
6.2.2.2
Fetch Retrieves the current online values from all FLX Normnames and writes them back into the FLX Parameters or to the path-referenced parameters. If you want to make those parameters persistent, you must store them (you must store the specified loadset of the FLX-Block). Parameters
Description
Name
Name of FLX block.
AVL PUMA Open 2012 — Scripting in PUMA Open
67
68
Functions of the PUMA Open Script API
Script function/command: Sub FlxFetch(Name)
Example Sub FlxFetch(FlexibleParameter_UUT_1)
6.2.2.3
Modify Allows you to change the value of an individual channel in an FLX block. Parameters
Description
Name
Name of FLX block.
ChannelName
Denotes the channel to be modified within the FLX block.
Value
Sets the selected channel to this value.
Script function/command: Sub FlxModify(Name, ChannelName, Value) Example Sub FlxModify(FlexibleParameter_UUT_1, EngT03, 1200)
6.2.3
Formula Calculator
6.2.3.1
Calculate Calculates the selected formula device once. Parameters
Description
Name
Name of on-demand formula device. String.
Script function/command: Sub FrmCalculate(Name)
6.2.3.2
Calculate (extended) Calculates the selected formula device once. Access mode "ONLINE": the input channels read the current values. Access mode "SMART": the input channels read the mean values (if available). Parameters
Description
Name
Name of on-demand formula device. String.
Mode
Calculates the selected formula device once. Access mode "ONLINE": the input channels read the current values. Access mode "SMART": The input channels read the mean values, if available. Otherwise, the current values are read.
Script function/command: Sub FrmCalculateEx(Name, Mode)
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
6.2.3.3
Initialisation Initializes the formula definition of the selected calculator. Parameters
Description
Name
Name of on-demand formula device. String.
Script function/command: Sub FrmCalculateInit(Name)
6.2.3.4
CalculateFormula Calculates an individual formula of an acyclic formula device. Parameters
Description
Name
Name of acyclic device where the individual formula is to be calcultated.
FormulaName
Name of formula. String.
AccessMode
Defines how to access the input channel. 0...Online (default): Current values are read from the input channels 1...Smart: The mean values are read, if available. Otherwise, the current values are read.
Script function/command: Sub FrmCalculateFormula(Name, FormulaName, AccessMode)
Example FrmCalculateFormula "formuladevice1", "formula1", 1
Capture Takes over the current table content. Parameters
Description
Name
Name of look-up table.
Script function: Sub LutCapture(Name)
6.2.4.4
StoreBack If an EEI map is attached, the EEI map will be copied to the look-up table of the LTC parameter block. Is only applied to matching map dimensions (i.e. dimensions less than, or equal to, 64x64). Parameters
Description
Name
Name of look-up table.
Script function: Sub LutStop(Name)
6.2.4.5
Restore The look-up table is reloaded from the LTC block. Any changes previously made to the look-up table are overwritten. If an EEI map has been assigned, it is overwritten by the LTC block data. Restoring does not take place if the map dimensions in the LTC block and the EEI map do not match. Parameters
Description
Name
Name of look-up table.
Script function: Sub LutRestore(Name)
6.2.4.6
Write Writes a look-up table to a file. Available formats: PUMA5, CSV, ASAM CDF Parameters
Description
Name
Name of look-up table.
FileName
Name of file, string. ""...File is stored in the LUT folder under the name of the look-up table "xy"...File is stored in the LUT folder under xy.tx "C:\abc\xx" is stored as file xx, if the folder abc is available
Script function: Sub LutWrite(Name, FileName, Format)
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
6.2.4.7
Read Reads a look-up table from a file of format PUMA5, CSV or ASAM CDF. These files were created using the activation object Write. Parameters
Description
Name
Name of look-up table.
FileName
Name of file, string. ""...File is stored in the LUT folder under the name of the look-up table "xy"...File is stored in the LUT folder under xy.tx "C:\abc\xx" is stored as file xx, if the folder abc is available
Script function: Sub LutRead(Name, FileName, Format)
6.2.4.8
GetDim Sets the channel to the number of axes of the specified look-up table. Parameters
Description
Name
Name of look-up table channel.
Script function: Function LutGetDim(Name)
6.2.4.9
GetDimOfXYandMPs Retrieves the number of points on the x- and y-axis as well as the number of measurement points. The values are written to the normnames defined in the activation. Parameters
Description
Name
Name of look-up table.
XDimName
Normname for the number of points on the x-axis.
YDimName
Normname for the number of points on the y-axis.
NumMPsName
Normname for the number of measurement points.
Script function: Sub LutGetDimOfXYandMPs(Name, XDimName, YDimName, NumMPsName)
AVL PUMA Open 2012 — Scripting in PUMA Open
71
72
Functions of the PUMA Open Script API
6.2.4.10
GetXDim Sets the channel value to the number of grid points on the selected axes of the specified look-up table. Parameters
Description
Name
Name of channel.
AxisIndex Script function: Function LutGetXDim(Name, AxisIndex)
6.2.4.11
GetX Sets the channel to the value of the specified axis grid point. The grid point index is zero-based. Parameters
Description
Name
Name of channel.
AxisIndex
Identifies the input axis. In table: enumerator (x-axis...0, y-axis...1) In script: numeric value or expression string.
GridIndex
Index X in grid point list. Numeric value or expression string.
Script function: Function LutGetX(Name, AxisIndex)
6.2.4.12
GetZ Sets the channel to the value of the specified map grid point. Parameters
Description
Name
Name of channel.
XIndex
Numeric value or string.
YIndex
Numeric value or expression string (optional for curve).
Script function: Function LutGetZ(Name, XIndex, YIndex)
6.2.4.13
GetZInterpolated Sets the channel to the value of the specified map interpolation value. Parameters
Description
Name
Name of channel.
X
Value in x-direction. Numeric value or expression string.
Y
Value in y-direction. Numeric value or expression string.
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
Script function: Function LutGetZInterpolated(Name, X, Y)
6.2.4.14
GetGridPoint Retrieves the values for x, y and z of an indexed grid point. Parameters
Description
Name
Name of channel.
XIndex
Numeric value or normname as input quantity.
YIndex
Numeric value or normname as input quantity.
xNormname
Normname for x-value of grid point
yNormname
Normname for y-value of grid point
zNormname
Normname for z-value of grid point (optional with curve)
Script function: Sub LutGetGridPoint(Name, XIndex, YIndex, xNormname, yNormname, zNormname)
6.2.4.15
SetX Sets the value of the specified axis grid point to the value of the defined channel. Parameters
Description
Name
Name of look-up table.
AxisIndex
Identifies the input axes. In table: enumeration (x-axis...0, y-axis...1) In script: numeric value or expression string.
GridIndex
Grid point index. Numeric value or expression string.
Value
Numeric value or expression string.
Script function: Sub LutSetX(Name, AxisIndex, GridIndex, Value)
6.2.4.16
SetZ Sets the value of the specified table grid point to the value of the defined channel. Parameters
Description
Name
Name of look-up table.
XIndex
Grid point index in x-direction. Numeric value or expression string.
YIndex
Grid point index in y-direction. Numeric value or expression string.
Value
Numeric value or expression string.
Script function: AVL PUMA Open 2012 — Scripting in PUMA Open
73
74
Functions of the PUMA Open Script API
Sub LutSetZ(Name, XIndex, YIndex, Value)
6.2.4.17
SetZInterpolated Sets the value of the specified table interpolation point to the value of the defined channel. Parameters
Description
Name
Name of look-up table.
X
Value in x-direction. Numeric value or expression string.
Y
Value in y-direction. Numeric value or expression string.
Value
Numeric value or expression string.
Script function: Sub LutSetZInterpolated(Name, X, Y, Value)
6.2.4.18
StoreMP Retrieves the mean/online values for x, y, z of the parameterized measurement point normnames ("Definition" view in LTC block). The measurement point can either be appended (Index = -1) or an existing measurement point can be overwritten in the measurement point list. Depending on the measurement point resolution radius, a nearby measurement point can be replaced with the new one. A corresponding PUMA message will be output. Information Measurement points can also be specified directly or read from specific normnames - see also activation object StoreMPbyNN. Parameters
Description
Name
Name of look-up table.
Index
Numeric value or expression string. The index specifies the row for x, y and z in the measurement point list. Added point: index = -1 Overwrite: 0 <= index <= n-1
Access
Enumerator Mean value...0 Online value...1
Script function: Sub LutStoreMP(Name, Index, Access)
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
6.2.4.19
StoreMbByNN Retrieves the mean/online values for x, y, z for the measurement point normnames and stores them in the measurement point list. Parameters
Description
Name
Name of look-up table.
XValue
Numeric value or expression string.
YValue
Numeric value or expression string.
ZValue
Numeric value or expression string.
Index
Numeric value or expression string. The index is zero-based, specifying the row for x, y and z in the measurement point list. Added point: index is -1 Overwrite: 0 <= index <= n – 1
Access
0...mean value 1...online value
Script function: Sub LutStoreByNN(Name, XValue, YValue, ZValue, Access)
6.2.4.20
LutSetMPs Sets a list of measurement points. Parameters
Description
Name
Name of look-up table.
MPList
Safe array for x, y, z
Script function: Sub LutSetMPs (Name, MPList)
6.2.4.21
DeleteMP Deletes a specified point (x, y, z) from the list or the entire list. Parameters
Description
Name
Name of look-up table.
Index
Numeric value or expression string. The index specifies the row for x, y and z in the measurement point list. Added point: index = -1 Overwrite: 0 <= index <= n-1
Script function: Sub LutDeleteMP(Name, Index)
AVL PUMA Open 2012 — Scripting in PUMA Open
75
76
Functions of the PUMA Open Script API
6.2.4.22
WriteMPs Writes the measurement points collected in the measurement point list to a file. Available formats: PUMA5, CSV Parameters
Description
Name
Name of look-up table.
FileName
Name of file, string. ""...File is stored in the LUT folder under the name of the look-up table "xy"...File is stored in the LUT folder under xy.tx "C:\abc\xx" is stored as file xx, if the folder abc is available
Format
Enumerator 1 .. PUMA5 format 2 .. CSV format
Script function: Sub LutWriteMPs(Name, FileName, Format)
6.2.4.23
ReadMPs Reads the measurement points from a file. Available formats: PUMA5, CSV Parameters
Description
Name
Name of look-up table.
FileName
Name of file, string. ""...File is stored in the LUT folder under the name of the look-up table "xy"...File is stored in the LUT folder under xy.tx "C:\abc\xx" is stored as file xx, if the folder abc is available
Format
Enumerator 0...PUMA5 format 1...CSV format
Script function: Sub LutReadMPs(Name, FileName, Format)
6.2.4.24
FilterMPs Performs a confidence check or filtering of measurement points. Parameters
Description
Name
Name of look-up table.
Value
Name of file, string. 0 < <= 100% for confidence 0 < <= 1 for filtering
Mode
Enumerator 0 ... confidence 1 ... filtering
Script function:
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
Sub LutFilterMPs(Name, Value, Mode)
6.2.4.25
GetNumberOfMPs Retrieves the number of measurement points available in the list. Parameters
Description
Name
Name of channel.
Script function: Sub LutGetNumberOfMPs(Name)
6.2.4.26
Calculate Calculates the grid points from the measurement points in the defined calculation range. Optionally, the dependency for the x- and y-axes can be defined. Parameters
Description
Name
Name of look-up table.
Dependency
Parameter for x, y and both 0...both 1...x 2...y
Script function: Sub LutCalculate(Name, Dependency)
6.2.4.27
Filter Performs a confidence check or filtering of the grid points. Parameters
Description
Name
Name of look-up table.
Value
Name of file, string. 0 < <= 100% for confidence 0 < <= 1 for filtering
Mode
Enumerator 0 ... confidence 1 ... filtering
Script function: Sub LutFilter(Name, Value, Mode)
6.2.4.28
SetZRange Sets the look-up table in a specific range to a specified value. X1, Y1, X2 and Y2 are the physical values for the range to which the z-offset is applied. Optionally, the z-offset can be specified as a percentage value of the z-range. Parameters
Description
Name
Name of look-up table.
ZValue
Numeric value or expression string.
X1Value
Numeric value or expression string.
Y1Value
Numeric value or expression string.
AVL PUMA Open 2012 — Scripting in PUMA Open
77
78
Functions of the PUMA Open Script API
Parameters
Description
X2Value
Numeric value or expression string.
Y2Value
Numeric value or expression string.
Mode
Enumerator. 0...absolute value (default) 1...percentage value
Script function: Sub LutSetZRange(Name, ZValue, X1Value, Y1Value, X2Value, Y2Value, Mode)
6.2.4.29
IncrementRange Increments the look-up table in a specific range by a specified offset (z-value). X1, Y1, X2 and Y2 are the physical values for the range to which the z-offset is applied. Optionally, the z-offset can be specified as a percentage value of the z-range. Parameters
Description
Name
Name of look-up table.
ZValue
Numeric value or string.
X1Value
Numeric value or string.
Y1Value
Numeric value or string.
X2Value
Numeric value or string.
Y2Value
Numeric value or string.
Mode
Enumerator. 0...absolute value (default) 1...percentage value
Script function: Sub LutIncrementRange(Name, ZValue, X1Value, Y1Value, X2Value, Y2Value, Mode)
6.2.4.30
RestrictGradient Restricts the gradient of a look-up table. Parameters
Description
Name
Name of look-up table.
X
Enumerator for x-direction: 0...ignore 1...restrict (default)
XValue
Numerical value or expression string. ""...default values of LUT calculator are applied 1...default
Y
Enumerator for y-direction: 0...ignore 1...restrict (default)
YValue
Numerical value or expression string. ""...default values of LUT calculator are applied 1...default
Script function: AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
Sub LutRestrictGradient(Name, X, XValue, Y, YValue)
6.2.4.31
Gradient Changes the gradient in x-, y- and z-direction. For the z-direction, each grid point is multiplied by the specified value. Parameters
Script function: Sub LutGradient(Name, Value, Direction)
6.2.5
Multi Function Generator PUMA Open provides a "multi-function generator" with which signals with defined signal characteristics can be generated. These signals are used mainly for testing and debugging purposes. The following waveforms are supported:
6.2.5.1
Sine
Square
Triangle
SawTooth
Modify Modifies specific signal characteristics of the selected generator channel. When the generator is switched on, these modifications are permanently applied. Parameters
Description
Name
Name of generator. String.
Channel
Channel name or ID of selected generator channel. Numeric value or expression string.
AttributelD
Defines which characteristic of the signal is to be modified. Counter: Magnitude...eMfgMagnitude Offset...eMfgoffset Phase...eMfgPhase SignalFrequency...eMfgSignalFrequency waveForm...eMfgWaveForm
Value
Value of selected characteristic. Numeric value or expression string.
Script function/command: Sub MfgModify(Name, Channel, AttributeID, Value)
AVL PUMA Open 2012 — Scripting in PUMA Open
79
80
Functions of the PUMA Open Script API
6.2.5.2
Modify Wave Form Modifies the waveform of the selected generator channel. The modifications can be observed immediately when the generator is switched on. Parameters
Description
Name
Name of generator. String.
Channel
Channel name or ID of selected generator channel. Numeric value or expression string.
AttributeID
Defines the waveform of the signal. Counter: Sine...eMfgSine Square...eMfgSquare SawTooth...eMfgSawTooth Triangle...eMfgSignalTriangle
Script function/command: Sub MfgModify(Name, Channel, AttributeID, Value)
Example MfgModify "MyMfG1", "MySine", eMfgWaveForm, eMfgSawTooth
6.2.5.3
Start Starts cyclic generation of all channels of the selected generator. Parameters
Description
Name
Name of generator. String.
Script function/command: Sub MfgStart(Name)
6.2.5.4
Stop Stops the cyclic generation of all channels of the selected generator. Parameters
Description
Name
Name of generator. String.
Script function/command: Sub MfgStop(Name)
6.3
General Purpose Control
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
6.3.1
PID Control
6.3.1.1
Start This activation object (AO) starts the cyclic control activity of the selected PID or PT2/PT3 controller. In order to successfully start the controller, the status of all input channels (e.g. status of the channel from which the actual value is received) must be valid. Parameters
Description
Name
Name of PID or PT2/PT3 controller
Script function/command: Sub PidStart (Name) Sub Pt3Start (Name)
6.3.1.2
Start (all) This AO starts the cyclic control activity of all PID or PT2/PT3 controllers. In order to successfully start the controller, the status of all input channels (e.g. status of actual value channel) must be valid. Script function/command: Sub PidStartAll () Sub Pt3StartAll ()
6.3.1.3
Start (extended) This AO starts the cyclic control activity in the constant-value mode using the specified controller variant and the defined demand value. In order to successfully start the controller, the status of all input channels (e.g. status of actual value channel) must be valid. Parameters
Description
Name
Name of PID or PT2/PT3 controller
ParameterVariant
Number of parameter variant
DemandValue
Demand value
Script function/command: Sub PidStartEx (Name, ParameterVariant, DemandValue) Sub Pt3StartEx (Name, ParameterVariant, DemandValue)
6.3.1.4
Stop This AO stops the cyclic control activity of the selected PID or PT2/PT3 controller. Parameters
Description
Name
Name of PID or PT2/PT3 controller
Script function/command: Sub PidStop (Name) Sub Pt3Stop (Name)
AVL PUMA Open 2012 — Scripting in PUMA Open
81
82
Functions of the PUMA Open Script API
6.3.1.5
Stop (all) This AO stops the cyclic control activity of all PID or PT2/PT3 controllers. Script function/command: Sub PidStopAll () Sub Pt3StopAll ()
6.3.1.6
Activate Parameter Variant This AO activates the specified parameter variant for the selected controller. Parameters
Description
Name
Name of PID or PT2/PT3 controller
ParameterVariant
Number of parameter variant
Script function/command: Sub PidActivateParameterVariant (Name, ParameterVariant) Sub Pt3ActivateParameterVariant (Name, ParameterVariant)
6.3.1.7
Modify Demand Value This AO changes the current controller demand value to the value specified by the AO parameter (in demand value mode "static"). Parameters
Description
Name
Name of PID or PT2/PT3 controller
DemandValue
Specifies the demand value.
Script function/command: Sub PidModifyDemandValue (Name, DemandValue) Sub Pt3ModifyDemandValue (Name, DemandValue)
6.3.1.8
Modify Demand Value Mode This AO changes the controller's current demand value mode to the value specified by the AO parameter (demand value modes "static", "dynamic"). Parameters
Description
Name
Name of PID or PT2/PT3 controller
DemandValueMode
Specifies the demand value mode (constant value, dynamic value).
Script function/command: Sub PidModifyDemandValueMode (Name, DemandValueMode) Sub Pt3ModifyDemandValueMode (Name, DemandValueMode)
6.3.1.9
Modify Demand Value Source This AO changes the current demand value source of the controller to the specified source (normname, look-up table; in "dynamic" demand value mode).
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
Parameters
Description
Name
Name of PID or PT2/PT3 controller
DemandValueSource
Specifies the demand value source (look-up table, normname).
Script function/command: Sub PidModifyDemandValueSource (Name, DemandValueSource) Sub Pt3ModifyDemandValueSource (Name, DemandValueSource)
6.3.1.10
Modify Parameter This AO changes the value of the selected parameter (2nd parameter) in the selected parameter variant (1st parameter) of the given controller. Parameters
Description
Name
Name of PID or PT2/PT3 controller
ParameterVariant
Number of parameter variant
ParameterId
Parameter ID
Value
New value of the selected parameter
Script function/command: Sub PidModifyParameter (Name, ParameterVariant, ParameterId, Value) Sub Pt3ModifyParameter (Name, ParameterVariant, ParameterId, Value)
6.3.1.11
Modify Demand Value Source and Mode This AO changes the current demand value source and the demand value mode of the controller. Parameters
Description
Name
Name of PID or PT2/PT3 controller
DemandValueSourceMode
Specifies the demand value source and the demand value mode.
Script function/command: Sub PidModifyDemandValueModeAndSource (Name, DemandValueSourceMode) Sub Pt3ModifyDemandValueModeAndSource (Name, DemandValueSourceMode)
6.3.2
Test Cell Controller
6.3.2.1
EnableCyclicAction Enables a cyclic action. Parameters
Description
stateMachineName
Name of machine
stateName
Name of state
actionName
Name of the cyclic action.
Script function/command: Sub TccEnableCyclicAction(stateMachineName, stateName, actionName)
AVL PUMA Open 2012 — Scripting in PUMA Open
83
84
Functions of the PUMA Open Script API
6.3.2.2
DisableCyclicAction Disables a cyclic action. If no name is assigned to an action, all cyclic actions of a status are disabled. Parameters
Description
stateMachineName
Name of machine
stateName
Name of state
actionName
Name of the cyclic action.
Script function/command: Sub TccDisableCyclicAction(stateMachineName, stateName, actionName)
6.3.2.3
Start Starts the state machine. Parameters
Description
(stateMachineName
Name of machine
Script function/command: Sub TccStart (stateMachineName)
6.3.2.4
Stop Stops the state machine. Parameters
Description
stateMachineName
Name of machine
Script function/command: Sub TccStop (stateMachineName)
6.3.2.5
SetCurrentState Sets the state machine into the desired state. Parameters
Description
stateMachineName
Name of machine
stateName
Name of state
Script function/command: Sub TccSetState(stateMachineName, stateName)
6.3.2.6
ToggleCyclicAction Toggles execution of a cyclic action. Parameters
Description
stateMachineName
Name of machine
stateName
Name of state
actionName
Name of the cyclic action.
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
Script function/command: Sub TccToggleCyclicAction(stateMachineName, stateName, actionName)
Script function/command: Sub TccToggleTrigger(stateMachineName, stateName, triggerName)
6.3.2.10
EnableTransition Enables the transition between states. Parameters
Description
stateMachineName
Name of machine
stateName
Name of state
transitionName
Name of the transition.
Script function/command: Sub TccEnableTransition(stateMachineName, stateName, transitionName)
AVL PUMA Open 2012 — Scripting in PUMA Open
85
86
Functions of the PUMA Open Script API
6.3.2.11
DisableTransition Disables the transition between states. Parameters
Description
stateMachineName
Name of machine
stateName
Name of state
transitionName
Name of the transition.
Script function/command: Sub TccDisableTransition(stateMachineName, stateName, transitionName)
6.3.2.12
ToggleTransition Toggles the transition between states. Parameters
Description
stateMachineName
Name of machine
stateName
Name of state
transitionName
Name of the transition.
Script function/command: Sub TccToggleTransition(stateMachineName, stateName, transitionName)
6.3.2.13
EnableGlobalTrigger Enables execution of a global trigger. Parameters
Description
stateMachineName
Name of machine
triggerName
Name of trigger
Script function/command: Sub TccEnableGlobalTrigger(stateMachineName, triggerName)
6.3.2.14
DisableGlobalTrigger Disables execution of a global trigger. Parameters
Description
stateMachineName
Name of machine
triggerName
Name of trigger
Script function/command: Sub TccDisableGlobalTrigger(stateMachineName, triggerName)
6.3.2.15
ToggleGlobalTrigger Toggles execution of a global trigger.
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
Parameters
Description
stateMachineName
Name of machine
triggerName
Name of trigger
Script function/command: Sub TccToggleGlobalTrigger(stateMachineName, triggerName)
6.3.2.16
ResumeFromError Resumes the state in which RtError() was last called up. Parameters
Description
stateMachineName
Name of machine
Script function/command: Sub TccResume(stateMachineName)
6.3.2.17
TraceOn Sets the trace level in the range <0.3>. Parameters
Description
stateMachineName
Name of machine
level
Trace level
Script function/command: Sub TccTraceOn(stateMachineName, level)
6.3.2.18
TraceOff Switches off tracing. Parameters
Description
stateMachineName
Name of machine
level
Trace level
Script function/command: Sub TccTraceOff(stateMachineName, level)
6.3.3
Test Cell Devices
6.3.3.1
Switch Device Switches a digital device to another state. Parameters
Description
DeviceName
Name of device
SwitchState
Name of the new state.
Script function/command: Sub TcdSwitchDevice(DeviceName, SwitchState)
AVL PUMA Open 2012 — Scripting in PUMA Open
87
88
Functions of the PUMA Open Script API
6.3.4
Two/Three Point Control
6.3.4.1
Start This activation object (AO) starts the cyclic control activity of the selected PID or PT2/PT3 controller. In order to successfully start the controller, the status of all input channels (e.g. status of the channel from which the actual value is received) must be valid. Parameters
Description
Name
Name of PID or PT2/PT3 controller
Script function/command: Sub PidStart (Name) Sub Pt3Start (Name)
6.3.4.2
Start (all) This AO starts the cyclic control activity of all PID or PT2/PT3 controllers. In order to successfully start the controller, the status of all input channels (e.g. status of actual value channel) must be valid. Script function/command: Sub PidStartAll () Sub Pt3StartAll ()
6.3.4.3
Start (extended) This AO starts the cyclic control activity in the constant-value mode using the specified controller variant and the defined demand value. In order to successfully start the controller, the status of all input channels (e.g. status of actual value channel) must be valid. Parameters
Description
Name
Name of PID or PT2/PT3 controller
ParameterVariant
Number of parameter variant
DemandValue
Demand value
Script function/command: Sub PidStartEx (Name, ParameterVariant, DemandValue) Sub Pt3StartEx (Name, ParameterVariant, DemandValue)
6.3.4.4
Stop This AO stops the cyclic control activity of the selected PID or PT2/PT3 controller. Parameters
Description
Name
Name of PID or PT2/PT3 controller
Script function/command: Sub PidStop (Name) Sub Pt3Stop (Name)
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
6.3.4.5
Stop (all) This AO stops the cyclic control activity of all PID or PT2/PT3 controllers. Script function/command: Sub PidStopAll () Sub Pt3StopAll ()
6.3.4.6
Activate Parameter Variant This AO activates the specified parameter variant for the selected controller. Parameters
Description
Name
Name of PID or PT2/PT3 controller
ParameterVariant
Number of parameter variant
Script function/command: Sub PidActivateParameterVariant (Name, ParameterVariant) Sub Pt3ActivateParameterVariant (Name, ParameterVariant)
6.3.4.7
Modify Demand Value This AO changes the current controller demand value to the value specified by the AO parameter (in demand value mode "static"). Parameters
Description
Name
Name of PID or PT2/PT3 controller
DemandValue
Specifies the demand value.
Script function/command: Sub PidModifyDemandValue (Name, DemandValue) Sub Pt3ModifyDemandValue (Name, DemandValue)
6.3.4.8
Modify Demand Value Mode This AO changes the controller's current demand value mode to the value specified by the AO parameter (demand value modes "static", "dynamic"). Parameters
Description
Name
Name of PID or PT2/PT3 controller
DemandValueMode
Specifies the demand value mode (constant value, dynamic value).
Script function/command: Sub PidModifyDemandValueMode (Name, DemandValueMode) Sub Pt3ModifyDemandValueMode (Name, DemandValueMode)
6.3.4.9
Modify Demand Value Source This AO changes the current demand value source of the controller to the specified source (normname, look-up table; in "dynamic" demand value mode).
AVL PUMA Open 2012 — Scripting in PUMA Open
89
90
Functions of the PUMA Open Script API
Parameters
Description
Name
Name of PID or PT2/PT3 controller
DemandValueSource
Specifies the demand value source (look-up table, normname).
Script function/command: Sub PidModifyDemandValueSource (Name, DemandValueSource) Sub Pt3ModifyDemandValueSource (Name, DemandValueSource)
6.3.4.10
Modify Parameter This AO changes the value of the selected parameter (2nd parameter) in the selected parameter variant (1st parameter) of the given controller. Parameters
Description
Name
Name of PID or PT2/PT3 controller
ParameterVariant
Number of parameter variant
ParameterId
Parameter ID
Value
New value of the selected parameter
Script function/command: Sub PidModifyParameter (Name, ParameterVariant, ParameterId, Value) Sub Pt3ModifyParameter (Name, ParameterVariant, ParameterId, Value)
6.3.4.11
Modify Demand Value Source and Mode This AO changes the current demand value source and the demand value mode of the controller. Parameters
Description
Name
Name of PID or PT2/PT3 controller
DemandValueSourceMode
Specifies the demand value source and the demand value mode.
Script function/command: Sub PidModifyDemandValueModeAndSource (Name, DemandValueSourceMode) Sub Pt3ModifyDemandValueModeAndSource (Name, DemandValueSourceMode)
6.4
I/O Sub-System
6.4.1
ASAP2 CAN
6.4.1.1
CAN Reset Hardware reset in the case of uncorrectable errors when the CAN chip is in status "bus off". During the reset, communication between PUMA and CAN is interrupted.
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
Parameters
Description
Name
Name of the CAN module
Script function/command: Sub A2cReset (Name)
6.4.1.2
CAN Reset on CANLine Hardware reset in the case of uncorrectable errors when the CAN chip is in status "bus off". During the reset, communication between PUMA and CAN is interrupted. Parameters
Description
canline
CAN line number to be reset (integer 1-8).
Script function/command: Sub A2cresetLine (canline)
6.4.1.3
Send Sends an individual CAN message to the CAN bus via the A2Can IO Subsystem. The command defines the CAN message ID, length and data contents of the message to be sent. It can be used to create CAN messages in addition to the messages that are transferred cyclically as defined in the parameters (e.g. to send an individual command to an ECU). Information The CAN message mode (Standard or Extended) is defined in the parameter block CAN within the SYS parameter loadset (parameter "CAN Mode" in group "General Parameters"). Parameters
Description
Name
Name of CAN device to which the message should be sent. String. Default: A2Can-General.A2Can-ST-001 (uses first CAN line of PUMA system)
ID
CAN message ID (0..2^29-1) Numeric value. No default value.
Length
Number of data bytes of message (0..8). Numeric value. Default: 8 (entire CAN message)
Data1
First data byte of CAN message. Numeric value or expression string. Default: 0
Data2
Second data byte of CAN message. Numeric value or expression string. Default: 0
AVL PUMA Open 2012 — Scripting in PUMA Open
91
92
Functions of the PUMA Open Script API
Parameters
Description
Data3
Third data byte of CAN message. Numeric value or expression string. Default: 0
Data4
Fourth data byte of CAN message. Numeric value or expression string. Default: 0
Data5
Fifth data byte of CAN message. Numeric value or expression string. Default: 0
Data6
Sixth data byte of CAN message. Numeric value or expression string. Default: 0
Data7
Seventh data byte of CAN message. Numeric value or expression string. Default: 0
Data8
Eighth data byte of CAN message. Numeric value or expression string. Default: 0
Send on CANLine Sends an individual CAN message to the CAN bus via the A2Can IO Subsystem. The command defines the CAN message ID, length and data contents of the message to be sent. It can be used to create CAN messages in addition to the messages that are transferred cyclically as defined in the parameters (e.g. to send an individual command to an ECU in an automatic test run). Information The CAN message mode (Standard or Extended) is defined in the parameter block CAN within the SYS parameter loadset (parameter "CAN Mode" in group "General Parameters"). Parameters
Description
canline
Name of the canline to which the message should be sent (range 1-8).
ID
CAN message ID (0..2^29-1) Numeric value. No default value.
Length
Number of data bytes of message (0..8). Numeric value. Default: 8 (entire CAN message)
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
Parameters
Description
Data1
First data byte of CAN message. Numeric value or expression string. Default: 0
Data2
Second data byte of CAN message. Numeric value or expression string. Default: 0
Data3
Third data byte of CAN message. Numeric value or expression string. Default: 0
Data4
Fourth data byte of CAN message. Numeric value or expression string. Default: 0
Data5
Fifth data byte of CAN message. Numeric value or expression string. Default: 0
Data6
Sixth data byte of CAN message. Numeric value or expression string. Default: 0
Data7
Seventh data byte of CAN message. Numeric value or expression string. Default: 0
Data8
Eighth data byte of CAN message. Numeric value or expression string. Default: 0
Enable CAN Module Enables a CAN module, defined in a CAN parameter block. Parameters
Description
Name
Name or number of the module.
mod_name_num
Name or number of the module.
Script function/command: Sub A2cEnableModule(Name, mod_name_num)
6.4.1.6
Enable CAN Module on CANline Enables a CAN module, defined in a CAN parameter block.
AVL PUMA Open 2012 — Scripting in PUMA Open
93
94
Functions of the PUMA Open Script API
Parameters
Description
canline
Defines on which canline the module has to be enabled (range 1-8).
mod_name_num
Name or number of the module.
Script function/command: Sub A2cEnableModule(canline, mod_name_num)
6.4.1.7
Disable CAN Module Disables a CAN module, defined in a CAN parameter block. Parameters
Description
Name
Name or number of the module.
mod_name_num
Name or number of the module.
Script function/command: Sub A2cDisableModule(Name, mod_name_num)
6.4.1.8
Disable CAN Module on CANline Disables a CAN module, defined in a CAN parameter block. Parameters
Description
canline
Defines on which canline the module has to be disabled (range 1-8).
mod_name_num
Name or number of the module.
Script function/command: Sub A2cDisableModule(canline, mod_name, mod_number)
6.4.2
CanOpen-PressureiN See FEM-AnalogIn on page 94.
6.4.3
FEM-AnalogIn
6.4.3.1
Guided Calibration Starts a guided semiautomatic calibration of all I/O channels of a device. Parameters
Description
DeviceName
Name of device
Script function/command: Sub IodGuidedCalibration(DeviceName)
6.4.4
FEM-CounterIn See FEM-AnalogIn on page 94.
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
6.4.5
FFEM-AnalogIn See FEM-AnalogIn on page 94.
6.4.6
FFEM-CounterIn See FEM-AnalogIn on page 94.
6.4.7
FFEM-FastAnalogIn See FEM-AnalogIn on page 94.
6.4.8
GSS-AnalogIn See FEM-AnalogIn on page 94.
6.4.9
EMC-AccService See FEM-AnalogIn on page 94.
6.5
Channel Access
6.5.1
System Channel The data flow in PUMA Open is based on the System Channels concept. These channels constitute the link between a data provider and its data consumers. Each system channel consists of a data part and a status part. The data part drives the data flow whereas the status part contains information on the data part and the data provider. System channels consist of at least one system variable, the Base Variable. However, there can also be more than one variable. The statistical results of a PUMA Open steady state measurement (mean value, maximum/minimum values, standard deviation) are defined by subvariables. Information Normnames (i.e. quantities) are used to label a system channel. However, there are also system channels that do not have a normname assigned to them. For general purposes, the following system channel types are supported:
Long (Bit Field)
float
Double
String.
Some of the requests defined below are rejected if the relevant channel is being used. The following condition is checked prior to write requests:
Provider: no cyclic provider
AVL PUMA Open 2012 — Scripting in PUMA Open
95
96
Functions of the PUMA Open Script API
Information In all channel services use the following algorithm to search for the channels under their name:
At first, the channel is searched for under its normname. Then the channel is searched for under its bitname, i.e. its local name that can be assigned to the digital input/output channels. After this, the channel is searched for under its system name, i.e. the language-independent name that is typically attached to the normname.
If the channel cannot not be found using one of the options described above, the channel does not exist, and a runtime error will be generated.
6.5.1.1
FireEvent "Fires" an event. Any channel can be used as an event source. To "fire" an event means to send a notification to all registered event sinks. Information This is a service function. Firing events may impair system behavior.
Parameters
Description
ChannelName
Name of channel. String.
Value
The assigned value is automatically allocated to the specified channel data type. Numeric value or expression string.
Script function/command: Sub ChnFireEvent(ChannelName, Value)
Example ChnFireEvent "RESCHA01", 99
6.5.1.2
FireEventSub "Fires" an event of a subvariable. Any channel can be used as an event source. To "fire" an event means to send a notification to all registered event sinks. Information This is a service function. Firing events may impair system behavior. Parameters
Description
ChannelName
Name of channel. String.
SubVariableName
Specifies the subvariable of the selected channel. String.
Value
The assigned value is automatically allocated to the specified channel data type. Numeric value or expression string.
Script function/command: AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
Sub ChnFireEventSub(ChannelName, SubVariableName, Value)
Example ChnFireEventSub "RESCHA01", "cmd", 99
6.5.1.3
SetValue Assigns a value to a channel. Parameters
Description
ChannelName
Name of channel. String.
Value
The assigned value is automatically allocated to the specified channel data type. Numeric value or expression string. Information
If the expression string can be interpreted as a mathematical expression (e.g. "12.99 + RESCHA40*RESCHA41 + RESCHA42"), it is executed and the result is assigned to the channel. Script function/command: Sub ChnSet(ChannelName, Value)
If you want to assign a string constant to a channel of the string data type, the 'ChnSet' function can be used as follows: ChnSet "ChannelName", """Text"""
To programmatically read a channel you can use the "ChnGet" function: Function ChnGet(ChannelName)
Example ChnSet "RESCHA01", 123.45 ChnSet "RESCHA01", ChnGet("RESCHA02") ChnSet "RESCHA01", "RESCHA02" ChnSet "RESCHA01", "RESCHA02/12.55*RESCHA03" ChnSet "RESTXT01", """This is just a sample string"""
6.5.1.4
SetValueSub Assigns a value to the subvariable of a channel. The statistical results of a measurement are the subvariables most commonly used.
Average: ‘mean‘
Minimum: ‘min‘
Maximum: ‘max‘
Standard deviation: ‘std‘ Information
The statistical values are only valid after a PUMA Open steady-state measurement. The base variable can also be addressed by its name: AVL PUMA Open 2012 — Scripting in PUMA Open
97
98
Functions of the PUMA Open Script API
Base variable: "base"
Parameters
Description
ChannelName
Name of channel. String.
SubVariable
Specifies the subvariable of the selected channel. String.
Value
The assigned value is automatically allocated to the specified channel data type. Numeric value or expression string.
To programmatically read a subvariable of a channel you can use the "ChnGetSub" function: Function ChnGetSub(ChannelName, SubVariableName)
Example ChnSetS "RESCHA01", ChnGetSub ("RESCHA02", "min")
6.5.1.5
SetStatus Sets the status. Information This is a service function. Setting a status may impair system behavior. Parameters
Description
ChannelName
Name of channel. String.
Status
Numeric value:
Ok...0
No Provider...1
Not Initialized...2
Device Offline...3
Overflow...4
Sensor Broken...5
Script function/command: Sub ChnSetStatus(ChannelName, Status)
To programmatically read the channel status you can use the "ChnGetStatus" function: Function ChnGetStatus(ChannelName)
Example If ChnGet(RESCHA01)>=10000 Then ChnSetStatus RESCHA01, 4 End If
6.5.1.6
SetStatusSub Sets the status of a subvariable.
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
Information This is a service function. Setting a status may impair system behavior. Parameters
Description
ChannelName
Name of channel. String.
SubVariableName
Specifies the subvariable of the selected channel. String.
Status
Numeric value:
Ok...0
No Provider...1
Not Initialized...2
Device Offline...3
Overflow...4
Sensor Broken...5
Script function/command: Sub ChnSetStatusSub(ChannelName, SubVariableName, Status)
To programmatically read the channel status you can use the "ChnStatusSub" function: Function ChnGetStatusSub(ChannelName, SubVariableName)
6.5.1.7
MdvGetDim Sets the channel value to the number of axes of the specified table. Parameters
Description
TableName
Name of look-up table channel. String.
Script function/command: Function MdvGetDim(TableName)
6.5.1.8
MdvGetXDim Sets the channel value to the number of grid points on the selected axes of the specified table. Parameters
Description
TableName
Name of look-up table channel. String.
AxisIndex
Identifies the input axis. In table: enumerator (x-axis...0, y-axis...1) In script: numeric value or expression string.
Script function/command: Function MdvGetXDim(TableName, AxisIndex)
6.5.1.9
MdvGetX Sets the channel value to the value of the specified axis grid point.
AVL PUMA Open 2012 — Scripting in PUMA Open
99
100
Functions of the PUMA Open Script API
Parameters
Description
TableName
Name of look-up table channel. String.
AxisIndex
Identifies the input axis. In table: enumerator (x-axis...0, y-axis...1) In script: numeric value or expression string.
GridIndex
Index in the grid point list. Numeric value or expression string.
Script function/command: Function MdvGetX(TableName, AxisIndex, GridIndex)
6.5.1.10
MdvSetX Sets the value of the specified axis grid point to the value of the defined channel. Parameters
Description
TableName
Name of look-up table channel. String.
AxisIndex
Identifies the input axis. In table: enumerator (x-axis...0, y-axis...1) In script: numeric value or expression string.
GridIndex
Index in the grid point list. Numeric value or expression string.
Value
Numeric value or expression string.
Script function/command: Sub MdvSetX(TableName, AxisIndex, GridIndex, Value)
6.5.1.11
MdvGetZ Sets the channel value to the value of the specified map grid point. Parameters
Description
TableName
Name of look-up table channel. String.
XIndex
Index in the x grid point list. Numeric value or expression string.
YIndex
Index in the y grid point list. Numeric value or expression string.
Script function/command: Function MdvGetZ(TableName, XIndex, YIndex)
6.5.1.12
MdvSetZ Sets the value of the specified map grid point to the value of the defined channel.
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
Abb. 47 Parameters
Description
TableName
Name of look-up table channel. String.
XIndex
Index in the x grid point list. Numeric value or expression string.
YIndex
Index in the y grid point list. Numeric value or expression string.
Value
Numeric value or expression string.
Script function/command: Sub MdvSetZ(TableName, XIndex, YIndex, Value)
6.5.1.13
MdvGetZInterpolated Sets the channel value to the specified table interpolation value. Parameters
Description
TableName
Name of look-up table channel. String.
X
Value at the x location. Numeric value or expression string.
Y
Value at the y location. Numeric value or expression string.
Script function/command: Function MdvGetZInterpolated(TableName, X, Y)
6.5.1.14
MdvSetZInterpolated Sets the value of the specified interpolation grid point to the value of the defined channel.
Abb. 48
AVL PUMA Open 2012 — Scripting in PUMA Open
101
102
Functions of the PUMA Open Script API
Parameters
Description
TableName
Name of look-up table channel. String.
X
Value at the x location. Numeric value or expression string.
Y
Value at the y location. Numeric value or expression string.
Value
Numeric value or expression string.
Script function/command: Sub MdvSetZInterpolated(TableName, X, Y, Value)
6.5.1.15
SrvRamp Activates the ramp service.
Abb. 49 Parameters
Description
ChannelName
Name of channel. String.
Target
Final value that the system channel should have after ramp completion. Numeric value or expression string.
RampTime
Ramp time. Numeric value or expression string.
Script function/command: Sub SrvRamp(ChannelName, Target, RampTime)
6.5.1.16
SrvSawTooth Starts a sequence of ramps.
Abb. 50
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
Parameters
Description
ChannelName
Name of channel. String.
Start
The sequence is started using this value. Numeric value or expression string.
Magnitude
The individual ramps reach a maximum value of VMax =VStart + VMagnitude. Numeric value or expression string.
Period
The duration [s] of an individual ramp is defined by this value. Numeric value or expression string.
Repetitions
Number of individual ramps. If the number of repetitions determines a negative number, the service flashes until it is stopped explicitly. Numeric value or expression string.
Script function/command: Sub SrvSawTooth(ChannelName, Start, Magnitude, Periode, Repetitions)
6.5.1.17
SrvPulse Starts a sequence of pulses.
Abb. 51 Parameters
Description
ChannelName
Name of channel. String.
Magnitude
When the service is active, the channel value switches between VStart and VStart + VMagnitude. Numeric value or expression string.
TimeHigh
Duration (s) for which the signal dwells in "high" state (VStart + VMagnitude). Numeric value or expression string.
TimeLow
Duration (s) for which the signal dwells in "low" state (VStart). Numeric value or expression string.
Repetitions
Number of individual pulses. If the number of repetitions determines a negative number, the service flashes until it is stopped explicitly. Numeric value or expression string.
Script function/command: Sub SrvPulse(ChannelName, Magnitude, TimeHigh, TimeLow, Repetitions)
AVL PUMA Open 2012 — Scripting in PUMA Open
103
104
Functions of the PUMA Open Script API
6.5.1.18
SrvInvert Starts a sequence of inversions.
Abb. 52 Parameters
Description
ChannelName
Name of channel. String.
Magnitude
When the service is active, the channel value switches between bi Start and bi Start . bi Start : bi Start . Numeric value or expression string.
TimeHigh
Duration (s) for which the channel value dwells in "high" state (bi Mask , bi Start : bi Start) . Numeric value or expression string.
TimeLow
Duration (s) for which the channel value dwells in "low" state (bi Start). Numeric value or expression string.
Repetitions
Number of individual pulses. If the number of repetitions determines a negative number, the service flashes until it is stopped explicitly. Numeric value or expression string.
Script function/command: Sub SrvInvert(ChannelName, Mask, TimeHigh, TimeLow, Repetitions)
6.5.1.19
SrvOff Stops active channel services and retains the most recent value. Parameters
Description
ChannelName
Name of channel. String.
Script function/command: Sub SrvOff(ChannelName)
6.5.1.20
SrvConst Stops active channel services and sets a constant value.
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
Parameters
Description
ChannelName
Name of the channel associated to the service to be stopped. String.
Value
After the service has been stopped, the channel retains this value.
Script function/command: Sub SrvConst(ChannelName, Value)
6.5.1.21
SrvDisconnect Disconnects a selected channel from its cyclic provider. Parameters
Description
ChannelName
Name of the channel that is to be separated from the Provider. String.
Script function/command: Sub SrvDisconnect(ChannelName)
6.5.1.22
SrvConnect Reconnects a channel to its cyclic provider. Parameters
Description
ChannelName
Name of the channel that is to be connected to the Provider. String.
Script function/command: Sub SrvConnect(ChannelName)
6.5.1.23
SrvSynchronize Waits until a specified criterion has been met or a timeout has expired and writes the result to the selected channel. Parameters
Description
ChannelName
Name of the channel that is to be used as a status channel. If the monitored condition is evaluated to be "true" within the given timeout, the channel is set to "true" (1). Otherwise it is set to "false" (0). String (can be empty).
Condition
Logical expression that is monitored about 10 times a second. Expression string.
Timeout
Timeout
Script function/command: Sub SrvSynchronize(ChannelName, Condition, Timeout)
AVL PUMA Open 2012 — Scripting in PUMA Open
105
106
Functions of the PUMA Open Script API
6.5.1.24
SetDelay Assigns a value to the delay time attribute of a channel. Parameters
Description
ChannelNname
Name of channel. String.
DelayTime
Delay time that is automatically assigned to the selected channel.
Script function/command: Sub ChnSetDelay(ChannelName, DelayTime)
To programmatically read a delay attribute you can use the "ChnGetDelay" function: Function ChnGetDelay(ChannelName)
Example ChnSet "RESCHA01", ChnGetDelay("RESCHA02")
6.5.1.25
SetDelaySub Assigns a value to the delay time attribute of a subvariable of a channel. Subvariables are addressed by their individual names. The base variable can also be addressed by its name:
Base variable: ‘base‘
Parameters
Description
ChannelName
Name of channel. String.
SubVariable
Specifies the subvariable of the selected channel. String.
DelayTime
Delay time that is automatically assigned to the selected channel. Numeric value or expression string.
Script function/command: Sub ChnSetDelaySub(ChannelName, SubVariable, DelayTime)
To programmatically read a delay attribute of a subvariable of a channel you can use the "ChnGetDelay" function: Function ChnGetDelaySub(ChannelName, SubVariableName)
Example ChnSet "RESCHA01", "base", ChnGetDelaySub("RESCHA02", "raw")
6.5.1.26
TimStart Starts a timer that uses a specified channel. The timer value is set to zero. If a channel service is active, it is automatically deactivated and a new service is started. Parameters
Description
ChannelName
Name of timer channel. String.
Script function/command: AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
Sub TimStart(ChannelName)
6.5.1.27
TimStop Stops the selected timer. The channel associated with this timer retains the most recent value. Parameters
Description
ChannelName
Name of timer channel. String.
Script function/command: Sub TimStop(ChannelName)
6.5.1.28
TimReset Resets the timer and sets the value of the associated channel to zero. Parameters
Description
ChannelName
Name of timer channel. String.
Script function/command: Sub TimReset(ChannelName)
6.5.1.29
TimAdjust Modifies the current timer value by subtracting the specified offset. Parameters
Description
ChannelName
Name of timer channel. String.
Offset
Offset value [ms] that is subtracted from the current timer value: TTimer = TTimer Offset. Numeric value or expression string.
Script function/command: Sub TimAdjust(ChannelName, Offset)
6.5.1.30
TimPause Pauses the timer service. The channel retains its latest value. Parameters
Description
ChannelName
Name of timer channel. String.
Script function/command: Sub TimPause(ChannelName)
6.5.1.31
TimContinue Starts an inactive timer or continues a halted timer that is identified by a specified channel. The timer value is set to the value of the system channel.
AVL PUMA Open 2012 — Scripting in PUMA Open
107
108
Functions of the PUMA Open Script API
Parameters
Description
ChannelName
Name of timer channel. String.
Script function/command: Sub TimContinue(ChannelName)
6.5.1.32
ChnSetEx Assigns a given value to a channel after applying a definable conversion rule. Parameters
Description
ChannelName
Name of channel. String.
Value
The assigned value is automatically allocated to the specified channel data type. Numeric value or expression string.
EvaluationMode
Determines how to interpret the defined Value parameter. eNoEvaluation = 0: The Value parameter is used without having been interpreted. eEvaluateChannel = 1: If the Value parameter can be interpreted as a channel name' (e.g. "RESCHA40"), the value of this channel is used. Otherwise, the value is used without having been interpreted. eEvaluateExpression = 2: The Value parameter is interpreted as a mathematical expression (e.g. "12.99+RESCHA40*RESCHA41+RESCH A42") and the result is used.
Information If the Value parameter is of type string and contains '$c(ChannelName).v' sequences, these will be replaced at runtime by the current value of the specified channel and the resulting string will be used. If the Value parameter is interpreted as a numeric value (e.g. 1.33, 5.66), it will immediately be used. Script function/command: Sub ChnSetEx(ChannelName, Value, EvaluationMode)
Example ChnSetEx "RESCHA40", "RESCHA41/RESCHA42+RESCHA43", eEvaluateExpression ChnSetEx "RESCHA40", "RESCHA41", eEvaluateChannel ChnSetEx "RESTXT01", "This is just a sample string", eNoEvaluation
6.5.1.33
ChnSetSubEx Assigns a value to a subvariable of the specified channel after applying a definable conversion rule. Subvariables are addressed by their individual names.
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
Parameters
Description
ChannelName
Name of channel. String.
SubVariableName
Specifies the subvariable of the selected channel. String.
Value
The assigned value is automatically allocated to the specified channel data type. Numeric value or expression string.
EvaluationMode
Determines how to interpret the defined Value parameter. eNoEvaluation = 0: The Value parameter is used without having been interpreted. eEvaluateChannel = 1: If the Value parameter can be interpreted as a channel name' (e.g. "RESCHA40"), the value of this channel is used. Otherwise, the value is used without having been interpreted. eEvaluateExpression = 2: The Value parameter is interpreted as a mathematical expression (e.g. "12.99+RESCHA40*RESCHA41+RESCH A42") and the result is used.
Information If the Value parameter is of type string and contains '$c(ChannelName).v' sequences, these will be replaced at runtime by the current value of the specified channel and the resulting string will be used. If the Value parameter is interpreted as a numeric value (e.g. 1.33, 5.66), it will immediately be used. Script function/command: Sub ChnSetSubEx(ChannelName, SubVariableName, Value, EvaluationMode)
Example ChnSetSubEx "RESCHA40", "base", "RESCHA41/RESCHA42+RESCHA43", eEvaluateExpression
6.5.1.34
ChnGetUnit Retrieves the "Unit" string of the specified channel. Parameters
Description
ChannelName
Name of channel. String.
Script function/command: Function ChnGetUnit(ChannelName)
Example MsgBox ChnGetUnit("SPEED")
6.5.1.35
ChnGetDescription Retrieves the description string of the specified channel.
AVL PUMA Open 2012 — Scripting in PUMA Open
109
110
Functions of the PUMA Open Script API
Parameters
Description
ChannelName
Name of channel. String.
Script function/command: Function ChnGetDescription(ChannelName)
Example MsgBox ChnGetDescription("SPEED")
6.5.1.36
ChnGetHandle Retrieves the handling of the specified channel. Parameters
Description
ChannelName
Name of channel. String.
Script function/command: Function ChnGetHandle(ChannelName)
Example MsgBox ChnGetHandle("RESCHA40")
6.5.1.37
ChnGetDatatype Retrieves the data type of the specified channel. The following types are distinguished: const eSCTUnknown = &H0001 const eSCTLong = &H0003 const eSCTFloat = &H0004 const eSCTDouble = &H0005 const eSCTString = &H0006
Parameters
Description
ChannelName
Name of channel. String.
Script function/command: Function ChnGetDatatype(ChannelName)
Example MsgBox ChnGetDatatype("RESCHA40")
6.5.1.38
ChnGetNativeDatatype Retrieves the native data type of the specified channel. The following types are known (some of them can be combined using bit-wise OR operation). const eSCTUnknown
= &H0001
const eSCTShort
= &H0002
const eSCTLong
= &H0003
const eSCTFloat
= &H0004
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
const eSCTDouble
= &H0005
const eSCTString
= &H0006
const eSCTBitField
= &H0007
const eSCTBlob
= &H0008
const eSCTVersatile
= &H0009
const eSCTMultiDimVect
= &H000A
const eSCTArray
= &H0010
const eSCTTerminalIn
= &H0080
const eSCTTerminalOut
= &H0100
Parameters
Description
ChannelName
Name of channel. String.
Script function/command: Function ChnGetNativeDatatype(ChannelName)
Example MsgBox ChnGetNativeDatatype("RESCHA40")
6.5.1.39
ChnGetSystemName Retrieves the system name string of the specified channel. Information If no system name is set for the given channel, '*' is returned. Parameters
Description
ChannelName
Name of channel. String
Script function/command: Function ChnGetSystemName(ChannelName)
Example MsgBox ChnGetSystemName("RESCHA40")
6.5.1.40
GetValue Set target channel with the value of the selected channel. c
Parameter
Description
ChannelName
Name of channel. String
Script function/command: Function ChnGetValue(ChannelName)
6.5.1.41
GetValueSub Set target channel with the value of a sub variable of the selected channel.
AVL PUMA Open 2012 — Scripting in PUMA Open
111
112
Functions of the PUMA Open Script API
Parameter
Description
ChannelName
Name of channel. String
SubVariable
Name of subvariable
Script function/command: Function ChnGetValueSub(ChannelName, SubVariable)
6.5.1.42
GetStatus Programmatically read the channelstatus of a channel Parameter
Description
Channelname
Name of channel. String
Status
Value:
Ok...0
No Provider...1
Not initialised...2
Device offline...3
Overflow...4
Sensor broken...5
Script function/command: Function ChnGetStatus(ChannelName)
Example If ChnGet(RESCHA01)>=10000 Then ChnSetStatus RESCHA01, 4 End If
6.5.1.43
GetStatusSub Programmatically read the channelstatus of a channel. Parameter
Beschreibung
Channelname
Name of channel. String
SubVariableName
Specifies the subvariable of the channel. String
Status
Value:
Ok...0
No Provider...1
Not initialised...2
Device offline...3
Overflow...4
Sensor broken...5
Script function/command: Function ChnGetStatusSub(ChannelName, SubVariableName)
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
6.6
Measurement Device
6.6.1
Emission bench 1/2/3 (VDOS)
6.6.1.1
Prepare emission bench Executes a macro whose name is modified depending on the modifier normname. Information This is a custom feature for which specific parameter values may be required.
Parameters
Description
Devicename
Device name "EMAH"/ "EMA2"/ "EMA3". String.
MacroName
Name of the macro. String.
ModifierNormname
Normname of modifier. String.
SyncNormname
Synchronization normname. String. ‘‘‘‘empty string... no synchronization
Script function/command: Sub VdsEmahPrepare(Devicename, MacroName, _ ModifierNormname, SyncNormname)
6.6.1.2
Request Requests an emission bench. Parameters
Description
Devicename
Device name "EMAH"/ "EMA2"/ "EMA3". String.
Script function/command: Sub VdsEmahRequest(Devicename)
6.6.1.3
EGR on/off Measurement with or without exhaust gas recirculation. Information This is a custom feature for which specific parameter values may be required.
AVL PUMA Open 2012 — Scripting in PUMA Open
113
114
Functions of the PUMA Open Script API
Parameters
Description
Devicename
Device name "EMAH"/ "EMA2"/ "EMA3". String.
OnOff
"off": without EGR, if there is no match "on": with EGR
Script function/command: Sub VdsEmahSelectEGR(Devicename, OnOff)
6.6.1.4
Acquisition Turns the acquisition of a line on/off. Information This is a custom feature for which specific parameter values may be required. Parameters
Description
Devicename
Device name "EMAH"/ "EMA2"/ "EMA3". String.
Line
Measuring line. String. "1", "2" If the string is empty or if there is no match, Line 1 is used.
OnOff
"Off": without EGR, if there is no match "On": switch on
Script function/command: Sub VdsEmahSelectAcquirement(Devicename, Line, OnOff)
6.6.1.5
Release Releases the emission bench. Parameters
Description
Devicename
Device name "EMAH"/ "EMA2"/ "EMA3". String.
Script function/command: Sub VdsEmahRelease(Devicename)
6.6.1.6
Macro Sends a start request for a macro to the handler. Parameters
Description
Devicename
Device name "EMAH"/ "EMA2"/ "EMA3". String.
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
Parameters
Description
MacroName
Name of the macro. String.
SyncNormname
Synchronization normname. String. ‘‘‘‘empty string... no synchronization
Script function/command: Sub VdsEmahMacro(Devicename, MacroName, SyncNormname)
6.6.1.7
Mask alarm handling Toggles the alarm handling for certain channels. Optionally, the alarm handling for all channels may be switched off before. Information This is a custom feature for which specific parameter values may be required. Parameters
Description
Devicename
Device name "EMAH"/ "EMA2"/ "EMA3". String.
Reset
‘‘‘‘...no previous resetting of alarm handling "0"...reset all alarms to off
ChannelList
List of the channels to be toggled. String. e.g. "1,2,4" ‘‘‘‘empty string...no channel is to be toggled
Script function/command: Sub VdsEmahMaskAlarm(Devicename, Reset, ChannelList)
6.6.1.8
Send Sends a command to the emission bench.
Parameters
Description
Devicename
Device name "EMAH"/ "EMA2"/ "EMA3". String.
TelegramString
Telegram string that is to be sent. String.
Script function/command: Sub VdsEmahPut(Devicename, TelegramString)
6.6.1.9
SendReceive Sends a command to the emission bench and reads the response telegram.
AVL PUMA Open 2012 — Scripting in PUMA Open
115
116
Functions of the PUMA Open Script API
Parameters
Description
Devicename
Device name "EMAH"/ "EMA2"/ "EMA3". String.
TelegramString
Telegram string that is to be sent. String.
Script function/command: Sub VdsEmahGet(Devicename, TelegramString)
6.6.1.10
Mode Selects the emissions mode. Information This is a custom feature for which specific parameter values may be required.
Parameters
Description
Devicename
Device name "EMAH"/ "EMA2"/ "EMA3". String.
EmissionMode
Must be one of the following strings: "NOX", "NO", "HCG", "MET", "MFR" If the string does not match, the command will be ignored.
Script function/command: Sub VdsEmahSelectMode(Devicename, EmissionMode)
6.6.1.11
System Sets the system type for Shared Mode. Information This is a custom feature for which specific parameter values may be required.
Parameters
Description
Devicename
Device name "EMAH"/ "EMA2"/ "EMA3". String.
SystemType
Must be one of the following strings: "ALL", "DEF", "CUT", "FTI" If the string does not match, the command will be ignored.
Script function/command: Sub VdsEmahSelectSystemType(Devicename, SystemType)
6.6.1.12
Meas.Points Toggle Toggles the selection of certain measuring points. Optionally, all measuring points can be deactivated before.
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
Information This is a custom feature for which specific parameter values may be required.
Parameters
Description
Devicename
Device name "EMAH"/ "EMA2"/ "EMA3". String.
Line
Measuring line. String. "1", "2", "3" If the string is empty or if there is no match, Line 1 is used.
Reset
‘‘‘‘...no previous resetting of all measuring points "0"... deactivates all measuring points
MeasPointList
List of all measuring points to be deactivated. String. e.g. "1,2,4" ‘‘‘‘empty string... no measuring point is to be toggled
Script function/command: Sub VdsEmahSelectMeasurementPoint(Devicename, Line, _ Reset, MeasPointList)
"Off": turn off "On": switch on "Off" is selected if there is no match.
Script function/command: Sub VdsEmahSelectMultiPointMeasurement(Devicename, OnOff)
6.6.1.14
Sub Measurements Toggle Toggles the selection of a submeasurement within a multipoint measurement. Optionally, all submeasurements can be deactivated before. Parameters
Description
Devicename
Device name "EMAH"/ "EMA2"/ "EMA3". String.
AVL PUMA Open 2012 — Scripting in PUMA Open
117
118
Functions of the PUMA Open Script API
Parameters
Description
Reset
‘‘‘‘...no previous resetting of all submeasurements "0"... deactivates all submeasurements
IdList
List containing the IDs of submeasurements to be toggled. String. e.g. "1,2,4" ‘‘‘‘empty string... no submeasurement is to be toggled
Script function/command: Sub VdsEmahSelectSubMeasurements(Devicename, Reset, IdList)
6.6.1.15
Parameters Is used to load/check/download/print parameters and only available in the EMAH task. Information This feature is supported by the MVME300 GPIB hardware only. Parameters
Description
Devicename
Device name "EMAH"/ "EMA2"/ "EMA3". String.
Action
Must be one of the following strings: "LOAD" "CHECK" "DOWNLOAD" "PRINT" If the string does not match, the command will be ignored.
Script function/command: Sub VdsEmahParameter(Devicename, Action)
6.6.1.16
Macro synchronous Sends start request for macro to the handler and waits until macro execution has been finished. Parameters
Description
Devicename
Device name "EMAH"/ "EMA2"/ "EMA3". String.
MacroName
Name of the macro. String.
SyncNormname
Synchronization normname. String. ‘‘‘‘empty string... no synchronization
Script function/command: Sub VdsEmahMacro(Devicename, MacroName, SyncNormname)
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
6.6.1.17
Reset Resets the emission bench. Function is only enabled if the device driver is in online state. Parameters
Description
Devicename
Device name "EMAH"/ "EMA2"/ "EMA3". String.
Line
Performs the function in the selected line.
SyncNormname
Synchronization normname. String. ‘‘‘‘empty string... no synchronization
Script function/command for line 1: VdsEmahMacro "RESE1" "SyncNormName"
Script function/command for line 2: VdsEmahMacro "RESE2" "SyncNormName"
6.6.1.18
Purge Purges the emission bench. This function is only enabled if the device driver is in online state. Parameters
Description
Devicename
Device name "EMAH"/ "EMA2"/ "EMA3". String.
Line
Performs the function in the selected line.
SyncNormname
Synchronization normname. String. ‘‘‘‘empty string... no synchronization
Script function/command for line 1: VdsEmahMacro "PURG1" "SyncNormName"
Script function/command for line 2: VdsEmahMacro "PURG2" "SyncNormName"
6.6.1.19
Measurement Starts the sample gas flow. Function is only enabled if the device driver is in online state. Parameters
Description
Devicename
Device name "EMAH"/ "EMA2"/ "EMA3". String.
Line
Performs the function in the selected line.
SyncNormname
Synchronization normname. String. ‘‘‘‘empty string... no synchronization
Script function/command for line 1: VdsEmahMacro "MEAS1" "SyncNormName"
Script function/command for line 2: VdsEmahMacro "MEAS2" "SyncNormName"
AVL PUMA Open 2012 — Scripting in PUMA Open
119
120
Functions of the PUMA Open Script API
6.6.1.20
Span Starts the span gas flow. Function is only enabled if the device driver is in online state.
Term
Value
Enabled for
BSQ, SSQ (steady-state and dynamic), System Explorer
Accessibility
MONITOR, MANUAL, AUTOMATIC, diagnostic purposes
Parameters
Description
Devicename
Device name "EMAH"/ "EMA2"/ "EMA3". String.
Line
Performs the function in the selected line.
SyncNormname
Synchronization normname. String. ‘‘‘‘empty string... no synchronization
Script function/command for line 1: VdsEmahMacro "SPAN1" "SyncNormName"
Script function/command for line 2: VdsEmahMacro "SPAN2" "SyncNormName"
6.6.1.21
Calibrate Starts the calibration gas flow. Function is only enabled if the device driver is in online state. Parameters
Description
Devicename
Device name "EMAH"/ "EMA2"/ "EMA3". String.
Line
Performs the function in the selected line.
SyncNormname
Synchronization normname. String. ‘‘‘‘empty string... no synchronization
Script function/command for line 1: VdsEmahMacro "CAL1" "SyncNormName"
Script function/command for line 2: VdsEmahMacro "CAL2" "SyncNormName"
6.6.1.22
Zero Starts the zero gas flow. Function is only enabled if the device driver is in online state. Parameters
Description
Devicename
Device name "EMAH"/ "EMA2"/ "EMA3". String.
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
Parameters
Description
Line
Performs the function in the selected line.
SyncNormname
Synchronization normname. String. ‘‘‘‘empty string... no synchronization
Script function/command for line 1: VdsEmahMacro "ZERO1" "SyncNormName"
Script function/command for line 2: VdsEmahMacro "ZERO2" "SyncNormName"
6.6.1.23
Send Sends a command to the bench. Parameters
Description
TelegramString
Name of the telegram string to be sent. String.
Script function/command: Sub VdsSmsaPut(TelegramString)
6.6.1.24
SendReceive Sends a command to the emission bench and reads the response telegram. Parameters
Description
TelegramString
Name of the telegram string to be sent. String.
Script function/command: Sub VdsSmsaGet(TelegramString)
6.6.2
KMA 4000
6.6.2.1
Set Standby The inlet pump and outlet pump are switched on and the inlet and outlet temperature controllers are switched to automatic mode. Parameters
Description
DeviceName
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub CDH_KMA4000SetStandby(DeviceName, MonitorTimeout, Timeout)
6.6.2.2
Set Pause The pumps are switched off.
AVL PUMA Open 2012 — Scripting in PUMA Open
121
122
Functions of the PUMA Open Script API
Parameters
Description
DeviceName
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub CDH_KMA4000SetPause(DeviceName, MonitorTimeout, Timeout)
6.6.2.3
Start Venting Switches the pumps on and opens the venting valve. After the venting time has passed, the venting valve is closed again. Parameters
Description
DeviceName
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub CDH_KMA4000StartVenting(DeviceName, MonitorTimeout, Timeout)
6.6.2.4
Send AK-Command Sends a freely definable command string to the device. The command string must contain all characters of the AK command with the exception of the control characters and . The device response is written to the channel KMA_AK_Response. Parameters
Description
DeviceName
Name of device
KMA_AK_Command
Generic AK command to be sent
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub CDH_KMA4000SendAK(DeviceName, KMA_AK_Command, MonitorTimeout,_ Timeout)
6.6.2.5
Dynamic Measurement Start Starts integral measurement, i.e. dynamic measurement is started on the device via command SSUE. Parameters
Description
DeviceName
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
Sub CDH_KMA4000StartDynamicMeasurement(DeviceName, MonitorTimeout,_ Timeout)
6.6.2.6
Dynamic Measurement Stop Stops integral measurement, i.e. dynamic measurement is stopped on the device via command SSUE. Parameters
Description
DeviceName
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub CDH_KMA4000StoppDynamicMeasurement(DeviceName, MonitorTimeout,_ Timeout)
6.6.2.7
Dynamic Measurement Reset Sets the added-up values of the integral measurement and of the interval results to zero. The added-up value on the device is reset via the command SSTR. This command may only be carried out if interval measurement is deactivated. Parameters
Description
DeviceName
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub CDH_KMA4000ResetDynamicMeasurement(DeviceName, MonitorTimeout,_ Timeout)
6.6.2.8
Interval Stop Produces an intermediate interval result by reading the current added-up value and then calculating the difference between this value and the added-up value of the previous stop interval. In the first interval, this result corresponds to the current added-up value. The interval method is not supported by the device but the intermediate interval result is calculated by the interface software. Parameters
Description
DeviceName
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub CDH_KMA4000StopInterval(DeviceName, MonitorTimeout, Timeout)
6.6.2.9
GetIntegrator Using the KMA 4000, it is not necessary to read the interval result because the interval value is calculated by the interface software. This command is only available for compatibility with the standard activation objects. The command has no function and is not shown on the interface.
AVL PUMA Open 2012 — Scripting in PUMA Open
123
124
Functions of the PUMA Open Script API
Parameters
Description
DeviceName
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub CDH_KMA4000GetIntegrator(DeviceName, MonitorTimeout, Timeout)
6.6.2.10
Select Domain Selects the domain. Only request commands are sent to the device, depending on whether Volume or Mass is set. Parameters
Description
DeviceName
Name of device
Select Domain
Used domain
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub CDH_KMA4000SelectDomain(DeviceName, MonitorTimeout, Timeout)
6.6.2.11
Select Measurement Parameters Selects the measurement parameters. The measurement parameters are transferred to the device via the EFEC and ESTN commands. Parameters
Description
DeviceName
Name of device
KMA_PARAM_BaseTim e
Device measuring time
KMA_PARAM_MeasCyc Number of measurement values for averles aging MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub CDH_KMA4000SelectMeasParameter(DeviceName, KMA_PARAM_BaseTime,_ KMA_PARAM_MeasCycles, MonitorTimeout, Timeout)
6.6.2.12
Select Measurement Time Adjustment Sets whether the device measuring time should match the PUMA measuring time in a PUMA steady-state measurement. The measuring time is adjusted by increasing or decreasing the number of measuring cycles at steady-state measurement start.
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
Parameters
Description
DeviceName
Name of device
AdjustMeasTime
Adjustment to PUMA measuring time
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub CDH_KMA4000SelectMeasAdjust(DeviceName, KMA_PARAM_AdjustMeasTime,_ MonitorTimeout, Timeout)
6.6.2.13
Automatic Temperature Control Inlet Selects the demand temperature for the temperature control. Parameters
Description
DeviceName
Name of device
KMA_PARAM_Temp1_D Demand value for the inlet temperature emand MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub CDH_KMA4000SelectMeasAdjust(DeviceName, KMA_PARAM_Temp1_Demand,_ MonitorTimeout, Timeout)
6.6.2.14
Automatic Temperature Control Outlet Selects the demand temperature for the temperature control. Parameters
Description
DeviceName
Name of device
KMA_PARAM_Temp2_D Demand value for the outlet temperature emand MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub CDH_KMA4000SelectMeasAdjust(DeviceName, KMA_PARAM_Temp2_Demand,_ MonitorTimeout, Timeout)
6.6.3
Fuel balance S730 (VDOS)
6.6.3.1
Calibrate Calibrates the type 730 fuel balance. Script function/command: Sub VdsS730Calibrate()
AVL PUMA Open 2012 — Scripting in PUMA Open
125
126
Functions of the PUMA Open Script API
6.6.4
Particle Sampler (VDOS)
6.6.4.1
Request Sends request to the device. Script function/command: Sub VdsPsahRequest()
6.6.4.2
Release Releases the device. Script function/command: Sub VdsPsahRelease()
6.6.4.3
Macro Executes macro. Parameters
Description
MacroName
Name of the macro. String.
Script function/command: Sub VdsPsahMacro(MacroName)
6.6.4.4
Send Sends a command to the bench. Parameters
Description
TelegramString
Name of the telegram string to be sent. String.
Script function/command: Sub VdsPsahPut(TelegramString)
6.6.4.5
SendReceive Sends a command to the emission bench and reads the response telegram. Parameters
Description
TelegramString
Name of the telegram string to be sent. String.
Script function/command: Sub VdsPsahGet(TelegramString)
6.6.5
PLU4000 Fuel Meter
6.6.5.1
User defined command Sends a command to the device.
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
Parameters
Description
TelegramString
Name of the telegram string to be sent. String.
Script function/command: Sub VdsPluaSend(TelegramString)
6.6.5.2
Init device Initializes the PLU device. Script function/command: Sub VdsPluaInitDevice()
6.6.5.3
Init task Reinitializes the task and interface. Script function/command: Sub VdsPluaInitTask()
6.6.5.4
Abort Integral Measurement Aborts an integral measurement. Script function/command: Sub VdsPluaAbortIntegral()
6.6.5.5
Stop Integral Measurement Stops an integral measurement. Script function/command: Sub VdsPluaStopIntegral()
6.6.5.6
Start Integral Measurement Starts an integral measurement. Script function/command: Sub VdsPluaStartIntegral()
6.6.5.7
Local Sets the device handler into Local mode. Script function/command: Sub VdsPluaLocal()
6.6.5.8
Init Measurement Is automatically executed by ERF when the system changes to MANUAL mode. Script function/command: Sub VdsPluaInitMeasurement()
AVL PUMA Open 2012 — Scripting in PUMA Open
127
128
Functions of the PUMA Open Script API
6.6.5.9
Reset Measurement Sets the measured results to overflow. Script function/command: Sub VdsPluaResetMeasurement()
6.6.5.10
Start measurement Manually starts a measurement with the PLU system. Script function/command: Sub VdsPluaStartMeasurement()
6.6.5.11
Wait for Init Sets the task into WAIT FOR INIT state. Script function/command: Sub VdsPluaWaitForInit()
6.6.5.12
Remote Sets the device handler into REMOTE mode. Script function/command: Sub VdsPluaRemote()
6.6.5.13
Refresh Refreshes all cyclic values that have been set in the Cyclic Data Acquisition table, including the values with a sampling frequency = 0. Script function/command: Sub VdsPluaRefresh()
6.6.6
Fuel balance P730 (VDOS)
6.6.6.1
Calibrate Calibrates the fuel balance. Script function/command: Sub VdsP730Calibrate()
6.6.7
Indicating device I670 (VDOS)
6.6.7.1
Calculate Calculates results. Script function/command: Sub VdsI670Calculate()
6.6.7.2
Local Switches to Local mode. Script function/command:
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
Sub VdsI670Local()
6.6.7.3
Measurement Starts a measurement. Script function/command: Sub VdsI670Measurement()
6.6.7.4
Online Switches to Online mode. Script function/command: Sub VdsI670Online()
6.6.7.5
Store Stores the results. Script function/command: Sub VdsI670Save()
6.6.8
AVL403S
6.6.8.1
Connect Checks the device ID and configuration and updates the message window with the configuration information. Resets the error information section. Script function/command: Sub cdh_AVL403S_Connect(Name, MonitorTimeout, Timeout)
6.6.8.2
Start device Resets the measurement values section. Starts cyclic data acquisition. Parameters
Description
Name
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL403S_StartDevice(Name, MonitorTimeout, Timeout)
6.6.8.3
Initialize Requests remote device access rights. Updates the device with device parameters from the parameter section (integration time and refill weight). Performs cyclic activities to update the system channels in the online value section and the status value section.
AVL PUMA Open 2012 — Scripting in PUMA Open
129
130
Functions of the PUMA Open Script API
Parameters
Description
Name
Name of device
PARA_IntegrationTime
Integration time that is used in measurements with the O403S.
PARA_ConstRefillWeigh t
Oil refill weight.
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL403S_Initialize(Name, _ PARA_IntegrationTime, PARA_ConstRefillWeight, MonitorTimeout, Timeout)
6.6.8.4
PreMeasurement Sends the relevant measurement parameters to the device (integration time for dynamic long measurement, refill weight for constant-level measurement), depending on the measurement mode. Then cyclic data acquisition is continued. Parameters
Description
Name
Name of device
RequestArgument
0 for start/stop measurement, > 0 for time-based measurement
MeasTime
Measuring time
PARA_MeasMode PARA_IntegrationTime
Integration time
PARA_ConstRefillWeigh t
Refill weight for constant-level measurement.
PARA_TKKDynLong
Correction factor for a dynamic long measurement.
PARA_TKKDynShort
Correction factor for a dynamic short measurement.
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Measurement Resets the measurement value section. Starts the measurement that has been set under the defined measurement mode. After the measurement has been started, the PUMA system is informed about the measurement start so that the BSQ/SSQ can proceed. The measurement continues until it is stopped by PUMA. The cyclic activities are continued.
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
Parameters
Description
Name
Name of device
PARA_MeasMode
Measurement mode 1..Start dynamic long measurement 2..Stop dynamic long measurement 3..Interval measurement 4..Start dynamic short measurement 5..Stop dynamic short measurement 6..Constant level 7..Constant level/start 8..Constant level/stop
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL403S_Measurement(Name, PARA_MeasMode, _ MonitorTimeout, Timeout)
6.6.8.6
Provide results Empty sequence. Cyclic data acquisition is continued. Parameters
Description
Name
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL403S_ProvideResults(Name, MonitorTimeout, Timeout)
6.6.8.7
PostMeasurement Empty sequence. The cyclic activities are continued. Parameters
Description
Name
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL403S_PostMeasurement(Name, MonitorTimeout, Timeout)
6.6.8.8
Reset Performs a device internal reset, if the request argument equals 0. Otherwise, nothing happens.
AVL PUMA Open 2012 — Scripting in PUMA Open
131
132
Functions of the PUMA Open Script API
Parameters
Description
Name
Name of device
RequestArgument
0..HW reset 1..SW reset
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL403S_Reset(Name, RequestArgument, _ MonitorTimeout, Timeout)
6.6.8.9
Maintenance Empty sequence. The cyclic activities are continued. Parameters
Description
Name
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL403S_Maintenance(Name, MonitorTimeout, Timeout)
6.6.8.10
Cancel Sets the device into stand-by state. All activities in progress (measurements of various types) are aborted (cancelled). The cyclic activities are continued. Parameters
Description
Name
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL403S_Cancel(Name, MonitorTimeout, Timeout)
6.6.8.11
Release Releases the remote device access rights; the device changes to manual mode. The cyclic activities are continued. Parameters
Description
Name
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command:
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
Sub cdh_AVL403S_Release(Name, MonitorTimeout, Timeout)
6.6.8.12
Stop device Stops cyclic communication with the device. Parameters
Description
Name
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL403S_StopDevice(Name, MonitorTimeout, Timeout)
6.6.8.13
Reinitialize Establishes communication with the device and checks whether the correct device has been connected. Requests remote device access rights. Updates the device with the device parameters from the parameter value section. Sets the device into stand-by mode, if possible. Performs cyclic activities to update the system channels in the online value section and the status value section. Parameters
Description
Name
Name of device
PARA_IntegrationTime
Integration time that is used in measurements with the O403S.
PARA_ConstRefillWeigh t
Oil refill weight.
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL403S_Reinitialize(Name, _ PARA_IntegrationTime, PARA_ConstRefillWeight, MonitorTimeout, Timeout)
6.6.8.14
Set device function Sets the selected device function according to PARA_SetDevice. Updates the message window and the error information section. Then cyclic data acquisition is continued. Parameters
Description
Name
Name of device
PARA_SetDevice
Required device function. Standby, AFC on, AFC off, Start filling, Stop filling, AFC lock on, AFC lock off, Level alarm on, Level alarm off, Reset, Correction dyn. Long, Correction dyn. short.
AVL PUMA Open 2012 — Scripting in PUMA Open
133
134
Functions of the PUMA Open Script API
Parameters
Description
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL403S_SetDeviceFunction(Name, _ PARA_SetDevice, MonitorTimeout, Timeout)
6.6.8.15
Start AFC Activates automatic fill mode and passes parameters on to the AFC. Parameters
Description
Name
Name of device
PARA_AFCRefWeight
Reference weight for the AFC.
PARA_AFCConsWeight
Weight that has to be consumed before refilling.
PARA_AFCRefillWeight
Refill weight.
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Start filling Starts the manual filling procedure and fills the oil vessel with the specified oil refilling weight. Then cyclic data acquisition is continued. Parameters
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL403S_StartFilling(Name, _ PARA_ManuRefillWeight, MonitorTimeout, Timeout)
6.6.8.17
Send AK-Command Sequence that transfers a generic AK command to the device and updates the online window. Then cyclic data acquisition is continued.
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
Parameters
Description
Name
Name of device
AK_Command
AK command that is sent to the device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL403S_SendAK(Name, AK_Command, MonitorTimeout, Timeout)
6.6.8.18
Start level alarm Starts level alarm monitoring and checks whether the oil level is within the interval limits defined by PARA_LevelAlarmMin and PARA_LevelAlarmMax. Parameters
Description
Name
Name of device
PARA_LevelAlarmMin
Upper alarm limit.
PARA_LevelAlarmMax
Lower alarm limit.
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL403S_StartLevelAlarm(Name, _ PARA_LevelAlarmMax, PARA_LevelAlarmMin, MonitorTimeout, Timeout)
6.6.9
CVS (CDH)
6.6.9.1
Start Starts the cyclic acquisition of measured data and device status. Parameters
Description
Name
Name of device
Script function/command: Sub Cdh_CVS_StartCyclicAcquisition(Name)
6.6.9.2
AK command Sends an individual AK command to the device. Parameters
Description
Name
Name of device
AK_Command_Send
AK command that is sent to the device
Script function/command: Sub Cdh_CVS_AKCommand(Name, AK_Command_Send)
AVL PUMA Open 2012 — Scripting in PUMA Open
135
136
Functions of the PUMA Open Script API
6.6.9.3
Start bag pair filling Starts filling the specified bag pair after an optional delay time. Parameters
Description
Name
Name of device
CVS_BagPairNumber
Number of bag pair that is filled.
CVS_Delay
Optional delay time for the bag pair to be filled.
Script function/command: Sub Cdh_CVS_StartBagPairFilling(Name, _ CVS_BagPairNumber, CVS_Delay)
6.6.9.4
Stop bag pair filling Stops filling the specified bag pair after an optional delay time. Parameters
Description
Name
Name of device
CVS_BagPairNumber
Number of bag pair that is filled.
CVS_Delay
Optional delay time for the bag pair to be filled.
Script function/command: Sub Cdh_CVS_StopBagPairFilling(Name, CVS_BagPairNumber, CVS_Delay)
6.6.9.5
Volume (Bag) Retrieves the standard volume of the specified bag. On some CVS systems, zero (0) can be specified for the bag number to request the bag volume for all bags. Parameters
Description
Name
Name of device
CVS_BagNumber
Number of requested bag.
Script function/command: Sub Cdh_CVS_RequestBagVolume(Name, CVS_BagNumber)
6.6.9.6
Volume (Bag pair) Retrieves the standard volume of the specified bag pair (phase). This command is only available for certain CVS systems (see also CVS device manual). Parameters
Description
Name
Name of device
CVS_BagPairNumber
Number of requested bag pair.
Script function/command: Sub Cdh_CVS_RequestBagPairVolume(Name, CVS_BagPairNumber)
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
6.6.9.7
Manual Switches to Manual mode. Parameters
Description
Name
Name of device
Script function/command: Sub Cdh_CVS_ManualMode(Name)
6.6.9.8
Remote Switches to Remote mode. Parameters
Description
Name
Name of device
Script function/command: Sub Cdh_CVS_RemoteMode(Name)
6.6.9.9
Standby Switches to Standby mode. Parameters
Description
Name
Name of device
Script function/command: Sub Cdh_CVS_StandbyMode(Name)
6.6.9.10
Pause Switches to Pause mode. Parameters
Description
Name
Name of device
Script function/command: Sub Cdh_CVS_EnergySavingMode(Name)
6.6.9.11
Start analyze bag Starts bag analysis. Parameters
Description
Name
Name of device
CVS_BagNumber
Number of analyzed bag.
Script function/command: Sub Cdh_CVS_StartBagRead(Name, CVS_BagNumber)
AVL PUMA Open 2012 — Scripting in PUMA Open
137
138
Functions of the PUMA Open Script API
6.6.9.12
Stop analyze bag Stops bag analysis. The bag number is only required by certain CVS systems (see also CVS device manual). Parameters
Description
Name
Name of device
CVS_BagNumber
Number of analyzed bag.
Script function/command: Sub Cdh_CVS_StopBagRead(Name, CVS_BagNumber)
6.6.9.13
Start bag evacuation Starts bag evacuation. The bag number is only required by certain CVS systems (see also CVS device manual).
Parameters
Description
Name
Name of device
CVS_BagNumber
Number of bag that is evacuated.
Script function/command: Sub Cdh_CVS_StartBagEvacuation(Name, CVS_BagNumber)
6.6.9.14
Stop bag evacuation Stops bag evacuation. This command is only available for certain CVS systems (see also CVS device manual). Parameters
Description
Name
Name of device
CVS_BagNumber
Number of the bag that follows the last bag that is evacuated.
Script function/command: Sub Cdh_CVS_StopBagEvacuation(Name, CVS_BagNumber)
6.6.9.15
Sequence Executes a CDH sequence without direct parameter input being necessary. In this case, the current values of the device channels that have been associated to the specified sequence are passed on. Parameters
Start bag purge Starts bag purging. The bag number is only required by certain CVS systems (see also CVS device manual). AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
Parameters
Description
Name
Name of device
CVS_BagNumber
Number of bag to be purged.
Script function/command: Sub Cdh_CVS_StartBagPurge(Name, CVS_BagNumber)
6.6.9.17
Stop bag purge Stops bag purging. This command is only available for certain CVS systems (see also CVS device manual). Parameters
Description
Name
Name of device
CVS_BagNumber
Number of the bag that follows the last bag that is purged.
Script function/command: Sub Cdh_CVS_StopBagPurge(Name, CVS_BagNumber)
6.6.9.18
Bag fill rate Sets the specified bag filling rate on the device.
Parameters
Description
Name
Name of device
CVS_VenturiNumber
Selected bag filling rate.
Script function/command: Sub Cdh_CVS_SelectVenturiNumber(Name, CVS_VenturiNumber)
6.6.9.19
Flow rate Sets the specified flow rate on the device. Parameters
Description
Name
Name of device
CVS_FlowrateIndex
Selected flow rate.
Script function/command: Sub Cdh_CVS_SelectFlowrateIndex(Name, CVS_FlowrateIndex)
6.6.9.20
Macro Executes a user-defined macro (CDH sequence). Parameters
Description
CVS_MacroName
Name of macro (CDH sequence) that is executed.
Script function/command: AVL PUMA Open 2012 — Scripting in PUMA Open
139
140
Functions of the PUMA Open Script API
Cdh_InvokeSequence "Device", CVS_MacroName"
6.6.9.21
Sample line number Sets the specified sample gas line on the device. Parameters
Description
CVS_SampleLineNumb er
Sample line number that is used.
Script function/command: Sub Cdh_CVS_SetSampleLine(CVS_SampleLineNumber)
6.6.9.22
Request flowrate index Retrieves the selected flow rate. Script function/command: Sub Cdh_CVS_RequestFlowrateIndex()
6.6.9.23
Request venturi number Retrieves the bag filling rate. Script function/command: Sub Cdh_CVS_RequestVenturiNumber()
6.6.9.24
Request function times Retrieves the function times set for bag protection, bag purging, maximum evacuation time and leak check. Script function/command: Sub Cdh_CVS_RequestFunctionTimes()
6.6.9.25
Request integrated DLS flowrate Retrieves the integrated DLS flow rate. Script function/command: Sub Cdh_CVS_RequestDLSIntFlowrate()
6.6.9.26
Request instantaneous DLS flowrate Retrieves the instantaneous DLS flow rate. Script function/command: Sub Cdh_CVS_RequestDLSInstFlowrate()
6.6.9.27
Request DLS demand flowrate Retrieves the set DLS flow rate. Script function/command: Sub Cdh_CVS_RequestDLSFlowrate()
6.6.9.28
DLS demand flowrate Sets the specified DLS flow rate on the device. AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
Parameters
Description
CVS_DLSFlowrate
Demand flow rate to be set.
Script function/command: Sub Cdh_CVS_SetDLSFlowrate(CVS_DLSFlowrate)
6.6.10
AVL415, AVL415S (CDH)
6.6.10.1
Connect Establishes communication with the measuring device and checks whether the proper device and software version is provided. Parameters
Description
Name
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL415S_Connect(Name, MonitorTimeout, Timeout)
6.6.10.2
Start device Starts cyclic data acquisition: GetDeviceStatus. Resets the values of the measurement values section and provides the status value section and the parameters section with existing values. Parameters
Description
Name
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL415S_StartDevice(Name, MonitorTimeout, Timeout)
6.6.10.3
Initialize Sets the device into Remote mode and transfers the current parameterization to the device. If "sync. measurement" is selected, "ready for sampling" (SASB) is also executed. The measurement parameters are passed on to the device. Cyclically receives a device status message. Parameters
Description
Name
Name of device
PARAM_MeasCycle
Measurement with time/volume preselection
PARAM_SampleVol
Volume preselection for volume measurement (0 is special measurement)
PARAM_SampleNb
1 to 5 measuring cycles possible
AVL PUMA Open 2012 — Scripting in PUMA Open
141
142
Functions of the PUMA Open Script API
Parameters
Description
PARAM_SampleTime
Time preselection for time measurement
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
PreMeasurement Ensures that the smoke meter is ready for measurement and transfers the current parameterization to the device. If "sync. measurement" is selected, "ready for sampling" (SASB) is also executed. The measurement parameters are passed on to the device. Cyclically receives a device status message. Parameters
Description
Name
Name of device
PARAM_SampleTime
Time preselection for time measurement
PARAM_SelectSampleP oint
Sample point 1 or 2 or single-flow
PARAM_PaperEcoMode Paper economy mode on/off PARAM_SampleVol_Aut oRange_min
Minimum sample volume for Auto Range mode
PARAM_SampleVol_Aut oRange_max
Maximum sample volume for Auto Range mode
PARAM_Ext_Purgetime
Extended purge time
PARAM_Ext_trigger_del ay
External trigger delay time.
PARAM_FSN_tolerance
Tolerance for special measurement
ErrorByte
Device error byte
PARAM_ManSampleNb e
Number of measuring cycles in manual mode
PARAM_ManSampleTim Sampling time in manual mode e PARAM_ManNominalVol Nominal volume PARAM_SynchronizedM Synchronized measurement eas MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Measurement Starts a measurement using the current parameterization. After the measurement with the selected parameters has been completed, the measuring range is updated with the results. Cyclically receives a device status message. Parameters
Description
Name
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL415S_Measurement(Name, MonitorTimeout, Timeout)
6.6.10.6
Provide results Retrieves the results from the latest measurement. Parameters
Description
Name
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL415S_ProvideResults(Name, MonitorTimeout, Timeout)
6.6.10.7
PostMeasurement Empty sequence for the AVL 415 S and AVL 415. Parameters
Description
Name
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL415S_PostMeasurement(Name, MonitorTimeout, Timeout)
6.6.10.8
Reset Performs a software reset on the device. Continues cyclic status acquisition after a short delay.
AVL PUMA Open 2012 — Scripting in PUMA Open
143
144
Functions of the PUMA Open Script API
Parameters
Description
Name
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL415S_Reset(Name, MonitorTimeout, Timeout)
6.6.10.9
Calibrate Performs one of seven procedures provided by the device driver. Parameters
Description
DeviceName
Name of device
CALPARAM_CalProced ure
Selects a calibration procedure, e.g. leak check, reflector head calibration, volume check.
Script function/command: Sub cdh_AVL415S_Calibrate (DeviceName, CALPARAM_CalProcedure)
6.6.10.10 Interrupt Empty sequence for the AVL 415 S and AVL 415. Parameters
Description
DeviceName
Name of device
Script function/command: Sub Cdh_AVL415S_Interrupt (DeviceName)
6.6.10.11 Release Releases the control rights. Parameters
Description
Name
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL415S_Release(Name, MonitorTimeout, Timeout)
6.6.10.12 Stop device Empty sequence for the AVL 415 S and AVL 415.
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
Parameters
Description
Name
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL415S_StopDevice(Name, MonitorTimeout, Timeout)
6.6.10.13 Start purge Purges for up to 30 seconds. Parameters
Description
Name
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL415S_DoPurge(Name, MonitorTimeout, Timeout)
6.6.10.14 Send AK command Sends a general AK command to the device and updates the console. Performs a cyclic data acquisition. Parameters
Description
Name
Name of device
AK_Command_Send
AK command that is sent to the device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL415S_Send_AK(Name, AK_Command_Send, _ MonitorTimeout, Timeout)
6.6.10.15 Set device parameters Sets the device parameters. Parameters
Description
Name
Name of device
CALPARAM_DeadVolSP Dead volume for sample point 1 1 CALPARAM_DeadVolSP Dead volume for sample point 2 2 CALPARAM_AmbientPr essure
Ambient pressure
AVL PUMA Open 2012 — Scripting in PUMA Open
145
146
Functions of the PUMA Open Script API
Parameters
Description
CALPARAM_VolCorrecti onFactor
Volume correction factor
PARAM_FilterArea
Effective filter area
PARAM_Heater
Temperature conditioning on/off
PARAM_GreyValEvaluat ion
Grey value < white value is permissible
PARAM_EffLengthPollLe Effective length for pollution level vel PARAM_NegOffsetPollL evel
Negative offset for pollution level
PARAM_CorrectionFact orSoot
Soot concentration correction factor
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Connect Retrieves and checks the device ID and software version. Parameters
Description
Name
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL442_Connect(Name, MonitorTimeout, Timeout)
6.6.11.2
Start Device Starts cyclic data acquisition: GetOnlineValues. Resets the values of the Measurement Values section and provides the Service Values section with values.
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
Parameters
Description
Name
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL442_StartDevice(Name, MonitorTimeout, Timeout)
6.6.11.3
Initialisation Sets the device into Standby mode and sends the system parameters to the device. Performs cyclic data acquisition: GetOnlineValues. Parameters
Description
Name
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL442_Initialize(Name, MonitorTimeout, Timeout)
6.6.11.4
Reinitialize Establishes communication with the device and checks whether the device is an AVL 442. Then cyclic data acquisition is started. Eventually, the device is set into Standby and Remote mode and the system parameters are transferred to the device. Parameters
Description
Name
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL442_Reinitialize(Name, MonitorTimeout, Timeout)
6.6.11.5
PreMeasurement Retrieves the current system parameters and starts cyclic data acquisition: GetOnlineValues. Parameters
Description
Name
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL442_PreMeasurement(Name, MonitorTimeout, Timeout)
AVL PUMA Open 2012 — Scripting in PUMA Open
147
148
Functions of the PUMA Open Script API
6.6.11.6
Measurement Waits until the measuring time has expired to enable PUMA to average the measured values during a steady-state measurement. Performs cyclic data acquisition. Parameters
Description
Name
Name of device
RequestArgument
Request argument.
PARA_MeasTime
Measuring time
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL442_Measurement(Name, RequestArgument, _ PARA_MeasTime, MonitorTimeout, Timeout)
6.6.11.7
Provide Results Empty sequence for the AVL 442. Cyclic data acquisition is continued: GetOnlineValues. Parameters
Description
Name
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL442_ProvideResults(Name, MonitorTimeout, Timeout)
6.6.11.8
Post Measurement Empty sequence for the AVL 442. Cyclic data acquisition is continued: GetOnlineValues. Parameters
Description
Name
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL442_PostMeasurement(Name, MonitorTimeout, Timeout)
6.6.11.9
Reset Performs a software reset on the device. Starts cyclic data acquisition after a short delay: GetOnlineValues.
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
Parameters
Description
Name
Name of device
RequestArgument
0 .. hardware reset, 1 .. software reset
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL442_Reset(Name, RequestArgument, _ MonitorTimeout, Timeout)
6.6.11.10 Maintenance Empty sequence for the AVL 442. Starts cyclic data acquisition: GetOnlineValues. Parameters
Description
Name
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL442_Maintenance(Name, MonitorTimeout, Timeout)
6.6.11.11 Cancel Aborts the active device processes (e.g. interval measurement). Then cyclic data acquisition is continued. Parameters
Description
Name
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL442_Cancel(Name, MonitorTimeout, Timeout)
6.6.11.12 Release Empty sequence for the AVL 442. Starts cyclic data acquisition. Parameters
Description
Name
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL442_Release(Name, MonitorTimeout, Timeout)
AVL PUMA Open 2012 — Scripting in PUMA Open
149
150
Functions of the PUMA Open Script API
6.6.11.13 Stop Device Stops cyclic data acquisition. Parameters
Description
Name
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL442_StopDevice(Name, MonitorTimeout, Timeout)
6.6.11.14 Send AK-Command Sequence that sends a generic AK command to the device and shows the device response on the CDH panel. Parameters
Description
Name
Name of device
AK_Command
AK command that is sent to the device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL442_SendAK(Name, AK_Command, MonitorTimeout, Timeout)
6.6.12
AVL 439 (CDH)
6.6.12.1
Connect Establishes communication with the device. Checks the device ID and provides the firmware version. Parameters
Description
Name
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_avl439_Connect(Name, MonitorTimeout, Timeout)
6.6.12.2
Start device Starts the cyclic acquisition of measured data and device status. Script function/command: Sub cdh_avl439_StartDevice(Name, _ OPA_ErrFlag, OPA_MeasParameters, OPA_AnalogScale, _ OPA_AnalogFilter, OPA_OnlineAcquisition, _ OPA_Dummy, MonitorTimeout, Timeout)
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
6.6.12.3
Initialize Switches to control mode and provides the current settings: measurement parameters, air pressure settings, scaling/filtering of analog output, operating hours. Script function/command: Sub cdh_avl439_Initialize(Name, _ OPA_OnlineAcquisition, MonitorTimeout, Timeout)
6.6.12.4
PreMeasurement Sends the measurement parameter settings and the scaling/filtering of the analog output to the device. Parameters
Description
OPA_MeasValOutput
Measured quantity that is output
OPA_MeasValFiltered
Measured quantity that is filtered
OPA_FilterType
Filter type
OPA_RiseTime
Rise time
OPA_TriggTypePeak
Type of trigger used for peak value measurement
OPA_AnalogScale
Scaling of analog output
OPA_AnalogFilter
Filtering of analog output
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Measurement Starts the measurement (start of sample gas flow) and the peak value measurement (start of measurement window) based on the current measurement parameter settings. Script function/command: Sub cdh_avl439_Measurement(Name, OPA_Dummy, _ OPA_MeasTime, MonitorTimeout, Timeout)
6.6.12.6
Provide Results Terminates the peak value measurement (end of measurement window) and provides the peak value of the measurement window. Parameters
Description
Name
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
AVL PUMA Open 2012 — Scripting in PUMA Open
151
152
Functions of the PUMA Open Script API
Script function/command: Sub cdh_avl439_ProvideResults(Name, MonitorTimeout, Timeout)
6.6.12.7
Post Measurement Is not used for the AVL 439 Opacimeter. Parameters
Description
Name
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_avl439_PostMeasurement(Name, MonitorTimeout, Timeout)
6.6.12.8
Reset Aborts all active functions and resets the system. Parameters
Description
Name
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_avl439_Reset(Name, MonitorTimeout, Timeout)
6.6.12.9
Calibrate Performs a calibration. Script function/command: Cdh_AVL439_Calibrate "DEVICE"
6.6.12.10 Interrupt Is not used for the AVL 439 Opacimeter. Script function/command: Cdh_AVL439_Interrupt "DEVICE"
6.6.12.11 Release Switches to monitor mode. Parameters
Description
Name
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command:
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
Sub cdh_avl439_Release(Name, _ OPA_OnlineAcquisition, MonitorTimeout, Timeout)
6.6.12.12 Stop Device Terminates the cyclic acquisition of measured data and device status. Script function/command: Sub cdh_avl439_StopDevice(Name, _ OPA_OnlineAcquisition, OPA_Dummy, MonitorTimeout, Timeout)
6.6.12.13 Remote mode Switches to Remote mode. Parameters
Description
Name
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_avl439_RemoteMode(Name, MonitorTimeout, Timeout)
6.6.12.14 Manual mode Switches to Manual mode. Parameters
Description
Name
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_avl439_ManualMode(Name, MonitorTimeout, Timeout)
6.6.12.15 Sequence Executes a CDH sequence without direct parameter input being necessary. In this case, the current values of the device channels that have been associated to the specified sequence are passed on. Parameters
6.6.12.20 Scaling of analog output Sets the scaling and filtering of the analog output. Parameters
Description
Name
Name of device
OPA_AnalogScale
Scaling of analog output
OPA_AnalogFilter
Filtering of analog output
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_avl439_Output(Name, OPA_AnalogScale, _ OPA_AnalogFilter, MonitorTimeout, Timeout)
6.6.12.21 Standby Performs zeroing. After zeroing has finished, the device is ready for measurement. Parameters
Description
Name
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_avl439_Standby(Name, MonitorTimeout, Timeout)
6.6.12.22 Set ambient air pressure Sets the air pressure on the device. Parameters
Description
Name
Name of device
OPA_AmbAirPressure
Air pressure [mbar]
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
AVL PUMA Open 2012 — Scripting in PUMA Open
155
156
Functions of the PUMA Open Script API
Script function/command: Sub cdh_avl439_AmbientAirPressure(Name, _ OPA_AmbAirPressure, MonitorTimeout, Timeout)
6.6.12.23 Start peak value measurement Starts the peak value measurementet (start of measurement window). Parameters
Description
Name
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_avl439_StartPeak(Name, MonitorTimeout, Timeout)
6.6.12.24 End peak value measurement Terminates the peak value measurement (end of measurement window) and provides the peak value of the measurement window. Parameters
Description
Name
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_avl439_StopPeak(Name, MonitorTimeout, Timeout)
6.6.12.25 Calibration result Provides the calibration result. Parameters
Description
Name
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_avl439_CalibrationResult(Name, MonitorTimeout, Timeout)
6.6.12.26 Peak value measurement result Provides the peak value of the most recent measurement window. Parameters
Description
Name
Name of device
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
Parameters
Description
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_avl439_PeakValue(Name, MonitorTimeout, Timeout)
6.6.12.27 Function off mode Switches to Function-off mode. Parameters
Description
Name
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_avl439_FunctionOffMode(Name, MonitorTimeout, Timeout)
6.6.12.28 Check zero point Performs a zero check. Parameters
Description
Name
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_avl439_CheckZeroPoint(Name, MonitorTimeout, Timeout)
6.6.12.29 Start measurement Starts the measurement (the sample gas flow). Parameters
Description
Name
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_avl439_StartMeasurement(Name, MonitorTimeout, Timeout)
6.6.12.30 Linearity test Performs a linearity check.
AVL PUMA Open 2012 — Scripting in PUMA Open
157
158
Functions of the PUMA Open Script API
Parameters
Description
Name
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_avl439_LinearityCheck(Name, MonitorTimeout, Timeout)
6.6.12.31 Purging Performs purging. Parameters
Description
Name
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_avl439_Purge(Name, MonitorTimeout, Timeout)
6.6.12.32 Purging short Purges for 14 seconds. Parameters
Description
Name
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_avl439_PurgeShort(Name, MonitorTimeout, Timeout)
6.6.12.33 Parameters for ECE-R24 test Sends the measurement parameter settings for an ECE-R24 test to the device. Script function/command: Sub cdh_avl439_R24(Name, _ OPA_MeasParameters, OPA_MeasValOutput, _ OPA_MeasValFiltered, OPA_FilterType, _ OPA_TriggTypePeak, OPA_Dummy, MonitorTimeout, Timeout)
6.6.12.34 Parameters for ELR test Sends the measurement parameter settings for an ELR test to the device. Script function/command: Sub cdh_avl439_ELR(Name, _ OPA_MeasParameters, OPA_MeasValOutput, _ OPA_MeasValFiltered, OPA_FilterType, _
6.6.12.35 Parameters for ISO 8178-9 test Sends the measurement parameter settings for an ISO 8178-9 test to the device. Script function/command: Sub cdh_avl439_ISO(Name, _ OPA_MeasParameters, OPA_MeasValOutput, _ OPA_MeasValFiltered, OPA_FilterType, _ OPA_RiseTime, OPA_TriggTypePeak, MonitorTimeout, Timeout)
6.6.12.36 Parameters for SAE J1667 test Sends the measurement parameter settings for an SAE J1667 test to the device. Script function/command: Sub cdh_avl439_SAE(Name, _ OPA_MeasParameters, OPA_MeasValOutput, _ OPA_MeasValFiltered, OPA_FilterType, _ OPA_TriggTypePeak, OPA_Dummy, MonitorTimeout, Timeout)
6.6.13
AVL 472 (CDH)
6.6.13.1
Request Switches the device to Remote operation by sending the command SREM. Parameters
Description
Name
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL472_SendRequest(Name, MonitorTimeout, Timeout)
6.6.13.2
Release Sets the device into MANUAL mode by sending the command SMAN. Parameters
Description
Name
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL472_SendRelease(Name, MonitorTimeout, Timeout)
6.6.13.3
Get DemandGtot Reads the current value for the total tunnel flow Gtot by using the command APVS. AVL PUMA Open 2012 — Scripting in PUMA Open
159
160
Functions of the PUMA Open Script API
Parameters
Description
Name
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL472_GetDemandGtot(Name, MonitorTimeout, Timeout)
6.6.13.4
Pause Sets the device into Pause state by using the command SPAU. Parameters
Description
Name
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL472_SendPause(Name, MonitorTimeout, Timeout)
6.6.13.5
ReadMinMaxValues Reads all minimum and maximum values from the device by using the commands ADFM and ATTM. Parameters
Description
Name
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL472_ReadMinMaxValues(Name, MonitorTimeout, Timeout)
6.6.13.6
ReadModeResults Reads all result values of the test run mode last executed from the device by using the commands AIKM, AMDT, ATTM and ADFM. Parameters
Description
Name
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL472_ReadModeResults(Name, MonitorTimeout, Timeout)
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
6.6.13.7
ReadTotalResults Reads all result values of the test run mode last executed from the device by using the command AIKT. Parameters
Description
Name
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL472_ReadTotalResults(Name, MonitorTimeout, Timeout)
6.6.13.8
Reset Aborts all current processes and sends the command SRES to the device. The device is set into Pause state. Parameters
Description
Name
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL472_SendReset(Name, MonitorTimeout, Timeout)
6.6.13.9
Send AK-Command Sends a user-defined command string to the device. This command string must contain all arguments of the AK command, except for STX and ETX. The device response is stored to the channel SMS_AK_Response. Parameters
Description
Name
Name of device
SMS_AK_Command
Command string
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL472_SendAK(Name, _ SMS_AK_Command, MonitorTimeout, Timeout)
6.6.13.10 SetDemandGexh Sets the value for the exhaust mass flow Gexh by using the command EGXH. Parameters
Description
Name
Name of device
SMS_PARAM_Gexh
Command string
AVL PUMA Open 2012 — Scripting in PUMA Open
161
162
Functions of the PUMA Open Script API
Parameters
Description
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL472_SetDemandGexh(Name, _ SMS_PARAM_Gexh, MonitorTimeout, Timeout)
6.6.13.11 SetDemandGtot Sets the value for the total tunnel flow Gtot by using the command EGTT. Parameters
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL472_SetDemandGtot(Name, _ SMS_PARAM_Gtot, MonitorTimeout, Timeout)
6.6.13.12 SetDemandQratio Sets the value for the dilution ratio Qratio by using the command EDRV. Parameters
Description
Name
Name of device
SMS_PARAM_Qratio
Retrieves the value (-) for the dilution ratio. Range: 3 <= Qratio <= 99
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL472_SetDemandQratio(Name, _ SMS_PARAM_Qratio, MonitorTimeout, Timeout)
6.6.13.13 SetDemandRratio Sets the value for the sample ratio Rratio by using the command EENV.
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
Parameters
Description
Name
Name of device
SMS_PARAM_Rratio
Retrieves the value (-) for the sample ratio. Range: 0.0001 <= Rratio <= 0.1
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL472_SetDemandRratio(Name, _ SMS_PARAM_Rratio, MonitorTimeout, Timeout)
6.6.13.14 SetDemandValues Sets the values for the total tunnel flow Gtot (command EGTT), the exhaust mass flow Gexh (command EGXH), the dilution ratio Qratio (command EDRV) and the sample ratio Rratio (command EENV). Finally, the current value for the total tunnel flow Gtot is read from the device and written to the channel SMS_PARACT_Gtot. Parameters
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL472_StopLoadFilter(Name, MonitorTimeout, Timeout)
6.6.13.20 StartTestRun Starts a predefined test run on the device. Parameters
Description
Name
Name of device
SMS_PARAM_TestrunN ame
Name of predefined test run.
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL472_StartTestRun(Name, _ SMS_PARAM_TestrunName, MonitorTimeout, Timeout)
6.6.13.21 StartTestMode Starts the next mode of a predefined test run. Parameters
Description
Name
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL472_StartTestMode(Name, MonitorTimeout, Timeout)
6.6.14
AVL733S
6.6.14.1
Connect Retrieves and checks the device ID and software version.
AVL PUMA Open 2012 — Scripting in PUMA Open
165
166
Functions of the PUMA Open Script API
Parameters
Description
Name
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL733S_Connect(Name, MonitorTimeout, Timeout)
6.6.14.2
Start Device Starts cyclic data acquisition: GetOnlineValues. Resets the values of the Measurement Values section and provides the Quality Values section with values. Parameters
Description
Name
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL733S_StartDevice(Name, MonitorTimeout, Timeout)
6.6.14.3
Initialisation Requests device control rights and sends measurement and filling paramters to the device. Starts cyclic data acquisition: GetOnlineValues. Parameters
Description
Name
Name of device
PARA_Cycles
Fuel Balance measurement cycles.
PARA_Time
Measuring time for time-based measurement.
PARA_Weight
Measurement weight for weight-based measurement.
PARA_FillMode
Fuel Balance fill mode.
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Reinitialize Connects to the device. Performs cyclic data acquisition: GetOnlineValues. Obtains control rights and transfers the measurement parameters and the fill mode settings to the device.
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
Parameters
Description
Name
Name of device
PARA_Cycles
Fuel Balance measurement cycles.
PARA_Time
Measuring time for time-based measurement.
PARA_Weight
Measurement weight for weight-based measurement.
PARA_FillMode
Fuel Balance fill mode.
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
PreMeasurement Ensures that the fuel balance is ready to measure by switching the fill mode to "normal" and closing the fill valve. The measurement parameters are transferred to the device. Waits until filling and stabilization have been finished before ending the sequence by performing cyclic data acquisition. Parameters
Description
Name
Name of device
RequestArgument
Request argument.
PARA_Cycles
Fuel Balance measurement cycles.
PARA_Time
Measuring time for time-based measurement.
PARA_Weight
Measurement weight for weight-based measurement.
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Measurement Starts the selected measurement mode. Provides the "Measurement Values" section with values until the measurement is terminated. Then cyclic data acquisition is continued. Parameters
Description
Name
Name of device
PARA_MeasMode
Fuel Balance measurement mode.
AVL PUMA Open 2012 — Scripting in PUMA Open
167
168
Functions of the PUMA Open Script API
Parameters
Description
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL733S_Measurement(Name, _ PARA_MeasMode, MonitorTimeout, Timeout)
6.6.14.7
Provide Results Retrieves results from most recent measurement from the device. Then cyclic data acquisition is continued. Parameters
Description
Name
Name of device
PARA_FillMode
Fuel Balance fill mode.
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL733S_ProvideResults(Name, _ PARA_FillMode, MonitorTimeout, Timeout)
6.6.14.8
Post Measurement Empty sequence for the AVL 733 S. Continues by performing cyclic data acquisition. Parameters
Description
Name
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL733S_PostMeasurement(Name, MonitorTimeout, Timeout)
6.6.14.9
Reset Performs a software reset on the device. Continues cyclic data acquisition after a short delay. Parameters
Description
Name
Name of device
RequestArgument
0 .. hardware reset, 1 .. software reset
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script Function/Reset: AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
Sub cdh_AVL733S_Reset(Name, _ RequestArgument, MonitorTimeout, Timeout)
6.6.14.10 Maintenance Performs a device-internal accuracy check. Updates the Quality Values section after successful completion of procedure. Starts cyclic data acquisition. Parameters
Description
Name
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL733S_Maintenance(Name, MonitorTimeout, Timeout)
6.6.14.11 Cancel Interrupts the active device procedures (calibration, measurement, etc.). Cyclic data acquisition is continued. Parameters
Description
Name
Name of device
PARA_FillMode
Fuel Balance fill mode.
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL733S_Cancel(Name, _ PARA_FillMode, MonitorTimeout, Timeout)
6.6.14.12 Release Releases the control rights and starts cyclic data acquisition. Parameters
Description
Name
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL733S_Release(Name, MonitorTimeout, Timeout)
6.6.14.13 Stop Device End of cyclic data acquisition.
AVL PUMA Open 2012 — Scripting in PUMA Open
169
170
Functions of the PUMA Open Script API
Parameters
Description
Name
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL733S_StopDevice(Name, MonitorTimeout, Timeout)
6.6.14.14 Send AK-Command The sequence sends an arbitrary AK command to the device and shows the device response on the CDH panel. Then cyclic data acquisition is continued. Parameters
Description
Name
Name of device
AK_Command
AK command that is sent to the device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL733S_SendAK(Name, AK_Command, MonitorTimeout, Timeout)
6.6.14.15 Adjustment Procedure Starts the device-internal adjustment procedure. Updates the Quality Values section after successful completion of procedure. Then cyclic data acquisition is continued. Parameters
Description
Name
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL733S_Adjustment(Name, MonitorTimeout, Timeout)
6.6.15
AVL 734 (CDH)
6.6.15.1
Connect Retrieves and checks the device ID and software version. Parameters
Description
Name
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
Script function/command: Sub cdh_AVL734_Connect(Name, MonitorTimeout, Timeout)
6.6.15.2
Start Device Starts cyclic data acquisition: GetOnlineValues. Resets the Measurement Values section and updates the Quality Values section with existing results. Parameters
Description
Name
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL734_StartDevice(Name, MonitorTimeout, Timeout)
6.6.15.3
Initialisation Requests control rights and transfers the measurement parameters and fill modes to the device. Performs cyclic data acquisition: GetOnlineValues. Parameters
Description
Name
Name of device
PARA_Cycles
Fuel Balance measurement cycles.
PARA_Time
Measuring time for time-based measurement.
PARA_Weight
Measurement weight for weight-based measurement.
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL734_Initialize(Name, _ PARA_Cycles, PARA_Time, PARA_Weight, MonitorTimeout, Timeout)
6.6.15.4
Reinitialize Connects to the device. Performs cyclic data acquisition: GetOnlineValues. Requests control rights and transfers the measurement parameters and fill modes to the device. Parameters
Description
Name
Name of device
PARA_Cycles
Fuel Balance measurement cycles.
PARA_Time
Measuring time for time-based measurement.
PARA_Weight
Measurement weight for weight-based measurement.
AVL PUMA Open 2012 — Scripting in PUMA Open
171
172
Functions of the PUMA Open Script API
Parameters
Description
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL734_Reinitialize(Name, _ PARA_Cycles, PARA_Time, PARA_Weight, MonitorTimeout, Timeout)
6.6.15.5
PreMeasurement As the AVL 734 contains two fuel balances, it is always ready to measure without having to refill. Measurement parameters are transferred to the device. Then cyclic data acquisition is continued. Parameters
Description
Name
Name of device
RequestArgument
0..Start/stop measurement (not supported by PUMA measurement) < 0..current measuring time
PARA_Time
Fuel Balance measurement cycles.
PARA_Cycles
Measuring time for time-based measurement.
PARA_Weight
Measurement weight for weight-based measurement.
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Measurement Sets the old measurement values to zero. Starts the measurement in the required mode. Updates the measurement values section with the results after the measurement with the selected parameters has been completed. Performs cyclic data acquisition. Parameters
Description
Name
Name of device
PARA_MeasMode
Fuel consumption mode. Can be time- or weight-specific.
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL734_Measurement(Name, _ PARA_MeasMode, MonitorTimeout, Timeout)
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
6.6.15.7
Provide Results Retrieves the results of the latest measurement from the device. Performs cyclic data acquisition. Parameters
Description
Name
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL734_ProvideResults(Name, MonitorTimeout, Timeout)
6.6.15.8
Post Measurement Empty sequence for the AVL 734. Then cyclic data acquisition is continued. Parameters
Description
Name
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL734_PostMeasurement(Name, MonitorTimeout, Timeout)
6.6.15.9
Reset Requests a software reset on the device if the request argument is 0. Parameters
Description
Name
Name of device
RequestArgument
0..HW reset 1..SW reset
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL734_Reset(Name, _ RequestArgument, MonitorTimeout, Timeout)
6.6.15.10 Maintenance Performs a device-internal accuracy check. Updates the Quality Values section after successful completion. Performs cyclic data acquisition. Parameters
Description
Name
Name of device
AVL PUMA Open 2012 — Scripting in PUMA Open
173
174
Functions of the PUMA Open Script API
Parameters
Description
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL734_Maintenance(Name, MonitorTimeout, Timeout)
6.6.15.11 Cancel Interrupts the active device procedures (calibration, measurement, etc.). Then cyclic data acquisition is continued. Parameters
Description
Name
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL734_Cancel(Name, MonitorTimeout, Timeout)
6.6.15.12 Release Releases the control rights and starts cyclic data acquisition. Parameters
Description
Name
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL734_Release(Name, MonitorTimeout, Timeout)
6.6.15.13 Stop Device Stops cyclic data acquisition. Parameters
Description
Name
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL734_StopDevice(Name, MonitorTimeout, Timeout)
6.6.15.14 Send AK-Command Sequence that transfers a generic AK command to the device and updates the panels with the fuel balance response. Then cyclic data acquisition is continued.
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
Parameters
Description
Name
Name of device
AK_Command
AK command that is sent to the device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL734_SendAK(Name, AK_Command, MonitorTimeout, Timeout)
6.6.15.15 Adjustment Procedure Starts the device-internal fuel adjustment. Updates the Quality Values section after successful completion. Then cyclic data acquisition is continued. Parameters
Description
Name
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL734_Adjustment(Name, MonitorTimeout, Timeout)
6.6.16
AVL 735 (CDH)
6.6.16.1
Connect Retrieves and checks the device ID and software version. Updates the message window with configuration data. Resets the error information section. Parameters
Description
Name
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL735_Connect(Name, MonitorTimeout, Timeout)
6.6.16.2
Start Device Resets the measured values section. Starts cyclic data acquisition. Script function/command: Sub cdh_AVL735_StartDevice(Name, _ MF_IntegralHelpState, MF_Total1Volume, _ MF_Total2Volume, MonitorTimeout, Timeout)
AVL PUMA Open 2012 — Scripting in PUMA Open
175
176
Functions of the PUMA Open Script API
6.6.16.3
Initialisation Establishes device control rights and sends the defined parameters to the device. Sets the device into the Standby state and starts cyclic data acquisition. Parameters
Description
Name
Name of device
PARAM_Domain
Device measurement domain (Mass, Vol, Vol/API)
PARAM_VentingTime
Venting time
PARAM_AvgTime
Averaging time for average flow value
PARAM_MeasCycles
Cycles for average flow time
PARAM_FilterTimeConst Sensor filter time constant MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Measurement Starts the device-internal measurement procedure. Provides the Measurement Values section with values while the measurement is active. Cyclic data acquisition is continued. Parameters
Description
Name
Name of device
PARA_FilterTimeConst
Sensor filter time constant
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
Parameters
Description
MF_IntegralHelpState MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL735_Measurement(Name, _ PARAM_FilterTimeConst, MF_IntegralHelpState, MonitorTimeout, Timeout)
6.6.16.6
Provide Results Empty sequence. Starts cyclic data acquisition: GetOnlineValues. Parameters
Description
Name
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL735_ProvideResults(Name, MonitorTimeout, Timeout)
6.6.16.7
Post Measurement Empty sequence. Starts cyclic data acquisition: GetOnlineValues. Parameters
Description
Name
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL735_PostMeasurement(Name, MonitorTimeout, Timeout)
6.6.16.8
Reset Performs a software reset on the device. Starts cyclic data acquisition after a short delay: GetOnlineValues. Parameters
Description
Name
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL735_Reset(Name, MonitorTimeout, Timeout)
AVL PUMA Open 2012 — Scripting in PUMA Open
177
178
Functions of the PUMA Open Script API
6.6.16.9
Maintenance Starts the device-internal calibration procedure. Provides the Quality Values section with values during the calibration procedure. Starts cyclic data acquisition after completion of this procedure. Parameters
Description
Name
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL735_Maintenance(Name, MonitorTimeout, Timeout)
6.6.16.10 Cancel Interrupts the active device procedures. Starts cyclic data acquisition. Parameters
Description
Name
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL735_Cancel(Name, MonitorTimeout, Timeout)
6.6.16.11 Release Sets the device into "Pause" state and releases control rights. Then cyclic data acquisition is continued. Parameters
Description
Name
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL735_Release(Name, MonitorTimeout, Timeout)
6.6.16.12 Stop Device End of cyclic data acquisition. Parameters
Description
Name
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
Sub cdh_AVL735_StopDevice(Name, MonitorTimeout, Timeout)
6.6.16.13 Reinitialize Connects to the device and checks whether the proper device has been connected. Updates the device with the device parameters from the parameter values section. Sets the device into Standby mode, if possible. Activates cyclic activities to update the system channel in the online value and status value sections. Parameters
Description
Name
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL735_Reinitialize(Name, MonitorTimeout, Timeout)
6.6.16.14 Set device state Sets the selected device state and starts cyclic data acquisition. Parameters
Description
Name
Name of device
PARAM_SetState
Required device state.
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL735_SetFunction(Name, _ PARAM_SetState, MonitorTimeout, Timeout)
6.6.16.15 Init multipoint calibration Initializes the device-internal multi-point calibration. Updates the Quality Values section and then continues cyclic data acquisition. Parameters
Description
Name
Name of device
PARAM_AdjDate
Adjustment date
PARAM_AdjID
Adjustment identifier
PARAM_AdjMinFlow
Minimum adjustment flow
PARAMAdjMaxFlow
Maximum adjustment flow
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL735_InitMpCalib(Name, _ PARAM_AdjDate, PARAM_AdjID, PARAM_AdjMinFlow, _
AVL PUMA Open 2012 — Scripting in PUMA Open
179
180
Functions of the PUMA Open Script API
PARAM_AdjMaxFlow, MonitorTimeout, Timeout)
6.6.16.16 Start Adjustment Starts the device-internal adjustment procedure. Provides the Quality Values section with values until the procedure has been completed. Parameters
Description
Name
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL735_Adjustment(Name, MonitorTimeout, Timeout)
6.6.16.17 Send AK-Command The sequence sends an arbitrary AK command to the device and shows the device response on the CDH panel. Parameters
Description
Name
Name of device
AK_Commad
AK command that is sent to the device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL735_Send_AK(Name, AK_Command, MonitorTimeout, Timeout)
6.6.16.18 Set integral state Sets the totalizer into the required state. If the new state is "Reset", the channels for integral values will be set to overflow. While the totalizer is active, the channels for the integral values are automatically acquired. This concerns the following channels: MF_IntegralDomain, MF_IntegralStatus, MF_IntegralMass, MF_IntegralVolume, MF_IntegralTime, MF_IntegralMassFlow, MF_IntegralVolumeFlow Parameters
Description
Name
Name of device
PARAM_TotalisatorNew State
New status of totalizer. 0..Stop 1..Start 2..Reset
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL735_SetIntegralState(Name, _
6.6.16.19 Set totalisator state Sets the main totalizer into the required state. This activation is only available in the device state PAUSE or SERVICE. The channels for the totalizer values have to be updated manually by activating "Query Totalisator". Parameters
Description
Name
Name of device
PARAM_TotalisatorNum ber
Number of main totalizer (1 or 2)
PARAM_TotalisatorNew State
New status of totalizer. 0..Stop 1..Start 2..Reset
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL735_SetTotalisatorState(Name, _ PARAM_TotalisatorNumber, _ PARAM_TotalisatorNewState, MonitorTimeout, Timeout)
6.6.16.20 Set totalisator domain Changes the main totalizer's domain. This activation is only available in the device state PAUSE or SERVICE. When the domain is changed, the totalizer is stopped and reset.
Parameters
Description
Name
Name of device
PARAM_TotalisatorNum ber
Number of main totalizer (1 or 2)
PARAM_TotalisatorNew Domain
New domain. 0..Mass 1..Volume
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL735_SetTotalisatorDomain(Name, _ PARAM_TotalisatorNumber, _ PARAM_TotalisatorNewDomain, MonitorTimeout, Timeout)
AVL PUMA Open 2012 — Scripting in PUMA Open
181
182
Functions of the PUMA Open Script API
6.6.16.21 Query totalisator Refreshes all the channels for the main totalizer values: MF_Total1Domain, MF_Total2Domain, MF_Total1Status, MF_Total2Status, MF_Total1Mass, MF_Total2Mass, MF_Total1Volume, MF_Total2Volume Parameters
Description
Name
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL735_QueryTotalisator(Name, MonitorTimeout, Timeout)
6.6.16.22 QueryOperatingHours Refreshes all the channels for the operating hours: MF_OpHoursMainPump, MF_OpHoursBypassPump, MF_OpCyclesFillingValve. Script function/command: Cdh_AVL735_QueryoperatingHours
6.6.17
AVL740 (CDH)
6.6.17.1
Integral Measurement Intervall Stops intervall for intermediate results. Parameters
Connect Retrieves and checks the device ID and software version.
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
Parameters
Description
Name
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL753C_Connect(Name, MonitorTimeout, Timeout)
6.6.18.2
Start Device Starts cyclic data acquisition: GetOnlineValues. Parameters
Description
Name
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL753C_StartDevice(Name, MonitorTimeout, Timeout)
6.6.18.3
Initialisation Establishes device control rights and sends the temperature demand value to the device. Sets the device into conditioning mode and starts cyclic data acquisition. Parameters
Description
Name
Name of device
PARA_TempSetPoint
Sets the temperature demand value.
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL753C_Initialize(Name, PARA_TempSetPoint, _ MonitorTimeout, Timeout)
6.6.18.4
Reinitialize Performs 3 sequences in one: Connects to the device, starts polling values and status (cyclic activities are carried out) and initializes the device with the demand temperature as defined in the parameter values section. Sets the device into conditioning mode. Updates the message window and the error information section. Performs cyclic activities. Parameters
Description
Name
Name of device
PARA_TempSetPoint
Sets the temperature demand value.
AVL PUMA Open 2012 — Scripting in PUMA Open
185
186
Functions of the PUMA Open Script API
Parameters
Description
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
PreMeasurement Sends the temperature demand value to the device. Starts cyclic data acquisition: GetOnlineValues. Parameters
Description
Name
Name of device
PARA_TempSetPoint
Sets the temperature demand value.
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL753C_PreMeasurement(Name, PARA_TempSetPoint, _ MonitorTimeout, Timeout)
6.6.18.6
Measurement Waits until the measuring time has expired to enable PUMA to average the measured values during a steady-state measurement. Performs cyclic data acquisition. Parameters
Description
Name
Name of device
RequestArgument
Request argument.
PARA_MeasTime
Measuring time
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL753C_Measurement(Name, RequestArgument, _ PARA_MeasTime, MonitorTimeout, Timeout)
6.6.18.7
Provide Results Empty sequence. Starts cyclic data acquisition: GetOnlineValues. Parameters
Description
Name
Name of device
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
Parameters
Description
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL753C_ProvideResults(Name, MonitorTimeout, Timeout)
6.6.18.8
Post Measurement Empty sequence. Starts cyclic data acquisition: GetOnlineValues. Parameters
Description
Name
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL753C_PostMeasurement(Name, MonitorTimeout, Timeout)
6.6.18.9
Reset Performs a software reset on the device. Starts cyclic data acquisition after a short delay: GetOnlineValues. Parameters
Description
Name
Name of device
RequestArgument
0 .. hardware reset, 1 .. software reset
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL753C_Reset(Name, RequestArgument, MonitorTimeout, Timeout)
6.6.18.10 Maintenance Empty sequence. Starts cyclic data acquisition: GetOnlineValues. Parameters
Description
Name
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL753C_Maintenance(Name, MonitorTimeout, Timeout)
6.6.18.11 Cancel Empty sequence. Starts cyclic data acquisition: GetOnlineValue. AVL PUMA Open 2012 — Scripting in PUMA Open
187
188
Functions of the PUMA Open Script API
Parameters
Description
Name
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL753C_Cancel(Name, MonitorTimeout, Timeout)
6.6.18.12 Release Sets the device into the Pause state and releases control rights. Starts cyclic data acquisition: GetOnlineValues. Parameters
Description
Name
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL753C_Release(Name, MonitorTimeout, Timeout)
6.6.18.13 Stop Device End of cyclic data acquisition. Parameters
Description
Name
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL753C_StopDevice(Name, MonitorTimeout, Timeout)
6.6.18.14 Send AK-Command The sequence sends an arbitrary AK command to the device and shows the device response on the CDH panel. Parameters
Description
Name
Name of device
AK_Command
AK command that is sent to the device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL753C_SendAK(Name, AK_Command, MonitorTimeout, Timeout)
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
6.6.18.15 Set state: Pause Establishes device control rights and sets the device into Pause mode. Starts cyclic data acquisition: GetOnlineValue. Parameters
Description
Name
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL753C_SetPause(Name, MonitorTimeout, Timeout)
6.6.18.16 Set conditioning mode Establishes device control rights and sets the device into conditioning mode. Starts cyclic data acquisition: GetOnlineValue. Parameters
Description
Name
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL753C_SetConditioning(Name, MonitorTimeout, Timeout)
6.6.18.17 Start Timed Venting Establishes device control rights and sets the device into Timed Venting mode. Starts cyclic data acquisition: GetOnlineValues. Parameters
Description
Name
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL753C_TimedVenting(Name, MonitorTimeout, Timeout)
6.6.18.18 Stop venting mode Establishes device control rights and stops venting. Starts cyclic data acquisition: GetOnlineValues. Parameters
Description
Name
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
AVL PUMA Open 2012 — Scripting in PUMA Open
189
190
Functions of the PUMA Open Script API
Script function/command: Sub cdh_AVL753C_StopVenting(Name, MonitorTimeout, Timeout)
6.6.18.19 Set device state Establishes device control rights and sets the device into the selected state. Starts cyclic data acquisition: GetOnlineValues. Parameters
Description
Name
Name of device
FT_SetDevice
Required device state.
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL753C_SetDeviceState(Name, FT_SetDevice, _ MonitorTimeout, Timeout)
6.6.18.20 Define set point temperature Establishes device control rights and sends the temperature demand value to the device. Starts cyclic data acquisition: GetOnlineValues. Parameters
Description
Name
Name of device
Para TempSetPoint
Sets the temperature demand value.
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_AVL753C_DefineTempSetPoint(Name, _ PARA_TempSetPoint, MonitorTimeout, Timeout)
6.6.19
AVL CGM-CVS (CDH) Information This class of activation objects depends on the configuration and is thus not available in every test bed system.
6.6.19.1
Start Starts the cyclic acquisition of measured data and device status. Parameters
Description
Name
Name of device
Script function/command: Sub Cdh_CVS_StartCyclicAcquisition(Name)
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
6.6.19.2
AK command Sends an individual AK command to the device. Parameters
Description
Name
Name of device
AK_Command_Send
AK command that is sent to the device
Script function/command: Sub Cdh_CVS_AKCommand(Name, AK_Command_Send)
6.6.19.3
Start bag pair filling Starts filling the specified bag pair after an optional delay time. Parameters
Description
Name
Name of device
CVS_BagPairNumber
Number of bag pair that is filled.
CVS_Delay
Optional delay time for the bag pair to be filled.
Script function/command: Sub Cdh_CVS_StartBagPairFilling(Name, CVS_BagPairNumber, CVS_Delay)
6.6.19.4
Stop bag pair filling Stops filling the specified bag pair after an optional delay time. Parameters
Description
Name
Name of device
CVS_BagPairNumber
Number of bag pair that is filled.
CVS_Delay
Optional delay time for the bag pair to be filled.
Script function/command: Sub Cdh_CVS_StopBagPairFilling(Name, CVS_BagPairNumber, CVS_Delay)
6.6.19.5
Volume (Bag) Retrieves the standard volume of the specified bag. On some CVS systems, zero (0) can be specified for the bag number to request the bag volume for all bags. Parameters
Description
Name
Name of device
CVS_BagNumber
Number of requested bag.
Script function/command: Sub Cdh_CVS_RequestBagVolume(Name, CVS_BagNumber)
AVL PUMA Open 2012 — Scripting in PUMA Open
191
192
Functions of the PUMA Open Script API
6.6.19.6
Volume (Bag pair) Retrieves the standard volume of the specified bag pair (phase). This command is only available for certain CVS systems (see also CVS device manual). Parameters
Description
Name
Name of device
CVS_BagPairNumber
Number of requested bag pair.
Script function/command: Sub Cdh_CVS_RequestBagPairVolume(Name, CVS_BagPairNumber)
6.6.19.7
Manual Switches to Manual mode. Parameters
Description
Name
Name of device
Script function/command: Sub Cdh_CVS_ManualMode(Name)
6.6.19.8
Remote Switches to Remote mode. Parameters
Description
Name
Name of device
Script function/command: Sub Cdh_CVS_RemoteMode(Name)
6.6.19.9
Standby Switches to Standby mode. Parameters
Description
Name
Name of device
Script function/command: Sub Cdh_CVS_StandbyMode(Name)
6.6.19.10 Pause Switches to Pause mode. Parameters
Description
Name
Name of device
Script function/command: Sub Cdh_CVS_EnergySavingMode(Name)
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
6.6.19.11 Start analyze bag Starts bag analysis. Parameters
Description
Name
Name of device
CVS_BagNumber
Number of analyzed bag.
Script function/command: Sub Cdh_CVS_StartBagRead(Name, CVS_BagNumber)
6.6.19.12 Stop analyze bag Stops bag analysis. The bag number is only required by certain CVS systems (see also CVS device manual). Parameters
Description
Name
Name of device
CVS_BagNumber
Number of analyzed bag.
Script function/command: Sub Cdh_CVS_StopBagRead(Name, CVS_BagNumber)
6.6.19.13 Start bag evacuation Starts bag evacuation. The bag number is only required by certain CVS systems (see also CVS device manual). Parameters
Description
Name
Name of device
CVS_BagNumber
Number of bag that is evacuated.
Script function/command: Sub Cdh_CVS_StartBagEvacuation(Name, CVS_BagNumber)
6.6.19.14 Stop bag evacuation Stops bag evacuation. This command is only available for certain CVS systems (see also CVS device manual). Parameters
Description
Name
Name of device
CVS_BagNumber
Number of the bag that follows the last bag that is evacuated.
Script function/command: Sub Cdh_CVS_StopBagEvacuation(Name, CVS_BagNumber)
6.6.19.15 Sequence Executes a CDH sequence without direct parameter input being necessary. In this case, the current values of the device channels that have been associated to the specified sequence are passed on.
6.6.19.21 Sample line number Sets the specified sample gas line on the device. Parameters
Description
CVS_SampleLineNumb er
Sample line number that is used.
Script function/command: Sub Cdh_CVS_SetSampleLine(CVS_SampleLineNumber)
6.6.19.22 Request flowrate index Retrieves the selected flow rate. Script function/command: Sub Cdh_CVS_RequestFlowrateIndex()
6.6.19.23 Request venturi number Retrieves the bag filling rate. Script function/command: Sub Cdh_CVS_RequestVenturiNumber()
6.6.19.24 Request function times Retrieves the function times set for bag protection, bag purging, maximum evacuation time and leak check. Script function/command: Sub Cdh_CVS_RequestFunctionTimes()
6.6.19.25 Request integrated DLS flowrate Retrieves the integrated DLS flow rate. Script function/command: Sub Cdh_CVS_RequestDLSIntFlowrate()
6.6.19.26 Request instantaneous DLS flowrate Retrieves the instantaneous DLS flow rate. Script function/command: Sub Cdh_CVS_RequestDLSInstFlowrate()
AVL PUMA Open 2012 — Scripting in PUMA Open
195
196
Functions of the PUMA Open Script API
6.6.19.27 Request DLS demand flowrate Retrieves the set DLS flow rate. Script function/command: Sub Cdh_CVS_RequestDLSFlowrate()
6.6.19.28 DLS demand flowrate Sets the specified DLS flow rate on the device. Parameters
Description
CVS_DLSFlowrate
Demand flow rate to be set.
Script function/command: Sub Cdh_CVS_SetDLSFlowrate(CVS_DLSFlowrate)
6.6.20
AVL CGS-CVS (CDH) Information This class of activation objects depends on the configuration and is thus not available in every test bed system.
6.6.20.1
Start Starts the cyclic acquisition of measured data and device status. Parameters
Description
Name
Name of device
Script function/command: Sub Cdh_CVS_StartCyclicAcquisition(Name)
6.6.20.2
AK command Sends an individual AK command to the device. Parameters
Description
Name
Name of device
AK_Command_Send
AK command that is sent to the device
Script function/command: Sub Cdh_CVS_AKCommand(Name, AK_Command_Send)
6.6.20.3
Start bag pair filling Starts filling the specified bag pair after an optional delay time. Parameters
Description
Name
Name of device
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
Parameters
Description
CVS_BagPairNumber
Number of bag pair that is filled.
CVS_Delay
Optional delay time for the bag pair to be filled.
Script function/command: Sub Cdh_CVS_StartBagPairFilling(Name, CVS_BagPairNumber, CVS_Delay)
6.6.20.4
Stop bag pair filling Stops filling the specified bag pair after an optional delay time. Parameters
Description
Name
Name of device
CVS_BagPairNumber
Number of bag pair that is filled.
CVS_Delay
Optional delay time for the bag pair to be filled.
Script function/command: Sub Cdh_CVS_StopBagPairFilling(Name, CVS_BagPairNumber, CVS_Delay)
6.6.20.5
Volume (Bag) Retrieves the standard volume of the specified bag. On some CVS systems, zero (0) can be specified for the bag number to request the bag volume for all bags. Parameters
Description
Name
Name of device
CVS_BagNumber
Number of requested bag.
Script function/command: Sub Cdh_CVS_RequestBagVolume(Name, CVS_BagNumber)
6.6.20.6
Volume (Bag pair) Retrieves the standard volume of the specified bag pair (phase). This command is only available for certain CVS systems (see also CVS device manual). Parameters
Description
Name
Name of device
CVS_BagPairNumber
Number of requested bag pair.
Script function/command: Sub Cdh_CVS_RequestBagPairVolume(Name, CVS_BagPairNumber)
6.6.20.7
Manual Switches to Manual mode.
AVL PUMA Open 2012 — Scripting in PUMA Open
197
198
Functions of the PUMA Open Script API
Parameters
Description
Name
Name of device
Script function/command: Sub Cdh_CVS_ManualMode(Name)
6.6.20.8
Remote Switches to Remote mode. Parameters
Description
Name
Name of device
Script function/command: Sub Cdh_CVS_RemoteMode(Name)
6.6.20.9
Standby Switches to Standby mode. Parameters
Description
Name
Name of device
Script function/command: Sub Cdh_CVS_StandbyMode(Name)
6.6.20.10 Pause Switches to Pause mode. Parameters
Description
Name
Name of device
Script function/command: Sub Cdh_CVS_EnergySavingMode(Name)
6.6.20.11 Start analyze bag Starts bag analysis. Parameters
Description
Name
Name of device
CVS_BagNumber
Number of analyzed bag.
Script function/command: Sub Cdh_CVS_StartBagRead(Name, CVS_BagNumber)
6.6.20.12 Stop analyze bag Stops bag analysis. The bag number is only required by certain CVS systems (see also CVS device manual).
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
Parameters
Description
Name
Name of device
CVS_BagNumber
Number of analyzed bag.
Script function/command: Sub Cdh_CVS_StopBagRead(Name, CVS_BagNumber)
6.6.20.13 Start bag evacuation Starts bag evacuation. The bag number is only required by certain CVS systems (see also CVS device manual). Parameters
Description
Name
Name of device
CVS_BagNumber
Number of bag that is evacuated.
Script function/command: Sub Cdh_CVS_StartBagEvacuation(Name, CVS_BagNumber)
6.6.20.14 Stop bag evacuation Stops bag evacuation. This command is only available for certain CVS systems. Parameters
Description
Name
Name of device
CVS_BagNumber
Number of the bag that follows the last bag that is evacuated.
Script function/command: Sub Cdh_CVS_StopBagEvacuation(Name, CVS_BagNumber)
6.6.20.15 Sequence Executes a CDH sequence without direct parameter input being necessary. In this case, the current values of the device channels that have been associated to the specified sequence are passed on. Parameters
6.6.20.21 Sample line number Sets the specified sample gas line on the device.
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
Parameters
Description
CVS_SampleLineNumb er
Sample line number that is used.
Script function/command: Sub Cdh_CVS_SetSampleLine(CVS_SampleLineNumber)
6.6.20.22 Request flowrate index Retrieves the selected flow rate. Script function/command: Sub Cdh_CVS_RequestFlowrateIndex()
6.6.20.23 Request venturi number Retrieves the bag filling rate. Script function/command: Sub Cdh_CVS_RequestVenturiNumber()
6.6.20.24 Request function times Retrieves the function times set for bag protection, bag purging, maximum evacuation time and leak check. Script function/command: Sub Cdh_CVS_RequestFunctionTimes()
6.6.20.25 Request integrated DLS flowrate Retrieves the integrated DLS flow rate. Script function/command: Sub Cdh_CVS_RequestDLSIntFlowrate()
6.6.20.26 Request instantaneous DLS flowrate Retrieves the instantaneous DLS flow rate. Script function/command: Sub Cdh_CVS_RequestDLSInstFlowrate()
6.6.20.27 Request DLS demand flowrate Retrieves the set DLS flow rate. Script function/command: Sub Cdh_CVS_RequestDLSFlowrate()
6.6.20.28 DLS demand flowrate Sets the specified DLS flow rate on the device. Parameters
Description
CVS_DLSFlowrate
Demand flow rate to be set.
AVL PUMA Open 2012 — Scripting in PUMA Open
201
202
Functions of the PUMA Open Script API
Script function/command: Sub Cdh_CVS_SetDLSFlowrate(CVS_DLSFlowrate)
6.6.21
CGM-PTS (CDH)
6.6.21.1
Connect Establishes communication with the device. Cyclic data acquisition is not active. Script function/command: Sub Cdh_CGMPTS_Connect()
6.6.21.2
Start Starts the cyclic acquisition of measured data and device status. Script function/command: Sub Cdh_CGMPTS_StartDevice()
6.6.21.3
Initialize Switches the device into Remote mode. Cyclic data acquisition is continued. Script function/command: Sub Cdh_CGMPTS_Initialize()
6.6.21.4
PreMeasurement Performs measurement preparation (PUMA method). Script function/command: Sub Cdh_CGMPTS_PreMeasurement()
6.6.21.5
Measurement Performs the measurement (PUMA method). Script function/command: Sub Cdh_CGMPTS_Measurement()
6.6.21.6
Provide results Shows the measured results (PUMA method). Script function/command: Sub Cdh_CGMPTS_ProvideResults()
6.6.21.7
PostMeasurement Completes the measurement (PUMA method). Script function/command: Sub Cdh_CGMPTS_PostMeasurement()
6.6.21.8
Reset Performs a device reset (PUMA method). Script function/command:
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
Sub Cdh_CGMPTS_Reset()
6.6.21.9
Calibrate Performs a device calibration (PUMA method). Script function/command: Sub Cdh_CGMPTS_Calibrate()
6.6.21.10 Interrupt Performs a device interrupt (PUMA method). Script function/command: Sub Cdh_CGMPTS_Interrupt()
6.6.21.11 Release Switches to Manual mode. Cyclic data acquisition is continued. Script function/command: Sub Cdh_CGMPTS_Release()
6.6.21.12 Stop Stops the cyclic acquisition of measured data and device status. Script function/command: Sub Cdh_CGMPTS_StopDevice()
6.6.21.13 AK command Sends an individual AK command to the device (DoAKCommand). Parameters
Description
PMU_AKSend
AK command that is sent.
Script function/command: Sub Cdh_CGMPTS_DoAKCommand(PMU_AKSend)
6.6.21.14 Get standardized volume Provides the current standard volume [l] of the specified filter. Parameters
Description
PMU_SamplePoint
Filter number that is requested.
Script function/command: Sub Cdh_CGMPTS_GetNormVolume(PMU_SamplePoint)
6.6.21.15 Remote mode Switches the device into Remote mode. Script function/command: Sub Cdh_CGMPTS_DoRemote()
AVL PUMA Open 2012 — Scripting in PUMA Open
203
204
Functions of the PUMA Open Script API
6.6.21.16 Manual mode Switches the device into Manual mode. Script function/command: Sub Cdh_CGMPTS_DoManual()
6.6.21.17 Pause mode Switches the device into Pause mode. Script function/command: Sub Cdh_CGMPTS_DoPause()
6.6.21.18 Stop mode Stops all activities on the device and switches off the pump. Script function/command: Sub Cdh_CGMPTS_DoStop()
6.6.21.19 Standby mode Makes the device ready for measurement. The pump is switched on. Script function/command: Sub Cdh_CGMPTS_DoStandby()
6.6.21.20 Loading filter START Starts loading the specified filter. Parameters
Description
PMU_SamplePoint
Number of filter to be loaded.
Script function/command: Sub Cdh_CGMPTS_DoLoadFilter(PMU_SamplePoint)
6.6.21.22 Volume integrators Stop Deactivates the volume integrators and sets them to zero. Script function/command: Sub Cdh_CGMPTS_DoResetIntegrators()
6.6.21.23 Activation object Executes the specified activation object.
6.6.21.24 Set particulate flow rate Sets the particulate flow rate on the device (SetParticulateFlowrate). Parameters
Description
PMU_ParticulateFlowrat e
Particulate flow rate that is set.
Script function/command: Sub Cdh_CGMPTS_SetParticulateFlowrate(PMU_ParticulateFlowrate)
6.6.21.25 Set DD air flow rate Sets the double-dilution flow rate on the device. Parameters
Description
PMU_DoubleDilAirFlowr ate
Flow rate that is set.
Script function/command: Sub Cdh_CGMPTS_SetDDAirFlowrate(PMU_DoubleDilAirFlowrate)
6.6.22
DEGUFLOW (CDH)
6.6.22.1
Connect Prints the software version of the CDH implementation as a PUMA message. Sets the measurement values to overflow. Parameters
Description
Name
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_DEGUFLOW_Connect(Name, Static0, MonitorTimeout, Timeout)
6.6.22.2
Start Device Empty sequence for the DEGUFLOW.
AVL PUMA Open 2012 — Scripting in PUMA Open
205
206
Functions of the PUMA Open Script API
Parameters
Description
Name
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_DEGUFLOW_StartDevice(Name, MonitorTimeout, Timeout)
6.6.22.3
Initialisation Sets the device into Remote state and verifies whether the device has changed to that state. Sets the sampling rate to 300 samples. Retrieves the measurement ranges of the connected sensors. Starts cyclic data acquisition via "RemoteCyclic". Parameters
Description
Name
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_DEGUFLOW_Initialize(Name, MonitorTimeout, Timeout)
6.6.22.4
Reinitialize The same as "Initialization". Parameters
Description
Name
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_DEGUFLOW_Reinitialize(Name, MonitorTimeout, Timeout)
6.6.22.5
PreMeasurement If cyclic data acquisition is deactivated, the same functions as for "Initialization" are executed to reinitialize the device before measurement operation. Parameters
Description
Name
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_DEGUFLOW_PreMeasurement(Name, MonitorTimeout, Timeout)
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
6.6.22.6
Measurement Starts the measurement phase on the device and waits until the measuring period (input parameter) has elapsed. Then the values measured by the device are retrieved. Parameters
Description
Name
Name of device
PARAM_MeasTime
Measuring time
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_DEGUFLOW_Measurement(Name, PARAM_MeasTime, _ MonitorTimeout, Timeout)
6.6.22.7
Provide Results Empty sequence for the DEGUFLOW. Parameters
Description
Name
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_DEGUFLOW_ProvideResults(Name, MonitorTimeout, Timeout)
6.6.22.8
Post Measurement Continues cyclic data acquisition after the measuring phase. Parameters
Description
Name
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_DEGUFLOW_PostMeasurement(Name, MonitorTimeout, Timeout)
6.6.22.9
Reset Performs a software reset on the device using the same functions as InitSequence. Cyclic data acquisition is terminated. Parameters
Description
Name
Name of device
AVL PUMA Open 2012 — Scripting in PUMA Open
207
208
Functions of the PUMA Open Script API
Parameters
Description
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_DEGUFLOW_Reset(Name, MonitorTimeout, Timeout)
6.6.22.10 Maintenance Empty sequence for the DEGUFLOW. PUMA is notified by sending OK. Continues by executing InitSequence, after which cyclic data acquisition is terminated. Parameters
Description
Name
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_DEGUFLOW_Maintenance(Name, MonitorTimeout, Timeout)
6.6.22.11 Cancel Cancels the active device procedures (e.g. measurement). Continues by executing InitSequence, after which cyclic data acquisition is terminated. Parameters
Description
Name
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_DEGUFLOW_Cancel(Name, MonitorTimeout, Timeout)
6.6.22.12 Release Stops cyclic data acquisition. Sets the measurement values to overflow. Parameters
Description
Name
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_DEGUFLOW_Release(Name, MonitorTimeout, Timeout)
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
6.6.22.13 Stop Device Empty sequence for the DEGUFLOW. Parameters
Description
Name
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_DEGUFLOW_StopDevice(Name, MonitorTimeout, Timeout)
6.6.22.14 Select new range Selects a new measurement range using the telegram SEMB, which connects the appropriate sensor to the evaluation unit of the device. Parameters
Description
Name
Name of device
PARAM_NewRange
New measuring range 1..3
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_DEGUFLOW_SelectNewRange(Name, PARAM_NewRange, _ MonitorTimeout, Timeout)
6.6.22.15 InitSequence For internal use by other sequences only. Initializes the device by switching to Remote and selecting the sampling rate. Retrieves the measuring ranges of the connected sensors. Script function/command: Cdh_DEGUFLOW_InitSequence
6.6.22.16 RemoteCyclic For internal use by other sequences only. Starts online data acquisition. Script function/command: Cdh_DEGUFLOW_RemoteCyclic
6.6.22.17 SequenceNotOk For internal use by other sequences only. Notifies PUMA by sending "SequenceCompletedNotOk". Script function/command: Cdh_DEGUFLOW_SequenceNotOk
AVL PUMA Open 2012 — Scripting in PUMA Open
209
210
Functions of the PUMA Open Script API
6.6.22.18 NotAvailable For internal use by other sequences only. Notifies PUMA by sending "NOTAVAILABLE" if an error occurs during online data acquisition. Script function/command: Cdh_DEGUFLOW_NotAvailable
6.6.22.19 Flush For internal use by other sequences only. Flushes the input queue by sending commands to the device and waiting for acknowledgement. If an error occurs, the sequence FlushRestart is called up and the action is repeated in an endless loop. Can be canceled with the sequence "Cancel". This function is useful because the device sends several hundred bytes in some error states. Parameters
Description
Name
Name of device
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub cdh_DEGUFLOW_Flush(Name, MonitorTimeout, Timeout)
6.6.22.20 FlushRestart For internal use by other sequences only. Helper sequence for flushing the input queue. Please also see the sequence "Flush". Script function/command: Cdh_DEGUFLOW_FlushRestart
6.6.22.21 Retry For internal use by other sequences only. Helper sequence for automatic reconnection to the device. Script function/command: Cdh_DEGUFLOW_Retry
6.6.23
Horiba CVS-7000 Standard (CDH)
6.6.23.1
Start Starts the cyclic acquisition of measured data and device status. Parameters
Description
Name
Name of device
Script function/command: Sub Cdh_CVS_StartCyclicAcquisition(Name)
6.6.23.2
Send AK command Sends an individual AK command to the device.
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
Parameters
Description
Name
Name of device
AK_Command_Send
AK command that is sent to the device
Script function/command: Sub Cdh_CVS_AKCommand(Name, AK_Command_Send)
6.6.23.3
Start bag pair filling Starts filling the specified bag pair after an optional delay time. Parameters
Description
Name
Name of device
CVS_BagPairNumber
Number of bag pair that is filled.
CVS_Delay
Optional delay time for the bag pair to be filled.
Script function/command: Sub Cdh_CVS_StartBagPairFilling(Name, CVS_BagPairNumber, CVS_Delay)
6.6.23.4
Stop bag pair filling Stops filling the specified bag pair after an optional delay time. Parameters
Description
Name
Name of device
CVS_BagPairNumber
Number of bag pair that is filled.
CVS_Delay
Optional delay time for the bag pair to be filled.
Script function/command: Sub Cdh_CVS_StopBagPairFilling(Name, CVS_BagPairNumber, CVS_Delay)
6.6.23.5
Request bag volume Retrieves the standard volume of the specified bag. On some CVS systems, zero (0) can be specified for the bag number to request the bag volume for all bags. Parameters
Description
Name
Name of device
CVS_BagNumber
Number of requested bag.
Script function/command: Sub Cdh_CVS_RequestBagVolume(Name, CVS_BagNumber)
6.6.23.6
Volume (Bag pair) Retrieves the standard volume of the specified bag pair (phase). This command is only available for certain CVS systems (see also CVS device manual).
AVL PUMA Open 2012 — Scripting in PUMA Open
211
212
Functions of the PUMA Open Script API
Parameters
Description
Name
Name of device
CVS_BagPairNumber
Number of requested bag pair.
Script function/command: Sub Cdh_CVS_RequestBagPairVolume(Name, CVS_BagPairNumber)
6.6.23.7
Manual Switches to Manual mode. Parameters
Description
Name
Name of device
Script function/command: Sub Cdh_CVS_ManualMode(Name)
6.6.23.8
Remote Switches to Remote mode. Parameters
Description
Name
Name of device
Script function/command: Sub Cdh_CVS_RemoteMode(Name)
6.6.23.9
Standby Switches to Standby mode. Parameters
Description
Name
Name of device
Script function/command: Sub Cdh_CVS_StandbyMode(Name)
6.6.23.10 Pause Switches to Pause mode. Parameters
Description
Name
Name of device
Script function/command: Sub Cdh_CVS_EnergySavingMode(Name)
6.6.23.11 Start bag read Starts bag analysis.
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
Parameters
Description
Name
Name of device
CVS_BagNumber
Number of analyzed bag.
Script function/command: Sub Cdh_CVS_StartBagRead(Name, CVS_BagNumber)
6.6.23.12 Stop bag read Stops bag analysis. The bag number is only required by certain CVS systems (see also CVS device manual). Parameters
Description
Name
Name of device
CVS_BagNumber
Number of analyzed bag.
Script function/command: Sub Cdh_CVS_StopBagRead(Name, CVS_BagNumber)
6.6.23.13 Start bag evacuation Starts bag evacuation. The bag number is only required by certain CVS systems (see also CVS device manual). Parameters
Description
Name
Name of device
CVS_BagNumber
Number of bag that is evacuated.
Script function/command: Sub Cdh_CVS_StartBagEvacuation(Name, CVS_BagNumber)
6.6.23.14 Stop bag evacuation Stops bag evacuation. This command is only available for certain CVS systems (see also CVS device manual). Parameters
Description
Name
Name of device
CVS_BagNumber
Number of the bag that follows the last bag that is evacuated.
Script function/command: Sub Cdh_CVS_StopBagEvacuation(Name, CVS_BagNumber)
6.6.23.15 Sequence Executes a CDH sequence without direct parameter input being necessary. In this case, the current values of the device channels that have been associated to the specified sequence are passed on. Parameters
6.6.23.21 Sample line number Sets the specified sample gas line on the device. Parameters
Description
CVS_SampleLineNumb er
Sample line number that is used.
Script function/command: Sub Cdh_CVS_SetSampleLine(CVS_SampleLineNumber)
6.6.23.22 Flow rate Retrieves the selected flow rate. Script function/command: Sub Cdh_CVS_RequestFlowrateIndex()
6.6.23.23 Bag fill rate Retrieves the bag filling rate. Script function/command: Sub Cdh_CVS_RequestVenturiNumber()
6.6.23.24 Request function times Retrieves the function times set for bag protection, bag purging, maximum evacuation time and leak check. Script function/command: Sub Cdh_CVS_RequestFunctionTimes()
6.6.23.25 Request integrated DLS flowrate Retrieves the integrated DLS flow rate. Script function/command: Sub Cdh_CVS_RequestDLSIntFlowrate()
6.6.23.26 Request instantaneous DLS flowrate Retrieves the instantaneous DLS flow rate. Script function/command: Sub Cdh_CVS_RequestDLSInstFlowrate()
6.6.23.27 Request DLS demand flowrate Retrieves the set DLS flow rate. AVL PUMA Open 2012 — Scripting in PUMA Open
215
216
Functions of the PUMA Open Script API
Script function/command: Sub Cdh_CVS_RequestDLSFlowrate()
6.6.23.28 DLS demand flowrate Sets the specified DLS flow rate on the device. Parameters
Description
CVS_DLSFlowrate
Demand flow rate to be set.
Script function/command: Sub Cdh_CVS_SetDLSFlowrate(CVS_DLSFlowrate)
6.6.24
Horiba CVS-7000 for Bosch (CDH) Information This class of activation objects depends on the configuration and is thus not available in every test bed system.
6.6.24.1
Start Starts the cyclic acquisition of measured data and device status. Parameters
Description
Name
Name of device
Script function/command: Sub Cdh_CVS_StartCyclicAcquisition(Name)
6.6.24.2
AK command Sends an individual AK command to the device. Parameters
Description
Name
Name of device
AK_Command_Send
AK command that is sent to the device
Script function/command: Sub Cdh_CVS_AKCommand(Name, AK_Command_Send)
6.6.24.3
Start bag pair filling Starts filling the specified bag pair after an optional delay time. Parameters
Description
Name
Name of device
CVS_BagPairNumber
Number of bag pair that is filled.
CVS_Delay
Optional delay time for the bag pair to be filled.
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
Script function/command: Sub Cdh_CVS_StartBagPairFilling(Name, CVS_BagPairNumber, CVS_Delay)
6.6.24.4
Stop bag pair filling Stops filling the specified bag pair after an optional delay time. Parameters
Description
Name
Name of device
CVS_BagPairNumber
Number of bag pair that is filled.
CVS_Delay
Optional delay time for the bag pair to be filled.
Script function/command: Sub Cdh_CVS_StopBagPairFilling(Name, CVS_BagPairNumber, CVS_Delay)
6.6.24.5
Volume (Bag) Retrieves the standard volume of the specified bag. On some CVS systems, zero (0) can be specified for the bag number to request the bag volume for all bags. Parameters
Description
Name
Name of device
CVS_BagNumber
Number of requested bag.
Script function/command: Sub Cdh_CVS_RequestBagVolume(Name, CVS_BagNumber)
6.6.24.6
Volume (Bag pair) Retrieves the standard volume of the specified bag pair (phase). This command is only available for certain CVS systems (see also CVS device manual). Parameters
Description
Name
Name of device
CVS_BagPairNumber
Number of requested bag pair.
Script function/command: Sub Cdh_CVS_RequestBagPairVolume(Name, CVS_BagPairNumber)
6.6.24.7
Manual Switches to Manual mode. Parameters
Description
Name
Name of device
Script function/command: Sub Cdh_CVS_ManualMode(Name)
AVL PUMA Open 2012 — Scripting in PUMA Open
217
218
Functions of the PUMA Open Script API
6.6.24.8
Remote Switches to Remote mode. Parameters
Description
Name
Name of device
Script function/command: Sub Cdh_CVS_RemoteMode(Name
6.6.24.9
Standby Switches to Standby mode. Parameters
Description
Name
Name of device
Script function/command: Sub Cdh_CVS_StandbyMode(Name)
6.6.24.10 Pause Switches to Pause mode. Parameters
Description
Name
Name of device
Script function/command: Sub Cdh_CVS_EnergySavingMode(Name)
6.6.24.11 Start analyze bag Starts bag analysis. Parameters
Description
Name
Name of device
CVS_BagNumber
Number of analyzed bag.
Script function/command: Sub Cdh_CVS_StartBagRead(Name, CVS_BagNumber)
6.6.24.12 Stop analyze bag Stops bag analysis. The bag number is only required by certain CVS systems (see also CVS device manual). Parameters
Description
Name
Name of device
CVS_BagNumber
Number of analyzed bag.
Script function/command: Sub Cdh_CVS_StopBagRead(Name, CVS_BagNumber)
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
6.6.24.13 Start bag evacuation Starts bag evacuation. The bag number is only required by certain CVS systems (see also CVS device manual). Parameters
Description
Name
Name of device
CVS_BagNumber
Number of bag that is evacuated.
Script function/command: Sub Cdh_CVS_StartBagEvacuation(Name, CVS_BagNumber)
6.6.24.14 Stop bag evacuation Stops bag evacuation. This command is only available for certain CVS systems (see also CVS device manual). Parameters
Description
Name
Name of device
CVS_BagNumber
Number of the bag that follows the last bag that is evacuated.
Script function/command: Sub Cdh_CVS_StopBagEvacuation(Name, CVS_BagNumber)
6.6.24.15 Sequence Executes a CDH sequence without direct parameter input being necessary. In this case, the current values of the device channels that have been associated to the specified sequence are passed on. Parameters
6.6.24.21 Sample line number Sets the specified sample gas line on the device. Parameters
Description
CVS_SampleLineNumb er
Name of macro (CDH sequence) that is executed.
Script function/command: Sub Cdh_CVS_SetSampleLine(CVS_SampleLineNumber)
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
6.6.24.22 Request flowrate index Retrieves the selected flow rate. Script function/command: Sub Cdh_CVS_RequestFlowrateIndex()
6.6.24.23 Request venturi number Retrieves the bag filling rate. Script function/command: Sub Cdh_CVS_RequestVenturiNumber()
6.6.24.24 Request function times Retrieves the function times set for bag protection, bag purging, maximum evacuation time and leak check. Script function/command: Sub Cdh_CVS_RequestFunctionTimes()
6.6.24.25 Request integrated DLS flowrate Retrieves the integrated DLS flow rate. Script function/command: Sub Cdh_CVS_RequestDLSIntFlowrate()
6.6.24.26 Request instantaneous DLS flowrate Retrieves the instantaneous DLS flow rate. Script function/command: Sub Cdh_CVS_RequestDLSInstFlowrate()
6.6.24.27 Request DLS demand flowrate Retrieves the set DLS flow rate. Script function/command: Sub Cdh_CVS_RequestDLSFlowrate()
6.6.24.28 DLS demand flowrate Sets the specified DLS flow rate on the device. Parameters
Description
CVS_DLSFlowrate
Demand flow rate to be set.
Script function/command: Sub Cdh_CVS_SetDLSFlowrate(CVS_DLSFlowrate)
AVL PUMA Open 2012 — Scripting in PUMA Open
221
222
Functions of the PUMA Open Script API
6.6.25
Horiba CVS-9000 (CDH) Information This class of activation objects depends on the configuration and is thus not available in every test bed system.
6.6.25.1
Start Starts the cyclic acquisition of measured data and device status. Parameters
Description
Name
Name of device
Script function/command: Sub Cdh_CVS_StartCyclicAcquisition(Name)
6.6.25.2
AK command Sends an individual AK command to the device. Parameters
Description
Name
Name of device
AK_Command_Send
AK command that is sent to the device
Script function/command: Sub Cdh_CVS_AKCommand(Name, AK_Command_Send)
6.6.25.3
Start bag pair filling Starts filling the specified bag pair after an optional delay time. Parameters
Description
Name
Name of device
CVS_BagPairNumber
Number of bag pair that is filled.
CVS_Delay
Optional delay time for the bag pair to be filled.
Script function/command: Sub Cdh_CVS_StartBagPairFilling(Name, CVS_BagPairNumber, CVS_Delay)
6.6.25.4
Stop bag pair filling Stops filling the specified bag pair after an optional delay time. Parameters
Description
Name
Name of device
CVS_BagPairNumber
Number of bag pair that is filled.
CVS_Delay
Optional delay time for the bag pair to be filled.
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
Script function/command: Sub Cdh_CVS_StopBagPairFilling(Name, CVS_BagPairNumber, CVS_Delay)
6.6.25.5
Volume (Bag) Retrieves the standard volume of the specified bag. On some CVS systems, zero (0) can be specified for the bag number to request the bag volume for all bags. Parameters
Description
Name
Name of device
CVS_BagNumber
Number of requested bag.
Script function/command: Sub Cdh_CVS_RequestBagVolume(Name, CVS_BagNumber)
6.6.25.6
Volume (Bag pair) Retrieves the standard volume of the specified bag pair (phase). This command is only available for certain CVS systems (see also CVS device manual). Parameters
Description
Name
Name of device
CVS_BagPairNumber
Number of requested bag pair.
Script function/command: Sub Cdh_CVS_RequestBagPairVolume(Name, CVS_BagPairNumber)
6.6.25.7
Manual Switches to Manual mode. Parameters
Description
Name
Name of device
Script function/command: Sub Cdh_CVS_ManualMode(Name)
6.6.25.8
Remote Switches to Remote mode. Parameters
Description
Name
Name of device
Script function/command: Sub Cdh_CVS_RemoteMode(Name
6.6.25.9
Standby Switches to Standby mode.
AVL PUMA Open 2012 — Scripting in PUMA Open
223
224
Functions of the PUMA Open Script API
Parameters
Description
Name
Name of device
Script function/command: Sub Cdh_CVS_StandbyMode(Name)
6.6.25.10 Pause Switches to Pause mode. Parameters
Description
Name
Name of device
Script function/command: Sub Cdh_CVS_EnergySavingMode(Name)
6.6.25.11 Start analyze bag Starts bag analysis. Parameters
Description
Name
Name of device
CVS_BagNumber
Number of analyzed bag.
Script function/command: Sub Cdh_CVS_StartBagRead(Name, CVS_BagNumber)
6.6.25.12 Stop analyze bag Stops bag analysis. The bag number is only required by certain CVS systems (see also CVS device manual). Parameters
Description
Name
Name of device
CVS_BagNumber
Number of analyzed bag.
Script function/command: Sub Cdh_CVS_StopBagRead(Name, CVS_BagNumber)
6.6.25.13 Start bag evacuation Starts bag evacuation. The bag number is only required by certain CVS systems (see also CVS device manual). Parameters
Description
Name
Name of device
CVS_BagNumber
Number of bag that is evacuated.
Script function/command: Sub Cdh_CVS_StartBagEvacuation(Name, CVS_BagNumber)
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
6.6.25.14 Stop bag evacuation Stops bag evacuation. This command is only available for certain CVS systems (see also CVS device manual). Parameters
Description
Name
Name of device
CVS_BagNumber
Number of the bag that follows the last bag that is evacuated.
Script function/command: Sub Cdh_CVS_StopBagEvacuation(Name, CVS_BagNumber)
6.6.25.15 Sequence Executes a CDH sequence without direct parameter input being necessary. In this case, the current values of the device channels that have been associated to the specified sequence are passed on. Parameters
6.6.25.21 Sample line number Sets the specified sample gas line on the device. Parameters
Description
CVS_SampleLineNumb er
Sample line number that is used.
Script function/command: Sub Cdh_CVS_SetSampleLine(CVS_SampleLineNumber)
6.6.25.22 Request flowrate index Retrieves the selected flow rate. Script function/command: Sub Cdh_CVS_RequestFlowrateIndex()
6.6.25.23 Request venturi number Retrieves the bag filling rate. Script function/command: Sub Cdh_CVS_RequestVenturiNumber()
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
6.6.25.24 Request function times Retrieves the function times set for bag protection, bag purging, maximum evacuation time and leak check. Script function/command: Sub Cdh_CVS_RequestFunctionTimes()
6.6.25.25 Request integrated DLS flowrate Retrieves the integrated DLS flow rate. Script function/command: Sub Cdh_CVS_RequestDLSIntFlowrate()
6.6.25.26 Request instantaneous DLS flowrate Retrieves the instantaneous DLS flow rate. Script function/command: Sub Cdh_CVS_RequestDLSInstFlowrate()
6.6.25.27 Request DLS demand flowrate Retrieves the set DLS flow rate. Script function/command: Sub Cdh_CVS_RequestDLSFlowrate()
6.6.25.28 DLS demand flowrate Sets the specified DLS flow rate on the device. Parameters
Description
CVS_DLSFlowrate
Demand flow rate to be set.
Script function/command: Sub Cdh_CVS_SetDLSFlowrate(CVS_DLSFlowrate)
6.6.26
Horiba PMU-7100 (CDH)
6.6.26.1
Connect Establishes communication with the device. Cyclic data acquisition is deactivated. Script function/command: Sub Cdh_HoribaPMU7100AK_Connect()
6.6.26.2
Start device Starts the cyclic acquisition of measured data and device status. Script function/command: Sub Cdh_HoribaPMU7100AK_StartDevice()
AVL PUMA Open 2012 — Scripting in PUMA Open
227
228
Functions of the PUMA Open Script API
6.6.26.3
Initialize Switches the device into Remote mode. Cyclic data acquisition is continued. Script function/command: Sub Cdh_HoribaPMU7100AK_Initialize()
6.6.26.4
PreMeasurement Performs measurement preparation (PUMA method). Script function/command: Sub Cdh_HoribaPMU7100AK_PreMeasurement()
6.6.26.5
Measurement Performs the measurement (PUMA method). Script function/command: Sub Cdh_HoribaPMU7100AK_Measurement()
6.6.26.6
Results Shows the measured results (PUMA method). Script function/command: Sub Cdh_HoribaPMU7100AK_ProvideResults()
6.6.26.7
PostMeasurement Completes the measurement (PUMA method). Script function/command: Sub Cdh_HoribaPMU7100AK_PostMeasurement()
6.6.26.8
Reset Performs a device reset (PUMA method). Script function/command: Sub Cdh_HoribaPMU7100AK_Reset()
6.6.26.9
Calibrate Performs a device calibration (PUMA method). Script function/command: Sub Cdh_HoribaPMU7100AK_Calibrate()
6.6.26.10 Interrupt Performs a device interrupt (PUMA method). Script function/command: Sub Cdh_HoribaPMU7100AK_Interrupt()
6.6.26.11 Release Switches to Manual mode. Cyclic data acquisition is continued. Script function/command:
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
Sub Cdh_HoribaPMU7100AK_Release()
6.6.26.12 Stop device Stops the cyclic acquisition of measured data and device status. Script function/command: Sub Cdh_HoribaPMU7100AK_StopDevice()
6.6.26.13 AK command Sends an individual AK command to the device (DoAKCommand). Parameters
Description
PMU_AKSend
AK command that is sent.
Script function/command: Sub Cdh_HoribaPMU7100AK_DoAKCommand(PMU_AKSend)
6.6.26.14 Software reset Performs a sofware reset. Aborts all active functions and switches the pump off. Script function/command: Sub Cdh_HoribaPMU7100AK_DoReset()
6.6.26.15 Remote Switches the device into Remote mode. Script function/command: Sub Cdh_HoribaPMU7100AK_DoRemote()
6.6.26.16 Manual Switches the device into Manual mode. Script function/command: Sub Cdh_HoribaPMU7100AK_DoManual()
6.6.26.17 Pause Switches the device into Pause mode. Script function/command: Sub Cdh_HoribaPMU7100AK_DoPause()
6.6.26.18 Stop Stops all activities on the device and switches off the pump. Script function/command: Cdh_HoribaPMU7100AK_DoStop "DEVICE"
6.6.26.19 Standby Makes the device ready for measurement. The pump is switched on. Script function/command:
AVL PUMA Open 2012 — Scripting in PUMA Open
229
230
Functions of the PUMA Open Script API
Sub Cdh_HoribaPMU7100AK_DoStandby()
6.6.26.20 Load filter Loads the filter at the specified sample point. Parameters
Description
PMU_SamplePoint
Number of filter to be loaded.
Script function/command: Sub Cdh_HoribaPMU7100AK_DoLoadFilter(PMU_SamplePoint)
6.6.26.21 Petrol mode Switches the device into the Petrol mode. Script function/command: Sub Cdh_HoribaPMU7100AK_DoGasoline()
6.6.26.22 Diesel mode Switches the device into the Diesel mode. Script function/command: Sub Cdh_HoribaPMU7100AK_DoDiesel()
6.6.26.23 EPA probe Switches to the EPA probe. Script function/command: Sub Cdh_HoribaPMU7100AK_DoProbeEPA()
6.6.26.24 ECE probe Switches to the ECE probe. Script function/command: Sub Cdh_HoribaPMU7100AK_DoProbeECE()
6.6.26.25 Pump on Switches the pump on. Script function/command: Sub Cdh_HoribaPMU7100AK_DoPumpOn()
6.6.26.26 Pump off Switches the pump off. Script function/command: Sub Cdh_HoribaPMU7100AK_DoPumpOff()
6.6.26.27 Activation object Executes the specified activation object.
6.6.26.28 Get standardized volume Provides the integrated standard volume [l] of the specified channel. Parameters
Description
PMU_Channel
Required standard volume channel.
Script function/command: Sub Cdh_HoribaPMU7100AK_GetNormVolume(PMU_Channel)
6.6.26.29 Get norm base Retrieves the values for the standardized base of the pressure [kPa] and temperature [°K]. Script function/command: Sub Cdh_HoribaPMU7100AK_GetNormBase()
6.6.26.30 Get demand flowrate Retrieves the set flow demand value [m³/min]. Script function/command: Cdh_HoribaPMU7100AK_GetNormDemand "DEVICE"
6.6.26.31 Get flowrate-Loading (max./min.) Retrieves the maximum and minimum flow rate [l/min] for the specified channel during the loading phase. Parameters
Description
PMU_Channel
Channel required for the max/min flow rate.
Script function/command: Sub Cdh_HoribaPMU7100AK_GetFlowMaxMin(PMU_Channel)
6.6.26.32 Get max. tunnel temp. Retrieves the maximum tunnel temperature [°K]. Script function/command: Sub Cdh_HoribaPMU7100AK_GetTunnelTempMax()
6.6.26.33 Get system time Retrieves the current time and date from the device. Script function/command: Sub Cdh_HoribaPMU7100AK_GetSystemTime()
AVL PUMA Open 2012 — Scripting in PUMA Open
231
232
Functions of the PUMA Open Script API
6.6.26.34 Set norm base Sets the values for the standardized base of the pressure [kPa] and temperature [°K] on the device. Parameters
Description
PMU_NormTemp
Standard temperature value.
PMU_NormPressure
Standard pressure value.
Script function/command: Sub Cdh_HoribaPMU7100AK_SetNormBase(PMU_NormTemp, PMU_NormPressure)
6.6.26.35 Set demand flowrate Sets the flow demand value [m³/min] on the device. Parameters
Description
PMU_FlowDemand
Flow demand value.
Script function/command: Sub Cdh_HoribaPMU7100AK_SetFlowDemand(PMU_FlowDemand)
6.6.26.36 Set system time Sets the current time and date on the device. Parameters
Description
PMU_Date
Date
PMU_Time
Time
Script function/command: Sub Cdh_HoribaPMU7100AK_SetSystemTime(PMU_Date, PMU_Time)
6.6.27
DiGas4000
6.6.27.1
PreMeasurement Sends measurement parameters to the device and continues cyclic data acquisition. Parameters
Description
Name
Name of device
Script function/command: Sub cdh_DiGas4000_PreMeasurement(Name)
Example Cdh_DiGas4000_PreMeasurement "DiGas4000"
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
6.6.27.2
Measurement Starts measurement. Provides the MeasurementOnlineData section with values during measurement. Parameters
Description
Name
Name of the Digas4000. String.
Script function/command: Sub cdh_DiGas4000_Measurement(Name)
Example Cdh_DiGas4000_Measurement "DiGas4000"
6.6.27.3
Start DiGas4000 Initializes the DiGas Starts cyclic data acquisition: GetonlineValues. Parameters
Description
Name
Name of the Digas4000. String.
Script function/command: Sub cdh_DiGas4000_Init_DiGas_Start(Name)
Example Cdh_DiGas4000_Init_Digas_Start "DiGas4000"
6.6.27.4
Online Values Reads in the cyclic values: GetOnlineValue. Parameters
Description
Name
Name of the Digas4000. String.
Script function/command: Sub cdh_DiGas4000_GetOnlineValues(Name)
Example Cdh_DiGas4000_GetOnlineValues "DiGas4000"
6.6.27.5
PUMA Measurement Cyclic measurement in PUMA measurement: the measuring time parameter is DG_MeasTime. Parameters
Description
Name
Name of the Digas4000. String.
DG_MeasTime
PUMA measuring time
Script function/command:
AVL PUMA Open 2012 — Scripting in PUMA Open
233
234
Functions of the PUMA Open Script API
Sub cdh_DiGas4000_MeasurementOnlineData(Name, DG_MeasTime)
Example Cdh_DiGas4000_MeasOnlineData "DiGas4000", 10
6.6.27.6
Start measuring device Starts the DiGas 4000 with cyclic data acquisition: GetOnlineValue. Parameters
Description
Name
Name of the Digas4000. String.
Script function/command: Sub cdh_DiGas4000_StartMeasurement(Name)
Example Cdh_DiGas4000_StartMeasurement "DiGas4000"
6.6.27.7
Stop Measurement Stops the measurement and disconnects the device. Parameters
Description
Name
Name of the Digas4000. String.
Script function/command: Sub cdh_DiGas4000_StopMeasurement(Name)
Example Cdh_DiGas4000_StopMeasurement "DiGas4000"
6.6.28
Configurable Device Handler
6.6.28.1
Activate the device Activates a device to receive AO commands. Script function/command: Function Cdh ActivateDevice
6.6.28.2
Deactivate the device Deactivates a device to receive AO commands. Script function/command: Function Cdh DeActivateDevice
6.6.28.3
Set variable value Sets the value of the MDD variable.
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
Parameters
Description
DeviceName
Name of the telegram string to be sent. String.
ChannelName
Name of MDD variable.
ChannelValue
Value to which the MDD variable is set.
Script function/command: Sub CdhSetChannelValue(DeviceName, ChannelName, ChannelValue)
6.6.28.4
Invoke Sequence Invokes an MDD sequence. The current sequence is interrupted. Parameters
Description
DeviceName
Name of device
SequenceName
Name of MDD sequence.
Script function/command: Sub CdhInvokeSequence(DeviceName, SequenceName)
6.6.28.5
Invoke Sequence (with parameters) Up to 5 MDD variables can be set to invoke the relevant sequence. Parameters
Start filling Fills the bag pair (1..4). Parameters
Description
Name
Name of the CVS device. String.
BagNum
Name of bag pair to be filled. Integer.
Script function/command: Sub CvsFillBagPair(Name, BagNum)
6.6.29.2
Stop filling Stops bag pair filling (1..4). Parameters
Description
Name
Name of the CVS device. String.
BagNum
Name of bag pair for which filling is stopped. Integer.
Script function/command: Sub CvsStopFillBagPair(Name, BagNum)
6.6.29.3
Purge Purges all bags. Parameters
Description
Name
Name of the CVS device. String.
Script function/command: Sub CvsPurgeBags(Name)
6.6.29.4
Evacuate Evacuates all bags. Parameters
Description
Name
Name of the CVS device. String.
Script function/command: Sub CvsDumpBags(Name)
6.6.29.5
Reset Integrator Resets the integrator for the volume and time.
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
Parameters
Description
Name
Name of the CVS device. String.
Script function/command: Sub CvsResetIntegrator(Name)
6.6.29.6
Analyze modal air Analyzes the modal air. Parameters
Description
Name
Name of the CVS device. String.
Script function/command: Sub CvsModalAirAnalyze(Name)
6.6.29.7
Stop modal analysis Terminates modal air analysis. Parameters
Description
Name
Name of the CVS device. String.
Script function/command: Sub CvsStopModalAnalyze(Name)
6.6.29.8
Switch on CVS Switches the CVS on. Parameters
Description
Name
Name of the CVS device. String.
Script function/command: Sub CvsSwitchOn(Name)
6.6.29.9
Switch off CVS Switches the CVS off. Parameters
Description
Name
Name of the CVS device. String.
Script function/command: Sub CvsSwitchOff(Name)
6.6.29.10 Request CVS Requests the CVS.
AVL PUMA Open 2012 — Scripting in PUMA Open
237
238
Functions of the PUMA Open Script API
Parameters
Description
Name
Name of the CVS device. String.
Script function/command: Sub CvsRequest(Name)
6.6.29.11 Release CVS Releases the CVS. Parameters
Description
Name
Name of the CVS device. String.
Script function/command: Sub CvsRelease(Name)
6.6.29.12 Analyze modal exhaust gas Analyzes the modal exhaust. Parameters
Description
Name
Name of the CVS device. String.
Script function/command: Sub CvsModalExhaustAnalyze(Name)
6.6.29.13 Read bag Reads bag. Parameters
Description
Name
Name of the CVS device. String.
BagName
Name of analyzed bag. Enumeration (Air #1...Air #4, Exhaust #1...Exhaust #4).
Script function/command: Sub CvsAnalyzeBag(Name, BagName)
6.6.29.14 Standby Sets the CVS into Standby mode. Parameters
Description
Name
Name of the CVS device. String.
Script function/command: Sub CvsStandby(Name)
6.6.29.15 Pause Sets the CVS into Pause mode.
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
Parameters
Description
Name
Name of the CVS device. String.
Script function/command: Sub CvsPause(Name)
6.6.29.16 Run SubRoutine Executes a subroutine. Parameters
Description
Name
Name of the CVS device. String.
SubroutineName
Name of the subroutine to be executed. String.
Script function/command: Sub CvsRunScript(Name, SubroutineName)
6.6.29.17 Send command Sends an AK command to the device. Parameters
Description
Name
Name of the CVS device. String.
CommandString
Command string that is sent to the CVS. String.
Script function/command: Sub CvsSendString(Name, CommandString)
6.6.29.18 Stop Bag Analysis Stops flowing the bag contents to the emission bench. Parameters
Description
Name
Name of the CVS device. String.
Script function/command: Sub CvsStopAnalyzeBag(Name)
6.6.29.19 Set CVS to High Emissions Leads emissions into high-emission bags. Parameters
Description
Name
Name of the CVS device. String.
Script function/command: Sub CvsSetHighEmissionBags(Name)
AVL PUMA Open 2012 — Scripting in PUMA Open
239
240
Functions of the PUMA Open Script API
6.6.29.20 Set CVS to Low Emissions Leads emissions into low-emission bags. Parameters
Description
Name
Name of the CVS device. String.
Script function/command: Sub CvsSetLowEmissionBags(Name)
6.6.29.21 Read Bag no. Reads the bag with the number 1..16. Parameters
Description
Name
Name of the CVS device. String.
BagNum
Name of analyzed bag. Numeric value.
Script function/command: Sub CvsAnalyzeBagNumber(Name, BagNum)
6.6.30
Emission Bench Handler
6.6.30.1
Bench_Activate Starts the cyclic acquisition of measured data and device status for the virtual device and sets the linked line into Standby mode. In the case of a communication timeout, this function attempts to reconnect the emission bench. Script function/command: BenchExecuteScript "$(DEVICE)", "DoActivate", 0
6.6.30.2
Bench_Deactivate Stops the cyclic acquisition of measured data and device status for the virtual device and sets the linked line into Standby mode. If no other virtual device is active, emission bench control is stopped. Script function/command: BenchExecuteScript "$(DEVICE)", "DoDeactivate", 1
6.6.30.3
Bench_Command Sends the specified telegram string to the emission bench and the values from the device response telegram are read. Parameters
Bench_Measurement Starts the sample gas flow. Script function/command: BenchExecuteScript "$(DEVICE)", "DoStartPreMeasurement", 1
6.6.30.9
Bench_Span Starts the span gas flow. Script function/command: BenchExecuteScript "$(DEVICE)", "DoSpan", 1
6.6.30.10 Bench_Calibrate Starts the calibration gas flow. Script function/command: BenchExecuteScript "$(DEVICE)", "DoCalibrate", 1
6.6.30.11 Bench_Zero Starts the zero gas flow. Script function/command: BenchExecuteScript "$(DEVICE)", "DoZero", 1
6.6.30.12 Bench Services Enables/disables service settings and loads a specified script file for testing purposes. AVL PUMA Open 2012 — Scripting in PUMA Open
241
242
Functions of the PUMA Open Script API
Parameters
Description
Device
Name of device
Status
Shows the status acquisition in the RT I/O console window (0=Off, 1=On).
Values
Shows the measured value acquisition in the RT I/O console window (0=Off 1=On).
6.6.30.13 Bench_ConnectNew Example The GEM license authorizes you to use this activation object. Connects the virtual device to a new emission bench and a defined line. Parameters
Script function/command: Sub IncPerformMeasurement(Name)
6.6.31.3
Load Parameter File Loads a parameter file. Parameters
Description
Name
Name of IndiCom device. String.
FileName
Name of parameter file. String.
Script function/command: Sub IncLoadParameterFile(Name, FileName)
6.6.31.4
Save Rawdata Saves the raw data. Parameters
Description
Name
Name of IndiCom device. String.
Script function/command: Sub IncSaveRawData(Name)
6.6.31.5
Execute Script Executes a script. Parameters
Description
Name
Name of IndiCom device. String.
FileName
Name of script. String.
AVL PUMA Open 2012 — Scripting in PUMA Open
243
244
Functions of the PUMA Open Script API
Script function/command: Sub IncExecuteScript(Name, FileName)
6.6.31.6
Reconnect Re-establishes communication with the IndiCom. Parameters
Description
Name
Name of IndiCom device. String.
Script function/command: Sub IncReconnect(Name)
Information The command "Reconnect" is not synchronized. If used inside of a testrun please make sure that Reconnect is only called if INC_ERR = -1. Otherwise the "Reconnect" is not necessary. After the call to "Reconnect" wait until INC_ERR = 0.
6.6.31.7
Start Measurement Series Starts an Indicom measurement series. Parameters
Description
Name
Name of IndiCom device. String.
Script function/command: Sub StartMeasurementSeries(Name)
6.6.31.8
Stop Measurement Series Stops an Indicom measurement series. Parameters
Description
Name
Name of IndiCom device. String.
Script function/command: Sub StopMeasurementSeries(Name)
6.6.32
MCD3D
6.6.32.1
SelectDTCReadingScript Selects a new script for reading the fault code memory. The selected script is enabled until another script is selected or until the SYS parameters are reloaded. Parameters
Description
Name
Name of CDH device
ScriptName
Name of script.
MonitorTimeout
MonitorTimeout
Timeout
Timeout
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
Script function/command: Sub cdh_MCD3D_SelectDTCReadingScript (Name, ScriptName, MonitorTimeout, Timeout)
6.6.32.2
SelectMeasurementPlanNumber Selects a measurement plan number to be used for subsequent measurements. The selected measurement plan remains enabled until a different measurement plan is selected or the SYS parameters are reloaded. Parameters
Description
Name
Name of CDH device
MeasPlan
Number of measurement plan (1 - 4)
MonitorTimeout
MonitorTimeout
Timeout
Timeout
Script function/command: Sub cdh_MCD3D_SelectMeasPlanNumber (Name, MeasPlan, MonitorTimeout, Timeout)
6.6.32.3
SelectMeasurementScript Selects a new script as measurement script. The selected script is enabled until another script is selected or until the SYS parameters are reloaded. Parameters
Description
Name
Name of CDH device
ScriptName
Name of measurement script
MonitorTimeout
MonitorTimeout
Timeout
Timeout
Script function/command: Sub cdh_MCD3D_SelectMeasScript (Name, ScriptName, MonitorTimeout, Timeout)
6.6.32.4
Initialize Activates the initialization script for the diagnostic system. Parameters
Description
Name
Name of CDH device
MonitorTimeout
MonitorTimeout
Timeout
Timeout
Script function/command: Sub cdh_MCD3D_DiagnoseInit (Name, MonitorTimeout, Timeout)
6.6.32.5
ReadFaultCodeMemory Enables the diagnostic script for reading the fault code memory. Parameters
Description
Name
Name of CDH device
AVL PUMA Open 2012 — Scripting in PUMA Open
245
246
Functions of the PUMA Open Script API
Parameters
Description
MonitorTimeout
MonitorTimeout
Timeout
Timeout
Script function/command: Sub cdh_MCD3D_ReadDTC (Name, MonitorTimeout, Timeout)
6.6.32.6
ClearFaultCodeMemory Enables the diagnostic script for clearing the fault code memory. Parameters
Description
Name
Name of CDH device
MonitorTimeout
MonitorTimeout
Timeout
Timeout
Script function/command: Sub cdh_MCD3D_ClearDTC (Name, MonitorTimeout, Timeout)
6.6.32.7
ExecuteScript Activates a diagnostic script in synchronous mode. Parameters
Description
Name
Name of CDH device
ScriptName
Name of script.
ScriptParam
Parameter string evaluated by the script
MonitorTimeout
MonitorTimeout
Timeout
Timeout
Script function/command: Sub cdh_MCD3D_ExecuteScript (Name, ScriptName, ScriptParam, MonitorTimeout,_ Timeout)
6.6.32.8
ExecuteScriptAsynchron Activates a diagnostic script in asynchronous mode. Parameters
Description
Name
Name of CDH device
ScriptName
Name of script.
ScriptParam
Parameter string evaluated by the script
MonitorTimeout
MonitorTimeout
Timeout
Timeout
Script function/command: Sub cdh_MCD3D_ExecuteScriptAsynchron (Name, ScriptName, ScriptParam,_ MonitorTimeout,_ Timeout)
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
6.6.32.9
SetAllParameters Transfers all parameter values to the diagnostic system. Parameters
Description
Name
Name of CDH device
ModuleName
Name of module
MonitorTimeout
MonitorTimeout
Timeout
Timeout
Script function/command: Sub cdh_MCD3D_SetAllParameters(Name,ModuleName,MonitorTimeout,Timeout)
6.6.32.10 SetParameterValue Transfers the value of a parameter to the diagnostic system. Parameters
Description
Name
Name of CDH device
ModuleName
Name of module
ChannelName
Channel name
ParameterValue
Parameter value
MonitorTimeout
MonitorTimeout
Timeout
Timeout
Script function/command: Sub cdh_MCD3D_SetParameterValue (Name, ModuleName, ChannelName, ParameterValue,_ MonitorTimeout, Timeout)
6.6.32.11 StartMeasurementScript Selects a measurement script and a measurement plan number and starts the measurement script. The script is restarted cyclically as defined by the parameter "Script Cycles". If this parameter is set to zero, the script is restarted cyclically until "StopMeasurementScript" is executed. Parameters
Description
Name
Name of CDH device
ScriptName
Name of script.
MeasPlan
Number of measurement plan (1-4)
ScriptCycles
Number of cycles (0, 1-100)
MonitorTimeout
MonitorTimeout
Timeout
Timeout
Script function/command: Sub cdh_MCD3D_StartMeasScript (Name, ScriptName, MeasPlan, ScriptCycles,_ MonitorTimeout, Timeout)
6.6.32.12 StopAllScripts Stops all diagnostic scripts currently being executed.
AVL PUMA Open 2012 — Scripting in PUMA Open
247
248
Functions of the PUMA Open Script API
Parameters
Description
Name
Name of CDH device
MonitorTimeout
MonitorTimeout
Timeout
Timeout
Script function/command: Sub cdh_MCD3D_StopAllScripts (Name, MonitorTimeout, Timeout)
6.6.32.13 StopMeasurementScript Stops a measurement script although not all of the cycles have been run yet. Parameters
Description
Name
Name of CDH device
MonitorTimeout
MonitorTimeout
Timeout
Timeout
Script function/command: Sub cdh_MCD3D_StopMeasScript (Name, MonitorTimeout, Timeout)
6.6.32.14 StopScript Stops a diagnostic script currently being executed. Parameters
Description
Name
Name of CDH device
ScriptName
Name of script
MonitorTimeout
MonitorTimeout
Timeout
Timeout
Script function/command: Sub cdh_MCD3D_StopScript (Name, ScriptName, MonitorTimeout, Timeout)
6.6.33
Combustion Analysis System
6.6.33.1
GET CAS Status Retrieves the device status. Parameters
Description
Name
Name of device
Script function/command: CASGetAcqState(Name)
6.6.33.2
Get Summary Report Retrieves the LOG files of the most recent LOG operations from the host and saves them in files that can be read by CONCERTO and AVL Explorer.
Get Error Message Retrieves the error messages for the most recent commands transferred to the host and shows them. Parameters
Description
Name
Name of device
Script function/command: CASGetErrorMessage(Name)
6.6.33.4
Get Algorithm List Retrieves a list of all CAS algorithms used in PUMA. This list contains real-time and summary algorithms and is shown in the Algorithms section of the CAS driver. Parameters
Description
Name
Name of device
Script function/command: CASGetAlgList(Name)
6.6.33.5
Initialize CAS Starts the device and sets parameters, display mode and control mode. Parameters
Start CAS Starts the CAS device and the data acquisition. Information This command may not be executed until initialization has been completed. Parameters
Description
Name
Name of device
Mode
MONITOR, LOG
Script function/command: CASStartCAS(Name, mode)
6.6.33.8
Stop CAS Stops the data acquisition. Parameters
Description
Name
Name of device
Script function/command: CASStopCAS(Name)
6.6.33.9
Reset Connection Restores communication between the device and PUMA after an interruption. Parameters
Description
Name
Name of device
Script function/command: CASResetConnection(Name)
6.6.34
GDI
6.6.34.1
Re-initialize Device Re-establishes communication with the device. Parameters
Prepare Measurement Sets the device to HOLD, writes the result file onto the device's FILE channel, and sets the measurement time (50ms, 100ms, [WT1600 200ms|WT3000 250ms], 500ms, 1s, 2s, 5s, [WT3000]10s, [WT3000]20s). Parameters
Select Waveform Items Select waveform Items. The argument is a comma separated list of items. Possible entries: U1 .. U4; I1 .. I4; SPEED; TORQUE; MATH1; MATH2. Example: U1,U2,I1,I2,SPEED,TORQUE,MATH2. MATH1 and MATH 2 is only available on a WT3000. Parameters
Transfer Result Transfers the result file to the FTP server. Possible Options are BINary, ASCii, FLOat; Note that in NUM mode only supports ASCii, or FLOat! Parameters
6.6.36 OCSPS Start Acquisition Strta of cyclic data acquisition. Script function/command: Sub cdh_OCSPS_StartAcquisition
Stop Acquisition Stop of cyclic data acquisition. Script function/command: Sub cdh_OCSPS_StopAcquisition
AVL PUMA Open 2012 — Scripting in PUMA Open
257
258
Functions of the PUMA Open Script API
MessageDumpAfterReset Displays whole warning and alarm list after hardware reset. Script function/command: Sub cdh_OCSPS_MessageDumpAfterReset
6.7
Measurement Information Refering a string to an activation object instead of a normname, the parameters must be signed with "", to prevent the rising of a substition with the same normname.
6.7.1
Drive
6.7.1.1
StartDrive Starts Drive Measurement. Parameters
Description
Name
Name of the device
Monitor Timeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout Value
Script function/command: Sub cdh_DRIVE_StartDrive(Name, MonitorTimeout, Timeout)
6.7.1.2
Stop Drive Stops Drive Measurement and receives Drive Result Path. The Path is written to CDH Channel MeasurementPath. Parameters
Description
Name
Name of the device
Monitor Timeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout Value
Script function/command: Sub cdh_DRIVE_StopDrive(Name, MonitorTimeout, Timeout)
6.7.1.3
Pause Drive Pauses the Drive benchmark.
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
Parameters
Description
Name
Name of the device
Monitor Timeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout Value
Script function/command: Sub cdh_DRIVE_PauseDrive(Name, MonitorTimeout, Timeout)
6.7.1.4
Resume Drive Resumes the Drive benchmark. Parameters
Description
Name
Name of the device
Monitor Timeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout Value
Script function/command: Sub cdh_DRIVE_ResumeDrive(Name, MonitorTimeout, Timeout)
6.7.1.5
Store Result This AO stores the DRIVE Result as external reference in the Puma Result Database. Parameters
Description
Name
Name of the device
Monitor Timeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout Value
Script function/command: Sub cdh_DRIVE_StoreResult(Name, MonitorTimeout, Timeout)
6.7.2
Magic Evaluation
6.7.2.1
Start evalution Starts the evaluation tool. Activation is synchronized. Script function/command: Sub ClxStart(DeviceName)
6.7.2.2
Stop evaluation Stops the evaluation tool. Activation is synchronized. Parameters
Description
DeviceName
Name of device
AVL PUMA Open 2012 — Scripting in PUMA Open
259
260
Functions of the PUMA Open Script API
Script function/command: Sub ClxStop(DeviceName)
6.7.2.3
Reset evaluation Re-initializes the evaluation tool (resets the result matrix) and generates a new result name with a new time-stamp. Activation is synchronized. Parameters
Description
DeviceName
Name of device
Script function/command: Sub ClxReset(DeviceName)
6.7.2.4
Store evaluation Stores the result delivered by the evaluation tool. Activation is synchronized. Parameters
Description
DeviceName
Name of device
Script function/command: Sub ClxStore(DeviceName)
6.7.2.5
Get result name Writes the current name of the evaluation result to the normname that was selected with parameter ResultName. Parameters
Description
DeviceName
Normname that holds the result value.
Script function/command: Function ClxGetResultName(DeviceName)
Example ChnSet"RESASC1", ClxGetResultName("TALClass_2dim")
Script function/command: Sub StartStorableEvaluation(DeviceName)
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
6.7.3
Recorder
6.7.3.1
Store Saves the current recorder result in the database. Parameters
Description
Name
Name of recorder.
Script function/command: Sub RecStore(Name)
6.7.3.2
Store (Range) Saves the selected range of the current recorder result in the database. Parameters
Description
Name
Name of recorder. String.
MinT
The range of the stored recorder results starts with this value (in s). Numeric value or expression string.
MaxT
The range of the stored recorder result ends with this value (in s). Numeric value or expression string.
Script function/command: Sub RecStoreRange(Name, MinT, MaxT)
6.7.3.3
StoreAs Stores the current result under the specified name. Parameters
Description
Name
Name of recorder. String.
ResultName
Name of result. String.
If the assigned string is a normname, the normname's value will be used as the new result name. The parameter "Result Name" may contain "$c(ChannelName).v" entries. If these entries are detected at runtime, they will be replaced by the online values of the specified channels and the resulting string will then be used as the new result name.
Script function/command: Sub RecStoreAs(Name, ResultName)
AVL PUMA Open 2012 — Scripting in PUMA Open
261
262
Functions of the PUMA Open Script API
Example RecStoreAs "RecorderName" "myRec_$c(SPEED).v_$c(TORQUE).v"
If the value for SPEED is 2366.7765 and the value for TORQUE is 109.8794, the result name will be "myrec_2366,7765_109,8794". Thus it makes sense to use demand values instead of online values or to use auxiliary values.
6.7.3.4
Comment Modifies the default comment attributes of a recorder result. Set after the recorder result has been completed, it will be used in the next store operation. Parameters
Description
Name
Name of recorder. String.
Comment
Comment accompanying the recorder result. String.
If the assigned string is a normname, the normname's value will be used as the new result name. The parameter "Comment" may contain "$c(ChannelName).v" entries. If these entries are detected at runtime, they will be replaced by the online values of the specified channels and the resulting string will then be used as the new comment.
Script function/command: Sub RecComment(Name, Comment)
6.7.3.5
OpenNew Opens a new recorder result (either in the database or on the file system) using the specified result name. The resulting structure can be filled in with a sequence of subsequent "StoreRange" requests. The structure is closed explicitly with a "Close" request or implicitly with the next "StoreAs", "OpenNew" or "Start" request. Parameters
Description
Name
Name of recorder. String.
ResultName
Name of result. String.
Script function/command: Sub RecOpenNew(Name, ResultName)
6.7.3.6
Close Closes an open result structure of the specified recorder. Parameters
Description
Name
Name of recorder. String.
Script function/command: Sub RecClose(Name)
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
6.7.3.7
Get Recording Time Retrieves the specified recording time and provides it via the result channel. Parameters
Description
Name
Name of recorder.
Script function/command: Function RecGetRecordingTime(Name)
6.7.3.8
Get Remaining Time Retrieves the remaining recording time and provides it via the result channel. Information This function is only available for a recorder that has already been started in linear mode. Parameters
Description
Name
Name of recorder.
Script function/command: Function RecGetRemainingTime(Name)
6.7.3.9
Start Activates recording with the selected recorder. Parameters
Description
Name
Name of recorder. String.
Script function/command: Sub RecStart(Name)
6.7.3.10
Stop Stops recording with the selected recorder. Parameters
Description
Name
Name of recorder. String.
Script function/command: Sub RecStop(Name)
6.7.3.11
Trigger Activates post-sampling with the selected recorder (Ringbuffer mode). Parameters
Description
Name
Name of recorder. String.
Script function/command: AVL PUMA Open 2012 — Scripting in PUMA Open
263
264
Functions of the PUMA Open Script API
Sub RecTrigger(Name)
6.7.3.12
Calculate 'Min' Determines the minimum value of the indicated channel within the given range. Parameters
Description
Name
Name of the recorder whose result should be evaluated. String.
MinT
Lower range of the recorder result to be evaluated in [s].
MaxT
If necessary, the given value is automatically corrected to the lower limit.
Upper range of the recorder result to be evaluated in [s].
Channel
Numeric value or expression string.
Numeric value or expression string. If necessary, the given value is automatically corrected to the actual upper limit.
Name of the channel that holds the evaluation result.
Script function/command: Function RecResultMin(Name, MinT, MaxT, Channel)
Example ChnSet "RESCHA40", RecResultMin("MyRCD", 0, 100, "SPEED")
6.7.3.13
Calculate 'Max' Determines the maximum value of the indicated channel within the given range. Parameters
Description
Name
Name of the recorder whose result should be evaluated. String.
MinT
Lower range of the recorder result to be evaluated in [s].
MaxT
If necessary, the given value is automatically corrected to the lower limit.
Upper range of the recorder result to be evaluated in [s].
Channel
Numeric value or expression string.
Numeric value or expression string. If necessary, the given value is automatically corrected to the actual upper limit.
Name of the channel that holds the evaluation result.
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
Script function/command: Function RecResultMax(Name, MinT, MaxT, Channel)
Example ChnSet "RESCHA40", RecResultMax("MyRCD", 0, 100, "SPEED")
6.7.3.14
Calculate 'Avg' Determines the average value of the indicated channel within the given range. Parameters
Description
Name
Name of the recorder whose result should be evaluated. String.
MinT
Lower range of the recorder result to be evaluated in [s].
MaxT
If necessary, the given value is automatically corrected to the lower limit.
Upper range of the recorder result to be evaluated in [s].
Channel
Numeric value or expression string.
Numeric value or expression string. If necessary, the given value is automatically corrected to the actual upper limit.
Name of the channel that holds the evaluation result.
Script function/command: Function RecResultAvg(Name, MinT, MaxT, Channel)
Example ChnSet "RESCHA40", RecResultAvg("MyRCD", 0, 100, "SPEED")
6.7.3.15
Calculate 'Int' Determines the integral value of the indicated channel within the given range. Parameters
Description
Name
Name of the recorder whose result should be evaluated. String.
MinT
Lower range of the recorder result to be evaluated in [s].
Numeric value or expression string. If necessary, the given value is automatically corrected to the lower limit.
AVL PUMA Open 2012 — Scripting in PUMA Open
265
266
Functions of the PUMA Open Script API
Parameters
Description
MaxT
Upper range of the recorder result to be evaluated in [s].
Channel
Numeric value or expression string. If necessary, the given value is automatically corrected to the actual upper limit.
Name of the channel that holds the evaluation result.
Script function/command: Function RecResultInt(Name, MinT, MaxT, Channel)
Example ChnSet "RESCHA40", RecResultInt("MyRCD", 0, 100, "SPEED")
6.7.3.16
Calculate 'T(Min)' Determines the time for the minimum value of the channel within the given range. Parameters
Description
Name
Name of the recorder whose result should be evaluated. String.
MinT
Lower range of the recorder result to be evaluated in [s].
MaxT
If necessary, the given value is automatically corrected to the lower limit.
Upper range of the recorder result to be evaluated in [s].
Channel
Numeric value or expression string.
Numeric value or expression string. If necessary, the given value is automatically corrected to the actual upper limit.
Name of the channel that holds the evaluation result.
Script function/command: Function RecResultMinT(Name, MinT, MaxT, Channel)
Example ChnSet "RESCHA40", RecResultMinT("MyRCD", 0, 100, "SPEED")
6.7.3.17
Calculate 'T(Max)' Determines the time for the maximum value of the channel within the given range. AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
Parameters
Description
Name
Name of the recorder whose result should be evaluated. String.
MinT
Lower range of the recorder result to be evaluated in [s].
MaxT
If necessary, the given value is automatically corrected to the lower limit.
Upper range of the recorder result to be evaluated in [s].
Channel
Numeric value or expression string.
Numeric value or expression string. If necessary, the given value is automatically corrected to the actual upper limit.
Name of the channel that holds the evaluation result.
Script function/command: Function RecResultMaxT(Name, MinT, MaxT, Channel)
Example ChnSet "RESCHA40", RecResultMaxT("MyRCD", 0, 100, "SPEED")
6.7.3.18
Calculate 'Std' Determines the standard deviation for the indicated channel within the given range. Parameters
Description
Name
Name of the recorder whose result should be evaluated. String.
MinT
Lower range of the recorder result to be evaluated in [s].
MaxT
If necessary, the given value is automatically corrected to the lower limit.
Upper range of the recorder result to be evaluated in [s].
Channel
Numeric value or expression string.
Numeric value or expression string. If necessary, the given value is automatically corrected to the actual upper limit.
Name of the channel that holds the evaluation result.
Script function/command: Function RecResultStd(Name, MinT, MaxT, Channel)
6.7.3.19
Take SnapShot Takes a new snapshot and stores it internally. AVL PUMA Open 2012 — Scripting in PUMA Open
267
268
Functions of the PUMA Open Script API
Information All logpoints and the recorder result are delected when the recorder is started again or the recorder parameters are reloaded.
Information When saving the individual values of the logpoint channels, their status is also taken into account. If a status value is invalid (e.g. overflow or "sensor broken"), the value 1e10 is saved in the database for this channel.
Information Logpoint recordings will only be stored in the database or file when the next save request is made. Parameters
Description
Name
Name of recorder. String.
Script function/command: Sub RecTakeSnapShot(Name)
6.7.3.20
Delete SnapShot Deletes a snapshot stored internally in the recorder. Information All recorded logpoints are deleted as soon as the recorder is restarted.
Information This function does not affect logpoint recordings stored in the database. Parameters
Description
Name
Name of recorder. String.
Index
Index of snapshot that is to be deleted. Specifying the value -1 will delete all snapshots.
Script function/command: Sub RecDeleteSnapShot(Name, Index)
6.7.3.21
SetExcludeFromArchiving This functions sets the 'Exclude from archiving' attribute of the current recorder result.
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
Parameters
Description
Device
Name of the device
Excluded
Determines if the result is enabled for archiving or not. 0…not excluded from archiving 1…excluded from archiving Data type: float or a NormName of a numerical datatype, or an expression
Reinitialize Devices Reconnects devices that have an error status. Parameters
Description
Name
Name of measurement request. String.
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub MrqReinitializeDevices(Name, MonitorTimeout, Timeout)
6.7.4.2
Store results Stores measured results. Parameters
Description
Name
Name of measurement request. String.
Key
Can be used optionally to overwrite the key defined in the MRQ. String (use of normnames possible).
WaitForCompletion
0 .. (execution in synchronous mode) 1 .. (execution in asynchronous mode)
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub MrqStoreResults(Name, Key, WaitForCompletion, MonitorTimeout, Timeout)
Example MrqStoreResults "MRQ1", "", 0,0 or MrqStoreResults "MRQ2, "FL", 1, 10
AVL PUMA Open 2012 — Scripting in PUMA Open
271
272
Functions of the PUMA Open Script API
6.7.4.3
Prepare measurement Makes all participating devices ready for measurement. Parameters
Description
Name
Name of measurement request. String.
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub MrqPrepareMeasurementPhase(Name, MonitorTimeout, Timeout)
Example MrqPrepareMeasurementPhase "MRQ1", 0,0 or MrqPrepareMeasurementPhase "MRQ2, 1, 5.5
6.7.4.4
Prepare measurement extended Makes all participating devices ready for measurement. Parameters
Description
Name
Name of measurement request. String.
MeasTime
Can be used optionally to overwrite the time defined in the MRQ. Float (use of normnames possible).
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub MrqPrepareMeasurementPhaseEx(Name, MeasTime, MonitorTimeout, Timeout)
Example MrqPrepareMeasurementPhaseEx "MRQ1", 5, 0,0 or MrqPrepareMeasurementPhaseEx "MRQ2", 5, 1, 5.5
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
6.7.4.5
Perform measurement Performs measurements with all participating devices. Parameters
Description
Name
Name of measurement request. String.
MeasTime
Can be used optionally to overwrite the time defined in the MRQ. Float (use of normnames possible).
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub MrqMeasurementPhase(Name, MeasTime, MonitorTimeout, Timeout)
Example MrqMeasurementPhase "MRQ1", "", 1, 100 or MrqMeasurementPhase "MRQ2", "MEAS_TIM", 1, 120
6.7.4.6
Cancel measurement Aborts the measurement. Parameters
Description
Name
Name of measurement request. String.
Script function/command: Sub MrqInterrupt(Name)
6.7.4.7
Post-processing measurement Measurement postprocessing for all participating devices. Parameters
Description
Name
Name of measurement request. String.
WaitForCompletion
0 .. (execution in synchronous mode) 1 .. (execution in asynchronous mode)
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub MrqPostMeasurementPhase(Name, WaitForCompletion, MonitorTimeout, Timeout)
Example MrqPostMeasurementPhase "MRQ1", 0, 0 or MrqPostMeasurementPhase "MRQ2", 1, 13.4
AVL PUMA Open 2012 — Scripting in PUMA Open
273
274
Functions of the PUMA Open Script API
6.7.4.8
Steady state measurement with storing Performs a steady-state measurement and stores the results. Parameters
Description
Name
Name of measurement request. String.
MeasTime
Can be used optionally to overwrite the time defined in the MRQ. Float (use of normnames possible).
Key
Can be used optionally to overwrite the key defined in the MRQ. String (use of normnames possible).
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub MrqMeasureAndStore(Name, MeasTime, Key, MonitorTimeout, Timeout)
Example MrqMeasureAndStore "MRQ1", 30, "", 1, 33 or MrqMeasureAndStore "MRQ2, 60, "VL", 1, 60 or MrqMeasureAndStore "MyMRQ", "MEAS_TIM", "MEASKEY", 1, 60
6.7.4.9
Steady state measurement Performs a steady-state measurement without storing the results. Parameters
Description
Name
Name of measurement request. String.
MeasTime
Can be used optionally to overwrite the time defined in the MRQ. Float (use of normnames possible).
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub MrqMeasure(Name, MeasTime, MonitorTimeout, Timeout)
Example MrqMeasure "MRQ1", 30, "", 1, 33 or MrqMeasure "MRQ2, 60, "VL", 1, 60 or MrqMeasure "MyMRQ", "MEAS_TIM", "MEASKEY", 1, 60
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
6.7.4.10
Exclude measurement device Excludes measuring device(s) from subsequent measurements. With one command, only one device can be excluded. Parameters
Description
DeviceName
Name of the measurement device that is to be excluded from the measurement.
Script function/command: Sub MrqExcludeDevice(DeviceName)
6.7.4.11
Include measurement device Includes measuring device(s) in subsequent measurements. With one command, only one device can be included. Parameters
Description
DeviceName
Name of the measurement device that is to be included in the measurement.
Script function/command: Sub MrqIncludeDevice(DeviceName)
6.7.4.12
Store snapshot results Stores the snapshot values of all channels in the currently active MRQ. The storage formulas are calculated before storage. Parameters
Description
Name
Name of measurement request. String.
Key
Can be used optionally to overwrite the key defined in the MRQ. String (use of normnames possible).
WaitForCompletion
0 .. (execution in synchronous mode) 1 .. (execution in asynchronous mode)
MonitorTimeout
Time-out monitoring by using the value: 0=no monitoring, 1=monitoring
Timeout
Timeout
Script function/command: Sub MrqSnapshot(Name, Key, WaitForCompletion, MonitorTimeout, Timeout)
Example MrqStoreSnapshot "MRQ1", "AC", 0, 0
6.7.4.13
Select MRQ An MRQ can be selected and loaded from the BSQ/SSQ without being executed. It is possible to overwrite the measuring time defined in the MRQ by using the parameter MEASTIME. The MRQ with the new measuring time can be used for PUMA 5 measurements (MEAS*) at a later time.
AVL PUMA Open 2012 — Scripting in PUMA Open
275
276
Functions of the PUMA Open Script API
Parameters
Description
Name
Name of selected MRQ.
MeasTime
Measuring time
Script function/command: Sub MrqSelect(Name, MeasTime)
Example MrqSelect "MRQ1", "MEAS_TIM"
6.7.4.14
Update the loaded Mrq with buffer values Activates the parameters in the current MRQ as defined via the buffer variables. The next measurement activation will use these parameters. Script function/command: Sub MrqUpdateFromBuffer
6.7.4.15
Start integral measurement Starts an integral measurement with all participating devices. The measuring time specified in the MRQ is ignored. For this type of measurement, the participating devices must support integrators that can be read by the system. Parameters
Description
DeviceName
Name of MRQ. String. If string is empty, the currently loaded MRQ is used.
WaitForCompletion
0 .. (execution in synchronous mode) 1 .. (execution in asynchronous mode)
Script function/command: Sub MrqStarIntegralMeasurement(DeviceName, WaitForCompletion)
6.7.4.16
Stop integral measurement Stops the current integral measurement. Waits until all results have been written to system channels and then saves the snapshot values. Parameters
Description
WaitForCompletion
0 .. (execution in synchronous mode) 1 .. (execution in asynchronous mode)
Script function/command: Sub MrqStopIntegralMeasurement(WaitForCompletion)
6.7.4.17
Get integrator values Reads the integral values from the most recent interval for all participating devices and saves the results in the database via "Store snapshot results".
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
Parameters
Description
WaitForCompletion
0 .. (execution in synchronous mode) 1 .. (execution in asynchronous mode)
Script function/command: Sub MrqGetIntegrators(WaitForCompletion)
6.7.4.18
Stop interval Instructs all participating devices to save their temporary integral values while integrators continue running. Parameters
Description
WaitForCompletion
0 .. (execution in synchronous mode) 1 .. (execution in asynchronous mode)
Script function/command: Sub MrqStopInterval(WaitForCompletion)
6.7.4.19
Exclude list of devices The devices defined in the list will be excluded from the next measurement. Device names must be separated by commas. The list can be passed on using ASCII normnames. All devices that are not defined in this list will be included. Parameters
Description
DeviceList
List of the devices that are to be excluded, separated by ’,’. It is possible to use normnames.
Script function/command: Sub MrqExcludeListOfDevices(DeviceList)
Example MrqExcludeListofDevices "AVL753,AVL403"
6.7.4.20
Include list of devices The devices defined in the list will be included in the next measurement. Device names must be separated by commas. The list can be passed on using ASCII normnames. All devices that are not defined in this list will be excluded. Parameters
Description
DeviceList
List of the devices that are to be included, separated by ’,’. It is possible to use normnames.
Script function/command: Sub MrqIncludeListOfDevices(DeviceList)
Example MrqIncludeListofDevices "AVL753,AVL403"
AVL PUMA Open 2012 — Scripting in PUMA Open
277
278
Functions of the PUMA Open Script API
6.7.5
External Recorder
6.7.5.1
Start Sends a Start command to an external recorder. Script function/command: Sub EcrStart
6.7.5.2
Stop Sends a Stop command to an external recorder. Script function/command: Sub EcrStop
6.7.5.3
Initialize Sends an Initialize command to an external recorder. Script function/command: Sub ExrInit
6.8
Online Analysis
6.8.1
Concerto
6.8.1.1
Execute Macro Executes the specified CONCERTO macro. Execution may be controlled at runtime by means of an additional general-purpose input parameter. .
Parameters
Description
ChannelName
Name of the channel.
MacroName
Name of the macro file to be executed by CONCERTO including path name and extension.
Parameter
String.
User-defined parameter that enables you to monitor macro execution during runtime.
Script function/command: Function CncExecuteMacro(ChannelName, MacroName, Parameter)
Example ChnSet "RESCHA40", CncExecuteMacro("ChannelName", "D:\MyMacro.mac", "DoItThatWay")
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
6.8.1.2
Execute Macro (extended) Executes the specified CONCERTO macro. If a normname is defined as parameter for the macro, the value of the normname will be used as input parameter. Parameters
Description
ChannelName
Name of the channel.
MacroName
Name of the macro file to be executed by CONCERTO including path name and extension.
Parameter
String.
User-defined parameter that enables you to monitor macro execution during runtime.
Script function/command: Function CncExecuteMacroEx(ChannelName, MacroName, Parameter)
6.8.1.3
Hide Concerto Hides CONCERTO. Script function/command: Sub CncHide()
6.8.1.4
Show Concerto Displays CONCERTO. Script function/command: Sub CncShow()
6.8.1.5
CncLoadLayout Loads the specified CONCERTO layout. Parameters
Description
LayoutName
Name of layout file. String.
Script function/command: Sub CncLoadLayout(LayoutName)
Example CncLoadLayout ("messpkt.cly")
6.8.1.6
CncShowLayout Loads and displays the specified CONCERTO layout. Parameters
Description
LayoutName
Name of layout file. String.
Script function/command: Sub CncShowLayout(LayoutName)
Stop Stops ECE or FDP. Script function/command: LcsVTOLStop
6.8.4
Regression Analysis
6.8.4.1
Start Application Starts the application. Parameters
Description
SyncNN
Normname. String.
Timeout
Time-out.
Script function/command: Sub RgrStartApplication(SyncNN, Timeout)
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
6.8.4.2
Analyze Starts analysis. Parameters
Description
SyncNN
Normname. String.
Timeout
Time-out.
Script function/command: Sub RgrAnalyze(SyncNN, Timeout)
6.8.5
Result Access
6.8.5.1
Create new test results Enables you to create a new version of the test diary in MANUAL mode or outside an automatic test run. Performing this function in MANUAL mode opens the following sequence of dialogs, which enables you to make all necessary memory settings.
End Dialog
Beginning Dialog
Storage Dialog
If the function is performed in AUTOMATIC mode, no dialog will open, only a new test version based on the most recent definitions will be created. Script function/command: Sub ResNewTestVersion()
6.8.5.2
Result Mirroring (DB) Saves file-based results on system channels.
AVL PUMA Open 2012 — Scripting in PUMA Open
281
282
Functions of the PUMA Open Script API
Parameters
Description
ChannelMappingTable
Name of the list of channel mappings to be used. An entry of the selected data records is mapped to the automation system if its name matches one of the entries in the channel table.
Measurement
String. If a Channel Mapping Table has been defined, all channels that do not match are not mirrored. If no Channel Mapping Table has been defined, all channels of the selected measurement are replicated. Channels in the automation system that have a cyclic provider are not mirrored. Data are always copied to the online part of a channel (i.e. the base subvariable).
Name of the measurement in the database. If no structured name is specified, the following rules apply:
It is assumed that the referenced measurement is part of the current test and the current test series! The current project is automatically determined by the test series. If several versions of the same measurement exist, the most recent one is selected. Valid structured measurement names include: Measurement[.MeasurementVersion] Test[.TestVersion]\Measurement[.MeasurementVersion] TestSeries\Test[.TestVersion]\Measurement[.MeasurementVersion]
ByVal StartRecord
You can select a record as the first one to be replicated.
ByVal NumberOfRecords
String.
Numeric value or expression string.
Indicates whether only the latest single record or the most recent n records are replicated. If fewer records exist than have been specified, they will be ignored.
Numeric value or expression string. Negative values indicate all records starting with the one specified in the 'StartRecord' attribute.
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
Parameters
Description
ByVal Direction
The StartRecord attribute is interpreted depending on this attribute. If it is set to 'From Top', the index starts at '0' and refers to the most recent record. The previous record is given the number '1', etc. If a record does not exist, no value is replicated. If the attribute is set to 'From Bottom', the index starts at '0' and refers to the first record, '1' to the second record, etc.
DelayTime
0...from bottom; 1 .. from top
If more than one record is replicated, the specified delay time delays the replication of subsequent records.
Result Mirroring (File) Activates data replication back to the automation system. The data will be output on a file basis in the XML file format, as shown in the following example:
To check replicated records, channels that have been found in the selected measurement can be written to other channels or ignored. If more than one record is replicated, the specified delay time delays the replication of subsequent records.
AVL PUMA Open 2012 — Scripting in PUMA Open
283
284
Functions of the PUMA Open Script API
Parameters
Description
ChannelMappingFile
Name of the file that contains the list of channels being used. An entry of the selected data records is mapped to the automation system if its name matches one of the entries in the channel table.
DataFile
String.
Numeric value or expression string.
Numeric value or expression string. Negative values indicate all records starting with the one specified in the 'StartRecord' attribute.
0...from bottom; 1 .. from top
If more than one record is replicated, the specified delay time delays the replication of subsequent records.
DeleteAfterUsage
Data are always copied to the online part of a channel (i.e. the base subvariable).
The StartRecord attribute is interpreted depending on this attribute. If it is set to 'From Top', the index starts at '0' and refers to the most recent record. The previous record is given the number '1', etc. If a record does not exist, no value is replicated. If the attribute is set to 'From Bottom', the index starts at '0' and refers to the first record, '1' to the second record, etc.
DelayTime
Channels in the automation system that have a cyclic provider are not mirrored.
Indicates whether only the latest single record or the most recent n records are replicated. If fewer records exist than have been specified, they will be ignored.
Direction
If no Channel Mapping Table has been defined, all channels of the selected measurement are replicated.
You can select a record as the first one to be replicated.
NumberOfRecords
If a Channel Mapping File has been defined, all channels that do not match are not mirrored.
Name (including path information) of the file that contains data in XML format.
StartRecord
String.
Numeric value [ms]
Indicates whether or not to delete the file after use.
0...no; 1...yes
Script function/command:
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
Sub ResMirrorFileEx(ChannelMappingFile, DataFile, StartRecord, _ NumberOfRecords, Direction, DelayTime, DeleteAfterUsage)
Example ResMirrorFileEx "D:\Mapping.xml", "D:\Result\Data.Res", 0, -1, 0, 250, 0
6.8.5.4
Result Mirroring (Directory) Stores all the file-based data saved within a specified folder to system channels. Parameters
Description
ChannelMappingFile
Name of the file that contains the list of channels being used. An entry of the selected data records is mapped to the automation system if its name matches one of the entries in the channel table.
DirectoryName
Channels in the automation system that have a cyclic provider are not mirrored. Data are always copied to the online part of a channel (i.e. the base subvariable).
String.
String. If no extension is defined, all files of the specified folder will be selected.
You can select a record as the first one to be replicated.
NumberOfRecords
If no Channel Mapping Table has been defined, all channels of the selected measurement are replicated.
Only files with the specified extension will be considered.
StartRecord
If a Channel Mapping Table has been defined, all channels that do not match are not mirrored.
Folder that should contain the data in the XML format.
FileExtension
String.
Numeric value or expression string.
Indicates whether only the latest single record or the most recent n records are replicated. If fewer records exist than have been specified, they will be ignored.
Numeric value or expression string. Negative values indicate all records starting with the one specified in the 'StartRecord' attribute.
AVL PUMA Open 2012 — Scripting in PUMA Open
285
286
Functions of the PUMA Open Script API
Parameters
Description
Direction
The StartRecord attribute is interpreted depending on this attribute. If it is set to 'From Top', the index starts at '0' and refers to the most recent record. The previous record is given the number '1', etc. If a record does not exist, no value is replicated. If the attribute is set to 'From Bottom', the index starts at '0' and refers to the first record, '1' to the second record, etc.
DelayTime
If more than one record is replicated, the specified delay time delays the replication of subsequent records.
DeleteAfterUsage
0...from bottom; 1 .. from top
Numeric value.
Indicates whether or not to delete the file after use.
Example ResMirrorDirEx "D:\Mapping.xml", "D:\Result\", "Res", 0, -1, 0, 250, 0
6.8.5.5
Store recovery data Stores the internal measurement ($1..$9) in the test cell diary or engine diary (depending on the measurement name). Parameters
Description
Key
Name of measurement ($1..$9). String.
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
Script function/command: Sub ResStoreRecoveryData(Key)
6.8.5.6
Restore recovery data Reads the internal measurement ($1..$9) from the test cell diary or engine diary and updates the relevant system channels. Parameters
Description
Key
Name of measurement ($1..$9). String.
Script function/command: Sub ResRestoreRecoveryData(Key)
6.8.5.7
Create new measurement version Closes an active measurement version (default name "D") and creates a new version. Script function/command: Sub ResNewMeasurementVersion()
6.8.5.8
GetStorageDefinition Retrieves information about one of the various AODS test entities that are associated with the current test bed (i.e. test bed diary), the current unit under test (i.e. engine diary) or the current test. It returns a DB-ID as well as some descriptive information. Parameters
Description
DiaryType
Identifies the specified test run that is being searched for.
There are PO Script API functions that you can use to access existing measured results individually. These functions allow measurements to be attached and iterators to be installed upon them. Sub ResAccessAttach(Key, MeasurementName) Sub ResAccessDetach(Key) Function ResAccessGetRecordCnt(Key) Function ResAccessGetChannelList(Key) Sub ResAccessSetPosition(Key, Position) Function ResAccessGetPosition(Key) Function ResAccessNext(Key, NumberOfRecords)
Example:
Similar to the example given in the "Scripting in BSQ/SSQ" manual in which a set of operating points is retrieved from an Excel sheet, you can retrieve operating points from a reference measurement in the database using the set of functions described above. The example given below accesses a "D" measurement within the "MyReference" test run of the "MyReferenceSeries" test series within the "AVL" project. It maps certain measurement channels of the measurement in the database to arbitrary channels in the online system. Information For details, refer to the manual "Scripting in BSQ/SSQ", chapter "Application Example". The BSQ structure is similar to the example given in the documentation "Scripting in BSQ/SSQ". A script context is used for this which also matches the example in the manual Scripting in BSQ/SSQ.
Explanation of functions
Script function "Setup": MyOperatingPoints.Setup MeasurementName, Mapping
Script function "GetNext": ' Just give the replication to VDOS some time CmnWait 0.250
Dim rowNum rowNum = ChnGet(ChannelName) MyOperatingPoints.GetNext rowNum
Script function "Get Count": ChnSet ChannelName, MyOperatingPoints.Count
' Just give the replication to VDOS some time CmnWait 0.250
Script context: Const MeasurementKey = "MyOperatingPointsODS" Dim MyOperatingPoints
'''' ' Initialize is called during the transition from MONITOR to ' MANUAL automatically.
It creates an object that
' iterates over the set values.
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
'''' Public Sub Initialize() Set MyOperatingPoints = New OperatingPoints End Sub
'''' ' Terminate is called during the transition from MANUAL to ' MONITOR automatically. '''' Public Sub Terminate() Set MyOperatingPoints = Nothing End Sub
'''' ' Class 'OperatingPoints' operates as an iterator. '''' Class OperatingPoints
Private Sub Class_Initialize() TheNumberOfChannels = 0 End Sub
Private Sub Class_Terminate() '''' ' Free all references '''' On Error Resume Next ResAccessDetach MeasurementKey On Error Goto 0 End Sub
'''' ' Retrieve the actual number of operating points '''' Public Property Get Count Count = ResAccessGetRecordCnt(MeasurementKey) End Property
'''' ' Attach the specified measurement, retrieve the channel list, ' and build up the mapping table '''' Public Sub Setup(MeasurementName, Mapping) ResAccessAttach MeasurementKey, MeasurementName
Dim MaxRow MaxRow = ResAccessGetRecordCnt(MeasurementKey) PoiSendMessage 1, MaxRow & " operating points retrieved from measurement '" & _ MeasurementName & "'", 0 End Sub
'''' ' Read the next set of values and write ' them to the associated Normnames. '''' Public Sub GetNext(Row) Dim MaxRow MaxRow = ResAccessGetRecordCnt(MeasurementKey) If Row < 1 Or Row > MaxRow Then PoiSendMessage 1, "Operating point index has to be within range [1," & MaxRow & "]", 0 Exit Sub Else ResAccessSetPosition MeasurementKey, Row End If
Dim ChannelValueArray ChannelValueArray = ResAccessNext(MeasurementKey, 1)
Dim ChannelValueList() ReDim ChannelValueList(UBound(ChannelValueArray,2)) Dim i For i = 0 To UBound(ChannelValueArray,2) ChannelValueList(i) = ChannelValueArray(0,i) Next
Dim NumberOfChannels NumberOfChannels = UBound(ChannelValueList,1) + 1 If Not NumberOfChannels = TheNumberOfChannels Then '''' ' The number of channels in the measurement has changed -> ' reconfiguration of the mapping table is necessary '''' ChangeMappingTableIndex ResAccessGetChannelList(MeasurementKey) TheNumberOfChannels = NumberOfChannels End If '''' ' Provide value information and put it out! '''' ChangeMappingTableValue ChannelValueList 'DebugMappingTable
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
OutputMappingTable
PoiSendMessage 1, "OP " & Row & " activated!" , 0 End Sub
Private Sub BuildMappingTable(Mapping, ChannelList) '''' ' The mapping table has the following structure: ' ' [measurement channel name;output channel name;index into measurement; ' current value to be output] '''' Dim MappingTable MappingTable = Split(Mapping, ";") ReDim Preserve TheMappingTable(UBound(MappingTable, 1),3)
Dim i,j For i = 0 To UBound(MappingTable, 1) Dim ChannelPair ChannelPair = Split(MappingTable(i), ">") If UBound(ChannelPair,1) > 0 Then TheMappingTable(i,0) = ChannelPair(0) TheMappingTable(i,1) = ChannelPair(1) Else TheMappingTable(i,0) = ChannelPair(0) TheMappingTable(i,1) = ChannelPair(0) End If TheMappingTable(i,2) = -1 TheMappingTable(i,3) = 0 Next
For i = 0 To UBound(TheMappingTable, 1) For j = 0 To UBound(ChannelList,1) If TheMappingTable(i,0) = ChannelList(j) Then TheMappingTable(i,2) = j Exit For End If Next Next
'DebugMappingTable End Sub
Private Sub ChangeMappingTableIndex(ChannelList) '''' ' If the list of measurement changes dynamically their indices ' have to be reconfigured. '''' Dim i,j For i = 0 To UBound(TheMappingTable, 1)
AVL PUMA Open 2012 — Scripting in PUMA Open
291
292
Functions of the PUMA Open Script API
TheMappingTable(i,2) = -1 TheMappingTable(i,3) = 0 For j = 0 To UBound(ChannelList,1) If TheMappingTable(i,0) = ChannelList(j) Then TheMappingTable(i,2) = j Exit For End If Next Next
'DebugMappingTable End Sub
Private Sub ChangeMappingTableValue(ValueList) '''' ' According to the specified indices, entries in the value list ' are taken and stored in the mapping table. '''' Dim i For i = 0 To UBound(TheMappingTable, 1) If TheMappingTable(i,2) >= 0 Then TheMappingTable(i,3) = ValueList(TheMappingTable(i,2)) Else TheMappingTable(i,3) = Empty End If Next
'DebugMappingTable End Sub
Private Sub DebugMappingTable() Dim i, str For i = 0 To UBound(TheMappingTable, 1) str = str & TheMappingTable(i,0) & " -> " & _ TheMappingTable(i,1) & " (" & TheMappingTable(i,2) & "): " If IsEmpty(TheMappingTable(i,3)) Then str = str & "Empty" & vbCrLf ElseIf TheMappingTable(i,3) >= 1E10 Then str = str & "1E10" & vbCrLf Else str = str & TheMappingTable(i,3) & vbCrLf End If Next MsgBox str End Sub
Private Sub OutputMappingTable() Dim i For i = 0 To UBound(TheMappingTable, 1) If TheMappingTable(i,2) >= 0 Then
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
If IsEmpty(TheMappingTable(i,3)) Or TheMappingTable(i,3) >= 1E10 Then ChnSetStatus TheMappingTable(i,1), 4 'ePoOverFlow Else ChnSetStatus TheMappingTable(i,1), 0 'ePoOk ChnSet TheMappingTable(i,1), TheMappingTable(i,3) End If End If Next
' Just give the replication to VDOS some time CmnWait 0.250 End Sub End Class
6.8.5.9
ResAccessAttach Includes a specified measurement in the database and assigns an ID to it that iterates in the measurement recording later on. Parameters
Description
Key
Identifies the iterator in subsequent operations.
MeasurementName
String.
Name of the measurement in the database for which you want to attach an iterator. If no structured name is specified, the following naming conventions apply:
It is assumed that the referenced measurement is part of the current test run and the current test series (Note: The current project is implicitly determined by the test series). If there are different versions of the same measurement, the current version is automatically selected.
Script function/command: Sub ResAccessAttach(Key, MeasurementName)
6.8.5.10
ResAccessDetach Launches a predefined iterator.
AVL PUMA Open 2012 — Scripting in PUMA Open
293
294
Functions of the PUMA Open Script API
Parameters
Description
Key
Identifies the iterator in subsequent operations.
String.
Script function/command: Sub ResAccessDetach(Key)
6.8.5.11
ResAccessSetPosition Positions the iterator within the measurement records. Parameters
Description
Key
Identifies the iterator.
Position
String.
Positions the iterator within the measurement record.
Numeric value.
0…start
-1…end of file
Script function/command: Sub ResAccessSetPosition(Key, Position)
6.8.5.12
ResAccessGetPosition Retrieves the current position of the iterator within the measurement records. If the iterator points to the beginning, it will return "0", if it points to the end, it will return "-1". Parameters
Description
Key
Identifies the iterator.
String.
Script function/command: Function ResAccessGetPosition(Key)
6.8.5.13
ResAccessNext Retrieves a number of records from the measurement. The result is given as a two-dimensional array. After being called up, the iterator points to the position in the record that follows the last returned record. If no further record exists, the iterator points to "EOF".
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
Parameters
Description
Key
Identifies the iterator.
NumberOfRecords
String.
Number of records to be returned. If there are actually fewer records than specified here, the number of records will automatically be reduced.
Numeric value.
Script function/command: Function ResAccessNext(Key, NumberOfRecords)
6.8.5.14
ResAccessGetRecordCnt Retrieves the specified number of records within the measurement. Parameters
Description
Key
Identifies the iterator.
String.
Script function/command: Function ResAccessGetRecordCnt(Key)
6.8.5.15
ResAccessGetChannelList Retrieves the list of measurement channel names. The result is given as a one-dimensional array. Parameters
Description
Key
Identifies the iterator.
String.
Script function/command: Function ResAccessGetChannelList(Key)
6.8.5.16
Example of ResStorage The set of functions below allows measurement structures to be created in the AODS database: ResStorageOpen(Key, DiaryType, ResultName) ResStorageAppend(Key, DiaryType, ResultName) ResStorageClose(Key) ResStorageDefine(Key, ByVal NameList, ByVal SystemNameList, ByVal DataTypeList) ResStorageStore(Key, DoNotCache, ByVal ValueList, ByVal StatusList) ResStorageFlush(Key) ResStorageGetResultName(Key) ResStorageGetDiaryType(Key) ResStorageGetNameList(Key) ResStorageGetSystemNameList(Key) ResStorageGetDataTypeList(Key) ResStorageAttach(Key)
AVL PUMA Open 2012 — Scripting in PUMA Open
295
296
Functions of the PUMA Open Script API
ResStorageDetach(Key)
This is what a typical sequence of a store operation looks like: ResStorageOpen(…) ResStorageDefine(…) ResStorageStore(…) : ResStorageStore(…) ResStorageClose(…)
Alternative sequences may be: ResStorageOpen(…) ResStorageDefine(…) ResStorageStore(…) : ResStorageFlush(…) : ResStorageStore(…) ResStorageClose(…)
ResStorageOpen Opens a new version of the specified measurement structure in the database within the specified diary and creates an access object for it. Parameters
Description
Key
Identifies the storage access object.
DiaryType
Specifies whether the measurement is to be associated with the 'unit under test' (e.g. engine diary), the test bed (e.g. test bed diary) or the test. Admissible values: eRATest = 0 eRAUnitUnderTest = 1 eRATestbed = 2
ResultName
Name of the measurement in the database.
Script function/command: Sub ResStorageOpen(Key, DiaryType, ResultName)
Example ResStorageOpen "MyStorage", eRAUnitUnderTest, "MyUUTLogBook"
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
6.8.5.18
ResStorageAppend If a measurement has not been stored ("sealed") in the database yet (i.e. the 'iCompleteFlag' not yet set to '1'), this request re-opens the database and allows further data to be stored in it. Information If the measurement has already been stored, a new version of the measurement will be created. Parameters
Description
Key
Identifies the storage access object.
DiaryType
Specifies whether the measurement is to be associated with the 'unit under test' (e.g. engine diary), the test bed (e.g. test bed diary) or the test. Admissible values: eRATest = 0 eRAUnitUnderTest = 1 eRATestbed = 2
ResultName
Name of the measurement in the database.
Script function/command: Sub ResStorageAppend(Key, DiaryType, ResultName)
Example ResStorageAppend "MyStorage", eRAUnitUnderTest, "MyUUTLogBook"
6.8.5.19
ResStorageClose Closes the selected measurement and sets the 'iCompleteFlag' attribute for that measurement in the database, i.e. it "seals" the measurement. Parameters
Description
Key
Identifies the storage access object.
Script function/command: Sub ResStorageClose(Key)
Example ResStorageClose "MyStorage"
6.8.5.20
ResStorageDefine Specifies the channels that are to be stored in the selected measurement with subsequent 'ResStorageStore' requests.
AVL PUMA Open 2012 — Scripting in PUMA Open
297
298
Functions of the PUMA Open Script API
Parameters
Description
Key
Identifies the storage access object.
NameList
List of channel names.
SystemNameList
List of system names given in the same sequence as the channel list. Important: The system names of system channels can be retrieved using the 'ChnGetSystemName' function.
DataTypeList
List of data types given in the same sequence as the channel list. Valid data types: · eSCTLong = &H0003 · eSCTFloat = &H0004 · eSCTDouble = &H0005 · eSCTString = &H0006 Important: The data type of system channels can be retrieved using the 'ChnGetDataType' function.
Script function/command: Sub ResStorageDefine(Key, NameList, SystemNameList, DataTypeList)
Example Dim i, MyChannelList(2), MySystemNameList(2), MyDatatypeList(2) MyChannelList(0) = "SPEED" MyChannelList(1) = "TORQUE" MyChannelList(2) = "ALPHA" For i = 0 To 2 MySystemNameList(i) = ChnGetSystemName(MyChannelList(i)) MyDatatypeList(i) = ChnGetDataType(MyChannelList(i)) Next ResStorageDefine "MyStorage", MyChannelList, MySystemNameList, MyDatatypeList
6.8.5.21
ResStorageStore Stores the specified list of values along with the associated status information in the database. Information In the case of values with status = 'NotOk', a value of 1e10 is stored in the database.
Information Since the 'ResStorageStore' request stores a given result record directly in the database, the system load increases significantly if this function is used regularly. To reduce the load, use the internal Cache Option and store all accumulated records from time to time using the 'RecStorageFlush' function.
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
Parameters
Description
Key
Identifies the storage access object.
DoNotCache
Specifies whether or not the values are to be stored immediately in the database. Admissible values:
eRADoCache = 0
eRADoNotCache = 1
ValueList
Array of values in the same order as the channel list that has been defined in the 'ResStorageDefine' request.
StatusList
Array of values in the same order as the channel list that has been defined in the 'ResStorageDefine' request. Admissible values:
Ok = 0
NotOk <> 0
Script function/command: Sub ResStorageStore(Key, DoNotCache, ValueList, StatusList)
Example Dim ValueList(2), StatusList(2) For i = 0 To 2 ValueList(i) = ChnGet(MyChannelList(i)) StatusList(i) = ChnGetStatus(MyChannelList(i)) Next ResStorageStore "MyStorage", eRADoCache, ValueList, StatusList
6.8.5.22
ResStorageFlush In the case of storage requests that do not have set the 'DoNotCache' attribute it is necessary to finally store them in the database. Information An implicit 'ResStorageFlush' request should be made before the 'ResStorageClose' request, if necessary Parameters
Description
Key
Identifies the storage access object.
Script function/command: Sub ResStorageFlush(Key)
Example ResStorageFlush "MyStorage"
AVL PUMA Open 2012 — Scripting in PUMA Open
299
300
Functions of the PUMA Open Script API
6.8.5.23
ResStorageGetResultName Retrieves the name of the measurement that has been specified for the specified storage access object in the last 'RecStorageOpen' or 'RecStorageAppend' request. Information If the request is issued before the RecStorageOpen' or 'RecStorageAppend' request, the string "not yet specified" will be returned. Parameters
Description
Key
Identifies the storage access object.
Script function/command: Function ResStorageGetResultName(Key)
Example Dim ResultName ResultName = ResStorageGetResultName("MyStorage") MsgBox "ResultName:" & vbCrLf & ResultName
6.8.5.24
ResStorageGetDiaryType Retrieves the type of diary to which the measurement belongs that has been specified for the storage access object with the last 'RecStorageOpen' or 'RecStorageAppend' request. Information If the request is issued before the RecStorageOpen' or 'RecStorageAppend' request, the value -1 will be returned Parameters
Description
Key
Identifies the storage access object.
Script function/command: Function ResStorageGetDiaryType(Key)
Example Dim Diary, DiaryType DiaryType = ResStorageGetDiaryType("MyStorage") Select Case DiaryType Case eRATest Diary = "TST" Case eRAUnitUnderTest Diary = "UUT" Case Else 'eRATestbed Diary = "SYS" End Select MsgBox "Diary:" & vbCrLf & Diary
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
6.8.5.25
ResStorageGetNameList Retrieves the list of all channel names from the selected access object that were specified in the last 'ResStorageDefine' request. Parameters
Description
Key
Identifies the storage access object.
Script function/command: Function ResStorageGetNameList(Key)
Example Dim ChannelList, I, ListString ChannelList = ResStorageGetNameList("MyStorage") For i = 0 to Ubound(ChannelList,1) ListString = ListString & vbCrLf & ChannelList(I) Next MsgBox "NameList:" & vbCrLf & ListString
6.8.5.26
ResStorageGetSystemNameList Retrieves the list of all system names for all channels from the selected access object that were specified in the last 'ResStorageDefine' request. Parameters
Description
Key
Identifies the storage access object.
Script function/command: Function ResStorageGetSystemNameList(Key)
Example Dim ChannelList, I, ListString ChannelList = ResStorageGetSystemNameList("MyStorage") For i = 0 to Ubound(ChannelList,1) ListString = ListString & vbCrLf & ChannelList(I) Next MsgBox "SystemNameList:" & vbCrLf & ListString
6.8.5.27
ResStorageGetDataTypeList Retrieves the list of all data type identifiers for all channels from the selected access object that were specified in the last 'ResStorageDefine' request. Parameters
Description
Key
Identifies the storage access object.
Script function/command: Function ResStorageGetDataTypeList(Key)
AVL PUMA Open 2012 — Scripting in PUMA Open
301
302
Functions of the PUMA Open Script API
Example Dim DataTypeList, i, ListString DataTypeList = ResStorageGetDataTypeList("MyStorage") For i = 0 to Ubound(ChannelList,1) ListString = ListString & vbCrLf & DataTypeList(i) Next MsgBox "DataTypeList:" & vbCrLf & ListString
6.8.5.28
ResStorageAttach Creates a new storage access object. Information If an access object with the same key already exists, a new object is created. Parameters
Description
Key
Identifies the storage access object.
Script function/command: Sub ResStorageAttach(Key)
Example DResStorageAttach "MyStorage"
6.8.5.29
ResStorageDetach Releases the specified access object. Information Releasing the access object neither 'flushes' any pending result record nor does it close the measurement in the database. Parameters
Description
Key
Identifies the storage access object.
Script function/command: Sub ResStorageDetach(Key)
Example ResStorageDetach "MyStorage"
6.8.5.30
ResStorageDSTs Retrieves the number of defined data storage tables and a list of their names.
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
Parameters
Description
DSTList
Contains the names of the defined data storage tables.
ReturnValue
Number of data storage tables.
Script function/command: Function ResStorageDSTs(DSTList)
Example Dim NumberOfDSTs Dim DSTList() Dim i
NumberOfDSTs = ResStorageDSTs(DSTList) For i = 0 To NumberOfDSTs -1 MsgBox DSTList(I) Next
6.8.5.31
ResStorageDSTChannels Retrieves the number of defined channels as well as their channel names, system names and data types. Parameters
Description
Index
Index of data storages tables or of their names.
ChannelList()
Contains all channel names included in the data storage table.
SystemNameList()
Contains all system names included in the data storage table.
DataTypeList()
Contains all data types of the channels included in the data storage table.
Script function/command: Function ResStorageDSTChannels(Index, ChannelList, _ SystemNameList, DataTypeList)
AVL PUMA Open 2012 — Scripting in PUMA Open
303
304
Functions of the PUMA Open Script API
Example Dim NumberOfChannels Dim ChannelList() Dim SystemNameList() Dim DataTypeList() Dim i
NumberOfChannels = ResStorageDSTChannels(4, ChannelList, SystemNameList, DataTypeList) For i = 0 To NumberOfChannels-1 MsgBox ChannelList(i) & "/" & SystemNameList (i) & "/" & DataTypeList(i) Next
NumberOfChannels = ResStorageDSTChannels("ENGINMAP", ChannelList, SystemNameList, DataTypeList) For i = 0 To NumberOfChannels-1 MsgBox ChannelList(i) & "/" & SystemNameList (i) & "/" & DataTypeList(i) Next
Application example
During a test run, additional information on the environmental conditions under which the test is run is to be stored in a separate measurement in the database. This measurement is associated to the Test Diary. The solution is provided by means of a specific script context that can be used from BSQ/SSQ or even interactively from SOX and POI. This script context includes the following three functions:
Open
Snapshot
Close
Script function "Open"
Opens a new measurement with the name "Name" within the diary ["TST", "SYS", "UUT"] and with a list of specific channels that are defined via the "Channels" attribute. The channels in the channel list are separated by ",". With the "StorageMode" attribute you determine that the snapshots will be stored in the database [0...upon "Close", 1...immediately].
Script function "Snapshot" Script function "Close" Contents of the script context
Takes a snapshot of all channels specified in the channel list. Closes (and saves) the measurement. Dim MyStorage Const MyKey = "MyStorage"
Public Sub Initialize() Set MyStorage = New Storage End Sub
Public Sub Terminate() Set MySTorage = Nothing End Sub
Class Storage
Dim MyStorageMode Dim MyMaxIndex
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
Dim MyChannelList Dim MySystemNameList() Dim MyDatatypeList()
Private Sub Class_Initialize() End Sub
Private Sub Class_Terminate() End Sub
Sub Open(Diary, Name, Channels, StorageMode) ' ' Keep the storage mode for later usage ' MyStorageMode = StorageMode ' ' Create a storage access object ' ResStorageAttach MyKey ' 'Determine diary type and open the measurement within it ' Dim DiaryType Select Case Diary Case "TST" DiaryType = eRATest Case "UUT" DiaryType = eRAUnitUnderTest Case Else '"SYS" DiaryType = eRATestbed End Select ResStorageOpen MyKey, DiaryType, Name ' ' Create the channel list, and retrieve ' system names And data types For all of them ' MyChannelList = Split(Channels, ",") MyMaxIndex = UBound(MyChannelList,1)
Dim i For i = 0 To MyMaxIndex MySystemNameList(i) = ChnGetSystemName(MyChannelList(i)) MyDatatypeList(i) = ChnGetDataType(MyChannelList(i)) Next ' ' Configure the already existing measurement
AVL PUMA Open 2012 — Scripting in PUMA Open
305
306
Functions of the PUMA Open Script API
' ResStorageDefine MyKey, MyChannelList, MySystemNameList, MyDatatypeList End Sub
Sub Snapshot() ' ' Retrieve values and status information for all channels ' Dim MyValues Dim MyStatus ReDim MyValues(MyMaxIndex) ReDim MyStatus(MyMaxIndex) Dim i For i = 0 To MyMaxIndex MyValues(i) = ChnGet(MyChannelList(i)) MyStatus(i) = ChnGetStatus(MyChannelList(i)) Next ResStorageStore MyKey, MyStorageMode, MyValues, MyStatus End Sub
Sub Close() ' ' Store any unstored data and close the measurement ' ResStorageFlush MyKey ResStorageClose MyKey ' ' Release the access object ' ResStorageDetach MyKey End Sub End Class
Information The functions described below are not designed to be used via script contexts. However, they can be used internally from the PUMA Open system.
6.8.5.32
Mounting a 'Unit Under Test' Selects the specified unit under test and identifies it as "mounted on this test bed" in the database. Parameters
Description
UnitUnderTest
Identifies the unit under test. String.
Script function/command: Sub ResMountUnitUnderTest(UnitUnderTest)
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
Example ResMountUnitUnderTest "MB104C44"
6.8.5.33
Dismounting a 'Unit Under Test' Cancels the identification as "unit under test" in the database. Parameters
Description
UnitUnderTest
Identifies the unit under test. String.
Script function/command: Sub ResDismountUnitUnderTest(UnitUnderTest)
Example ResDismountUnitUnderTest "MB104C44"
6.8.5.34
Get Mounted 'Unit Under Test' Retrieves the name of the unit under test that is used for the current test bed in the database. Script function/command: Function ResGetMountedUnitUnderTest()
Example Dim UnitUnderTest UnitUnderTest = ResGetMountedUnitUnderTest() MsgBox UnitUnderTest
6.8.5.35
Attach file to result Appends the specified file to the current test result at the defined position. Parameters
Description
FileLocation
Path of the file to be saved with the result.
FileName
Name of the file to be appended to the test result
Script function/command: Function ResAttachFileToResult(FileLocation, FileName)
6.8.5.36
Restore file from result Saves the specified file from the current test result at the defined location. Parameters
Description
FileLocation
Path under which the file is stored after reading it from the test result
FileName
Name of the file read from the test result
Script function/command: AVL PUMA Open 2012 — Scripting in PUMA Open
307
308
Functions of the PUMA Open Script API
Function ResRestoreFileFromResult(FileLocation, FileName)
6.8.5.37
Delete file from result Deletes the specified file from the current test result. Parameters
Description
FileName
Name of the file deleted from the test result
Script function/command: Function ResDeleteFileFromResult(FileName)
6.8.5.38
ResGetFileAttachmentNamesInResult Retrieves the names of all attachments of the current test result. Information Only names of attachments from local results can be retrieved.
Parameters
Description
FileAttachmentNames
After a successful call, this parameter keeps the names of all attached files. Individual names are separated by '|' (i.e. the 'pipe' sign)
Script function/command: Function ResGetFileAttachmentNamesInResult(ByRef FileAttachmentNames)
Example Dim Result Dim FileAttachmentNames Result = ResGetFileAttachmentNamesInResult(FileAttachmentNames) If Not Result = 0 Then MsgBox "The following files are attached to the current result: " & FileAttachmentNames End If
6.8.5.39
ResAttachFileExistsInResult Checks if a specified file (name) already is attached to the current test result. Information Attachments of local results can be checked.
Parameters
Description
FileAttachmentNames
Name of the attachment (along with its extension) that the result is checked for, e.g. "MyResult1.txt"
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
Script function/command: Function ResAttachFileExistsInResult(FileAttachmentName)
Example Dim Result Result = ResGetFileAttachmentNamesInResult("MyResult1.txt") If Not Result = 0 Then MsgBox "File 'MyResult1.txt' is already attached to the current result" End If
6.8.5.40
ResGetFileAttachmentNamesInMeasurement Retrieves the names of all attachments of the current version of the selected measurement of current test result. Information Only names of attachments from the current version of the measurement from the local result can be retrieved.
Parameters
Description
MeasurementName
Literal 'String' or 'NormName' Name of the measurement the names of attachments are retrieved from, e.g. "MyRecorderResult"
FileAttachmentNames
Name of the attachment (along with its extension) that the result is checked for, e.g. "MyResult1.txt"
Script function/command: Function ResGetFileAttachmentNamesInMeasurement_| (MeasurementName, ByRef FileAttachmentNames)
Example Dim Result Dim FileAttachmentNames Result = ResGetFileAttachmentNamesInMeasurement("MyRecorderResult", FileAttachmentNames) If Not Result = 0 Then MsgBox "The following files are attached to the measurement: " & FileAttachmentNames End If
6.8.5.41
ResAttachFileExistsInMeasurement Checks if a specified file (name) already is attached to the current version of the selected measurement of the current test result. Information Only attachments from the current version of the measurement from the local result can be checked.
AVL PUMA Open 2012 — Scripting in PUMA Open
309
310
Functions of the PUMA Open Script API
Parameters
Description
MeasurementName
Literal 'String' or 'NormName' Name of the measurement whose attachments are checked for, e.g. "MyRecorderResult"
FileAttachmentNames
'String' Name of the attachment (along with its extension) that the result is checked for, e.g. "MyResult1.txt"
Script function/command: Function ResAttachFileExistsInMeasurement(MeasurementName, FileAttachmentName)
Example Dim Result Result = ResGetFileAttachmentNamesInMeasurement("MyRecorderResult", "MyResult1.txt") If Not Result = 0 Then MsgBox "File 'MyResult1.txt' is already attached to the measurement" End If
6.8.5.42
ResGetFileAttachmentNamesInRecovery Retrieves the names of all attachments of the current version of the recovery measurement of the current test result.
Information Only names of attachments from local results can be retrieved.
Parameters
Description
FileAttachmentNames
After a successful call, this parameter keeps the names of all attached files. Individual names are separated by '|' (i.e. the 'pipe' sign)
Script function/command: Function ResGetFileAttachmentNamesInRecovery(ByRef FileAttachmentNames)
Example Dim Result Dim FileAttachmentNames Result = ResGetFileAttachmentNamesInRecovery(FileAttachmentNames) If Not Result = 0 Then MsgBox "The following files are attached to the current result: " & FileAttachmentNames End If
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
6.8.5.43
ResAttachFileExistsInRecovery Checks if a specified file (name) already is attached to the current version of the recovery measurement of the current test result. Information only attachments of local results can be checked.
Parameters
Description
FileAttachmentNames
Name of the attachment (along with its extension) that the recovery measurement is checked for, e.g. "MyResult1.txt")
Script function/command: Function ResAttachFileExistsInRecovery(FileAttachmentName)
Example Dim Result Result = ResGetFileAttachmentNamesInRecovery("MyResult1.txt") If Not Result = 0 Then MsgBox "File 'MyResult1.txt' is already attached to the current recovery measurement" End If
6.9
Parameter Access
6.9.1
Parameters
6.9.1.1
Save UUT parameter set Saves the entire UUT (Unit Under Test Parameters) loadset. Any change will be saved. Script function/command: Sub PrmSaveUUT()
6.9.1.2
Save SYS parameter set Saves the entire SYS (System Parameters) Loadset. Any change will be saved. Script function/command: Sub PrmSaveSYS()
6.9.1.3
Save SYS parameter Set with comment Saves the entire SYS (System Parameters) Loadset. Any change will be saved.
AVL PUMA Open 2012 — Scripting in PUMA Open
311
312
Functions of the PUMA Open Script API
Parameter
description
comment
Comment to stored parameter set.
Script function/command: Sub PrmSaveSYS(comment)
6.9.1.4
Save DRV parameter set Saves the entire DRV (Driver Parameter) Loadset. Any change will be saved. Script function/command: Function PrmSaveDRV()
6.9.1.5
Save TST Attachments Writes the file attachments from the file system to the database. Script function/command: Sub PrmSaveTSTAttachments()
6.9.1.6
Load TST Attachments Loads the file attachments from the database into the file system. Script function/command: Sub PALSLoadTSTAttachments()
6.9.1.7
Get DRV parameter set Retrieves the specified DRV parameter and writes its value to a system channel that has been specified by its normname. Parameters
Description
Path
Structured parameter access path in the DRV parameter loadset. String.
Path for the name of the driver curve that controls clutch disengagement in a manual shift definition: "Behaviour[0]/MSD[Name=""MyMSD""]/DisengClutchDCVUp/Name"
To obtain the driver curve's x- or y-values: "Behaviour[0]/MSD[Name=""MyMSD""]/DisengClutchDCVUp/xAxis[1]" "Behaviour[0]/MSD[Name=""MyMSD""]/DisengClutchDCVUp/yAxis[1]"
To obtain the driver curves directly (but not via a manual shift definition): "Behaviour[0]/DCVRise[Name=""MyDCV""]/xAxis[1]" "Behaviour[0]/DCVRise[Name=""MyDCV""]/yAxis[1]"
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
Information As more than one MSD parameter entity can be defined within a given DRV parameter loadset, you can select the appropriate entity by using the 'Name=""MSDName""' clause as selector. The same applies to driver curves. There are many instances that can be identified by their name or even by their index ("Behaviour[0]/DCVRise[DCVIndex]/yAxis[Index]").
Information All axis indices are zero-based.
Information As the entire path is defined as a string, use two double quotes ("") before and after the string value to mark a string value within the string.
6.9.1.8
Set DRV parameter Sets a DRV parameter entry to a specified value. The changes take effect immediately. Parameters
Description
Path
Structured parameter access path in the DRV parameter loadset. String.
Value
New value for the specified DRV parameter entry. Numeric value or expression string.
In cases in which it is necessary to modify a set of parameter entries in a transaction, you can use the functions described below. These functions allow you to open an edit session, then modify some parameters, check these modifications, apply them or cancel them and finally close the edit session again. Sub PrmEditDRVParameter(Path, ByRef EditObjId) Function PrmChangeDRVParameter(EditObjId, ElementName, Value) Function PrmRetrieveDRVParameter(EditObjId, ElementName) Function PrmRetrieveCountDRVParameter(EditObjId, ElementName) Function PrmCheckDRVParameters(EditObjId) Function PrmApplyDRVParameters(EditObjId) Function PrmCancelDRVParameters(EditObjId) Function PrmCloseDRVParameters(EditObjId)
AVL PUMA Open 2012 — Scripting in PUMA Open
313
314
Functions of the PUMA Open Script API
Abb. 53 You can check the result from both sequences easily in the online DRV parameters window in POI (menu Functions | Simulation | Driver Gearshift Definition).
6.9.1.9
Get parameter Gets parameter (specified by path) and write it to specified channel. Parameters
Description
Path
Structured parameter access path in the DRV parameter set. String.
ResultChannel
Name of the system channel on which result is written. String.
PrmEditDRVParameter Opens an edit session that allows parameter access beginning with the parameter entry specified by its structured path. The current edit session is identified by an 'Edit Object ID' that must also be used for the subsequent manipulations. This ID represents a kind of root object that is the basis for further navigation. Parameters
Description
Path
Structured parameter access path in the DRV parameter loadset. String.
EditObjld
Output parameter. Identifies the edit session.
Script function/command: Sub PrmEditDRVParameter(Path, EditObjId)
6.9.1.12
PrmChangeDRVParameter Modifies the specific parameter entry. Parameters
Description
EditObjld
Identifies the edit session.
ElementName
Identifies the parameter entry. String.
Value
Identifies the parameter entry. Numeric value or expression string.
Script function/command: Function PrmChangeDRVParameter(EditObjId, ElementName, Value)
6.9.1.13
PrmRetrieveDRVParameter Retrieves the value of the specified parameter element. Parameters
Description
EditObjld
Identifies the edit session.
ElementName
Identifies the parameter entry. String.
Script function/command: Function PrmRetrieveDRVParameter(EditObjId, ElementName)
AVL PUMA Open 2012 — Scripting in PUMA Open
315
316
Functions of the PUMA Open Script API
6.9.1.14
PrmRetrieveCountDRVParameter Retrieves the number of sub-elements of the specified parameter element. Parameters
Description
EditObjld
Identifies the edit session.
ElementName
Identifies the parameter entry. String.
Script function/command: Function PrmRetrieveCountDRVParameter(EditObjId, ElementName)
6.9.1.15
PrmCheckDRVParameters Checks the consistency of the modified parameters. Parameters
Description
EditObjld
Identifies the edit session.
ReturnValue
Indicates whether OK or Not OK 1...OK 0...NotOK
Script function/command: Function PrmCheckDRVParameters(EditObjId)
6.9.1.16
PrmApplyDRVParameters Activates the modified parameters without closing the edit session. Parameters
Description
EditObjld
Identifies the edit session.
ReturnValue
Indicates whether OK or Not OK 1...OK 0...NotOK
Script function/command: Function PrmApplyDRVParameters(EditObjId)
6.9.1.17
PrmCancelDRVParameters Activates the modified parameters and closes the edit session. Information Every edit session must be closed explicitly. Parameters
Description
EditObjld
Identifies the edit session.
ReturnValue
Indicates whether OK or Not OK 1...OK 0...NotOK
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
Script function/command: Function PrmCancelDRVParameters(EditObjId)
6.10
UUT Control
6.10.1
EMCON Support
6.10.1.1
Freeze Alpha Set Value This function is used to Freeze/Unfreeze the Alpha set value. Parameters
Description
aMode
0 = unfreeze 1 = freeze
Script function/command: Sub EmcFreezeAlphaSetValue( aMode )
6.10.1.2
Set Dyno Behavior This function is used to change the dyno behavior between passive and active mode. Parameters
Description
aMode
0 = Passiv 1 = Active
Script function/command: Sub EmcChangeDynoBehavior( aMode )
6.10.2
Advanced UUT support
6.10.2.1
Stall Brake Off Releases the Stall brake. Always possible. If open, no action. Script function/command: AdvUutStallbrakeOff
6.10.2.2
Stall Brake On Aktivates the stall brake. Only possible if UUT is stopped (channel UUTState will be checked), else no action just an error message appears. Script function/command: AdvUutStallbrakeOn
6.10.2.3
Send Command to task BEA Convert a command of typ string into a long value and send this to the system variable SV_BEA_ONEWAY_COMMAND. If the system variable is missing, an error is written to the TbTracer.
Demand value relation Changes the demand value relation between in- and output side (engine and dyno). The application of this AO is only feasible if UUT is stopped (channel UUTState will be checked), otherwise an error message is reported without further action. Parameters
Information TorqueSide refers to the output side or load side.
6.10.2.5
ChangeDrivingDirection For special purposes it should be possible to redefine the Driving direction already in neutral gear. That ensures that the Emcon can initialize it's controllers in proper way to have smooth transitions at gear changes which reverses the Driving direction. Parameters
Description
Direction
0 = Forward 1 = Reverse
Script function/command: Sub EmcChangeDrivingDirection( aDirection )
6.10.3
Engine Electronic Interface
6.10.3.1
A3Change Changes the name of the binary file. Parameters
Description
ModuleName
Name of EEI module. String.
NewBinaryFile
Name of new binary file. String.
Script function/command: Sub EeiA3ChangeBinFileName(ModuleName, NewBinaryFile)
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
6.10.3.2
A3CopyBinaryFile Copies the binary file to the specified destination. Parameters
Description
ModuleName
Name of EEI module. String.
Target
Destination or normname for the destination. String.
Source
Source or normname for the source. String.
Script function/command: Sub EeiA3CopyBinFile(ModuleName, Target, Source)
6.10.3.3
A3Emergency Performs an emergency shutdown; an emergency event number can be specified. Parameters
Description
ModuleName
Name of EEI module. String.
EmergencyEvent
Event number or normname for the event number.
Script function/command: Sub EeiA3Emergency(ModuleName, EmergencyEvent)
6.10.3.4
A3GetLookupTable Transfers all data of a map from the MC system to PUMA. Parameters
Description
ModuleName
Name of EEI module. String.
MapName
Name of map. String.
Script function/command: Sub EeiA3GetLookupTable(ModuleName, MapName)
6.10.3.5
A3GetOnlineValue Reads the online value once. The module must be in Offline state. Parameters
Description
ModuleName
Name of EEI module. String.
Script function/command: Sub EeiA3GetOnlineValue(ModuleName)
6.10.3.6
A3GetParameter Transfers parameters from the MC system to PUMA.
AVL PUMA Open 2012 — Scripting in PUMA Open
319
320
Functions of the PUMA Open Script API
Parameters
Description
ModuleName
Name of EEI module. String.
ParameterName
Name of parameter. String.
Script function/command: Sub EeiA3GetParameter(ModuleName, ParameterName)
6.10.3.7
A3Idendify Identifies versions and names and exchanges them between the MC system and PUMA. Parameters
Description
ModuleName
Name of EEI module. String.
Script function/command: Sub EeiA3Identify(ModuleName)
6.10.3.8
A3IncreaseLookupTable Adds an offset to map values. The map area to be changed is defined by a start index and a delta value. Parameters
Description
ModuleName
Name of EEI module. String.
MapName
Name of map. String.
XIndex
Start index on x-axis or normname containing the start index. String.
YIndex
Start index on y-axis or normname containing the start index. String.
X-Delta
Area in direction of x-axis or normname containing the area. String.
Y-Delta
Area in direction of y-axis or normname containing the area. String.
Offset
Offset value in direction of z-axis or normname containing the offset. String.
A3Init First command to initialize the MC system. Parameters
Description
ModuleName
Name of EEI module. String.
Script function/command: Sub EeiA3Init(ModuleName)
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
6.10.3.10 A3ParameterForValueAcquisition Transfers the names of the online quantities to be acquired to the MC system. Optionally, a clear list can be sent. Parameters
Description
ModuleName
Name of EEI module. String.
Delete
"0" if you want to send a clear list, otherwise ‘‘‘‘. String.
Script function/command: Sub EeiA3ParForValAcq(ModuleName, Delete)
6.10.3.11 SelectLoadset Selection, in MONITOR mode, from which parameter set the MEI blocks should be taken. Parameters
Description
LoadsetType
Name of loadset ("SYS"/ "UUT"/ "TST"). String.
Script function/command: Sub EeiSelectLoadset(LoadsetType)
6.10.3.12 Disconnect Disconnects all modules from the EEI. Parameters
Description
ModuleName
Name of EEI module. String.
Script function/command: Sub EeiDisconnect(ModuleName)
6.10.3.13 Connect Connects a module to the MC system. Parameters
Description
ModuleName
Name of EEI module. String.
DescriptionFile
Name of description file. String.
BinaryFile
Name of binary file. String. ‘‘‘‘... If the string is empty, the description file name from the MEI parameter block will be used.
Destination
Destination or normname for the destination. String. ‘‘‘‘... If the string is empty, the default destination of the ECU system will be used.
Script function/command: Sub EeiConnect(ModuleName, DescriptionFile, BinaryFile, Destination)
AVL PUMA Open 2012 — Scripting in PUMA Open
321
322
Functions of the PUMA Open Script API
6.10.3.14 Activate Connects a module to an MC system without Init and Identify. Parameters
Description
ModuleName
Name of EEI module. String.
Script function/command: Sub EeiActivate(ModuleName)
6.10.3.15 MapReset Resets all modified maps. Parameters
Description
ModuleName
Name of EEI module. String.
Script function/command: Sub EeiResetAllMaps(ModuleName)
6.10.3.16 ParameterReset Resets all modified parameters. Parameters
Description
ModuleName
Name of EEI module. String.
Script function/command: Sub EeiResetAllParameters(ModuleName)
6.10.3.17 GetParameter Transfers parameters from the MC system to PUMA. Parameters
Description
ModuleName
Name of EEI module. String.
ParameterName
Name of parameter. String.
Normname
Normname that contains the parameter value.
Script function/command: Sub EeiGetParameter(ModuleName, ParameterName, Normname)
6.10.3.18 SetParameter Sets a parameter to the specified value. Parameters
Description
ModuleName
Name of EEI module. String.
ParameterName
Name of parameter. String.
ParameterValue
Value assigned to the parameter or to the normname containing the value. String.
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
Script function/command: Sub EeiSetParameter(ModuleName, ParameterName, ParameterValue)
6.10.3.19 SetMap Sets a constant in a map. The map area to be changed is defined by the start values X1 and Y1 and the end values X2 and Y2. Parameters
Description
ModuleName
Name of EEI module. String.
MapName
Name of map. String.
ZValue
Constant value in direction of z-axis or normname containing the value. String.
X1
Start value on x-axis or normname containing the start value. String.
Y1
Start value on y-axis or normname containing the start value. String.
X2
End value on x-axis or normname containing the end value. String.
Y2
End value on y-axis or normname containing the end value. String.
Script function/command: Sub EeiSetMap(ModuleName, MapName, ZValue, X1, Y1, X2, Y2)
6.10.3.20 SetMapTotal Sets an entire map to a specified value. Parameters
Description
ModuleName
Name of EEI module. String.
MapName
Name of map. String.
ZValue
Constant value in direction of z-axis or normname containing the value. String.
Script function/command: Sub EeiSetMapTotal(ModuleName, MapName, ZValue)
6.10.3.21 SetMapCurve Sets a constant in a characteristic curve. The curve area to be changed is defined by the start value X1 and the end value X2. Parameters
Description
ModuleName
Name of EEI module. String.
MapName
Name of map. String.
ZValue
Constant value in direction of z-axis or normname containing the value. String.
X1
Start value on x-axis or normname containing the start value. String.
X2
End value on x-axis or normname containing the end value. String.
AVL PUMA Open 2012 — Scripting in PUMA Open
323
324
Functions of the PUMA Open Script API
Script function/command: Sub EeiSetMapCurve(ModuleName, MapName, ZValue, X1, X2)
6.10.3.22 IncreaseMap Increases part of a map by a specified value. The map area to be changed is defined by the start values X1 and Y1 and the end values X2 and Y2. Parameters
Description
ModuleName
Name of EEI module. String.
MapName
Name of map. String.
ZOffset
Offset value in direction of z-axis or normname containing the value. String.
X1
Start value on x-axis or normname containing the start value. String.
Y1
Start value on y-axis or normname containing the start value. String.
X2
End value on x-axis or normname containing the end value. String.
Y2
End value on y-axis or normname containing the end value. String.
Script function/command: Sub EeiIncMap(ModuleName, MapName, ZOffset, X1, Y1, X2, Y2)
6.10.3.23 IncreaseMapTotal Increases an entire map by a specified value. Parameters
Description
ModuleName
Name of EEI module. String.
MapName
Name of map. String.
ZOffset
Offset value in direction of z-axis or normname containing the offset. String.
Script function/command: Sub EeiIncMapTotal(ModuleName, MapName, ZOffset)
6.10.3.24 IncreaseMapCurve Increases part of a curve by a specified value. The curve area to be changed is defined by the start value X1 and the end value X2. Parameters
Description
ModuleName
Name of EEI module. String.
MapName
Name of map. String.
ZOffset
Offset value in direction of z-axis or normname containing the value. String.
X1
Start value on x-axis or normname containing the start value. String.
X2
End value on x-axis or normname containing the end value. String.
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
Script function/command: Sub EeiIncMapCurve(ModuleName, MapName, ZOffset, X1, X2)
6.10.3.25 GetMap Transfers all data of a map from the MC system to PUMA. Parameters
Description
ModuleName
Name of EEI module. String.
MapName
Name of map. String.
Script function/command: Sub EeiGetMap(ModuleName, MapName)
6.10.3.26 PutMap Transfers all data of a map to the MC system. Parameters
Description
ModuleName
Name of EEI module. String.
MapName
Name of map. String.
Script function/command: Sub EeiPutMap(ModuleName, MapName)
6.10.3.27 GetDimensionOfMap Retrieves the dimension of a map in the direction of the x- and y-axes. Parameters
Description
ModuleName
Name of EEI module. String.
MapName
Name of map. String.
XDim
Normname that obtains the dimension of the x-axis. String.
YDim
Normname that obtains the dimension of the y-axis. String.
Script function/command: Sub EeiGetDimOfMap(ModuleName, MapName, XDim, YDim)
6.10.3.28 GetPointOfMap Retrieves the x-, y- and z-value of a map point to obtain the required x,y index. Parameters
Description
ModuleName
Name of EEI module. String.
MapName
Name of map. String.
XIndex
Index in direction of x-axis or normname containing the index. String.
YIndex
Index in direction of y-axis or normname containing the index. String.
AVL PUMA Open 2012 — Scripting in PUMA Open
325
326
Functions of the PUMA Open Script API
Parameters
Description
XResult
Normname that receives the corresponding x-value. String.
YResult
Normname that receives the corresponding y-value. String.
ZResult
Normname that receives the corresponding z-value. String.
Script function/command: Sub EeiGetPointOfMap(ModuleName, MapName, X, Y, XResult, _ YResult, ZResult)
Script function/command: Sub EeiOnline(ModuleName)
6.10.3.30 Offline Terminates online communication between the MC system and the ECU. The cyclic transfer of ECU values to PUMA will be stopped. Parameters
Description
ModuleName
Name of EEI module. String.
Script function/command: Sub EeiOffline(ModuleName)
6.10.3.31 Reset Resets all modified parameters and maps. Parameters
Description
ModuleName
Name of EEI module. String.
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
Script function/command: Sub EeiReset(ModuleName)
6.10.3.32 A3SelectDesAndBinFile Connects a module to the MC system. Parameters
Description
ModuleName
Name of EEI module. String.
DescriptionFile
Name of description file. String. ‘‘‘‘... If the string is empty, the description file name from the MEI parameter block will be used.
BinaryFile
Name of binary file. String. ‘‘‘‘... If the string is empty, the description file name from the MEI parameter block will be used.
Destination
Destination or normname for the destination. String. ‘‘‘‘... If the string is empty, the default destination of the ECU system will be used.
Script function/command: Sub EeiA3SelectDesAndBinFile(ModuleName, DescriptionFile, _ BinaryFile, Destination)
6.10.3.33 A3SelectLookupTable Selects the look-up table with the specified name. Parameters
Description
ModuleName
Name of EEI module. String.
MapName
Name of map. String.
Script function/command: Sub EeiA3SelectLookupTable(ModuleName, MapName)
6.10.3.34 A3PutLookupTable Transfers map data from PUMA to the MC system. Parameters
Description
ModuleName
Name of EEI module. String.
MapName
Name of map. String.
Script function/command: Sub EeiA3PutLookupTable(ModuleName, MapName)
6.10.3.35 A3SetLookupTable Sets a constant in a map. The map area to be changed is defined by a start index and a delta value.
AVL PUMA Open 2012 — Scripting in PUMA Open
327
328
Functions of the PUMA Open Script API
Parameters
Description
ModuleName
Name of EEI module. String.
MapName
Name of map. String.
XIndex
Start index on x-axis or normname containing the start index. String.
YIndex
Start index on y-axis or normname containing the start index. String.
X-Delta
Area in direction of x-axis or normname containing the area. String.
Y-Delta
Area in direction of y-axis or normname containing the area. String.
Value
Constant value in direction of z-axis or normname containing the value. String.
Script function/command: Sub EeiA3SetCaseSensitiveLabels(ModuleName)
6.10.3.40 A3GetLookupTableValue Returns an indexed z-value of the map. Parameters
Description
ModuleName
Name of EEI module. String.
MapName
Name of map. String.
XIndex
Start index on x-axis or normname containing the start index. String.
YIndex
Start index on y-axis or normname containing the start index. String.
Normname
Normname that receives the z-value. String. ‘‘‘‘...If the string is empty, the defined normname will automatically be used.
Script function/command: Sub EeiA3GetLookupTableValue(ModuleName, MapName, XIndex, YIndex, _ Normname)
6.10.3.41 StoreBinFile Saves a binary file on the MC system. Parameters
Description
ModuleName
Name of EEI module. String.
NewBinFileName
Name of new binary file. String. ‘‘‘‘If the string is empty, the defined binary file name will automatically be used.
Script function/command: Sub EeiStoreBinFile(ModuleName, NewBinFileName)
AVL PUMA Open 2012 — Scripting in PUMA Open
329
330
Functions of the PUMA Open Script API
6.10.3.42 GetAllMapsAndParameter Loads all maps and parameters of the MC system. Parameters
Description
ModuleName
Name of EEI module. String.
Script function/command: Sub EeiGet(ModuleName)
6.10.3.43 A3DefineDesAndBinFile Connects a module to the MC system. The ASAP3 V2.1 command can be used alternatively to the command SELECT DESCRIPTION AND BINARY FILE. Parameters
Description
ModuleName
Name of EEI module. String.
DescriptionFile
Name of description file. String. ‘‘‘‘If the string is empty, the description file name from the MEI parameter block will automatically be used.
ProgramCodeFile
Name of program code file. String. ‘‘‘‘If the string is empty, the program code file name from the MEI parameter block will automatically be used.
CalibrationFile
Name of calibration data file. String. ‘‘‘‘If the string is empty, the calibration data file name from the ECU parameter block will automatically be used.
Destination
Destination or normname for the destination. String. ‘‘‘‘... If the string is empty, the default destination of the MC system automatically will be used.
Mode
Mode or normname for the mode. String. ‘‘‘‘If the string is empty, the default mode from the MC system will automatically be used.
Script function/command: Sub EeiA3DefineDesAndBinFile(ModuleName, DescriptionFile, _ ProgramCodeFile, CalibrationFile, Destination, Mode)
6.10.3.44 A3SetFormat Sets the format of the data received from the MC system. Information The extended commands of ASAP3 are not supported.
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
Parameters
Description
ModuleName
Name of EEI module. String.
LogicalDataType
Definition of ASAP3 data type or normname - 0.. all, 1.. map, 2.. parameter, 3..current value
Model
Only for extended commands (which are not supported)! ‘‘‘‘if the string is empty, "0" is sent to the MC system.
Script function/command: Sub EeiA3SetFormat(ModuleName, LogicalDataType, Model)
6.10.3.45 A3InitAsMasterClient Initializes an MC system as the MasterClient of the Asap3Server. An INIT is executed at the MC system (also for multiple clients connected to the Asap3Server). Parameters
Description
ModuleName
Name of EEI module. String.
Script function/command: Sub EeiA3InitAsMasterClient(ModuleName)
6.10.3.46 PutParameter Transfers a parameter from PUMA to the MC system. Parameters
Description
ModuleName
Name of EEI module. String.
ParName
Name of parameter. String.
Script function/command: Sub EeiPutParameter(ModuleName, ParName)
6.10.3.47 EeiA3ExtendedQueryAvailableServices Retrieves a list of all services available in the application system. Parameters
Description
ModuleName
Name of EEI module. String.
Timeout
Timeout in seconds
Services
List of services
ErrorMessage
Error message
Script function/command: Function EeiA3ExtendedQueryAvailableServices(ModuleName, Timeout, Services,_ ErrorMessage)
AVL PUMA Open 2012 — Scripting in PUMA Open
331
332
Functions of the PUMA Open Script API
6.10.3.48 EeiA3ExtendedGetServiceInformation Retrieves a detailed description of the services. Parameters
Description
ModuleName
Name of EEI module. String.
Timeout
Timeout in seconds
Services
List of services
InfoString
Information string to be output
ErrorMessage
Error message
Script function/command: Function EeiA3ExtendedGetServiceInformation(ModuleName, Timeout, Service,_ InfoString, ErrorMessage)
6.10.3.49 EeiA3ParaForValAcquisitionDirect Displays the data type of the online values. Parameters
Description
ModuleName
Name of EEI module. String.
Timeout
Timeout in seconds
ScanTime
Scanning time (in ms)
ValueNames
Information string to be output
DataTypes
List of data types of the online channel names
ErrorMessage
Error message
Script function/command: Function EeiA3ParaForValAcquisitionDirect(ModuleName, Timeout, ScanTime,_ ValueNames, DataTypes, ErrorMessage)
6.10.3.50 EeiA3ExtendedExecuteService This command executes a service on the application system. Parameters
Description
ModuleName
Name of EEI module. String.
Timeout
Timeout in seconds
Services
List of services
ServiceInput
Input parameters for the services
ServiceOutput
Output parameters for the services
ErrorMessage
Error message
Script function/command: Function EeiA3ExtendedExecuteService(ModuleName, Timeout, Service, ServiceInput,_| ServiceOutput, ErrorMessage)
6.10.3.51 EeiAssignOnlineValueToQuantities Creates system channels and assigns normnames to the online values, as previously defined in the activation.
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
Parameters
Description
ModuleName
Name of EEI module. String.
ValueNames
List of online channel names
QuantityNames
List of normnames
ErrorMessage
Error message
Script function/command: Function EeiAssignOnlineValueToQuantities(ModuleName, ValueNames, QuantityNames,_ ErrorMessage)
6.10.3.52 EeiRemoveOnlineValues Removes online channels and system channels from the internal online value list. Parameters
Description
ModuleName
Name of EEI module. String.
ValueNames
List of online channel names
ErrorMessage
Error message
Script function/command: Function EeiRemoveOnlineValues(ModuleName, ValueNames, ErrorMessage)
6.10.3.53 EeiA3GetParameterDirect Parameters
Description
ModuleName
Name of EEI module. String.
Timeout
Input as timeout in seconds.
ParameterName
Name of parameter
AddToList
0 = no entry made in internal list 1 = entry made in list
0 = value is transferred to application system 1 = internally stored value is transferred to application system
Value
Parameter value to be output
ErrorMessage
Error message
Script function/command: Function EeiA3SetParameterDirect(ModuleName, Timeout, ParameterName,_ PutInternalValue, Value, ErrorMessage)
6.10.3.55 EeiAssignParameterToQuantity Creates a PUMA system channel and assigns a quantity to this channel. Parameters
Description
ModuleName
Name of EEI module. String.
ParameterName
Name of parameter
QuantityName
Name of quantity
ErrorMessage
Error message
Script function/command: Function EeiAssignParameterToQuantity(ModuleName, ParameterName,_ QuantityName, ErrorMessage)
6.10.3.56 EeiRemoveParameter Deletes a parameter (including system channel) from the internal parameter list. Parameters
Description
ModuleName
Name of EEI module. String.
ParameterName
Name of parameter
ErrorMessage
Error message
Script function/command: Function EeiRemoveParameter(ModuleName, ParameterName, ErrorMessage)
6.10.3.57 EeiSetParameterBit Sets a parameter bit. Parameters
Description
ModuleName
Name of EEI module. String.
ParameterName
Name of parameter
BitNumber
Number of bits from 0 to 16 for parameters of type Float and 32 for parameters of type Double.
BitValue
Value of the bit (0 or1).
ErrorMessage
Error message
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
Script function/command: Function EeiSetParameterBit(ModuleName, ParameterName, BitNumber, BitValue,_ ErrorMessage)
6.10.3.58 GetParameterBit Reads a parameter bit directly from the MC system. Bits 0 to 16 for data type Float, bits 0 to 32 for data type Double. Parameters
Description
ModuleName
Name of EEI module. String.
ParameterName
Name of parameter
BitNumber
Number of bits from 0 to 16 for parameters of type Float and 32 for parameters of type Double.
TypeOfValue
Normname for the parameter type.
BitValue
Value of the bit (0 or1).
Script function/command: Sub EeiGetParameterBit(ModuleName, ParameterName, BitNumber, TypeOfValue,_ BitValue)
6.10.3.59 SetParameterBit Sets a parameter bit directly at the MC system. Bits 0 to 16 for data type Float, bits 0 to 32 for data type Double. Parameters
Description
ModuleName
Name of EEI module. String.
ParameterName
Name of parameter
BitNumber
Number of bits from 0 to 16 for parameters of type Float and 32 for parameters of type Double.
BitValue
Value of the bit (0 or1).
Script function/command: Sub EeiSetParameterBit(ModuleName, ParameterName, BitNumber, BitValue)
6.10.3.60 GetParameter (Synchronous) This AO allows the synchronous get of a parameter. No specified normname will result in a BSQ exception. Parameters
Description
ModuleName
Name of the module
Parametername
Name of the parameter. String as input
Normname
Name of parameter.
AVL PUMA Open 2012 — Scripting in PUMA Open
335
336
Functions of the PUMA Open Script API
Parameters
Description
ErrorCodeNormname
Optional normname 0 = no error, unequal 0 = mistake in execution of AO
BsqException
Choice for a BSQ exception "Unspecified Fault" 0 = no exception 1 = exception in case of an error
Script function/command: Sub EeiGetParameterSynchronous(ModuleName, ParameterName, NormName, ErrorCodeNormname, BsqException)
6.10.3.61 SetParameter (Synchronous) This AO allows the synchronous set of a parameter. No specified normname will result in a BSQ exception. Parameters
Description
ModuleName
Name of the module
ParameterName
Name of the parameter. String as input
ParameterValue
Name of parameter.
ErrorCodeNormname
Optional normname 0 = no error, unequal 0 = mistake in execution of AO
BsqException
Choice for a BSQ exception "Unspecified Fault" 0 = no exception 1 = exception in case of an error
Script function/command: Sub EeiSetParameterSynchronous(ModuleName, ParameterName, ParameterValue, ErrorCNormName, BsqException)
6.10.3.62 GetMap (Synchronous) This AO allows the synchronous get of a lookup table. No specified normname will result in a BSQ exception. Parameters
Description
ModuleName
Name of the module
MapName
Name of the lookup table. String as input
ErrorCodeNormname
Optional normname 0 = no error, unequal 0 = mistake in execution of AO
BsqException
Choice for a BSQ exception "Unspecified Fault" 0 = no exception 1 = exception in case of an error
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
Script function/command: Sub EeiGetMapSynchronous(ModuleName, MapName, ErrorNormName, BsqException)
6.10.3.63 A3GetLookUpTable (Synchronous) Transfers the complete map from MC system to PUMA. The command is executed synchronously. Parameters
Description
ModuleName
Name of the module
MapName
Name of the lookup table. String as input
ErrorCodeNormname
Optional normname 0 = no error, unequal 0 = mistake in execution of AO
BsqException
Choice for a BSQ exception "Unspecified Fault" 0 = no exception 1 = exception in case of an error
Script function/command: Sub EeiGetLookUpTableSynchronous(ModuleName, MapName, ErrorNormName, BsqException)
6.10.3.64 A3IncreaseLookUpTable (Synchronous) Add offset to map values. The area within the map is defined by start index (>= 1) and delta value (>= 1). The command is executed synchronously. Parameters
Description
ModuleName
Name of the module
MapName
Name of table. String.
XIndex
Start index on x-axis or normname containing the start index (>= 1). String.
YIndex
Start index on y-axis or normname containing the start index (>= 1). String.
XDelta
Area in direction of x-axis or normname containing the area (>= 1). String.
YDelta
Area in direction of y-axis or normname containing the area (>= 1). String.
Offset
Offset value in direction of z-axis or normname containing the offset. String.
ErrorCodeNormname
Optional normname 0 = no error, unequal 0 = mistake in execution of AO
BsqException
Choice for a BSQ exception "Unspecified Fault" 0 = no exception 1 = exception in case of an error
6.10.3.65 A3ResetDevice(Synchronous) Reset device, optional with reset of all selected LUNs. The command is executed synchronously. Parameters
Description
ModuleName
Name of the module
ResetallLUN
"0" to reset all selected LUNs, otherwise ‘‘‘‘. String.
ErrorCodeNormname
Optional normname 0 = no error, unequal 0 = mistake in execution of AO
BsqException
Choice for a BSQ exception "Unspecified Fault" 0 = no exception 1 = exception in case of an error
Script function/command: Sub EeiResetDeviceSynchronous(ModuleName, ResetallLUN, ErrorNormName, _ BsqException)
6.10.3.66 A3SetLookUptable (Synchronous) Set constant value in map. The area within the map is defined by start index (>= 1) and delta value (>= 1). The command is executed synchronously. Parameters
Description
ModuleName
Name of the module
MapName
Name of table. String.
XIndex
Start index on x-axis or normname containing the start index (>= 1). String.
YIndex
Start index on y-axis or normname containing the start index. String.
XDelta
Area in direction of x-axis or normname containing the area (>= 1). String.
YDelta
Area in direction of y-axis or normname containing the area (>= 1). String.
Constant
Constant value in direction of z-axis or normname containing the value (>= 1). String.
ErrorCodeNormname
Optional normname 0 = no error, unequal 0 = mistake in execution of AO
BsqException
Choice for a BSQ exception "Unspecified Fault" 0 = no exception 1 = exception in case of an error
6.10.3.67 Increase Map (Synchronous) Add offset to map values. The area within the map is defined by start values x1, y1 and end values x2, y2. The command is executed synchronously. Parameters
Description
ModuleName
Name of the module
MapName
Name of table. String.
Constant
Offset value in direction of z-axis or normname containing the value. String.
X1
Start value on x-axis or normname containing the start value. String.
Y1
Start value on y-axis or normname containing the start value. String.
X2
End value on x-axis or normname containing the end value. String.
Y2
End value on y-axis or normname containing the end value. String.
ErrorCodeNormname
Optional normname 0 = no error, unequal 0 = mistake in execution of AO
BsqException
Choice for a BSQ exception "Unspecified Fault" 0 = no exception 1 = exception in case of an error
6.10.3.68 Increase Map Curve (Synchronous) Add offset to a curve. The area within the curve is defined by start value X1 and end value X2. The command is executed synchronously. Parameters
Description
ModuleName
Name of the module
MapName
Name of table. String.
Constant
Offset value in direction of z-axis or normname containing the value. String.
X1
Start value on x-axis or normname containing the start value. String.
X2
End value on x-axis or normname containing the end value. String.
ErrorCodeNormname
Optional normname 0 = no error, unequal 0 = mistake in execution of AO
BsqException
Choice for a BSQ exception "Unspecified Fault" 0 = no exception 1 = exception in case of an error
AVL PUMA Open 2012 — Scripting in PUMA Open
339
340
Functions of the PUMA Open Script API
Script function/command: Sub EeiIncMapCurve(SynchronousModuleName, MapName, Constant, X1, X2, ErrorCodeNormname, BsqException)
6.10.3.69 Increase Map Total (Synchronous) Add offset to map values in the whole map. The command is executed synchronously. Parameters
Description
ModuleName
Name of the module
MapName
Name of table. String.
Constant
Offset value in direction of z-axis or normname containing the offset. String.
ErrorCodeNormname
Optional normname 0 = no error, unequal 0 = mistake in execution of AO
BsqException
Choice for a BSQ exception "Unspecified Fault" 0 = no exception 1 = exception in case of an error
Script function/command: Sub EeiIncMapTotalSynchronous(ModuleName, MapName, Constant, ErrorCodeNormname, BsqException)
6.10.3.70 MapReset (Synchronous) Reset of all changed maps. The command is executed synchronously. Parameters
Description
ModuleName
Name of the module
ErrorCodeNormname
Optional normname 0 = no error, unequal 0 = mistake in execution of AO
BsqException
Choice for a BSQ exception "Unspecified Fault" 0 = no exception 1 = exception in case of an error
Script function/command: Sub EeiResetAllMaps(ModuleName, ErrorCodeNormname, BsqException)
6.10.3.71 Parameter Reset (Synchronous) Reset of all changed parameters. The command is executed synchronously.
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
Parameters
Description
ModuleName
Name of the module
ErrorCodeNormname
Optional normname 0 = no error, unequal 0 = mistake in execution of AO
BsqException
Choice for a BSQ exception "Unspecified Fault" 0 = no exception 1 = exception in case of an error
Script function/command: Sub EeiResetAllParametersSynchronous(ModuleName, ErrorCodeNormname, BsqException)
6.10.3.72 Put Map (Synchronous) Transfer complete map to MC system. The command is executed synchronously. Parameters
Description
ModuleName
Name of the module
MapName
Name of table. String.
ErrorCodeNormname
Optional normname 0 = no error, unequal 0 = mistake in execution of AO
BsqException
Choice for a BSQ exception "Unspecified Fault" 0 = no exception 1 = exception in case of an error
Script function/command: Sub EeiPutMap(SynchronousModuleName, MapName, ErrorCodeNormname, BsqException)
6.10.3.73 Put Parameter (Synchronous) Transfer of the parameter to MC system. The command is executed synchronously. Parameters
Description
ModuleName
Name of the module
ParName
Name of parameter. String.
ErrorCodeNormname
Optional normname 0 = no error, unequal 0 = mistake in execution of AO
BsqException
Choice for a BSQ exception "Unspecified Fault" 0 = no exception 1 = exception in case of an error
Script function/command:
AVL PUMA Open 2012 — Scripting in PUMA Open
341
342
Functions of the PUMA Open Script API
Sub EeiPutParameterSynchronous(ModuleName, ParName, ErrorCodeNormname, BsqException)
6.10.3.74 Set Map (Syncheronous) Set constant value in map. The area within the map is defined by start values x1, y1 and end values x2, y2. The command is executed synchronously. Parameters
Description
ModuleName
Name of the module
MapName
Name of table. String.
Constant
Constant value in direction of z-axis or normname containing the value. String.
X1
Start value on x-axis or normname containing the start value. String.
Y1
Start value on y-axis or normname containing the start value. String.
X2
End value on x-axis or normname containing the end value. String.
Y2
End value on y-axis or normname containing the end value. String.
ErrorCodeNormname
Optional normname 0 = no error, unequal 0 = mistake in execution of AO
BsqException
Choice for a BSQ exception "Unspecified Fault" 0 = no exception 1 = exception in case of an error
6.10.3.75 SetMap Total(Synchronous) Set constant value in the whole map. The command is executed synchronously. Parameters
Description
ModuleName
Name of the module
MapName
Name of table. String.
Constant
Offset value in direction of z-axis or normname containing the offset. String.
ErrorCodeNormname
Optional normname 0 = no error, unequal 0 = mistake in execution of AO
BsqException
Choice for a BSQ exception "Unspecified Fault" 0 = no exception 1 = exception in case of an error
Script function/command:
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
Sub EeiSetMapTotalSynchronous (ModuleName, MapName, Constant, ErrorCodeNormname, BsqException)
6.10.3.76 SetMapCurve (Synchronous) Set constant value in a curve. The area within the curve is defined by start value X1 and end value X2. The command is executed synchronously. Parameter
Beschreibung
ModuleName
Name of the module
MapName
Name of table. String.
Constant
Offset value in direction of z-axis or normname containing the offset. String.
X1
Start value on x-axis or normname containing the start value. String.
X2
Start value on y-axis or normname containing the start value. String.
ErrorCodeNormname
Optional normname 0 = no error, unequal 0 = mistake in execution of AO
BsqException
Choice for a BSQ exception "Unspecified Fault" 0 = no exception 1 = exception in case of an error
6.10.3.77 EEIActivateChangePropagation With this AO the change propagation mechanism can be activated/deactivated for the specified module (mode: on/off). When activated, any change of the value of the NormName that is associated with a parameter or lookup table for the module will be propagated to the application system and further to the electronic control unit. The result is the same as if the SetParameter or SetMapTotal command is used. Parameter
Beschreibung
ModuleName
Name of the module
Mode
on/off
Script function/command: Sub EeiActivateChangePropagation(ModuleName, Mode)
6.10.4
Testrun Executor
6.10.4.1
Position Testrun Script function/command: Not supported by the PO Script API!
AVL PUMA Open 2012 — Scripting in PUMA Open
343
344
Functions of the PUMA Open Script API
6.10.4.2
Reset testrun Script function/command: Not supported by the PO Script API!
6.10.4.3
Execution log Script function/command: Not supported by the PO Script API!
6.10.4.4
Start routine Script function/command: Not supported by the PO Script API!
6.10.4.5
Reset This activation resets the point of execution of the current testrun to the very beginning. Parameter
Description
Device
Name of the Device. If an empty name is specified, then the actual BSQ testrun is reset.
Script function/command: Sub TrxReset(DeviceName)
6.10.4.6
Set single-step mode Script function/command: Not supported by the PO Script API!
6.10.4.7
Single Step Script function/command: Not supported by the PO Script API!
6.10.4.8
Position to record Script function/command: Not supported by the PO Script API!
6.10.4.9
Position to time Script function/command: Not supported by the PO Script API!
6.10.4.10 Position to revolutions Script function/command: Not supported by the PO Script API!
6.10.4.11 Position to record with reset Script function/command: Not supported by the PO Script API!
6.10.4.12 Position to time with reset Script function/command: Not supported by the PO Script API!
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
6.10.4.13 Position to revolutions with reset Script function/command: Not supported by the PO Script API!
6.10.5
Step Sequence Commands
6.10.5.1
Start Script function/command: Not supported by the PO Script API!
6.10.5.2
Stop Script function/command: Not supported by the PO Script API!
6.10.5.3
Set Position Script function/command: Not supported by the PO Script API!
6.10.5.4
Reset Script function/command: Not supported by the PO Script API!
6.10.5.5
Set denormalization mode Script function/command: Not supported by the PO Script API!
6.10.5.6
Start single step Script function/command: Not supported by the PO Script API!
6.10.5.7
Enable Look-Ahead Driver Script function/command: Not supported by the PO Script API!
6.10.5.8
Disable Look-Ahead Driver Script function/command: Not supported by the PO Script API!
6.10.5.9
Select Continuation Mode Script function/command: Not supported by the PO Script API!
6.10.5.10 Set default gearshift profile Script function/command: Not supported by the PO Script API!
6.10.5.11 Sert gearshift profile Script function/command: Not supported by the PO Script API!
6.10.5.12 Pause Script function/command: Not supported by the PO Script API! AVL PUMA Open 2012 — Scripting in PUMA Open
345
346
Functions of the PUMA Open Script API
6.10.5.13 Interrupts Script function/command: Not supported by the PO Script API!
6.10.5.14 Choose demand value type Script function/command: Not supported by the PO Script API!
6.10.6
EC-Recorder
6.10.6.1
Start Starts recording. Script function/command: Sub EcrStart()
6.10.6.2
Stop Stops recording. Script function/command: Sub EcrStop()
6.10.7
MCD3D
6.10.7.1
Connect D-System Establish connection to the D-System. That means, the server is connected and initialized and a project is selected. Parameter
Description
Device
Name of the Device
Script function/command: Sub mcd3d_ConnectDSystem(DeviceName)
6.10.7.2
Disconnect D-System The connection to the D-System to which the device belongs is released. If any devices (modules) of this D-System are connected, all cyclic services are stopped and the modules are disconnected. Parameter
Description
Device
Name of the Device
Script function/command: Sub mcd3d_DisconnectDSystem(DeviceName)
6.10.7.3
Connect Module Establish connection to the module (Logical link). That means, the Logical link is opened and the communication with the ECU module is established.
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
Parameter
Description
Device
Name of the Device
Script function/command: Sub mcd3d_ConnectModule(DeviceName)
6.10.7.4
Disconnect Module The connection to the module (Logial link) is released. All cyclic services are stopped and the modules are disconnected. Parameter
Description
Device
Name of the Device
Script function/command: Sub mcd3d_DisconnectModule(DeviceName)
6.10.7.5
Execute Service A diagnostic script is activated. Parameter
Description
Device
Name of the Device
ServiceName
Name of the Service
Script function/command: Sub mcd3d_ExecuteService(DeviceName,ServiceName,ServiceParam)
6.10.7.6
Start Service A diagnostic service is marked for periodic activation. Parameter
Description
Device
Name of the Device
ServiceName
Name of the Service
Frequency
Frequency ID
ServiceParam
Parameters of the service
Script function/command: Sub mcd3d_StartService(DeviceName,ServiceName,Frequency,ServiceParam)
6.10.7.7
Stop Service The cyclic activation of a diagnostic service is stopped, that means the service execution is stopped after the next cycle. Parameter
Description
Device
Name of the Device
ServiceName
Name of the Service
Script function/command: Sub mcd3d_StopService(DeviceName, ServiceName)
AVL PUMA Open 2012 — Scripting in PUMA Open
347
348
Functions of the PUMA Open Script API
6.10.7.8
Start All Services All diagnostic services of one device are marked for periodic activation. Parameter
Description
Device
Name of the Device
Script function/command: Sub mcd3d_StartAllServices(DeviceName)
6.10.7.9
Stop All Services The cyclic activation of all diagnostic services is stopped. Parameter
Description
Device
Name of the Device
Script function/command: Sub mcd3d_StopAllServices(DeviceName)
6.10.7.10 Set Service Frequency The frequency property of the service is changed. Parameter
Description
Device
Name of the Device
ServiceName
Name of the service
ServiceFrequency
Frequency ID
Script function/command: Sub mcd3d_SetServiceFrequency(DeviceName,ServiceName,ServiceFrequency)
6.10.7.11 Set Service Acquisition Flag The acquisition flag for the service is set to yes/no. Parameter
Description
Device
Name of the Device
ServiceName
Name of the service
On/Off
State of acquisition flag to set.
Script function/command: Sub mcd3d_SetServiceAcquisitionFlag (DeviceName,ServiceName,OnOff)
6.11
Chassis Dyno Control
6.11.1
Driver´s Aid
6.11.1.1
Load Driving Cycle Load Driving Cycle to Driver's Aid
Coastdown without vehicle Starts a coastdown procedure without vehicle using EPA limits or limits as defined in the section “Coastdown” of the VEH parameters. AK command: SRAL
6.11.2.10 Get coastdown results Gets the results of a previously performed coastdown run and stores them in the VEH parameters in the section “Coastdown results”. AK command: ARAL Script function/command: Cdh_AVLCDC_GetCoastDownResultsARAL
6.11.2.11 Get vehicle velocity limits Gets the velocity limit from the vehicle and stores it in the VEH parameters in the section “Vehicle and Driveline Parameters”. AK command: AVMA Script function/command: Cdh_AVLCDC_GetVehicleVMaxLimit
6.11.2.12 Head wind blower Starts or stops the vehicle cooling fan. AK command: SGEI / SGAU Parameters
Execute Activates an individual script in a defined script context.
AVL PUMA Open 2012 — Scripting in PUMA Open
355
356
Functions of the PUMA Open Script API
Parameters
Description
Scriptlet
Statements in VBScript syntax. String.
Script function/command: Scriptlet
6.12.1.2
Script All script functions and script context functions declared as "public" cannot only be accessed via scriptlet base functions but also using a DOT-notation based syntax. Activation is synchronized. Information Avoid recursive activation when calling up user defined script functions from other user defined script contexts, e.g. function 'A1' of context 'CtxA' calls up function 'B' of context 'CtxB', which itself tries to call up function 'A2' of context 'CtxA'. Parameters
Description
Name
Name of the script context within which the scriptlet is executed.
String.
Script function/command: Function Script(Name)
Example Dim Result, C C=99 Result
= Script("CtxB").B(C)
The following list of functions enables the user to access user-defined scripts (which have been defined by means of a special script context) within other user-defined script contexts.
6.12.1.3
ScrExecute Executes the defined scriptlet within an assigned script context. Scriptlet execution is synchronized, i.e. the activation is not returned before the scriptlet has been executed. Parameters
Description
ContextName
Context within which the scriptlet is executed.
MonitorTimeout
String.
Checks whether or not the script to be executed should monitor execution.
Enumeration:
0...do not monitor 1...monitor
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
Parameters
Description
Timeout
Is active if "MonitorTimeout" has been enabled. This parameter monitors the current time-out [s].
Scriptlet
Set of instructions in the VBScript syntax.
String.
Script function/command: State = ScrExecute("ContextName", MonitorTimeout, Timeout, "Scriptlet")
6.12.1.4
ScrExecuteEx Similar to function ScrExecute, the only difference being that you can additionally specify a context ID and a module name. Parameters
Description
ContextName
Context within which the scriptlet is executed.
ContextId
A script context may contain identical execution contexts which are processed separately and are identified by their context ID. Every user-defined context consists of an execution context, which is identified by its ID.
ModuleName
Long
All coding in a PO script context is subdivided into modules. All of the PO Script API functions are loaded into the main module (default module) and all user-defined scripts are loaded into the user module.
MonitorTimeout
String.
String.
Checks whether or not the script to be executed should monitor execution.
Enumeration:
0...do not monitor 1...monitor Timeout
Is active if "MonitorTimeout" has been enabled. This parameter monitors the current time-out [s].
Scriptlet
Set of instructions in the VBScript syntax.
String.
Script function/command: State = ScrExecuteEx("ContextName", ContextId, "ModuleName" MonitorTimeout, Timeout, "Scriptlet")
6.12.1.5
ScrStartExecute Starts to execute a defined scriptlet within the assigned script context.
AVL PUMA Open 2012 — Scripting in PUMA Open
357
358
Functions of the PUMA Open Script API
Parameters
Description
ContextName
Context within which the scriptlet is executed.
MonitorTimeout
String.
Checks whether or not the script to be executed should monitor execution.
Enumeration:
0...do not monitor 1...monitor Timeout
Is active if "MonitorTimeout" has been enabled. This parameter monitors the current time-out [s].
ScrStartExecuteEx Similar to "ScrStartExecute", the difference being that you can also specify a context ID and a module name. Parameters
Description
ContextName
Context within which the scriptlet is executed.
ContextId
A script context may contain identical execution contexts which are processed separately and are identified by their context ID. Every user-defined context consists of an execution context, which is identified by its ID "0".
ModuleName
Long
All coding in a PO script context is subdivided into modules. All of the PO Script API functions are loaded into the main module (default module) and all user-defined scripts are loaded into the user module.
MonitorTimeout
String.
String.
Checks whether or not the script to be executed should monitor execution.
Enumeration:
0...do not monitor 1...monitor Timeout
Is active if "MonitorTimeout" has been enabled. This parameter monitors the current time-out [s].
ScrSynchronize Waits until a previously started script activation has been processed. Parameters
Description
SyncObject
The returned value of the function represents a synchronized object that can be used via "ScrSychronize".
Object
Script function/command: State = ScrSynchronize(SyncObject)
6.12.1.8
Script All script functions and script context functions declared as "public" cannot only be accessed via one of the script-based functions described above but also using a DOT-notation based syntax. Example Avoid recursive activation when calling up user defined script functions from other user defined script contexts, i.e. function 'A1' of context 'CtxA' calls up function 'B' of context 'CtxB' which itself tries to call up function 'A2' of context 'CtxA'. Parameters
Description
ContextName
Name of script context within which the scriptlet is executed. String.
Parameter1..n
List of script function parameters that have been defined within the script context.
Reads a parameter from the dyno. The returned value is available on EMCON system variable CC_SV_CK_VALUE as soon as the EMCON system variable EMCON Variable CC_SV_CK_TOGGLE changes its value (toggle value 0<->1). Contents of CC_SV_CK_VALUE: Get Success
value of dyno parameter
AVL PUMA Open 2012 — Scripting in PUMA Open
359
360
Functions of the PUMA Open Script API
Get Abort
104aaaaa
aaaaa....abort code
Get Error
1050eeee
eeee......error code
Abort code aaaaa:
00003... access to Kiwi memory not allowed
00302...time exceeded when waiting for answer after Get or Put
Error code eeee:
0000...unknown number of parameters
0003...subindex out of range
0004...subindex must be zero
0103...no read access
0104...parameter number belongs to KCT
0105...setting not activated
0108...incompatibility between SW version and parameter action
0120...command not accepted
0199...default value, error cause unknown
Parameters
Description
Dyno
Dyno index (1..5; 0=all dynos)
Index
Index of parameter (0...4000)
SubIndex
Subindex of parameter (0...32767)
Script function/command: Sub DynGetParameter(Dyno, Index, SubIndex)
6.13.1.2
Set parameter Sets a dyno parameter. A result code is available on the EMCON system variable CC_SV_CK_VALUE as soon as the EMCON system variable CC_SV_CK_TOGGLE changes its value (toggle value 0<->1). Contents of CC_SV_CK_VALUE: Get Success
value of dyno parameter
Get Abort
104aaaaa
aaaaa....abort code
Get Error
1050eeee
eeee......error code
Abort code aaaaa:
00003... access to Kiwi memory not allowed
00302...time exceeded when waiting for answer after Get or Put
00305...time-out when waiting for dyno to get ready
xxx04...value out of range
Error code eeee:
0000...unknown number of parameters
0001...no write permission
0002...parameter limit exceeded
0003...subindex out of range
0004...subindex must be zero
0005...wrong parameter format
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
0006...only reset allowed (value 0)
0017... not allowed in current state
0101...saving of parameter during run
0102...no online mode, no write access
0103...no read access
0104...parameter number belongs to KCT
0105...setting not activated
0107...invalid code for factory setting or parameter reset
0108...incompatibility between SW version and parameter action
0120...command not accepted
0199...default value, error cause unknown
Parameters
Description
Dyno
Dyno index (1..5; 0=all dynos)
Index
Index of parameter (0...4000)
SubIndex
Subindex of parameter (0...32767)
Value
Value of dyno parameter
Script function/command: Sub DynSetParameter(Dyno, Index, SubIndex, Value)
6.14
Miscellaneous
6.14.1
Common Commands
6.14.1.1
Start Application Starts the specified application. ‘
Parameters
Description
Application
Name of the application to be started including path. String.
WaitUntilClosed
Halts processing until the application is closed (in BSQ or script only). Counter 0...‘No‘ 1...‘Yes‘
Script function/command: Sub CmnStartApplication(Application, WaitUntilClosed)
Example If the parameter "Application" contains blanks (e.g. because the application's path contains blanks), the entire parameter contents must be put between double quotes.
AVL PUMA Open 2012 — Scripting in PUMA Open
361
362
Functions of the PUMA Open Script API
Abb. 54 Information If 'Common Commands \Start Application' PO Script API function ‘CmnStartApplication‘ is used, 3 double quotes must be put before and after the application string (see the example given below): Example """C:\Program Files\Common Files\Microsoft Shared\PhotoEd\PhotoEd.exe""",0
6.14.1.2
Wait with condition Waits until the condition has been met or the time-out has elapsed during test run execution (in BSQ or script). Information The entire time-out is limited to Tmax < 1000 s. Parameters
Description
Condition
Logical expression that is monitored about 10 times a second. Expression string.
Timeout
Maximum monitoring time-out (s). Numeric value or expression string.
Script function/command: Function CmnSynchronize(Condition, Timeout) AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
6.14.1.3
Wait Halts test run execution (in BSQ or script) until the time-out has elapsed. Information The entire time-out is limited to Tmax < 1000 s. Parameters
Description
Timeout
Maximum monitoring time-out (s). Numeric value or expression string.
Script function/command: Sub CmnWait(Timeout)
6.14.1.4
End exception routine Script function/command: Not supported by the PO Script API!
6.14.1.5
Define 'Return from Exception' point Script function/command: Not supported by the PO Script API!
6.14.1.6
VarEvaluate Evaluates the expression specified in the VBScript syntax. The standard VBScript functions and operators can be used and normnames can be accessed in this expression. Parameters
Description
Expression
Numeric value or formula expression string in VBScript syntax.
Script function/command: Function VarEvaluate(Expression)
Example ChnSet "RESCHA40", VarEvaluate("RESCHA41/RESCHA42+RESCHA43")
6.14.1.7
VarEvaluateEx Evaluates the expression specified in the VBScript syntax according to the 'EvaluationMode' parameter.
AVL PUMA Open 2012 — Scripting in PUMA Open
363
364
Functions of the PUMA Open Script API
Parameters
Description
Expression
Numeric value or formula expression string in VBScript syntax.
EvaluationMode
Determines how to interpret the assigned Expression parameter.
· eNoEvaluation = 0: Expression is not interpreted and is returned. · eEvaluateChannel = 1: If the expression can also be interpreted as channel name (e.g. RESCHA40), the value of the channel is returned. Otherwise, the expression is not interpreted and is returned. eEvaluateExpression = 2: The expression is interpreted as a mathematical expression (e.g. "12.99+RESCHA40*RESCHA41+R ESCHA42") and the result is returned.
Information Expression parameters of the type string which contain sequences of '$c(ChannelName).v' entries are replaced by the online value of the specified channel during run time, independent of the evaluation mode, and the resulting string is used. If the parameter "Expression" can be interpreted as a numeric value (e.g. 1.33, "5.66"), the numeric value is used immediately. Script function/command: Function VarEvaluateEx(Expression, EvaluationMode)
Example ChnSet "RESCHA40", VarEvaluateEx("RESCHA41/RESCHA42+RESCHA43",_ eEvaluateExpression)
6.14.1.8
VarExecute Executes the expression specified in the VBScript syntax. The standard VBScript functions and operators can be used and normnames can be accessed in this expression. Parameters
Description
Expression
Expression in VBScript syntax.
Script function/command: Function VarExecute(Expression)
Example VarExecute("RESCHA40=RESCHA41/RESCHA42+RESCHA43")
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
Information The difference between 'VarEvaluate' and 'VarExecute' is in the handling of the operator '=': It is interpreted as a relational operator by 'VarEvaluate' and as an 'assignment operator by 'VarExecute'. The expression ChnSet "RESCHA44", VarEvaluate("RESCHA40=RESCHA41/RESCHA42+RESCHA43")
thus returns the result 'True' or 'False'.
6.14.1.9
VarIsVariable Checks whether the specified channel name actually denotes a normname, bitname or temporary name. Parameters
Description
Variable
Name of variable. String.
Script function/command: Function VarIsVariable(Variable)
Example Dim ChannelName ChannelName="Charly" If VarIsVariable(ChannelName) Then ChnSet ChannelName, 123.4 Else PoiSendMessage 4, "Invalid channel Name: " & ChannelName End If
6.14.1.10 DevIsDevice Checks whether the specified device name really denotes a device or device class. Parameters
Description
DeviceName
Name of device or device class. Data type: String. Format 'ClassName.DeviceName' or 'ClassName'. Possible result values: eDQRNotFound = 0 eDQRIsDevice = 1 eDQRIsClass = 2
Script function/command: Function DevIsDevice(DeviceName)
AVL PUMA Open 2012 — Scripting in PUMA Open
365
366
Functions of the PUMA Open Script API
Example Dim DeviceName DeviceName ="LookupTable.ENGMAP" If DevIsDevice(ChannelName) = eDQRIsDevice Then PoiSendMessage 1, "Device '" & DeviceName & "' exists!", 0 Else PoiSendMessage 1, "Device '" & DeviceName & "' does not exist!", 0 End If
6.14.1.11 DevGetClasses Searches for all registered device classes of a given device category and returns them in a string. The individual device class names are separated by ';'. Parameters
Description
Category
Identifies an amount of device classes. The same device class can be used in several categories. Data type: Long Possible categories: eCatAll eCatQuantity
Script function/command: Function DevGetClasses(Category)
Example Dim Classes Classes = Split(DevGetClasses(eCatAll), ";") For I = 0 To Ubound(Classes) MsgBox Classes(I) Next
6.14.1.12 Searches for all registered devices of a specified device class. The individual device names are separated by ';'. Parameters
Description
ClassName
Identifies a device class. Data type: String.
Script function/command: AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
Function DevGetDevices(ClassName)
Example Dim Devices Devices = Split(DevGetDevices("LookupTable"), ";") For I = 0 To Ubound(Devices) MsgBox Devices(I) Next
6.14.1.13 DevGetChannels Searches for all channels of a device belonging to a given device class. The individual channel names are separated by ';'. Parameters
Description
DeviceName
Identifies a device. Data type: String. Format 'ClassName.DeviceName'
QueryMode
Identifies whether the channel list includes the input channel list, output channel list or both. Data type: Long eDCQModeBoth = 0 eDCQModeInput = 1 eDCQModeOutput = 2
ChannelAttribute
Identifies the channel name. Data type: Long eDCASystemChannelName = 0 eDCADeviceChannelName = 1 eDCASystemName eDCANormName
=2 =3
eDCANormSystemName = 4 eDCADeviceName
=5
If a given name has not been set, the character '*' is returned instead. Script function/command: Function DevGetChannels(DeviceName, QueryMode, ChannelAttribute)
Example Dim Channels Channels = _ DevGetChannels("LookupTable.ENGMAP",eDCQModeBoth,eDCADeviceChannelName) Channels = Split(Channels,";") For I = 0 To Ubound(Channels) MsgBox Channels (I) Next
AVL PUMA Open 2012 — Scripting in PUMA Open
367
368
Functions of the PUMA Open Script API
6.14.1.14 DevGetChannelCount Returns the number of input/output channels of a device. Parameters
Description
DeviceName
Identifies a device. Data type: String. Format 'ClassName.DeviceName'
QueryMode
Identifies whether the input channel list or the output channel list is evaluated. Data type: Long eDCQModeInput = 1 eDCQModeOutput = 2
Script function/command: Function DevGetChannelCount(DeviceName, QueryMode)
Example Dim NumberOfChannels NumberOfChannels = DevGetChannelCount("LookupTable.ENGMAP",eDCQModeInput) MsgBox "Number of input channels: " & NumberOfChannels NumberOfChannels = DevGetChannelCount("LookupTable.ENGMAP",eDCQModeOutput) MsgBox "Number of output channels: " & NumberOfChannels
6.14.1.15 DevGetChannelInfo Returns one of the many name attributes of a device channel. Parameters
Description
DeviceName
Identifies a device. Data type: String. Format 'ClassName.DeviceName'
Index
Identifies an entry in the input or output channel list. Data type: Long 0 <= index < number of channels
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
Parameters
Description
QueryMode
Identifies whether the input channel list or the output channel list is evaluated. Data type: Long eDCQModeInput = 1 eDCQModeOutput = 2
ChannelAttribute
Identifies the channel name. Data type: Long eDCASystemChannelName = 0 eDCADeviceChannelName = 1 eDCASystemName eDCANormName
=2 =3
eDCANormSystemName = 4 eDCADeviceName
=5
If a given name has not been set, the character '*' is returned instead. Script function/command: Function DevGetChannelInfo(DeviceName, Index, QueryMode, ChannelAttribute)
Example Dim Name Name = DevGetChannelInfo("LookupTable.ENGMAP",0, eDCQModeInput,_ eDCADeviceChannelName) MsgBox "Device channel name of input 0: " & Name Name = DevGetChannelInfo("LookupTable.ENGMAP",0,eDCQModeInput, eDCANormName) MsgBox "Normname of input 0: " & Name
6.14.1.16 StartApplicationEx Starts the specified application and returns the application's exit code.
AVL PUMA Open 2012 — Scripting in PUMA Open
369
370
Functions of the PUMA Open Script API
Parameters
Description
Application
Name of the application to be started including its path. String.
WindowStyle
Specifies whether the application window is minimized or maximized, etc. Enumerator. 0...hides window and activates another window 1...Activates and displays window. If the window has been minimized or maximized, the system restores it to its original size and position. An application should specify this flag as soon as the window is displayed for the first time. 2...Activates window and displays it minimized 3...Activates window and displays it maximized 4...Shows window in its usual size and position 5...Activates window in its usual size and position 6...Minimizes the specified window and activates the window on the next level in the Z-order. 7...Displays minimized window; window remains active. 8...Displays window in its current status. The active window remains active. 9...Activates and displays window. If the window has been minimized or maximized, the system restores it to its original size and position. An application should specify this flag as soon as the window is displayed for the first time. 10...Sets the display status based on the status of the program that started the application.
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
Parameters
Description
WaitUntilClosed
Execution, if specified, is halted until the application is closed again (only if used in a BSQ test run or script). Enumerator. 0...No 1...Yes
Attribute
Identifies the channel name. Data type: Long eDCASystemChannelName = 0 eDCADeviceChannelName = 1 eDCASystemName eDCANormName
=2 =3
eDCANormSystemName = 4 eDCADeviceName
=5
If a given name has not been set, the character '*' is returned instead.
Returned Value
Description
Result
Exit code of application that has been started (if "WaitUntilClosed" has been set to 1).
Script function/command: Function CmnStartApplicationEx(Application, _ Windowstyle, WaitUntilClosed)
Example Sub MyStartApplication(Application) Dim Res Res = CmnStartApplicationEx(Application, 0, 1)
PoiSendMessage 1, "Return code '" & Res & "' for command '" & Application & "'", 0 Select Case Res Case 1 'do this… ' Case 2 'do that… ' Case 3 'do something else… ' Case Else 'don't know what to do… ' End Select End Sub
AVL PUMA Open 2012 — Scripting in PUMA Open
371
372
Functions of the PUMA Open Script API
6.14.2
CameoAgentConnection
6.14.2.1
Reconnect Reconnects to Cameo's CameoAgent Agent. Script function/command: CagReConnect
6.14.2.2
Start Cameo Starts Cameo for use with CameoAgent. Parameters
Refresh global resource Updates a specified global resource in the online system. The script only refreshes those global resources that match the test field distribution filter. Parameters
Description
FDUName
Name of global resource. The following values may be returned: eTddRefOk = 0 eTddRefError = 1 eTddRefErrorTimeOut = 2 (default timeout value = 60 s) eTddRefErrorNotFound = 3
Script function/command: Function TddRefresh(FduName)
6.14.4
Central Data
6.14.4.1
Refresh Group Updates the activated instance of the selected group and saves all values (of the updated instance) in the online system's system channels. Parameters
Description
GroupName
Name of selected group.
Script function/command: Sub CdmRefresh(GroupName)
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
6.14.4.2
Activate Instance Activates the selected instance of the selected group and saves all values (of the instance) in the online system's system channels. The previously active instance of the group, if available, is deactivated. Parameters
Description
GroupName
Name of selected group.
InstanceName
Name of selected instance.
Script function/command: Sub CdmActivate(GroupName, InstanceName)
6.15
Monitoring
6.15.1
Limit Monitoring
6.15.1.1
Activate all Limits Activates the limit monitoring. Script function/command: Sub LimActivateLimits()
6.15.1.2
Deactivate all Limits Deactivates the entire limit monitoring. Script function/command: Sub LimDeactivateLimits()
6.15.1.3
Activate Limit Group Activates a limit monitoring device. Parameters
Description
Name
Name of device to be activated.
Script function/command: Sub LimActivate(Name)
6.15.1.4
Deactivate Limit Group Deactivates the step-specific limit monitoring. Script function/command: Sub LimDeactivate()
6.15.1.5
Deactivate all limits of a channel Deactivates the limit monitoring for a system channel.
AVL PUMA Open 2012 — Scripting in PUMA Open
373
374
Functions of the PUMA Open Script API
Parameters
Description
ChannelName
(Quantity) name of the system channel for which monitoring is disabled.
Script function/command: Sub LimDeactivateChannel(ChannelName)
6.15.1.6
Activate all limits of a channel Activates the limit monitoring for a system channel. Parameters
Description
ChannelName
(Quantity) name of the system channel for which monitoring is enabled.
Script function/command: Sub LimActivateChannel(ChannelName)
6.15.1.7
Enable Limit Group Only enabled limit groups will become active when limit monitoring is activated. Parameters
Description
Name
Name of the device that is switched on
Script function/command: Sub LimEnable(Name)
6.15.1.8
Disable Limit Group Disabled limit groups will not become active when limit monitoring is activated. Parameters
Description
Name
Name of the device that is switched on
Script function/command: Sub LimDisable(Name)
6.15.1.9
Set warning timeout Sets the default warning time-out. Parameters
Description
Timeout
Timeout Numeric value or expression string.
Script function/command: Sub LimSetWarningTimeout(Timeout)
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
6.15.2
Operational Data Monitoring
6.15.2.1
Start Timer Starts the timer without considering the formula result. Parameters
Description
TimerName
Quantity name of the timer that is to be started. String, no default value.
Script function/command: Sub OdmStartTimer(TimerName)
Example OdmStartTimer (TMR1)
6.15.2.2
Stop Timer Stops the timer without considering the formula result. Parameters
Description
TimerName
Quantity name of the timer that is to be stopped. String, no default value.
Script function/command: Sub OdmStopTimer(TimerName)
Example OdmStopTimer (TMR1)
6.15.2.3
Use formula Uses a formula result to decide whether to start or stop a timer. Starts a timer if the formula result is true and stops it if the formula result is false. Parameters
Description
DeviceName
Name of the ODA device; the default name "Operational Data Monitor" is used if an empty string is provided.
TimerName
Quantity name of the timer that is to be attached to the formula. String, no default value.
Increment Counter Increments the event counter by 1. Parameters
Description
TimerName
Quantity name to be used to identify the counter that is to be incremented. String, no default value.
Script function/command: Sub OdmIncrementCounter(TimerName)
Example OdmIncrementCounter (CNT1)
6.15.2.5
Set Timer Sets the timer or counter to the required value. Parameters
Description
TimerName
Quantity name of timer or event counter to be preset, or reset group number (1...8) if more than one timer is to be changed, or $ALL for all defined timers. String, no default value.
Script function/command: Sub OdmPresetTimer(TimerName)
Example OdmPreset (TMR1)
6.15.2.6
Store Stores all defined timers/counters in a $S record. The $S definition from the TFP/KEY block is no longer used. Instead, all timers/counters defined in OPDADEFF.TX are stored. Script function/command: Sub OdmStore()
Example OdmStore
6.15.2.7
Debit timer The idle timer (3rd timer, by default) is decremented by the received value. A $4 record is stored after decrementing.
AVL PUMA Open 2012 — Scripting in PUMA Open
Functions of the PUMA Open Script API
Parameters
Description
TimerName
Name of the ODA device; the default name "Operational Data Monitor" is used if an empty string is provided.
Value
Time value to be subtracted from the idle timer (seconds). Default value: 0
Script function/command: Sub OdmDebit(TimerName, Value)
Example OdmDebit (TMR1, 600)
6.15.2.8
Reset Timergroup Resets one or more timers that belong to one or more timer groups (sets them to 0). The timer group to which the timer is assigned is defined by the key "R" in opdadeff.tx (R 000011, which means that it belongs to timer group 4 and 3). Timer group 4 resets this timer. Parameters
Description
Group
Timer group.
Script function/command: Sub OdmResetTimerGroup(Group)
Example OdmResetTimerGroup (4)
6.15.3
PostMortem
6.15.3.1
Set 'Autosave' Timeout Sets the autosave time-out. Parameters
Description
Timeout
Timeout Numeric value or expression string.
Script function/command: Sub PmrSetAutoSaveTimeout(Timeout)
T Test Cell Control … 9 Testing … 37, 49 Interactively … 37 Step by step … 39 Toolbar … 44 Tracer … 40
U User-defined context … 23, 25
I Indicating device I670 (VDOS) … 128
AVL PUMA Open 2012 — Scripting in PUMA Open
381
382
Index
V Variables … 45 Vendor CD1 … 41
AVL PUMA Open 2012 — Scripting in PUMA Open
FOR FURTHER INFORMATION PLEASE CONTACT: AVL List GmbH, Hans List Platz 1, 8020 Graz, Austria Phone: +43 316 787-0, Fax: +43 316 787-400, eMail: [email protected], http://www.avl.com