Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
4
Users Guide
Copyright
The information in this document may not be altered or amended without
special notification from ETAS GmbH. ETAS GmbH undertakes no further obligation in relation to this document. The software presented herein is provided
on the basis of a general license agreement or a single license. Using and copying this document is allowed only in accordance with the stipulations specified
in this contract.
Under no circumstances may any part of this document be copied, reproduced, stored in a retrieval system or translated into another language without
the express written permission of ETAS GmbH.
Copyright 2006 ETAS GmbH, Stuttgart, Germany
The names and designations used in this document are trademarks or brands
belonging to the respective owners.
Document AM010101 R5.4.1 EN
Contents
1
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.1 About this Manual . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.2 Typographic Conventions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1.3 INCA Glossary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7
8
8
9
Licensing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
13
13
13
15
16
Contents
4.3
4.4
4.5
4.6
Contents
Initialization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
4.3.1
Open INCA. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
4.3.2
Open a Database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
4.3.3
Import a Database . . . . . . . . . . . . . . . . . . (INCA-MIP Extended)31
4.3.4
Read Database Items . . . . . . . . . . . . . . . . (INCA-MIP Extended)32
4.3.5
Assign Project and Dataset in Device. . . . . (INCA-MIP Extended)33
4.3.6
Open an Experiment. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
4.3.7
Reset an Experiment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
4.3.8
Read Devices . . . . . . . . . . . . . . . . . . . . . . (INCA-MIP Extended)35
4.3.9
Read Device Properties . . . . . . . . . . . . . . . (INCA-MIP Extended)36
Measuring and Recording . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
4.4.1
Read Measurement Elements . . . . . . . . . . (INCA-MIP Extended)38
4.4.2
Read Measure Rasters. . . . . . . . . . . . . . . . (INCA-MIP Extended)39
4.4.3
Add Measurement Variable to Measure Raster . . . . . . . . . . . . . 39
4.4.4
Start Measurement. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
4.4.5
Stop Measurement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
4.4.6
Read Recording Properties . . . . . . . . . . . . (INCA-MIP Extended)41
4.4.7
Set Recording Properties . . . . . . . . . . . . . . (INCA-MIP Extended)43
4.4.8
Start Recording. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
4.4.9
Stop Recording. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
4.4.10
Set Data Reading Mode (Online / Offline Data) . . . . . . . . . . . . . 45
4.4.11
Read Measure Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46
4.4.12
Reset Ring Buffer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
4.4.13
Read Hardware Status . . . . . . . . . . . . . . . (INCA-MIP Extended)47
4.4.14
Set Trigger . . . . . . . . . . . . . . . . . . . . . . . . (INCA-MIP Extended)48
4.4.15
Execute Manual Trigger . . . . . . . . . . . . . . (INCA-MIP Extended)49
4.4.16
Read Recording State . . . . . . . . . . . . . . . . (INCA-MIP Extended)49
4.4.17
Read List of Measurement Variables . . . . . (INCA-MIP Extended)50
Calibrating . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
4.5.1
Read Calibration Elements . . . . . . . . . . . . (INCA-MIP Extended)51
4.5.2
Add Calibration Element. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
4.5.3
Read Calibration Value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
4.5.4
Change Calibration Value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
4.5.5
Assign Dataset to Device . . . . . . . . . . . . . (INCA-MIP Extended)57
4.5.6
List Datasets of a Device . . . . . . . . . . . . . . (INCA-MIP Extended)58
4.5.7
Set Calibration Mode . . . . . . . . . . . . . . . . (INCA-MIP Extended)58
4.5.8
Group Devices . . . . . . . . . . . . . . . . . . . . . (INCA-MIP Extended)59
4.5.9
Write DCM File. . . . . . . . . . . . . . . . . . . . . (INCA-MIP Extended)60
Memory Page Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
4.6.1
Activate Memory Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
4.7
4.6.2
Get Current Page . . . . . . . . . . . . . . . . . . . (INCA-MIP Extended)61
4.6.3
Check Write-Protection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
4.6.4
Download Memory Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
4.6.5
Copy Memory Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
4.6.6
Download Differences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
4.6.7
Upload Pages . . . . . . . . . . . . . . . . . . . . . . (INCA-MIP Extended)63
Application Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Performance. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Contents
Contents
Introduction
The INCA-MIP Add-On (INCA MATLAB Integration Package) is an application
programming interface that controls INCA's functionality from within
MATLAB. Within this context, MATLAB acts as a client accessing INCA's
resources, which in this case is the server.
The following chart illustrates a typical application for the INCA-MIP API, using
INCA to address an ETK.
MATLAB
as client
read measure data
INCA
ETK
as server
on ECU
The following overview outlines the INCA functionality that can be accessed
from within MATLAB.
Memory Page Management
Switching back and forth between memory pages and downloading
memory pages to the control unit are supported.
Calibrating
All the calibration variables for an INCA experiment can be modified.
The values can be read and updated for each element and for the associated break point distributions, where applicable.
Measuring
All measurement variables from an INCA experiment can be read. In
addition, measurements can be started and stopped from within
MATLAB. All performance data that are available in INCA can also be
accessed from MATLAB. The performance data throughput at the
INCA-MIP interface has been optimized.
Since INCA generates measurement and calibration variables as doubles, conversion formulas for reprocessing in MATLAB are not required.
The INCA API functions described in this document are invoked from MATLAB
scripts (so-called M files), which can be used to define the entire control flow
for INCA experiments.
Introduction
1.1
1.2
Typographic Conventions
This manual uses the following conventions to describe the API functions in
addition to the usual typographic conventions found in the INCA User Manual:
The name of the API function is written in a non-proportional font. Parentheses are used for the functions argument; braces for the optional input arguments.
Example: Reading a Calibration Variable
value = IncaGetCalibrationValue(deviceName,
calibrationName {, start, size} {, valueType})
Output Arguments:
value
Input Arguments:
deviceName
Introduction
1.3
INCA Glossary
The API description uses certain technical terms that experienced INCA users
should be familiar with. Below is a brief definition of these terms.
Calibration Variable
A calibration variable is an element that can be read and modified. Calibration variables can be scalars, vectors, matrices, curves and maps.
The associated break point distributions can also be read and modified.
Data record
A record consists of a time stamp and all the measurement values in a
signal group for a single acquisition. The measurement data for a signal
group consists of several records that are generated throughout the
entire measurement process.
Device
A measuring device used for capturing measurement variables within a
certain measurement grid. Some measuring devices also support calibration for corresponding variables. For example, SMB devices can be
used for measurements only, while the ETK is suitable both for measurements and calibrations.
Measure Data
All the records captured in one measurement for individual measure
rasters.
Measurement Raster
Acquisition rate (measuring frequency) used for measuring one or
more signals in a signal group.
Introduction
Ring Buffer
To ensure a reliable transfer of measurement data from INCA to
MATLAB, a dedicated ring buffer is used for each measurement raster
(signal group). During an INCA online visualization or recording the
acquired measurement data is automatically saved in the ring buffer.
The command IncaGetRecords can be used to read the time
stamps and data from the ring buffer into MATLAB:
INCA Data
Acquisition
INCA Data
Acquisition
MATLAB Interface
IncaGetRecords
INCA Data
Acquisition
MATLAB Interface
IncaResetRecords
10
Introduction
Signal
A signal is an element whose value is measured in INCA. Each signal is
characterized by its data type (Boolean, integer, float), length (1, 2, 4 or
8 bytes) and conversion formula. The conversion from the physical
measure value on the implementation level is specified in the conversion formula.
Signal Group
A signal group consists of several individual signals. It is characterized
by its measurement raster, which is the same for all signals in the signal
group. Each signal group has a unique name.
Introduction
11
12
Introduction
2.1
System Requirements
To use the INCA-MIP add-on, INCA must be installed on your computer. Please
refer to the INCA Getting Started manual for the INCA system requirements.
If you would like to develop MATLAB scripts yourself for accessing INCA, you
also need a full MATLAB license.
INCA-MIP V5.4 requires the following program releases:
2.2
To install INCA-MIP:
Make sure that INCA is installed on your computer and that the release number of the INCA
installation is compatible with the release
number of the INCA-MIP add-on package.
13
If the installation routine does not start automatically, execute the INCA-MIP.exe program on the CD manually.
Follow the instructions in the installation routine to install INCA-MIP on your computer.
In the installation routine, you are asked to
indicate the desired type of installation:
or
14
You would only like to run readily available MATLAB R12 or R13 stand-alone
executables.
Note
You need the installation into ETASData if you
use executable files that contain MATLAB commands for controlling INCA. In this case you do
not need a MATLAB license. The executable files
have to be provided by developers with a
MATLAB installation (see Creation and Distribution of Stand-alone Executable Files
on page 67).
Note
Should you plan to use the extended set of API functions, a software license
file will be required. We recommend to obtain the license file prior to installing the product. The license is provided by your local tool coordinator or your
respective ETAS representative.
For a description of how to license your installation of INCA-MIP Extended
please refer to "Licensing" on page 17.
2.3
15
2.4
16
Licensing
INCA-MIP Extended is subject to license management. In order to work with
INCA-MIP Extended, after the installation, you need a license file for your computer. Without this file, you can only use the API functions which are included
in the INCA-MIP Base package, but not the extended function range.
The license file can be obtained from ETAS.
To obtain the license file:
The license is tied to username and workstation. To obtain the information
required for the creation of the license file, use the LicenseInfo tool in the
INCA program group.
Note
If you would like to request the license file before installing INCA-MIP , you
can start the program LicenseInfo.exe from the product CD-ROM.
Licensing
17
Click on Save.
The file is created and opened in a text editor.
Besides your host ID and user name, it contains input lines for your E-mail address,
license number, and other specifications, as
well as the ETAS contact addresses.
Note
The license file must not be edited. Otherwise,
it becomes invalid.
18
Licensing
Store the license file in the installation directory intended for that purpose.
By default this is the directory
ETAS\ETASShared6\Licenses. It is possible, however, to modify the license file directory by modifying the environment variable
ETAS_LICENSE_FILE.
In this directory, the license file is recognized
automatically when you start the program.
Licensing
19
20
Licensing
where in this document you can find more information about the corresponding function.
.
Function
refer to
IncaAddCalibrationElement
Calibration
page 52
IncaAddMeasureElement
Measuring
page 39
IncaBrowseCalibrationEleme
nts
Calibration
page 51
IncaBrowseItemsInFolder
Initialization
page 32
IncaBrowseMeasureElements
Measuring
page 38
MemoryPageManager page 62
Initialization
IncaCopyPageFromTo
IncaDatabaseImport
page 31
IncaDownloadDifferences
MemoryPageManager page 63
IncaDownloadPage
MemoryPageManager page 62
Measuring
page 49
Calibration
page 52
IncaExecuteManualTrigger
IncaGetCalibrationValue
21
Function
IncaGetCurrentPage
MemoryPageManager page 61
IncaGetDatasetsForDevice
Calibration
page 58
IncaGetDeviceProperties
Initialization
page 36
IncaGetDevices
Initialization
page 35
IncaGetHardwareStatus
Measuring
page 47
IncaGetMeasureRatesForDevi
ce
Measuring
page 39
IncaGetProperties
General
page 28
IncaGetRecordingProperties
Measuring
page 41
IncaGetRecordingState
Measuring
page 49
Measuring
page 46
Measuring
page 50
IncaGetRecords
IncaGetRecordStruct
IncaGetVersion
General
page 28
IncaGroupDevices
Calibration
page 59
IncaIsLicenseValid
General
page 28
page 26
IncaMessageIds
General
IncaIsPageWriteProtected
MemoryPageManager page 62
IncaOpen
Initialization
page 30
IncaOpenDatabase
Initialization
page 31
IncaOpenExperiment
Initialization
page 34
IncaResetExperiment
Initialization
page 35
IncaResetRecords
Measuring
page 47
Calibration
page 58
Calibration
page 55
Calibration
page 57
Measuring
page 45
Initialization
page 33
IncaSetCalibrationMode
IncaSetCalibrationValue
IncaSetDatasetInDevice
IncaSetMeasureReadMode
IncaSetProjectAndDatasetInD
evice
IncaSetRecordingProperties
Measuring
page 43
IncaSetTrigger
Measuring
page 48
General
page 27
IncaShowMessages
22
refer to
Function
refer to
IncaStartMeasurement
Measuring
page 40
IncaStartRecording
Measuring
page 44
IncaStopMeasurement
Measuring
page 40
IncaStopRecording
Measuring
page 45
IncaSwitchPage
MemoryPageManager page 61
IncaUploadPages
MemoryPageManager page 63
IncaWriteToFile
Calibration
page 60
"Initialization" on page 30
"Calibrating" on page 51
Moreover, a number of sample files are provided. These are described under
"Getting to know the INCA-MIP API through Sample Files" on page 24.
Application examples are given under "Application Examples" on page 65.
Note
The INCA-MIP Interface always operates on the global settings of the INCA
User Options. For further information on INCA User Options please see the
INCA Documentation.
23
4.1
To use the sample files, you must first start INCA and open the sample database. No hardware is required.
The function of the M files is described below.
24
tDummy.m opens an empty INCA experiment using a hardware configuration with the VADI test device. The script creates several measurement variables in the INCA experiment.
25
4.2
General Functions
The following general API functions are available:
4.2.1
Example
try,
<command_1>
...
<command_n>
catch,
[msgstr,msgid] = lasterr
...
end
whereas:
msgstr
a descriptional string
msgid
26
INCA:ParameterError
INCA:ReturnParameterError
INCA:WrongParameterValue
INCA:WrongParameterType
INCA:NaN
INCA:ExecutionError
INCA:ResourceError
INCA:RasterFull
4.2.2
INCA:CallSeqenceError
INCA:LicenseError
IncaShowMessages
Description
Syntax
IncaShowMessages(trueOrFalse)
Output
Arguments
27
Input
Arguments
trueOrFalse
Examples
4.2.3
(INCA-MIP Extended)
Name
IncaIsLicenseValid
Description
Syntax
s = IncaIsLicenseValid
Output
Arguments
license status:
0: no valid license
1: valid license
Input
Arguments
Examples
4.2.4
status = IncaIsLicenseValid
IncaGetVersion
Description
Syntax
IncaGetVersion
Output
Arguments
Input
Arguments
Examples
4.2.5
28
IncaGetProperties
Description
Syntax
p = IncaGetProperties
(INCA-MIP Extended)
Output
Arguments
Input
Arguments
Examples
p = IncaGetProperties;
29
4.3
Initialization
All measurement and calibration operations in INCA will be performed within
the context of an experiment. Before opening an experiment, a workspace
with a valid hardware configuration must first be created and assigned.
To work with the INCA-MIP API, there must an empty experiment in the INCA
database which is linked to a valid workspace and hardware configuration. The
experiment can be opened from within MATLAB.
The following API functions are available for initializing:
4.3.1
Open INCA
Name
IncaOpen
Description
Syntax
IncaOpen
Output
Arguments
Input
Arguments
Examples
30
4.3.2
Open a Database
Name
IncaOpenDatabase
Description
Syntax
IncaOpenDatabase({pathName})
Output
Arguments
4.3.3
Input
Arguments
pathName
Examples
Import a Database
(INCA-MIP Extended)
Name
IncaDatabaseImport
Description
Syntax
IncaDatabaseImport(path)
name = IncaDatabaseImport(path)
[name, type] = IncaDatabaseImport(path)
Output
Arguments
name
31
type
4.3.4
32
Input
Arguments
path
Examples
names = IncaDatabaseImport('D:\
ETASData\INCA5.4\export\Project0815.exp')
(INCA-MIP Extended)
Name
IncaBrowseItemsInFolder
Description
Syntax
[name, type] =
IncaBrowseItemsInFolder(pattern,
folderName)
Output
Arguments
name
type
Input
Arguments
Examples
4.3.5
pattern
folderName
[n,t]=IncaBrowseItemsInFolder(*,
DEFAULT\MyProject);
[name,type]=IncaBrowseItemsInFolder(Prj*_#
#, );
(INCA-MIP Extended)
Name
IncaSetProjectAndDatasetInDevice
Description
Syntax
IncaSetProjectAndDatasetInDevice(workspace,
device,project,dataset)
Output
Arguments
Input
Arguments
Examples
workspace
device
name of device
project
dataset
IncaSetProjectAndDatasetInDevice('DEFAULT\w
orkspace','ETK:1','DEFAULT\Prj0815','Ds4711
\Ds4711_3')
33
4.3.6
Open an Experiment
Note
This function has changed since INCA V3.0, because two input arguments
have been added to the re-worked workspace.
If the experiment is already open when the function
IncaOpenExperiment is called, the input arguments specifiying the environment are optional. If the experiment is not yet open, you need to call
IncaOpenDatabase before IncaOpenExperiment.
Name
IncaOpenExperiment
Description
Syntax
IncaOpenExperiment({closeAllViewsFlag})
or
IncaOpenExperiment(expFolderName,
experimentName, workspaceFolderName,
workspaceName {, closeAllViewsFlag})
Output
Arguments
Input
Arguments
34
expFolderName
experimentName
workspaceFolderName
workspaceName
closeAllViewsFlag
Examples
4.3.7
IncaOpenExperiment(ExpFolder,
MyExperiment, WorkspaceFolder,
MyWorkspace);
Reset an Experiment
Name
IncaResetExperiment
Description
Reset and close the current experiment. You can use this
function to remove all variables from an experiment.
Removing individual variables is currently not supported.
Syntax
IncaResetExperiment
Output
Arguments
Input
Arguments
Examples
Note
If the experiment has been opened manually and not by means of a MATLAB
command, IncaResetExperiment releases the experiment, but does not
close the window. You need to execute IncaOpenExperiment before you
can access the experiment once again.
4.3.8
Read Devices
(INCA-MIP Extended)
Name
IncaGetDevices
Description
Syntax
Output
Arguments
name
35
type
Input
Arguments
Examples
4.3.9
[name,type]=IncaGetDevices;
(INCA-MIP Extended)
Name
IncaGetDeviceProperties
Description
Syntax
p = IncaGetDeviceProperties(deviceName)
Output
Arguments
p.name
device name
p.projectDBPath
p.isWriteProtecte
d
p.isActive
36
p.isWorkbaseDevic
e
Input
Arguments
deviceName
Examples
p = IncaGetDeviceProperties(Device);
37
4.4
4.4.1
IncaBrowseMeasureElements
Description
Syntax
Output
Arguments
name
type
pattern
deviceName
Input
Arguments
Examples
38
(INCA-MIP Extended)
[n,t]=IncaBrowseMeasureElements(ign*,
Device);
[name,type]=IncaBrowseMeasureElements(*);
4.4.2
4.4.3
(INCA-MIP Extended)
Name
IncaGetMeasureRatesForDevice
Description
Syntax
[name] =
IncaGetMeasureRatesForDevice(deviceName)
Output
Arguments
name
Input
Arguments
deviceName
Examples
n=IncaGetMeasureRatesForDevice(Device);
name=IncaGetMeasureRatesForDevice(Dev);
IncaAddMeasureElement
Description
Syntax
IncaAddMeasureElement(deviceName,
groupName, signalName {, displayMode})
Output
Arguments
Input
Arguments
deviceName
groupName
signalName
39
displayMode
Examples
IncaAddMeasureElement(Device, 10ms,
Chan1, 0);
IncaAddMeasureElement(Dev, 10ms,
Matrix[2,1]);
Note
If the measure raster is full, the measurement variable does not get added to
the raster.
4.4.4
Start Measurement
Name
IncaStartMeasurement
Description
Syntax
IncaStartMeasurement
Output
Arguments
Input
Arguments
Examples
4.4.5
Stop Measurement
Name
IncaStopMeasurement
Description
Syntax
IncaStopMeasurement{(mdfFileName)}
Output
Arguments
40
Input
Arguments
mdfFileName
Examples
IncaStopMeasurement(c:\mydata\store1.dat);
Note
To avoid data loss due to ongoing measurements, be sure to stop the current
recording with the IncaStopMeasurement(mdfFileName) command
if the data volume is high. Follow this up with the IncaGetRecords command to transfer the remaining data to MATLAB.
4.4.6
(INCA-MIP Extended)
Name
IncaGetRecordingProperties
Description
Syntax
properties = IncaGetRecordingProperties
Output
Arguments
properties
Recording properties as
MATLAB struct, consisting of
the following entries:
properties.fileName
41
42
properties.company
properties.project
properties.user
properties.vehicle
Input
Arguments
Examples
4.4.7
properties = IncaGetRecordingProperties;
(INCA-MIP Extended)
Name
IncaSetRecordingProperties
Description
Syntax
IncaSetRecordingProperties(properties)
Output
Arguments
Input
Arguments
properties
properties.fileName
43
Examples
4.4.8
properties.company
properties.project
properties.user
properties.vehicle
properties.user = Michael;
properties.project = K70;
IncaSetRecordingProperties(properties);
Start Recording
Name
IncaStartRecording
Description
Syntax
IncaStartRecording
Output
Arguments
Input
Arguments
Examples
44
properties.comment
4.4.9
Stop Recording
Name
IncaStopRecording
Description
Syntax
IncaStopRecording(mdfFileName)
Output
Arguments
4.4.10
Input
Arguments
mdfFileName
Examples
IncaStopRecording(c:\mydata\store1.dat);
IncaSetMeasureReadMode
Description
Syntax
IncaSetMeasureReadMode(measureReadMode)
Output
Arguments
45
4.4.11
Input
Arguments
Examples
IncaSetMeasureReadMode(0);
IncaGetRecords
Description
Syntax
Output
Arguments
time
data
deviceName
groupName
Input
Arguments
46
maxRecords
Examples
4.4.12
IncaResetRecords
Description
Reset the ring buffer for all measure rasters. This function can
even be used during a running measurement to reset all ring
buffers. They are reset automatically when starting a
measurement or recording; it is not necessary to issue this
command explicitely.
For further information on the ring buffer see the
corresponding entry in the "INCA Glossary" on page 9.
Syntax
IncaResetRecords
Output
Arguments
Input
Arguments
Examples
4.4.13
(INCA-MIP Extended)
Name
IncaGetHardwareStatus
Description
47
Syntax
Output
Arguments
status
message
Input
Arguments
Examples
4.4.14
Set Trigger
(INCA-MIP Extended)
Name
IncaSetTrigger
Description
Syntax
IncaSetTrigger(startTrigger{, stopTrigger{,
preTriggerTime{, postTriggerTime{,
duration}}}})
Output
Arguments
Input
Arguments
48
startTrigger
stopTrigger
Examples
4.4.15
(INCA-MIP Extended)
Name
IncaExecuteManualTrigger
Description
Syntax
IncaExecuteManualTrigger(type)
Output
Arguments
Input
Arguments
Examples
4.4.16
type
Trigger type
start for executing a manual start
trigger
stop for executing a manual stop trigger
IncaExecuteManualTrigger('start')
(INCA-MIP Extended)
Name
IncaGetRecordingState
Description
Syntax
result = IncaGetRecordingState
49
Output
Arguments
result
recording status
0: switched off
1: waiting for trigger or recording in
progress
Input
Arguments
Examples
4.4.17
s = IncaGetRecordingState
(INCA-MIP Extended)
Name
IncaGetRecordStruct
Description
Syntax
list =
IncaGetRecordStruct(device,groupName)
Output
Arguments
Input
Arguments
Examples
50
device
name of device
groupName
l = IncaGetRecordStruct('ETK:1', '10ms');
list = IncaGetRecordStruct('device1',
'Syncro');
4.5
Calibrating
Calibrations can be performed with scalars, characteristic curves and maps,
including the associated break point distributions. In each experiment, it is possible to define any number of calibration variables.
Note
Note that the names of calibration variables are case-sensitive.
4.5.1
(INCA-MIP Extended)
Name
IncaBrowseCalibrationElements
Description
Syntax
Output
Arguments
name
type
pattern
deviceName
Input
Arguments
Examples
[n,t]=IncaBrowseCalibrationElements(MAP*,
Device);
[name,type]=IncaBrowseCalibrationElements(
*);
51
4.5.2
IncaAddCalibrationElement
Description
Syntax
IncaAddCalibrationElement(deviceName,
calibrationName {, displayMode})
Output
Arguments
Input
Arguments
deviceName
Examples
4.5.3
52
IncaAddCalibrationElement(anEtk, Scalar);
IncaAddCalibrationElement(anEtk, Curve);
IncaAddCalibrationElement(anEtk, Map);
IncaGetCalibrationValue
Description
Syntax
value = IncaGetCalibrationValue(deviceName,
calibrationName {, start, size} {,
valueType})
Output
Arguments
value
Input
Arguments
deviceName
size
53
valueType
Examples
54
aValue = IncaGetCalibrationValue(anEtk,
Scalar);
aCurve = IncaGetCalibrationValue(anEtk,
Curve);
aMap = IncaGetCalibrationValue(anEtk,
Map);
xMap = IncaGetCalibrationValue(anEtk,
Map, x);
yMap = IncaGetCalibrationValue(anEtk,
Map, y);
aCurveRange = IncaGetCalibrationValue
(anEtk, Curve, 2, 3);
aMapRange = IncaGetCalibrationValue
(anEtk, Map, [2,3], [3,4]);
xMapRange = IncaGetCalibrationValue
(anEtk, Map, 2, 3, x);
4.5.4
IncaSetCalibrationValue
Description
Syntax
IncaSetCalibrationValue( deviceName,
calibrationName, value )
IncaSetCalibrationValue( deviceName,
calibrationName, value, valueType )
IncaSetCalibrationValue( deviceName,
calibrationName, value, start )
IncaSetCalibrationValue( deviceName,
calibrationName, value, start, valueType )
result = IncaSetCalibrationValue(
deviceName, calibrationName, value )
result = IncaSetCalibrationValue(
deviceName, calibrationName, value,
valueType )
result = IncaSetCalibrationValue(
deviceName, calibrationName, value, start )
result = IncaSetCalibrationValue(
deviceName, calibrationName, value, start,
valueType )
55
Output
Arguments
result
Input
Arguments
deviceName
56
Examples
4.5.5
start
valueType
IncaSetCalibrationValue(anEtk,
aValue);
IncaSetCalibrationValue(anEtk,
aCurve);
IncaSetCalibrationValue(anEtk,
aMap);
IncaSetCalibrationValue(anEtk,
xMap, x);
IncaSetCalibrationValue(anEtk,
yMap, y);
IncaSetCalibrationValue(anEtk,
aCurveRange, 2);
IncaSetCalibrationValue(anEtk,
aMapRange,[2,3]);
IncaSetCalibrationValue(anEtk,
xMapRange, 2, x);
Scalar,
Curve,
Map,
Map,
Map,
Curve,
Map,
Map,
(INCA-MIP Extended)
Name
IncaSetDatasetInDevice
Description
Syntax
IncaSetDatasetInDevice(device,dataset)
Output
Arguments
57
Input
Arguments
Examples
4.5.6
dataset
IncaSetDatasetInDevice('ETK:1','Ds4711\Ds47
11_3')
(INCA-MIP Extended)
Name
IncaGetDatasetsForDevice
Description
Syntax
name = IncaGetDatasetsForDevice(device)
[name, properties] =
IncaGetDatasetsForDevice(device)
Output
Arguments
name
properties
device
name of device
Examples
58
name of device
Input
Arguments
4.5.7
device
l = IncaGetDatasetsForDevice('ETK:1')
(INCA-MIP Extended)
Name
IncaSetCalibrationMode
Description
Syntax
IncaSetCalibrationMode(lowerLimitMode,
upperLimitMode)
Output
Arguments
Input
Arguments
Examples
4.5.8
lowerLimitMode
upperLimitMode
IncaSetCalibrationMode('rejectHardBoundViol
ation', 'limitToHardBound')
Group Devices
(INCA-MIP Extended)
Name
IncaGroupDevices
Description
Syntax
IncaGroupDevices(onOff)
Output
Arguments
Input
Arguments
onOff
Examples
IncaGroupDevices(1)
59
4.5.9
(INCA-MIP Extended)
Name
IncaWriteToFile
Description
Syntax
IncaWriteToFile(format,file,device,calibs{,
options})
Output
Arguments
Input
Arguments
Examples
60
format
file
device
calibs
options
4.6
4.6.1
IncaSwitchPage
Description
Syntax
IncaSwitchPage(deviceName, pageName)
Output
Arguments
Input
Arguments
deviceName
pageName
Examples
4.6.2
(INCA-MIP Extended)
Name
IncaGetCurrentPage
Description
Syntax
pageName = IncaGetCurrentPage(deviceName)
Output
Arguments
pageName
Input
Arguments
deviceName
Examples
61
4.6.3
Check Write-Protection
Name
IncaIsPageWriteProtected
Description
Syntax
isRW = IncaIsPageWriteProtected(deviceName,
pageName)
Output
Arguments
isRw
Input
Arguments
deviceName
pageName
Examples
4.6.4
IncaDownloadPage
Description
Syntax
IncaDownloadPage(deviceName, pageName)
Output
Arguments
Input
Arguments
deviceName
pageName
Examples
4.6.5
62
IncaCopyPageFromTo
Description
Syntax
IncaCopyPageFromTo( deviceName,
sourcePageName, destinationPageName)
Output
Arguments
Input
Arguments
deviceName
sourcePageName
4.6.6
Download Differences
Name
IncaDownloadDifferences
Description
Syntax
IncaDownloadDifferences( deviceName )
Output
Arguments
Input
Arguments
deviceName
Examples
4.6.7
Upload Pages
(INCA-MIP Extended)
Name
IncaUploadPages
Description
Syntax
IncaUploadPages(device{,referencePage,
workingPage})
Output
Arguments
63
Input
Arguments
device
name of device
Examples
64
IncaUploadPages('ETK:1');
IncaUploadPages('ETK:1', 'ref_1',
'work_1');
4.7
Application Examples
Example 1
% Check if working page is write-protected and
% download the page if it is write-protected
if(IncaIsPageWriteProtected (anEtk, wp))
IncaDownloadPage(anEtk, wp);
end
% Switch to the working page
IncaSwitchPage( anEtk, wp);
Example 2
In the following example, the functions described above are used to read measured values from the device MyDevice and measure raster 10ms. To execute
this example, you must first open an experiment in INCA that includes an
assigned device named MyDevice.
% Measure the following signals
IncaAddMeasureElement( MyDevice,
IncaAddMeasureElement( MyDevice,
IncaAddMeasureElement( MyDevice,
IncaAddMeasureElement( MyDevice,
10ms,
10ms,
10ms,
10ms,
Chan1
Chan2
Chan3
Chan4
);
);
);
);
% Now measure
data = [];
time = [];
IncaShowMessages(0);
IncaSetMeasureReadMode(0)
IncaStartMeasurement;
deltaT = 0;
% Measure for 20 seconds
while( deltaT < 20 )
% Pause for 0.1 seconds to have more than one
% record -- saves processor time.
pause(0.1)
% Get up to 500 records for group 10ms
[ t, d ]=IncaGetRecords( MyDevice, 10ms, 500 );
% Append t and d to time and data
data = [data; d];
time = [time; t];
if( length(time) )
% Calculate time measured
65
66
5.1
67
5.2
or
68
Performance
The data throughput for the INCA-MIP API has been tested on a computer
with a 300 MHz Pentium II processor.
Calibrating:
Access time for reading/writing
Scalar: ~20 ms
Measuring:
To determine the data throughput, a measure raster with 10 measurement
signals is used that are written at 10 ms intervals. The data are retrieved from
MATLAB at one-second intervals. This means that after one second,
10 * 100 = 1000 measurement values are ready for transfer.
Transferring these 1000 measurement values takes approximately 13 ms,
which roughly corresponds to one per-cent of the available processor time.
Therefore the time it takes to transfer one single measurement value can be
derived from the values above as roughly 13 s. However, the data throughput
during the measurements depends largely on the total amount of data to be
transferred during the function call.
Performance
69
70
Performance
Phone:
70469 Stuttgart
Fax:
Germany
E-mail:
sales@etas.de
WWW:
www.etasgroup.com
Phone:
+33 1 56 70 00 50
SILIC 307
Fax:
+33 1 56 70 00 51
E-mail:
sales@etas.fr
France
WWW:
www.etasgroup.com
Phone:
+44 1283 54 65 12
Fax:
+44 1283 54 87 67
Burton-upon-Trent
E-mail:
sales@etas-uk.net
WWW:
www.etasgroup.com
Phone:
Fax:
+1 734 997-9449
USA
E-mail:
sales@etas.us
WWW:
www.etasgroup.com
Great Britain
ETAS Ltd.
Great Britain
USA
ETAS Inc.
71
Japan
ETAS K.K.
Queen's Tower C-17F
Phone:
+81 45 222-0900
Fax:
+81 45 222-0956
Yokohama 220-6217
E-mail:
sales@etas.co.jp
Japan
WWW:
www.etasgroup.com
Phone:
+82 2 57 47-016
Yangjae-dong, Seocho-gu
Fax:
+82 2 57 47-120
Seoul 137-889
E-mail:
sales@etas.co.kr
Phone:
Fax:
E-mail:
sales.cn@etasgroup.com
WWW:
www.etasgroup.com
Korea
ETAS Korea Co. Ltd.
Korea
P.R. China
ETAS (Shanghai) Co., Ltd.
72
Index
C
Calibrating 7
Calibration Variable 9
Compilation of m-files 67
D
Data record 9
Device 9
I
IncaAddCalibrationElement 52
IncaAddMeasureElement 39
IncaBrowseCalibrationElements 51
IncaBrowseItemsInFolder 32
IncaBrowseMeasureElements 38
IncaCopyPageFromTo 62
IncaDatabaseImport 31
IncaDownloadDifferences 63
IncaDownloadPage 62
IncaExecuteManualTrigger 49
IncaGetCalibrationValue 8, 52
IncaGetCurrentPage 61
IncaGetDatasetsForDevice 58
IncaGetDeviceProperties 36
IncaGetDevices 35
IncaGetHardwareStatus 47, 48
IncaGetMeasureRatesForDevice 39
IncaGetProperties 28
IncaGetRecordingProperties 41
IncaGetRecordingState 49
IncaGetRecords 46
IncaGetRecordStruct 50
IncaGetVersion 28
IncaGroupDevices 59
IncaIsLicenseValid 28
IncaIsPageWriteProtected 62
IncaOpen 30
IncaOpenDatabase 31
IncaOpenExperiment 34
IncaResetExperiment 35
IncaResetRecords 47
IncaSetCalibrationMode 58, 59
IncaSetCalibrationValue 55
73
IncaSetDatasetInDevice 57
IncaSetMeasureReadMode 45
IncaSetProjectAndDatasetInDevice 33
IncaSetRecordingProperties 43
IncaSetTrigger 48
IncaShowMessages 27
IncaStartMeasurement 40
IncaStartRecording 44
IncaStopMeasurement 40
IncaStopRecording 45
IncaSwitchPage 61
IncaUploadPages 63
IncaWriteToFile 60
Installation
obtain license file 17
store license file 19
L
license file
obtain 17
store 19
M
M files 7, 24
MATLAB scripts 7
mcc 67
Measure Data 9
Measurement Raster 9
Measuring 7
Memory Page Management 7
MEX files 13
O
obtain license file 17
R
Ring Buffer 10
S
sample files 24
Signal 11
Signal Group 11
stand-alone executable files 67
74