CTA Remote Interface Manual
CTA Remote Interface Manual
CTA Remote Interface Manual
2 OMICRON
Contents
Contents
1 Designated use................................................................................................ 11
2 Installing the CTA Remote Control Software ................................................ 12
2.1 System requirements .........................................................................................................12
2.2 Installing the software ........................................................................................................12
4 Description ...................................................................................................... 15
4.1 What is the CTA Remote Control Software? .....................................................................15
4.2 Overview of data communication and interfaces provided by the software ......................15
4.3 Overview of connection states and state transitions..........................................................18
4.4 Log file ................................................................................................................................18
5 Operation ......................................................................................................... 19
5.1 Possible programming languages......................................................................................19
5.2 The most important Visual Basic statements .....................................................................19
5.3 Working in the Visual Basic editor .....................................................................................22
5.3.1 Starting the Visual Basic editor .............................................................................22
5.3.2 Including the CTA Remote Type Library ..............................................................22
5.3.3 Window areas of the Visual Basic editor ..............................................................24
5.3.4 Inserting, renaming and deleting modules ...........................................................25
5.3.5 Working in the Visual Basic code window ............................................................26
5.3.6 Loading an existing Visual Basic program............................................................28
5.4 Creating an application program step by step ...................................................................29
5.4.1 Assumptions for the descriptions given in this section .........................................29
5.4.2 Creating the program code ...................................................................................29
OMICRON 3
CTA Remote Control Programming Manual
6.3.2.4 UpgradeFirmware................................................................................. 39
6.3.2.5 UpgradeText......................................................................................... 39
6.3.2.6 UpgradeLicenses ................................................................................. 40
6.3.2.7 Advise ................................................................................................... 40
6.3.2.8 Unadvise .............................................................................................. 42
6.3.3 Description of properties ...................................................................................... 43
6.3.3.1 eStatus ................................................................................................. 43
6.3.3.2 bstrFirmwareVersion ............................................................................ 43
6.3.3.3 bstrHardwareVersion............................................................................ 44
6.3.3.4 bstrSoftwareVersion ............................................................................. 44
6.3.3.5 bstrSerialNumber ................................................................................. 44
6.3.3.6 Info........................................................................................................ 45
6.3.3.7 USBDevices ......................................................................................... 45
6.3.3.8 HasLicense ........................................................................................... 46
6.3.3.9 MissingLicenses ................................................................................... 46
6.3.3.10 AvailableLicenses ................................................................................. 47
6.3.3.11 NotAvailableLicenses ........................................................................... 48
6.3.3.12 AddLicenses ......................................................................................... 48
6.3.3.13 Test....................................................................................................... 48
6.3.3.14 Settings ................................................................................................ 49
6.3.3.15 Results ................................................................................................. 49
6.3.3.16 LiveResults ........................................................................................... 49
6.3.3.17 FileTransfer .......................................................................................... 50
6.3.3.18 Directory ............................................................................................... 50
6.3.3.19 Calculate .............................................................................................. 50
6.3.3.20 Quick .................................................................................................... 50
6.4 ICTAInfo (device information) ........................................................................................ 51
6.4.1 Overview of functions and properties .................................................................. 51
6.4.2 Description of functions ....................................................................................... 52
6.4.2.1 Clear ..................................................................................................... 52
6.4.3 Description of properties ...................................................................................... 52
6.4.3.1 eClass .................................................................................................. 52
6.4.3.2 nNumber ............................................................................................... 52
6.4.3.3 nLocation .............................................................................................. 53
6.4.3.4 bstrDescription ..................................................................................... 53
6.4.3.5 nMeasurementInfo ............................................................................... 53
6.5 ICTASettings (specifying test settings) ........................................................................ 55
6.5.1 Overview of functions .......................................................................................... 55
6.5.2 Description of functions ....................................................................................... 56
6.5.2.1 LocalLoadSettings ................................................................................ 56
6.5.2.2 LocalSaveSettings................................................................................ 56
6.5.2.3 ClearSettings ........................................................................................ 57
6.5.2.4 GetValue .............................................................................................. 57
6.5.2.5 SetValue ............................................................................................... 58
4 OMICRON
Contents
OMICRON 5
CTA Remote Control Programming Manual
6.10 ICTALiveResults (reading test results directly from the CT Analyzer) ........................ 83
6.10.1 Overview of functions .......................................................................................... 83
6.10.2 Description of functions ....................................................................................... 84
6.10.2.1 GetLiveValue ........................................................................................ 84
6.10.2.2 GetLiveIndexedValue ........................................................................... 84
6.10.2.3 GetLiveIndexedValues ......................................................................... 85
6.10.2.4 GetLiveErrorDescription ....................................................................... 86
6.11 ICTACalc (enhanced calculation of results) .................................................................... 87
6.11.1 Overview of functions .......................................................................................... 87
6.11.2 Description of functions ....................................................................................... 89
6.11.2.1 EvalCompositeError ............................................................................. 89
6.11.2.2 EvalPhaseDeviation ............................................................................. 90
6.11.2.3 EvalRatioDeviation ............................................................................... 91
6.11.2.4 EvalSecondaryCurrent ......................................................................... 92
6.11.2.5 EvalMaxPrimaryCurrent ....................................................................... 93
6.11.2.6 EvalExcitationCurrentRms ................................................................... 94
6.11.2.7 EvalExcitationCurrentPeak .................................................................. 95
6.11.2.8 EvalCoreVoltage .................................................................................. 96
6.11.2.9 EvalExcitationCurrentRmsAtVcore ...................................................... 97
6.11.2.10 EvalExcitationCurrentRmsAtVTerm ..................................................... 98
6.11.2.11 EvalExcitationCurrentPeakAtVcore ...................................................... 99
6.11.2.12 EvalVTermAtExcitationCurrentRms ................................................... 100
6.11.2.13 EvalVCoreAtExcitationCurrentRms.................................................... 101
6.11.2.14 EvalVCoreAtExcitationCurrentPeak ................................................... 102
6.11.2.15 AL_MaxPrimaryCurrent ...................................................................... 103
6.11.2.16 AL_MaxImpedance ............................................................................ 104
6.11.2.17 AL_ImpedanceAtPrimaryCurrent ....................................................... 105
6.11.2.18 AL_PrimaryCurrentAtImpedance ....................................................... 106
6.11.2.19 AL_PrimaryCurrentAtNomBurden ...................................................... 107
6.11.2.20 AL_PrimaryCurrentAtOprBurden ....................................................... 108
6.12 ICTAQuick (Quick measurement device) ..................................................................... 109
6.12.1 Overview of functions ........................................................................................ 110
6.12.2 Description of functions ..................................................................................... 110
6.12.2.1 SetSetting ........................................................................................... 110
6.12.2.2 GetSetting .......................................................................................... 111
6.12.2.3 GetResult ........................................................................................... 111
6.12.2.4 GetV1Results ..................................................................................... 112
6.12.2.5 GetV2Results ..................................................................................... 112
6.12.2.6 GetI1Results ....................................................................................... 113
6.12.2.7 GetCalculatedResults......................................................................... 114
6.12.2.8 StartMeasurement .............................................................................. 115
6.12.2.9 StopMeasurement .............................................................................. 115
6.12.2.10 Status ................................................................................................. 116
6.12.3 Example ............................................................................................................. 117
6 OMICRON
Contents
OMICRON 7
CTA Remote Control Programming Manual
8 OMICRON
Preface
Preface
The CTA Remote Control Software is used to remote control CT Analyzer test
sets via PC. It does not offer a graphical user interface and can be operated
using all common programming languages. The purpose of this manual is to
familiarize programmers and users with the CTA Remote Control Software and
its programming.
In addition to this programming manual, the CT Analyzer User Manual has to
be observed. The CT Analyzer User Manual always has to be available at the
site where the CT Analyzer is used.
Programming of remote control programs and testing with the CT Analyzer
should only be carried out by authorized and qualified personnel. Although it is
not absolutely necessary, it is recommended and useful that persons entrusted
with the programming of remote control programs have fundamental
programming knowledge.
Due to reasons of clarity, all explanations regarding programming and all
programming examples given in this manual refer to the programming
language Visual Basic.
Conventions
The names of interfaces, functions, properties, (enumeration) types and
variables/parameters of the CTA Remote Control Software are written in
Courier font.
Interfaces are prefixed by the identifier "I", e.g. ICTASettings.
Enumeration types are prefixed by the identifier "T", e.g. TCTAStatus.
Program code is written in Courier Bold font.
Whenever a given path refers to the file system of the PC, it is written in the
common form, using the drive letter and backslash characters, e.g.
D:\CT Analyzer\CTATests\MyTests\.
Whenever a path refers to the file system of the CT Analyzer (i.e. the Compact
Flash card), it is written using forward slashes, e.g.
A:/Tests/MyTests/Manufacturer1/. Only two drive letters are allowed
by the CT Analyzer: A is the Compact Flash card, B is the internal RAM. When
no drive letter is specified, drive A is taken by default.
Glossary of symbols
Note
Indicates notes with special meaning, i.e., additional important
information.
OMICRON 9
CTA Remote Control Programming Manual
Safety instructions
Before operating the CT Analyzer, carefully read the CT Analyzer
User Manual and the safety instructions given there. It is not
recommended to use (or even switch on) the CT Analyzer without
understanding the information given in the CT Analyzer User Manual.
If some points of the safety instructions are unclear, please contact
OMICRON electronics.
Before starting a test on the CT Analyzer via PC remote control, make sure
that the CT Analyzer is in a technically sound condition and that no other
persons are working on the site where the CT Analyzer is used.
Prior to actual testing procedures, you should test your programs used to
control the CT Analyzer in detail and verify the results in order to guarantee
the reliability of the obtained results.
Observe the following when running tests:
• Prevent the presence of other persons in the potentially dangerous area
around the test object.
• If necessary, perform appropriate additional safety precautions according to
the relevant standard, for example, by defining a high-voltage area around
the test object and securing this area against unauthorized access by using
a barrier chain and warning sign.
• Apply an appropriate warning sign to warn other persons that the test set is
switched on and operated remote-controlled.
• Start the test only if all safety precautions were taken and if you are
absolutely sure that no other person is present in the potentially dangerous
area around the test object.
10 OMICRON
Designated use
1 Designated use
The CTA Remote Control Software is intended to control CT Analyzer test sets
via PC for the purpose of remote control and/or to automate test procedures
performed using the CT Analyzer.
It may only be used together with CT Analyzer test sets.
Any other use of the CTA Remote Control Software but the one mentioned
above is considered as improper use, and will not only invalidate all customer
warranty claims but also exempt the manufacturer from its liability to recourse.
OMICRON 11
CTA Remote Control Programming Manual
12 OMICRON
Connecting the CT Analyzer to the PC
OMICRON 13
CTA Remote Control Programming Manual
14 OMICRON
Description
4 Description
4.1 What is the CTA Remote Control Software?
The CTA Remote Control Software is a remote component installed on the
PC. It works as a Common Object Model (COM) server and provides a
number of access interfaces to the CT Analyzer with numerous functions to
control the CT Analyzer.
The CTA Remote Control Software itself does not offer a graphical user
interface. It can be operated using all common programming languages, e.g.
Visual Basic (VB), Visual Basic for Applications (VBA), .NET (C#), C++, etc.
By means of application programs, it is possible to remote control a connected
CT Analyzer test set completely and/or to automate test procedures performed
using the CT Analyzer.
OMICRON 15
CTA Remote Control Programming Manual
16 OMICRON
Description
OMICRON 17
CTA Remote Control Programming Manual
18 OMICRON
Operation
5 Operation
5.1 Possible programming languages
The CTA Remote Control Software can be operated using the following
programming languages:
• Visual Basic (VB)
®
• Visual Basic for Applications (VBA, included e.g. in Microsoft Excel ,
® ®
WORD , Access , etc.)
• .NET (C#, VB.Net)
• C++
• Borland Delphi
• Any other programming language supporting COM (Common Objects
Model).
OMICRON 19
CTA Remote Control Programming Manual
Exit
The Exit statement is used to exit a code block or procedure. This statement
transfers control immediately to the statement following the procedure call or
the block definition.
For...Next
For...Next structures are used to repeat statements a specified number of
times. For this purpose, it is necessary to use a counting variable the value of
which is increased or decreased with each execution of the For...Next
structure. If the specified number of executions is reached, the code following
the Next statement is executed.
For Each...Next
The For Each...Next statement repeats a block of statements for each
element of a collection or array.
Function - End Function
The Function statement declares the name, parameters, and code that
define a Function procedure. The procedure starts with a Function
statement and ends with an End Function statement.
GoTo
The GoTo statement is used to unconditionally branch to a specified code line
within a procedure.
If...Then...Else - End If
If...Then structures are used to make the execution of statements
conditional upon whether a specific condition is fulfilled. Using the additional
instruction Else, it is possible to specify what to do if the condition is not
fulfilled.
If...Then...Else structures have to be terminated with an End If
statement.
On Error
The On Error statement is used to specify what to do in case of an error.
For example, it could be used together with the GoTo statement to specify that
the program execution should continue at a specified code line in case of an
error.
Without an On Error statement, any run-time error that occurs is fatal: an
error message is displayed, and program execution stops.
Select...Case
The Select...Case statement executes one of several groups of
statements, depending on the value of an expression.
Set
The Set statement is used to assign an object reference to a variable or a
property. E.g. Set rt = cta assigns an object reference between the
variable rt and the object cta.
20 OMICRON
Operation
Stop
The Stop statement interrupts the execution of a program. This statement is
similar to setting a breakpoint in the code. The Stop statement interrupts
execution, but unlike End, it does not close any files or clear any variables.
Sub - End Sub
The Sub statement declares the name, parameters, and code that define a
Sub procedure. The procedure starts with a Sub statement and ends with an
End Sub statement.
While...Wend (or While...End While)
While...Wend structures are used to execute a statement or a series of
statements as long as a given condition is fulfilled (true). If the condition is no
longer fulfilled, the code following the Wend statement is executed.
With...End With
Using the With...End With statement you can perform a series of
statements on a specified object without requalifying the name of the object.
I.e., using this statement you can specify an object or a user-defined type once
and then use it for a series of statements.
With...End With statements can accelerate the execution of procedures
and reduce repetitive typing. A code structure starting with With has to be
terminated with an End With statement.
OMICRON 21
CTA Remote Control Programming Manual
22 OMICRON
Operation
3. Click OK. You'll return to the main window of the Visual Basic editor.
4. All interfaces and functions provided by the CTA Remote Type Library are
now available for programming and can be selected from the Object
browser.
OMICRON 23
CTA Remote Control Programming Manual
Properties
window
Immediate window
Project explorer
The project explorer shows the projects and all elements contained in the
projects in a hierarchical tree structure. E.g. after inserting a new module, a
new element with the default name (e.g. "Module1") is displayed as an
element of the Modules folder.
Properties window
The Properties window shows the properties of the element highlighted in the
project explorer. In this window you can change the properties, e.g. give a
module a new name.
Code window
The code window contains the program code. Refer to section 5.3.5 on page
26.
Immediate window
The Immediate window can be used to display information resulting from
instructions. Refer to section 5.3.5 on page 26.
24 OMICRON
Operation
Renaming a module
To rename a module, click on the corresponding module entry in the project
explorer to highlight it. The module name is then displayed in the "Name" field
of the Properties window. Click in the "Name" field and enter the new name.
Deleting a module
To delete a module, click on the corresponding module entry in the project
explorer and select File | Remove modulename.
OMICRON 25
CTA Remote Control Programming Manual
Click in the code window to position the cursor to the desired location and
enter the desired program code.
Refer to chapter 6 for descriptions of the functions provided by the CTA
Remote Control Software and code examples or chapter 9 for application
examples.
The code window of the Visual Basic editor provides the following functions in
addition to the "normal" text editor functions:
• The standard behavior of the code window (e.g. step/indent width of the tab
key, drag&drop usage) can be specified by selecting Tools | Options.
• For better clarity of the code representation, different colors are used:
Commands, instructions, data types, etc. are displayed in blue. Comments
(following an apostrophe character) are displayed in green. Incomplete
code elements or elements with syntax errors are displayed in red.
• An IntelliSense function is available for the automatic completion of code
elements known by the Visual Basic editor.
E.g. when writing a Debug.Print instruction, a corresponding selection
box appears after typing Debug. or when writing the declaration Dim cta
As New CTARemoteLib.CTA, a corresponding selection box appears
after typing Dim cta As New :
Use the arrow keys on your keyboard to select the desired entry from the
selection box and press the <Tab> key to insert it into your code.
Note You can open the IntelliSense selection box at any time by
selecting List Properties/Methods from the context menu of the
code window.
26 OMICRON
Operation
In the upper left list box, select the entry CTARemoteLib to display all available
elements of the CTA Remote Type Library.
The "Classes" area on the left then lists all interfaces and types included in the
CTA Remote Type Library. If you click on an entry in the "Classes" list, the
"Elements of" area on the right displays all elements available for this interface
or type (functions and properties in case of a selected interface or parameters,
setting variables or values in case of a selected type).
The information area on the bottom displays the code syntax and information
about the element selected in one of the lists mentioned above.
To enter an element of the object browser into your program code, click on the
respective entry to highlight it. Select Copy from the context menu or click on
the copy button and paste it at the desired position in the code window.
OMICRON 27
CTA Remote Control Programming Manual
28 OMICRON
Operation
Task
In our small example program explained below we want to
• start a new default test on the CT Analyzer and
• read the CT ratio and the ratio deviation determined during the test directly
from the CT Analyzer and
• display the results in the Immediate window of the Visual Basic editor.
Program creation
Start the Visual Basic editor (refer to section 5.3.1 on page 22).
If necessary, include the CTA Remote Type Library (refer to section 5.3.2 on
page 22).
Insert a new module (refer to section 5.3.4 on page 25).
Click into the code area of the code window and proceed as follows to create
the program (refer to the code example given in Figure 11):
1. First of all, it is necessary to instantiate the CTA remote component. The
object is cta.
Dim cta As New CTARemoteLib.CTA
2. Declare a new procedure using the Sub statement. In our example we are
using the name MyCode. After pressing the <Enter> key, the End Sub
statement (which is required to close the procedure) is automatically
inserted. Enter your further code between the Sub and the End Sub
statements.
Sub MyCode()
OMICRON 29
CTA Remote Control Programming Manual
3. Connect the CTA remote component to the CT Analyzer test set connected
via USB:
cta.USBConnect
5. Now, we have to wait until the test results are available, i.e. until the test is
finished. In our example we are using the eStatus property of the ICTA
interface to read the status in a While-Wend loop. The loop is executed as
long as the test is running (during this time, the status is
CTA_STAT_ACTIVATED. After the test is finished, the status returns to
CTA_STAT_READY. The condition given in the While-Wend loop is no
longer fulfilled and program execution continues with the code after Wend.
While cta.eStatus = CTA_STAT_ACTIVATED
Wend
This will display the results in the Immediate window e.g. like:
200:5.0056
0.112
7. Disconnect from the CT Analyzer.
cta.Disconnect
8. The End Sub statement was inserted automatically before with the
declaration of the Sub procedure (see step 2).
End Sub
Sub MyCode()
cta.USBConnect
cta.Test.Activate
Debug.Print cta.LiveResults.GetLiveValue(RV_RATIO_DISPL_STRING)
Debug.Print cta.LiveResults.GetLiveValue(RV_RATIO_DEVIATION_PERC)
cta.Disconnect
End Sub
30 OMICRON
Description of interfaces and functions
OMICRON 31
CTA Remote Control Programming Manual
32 OMICRON
Description of interfaces and functions
OMICRON 33
CTA Remote Control Programming Manual
34 OMICRON
Description of interfaces and functions
OMICRON 35
CTA Remote Control Programming Manual
36 OMICRON
Description of interfaces and functions
6.3.2.1 SerialConnect
Scope ICTA
Syntax Function SerialConnect([in]long nSCCline)
Description Establishes a connection between the CTA remote
component and the CT Analyzer test set connected to a
serial interface of the PC.
If the connection is established successfully, the
connection status changes from
CTA_STAT_NOT_CONNECTED to CTA_STAT_READY or
CTA_STAT_WAIT_FOR_ACKNOWLEDGE (refer to property eStatus
on page 43) and the CT Analyzer display shows a
corresponding connection symbol.
Parameters nSCCLine
Number of serial interface (1 for COM1, etc.).
Example in VB Dim cta as New CTARemoteLib.CTA
cta.SerialConnect 1
Connects to the CT Analyzer at serial port 1.
Example in C++ ICTAPtr cta(CLSID_CTA);
cta->SerialConnect(1);
OMICRON 37
CTA Remote Control Programming Manual
6.3.2.2 USBConnect
Scope ICTA
Syntax Function USBConnect([in,optional]string
bstrDeviceName)
Description Establishes a connection between the CTA remote
component and a CT Analyzer test set connected to the
PC via USB.
When the connection is established successfully, the
connection status changes from
CTA_STAT_NOT_CONNECTED to CTA_STAT_READY or
CTA_STAT_WAIT_FOR_ACKNOWLEDGE (refer to property
eStatus on page 43) and the CT Analyzer display shows a
corresponding connection symbol.
Parameters bstrDeviceName
Optional Parameter.
Six character serial number of the CT Analyzer test set
according to the nameplate.
Note:
If only one CT Analyzer test set is connected via USB, no
parameter is required. If several test sets are connected
via USB, you have to specify the serial number of the
CT Analyzer to be accessed.
Read the serial number from the nameplate of the
CT Analyzer or retrieve it by means of the USBDevices
property.
Example in VB cta.USBConnect
Connects to the CT Analyzer connected via USB. No
parameter is necessary, if only one CT Analyzer is
connected.
cta.USBConnect "AI153T"
Connects to test set AI153T (if more than one CT Analyzer
is connected via USB).
Example in C++ HRESULT hr = cta->USBConnect(_bstr_t(L”AI153T”));
if (SUCCEEDED(hr)) { … }
6.3.2.3 Disconnect
Scope ICTA
Syntax Function Disconnect()
Description Terminates the connection to the CT Analyzer. After the
connection is terminated, the connection status changes to
CTA_STAT_NOT_CONNECTED (refer to property eStatus on
page 43) ) and the connection symbol disappears from the
CT Analyzer display.
Example in VB cta.Disconnect
38 OMICRON
Description of interfaces and functions
6.3.2.4 UpgradeFirmware
Scope ICTA
Syntax Function UpgradeFirmware([in]string
bstrFile)
Description Used to perform an upgrade of the firmware on the
CT Analyzer.
Copies the firmware file from the specified path on the PC
to the Compact Flash card of the CT Analyzer and then
automatically performs the firmware upgrade on the
CT Analyzer.
Blocks the further program execution until the firmware
update process is finished. This can take several minutes.
The file is transferred to a temporary location and is
renamed when the transmission has successfully
completed. However, for reasons of security, do not
disconnect the cable between CT Analyzer and PC or
switch off the CT Analyzer during this process.
Parameters pbstrFile
Full path to the file CTAnalyzer.bin on the PC.
Example in VB cta.UpgradeFirmware "D:\CTA\Firmware\CTAnalyzer.bin"
OMICRON 39
CTA Remote Control Programming Manual
6.3.2.6 UpgradeLicenses
Scope ICTA
Syntax Function UpgradeLicenses([in]string
bstrFile)
Description Used to perform an upgrade of the licenses on the
CT Analyzer.
Copies the license file from the specified path on the PC to
the Compact Flash card of the CT Analyzer and then
automatically upgrades the licenses on the device.
Blocks the further program execution until the license
update process is finished.
Handle with care!
All existing licenses on the CT Analyzer will be overwritten.
Parameters bstrFile
Full path to the license file on the PC.
Example in VB cta.UpgradeLicenses "D:\CTA\LicenseBB170U.lic"
6.3.2.7 Advise
Scope ICTA
Syntax Function Advise([in]ICTAEvents
objCallback): long
Description Used to register for asynchronous event notification.
Whenever changes in the device status (see eStatus on
page 43) occur or new information is available, the
CT Analyzer reports them by calling the appropriate
functions in the callback object.
Only one object can be registered at the same time. The
caller of Advise() has to implement the ICTAEvents
interface (this interface is not separately described).
The returned value needs to be passed when calling
Unadvise().
Hint: It is difficult to use this feature with VB6 or VBA (used
in Excel), because these programming languages are not
designed for asynchronous operation. Therefore, it is
recommended to do without this function when using these
programming languages.
Using synchronous mechanisms instead, it is possible to
solve any task without exploiting this feature and without
any drawback for the system (refer to chapter Error
handling on page 205).
Parameters objCallback
An object of type ICTAEvents. The interface has to be
implemented by the calling application.
40 OMICRON
Description of interfaces and functions
class CCTACallback :
public
ComObjectRootEx<CComMultiThreadModelNoCS>,
public ICTAEvents
{
public:
DECLARE_AGGREGATABLE(CCTACallback)
DECLARE_PROTECT_FINAL_CONSTRUCT()
BEGIN_COM_MAP(CCTACallback)
COM_INTERFACE_ENTRY(ICTAEvents)
END_COM_MAP()
// ICTAEvents
public:
STDMETHODIMP OnStatusNotification(ICTA* pCTA, TCTAStatus eStat, long nInfo = 0)
{
switch (eStat) {
case CTA_STAT_NOT_CONNECTED: // TODO: add implementation
_tprintf(_T("\t <disconnected>\n"));
break;
default:
_tprintf(_T("\t <unknown CTA notification: %d>\n"), eStat);
}//endswitch
return S_OK;
OMICRON 41
CTA Remote Control Programming Manual
}// OnCTANotification
STDMETHODIMP OnInfoNotifiation(ICTA* pCTA, TCTAInfoClass eErrorClass, long nErrorCode,
long nErrorLocation, BSTR bstrErrorDescription)
{
_tprintf(_T("\t * %s: number %d, location %d: %s\n"), GetErrorClassString(eErrorClass),
nErrorCode, nErrorLocation, bstrErrorDescription);
return S_OK;
}// OnCTAError
};// CCTACallback
...
6.3.2.8 Unadvise
Scope ICTA
Syntax Function Unadvise([in]long nCookie)
Description Deregisters the asynchronous event sink. The cookie
retrieved from the previous call to Advise() has to be
passed.
Parameters nCookie
The cookie returned from the previous call of Advise().
Example in VB No example is given here. See description for Advise()
above.
Example in C++ cta->Unadvise(nSinkCookie);
42 OMICRON
Description of interfaces and functions
6.3.3.2 bstrFirmwareVersion
Scope ICTA
Syntax Property bstrFirmwareVersion : string
[read-only]
Description Used to query the firmware version of the CT Analyzer.
Return value Firmware version number.
This string has the following format: "m.n"
m is the major and n the minor version number
Example in VB Dim strVer As string
strVer = cta.bstrFirmwareVersion
Debug.Print strVer
Displays the firmware version in the Immediate window of
the Visual Basic editor.
Example in C++ printf(L"FWVersion %s", cta->bstrFirmwareVersion);
OMICRON 43
CTA Remote Control Programming Manual
6.3.3.3 bstrHardwareVersion
Scope ICTA
Syntax Property bstrHardwareVersion : string
[read-only]
Description Used to query the hardware version of the CT Analyzer.
Return value String containing the hardware version number in the
following format: "aa/bb/cc/dd/ee".
Each part indicates the version of an internal device part.
Example in VB Debug.Print cta.bstrHardwareVersion
6.3.3.4 bstrSoftwareVersion
Scope ICTA
Syntax Property bstrSoftwareVersion : string
[read-only]
Description Used to query the software version of the CTA Remote
Control Software.
Return value Software version number.
Example in VB Debug.Print cta.bstrSoftwareVersion
6.3.3.5 bstrSerialNumber
Scope ICTA
Syntax Property bstrSerialNumber : string [read-
only]
Description Used to query the serial number of the CT Analyzer.
Return value Serial number of the CT Analyzer.
Example in VB Dim sernum As String
sernum = cta.bstrSerialNumber
Debug.Print sernum
Displays the serial number in the Immediate window of the
Visual Basic editor.
Example in C++ printf(L"Serial %s", cta->bstrSerialNumber);
44 OMICRON
Description of interfaces and functions
6.3.3.6 Info
Scope ICTA
Syntax Property Info : ICTAInfo [read-only]
Description Used to access device messages through the ICTAInfo
interface. A message can be an operating error, a warning
or a hint.
Return value Access to the ICTAInfo interface (page 51).
Example in VB If cta.Info.eClass = CTA_INFO_CLS_ERROR Then
msgbox cta.Info.bstrDescription
End If
cta.Info.Clear
Example in C++ if (cta->Info->eClass == CTA_INFO_CLS_ERROR) {
_tprintf(_T("uuhps: %s"), cta->Info->bstrDescription);
}
cta->Info->Clear();
6.3.3.7 USBDevices
Scope ICTA
Syntax Property USBDevices : IUSBDevices [read-
only]
Description Used to access the list of serial numbers of all CT Analyzer
test sets connected via USB. This function returns the
IUSBDevices interface (this interface is not described
separately but the example below should suffice).
If more than one device is connected via USB, the serial
number of the desired device is passed to the
USBConnect() function. Otherwise, the first device found
on the USB bus is used.
Return value Access to the IUSBDevices interface.
Example in VB cta.USBDevices.Refresh
For i = 0 To cta.USBDevices.Count - 1
Debug.Print "CTA Device: "
cta.USBDevices.Item2(i).bstrSerialNumber
Next
Explanation of the example:
With each execution of the For-Next loop, the serial
number of one CT Analyzer connected via USB is
displayed in the Immediate window of the Visual Basic
editor (e.g. "CTA Device: AI153T"). The value i is
increased by 1 with each execution until all CT Analyzer
test sets detected on the USB bus are listed. After this, the
program code following Next is executed.
OMICRON 45
CTA Remote Control Programming Manual
6.3.3.8 HasLicense
Scope ICTA
Syntax Function HasLicense([in] TCTALicense eLic):
BOOL
Description Used to query whether a certain functionality or feature is
licensed on the CT Analyzer. The CT Analyzer must be
connected.
Parameters eLic
License to be queried (element of TCTALicense, see page
123.
Return value True, if license exists. Otherwise False is returned.
If the CT Analyzer is not connected, an error is returned.
Example in VB If cta.HasLicense(CTA_LIC_RATIO_CARD) Then
' enable ratio card
cta.Settings.SetValue SV_CARD_RATIO, True
End If
Example in C++ BOOL bLicensed = cta->HasLicense(CTA_LIC_RATIO_CARD);
if (bLicensed) {
cta->Settings->SetValue(SV_CARD_RATIO, TRUE);
}
6.3.3.9 MissingLicenses
Scope ICTA
Syntax Function MissingLicenses(): Variant
Description Reads a list of missing licenses.
These licenses prevent a start of a certain measurement
on the CT Analyzer.
Apply this Command just before an
"ICTARemoteTest.Activate" Command, to consider if you
can start a measurement.
Parameters
Return value List of license ID's.
See enum TCTALicense.
46 OMICRON
Description of interfaces and functions
6.3.3.10 AvailableLicenses
Scope ICTA
Syntax Function AvailableLicenses(): Variant
Description Reads a list of actual available licenses.
These licenses are enabled on the CT Analyzer.
Parameters
Return value List of license ID's.
See enum TCTALicense.
Example in VB Dim v As Variant
v = AvailableLicenses
Debug.Print "Number of licenses ="; UBound(v) –
IBound(v)
If UBound(v) <> -1 Then
For i = 0 To UBound(v)
Debug.Print "L ["; i; "]"; v(i)
Next i
End If
OMICRON 47
CTA Remote Control Programming Manual
6.3.3.11 NotAvailableLicenses
Scope ICTA
Syntax Function NotAvailableLicenses(): Variant
Description Reads a list of not available licenses.
Parameters
Return value List of license ID's.
See enum TCTALicense.
Example in VB Dim v As Variant
v = NotAvailableLicenses
Debug.Print "Number of licenses ="; UBound(v) –
IBound(v)
If UBound(v) <> -1 Then
For i = 0 To UBound(v)
Debug.Print "L ["; i; "]"; v(i)
Next i
End If
6.3.3.12 AddLicenses
Scope ICTA
Syntax Function AddLicenses([in]string bstrFile)
Description Used to perform an upgrade of the licenses on the
CT Analyzer.
Copies the license file from the specified path on the PC to
the Compact Flash card of the CT Analyzer and then
automatically upgrades the licenses on the device.
Blocks the further program execution until the license
update process is finished.
Unlike UpgradeLicensis() this function keeps the existing
licenses on the CT Analyzer and adds only the new
licenses.
Parameters bstrFile
Full path to the license file on the PC.
Example in VB cta.AddLicenses "D:\CTA\License.lic"
6.3.3.13 Test
Scope ICTA
Syntax Property Test : ICTARemoteTest [read-only]
Return value Access to the ICTARemoteTest interface (page 59).
Example in VB cta.Test.Activate
48 OMICRON
Description of interfaces and functions
6.3.3.14 Settings
Scope ICTA
Syntax Property Settings : ICTASettings [read-
only]
Return value Access to the ICTASettings interface (page 55).
Example in VB cta.Settings.LocalLoadSettings "mysettings.xml"
cta.Settings.SetValue SV_SER_NR, "1234567"
cta.Settings.LocalSaveSettings "mysettings.xml"
Example in C++ #import <CTARemote.tlb> no_namespace named_guids
ICTAPtr cta(CLSID_CTA);
cta->Settings-
>LocalLoadSettings(_bstr_t(L"mysettings.xml"));
cta->Settings->SetValue(SV_SER_NR,
_variant_t(L"1234567"));
cta->Settings-
>LocalSaveSettings(_bstr_t(L"mysettings.xml"));
6.3.3.15 Results
Scope ICTA
Syntax Property Results : ICTAResults [read-only]
Return value Access to the ICTAResults interface (page 71).
Example in VB Dim cta as new CTA
cta.Results.LocalLoadReport "myreport.xml"
Debug.Print
cta.Results.GetValue(RV_GENERAL_XML_FILE_VERSION)
Example in C++ #import <CTARemote.tlb> no_namespace named_guids
ICTAPtr cta(CLSID_CTA);
cta->Results-
>LocalLoadReport(_bstr_t(L"myreport.xml"));
_tprintf(_T("%s"), cta->Results-
>GetValue(RV_GENERAL_XML_FILE_VERSION));
6.3.3.16 LiveResults
Scope ICTA
Syntax Property LiveResults : ICTALiveResults
[read-only]
Return value Access to the ICTALiveResults interface (page 83).
Example in VB Dim cta as new CTA
Debug.Print
cta.Results.GetValue(RV_OBJECT_CT_MANUFACTURER)
Example in C++ ICTAPtr cta(CLSID_CTA);
_tprintf(_T("%s"), cta->Results-
>GetValue(RV_OBJECT_CT_MANUFACTURER));
OMICRON 49
CTA Remote Control Programming Manual
6.3.3.17 FileTransfer
Scope ICTA
Syntax Property FileTransfer : ICTAFileTransfer
[read-only]
Return value Access to the ICTAFileTransfer interface (page 64).
Example in VB cta.FileTransfer.CopyToCTA "localfile.xml",
"remotefile.xml"
Example in C++ cta->FileTransfer-
>CopyToCTA(_bstr_t(L"localfile.xml"),
_bstr_t(L"remotefile.xml"));
6.3.3.18 Directory
Scope ICTA
Syntax Property Directory : ICTARemoteDirectory
[read-only]
Return value Access to the ICTARemoteDirectory interface (page 66).
Example in VB cta.Directory.FileRename "ctafileold.xml",
"ctafilenew.xml"
Example in C++ cta->Directory.FileRename(_bstr_t(L"ctafileold.xml"),
_bstr_t(L"ctafilenew.xml"));
6.3.3.19 Calculate
Scope ICTA
Syntax Property Calculate : ICTACalc [read-only]
Return value Access to the ICTACalc interface (page 87).
Example in VB Dim cta as new CTA
Dim status As TCTAQualifier
Dim dbResult As Double
dbResult = cta.Calculat.EvalCompositeError (1000, 15,
1, status)
Debug.Print dbResult
Example in C++ #import <CTARemote.tlb> no_namespace named_guids
ICTAPtr cta(CLSID_CTA);
TCTAQualifier status;
double result = cta->Calculate-
>EvalCompositeError(1000, 15, 1, &status);
printf("%f", result);
6.3.3.20 Quick
Scope ICTA
Syntax Property Quick : ICTAQuick [read-only]
Return value Access to the ICTAQuick interface (page 109).
Example in VB cta.Quick.StartMeasurement
50 OMICRON
Description of interfaces and functions
OMICRON 51
CTA Remote Control Programming Manual
6.4.2.1 Clear
Scope ICTAInfo
Syntax Function Clear()
Description Resets the device information.
Parameters none
Example in VB cta.Info.Clear
6.4.3.1 eClass
Scope ICTAInfo
Syntax Property eClass : TCTAInfoClass
Description Returns the error class. If no error or information is
available, CTA_INFO_CLS_NONE is returned.
Return value Error class (element of TCTAInfoClass, see page 122).
Example in VB Debug.Print cta.Info.eClass
6.4.3.2 nNumber
Scope ICTAInfo
Syntax Property nNumber : integer
Description Returns the error/information number.
Return value Error/information number (refer to the CT Analyzer User
Manual). With this number the error description can be
found in the User Manual.
Example in VB Debug.Print cta.Info.nNumber
52 OMICRON
Description of interfaces and functions
6.4.3.3 nLocation
Scope ICTAInfo
Syntax Property nLocation : integer
Description Provides further details about the error condition. This
information is important for OMICRON to determine the
exact reason of the error.
Return value Location number. Location in the software where the error
was detected. Necessary to determine the exact cause of
error. This value is necessary for OMICRON Support to
exactly determine where the error was generated in the
software.
Example in VB Debug.Print cta.Info.nLocation
6.4.3.4 bstrDescription
Scope ICTAInfo
Syntax Property bstrDescription : string
Description A verbose description of the error condition. Only available
in English.
Return value Returns the descriptive string.
Example in VB Debug.Print cta.Info.bstrDescription
6.4.3.5 nMeasurementInfo
Scope ICTAInfo
Syntax Property nMeasurementInfo :
TCTAMeasurementInfo
Description This property provides detailed information about the
current CT Analyzer operation. This information can be
queried at any time (not only in context with an error
condition) to see what the device is currently doing.
OMICRON 53
CTA Remote Control Programming Manual
54 OMICRON
Description of interfaces and functions
OMICRON 55
CTA Remote Control Programming Manual
6.5.2.1 LocalLoadSettings
Scope ICTASettings
Syntax Function LocalLoadSettings([in]string
LocalPath)
Description Loads a settings file (test definition) from a local drive on
the PC.
After this, the individual settings can be queried using the
GetValue() function, changed using SetValue() and
stored again using LocalSaveSettings().
Using this function, it is possible to load settings files and
test report files, since both file types share the same file
structure and format (XML). The difference is that test
report files contain test results in addition to the test
settings.
When loading a test report file using this function, all test
results contained in this file are discarded, and will be lost
when calling LocalSaveSettings().
Parameters LocalPath (full path to the settings file on the PC)
Example in VB Dim sett As ICTASettings
set sett = cta.Settings
sett.LocalLoadSettings "D:\CTA_Test\settings1.xml"
Example in C++ cta->Settings->LocalLoadSettings
(_bstr_t(L"D:\CTA_Test\settings1.xml"));
6.5.2.2 LocalSaveSettings
Scope ICTASettings
Syntax Function LocalSaveSettings([in]string
LocalPath)
Description Saves a settings file (test definition, file extension .XML) to
a local drive on the PC.
Parameters LocalPath (full path on the PC and file name)
Example in VB cta.Settings.LocalSaveSettings
"D:\CTA_Test\settings2.xml"
Example in C++ cta->Settings->LocalLoadSettings
(_bstr_t(L"D:\CTA_Test\settings2.xml"));
56 OMICRON
Description of interfaces and functions
6.5.2.3 ClearSettings
Scope ICTASettings
Syntax Function ClearSettings()
Description This function is used to reset all settings to the default
values.
Example in VB Dim sett As ICTASettings
set sett = cta.Settings
sett.LocalLoadSettings "D:\CTA_Test\settings1.xml"
sett.ClearSettings
Example in C++ cta->Settings->LocalLoadSettings
(_bstr_t(L"D:\CTA_Test\settings1.xml"));
cta->Settings->ClearSettings();
6.5.2.4 GetValue
Scope ICTASettings
Syntax Function GetValue([in]TCTASettingValue id):
Variant
Description Reads the value of a particular test setting.
Parameters id
(ID of the setting value to be read (element of
TCTASettingValue, see page 129))
Return value Setting value of the test parameter.
Data type: Variant.
Example in VB cta.Settings.LocalLoadSettings
"D:\CTA_Test\settings1.xml"
Debug.Print cta.Settings.GetValue(SV_ALF)
Example in C++ cta->Settings->LocalLoadSettings(_bstr_t(L"
D:\CTA_Test\settings1.xml "));
_variant_t v = cta->Settings->GetValue(SV_ALF);
_tprintf(_T("%d"), cta->Settings->GetValue(SV_ALF));
OMICRON 57
CTA Remote Control Programming Manual
6.5.2.5 SetValue
Scope ICTASettings
Syntax Function SetValue([in]TCTASettingValue
paramid, [in]Variant value) : Variant
Description Used to set the value of a particular test setting.
The specified value may be reduced or corrected
automatically, if it exceeds the allowed value range. In this
case, the corrected value is returned. The same value
would be returned when using the function GetValue()
subsequently.
Parameters paramid
(test parameter, the value of which you want to set
(element of TCTASettingValue, see page 129))
value
(new value of the test setting; since a Variant type is
requested, values of any type can be passed)
Return Parameter:
The return parameter should be the same as [in]Variant
value but may be reduced or corrected automatically, if it
exceeds the allowed value range. In this case, the
corrected value is returned. The same value would be
returned when using the function GetValue()
subsequently.
58 OMICRON
Description of interfaces and functions
OMICRON 59
CTA Remote Control Programming Manual
6.6.2.2 RemoteSaveReport
Scope ICTARemoteTest
Syntax Function RemoteSaveReport([in]string
RemotePath)
Description Saves the current test report on the CT Analyzer (to the
Compact Flash card or the internal RAM disk).
Hint: Always use the RAM disk to avoid that the limit of
possible write cycles of the Compact Flash card is
reached.
Parameters RemotePath (full path on the CT Analyzer and file name)
Example in VB cta.Test.RemoteSaveReport "b:/Tests/test2.xml"
6.6.2.3 Activate
Scope ICTARemoteTest
Syntax Function Activate()
Description Activates a test. Unlike the other functions, Activate()
does not wait until its execution is completed. Control is
immediately returned to the caller while the CT Analyzer
performs the test procedure concurrently.
Activating the test is only possible, if the device status (to
be queried by the ICTA::eStatus property) is
CTA_STAT_READY. If the device status is
CTA_STAT_WAIT_FOR_ACKNOWLEDGE, a message is still
pending and needs to be acknowledged using
ICTA::Info.Clear().
After the test activation, the device status changes to
CTA_STAT_ACTIVATED. This status is kept until one of the
following occurs:
1. The test completed successfully. The device status
changes to CTA_STAT_READY.
2. The test failed or was aborted. In this case, the
device status changes to
CTA_STAT_WAIT_FOR_ACKNOWLEDGE.
3. The test is still active but the execution is paused,
since rewiring of the test object is required. This is
the case if you have to measure the burden and
the winding resistance in one test procedure.
Then, the device status changes to
CTA_STAT_PAUSED. After rewiring is finished,
Activate() has to be called again to continue.
After this, the device status returns to
CTA_STAT_ACTIVATED (see the example below
for a proper implementation).
60 OMICRON
Description of interfaces and functions
OMICRON 61
CTA Remote Control Programming Manual
6.6.2.4 Deactivate
Scope ICTARemoteTest
Syntax Function Deactivate()
Description Aborts a running test.
The Deactivate function can take several minutes,
depending on whether demagnetization of the test object is
required or not. In contrast to Activate(), the
Deactivate() function does not return before the action
is completed.
Example in VB cta.Test.Deactivate
62 OMICRON
Description of interfaces and functions
6.6.2.5 LoadRefExcitationCurve
Scope ICTARemoteTest
Syntax Function LoadRefExcitationCurve([in]string
RemotePath)
Description Loads an excitation curve of a previous test as a
reference curve. This is used to compare the current
results with a previous test.
LoadRefExcitationCurve() must not be called until
the test is completed.
The test report file containing the reference curve has to
be available on the Compact Flash card or the internal
RAM disk.
Parameters RemotePath (full path to a report file)
Example in VB cta.Test.LoadRefExcitationCurve "/Tests/test1.xml"
6.6.2.6 LockDevice
Scope ICTARemoteTest
Syntax Function LockDevice()
Description Locks the keyboard of the CT Analyzer. This prevents e.g.
unauthorized changes of settings as long as the device is
under remote control.
All keys except the "I/O" key are locked, so that a manual
abortion of a running test is still possible.
Use the UnlockDevice function to unlock the keyboard
again.
Example in VB cta.Test.LockDevice
6.6.2.7 UnlockDevice
Scope ICTARemoteTest
Syntax Function UnlockDevice()
Description Unlocks the keyboard of the CT Analyzer.
Example in VB cta.Test.UnlockDevice
OMICRON 63
CTA Remote Control Programming Manual
6.7.2.1 CopyToCTA
Scope ICTAFileTransfer
Syntax Function CopyToCTA([in]string LocalPath,
[in]string RemotePath)
Description Copies a file from a local drive on the PC to the Compact
Flash card or the internal RAM disk of the CT Analyzer.
The file transfer can take some seconds.
Hint: Always use the RAM disk to avoid that the limit of
possible write cycles of the Compact Flash card is
reached.
Parameters LocalPath
(full local PC path of the file to be copied)
RemotePath
(full remote path of the file on the target device)
Example in VB cta.FileTransfer.CopyToCTA
"D:\CTA_Tests\settings1.xml", "b:/Tests/test1.xml"
Example in C++ cta->FileTransfer-
>CopyToCTA(_bstr_t(L"D:\CTA_Tests\settings1.xml"),
_bstr_t(L"b:/Tests/test1.xml"));
64 OMICRON
Description of interfaces and functions
6.7.2.2 CopyFromCTA
Scope ICTAFileTransfer
Syntax Function CopyFromCTA([in]string RemotePath,
[in]string LocalPath)
Description Copies a file from the Compact Flash card or the internal
RAM disk of the CT Analyzer to a local drive on the PC.
The file transfer can take some seconds.
Parameters RemotePath
(full remote path of the file on the target device)
LocalPath
(full local PC path of the file to be copied)
Example in VB cta.FileTransfer.CopyFromCTA "b:/Tests/test1.xml",
"D:\CTA_Tests\test1.xml"
Example in C++ cta->FileTransfer-
>CopyFromCTA(_bstr_t(L"b:/Tests/test1.xml"),
_bstr_t(L"D:\CTA_Tests\settings1.xml"));
OMICRON 65
CTA Remote Control Programming Manual
66 OMICRON
Description of interfaces and functions
OMICRON 67
CTA Remote Control Programming Manual
6.8.2.2 FileMove
Scope ICTARemoteDirectory
Syntax Function FileMove([in]string
bstrRemoteFileOld, [in]string
bstrRemoteFileNew)
Description Using this function, you can move a file stored on the
CT Analyzer.
Parameters bstrRemoteFileOld (full path of the file to be moved)
bstrRemoteFileNew (new full path)
Example in VB cta.Directory.FileMove "A:/Tests1/test1.xml",
"A:/Tests2/test1.xml"
Example in C++ cta->Directory-
>FileMove(_bstr_t(L"A:/Tests1/test1.xml"),
_bstr_t(L"A:/Tests2/test1.xml"));
6.8.2.3 FileRename
Scope ICTARemoteDirectory
Syntax Function FileRename([in]string
bstrRemoteFileOld, [in]string
bstrRemoteFileNew)
Description Using this function, you can rename a file stored on the
CT Analyzer.
Parameters bstrRemoteFileOld (full path of the file to be renamed)
bstrRemoteFileNew (new full path)
Example in VB cta.Directory.FileRename "A:/Tests/test1.xml",
"A;/Tests/test1renamed.xml"
Example in C++ cta->Directory->FileRename(_bstr_t(L"A:/Tests/
test1.xml"), _bstr_t(L"A:/Tests/test1renamed.xml"));
6.8.2.4 FileCopy
Scope ICTARemoteDirectory
Syntax Function FileCopy([in]string
bstrRemoteFileOld, [in]string
bstrRemoteFileNew)
Description Using this function, you can copy a file stored on the
CT Analyzer.
Parameters bstrRemoteFileOld (full path of the file to be renamed)
bstrRemoteFileNew (new full path)
Example in VB cta.Directory.FileCopy "A:/Tests1/test1.xml",
"A:/Tests2/test1.xml"
Example in C++ cta->Directory-
>FileCopy(_bstr_t(L"A:/Tests1/test1.xml"),
_bstr_t(L"A:/Tests2/test1.xml"));
68 OMICRON
Description of interfaces and functions
6.8.2.5 FileRemove
Scope ICTARemoteDirectory
Syntax Function FileRemove([in]string
bstrRemoteFile)
Description Deletes a file on the CT Analyzer.
Parameters bstrRemoteFile (full path of the file to be deleted)
Example in VB cta.Directory.FileRemove "/Tests/test1.xml"
6.8.2.6 DirectoryCreate
Scope ICTARemoteDirectory
Syntax Function DirectoryCreate([in]string
bstrRemoteDir)
Description Using this function, you can create a new folder on the
CT Analyzer.
Parameters bstrRemoteDir (full path of the new folder)
Example in VB cta.Directory.DirectoryCreate "/Tests/MyNewTests"
6.8.2.7 DirectoryRemove
Scope ICTARemoteDirectory
Syntax Function DirectoryRemove([in]string
bstrRemoteDir)
Description Deletes a folder on the CT Analyzer.
Only empty folders can be deleted. If you try to delete a
folder containing files or subfolders, an error message is
displayed.
Parameters bstrRemoteDir (full path of the folder to be deleted)
Example in VB cta.Directory.DirectoryRemove "/Tests/MyTests"
6.8.2.8 FormatDisk
Scope ICTARemoteDirectory
Syntax Function FormatDisk()
Description Formats the Compact Flash card inserted in the
CT Analyzer.
Warning:
All data stored on the Compact Flash card will be lost.
Example in VB cta.Directory.FormatDisk
OMICRON 69
CTA Remote Control Programming Manual
70 OMICRON
Description of interfaces and functions
OMICRON 71
CTA Remote Control Programming Manual
6.9.2.1 LocalLoadReport
Scope ICTAResults
Syntax Function LocalLoadReport([in]string
LocalPath)
Description Loads a test report file (XML file) from a local drive on the
PC for further processing using the functions GetValue,
GetIndexedValue and GetIndexedValues.
Note: Test report files and test settings files (test
definitions) are of the same file structure and have the
same file extension (.XML). Setting files, however, do not
contain test results and therefore loading a settings file
using this function will fail.
Parameters LocalPath
(full path and file name of the report file to be loaded)
Example in VB cta.results.LocalLoadReport "D:\CTA_Test\test1.xml"
6.9.2.2 GetValue
Scope ICTAResults
Syntax Function GetValue([in]TCTAResultValue id) :
Variant
Description Reads a particular result value. See TCTAResultValue on
page 140 for the available result values.
Parameters id
ID of the value you want to query, see TCTAResultValue
(page 140).
Return value The result value (type: Variant).
A Variant is able to hold values of any data type. So, the
returned value can be a float, an enumeration type, an
integer or a string.
For the actual data types of the requested ID, please refer
to TCTAResultValue (page 140).
Example in VB cta.Results.LocalLoadReport "D:\CTA_Test\test1.xml"
Debug.Print cta.Results.GetValue
(RV_OBJECT_CT_MANUFACTURER)
Example in C++ cta->Results-
>LocalLoadReport(_bstr_t(L"D:\CTA_Test\test1.xml"));
_tprintf(_T("%s"), (_bstr_t)(cta->Results-
>GetValue(RV_OBJECT_CT_MANUFACTURER));
72 OMICRON
Description of interfaces and functions
6.9.2.3 GetIndexedValue
Scope ICTAResults
Syntax Function
GetIndexedValue([in]TCTAResultIndexedValue
id, [in]integer idx) : Variant
Description Reads a single value of a particular result value list (e.g.
the excitation curve).
If a particular test result is not a single value but consists of
a list of values instead (e.g. an excitation curve, a table,
etc.), all values in this list have an index number assigned.
Please refer to TCTAResultIndexedValue (page 173) for
the available value lists.
Note: If you access an index number which is not
available, an error is thrown. When iterating through the
list, this can be used to terminate the iteration.
Parameters id
ID of the value list you want to query, see
TCTAResultIndexedValue (page 173).
idx
Index number of the particular result you want to query.
Return value The result value (type: Variant).
A Variant is able to hold values of any data type. So, the
returned value can be a float, an enumeration type, an
integer or a string.
For the actual data types of the requested ID, please refer
to TCTAResultIndexedValue (page 173).
Example 1 (VB) cta.Results.LocalLoadReport "D:\CTA_Test\test1.xml"
cta.Results.GetIndexedValue(RV_RATIO_CURVE_EMF_V, 9)
Queries the 9th value of the results list for
RV_RATIO_CURVE_EMF_V.
Example 2 (VB) cta.Results.LocalLoadReport "D:\CTA_Test\test1.xml"
(query number of
existing values) Dim i As Integer
i = 0
On Error GoTo finish
While True
Debug.Print
cta.Results.GetIndexedValue(RV_RATIO_CURVE_EMF_V, i)
i = i + 1
Wend
finish: Debug.Print "Number of values:"; i
Explanation of the example:
The code shown in this example prints all values of the
RV_RATIO_CURVE_EMF_V value list (curve).
All values are successively read until the end of the list is
exceeded. Since an invalid index is requested then, an
error is thrown. Due to the preceding declaration On
Error Goto finish, the program execution then jumps
to the label named "finish".
OMICRON 73
CTA Remote Control Programming Manual
6.9.2.4 GetIndexedValues
Scope ICTAResults
Syntax Function
GetIndexedValues([in]TCTAResultIndexedValue
id) : Variant
Description Reads all values of a particular result values list at once.
Most of the value lists are measurement curves with the
values representing the individual points.
Please refer to TCTAResultIndexedValue on page 173 for
a summary of all available lists.
Using this function you can read the complete list of values
(e.g. all values of the excitation curve) at once.
Parameters id
(ID of the value list you want to query, see
TCTAResultIndexedValue (page 173))
Return value List of result values. The list is delivered as a value array
packed into a Variant type. How to access the individual
values is shown in the example below.
74 OMICRON
Description of interfaces and functions
Dim v As Variant
v = cta.Results.GetIndexedValues(RV_RATIO_CURVE_EMF_V)
6.9.2.5 GetCompositeError
Scope ICTAResults
Syntax Function GetCompositeError([in]float
fIPrim, [in]float fBurden, [in]fCosPhi) :
float
Description This function returns the composite error according to the
IEC 60044-1 direct measurement method for the specified
primary current, burden and CosPhi. The composite error
can only be calculated up to a maximum primary current
(see GetMaxPrimaryCurrent on page 78).
LocalLoadReport has to be called before using this
function.
Parameters fIPrim (primary current)
fBurden (operating burden)
fCosPhi (cosine of phase angle)
All values are passed as of type float.
Return value The calculated composite error for the current report and
the parameters passed.
OMICRON 75
CTA Remote Control Programming Manual
6.9.2.6 GetPhaseDeviation
Scope ICTAResults
Syntax Function GetPhaseDeviation([in]float
fIPrim, [in]float fBurden, [in]fCosPhi) :
float
Description This function returns the phase deviation in degrees of the
secondary current for the specified primary current, burden
and CosPhi. The phase deviation can only be calculated
up to a maximum primary current (see
GetMaxPrimaryCurrent on page 78).
LocalLoadReport has to be called before using this
function.
Parameters fIPrim (primary current)
fBurden (operating burden)
fCosPhi (cosine of phase angle)
All values are passed as of type float.
Return value The calculated phase deviation for the current report and
the parameters passed.
Example in VB Dim cta as new CTA
cta.Results.LocalLoadReport “C:\my report.xml”
Dim isec, burden, cosphi As Single
isec = 1.0
burden = 33.3
cosphi = 0.5
Debug.Print cta.Results.GetPhaseDeviation(isec,
burden, cosphi)
Example in C++ ICTAPtr pCTA(CLSID_CTA);
cta->Results->LocalLoadReport(_bstr_t(L"C:\my
report.xml"));
float fCompErr = cta->Results->GetPhaseDeviation(1.0,
33.3, 0.5);
76 OMICRON
Description of interfaces and functions
6.9.2.7 GetRatioDeviation
Scope ICTAResults
Syntax Function GetRatioDeviation([in]float
fIPrim, [in]float fBurden, [in]fCosPhi) :
float
Description This function returns the current ratio deviation for the
specified primary current, burden and CosPhi. The current
ratio deviation can only be calculated up to a maximum
primary current (see GetMaxPrimaryCurrent on page 78).
LocalLoadReport has to be called before using this
function.
Parameters fIPrim (primary current)
fBurden (operating burden)
fCosPhi (cosine of phase angle)
All values are passed as of type float.
Return value The calculated ratio deviation for the current report and the
parameters passed.
Example in VB Dim cta as new CTA
cta.Results.LocalLoadReport “C:\my report.xml”
Dim isec, burden, cosphi As Single
isec = 1.0
burden = 33.3
cosphi = 0.5
Debug.Print cta.Results.GetRatioDeviation(isec,
burden, cosphi)
Example in C++ ICTAPtr pCTA(CLSID_CTA);
cta->Results->LocalLoadReport(_bstr_t(L"C:\my
report.xml"));
float fCompErr = cta->Results->GetRatioDeviation(1.0,
33.3, 0.5);
OMICRON 77
CTA Remote Control Programming Manual
6.9.2.8 GetMaxPrimaryCurrent
Scope ICTAResults
Syntax Function GetMaxPrimaryCurrent([in]float
fBurden, [in]fCosPhi) : float
Description Delivers that maximum value for the primary current, the
software can deliver valid results for GetCompositeError,
GetPhaseDeviation and GetRatioDeviation. The device
can only calculate this parameters in that range of the CT
where a excitation curve could be measured.
LocalLoadReport has to be called before using this
function.
Parameters fBurden (operating burden
fCosPhi (cosine of phase angle)
All values are passed as of type float.
Return value The calculated maximum primary current for the current
report and the parameters passed. LocalLoadReport has
to be called before.
Example in VB Dim cta as new CTA
cta.Results.LocalLoadReport “C:\my report.xml”
Dim isec, burden, cosphi As Single
isec = 1.0
burden = 33.3
cosphi = 0.5
Debug.Print cta.Results.GetMaxPrimaryCurrent(isec,
burden, cosphi)
Example in C++ ICTAPtr pCTA(CLSID_CTA);
cta->Results->LocalLoadReport(_bstr_t(L"C:\my
report.xml"));
float fCompErr = cta->Results-> GetMaxPrimaryCurrent
(1.0, 33.3, 0.5);
78 OMICRON
Description of interfaces and functions
6.9.2.9 GetISec
Scope ICTAResults
Syntax Function GetISec([in]float fIPrim,
[in]float fBurden, [in]fCosPhi) : float
Description This function returns the secondary current for the
specified primary current, burden and CosPhi. The
secondary current can only be calculated up to a maximum
primary current (see GetMaxPrimaryCurrent on page 78).
LocalLoadReport has to be called before using this
function.
Parameters fIPrim (primary current)
fBurden (operating burden)
fCosPhi (cosine of phase angle)
All values are passed as of type float.
Return value The calculated secondary current for the current report and
the parameters passed. LocalLoadReport has to be called
before.
Example in VB Dim cta as new CTA
cta.Results.LocalLoadReport “C:\my report.xml”
Dim isec, burden, cosphi As Single
isec = 1.0
burden = 33.3
cosphi = 0.5
Debug.Print cta.Results.GetISec(isec, burden, cosphi)
Example in C++ ICTAPtr pCTA(CLSID_CTA);
cta->Results->LocalLoadReport(_bstr_t(L"C:\my
report.xml"));
float fCompErr = cta->Results->GetISec(1.0, 33.3,
0.5);
6.9.2.10 GetErrorDescription
Scope ICTAResults
Syntax Function GetErrorDescription([in]long
nErrorNumber) : String
Description Get a verbose description of the error number. The number
might have been read by
GetValue(RV_GENERAL_ERROR_NR)
Parameters nErrorNumber (CT Analyzer error number)
Return value descriptive string
Example in VB Debug.Print
cta.Results.GetErrorDescription(cta.Results.GetValue(R
V_GENERAL_ERROR_NR))
Example in C++ variant_t varErrNumber = cta->Results-
>GetValue(RV_GENERAL_ERROR_NR);
_bstr_t bstrErrDescr = cta->Results-
>GetErrorDescription(varErrNumber);
OMICRON 79
CTA Remote Control Programming Manual
6.9.2.11 SetValue
Scope ICTAResults
Syntax Function SetValue([in]TCTAResultValue
paramid, [in]Variant value) : Variant
Description Used to set the value of a particular test result.
The same value would be returned when using the function
GetValue() subsequently.
Parameters paramid
(result parameter, the value of which you want to set
(element of TCTAResultValue, see page 140))
The following parameters are possible:
RV_OBJECT_LOC_COMPANY
RV_OBJECT_LOC_COUNTRY
RV_OBJECT_LOC_STATION
RV_OBJECT_LOC_FEEDER
RV_OBJECT_LOC_PHASE
RV_OBJECT_LOC_IECID
RV_OBJECT_OBJ_CT_TAP
RV_OBJECT_OBJ_OPTION1
RV_OBJECT_OBJ_MANUF
RV_OBJECT_OBJ_CT_TYPE
RV_OBJECT_OBJ_CT_SER_NR
RV_OBJECT_OBJ_CT_CORE_NR
RV_COMMENT_TEXT
value
(new value of the result setting; since a Variant type is
requested, values of any type can be passed)
Example in VB Dim result As ICTAResults
set result = cta.Results
result.SetValue(RV_OBJECT_LOC_COMPANY, v)
Example in C++ _variant_t vin = "Company";
_variant_t vout;
vout = cta->Results->SetValue(RV_OBJECT_LOC_COMPANY,
vin);
80 OMICRON
Description of interfaces and functions
6.9.2.12 LocalSaveReport
Scope ICTAResults
Syntax Function LocalSaveReport([in]string
LocalPath)
Description Saves a report to a local drive on the PC.
Parameters LocalPath (full path on the PC and file name)
Example in VB cta.Results.LocalSaveReport "D:\CTA_Test\report2.xml"
6.9.2.13 IsReportSecure
Scope ICTAResults
Syntax Property IsReportSecure : TCTAChecksResult
Description Checks if the checksum of the actual loaded report is valid
(see also TCTAChecksResult on page 127).
6.9.2.14 GetAssessInfo
Scope ICTAResults
Syntax Function
GetAssessInfo([in]TCTAAssessParameter
ParamId, [in]TCTAAssessInfo InfoId) :
Variant
Description Reads detailed assessment information, depending on the
parameters param_id and info_id.
Parameters ParamId
ID of the assessment value you want to query, see
TCTAAssesParameter.
InfoId
ID of the particular value for the provided assessment
(ParamId) you want to query, see TCTAAssesInfo.
Return value The result value (type: Variant).
A Variant is able to hold values of any data type. So, the
returned value can be a float, an enumeration type, an
integer or a string.
For the actual data types of the requested ID, please refer
to TCTAAssessInfo.
Note Calls with ParamId
ASS_PARAM_UNSPECIFIED,
ASS_PARAM_CLASS,
ASS_PARAM_RATIO_ERR,
ASS_PARAM_RCF,
ASS_PARAM_PHASE_ERR,
return no result.
They are not supported and will throw an error.
OMICRON 81
CTA Remote Control Programming Manual
82 OMICRON
Description of interfaces and functions
OMICRON 83
CTA Remote Control Programming Manual
6.10.2.1 GetLiveValue
Scope ICTALiveResults
Syntax Function GetLiveValue([in]TCTAResultValue
id) : Variant
Description Reads a particular result value directly on the CT Analyzer.
See TCTAResultValue on page 140 for the available result
values.
Parameters id
(ID of the value you want to query, see TCTAResultValue
(page 140))
Return The result value (type: Variant).
A Variant is able to hold values of any data type. So, the
returned value can be a float, an enumeration type, an
integer or a string.
For the actual data types of the requested ID, please refer
to TCTAResultValue (page 140).
Example in VB Debug.Print cta.LiveResults.GetLiveValue
(RV_BURDEN_AUTO_ASSESS)
Example in C++ bool bAssessBurden = (bool)(cta->LiveResults->
GetLiveValue(RV_BURDEN_AUTO_ASSESS));
6.10.2.2 GetLiveIndexedValue
Scope ICTALiveResults
Syntax Function GetLiveIndexedValue(
[in]TCTAResultIndexedValue id, [in]integer
idx) : Variant
Description Reads a single value of a particular result value list (e.g.
the excitation curve) directly on the CT Analyzer.
If a particular test result is not a single value but consists of
a list of values instead (e.g. an excitation curve, a table,
etc.), all values in this list have an index number assigned.
Please refer to TCTAResultIndexedValue (page 173) for
the available value lists.
Note: If you access an index number which is not
available, an error is thrown. When iterating through the
list, this can be used to terminate the iteration.
Parameters id
(ID of the value list you want to query, see
TCTAResultIndexedValue (page 173))
idx
(index number of the result you want to query)
84 OMICRON
Description of interfaces and functions
6.10.2.3 GetLiveIndexedValues
Scope ICTALiveResults
Syntax Function
GetLiveIndexedValues([in]TCTAResultIndexedV
alue id) : Variant
Description Reads all values of a particular result values list on the
CT Analyzer at once. Most of the value lists are
measurement curves with the values representing the
individual points.
Please refer to TCTAResultIndexedValue on page 173 for
a summary of all available lists.
Using this function you can read the complete list of values
(e.g. all values of the excitation curve) at once.
Parameters id
(ID of the value list you want to query, see
TCTAResultIndexedValue (page 173))
OMICRON 85
CTA Remote Control Programming Manual
6.10.2.4 GetLiveErrorDescription
Scope ICTAResults
Syntax Function GetLiveErrorDescription([in]long
nErrorNumber) : String
Description Get a verbose description of the error number. The number
might have been read using
GetValue(RV_GENERAL_ERROR_NR)
Parameters nErrorNumber (CT Analyzer error number)
Return value descriptive string
Example in VB Debug.Print
cta.Results.GetLiveErrorDescription(cta.Results.
GetValue(RV_GENERAL_ERROR_NR))
Example in C++ variant_t varErrNumber = cta->Results->
GetValue(RV_GENERAL_ERROR_NR);
_bstr_t bstrErrDescr = cta->Results->
GetLiveErrorDescription(varErrNumber);
86 OMICRON
Description of interfaces and functions
OMICRON 87
CTA Remote Control Programming Manual
RmsAtVcore voltage.
EvalExcitationCurrent Excitation current rms value at a specified
RmsAtVTerm terminal voltage.
EvalExcitationCurrent Excitation current peak value at a specified core
PeakAtVcore voltage.
EvalVTermAtExcitation Terminal voltage at a specified excitation current
CurrentRms rms value.
EvalVCoreAtExcitation Core voltage at a specified excitation current rms
CurrentRms value.
EvalVCoreAtExcitation Core voltage at a specified excitation current
CurrentPeak peak value.
AL_MaxPrimaryCurrent AL-Error graph.
Max. primary current for a specified error (and at
burden impedance = 0 ohms).
AL_MaxImpedance AL-Error graph.
Max. impedance for a specified error (and at
nominal primary current).
AL_Impedance AL-Error graph.
AtPrimaryCurrent lmpedance for a specified error and a specified
primary current at a specified CosPhi.
AL_PrimaryCurrent AL-Error graph.
AtImpedance Primary current for a specified error and a
specified impedance and CosPhi.
AL_PrimaryCurrent AL-Error graph.
AtNomBurden Primary current at nominal burden.
(Error value and burden are taken from the
actually loaded measurement).
AL_PrimaryCurrent AL-Error graph.
AtOprBurden Primary current at operating burden.
(Error value and burden are taken from the
actually loaded measurement)
88 OMICRON
Description of interfaces and functions
6.11.2.1 EvalCompositeError
Scope ICTACalc
Syntax Function EvalCompositeError([in]float
fIprim, [in]float fBurden, [in]float
fCosPhi, [out]enum TCTAQualifier* peStatus)
: float
Description This function returns the composite error according to the
IEC 60044-1 direct measurement method for the specified
primary current, burden and CosPhi. The composite error
can only be calculated up to a maximum primary current
(see GetMaxPrimaryCurrent on page 78). If the primary
current exceeds this value, the composite error is limited,
and the value of *peStatus returns QV_BOUNDED ( = 1).
LocalLoadReport has to be called before using this
function.
Parameters float fIPrim (primary current)
float fBurden (operating burden)
float fCosPhi (cosine of phase angle)
enum TCTAQualifier* peStatus
(address to a status value)
Return value The composite error calculated for the currently loaded
report and for the parameter values passed with this
function call.
The status value *peStatus contains the qualifier:
QV_INVALID = -1,
QV_VALID = 0,
QV_BOUNDED = +1
Example in VB Dim cta as new CTA
cta.Results.LocalLoadReport “C:\my report.xml”
Dim status As TCTAQualifier
result = cta.Calculate.EvalCompositeError(2000.0, 2.5,
1.0, status)
if status = QV_VALID then
Debug.Print result
end if
Example in C++ ICTAPtr pCTA(CLSID_CTA);
cta->Results->LocalLoadReport(_bstr_t(L"C:\my
report.xml"));
enum TCTAQualifier status;
float fCompErr = cta->Calculate-
>EvalCompositeError(2000.0, 2.5, 1.0, &status);
OMICRON 89
CTA Remote Control Programming Manual
6.11.2.2 EvalPhaseDeviation
Scope ICTACalc
Syntax Function EvalPhaseDeviation([in]float
fIprim, [in]float fBurden, [in]float
fCosPhi, [out]enum TCTAQualifier* peStatus)
: float
Description This function returns the phase deviation in degrees of the
secondary current for the specified primary current, burden
and CosPhi. The phase deviation can only be calculated
up to a maximum primary current (see
GetMaxPrimaryCurrent on page 78). If the primary current
exceeds this value, the phase deviation is limited, and the
value of *peStatus returns QV_BOUNDED ( = 1).
LocalLoadReport has to be called before using this
function.
Parameters float fIPrim (primary current)
float fBurden (operating burden)
float fCosPhi (cosine of phase angle)
enum TCTAQualifier* peStatus
(address to a status value)
Return value The phase deviation calculated for the currently loaded
report and for the parameter values passed with this
function call.
The status value *peStatus contains the qualifier:
QV_INVALID = -1,
QV_VALID = 0,
QV_BOUNDED = +1
Example in VB Dim cta as new CTA
cta.Results.LocalLoadReport “C:\my report.xml”
Dim status As TCTAQualifier
result = cta.Calculate.EvalPhaseDeviation(2000.0, 2.5,
1.0, status)
if status = QV_VALID then
Debug.Print result
end if
Example in C++ ICTAPtr pCTA(CLSID_CTA);
cta->Results->LocalLoadReport(_bstr_t(L"C:\my
report.xml"));
enum TCTAQualifier status;
float fPhaseDeviation = cta->Calculate-
>EvalPhaseDeviation(2000.0, 2.5, 1.0, &status);
90 OMICRON
Description of interfaces and functions
6.11.2.3 EvalRatioDeviation
Scope ICTACalc
Syntax Function EvalRatioDeviation([in]float
fIPrim, [in]float fBurden, [in]float
fCosPhi, [out]enum TCTAQualifier* peStatus)
: float
Description This function returns the current ratio deviation for the
specified primary current, burden and CosPhi. The current
ratio deviation can only be calculated up to a maximum
primary current (see GetMaxPrimaryCurrent on page 78).
If the primary current exceeds this value, the ratio deviation
is limited, and the value of *peStatus returns
QV_BOUNDED ( = 1).
LocalLoadReport has to be called before using this
function.
Parameters float fIPrim (primary current)
float fBurden (operating burden)
float fCosPhi (cosine of phase angle)
enum TCTAQualifier* peStatus
(address to a status value)
Return value The ratio deviation calculated for the currently loaded
report and for the parameter values passed with this
function call.
The status value *peStatus contains the qualifier:
QV_INVALID = -1,
QV_VALID = 0,
QV_BOUNDED = +1
Example in VB Dim cta as new CTA
cta.Results.LocalLoadReport “C:\my report.xml”
Dim status As TCTAQualifier
result = cta.Calculate.EvalRatioDeviation(2000.0, 2.5,
1.0, status)
if status = QV_VALID then
Debug.Print result
end if
Example in C++ ICTAPtr pCTA(CLSID_CTA);
cta->Results->LocalLoadReport(_bstr_t(L"C:\my
report.xml"));
enum TCTAQualifier status;
float fRatioDeviation = cta->Calculate-
>EvalRatioDeviation(2000.0, 2.5, 1.0, &status);
OMICRON 91
CTA Remote Control Programming Manual
6.11.2.4 EvalSecondaryCurrent
Scope ICTACalc
Syntax Function EvalSecondaryCurrent([in]float
fIPrim, [in]float fBurden, [in]float
fCosPhi, [out]enum TCTAQualifier* peStatus)
: float
Description This function returns the secondary current for the
specified primary current, burden and CosPhi. The
secondary current can only be calculated up to a maximum
primary current (see GetMaxPrimaryCurrent on page 78).
If the primary current exceeds this value, the secondary
current is limited, and the value of *peStatus returns
QV_BOUNDED ( = 1).
LocalLoadReport has to be called before using this
function.
Parameters float fIPrim (primary current)
float fBurden (operating burden)
float fCosPhi (cosine of phase angle)
enum TCTAQualifier* peStatus
(address to a status value)
Return value The secondary current calculated for the currently loaded
report and for the parameter values passed with this
function call.
The status value *peStatus contains the qualifier:
QV_INVALID = -1,
QV_VALID = 0,
QV_BOUNDED = +1
Example in VB Dim cta as new CTA
cta.Results.LocalLoadReport “C:\my report.xml”
Dim status As TCTAQualifier
result = cta.Calculate.EvalSecondaryCurrent(2000.0,
2.5, 1.0, status)
if status = QV_VALID then
Debug.Print result
end if
Example in C++ ICTAPtr pCTA(CLSID_CTA);
cta->Results->LocalLoadReport(_bstr_t(L"C:\my
report.xml"));
enum TCTAQualifier status;
float fSecondaryCurrent = cta->Calculate-
>EvalSecondaryCurrent(2000.0, 2.5, 1.0, &status);
92 OMICRON
Description of interfaces and functions
6.11.2.5 EvalMaxPrimaryCurrent
Scope ICTACalc
Syntax Function EvalMaxPrimaryCurrent([in]float
fBurden, [in]float fCosPhi, [out]enum
TCTAQualifier* peStatus) : float
Description Delivers that maximum value of the primary current, the
software can deliver valid results for GetCompositeError,
GetPhaseDeviation and GetRatioDeviation. The device
can only calculate this parameter for that operating range
of the CT that allows a measurement of the excitation
curve.
LocalLoadReport has to be called before using this
function.
Parameters float fBurden (operating burden)
float fCosPhi (cosine of phase angle)
enum TCTAQualifier* peStatus
(address to a status value)
Return value The maximum primary current calculated for the currently
loaded report and for the parameter values passed with
this function call.
The status value *peStatus always contains
QV_VALID = 0
Example in VB Dim cta as new CTA
cta.Results.LocalLoadReport “C:\my report.xml”
Dim status As TCTAQualifier
Debug.Print cta.Calculate.EvalMaxPrimaryCurrent(2.5,
1.0, status)
Example in C++ ICTAPtr pCTA(CLSID_CTA);
cta->Results->LocalLoadReport(_bstr_t(L"C:\my
report.xml"));
enum TCTAQualifier status;
float fMaxCurrent = cta->Calculate-
>EvalMaxPrimaryCurrent (2.5, 1.0, &status);
OMICRON 93
CTA Remote Control Programming Manual
6.11.2.6 EvalExcitationCurrentRms
Scope ICTACalc
Syntax Function EvalExcitationCurrentRms([in]float
fIPrim, [in]float fBurden, [in]float
fCosPhi, [out]enum TCTAQualifier* peStatus)
: float
Description This function returns the excitation current rms value for a
specified primary current at a specified burden and cosPhi.
The excitation current can only be calculated up to a
maximum primary current (see GetMaxPrimaryCurrent on
page 78). If the primary current exceeds this value, the
excitation current is limited, and the value of *peStatus
returns QV_BOUNDED ( = 1).
LocalLoadReport has to be called before using this
function.
Parameters float fIPrim (primary current)
float fBurden (operating burden)
float fCosPhi (cosine of phase angle)
enum TCTAQualifier* peStatus
(address to a status value)
Return value The excitation current calculated for the currently loaded
report and for the parameter values passed with this
function call.
The status value *peStatus contains the qualifier:
QV_INVALID = -1,
QV_VALID = 0,
QV_BOUNDED = +1
Example in VB Dim cta as new CTA
cta.Results.LocalLoadReport “C:\my report.xml”
Dim status As TCTAQualifier
result = cta.Calculate.EvalExcitationCurrentRms
(2000.0, 2.5, 1.0, status)
if status = QV_VALID then
Debug.Print result
end if
Example in C++ ICTAPtr pCTA(CLSID_CTA);
cta->Results->LocalLoadReport(_bstr_t(L"C:\my
report.xml"));
enum TCTAQualifier status;
float fMaxCurrent = cta->Calculate-
>EvalExcitationCurrentRms (2.5, 1.0, &status);
94 OMICRON
Description of interfaces and functions
6.11.2.7 EvalExcitationCurrentPeak
Scope ICTACalc
Syntax Function
EvalExcitationCurrentPeak([in]float fIPrim,
[in]float fBurden, [in]float fCosPhi,
[out]enum TCTAQualifier* peStatus) : float
Description This function returns the excitation current peak value for a
specified primary current at a specified burden and cosPhi.
The excitation current can only be calculated up to a
maximum primary current (see GetMaxPrimaryCurrent on
page 78). If the primary current exceeds this value, the
excitation current is limited, and the value of *peStatus
returns QV_BOUNDED ( = 1).
LocalLoadReport has to be called before using this
function.
Parameters float fIPrim (primary current)
float fBurden (operating burden)
float fCosPhi (cosine of phase angle)
enum TCTAQualifier* peStatus
(address to a status value)
Return value The excitation current calculated for the currently loaded
report and for the parameter values passed with this
function call.
The status value *peStatus contains the qualifier:
QV_INVALID = -1,
QV_VALID = 0,
QV_BOUNDED = +1
Example in VB Dim cta as new CTA
cta.Results.LocalLoadReport “C:\my report.xml”
Dim status As TCTAQualifier
result = cta.Calculate.EvalExcitationCurrentPeak
(2000.0, 2.5, 1.0, status)
if status = QV_VALID then
Debug.Print result
end if
Example in C++ ICTAPtr pCTA(CLSID_CTA);
cta->Results->LocalLoadReport(_bstr_t(L"C:\my
report.xml"));
enum TCTAQualifier status;
float fMaxCurrent = cta->Calculate-
>EvalExcitationCurrentPeak (2.5, 1.0, &status);
OMICRON 95
CTA Remote Control Programming Manual
6.11.2.8 EvalCoreVoltage
Scope ICTACalc
Syntax Function EvalCoreVoltage([in]float fIPrim,
[in]float fBurden, [in]float fCosPhi,
[out]enum TCTAQualifier* peStatus) : float
Description This function returns the core voltage for a specified
primary current at a specified burden and cosPhi.
The core voltage can only be calculated up to a maximum
primary current (see GetMaxPrimaryCurrent on page 78).
If the primary current exceeds this value, the core voltage
is limited, and the value of *peStatus returns
QV_BOUNDED ( = 1).
LocalLoadReport has to be called before using this
function.
Parameters float fIPrim (primary current)
float fBurden (operating burden)
float fCosPhi (cosine of phase angle)
enum TCTAQualifier* peStatus
(address to a status value)
Return value The core voltage calculated for the currently loaded report
and for the parameter values passed with this function call.
The status value *peStatus contains the qualifier:
QV_INVALID = -1,
QV_VALID = 0,
QV_BOUNDED = +1
Example in VB Dim cta as new CTA
cta.Results.LocalLoadReport “C:\my report.xml”
Dim status As TCTAQualifier
result = cta.Calculate.EvalCoreVoltage(2000.0, 2.5,
1.0, status)
if status = QV_VALID then
Debug.Print result
end if
Example in C++ ICTAPtr pCTA(CLSID_CTA);
cta->Results->LocalLoadReport(_bstr_t(L"C:\my
report.xml"));
enum TCTAQualifier status;
float fMaxCurrent = cta->Calculate->EvalCoreVoltage
(2.5, 1.0, &status);
96 OMICRON
Description of interfaces and functions
6.11.2.9 EvalExcitationCurrentRmsAtVcore
Scope ICTACalc
Syntax Function
EvalExcitationCurrentRmsAtVcore([in]float
fVcore, [out]enum TCTAQualifier* peStatus)
: float
Description This function returns the excitation current rms value for
the specified core voltage. If the specified core voltage
exceeds the maximum core voltage listed in the excitation
table, the excitation current is limited, and the value of
*peStatus returns QV_BOUNDED ( = 1).
LocalLoadReport has to be called before using this
function.
Parameters float fVcore (core voltage)
enum TCTAQualifier* peStatus
(address to a status value)
Return value The excitation current calculated for the currently loaded
report and for the parameter values passed with this
function call.
The status value *peStatus contains the qualifier:
QV_INVALID = -1,
QV_VALID = 0,
QV_BOUNDED = +1
Example in VB Dim cta as new CTA
cta.Results.LocalLoadReport “C:\my report.xml”
Dim status As TCTAQualifier
result = cta.Calculate.EvalExcitationCurrentRmsAtVcore
(50.0, status)
if status = QV_VALID then
Debug.Print result
end if
Example in C++ ICTAPtr pCTA(CLSID_CTA);
cta->Results->LocalLoadReport(_bstr_t(L"C:\my
report.xml"));
enum TCTAQualifier status;
float fMaxCurrent = cta->Calculate-
>EvalExcitationCurrentRmsAtVcore (50.0, &status);
OMICRON 97
CTA Remote Control Programming Manual
6.11.2.10 EvalExcitationCurrentRmsAtVTerm
Scope ICTACalc
Syntax Function
EvalExcitationCurrentRmsAtVTerm([in]float
fVTerm, [out]enum TCTAQualifier* peStatus)
: float
Description This function returns the excitation current rms value for
the specified terminal voltage. If the specified terminal
voltage exceeds the maximum terminal voltage listed in the
excitation table, the excitation current is limited, and the
value of *peStatus returns QV_BOUNDED ( = 1).
LocalLoadReport has to be called before using this
function.
Parameters float fVTerm (terminal voltage)
enum TCTAQualifier* peStatus
(address to a status value)
Return value The excitation current calculated for the currently loaded
report and for the parameter values passed with this
function call.
The status value *peStatus contains the qualifier:
QV_INVALID = -1,
QV_VALID = 0,
QV_BOUNDED = +1
Example in VB Dim cta as new CTA
cta.Results.LocalLoadReport “C:\my report.xml”
Dim status As TCTAQualifier
result = cta.Calculate.EvalExcitationCurrentRmsAtVTerm
(50.0, status)
if status = QV_VALID then
Debug.Print result
end if
Example in C++ ICTAPtr pCTA(CLSID_CTA);
cta->Results->LocalLoadReport(_bstr_t(L"C:\my
report.xml"));
enum TCTAQualifier status;
float fMaxCurrent = cta->Calculate-
>EvalExcitationCurrentRmsAtVTerm (50.0, &status);
98 OMICRON
Description of interfaces and functions
6.11.2.11 EvalExcitationCurrentPeakAtVcore
Scope ICTACalc
Syntax Function
EvalExcitationCurrentPeakAtVcore([in]float
fVcore, [out]enum TCTAQualifier* peStatus)
: float
Description This function returns the excitation current peak value for
the specified core voltage. If the specified core voltage
exceeds the maximum core voltage listed in the excitation
table, the excitation current is limited, and the value of
*peStatus returns QV_BOUNDED ( = 1).
LocalLoadReport has to be called before using this
function.
Parameters float fVcore (core voltage)
enum TCTAQualifier* peStatus
(address to a status value)
Return value The excitation current calculated for the currently loaded
report and for the parameter values passed with this
function call.
The status value *peStatus contains the qualifier:
QV_INVALID = -1,
QV_VALID = 0,
QV_BOUNDED = +1
Example in VB Dim cta as new CTA
cta.Results.LocalLoadReport “C:\my report.xml”
Dim status As TCTAQualifier
result =
cta.Calculate.EvalExcitationCurrentPeakAtVcore(50.0,
status)
if status = QV_VALID then
Debug.Print result
end if
Example in C++ ICTAPtr pCTA(CLSID_CTA);
cta->Results->LocalLoadReport(_bstr_t(L"C:\my
report.xml"));
enum TCTAQualifier status;
float fMaxCurrent = cta->Calculate-
>EvalExcitationCurrentPeakAtVcore (50.0, &status);
OMICRON 99
CTA Remote Control Programming Manual
6.11.2.12 EvalVTermAtExcitationCurrentRms
Scope ICTACalc
Syntax Function EvalVTermAtExcitationCurrentRms
([in]float fCurrent, [out]enum
TCTAQualifier* peStatus) : float
Description This function returns the terminal voltage for the specified
excitation current rms value. If the specified excitation
current exceeds the maximum excitation current listed in
the excitation table, the terminal voltage is limited, and the
value of *peStatus returns QV_BOUNDED ( = 1).
LocalLoadReport has to be called before using this
function.
Parameters float fCurrent (rms excitation current)
enum TCTAQualifier* peStatus
(address to a status value)
Return value The terminal voltage calculated for the currently loaded
report and for the parameter values passed with this
function call.
The status value *peStatus contains the qualifier:
QV_INVALID = -1,
QV_VALID = 0,
QV_BOUNDED = +1
Example in VB Dim cta as new CTA
cta.Results.LocalLoadReport “C:\my report.xml”
Dim status As TCTAQualifier
result = cta.Calculate.EvalVTermAtExcitationCurrentRms
(50.0, status)
if status = QV_VALID then
Debug.Print result
end if
Example in C++ ICTAPtr pCTA(CLSID_CTA);
cta->Results->LocalLoadReport(_bstr_t(L"C:\my
report.xml"));
enum TCTAQualifier status;
float fMaxCurrent = cta->Calculate-
>EvalVTermAtExcitationCurrentRms (50.0, &status);
100 OMICRON
Description of interfaces and functions
6.11.2.13 EvalVCoreAtExcitationCurrentRms
Scope ICTACalc
Syntax Function EvalVCoreAtExcitationCurrentRms
([in]float fCurrent, [out]enum
TCTAQualifier* peStatus) : float
Description This function returns the core voltage for the specified
excitation current rms value. If the specified excitation
current exceeds the maximum excitation current listed in
the excitation table, the core voltage is limited, and the
value of *peStatus returns QV_BOUNDED ( = 1).
LocalLoadReport has to be called before using this
function.
Parameters float fCurrent (rms excitation current)
enum TCTAQualifier* peStatus
(address to a status value)
Return value The core voltage calculated for the currently loaded report
and for the parameter values passed with this function call.
The status value *peStatus contains the qualifier:
QV_INVALID = -1,
QV_VALID = 0,
QV_BOUNDED = +1
Example in VB Dim cta as new CTA
cta.Results.LocalLoadReport “C:\my report.xml”
Dim status As TCTAQualifier
result = cta.Calculate.EvalVCoreAtExcitationCurrentRms
(50.0, status)
if status = QV_VALID then
Debug.Print result
end if
Example in C++ ICTAPtr pCTA(CLSID_CTA);
cta->Results->LocalLoadReport(_bstr_t(L"C:\my
report.xml"));
enum TCTAQualifier status;
float fMaxCurrent = cta->Calculate-
>EvalVCoreAtExcitationCurrentRms (50.0, &status);
OMICRON 101
CTA Remote Control Programming Manual
6.11.2.14 EvalVCoreAtExcitationCurrentPeak
Scope ICTACalc
Syntax Function EvalVCoreAtExcitationCurrentPeak
([in]float fCurrent, [out]enum
TCTAQualifier* peStatus) : float
Description This function returns the core voltage for the specified
excitation current peak value. If the specified excitation
current exceeds the maximum excitation current listed in
the excitation table, the core voltage is limited, and the
value of *peStatus returns QV_BOUNDED ( = 1).
LocalLoadReport has to be called before using this
function.
Parameters float fCurrent (peak excitation current)
enum TCTAQualifier* peStatus
(address to a status value)
Return value The core voltage calculated for the currently loaded report
and for the parameter values passed with this function call.
The status value *peStatus contains the qualifier:
QV_INVALID = -1,
QV_VALID = 0,
QV_BOUNDED = +1
Example in VB Dim cta as new CTA
cta.Results.LocalLoadReport “C:\my report.xml”
Dim status As TCTAQualifier
result =
cta.Calculate.EvalVCoreAtExcitationCurrentPeak(50.0,
status)
if status = QV_VALID then
Debug.Print result
end if
Example in C++ ICTAPtr pCTA(CLSID_CTA);
cta->Results->LocalLoadReport(_bstr_t(L"C:\my
report.xml"));
enum TCTAQualifier status;
float fMaxCurrent = cta->Calculate-
>EvalVCoreAtExcitationCurrentPeak (50.0, &status);
102 OMICRON
Description of interfaces and functions
6.11.2.15 AL_MaxPrimaryCurrent
Scope ICTACalc
Syntax Function AL_MaxPrimaryCurrent([in]float
fError, [out]enum TCTAQualifier* peStatus)
: float
Description This function returns the max. primary current for a
specified ratio error and at burden impedance = 0 ohms.
Used to build the AL-Error graph.
LocalLoadReport has to be called before using this
function.
Parameters float fError (ratio error)
enum TCTAQualifier* peStatus
(address to a status value)
Return value The max. primary current calculated for the currently
loaded report and for the parameter values passed with
this function call.
The status value *peStatus contains the qualifier:
QV_INVALID = -1,
QV_VALID = 0,
QV_BOUNDED = +1
Example in VB Dim cta as new CTA
cta.Results.LocalLoadReport “C:\my report.xml”
Dim status As TCTAQualifier
result = cta.Calculate.AL_MaxPrimaryCurrent(10.0,
status)
if status = QV_VALID then
Debug.Print result
end if
Example in C++ ICTAPtr pCTA(CLSID_CTA);
cta->Results->LocalLoadReport(_bstr_t(L"C:\my
report.xml"));
enum TCTAQualifier status;
float fMaxCurrent = cta->Calculate-
>AL_MaxPrimaryCurrent (10.0, &status);
OMICRON 103
CTA Remote Control Programming Manual
6.11.2.16 AL_MaxImpedance
Scope ICTACalc
Syntax Function AL_MaxImpedance([in]float fError,
[in]float fCosPhi, [out]enum TCTAQualifier*
peStatus) : float
Description This function returns the max. burden impedance for a
specified ratio error and cosPhi at nominal primary current.
Used to build the AL-Error graph.
LocalLoadReport has to be called before using this
function.
Parameters float fError (ratio error)
float fCosPhi (cosine of phase angle)
enum TCTAQualifier* peStatus
(address to a status value)
Return value The max. burden impedance calculated for the currently
loaded report and for the parameter values passed with
this function call.
The status value *peStatus contains the qualifier:
QV_INVALID = -1,
QV_VALID = 0,
QV_BOUNDED = +1
Example in VB Dim cta as new CTA
cta.Results.LocalLoadReport “C:\my report.xml”
Dim status As TCTAQualifier
result = cta.Calculate.AL_MaxImpedance(10.0, 1.0,
status)
if status = QV_VALID then
Debug.Print result
end if
Example in C++ ICTAPtr pCTA(CLSID_CTA);
cta->Results->LocalLoadReport(_bstr_t(L"C:\my
report.xml"));
enum TCTAQualifier status;
float fMaxCurrent = cta->Calculate->AL_MaxImpedance
(10.0, 1.0, &status);
104 OMICRON
Description of interfaces and functions
6.11.2.17 AL_ImpedanceAtPrimaryCurrent
Scope ICTACalc
Syntax Function AL_ImpedanceAtPrimaryCurrent
([in]float fError, [in]float fIprim,
[in]float fCosPhi, [out]enum TCTAQualifier*
peStatus) : float
Description This function returns the burden impedance for a specified
error, primary current and cosPhi.
Used to build the AL-Error graph.
LocalLoadReport has to be called before using this
function.
Parameters float fError (ratio error)
float fIprim (primary current)
float fCosPhi (cosine of phase angle)
enum TCTAQualifier* peStatus
(address to a status value)
Return value The burden impedance calculated for the currently loaded
report and for the parameter values passed with this
function call.
The status value *peStatus contains the qualifier:
QV_INVALID = -1,
QV_VALID = 0,
QV_BOUNDED = +1
Example in VB Dim cta as new CTA
cta.Results.LocalLoadReport “C:\my report.xml”
Dim status As TCTAQualifier
result = cta.Calculate.AL_ImpedanceAtPrimaryCurrent
(10.0, 2000.0, 1.0, status)
if status = QV_VALID then
Debug.Print result
end if
Example in C++ ICTAPtr pCTA(CLSID_CTA);
cta->Results->LocalLoadReport(_bstr_t(L"C:\my
report.xml"));
enum TCTAQualifier status;
float fMaxCurrent = cta->Calculate-
>AL_ImpedanceAtPrimaryCurrent (10.0, 2000.0, 1.0,
&status);
OMICRON 105
CTA Remote Control Programming Manual
6.11.2.18 AL_PrimaryCurrentAtImpedance
Scope ICTACalc
Syntax Function AL_PrimaryCurrentAtImpedance
([in]float fError, [in]float fImpedance,
[in]float fCosPhi, [out]enum TCTAQualifier*
peStatus) : float
Description This function returns the primary current for a specified
error and a specified burden impedance and a specified
cosPhi.
Used to build the AL-Error graph.
LocalLoadReport has to be called before using this
function.
Parameters float fError (ratio error)
float fImpedance (burden impedance)
float fCosPhi (cosine of phase angle)
enum TCTAQualifier* peStatus
(address to a status value)
Return value The primary current calculated for the currently loaded
report and for the parameter values passed with this
function call.
The status value *peStatus contains the qualifier:
QV_INVALID = -1,
QV_VALID = 0,
QV_BOUNDED = +1
Example in VB Dim cta as new CTA
cta.Results.LocalLoadReport “C:\my report.xml”
Dim status As TCTAQualifier
result = cta.Calculate.AL_PrimaryCurrentAtImpedance
(10.0, 2.5, 1.0, status) (ratio error of 10 %?!)
if status = QV_VALID then
Debug.Print result
end if
Example in C++ ICTAPtr pCTA(CLSID_CTA);
cta->Results->LocalLoadReport(_bstr_t(L"C:\my
report.xml"));
enum TCTAQualifier status;
float fMaxCurrent = cta->Calculate-
>AL_PrimaryCurrentAtImpedance (10.0, 2.5, 1.0,
&status);
106 OMICRON
Description of interfaces and functions
6.11.2.19 AL_PrimaryCurrentAtNomBurden
Scope ICTACalc
Syntax Function AL_PrimaryCurrentAtNomBurden
([out]enum TCTAQualifier* peStatus) : float
Description This function returns the primary current at nominal
burden. (Error value, burden and cosPhi are taken from the
actually loaded measurement.)
Used to build the AL-Error graph.
LocalLoadReport has to be called before using this
function.
Parameters enum TCTAQualifier* peStatus
(address to a status value)
Return value The primary current calculated for the currently loaded
report and for the parameter values passed with this
function call.
The status value *peStatus contains the qualifier:
QV_INVALID = -1,
QV_VALID = 0,
QV_BOUNDED = +1
Example in VB Dim cta as new CTA
cta.Results.LocalLoadReport “C:\my report.xml”
Dim status As TCTAQualifier
result = cta.Calculate.AL_PrimaryCurrentAtNomBurden
(status)
if status = QV_VALID then
Debug.Print result
end if
Example in C++ ICTAPtr pCTA(CLSID_CTA);
cta->Results->LocalLoadReport(_bstr_t(L"C:\my
report.xml"));
enum TCTAQualifier status;
float fMaxCurrent = cta->Calculate-
>AL_PrimaryCurrentAtNomBurden (&status);
OMICRON 107
CTA Remote Control Programming Manual
6.11.2.20 AL_PrimaryCurrentAtOprBurden
Scope ICTACalc
Syntax Function AL_PrimaryCurrentAtOprBurden
([out] enum TCTAQualifier* peStatus) :
float
Description This function returns the primary current at operating
burden. (Error value, burden and cosPhi are taken from the
actually loaded measurement.)
Used to build the AL-Error Graph.
LocalLoadReport has to be called before using this
function.
Parameters enum TCTAQualifier* peStatus
(address to a status value)
Return value The primary current calculated for the currently loaded
report and for the parameter values passed with this
function call.
The status value *peStatus contains the qualifier:
QV_INVALID = -1,
QV_VALID = 0,
QV_BOUNDED = +1
Example in VB Dim cta as new CTA
cta.Results.LocalLoadReport “C:\my report.xml”
Dim status As TCTAQualifier
result = cta.Calculate.AL_PrimaryCurrentAtOprBurden
(status)
if status = QV_VALID then
Debug.Print result
end if
Example in C++ ICTAPtr pCTA(CLSID_CTA);
cta->Results->LocalLoadReport(_bstr_t(L"C:\my
report.xml"));
enum TCTAQualifier status;
float fMaxCurrent = cta->Calculate-
>AL_PrimaryCurrentAtOprBurden (&status);
108 OMICRON
Description of interfaces and functions
OMICRON 109
CTA Remote Control Programming Manual
6.12.2.1 SetSetting
Scope ICTAQuick
Syntax Function SetSetting ([in]TCTAQuickSetting
eData, [in]VARIANT vData) : VARIANT
Description Used to set the value of a particular quick test setting.
The specified value may be corrected automatically, if it
exceeds the allowed value range. The same value would
be returned when using the function GetSetting()
subsequently.
Parameters eData
(test parameter, the value of which you want to set
(element of TCTAQuickSetting, see page 190)).
Return value The return value should be the same as the in-parameter
vData but may be corrected automatically, if it exceeds
the allowed value range.
Example in VB See Example on page 117.
110 OMICRON
Description of interfaces and functions
6.12.2.2 GetSetting
Scope ICTAQuick
Syntax Function GetSetting ([in]TCTAQuickSetting
eData) : VARIANT
Description Reads the value of a particular quick test setting.
Parameters eData
(ID of the setting value to be read (element of
TCTAQuickSetting, see page 190))
Return value Setting value of the test parameter.
Example in VB See Example on page 117.
6.12.2.3 GetResult
Scope ICTAQuick
Syntax Function GetResult ([in]TCTAQuickResult
eData) : VARIANT
Description Reads a particular result value.
Parameters eData
(ID of the result value to be read (element of
TCTAQuickResult, see page 193))
Return value The result value (type: Variant).
A Variant is able to hold values of any data type. So the
returned value can be a float, an enumeration type or an
integer value.
For the actual data types of the requested ID, please refer
to TCTAQuickResult, see page 193.
Example in VB See Example on page 117.
OMICRON 111
CTA Remote Control Programming Manual
6.12.2.4 GetV1Results
Scope ICTAQuick
Syntax Function GetV1Results () : VARIANT
Description Reads all values of the SEC measurement channel at
once.
Using this function you can read the complete list of
available measurement values.
Parameters
Return value List of result values. This list is delivered as a value array
packed into a Variant type:
array[0] … V1 Range as integer
array[1] … V1 RMS value (volts) as float
array[2] … V1 AC value (volts) as float
array[3] … V1 DC value (volts) as float
array[4] … V1 frequency (Hz) as float
array[5] … V1 phase (degrees) as float
array[6] … V1 peak value + (volts) as float
array[7] … V1 peak value – (volts) as float
Example in VB See Example on page 117.
6.12.2.5 GetV2Results
Scope ICTAQuick
Syntax Function GetV2Results () : VARIANT
Description Reads all values of the PRIM measurement channel at
once.
Using this function you can read the complete list of
available measurement values.
Parameters
Return value List of result values. This list is delivered as a value array
packed into a Variant type:
array[0] … V2 Range as integer
array[1] … V2 RMS value (volts) as float
array[2] … V2 AC value (volts) as float
array[3] … V2 DC value (volts) as float
array[4] … V2 frequency (Hz) as float
array[5] … V2 phase (degrees) as float
array[6] … V2 peak value + (volts) as float
array[7] … V2 peak value – (volts) as float
Example in VB See Example on page 117.
112 OMICRON
Description of interfaces and functions
6.12.2.6 GetI1Results
Scope ICTAQuick
Syntax Function GetI1Results () : VARIANT
Description Reads all values of the OUTPUT measurement channel at
once.
Using this function you can read the complete list of
available measurement values.
Parameters
Return value List of result values. This list is delivered as a value array
packed into a Variant type:
array[0] … I1 Range as integer
array[1] … I1 RMS value (ampere) as float
array[2] … I1 AC value (ampere) as float
array[3] … I1 DC value (ampere) as float
array[4] … I1 frequency (Hz) as float
array[5] … I1 phase (degrees) as float
array[6] … I1 peak value + (ampere) as float
array[7] … I1 peak value – (ampere) as float
Example in VB See Example on page 117.
OMICRON 113
CTA Remote Control Programming Manual
6.12.2.7 GetCalculatedResults
Scope ICTAQuick
Syntax Function GetCalculatedResults () : VARIANT
Description Reads all values of the calculated results at once.
Calculated results are some specific values for CTs and
VTs derived from the values of the measurement channels.
Using this function you can read the complete list of
available calculated results.
Parameters
Return value List of result values. This list is delivered as a value array
packed into a Variant type:
array[0] … N = Ratio (V1rms/V2rms) as float
array[1] … Z = Impedance (V1rms/I1rms) as float
array[2] … Phase between V1 and I1 as float
array[3] … Rs = Real part of the Impedance in the
serial equivalent circuit as float
array[4] … Rp = Real part of the Impedance in the
parallel equivalent circuit as float
array[5] … Xs = Imaginary part of the Impedance in the
serial equivalent circuit as float
array[6] … Xp = Imaginary part of the Impedance in the
parallel equivalent circuit as float
array[7] … Ls = Inductivity in the serial equivalent
circuit as float
array[8] … Lp = Inductivity in the parallel equivalent
circuit as float
array[9] … Cs = Capacity in the serial equivalent
circuit as float
array[10] …Cp = Capacity in the parallel equivalent
circuit as float
Example in VB See Example on page 117.
114 OMICRON
Description of interfaces and functions
6.12.2.8 StartMeasurement
Scope ICTAQuick
Syntax Function StartMeasurement ()
Activates a quick test.
Control is immediately returned to the caller while the CT
Analyzer performs the test prodedure concurrently.
After the test activation, the quick status is
QST_NO_RESULTS.
This status is kept until one of the following occurs:
1. New measurement values are available on the CT
Analyzer. The status is changed to
QST_NEW_RESULTS.
2. A current overload occurs during the last
measurement cycle. The status is changed to
QST_CURRENT_OVL.
3. A power overload occurs during the last
measurement cycle. The status is changed to
QST_POWER_OVL.
4. The user aborts the measurement by pressing the
I/O-key or ESC-key on the CT Analyzer. The
status is changed to QST_USER_ABORT.
5. The connection between PC and CT Analyzer is
lost. The status is changed to QST_CONN_LOST.
6.12.2.9 StopMeasurement
Scope ICTAQuick
Syntax Function StopMeasurement ()
Description Aborts a running quick test.
Parameters
Return value
Example in VB See Example on page 117.
OMICRON 115
CTA Remote Control Programming Manual
6.12.2.10 Status
Scope ICTAQuick
Syntax Property Status : TCTAQuickStatus
Description This function is used to query the quick status.
The possible states are:
• QST_NO_RESULTS
• QST_NEW_RESULTS
• QST_USER_ABORT
• QST_CURRENT_OVL
• QST_POWER_OVL
• QST_CONN_LOST
Return value Current Quick measurement status (element of
TCTAQuickStatus, see page 197).
Example in VB See Example on page 117.
116 OMICRON
Description of interfaces and functions
6.12.3 Example
' start a Quick measurement, read measured and calculated values, stop measurement
Sub Main()
CTAnalyzer.USBConnect
If CTAnalyzer.eStatus <> CTA_STAT_NOT_CONNECTED Then
Value = CTAnalyzer.Quick.SetSetting(QSV_MEAS_TYPE, QMT_ADVANCED)
CTAnalyzer.Quick.StartMeasurement
OMICRON 117
CTA Remote Control Programming Manual
118 OMICRON
Enumeration types, test settings and test results
7.2.2 TCTACard
The elements of the type TCTACard specify whether a test card is used in a
test or not (see Select Cards page of the CT Analyzer). The elements are used
by the SV_CARD_ parameters of the type TCTASettingValue, refer to page
129.
Element Description
CARD_DISABLE The corresponding card is not included in the test.
CARD_ENABLE The corresponding card is included in the test.
OMICRON 119
CTA Remote Control Programming Manual
7.2.3 TCTAClass
The elements of the type TCTAClass specify the accuracy class of the CT
(see CT-Object card and Assessment card of the CT Analyzer). The elements
are used by the parameter SV_CLASS of the type TCTASettingValue (refer to
page 129) and the parameter RV_OBJECT_CT_CLASS of the type
TCTAResultValue, refer to page 140.
Element Description
CLS_0_15 Class 0.15 according to IEEE C57.13.
CLS_0_15S Class 0.15S according to IEEE C57.13.
CLS_0_15N Class 0.15N according to IEEE C57.13
CLS_0_3 Class 0.3 according to IEEE C57.13.
ClS_0_3S Class 0.3S according to IEEE C57.13
CLS_0_6 Class 0.6 according to IEEE C57.13.
CLS_1_2 Class 1.2 according to IEEE C57.13.
CLS_2_4 Class 2.4 according to IEEE C57.13
CLS_4_8 Class 4.8 according to IEEE C57.13
CLS_C Class C according to IEEE C57.13.
CLS_K Class K according to IEEE C57.13.
CLS_T Class T according to IEEE C57.13.
CLS_X Class X according to IEEE C57.13.
CLS_0_1 Class 0.1 according to standard IEC 60044-1.
CLS_0_2 Class 0.2 according to standard IEC 60044-1.
CLS_0_2S Class 0.2S according to standard IEC 60044-1.
CLS_0_5 Class 0.5 according to standard IEC 60044-1.
CLS_0_5S Class 0.5S according to standard IEC 60044-1.
CLS_1 Class 1.0 according to standard IEC 60044-1.
CLS_3 Class 3 according to standard IEC 60044-1.
CLS_5 Class 5 according to standard IEC 60044-1.
CLS_2P Class 2P according to standard IEC 60044-1.
CLS_3P Class 3P according to standard IEC 60044-1.
CLS_4P Class 4P according to standard IEC 60044-1.
CLS_5P Class 5P according to standard IEC 60044-1.
CLS_6P Class 6P according to standard IEC 60044-1.
CLS_10P Class 10P according to standard IEC 60044-1.
CLS_2PR Class 2PR according to standard IEC 60044-1.
CLS_3PR Class 3PR according to standard IEC 60044-1.
CLS_4PR Class 4PR according to standard IEC 60044-1.
CLS_5PR Class 5PR according to standard IEC 60044-1.
120 OMICRON
Enumeration types, test settings and test results
7.2.4 TCTACoreType
The elements of the type TCTACoreType specify the core type of the CT (see
CT-Object card of the CT Analyzer). The elements are used by the parameter
SV_CT_CORE_P_M of the type TCTASettingValue (page 129) and the
parameter RV_OBJECT_CT_CORE_P_M of the type TCTAResultValue (page
140.
Element Description
CORE_M Measurement CT.
CORE_P Protection CT.
UNKNOWN_CORE Core type not specified, to be determined using
the guesser function (test settings) or
core type could not be determined during the
test (test results).
OMICRON 121
CTA Remote Control Programming Manual
7.2.5 TCTACompensation
The elements of the type TCTACompensation specify the factor the ratio
measurement is corrected. This factor allows measuring the ratio of a CT
inside a delta winding transformer. Choose DELTACOMP_2div3 if input PRIM
is connected to that two terminals of the transformer winding the CT is in
series. Choose DELTACOMP_1div3 if the PRIM input is connected to that
transformer terminals no CT is in series.
Element Description
DELTACOMP_1 Ratio measurement, not corrected.
DELTACOMP_2div3 Ratio measurement corrected by factor 2/3.
This correction allows the measurement of a CT
in a delta transformer (see CT Analyzer User
Manual, section "Measurement at a Delta
Winding Transformer").
DELTACOMP_1div3 Ratio measurement corrected by factor 1/3.
This correction allows the measurement of a CT
in a delta transformer (see CT-Analyzer User
Manual, section "Measurement at a Delta
Winding Transformer").
7.2.6 TCTAInfoClass
The elements of the type TCTAInfoClass specify the class (severity) of
occurring error messages or information messages. It can be queried using
the ICTA::Info property (refer to page 51).
Element Description
CTA_INFO_CLS_ERROR An error occurred during test operation. Errors
are critical events that lead to a test abortion. In
case of an error, the device either has a
hardware problem or can no longer be used
until the error is solved.
CTA_INFO_CLS_WARNING An operation warning. The device is still under
the control of the software but had a problem
during measurement or can not execute the
expected function.
CTA_INFO_CLS_TOOLTIP A tooltip comes up. Information of this kind are
not exposed to the remote component, but are
kept for compatibility with the CT Analyzer's way
of categorizing the messages.
CTA_INFO_CLS_HINT An informational hint is displayed on the
CT Analyzer, everything still works as expected.
CTA_INFO_CLS_NONE No error or information pending.
122 OMICRON
Enumeration types, test settings and test results
7.2.7 TCTAKtdCalculation
The elements of the type TCTAKtdCalculation specify whether the Ktd is
calculated with consideration of the remanence (KTDCALC_OMIC) or according
to IEC 60044-6 without consideration of the CT remanence (KTDCALC_NORM).
Element Description
KTDCALC_NORM Calculation of the Ktd (transient dimensioning
factor) according to the formulas defined in
IEC 60044-6. See CT Analyzer Users Manual,
chapter "Ktd calculation").
KTDCALC_OMIC Calculation of the Ktd according to the formulas
in IEC 60044-6 and with consideration of the
remanence of the CT. See CT-Analyzer Users
Manual, chapter "Ktd calculation").
7.2.8 TCTALicense
The elements of the type TCTALicense represent operations or features of
the CT Analyzer that require a license. Use the ICTA::HasLicense function to
query whether a certain license is present (refer to page 46).
Element Description
CTA_LIC_CLASS_GUESS Class guessing feature.
CTA_LIC_BURDEN_GUESS Burden guessing feature.
CTA_LIC_SIMULATION Simulation calculations feature.
CTA_LIC_IEC_60044_6 Test acc. to standard IEC 60044-6.
CTA_LIC_IEEE_C57_13 Test acc. to standard IEEE C57.13.
CTA_LIC_BURDEN_CARD Burden testing feature.
CTA_LIC_RATIO_TABLE Ratio measurement table feature.
CTA_LIC_RATIO_CARD Ratio testing feature.
CTA_LIC_ASSESSMENT_CARD Assessment information feature.
CTA_LIC_REMOTE_CONTROL Remote control feature enabled.
CTA_LIC_REFERENCE_CURVE Reference curve feature.
CTA_LIC_15kV_KNEE Allows testing of knee points of up to 15 kV
(instead of 4 kV max. knee point voltage).
CTA_LIC_ALL_LANG Device can be used with all languages.
CTA_LIC_QUICK_CARD Quick testing feature.
CTA_LIC_VT_TEST_CARD VT testing feature.
CTA_LIC_AL_GRAPH AL-Error graph feature.
CTA_LIC_IEC_60044_1 Test acc. to standard IEC 60044-1.
CTA_LIC_ENH_IEC1 Test enhanced IEC 60044-1 classes.
CTA_LIC_ENH_ANSI Test enhanced IEEE C57.13 classes.
CTA_LIC_PRIM_RESISTANCE Allows testing of primary resistance.
OMICRON 123
CTA Remote Control Programming Manual
_CARD
CTA_LIC_REMANENCE_CARD Allows testing of residual magnetism.
CTA_LIC_SWITCHB_SINGLE_ Allows testing of single-ratio CTs with a
RATIO connected switchbox.
CTA_LIC_SWITCHB_MULTI_R Allows testing of multi-ratio CTs with a
ATIO connected switchbox.
CTA_LIC_ALL_CORES Allows testing of protection and metering
CTs.
CTA_LIC_ALL_FREQUENCIES Allows testing with all frequencies.
CTA_LIC_ONLY_60Hz Allows testing only with 60Hz.
CTA_LIC_ONLY_P_CORES Allows testing only relaying CTs.
CTA_LIC_ONLY_M_CORES Allows testing only measurement CTs.
7.2.9 TCTAResultTestStatus
The elements of the type TCTAResultTestStatus specify the status of the
test, i.e. whether the test has been finished successfully or not. The elements
are used by the ..._TEST_STATUS parameters of the type
TCTAResultValue, refer to page 140.
Element Description
STAT_ABORT Test aborted, test results are not valid.
STAT_NA Test status cannot be determined, test results are
not valid.
STAT_NOK Test not OK, test results are not valid.
STAT_OK Test OK, test results are valid.
7.2.10 TCTASequence
The elements of the type TCTASequence specify the duty cycle according to
IEC 60044-6. The elements are used by the parameter SV_SEQ of the type
TCTASettingValue (page 129) and the parameter RV_OBJECT_SEQ of the
type TCTAResultValue (page 140).
Element Description
SEQ_C_O Single energization acc. to IEC 60044-6.
SEQ_C_O_C_O Double energization acc. to IEC 60044-6.
124 OMICRON
Enumeration types, test settings and test results
7.2.11 TCTAStandard
The elements of the type TCTAStandard specify the possible test standards
(see CT-Object card of the CT Analyzer) according to which the test can be
performed. The elements are used by the parameter SV_STD of the type
TCTASettingValue (page 129) and the parameter RV_OBJECT_STD of the
type TCTAResultValue (page 140).
Element Description
STD_60044_1 Standard IEC 60044-1.
STD_60044_6 Standard IEC 60044-6.
STD_ANSI_30 Standard IEEE C57.13 (30°).
STD_ANSI_45 Standard IEEE C57.13 (45°).
7.2.12 TCTAStatus
The elements of the type TCTAStatus specify the possible states of the CTA
remote component. The status is returned by the ICTA::eStatus property.
(refer to page 43).
Element Description
CTA_STAT_NOT_ No connection to the CT Analyzer established.
CONNECTED
CTA_STAT_READY The CT Analyzer is connected and ready for
operation.
CTA_STAT_WAIT_FOR_ The CT Analyzer is connected and waiting for the
ACKNOWLEDGE acknowledgement of an error or information. This
can be done using the Clear() function of the
ICTA::Info property.
CTA_STAT_ACTIVATED The CT Analyzer is activated and test is running.
CTA_STAT_PAUSED The CT Analyzer is activated, but the test is
paused since the test procedure requires the
rewiring of the test object in order to continue the
test.
7.2.13 TCTATempUnit
The elements of the type TCTATempUnit specify the temperature unit (see
Units page (default test settings) of the CT Analyzer). The elements are used
by the parameter SV_RESISTANCE_TEMP_UNIT of the type
TCTASettingValue (page 129) and the parameters
RV_RESISTANCE_TEMP_UNIT.
Element Description
TEMPUNIT_C Temperature unit "Celsius".
TEMPUNIT_F Temperature unit "Fahrenheit".
OMICRON 125
CTA Remote Control Programming Manual
7.2.14 TCTAMeasInfo
The elements of the type TCTAMeasInfo specify the actual state of a running
measurement. The meas info is returned by the ICTA::nMeasurementInfo
property.
Element Description
MI_NO_MEAS No measurement is running
MI_AC_TEST State during inhouse calibration cycles
MI_AUTO_CAL State during auto calibration
MI_WIRING_BUR State while the message "Check wiring before
burden test! Press <?> for connection diagram."
appears on the CT Analyzer display.
MI_WIRING_CT State while the message
"Check wiring before CT-test!
Press <?> for connection diagram."
appears on the CT Analyzer display.
MI_WIRING_RES_REM State while the message
"Check wiring before residual magnetism test!
Press <?> for connection diagram."
appears on the CT Analyzer display.
MI_MEAS_DEMAG State during demagnetization cycle.
MI_WIRING_PRI_RES State while the message "Check wiring before
primary winding resistance test! Press <?> for
connection diagram." appears on the CT Analyzer
display.
MI_START_DELAY State during start delay.
MI_MEAS_BUR State during burden measurement.
MI_MEAS_RES_REM State during residual magnetism measurement.
MI_MEAS_PRI_RES State during primary resistance measurement.
MI_MEAS_REV_POL_ State during reverse polarity detection.
DETECT
MI_MEAS_RES State during secondary resistance measurement.
MI_MEAS_EXC State during excitation curve measurement.
MI_MEAS_RAT State during current ratio measurement.
MI_MEAS_MAGNET State during demagnetisation cycle.
MI_MEAS_TAP_WIND_ State during tap winding ratio measurement.
RATIO
MI_MR_MEAS_RES State during multi-ratio resistance measurement.
MI_MR_MEAS_RAT State during multi-ratio ratio measurement.
MI_QUICK_REMOTE State during remote quick measurement.
126 OMICRON
Enumeration types, test settings and test results
7.2.15 TCTAQualifier
The elements of the type TCTAQualifier specify the return parameter of all
functions of the ICTACalc::… interface.
Element Description
QV_INVALID The calculation of the desired function failed.
QV_VALID The calculationof the desired function was
successful.
QV_BOUNDED The calculationof the desired function failed.
All calculation functions are based on some
values out of the excitation table.
For this case, the desired values are out of range
of the excitation table.
7.2.16 TCTAChecksResult
The elements of the type TCTAChecksResult specify the return parameter
from the function ICTAResults::IsReportSecure.
Element Description
CHKS_NOT_AVAIL No Node <Checksum> was found in the report
file.
CHKS_VALID Checksum was valid.
CHKS_INVALID Checksum was invalid.
The report file may be manipulated.
7.2.17 TCTABurdenType
The elements of the type TCTABurdenType specify the burden designation
for the standard IEEE C57.13.
Element Description
UNKNOWN_BURDEN_TYPE Guesser value "?"
BRD_TYPE_B16 Impedance = 16.0Ω, 400.0 VA at 5A, CosPhi 0.5
BRD_TYPE_B8 Impedance = 8.0Ω, 200.0 VA at 5A, CosPhi 0.5
BRD_TYPE_B4 Impedance = 4.0Ω, 100.0VA at 5A, CosPhi 0.5
BRD_TYPE_B2 Impedance = 2.0Ω, 50.0VA at 5A, CosPhi 0.5
BRD_TYPE_B1 Impedance = 1.0Ω, 25.0VA at 5A, CosPhi 0.5
BRD_TYPE_B18 Impedance = 1.8Ω, 45.0VA at 5A, CosPhi 0.9
BRD_TYPE_B09 Impedance = 0.9Ω, 22.5VA at 5A, CosPhi 0.9
BRD_TYPE_B05 Impedance = 0.5Ω, 12.5VA at 5A, CosPhi 0.9
BRD_TYPE_B02 Impedance = 0.2Ω, 5.0VA at 5A, CosPhi 0.9
BRD_TYPE_B01 Impedance = 0.1Ω, 2.5VA at 5A, CosPhi 0.9
OMICRON 127
CTA Remote Control Programming Manual
7.2.18 TCTATPSpecMtd
The elements of the type TCTATPSpecMtd specify the specification method
for the Ktd-value.
Element Description
SPEC_STD Specification according to standard 60044-6.
Ktd is calculated with the duty cycle, t1, tfr usw.
SPEC_ALT Alternate Specification.
Ktd is a setting-value.
7.2.19 TCTAAssessRule
The elements of the type TCTAAssesRule specify the rules which are
assigned to an assessment operation.
Element Description
ASS_RULE_VAL_LE_ Measured value less or equal than rated value.
RATED
ASS_RULE_VAL_GE_ Measured value greater or equal than rated value.
RATED
ASS_RULE_VAL_ Measured value within rated range.
WITHIN_RATED_RANGE
128 OMICRON
Enumeration types, test settings and test results
7.3.1 TCTASettingValue
The elements of the type TCTASettingValue specify the setting parameters
(test settings) of the CT Analyzer.
Note The CTA remote component automatically limits the adjusted values to
their valid ranges.
Use the value -1 for parameters you want to have determined during
the test using the guesser function of the CT Analyzer. The value -1
corresponds to the question mark "?" displayed on the CT Analyzer.
OMICRON 129
CTA Remote Control Programming Manual
130 OMICRON
Enumeration types, test settings and test results
OMICRON 131
CTA Remote Control Programming Manual
132 OMICRON
Enumeration types, test settings and test results
OMICRON 133
CTA Remote Control Programming Manual
134 OMICRON
Enumeration types, test settings and test results
OMICRON 135
CTA Remote Control Programming Manual
136 OMICRON
Enumeration types, test settings and test results
OMICRON 137
CTA Remote Control Programming Manual
138 OMICRON
Enumeration types, test settings and test results
OMICRON 139
CTA Remote Control Programming Manual
7.4.1 TCTAResultValue
The type TCTAResultValue contains the test result parameters the result of
which is a single value.
Element (parameter) Description
RV_ASSESSMENT_CARD_EN Type: bool
Assessment card activated or deactivated.
RV_ASSESSMENT_AUTO_ASSESS_ Type: enum TCTAAssessment (page 119).
BURDEN This value can only be assessed manually,
no automatic assessment available at the
moment.
RV_ASSESSMENT_AUTO_ASSESS_ Type: enum TCTAAssessment (page 119).
ALF Assessment result for ALF (accuracy
limiting factor) according to the IEC 60044-1
direct measurement method. For details
about the assessment, please refer to the
CT Analyzer User Manual.
RV_ASSESSMENT_AUTO_ASSESS_ Type: enum TCTAAssessment (page 119).
ALFI Assessment result for accuracy limiting
factor (ALF) calculated according to the
IEC 60044-1 indirect method. For details
about the assessment, please refer to the
CT Analyzer User Manual
RV_ASSESSMENT_AUTO_ASSESS_ Type: enum TCTAAssessment (page 119).
EK Assessment result for accuracy limiting
voltage according to IEC 60044-1class PX.
For details about the assessment, please
refer to the CT Analyzer User Manual
RV_ASSESSMENT_AUTO_ASSESS_ Type: enum TCTAAssessment (page 119).
FS Assessment result for instrument security
factor (FS) according to the IEC 60044-1
direct measurement method. For details
about the assessment, please refer to the
CT Analyzer User Manual.
RV_ASSESSMENT_AUTO_ASSESS_ Type: enum TCTAAssessment (page 119).
FSI Assessment result for instrument security
factor (FS) calculated according to the
IEC 60044-1 indirect method. For details
about the assessment, please refer to the
CT Analyzer User Manual.
140 OMICRON
Enumeration types, test settings and test results
OMICRON 141
CTA Remote Control Programming Manual
142 OMICRON
Enumeration types, test settings and test results
OMICRON 143
CTA Remote Control Programming Manual
144 OMICRON
Enumeration types, test settings and test results
OMICRON 145
CTA Remote Control Programming Manual
146 OMICRON
Enumeration types, test settings and test results
OMICRON 147
CTA Remote Control Programming Manual
148 OMICRON
Enumeration types, test settings and test results
OMICRON 149
CTA Remote Control Programming Manual
150 OMICRON
Enumeration types, test settings and test results
OMICRON 151
CTA Remote Control Programming Manual
152 OMICRON
Enumeration types, test settings and test results
OMICRON 153
CTA Remote Control Programming Manual
154 OMICRON
Enumeration types, test settings and test results
OMICRON 155
CTA Remote Control Programming Manual
156 OMICRON
Enumeration types, test settings and test results
OMICRON 157
CTA Remote Control Programming Manual
158 OMICRON
Enumeration types, test settings and test results
OMICRON 159
CTA Remote Control Programming Manual
160 OMICRON
Enumeration types, test settings and test results
OMICRON 161
CTA Remote Control Programming Manual
162 OMICRON
Enumeration types, test settings and test results
OMICRON 163
CTA Remote Control Programming Manual
164 OMICRON
Enumeration types, test settings and test results
OMICRON 165
CTA Remote Control Programming Manual
166 OMICRON
Enumeration types, test settings and test results
OMICRON 167
CTA Remote Control Programming Manual
168 OMICRON
Enumeration types, test settings and test results
OMICRON 169
CTA Remote Control Programming Manual
170 OMICRON
Enumeration types, test settings and test results
OMICRON 171
CTA Remote Control Programming Manual
172 OMICRON
Enumeration types, test settings and test results
7.4.2 TCTAResultIndexedValue
The type TCTAResultIndexedValue contains the test result parameters the
result of which is not a single value but a list (array) of values instead.
Element (parameter) Description
RV_EXCITATION_CURVE_ANSI30_ Type: double (e.m.f. voltage [Vrms])
EMF_V
Measured voltage curve acc. to
IEEE C57.13 (30°).
RV_EXCITATION_CURVE_ANSI30_ Type: double (excitation current [Arms])
RMS_I
Measured current curve acc. to
IEEE C57.13 (30°).
RV_EXCITATION_CURVE_ANSI45_ Type: double (e.m.f. voltage [Vrms])
EMF_V
Measured voltage curve acc. to
IEEE C57.13 (45°).
RV_EXCITATION_CURVE_ANSI45_ Type: double (excitation current [Arms])
RMS_I
Measured current curve acc. to
IEEE C57.13 (45°).
RV_EXCITATION_CURVE_ Type: double (terminal voltage [Vrms])
IEC60044_1_RMS_V
Measured voltage curve acc. to
IEC 60044-1.
RV_EXCITATION_CURVE_ Type: double (excitation current [Arms])
IEC60044_1_RMS_I
Measured current curve acc. to
IEC 60044-1.
RV_EXCITATION_CURVE_ Type: double (e.m.f. voltage [Vrms])
IEC60044_6_EMF_V
Measured voltage curve acc. to
IEC 60044-6.
RV_EXCITATION_CURVE_ Type: double (excitation current [Apeak])
IEC60044_6_PEAK_I
Measured current curve acc. to
IEC 60044-6.
RV_EXCITATION_CURVE_FLUX_VS Type: double (flux in CT core [Vs])
Calculated flux out of the emf voltage
(core voltage).
RV_EXCITATION_CURVE_EMF_V Type: double (e.m.f. voltage [Vrms])
emf voltage for measurement points of
excitation curve, identical with
_ANSI30_EMV_V.
RV_EXCITATION_CURVE_ Type: double (terminal voltage [Vrms])
TERMINAL_V
Terminal voltage from measurement
points of excitation curve.
RV_EXCITATION_CURVE_ICTRMS_I Type: double (excitation current [Arms])
Excitation current for measurement points
of the excitation curve, identical with
..._IEC60044_1_RMS_I.
OMICRON 173
CTA Remote Control Programming Manual
174 OMICRON
Enumeration types, test settings and test results
OMICRON 175
CTA Remote Control Programming Manual
176 OMICRON
Enumeration types, test settings and test results
OMICRON 177
CTA Remote Control Programming Manual
178 OMICRON
Enumeration types, test settings and test results
OMICRON 179
CTA Remote Control Programming Manual
180 OMICRON
Enumeration types, test settings and test results
7.4.3 TCTAAssessParameter
The type TCTAAssessParameter together with the type TCTAAssessInfo
(see below) contain the test result parameters, the result of which is a single
value.
OMICRON 181
CTA Remote Control Programming Manual
182 OMICRON
Enumeration types, test settings and test results
OMICRON 183
CTA Remote Control Programming Manual
7.4.4 TCTAAssessInfo
The type TCTAAssessInfo together with the type TCTAAssessParameter
(see above) contains the test result parameters, the result of which is a single
value.
184 OMICRON
Enumeration types, test settings and test results
OMICRON 185
CTA Remote Control Programming Manual
7.5 Quick
7.5.1 TCTAQuickOutMode
The elements of the type TCTAQuickOutMode specify the operating mode of
the built in signal generator. The elements are used by the function
ICTAQuick::SetSetting(QSV_OUT_MODE, parameter) as possible parameter
value.
Element Description
QSG_OFF Signal generator OFF
QSG_AC_I Signal generator outputs AC current
QSG_AC_U Signal generator outputs AC voltage
QSG_DC_I Signal generator outputs DC current
QSG_DC_U Signal generator outputs DC voltage
7.5.2 TCTAQuickRangeMode
The elements of the type TCTAQuickRangeMode specify the ranging mode of
the measurement channels of the CT Analyzer. The elements are used by the
function ICTAQuick::SetSetting(QSV_RANGE_MODE, parameter) as possible
parameter value.
Element Description
QRM_MANUAL Manual ranging.
Set ranges explicit with:
SetSetting(QSV_V1_RANGE, …)
SetSetting(QSV_V2_RANGE, …)
SetSetting(QSV_I1_RANGE, …)
QRM_AUTO Auto ranging for all 3 measurement channels.
7.5.3 TCTAQuickRangeV1
The elements of the type TCTAQuickRangeV1 specify the range of the
measurement channel SEC of the CT Analyzer. The elements are used by the
functions ICTAQuick::SetSetting(QSV_V1_RANGE, parameter) as possible
parameter value.
Element Description
QRANGE_V1_300mV Range SEC channel up to 300mV rms
QRANGE_V1_3V Range SEC channel up to 3V rms
QRANGE_V1_30V Range SEC channel up to 30V rms
QRANGE_V1_300V Range SEC channel up to 300V rms
186 OMICRON
Enumeration types, test settings and test results
7.5.4 TCTAQuickRangeV2
The elements of the type TCTAQuickRangeV2 specify the range of the
measurement channel PRIM of the CT Analyzer. The elements are used by
the functions ICTAQuick::SetSetting(QSV_V2_RANGE, parameter) as
possible parameter value.
Element Description
QRANGE_V2_30mV Range PRIM channel up to 30mV rms
QRANGE_V2_300mV Range PRIM channel up to 300mV rms
QRANGE_V2_3V Range PRIM channel up to 3V rms
QRANGE_V2_30V Range PRIM channel up to 30V rms
7.5.5 TCTAQuickRangeI1
The elements of the type TCTAQuickRangeI1 specify the range of the
measurement channel OUT of the CT Analyzer. The elements are used by the
functions ICTAQuick::SetSetting(QSV_I1_RANGE, parameter) as possible
parameter value.
Element Description
QRANGE_I1_150mA Range OUT channel up to 150mA rms
For the current measurement an internal shunt
of 1 ohm is used.
QRANGE_I1_1500mA Range OUT channel up to 1500mA rms
For the current measurement an internal shunt
of 1 ohm is used.
QRANGE_I1_3A Range OUT channel up to 3A rms
For the current measurement an internal shunt
of 0.05 ohms is used.
QRANGE_I1_30A Range OUT channel up to 30A rms
For the current measurement an internal shunt
of 0.05 ohms is used.
OMICRON 187
CTA Remote Control Programming Manual
7.5.6 TCTAQuickFilterMode
The elements of the type TCTAQuickFilterMode specify the operating
mode of the input filters of the measurement channels. The elements are used
by the functions ICTAQuick::SetSetting(QSV_MEAS_MODE, parameter) as
possible parameter value.
Element Description
QFM_RMS The measurement values (amplitude) are built
by means of standard RMS calculation
algorithm.
QFM_FILTER The input signals are fed through a digital filter
with adjustable bandwidth.
The bandwith can be adjusted with
SetSetting(QSV_BANDWIDTH, …)
and is centered to the nominal signal frequency.
QFM_DC The measurement values (amplitude) are built
by means of standard averaging algorithm.
7.5.7 TCTAQuickMeasType
The elements of the type TCTAQuickMeasType specify the predefined
settings for some useful measurements. The elements are used by the
functions ICTAQuick::SetSetting(QSV_MEAS_TYPE, parameter) as possible
parameter value.
Element Description
QMT_VT_RATIO Configures all settings for VT-Ratio
measurement:
SetSetting(QSV_OUT_MODE, QSG_AC_U)
SetSetting(QSV_OUT_AMPL, 1.0)
SetSetting(QSV_OUT_FREQ, 50.0)
SetSetting(QSV_MEAS_MODE,
QFM_FILTER)
SetSetting(QSV_BANDWIDTH, 6.0)
QMT_CT_RATIO Configures all settings for CT-Ratio
measurement:
SetSetting(QSV_OUT_MODE, QSG_AC_U)
SetSetting(QSV_OUT_AMPL, 1.0)
SetSetting(QSV_OUT_FREQ, 50.0)
SetSetting(QSV_MEAS_MODE,
QFM_FILTER)
SetSetting(QSV_BANDWIDTH, 6.0)
SetSetting(QSV_LOAD_R, 1.0)
SetSetting(QSV_LOAD_L, 50.0)
188 OMICRON
Enumeration types, test settings and test results
OMICRON 189
CTA Remote Control Programming Manual
7.5.8 TCTAQuickSetting
The elements of the type TCTAQuickSetting specify the setting parameters
(quick test settings) of the CT Analyzer. The elements are used by the function
ICTAQuick::SetSetting(setting-ID, parameter) as possible values of the setting-
ID.
Note The CTA remote component automatically limits the adjusted values to
their valid ranges.
Element Description
QSV_MEAS_TYPE Type: TCTAQuickMeasType
Specify the predefined measurements on the
CT Analyzer.
This command automatically defines some
other settings (see TCTAQuickMeasType on
page 188).
QSV_OUT_MODE Type: TCTAQuickOutMode
Specify the operating mode of the built in signal
generator of the CT Analyzer (see Quick
TCTAQuickOutMode on page 186)
QSV_OUT_AMPL Type: double
Possible values:
for AC_I mode : 0 – 5A
for AC_U mode: 0 – 40V
for DC_I mode : 0 – 10A
for DC_U mode: 0 – 120V
190 OMICRON
Enumeration types, test settings and test results
OMICRON 191
CTA Remote Control Programming Manual
192 OMICRON
Enumeration types, test settings and test results
7.5.9 TCTAQuickResult
The elements of the type TCTAQuickResult specify the measurement
results (quick test) of the CT Analyzer. The elements are used by the function
ICTAQuick::GetResult(setting-ID) as possible values of the setting-ID.
Element Description
QRV_COUNT Type: integer
The number of measurement results (cycles) since the
start of quick test.
QRV_MEAS_TYPE Type: TCTAQuickMeasType
The applied predefined meas type (see
QSV_MEAS_TYPE).
QRV_V1_RANGE Type: TCTAQuickRangeV1
The actual range of the SEC measurement channel.
The same value as with GetV1Results() … array[0].
QRV_V1_RMS Type: double
The actual RMS value (volts) of the SEC measurement
channel.
The same value as with GetV1Results() … array[1].
QRV_V1_AC Type: double
The actual AC value (volts) of the SEC measurement
channel.
The same value as with GetV1Results() … array[2].
AC value means:
before calculation of the RMS value, the DC portion of
the input signal is subtracted.
QRV_V1_DC Type: double
The actual DC value (volts) of the SEC measurement
channel.
The same value as with GetV1Results() … array[3].
QRV_V1_FREQU Type: double
The actual frequency value (Hz) of the SEC
measurement channel.
The same value as with GetV1Results() … array[4].
QRV_V1_PHASE Type: double
This value is always 0.0 because the channel SEC is
the reference for phase measurements.
The same value as with GetV1Results() … array[5].
QRV_V1_PEAK_P Type: double
The actual positive peak value (volts) of the SEC
measurement channel.
The same value as with GetV1Results() … array[6].
QRV_V1_PEAK_N Type: double
The actual negative peak value (volts) of the SEC
measurement channel.
The same value as with GetV1Results() … array[7].
OMICRON 193
CTA Remote Control Programming Manual
194 OMICRON
Enumeration types, test settings and test results
OMICRON 195
CTA Remote Control Programming Manual
196 OMICRON
Enumeration types, test settings and test results
7.5.10 TCTAQuickStatus
The elements of the type TCTAQuickStatus sp.ecify the return value of the
property ICTAQuick::Status.
Element Description
QST_NO_RESULTS Actually no new measurement result are
available on the CT Analyzer.
QST_NEW_RESULTS New measurement results are availabe on the
CT Analyzer, and can be read out.
QST_USER_ABORT The user has aborted the running Quick test, by
pressing the I/O-key or the ESC-key on the
CT Analyzer.
QST_CURRENT_OVL A current overflow occured during the last
measurement cycle.
QST_POWER_OVL A power overflow occured during the last
measurement cycle.
QST_CONN_LOST The connection with the CT Analyzer was lost.
Check the serial cable connection.
OMICRON 197
CTA Remote Control Programming Manual
8 Multi-ratio support
8.1 Prepare a multi-ratio measurement
TCTASettingValue:
Beside the existing enumerating values these values are added:
Element (parameter) Type and description
SV_RATIO_TYPE Type: enum TCTARatioType
Type of the CT measurement:
SINGLE_RATIO,
MULTI_RATIO
measurement.
SV_MR_NO_TAPS Type: integer
Possible values: 2 – 6
Number of tap connections of the CT.
SV_MR_COMMON_TAP Type: integer
Possible values: 1 or the value set with
SV_MR_NO_TAPS.
The common tap is the tap that is used
as reference for all tap combinations.
SV_MR_TAP_IN_USE Type: enum TCTATapValue
The tap in use is the tap combination
actually used
during operation of the CT.
SV_MR_TEST_ENABLE_X1_X2 Type: integer
... Possible values: 0 - 1
for all combinations Disable/enable a measurement or
between X1 and X6 calculation on the appropriate tap
... combination.
SV_MR_TEST_ENABLE_X5_X6
SV_MR_I_PN_X1_X2 Type: double
... Possible values: 1.0 – 99000.0, -1.0
for all combinations A value of -1.0 defines a "guesser –
between X1 and X6 value".
...
Defines the nominal primary current on
SV_MR_I_PN_X5_X6 the appropriate tap combination.
( … see also 8.1.1 below)
198 OMICRON
Multi-ratio support
8.1.1 Recalculations
If you change the nominal primary current or the nominal burden (burden
designation TCTABurdenType for C57.13) on the outer tap, all burdens for the
inner tap-combinations are recalculated, according to following formula:
Burdeni = Burdenouter-tap * Ipnouter-tap / Ipni
i ... inner tap combination X1-X2 to X5-X6
The resulting burden is then rounded to the nearest standard burden.
TCTARatioType:
The elements of the type TCTARatioType specify the possible values of a
multi-ratio measurement. The elements are used by the parameter
SV_RATIO_TYPE of the type TCTASettingValue.
Element (parameter) Description
SINGLE_RATIO Measurement of a single-ratio CT.
MULTI_RATIO Measurement of a multi-ratio CT.
OMICRON 199
CTA Remote Control Programming Manual
TCTATapValue:
The elements of the type TCTATapValue specify a certain tap combination of
the taps X1 – X6. The elements are used by the parameter
SV_MR_TAP_IN_USE of the type TCTASettingValue.
Element (parameter) Description
X1_X2 Specify the winding between the taps X1 and X2.
X1_X3 Specify the winding between the taps X1 and X3.
X1_X4 Specify the winding between the taps X1 and X4.
X1_X5 Specify the winding between the taps X1 and X5.
X1_X6 Specify the winding between the taps X1 and X6.
X2_X3 Specify the winding between the taps X2 and X3.
X2_X4 Specify the winding between the taps X2 and X4.
X2_X5 Specify the winding between the taps X2 and X5.
X2_X6 Specify the winding between the taps X2 and X6.
X3_X4 Specify the winding between the taps X3 and X4.
X3_X5 Specify the winding between the taps X3 and X5.
X3_X6 Specify the winding between the taps X3 and X6.
X4_X5 Specify the winding between the taps X4 and X5.
X4_X6 Specify the winding between the taps X4 and X6.
X5_X6 Specify the winding between the taps X5 and X6.
Example:
Define a multi ratio CT with 5 taps and standard ratios 1200:5A
ICTAPtr pCTA(CLSID_CTA);
pCTA->Settings->ClearSettings();
pCTA->Settings->SetValue(SV_RATIO_TYPE, MULTI_RATIO); // Define multi
// ratio
pCTA->Settings->SetValue(SV_I_SN, 5.0); // Isn for all taps
pCTA->Settings->SetValue(SV_MR_NR_TAPS, 5); // 5 Taps (X1 – X5)
pCTA->Settings->SetValue(SV_MR_COMMON_TAP, 1); // Common Tap is X1
pCTA->Settings->SetValue(SV_MR_TAP_IN_USE, X1_X5); // Tap in use is
// outer tap
// (default)
// Settings for outer tap (X1-X5)
pCTA->Settings->SetValue(SV_MR_TEST_ENABLE_X1_X5, 1); // Enable test
pCTA->Settings->SetValue(SV_MR_I_PN_X1_X5, 1200.0); // Set Ipn
200 OMICRON
Multi-ratio support
pCTA->Settings->LocalSaveSettings(L"C:\CTA_Test\MRSettings.xml");
OMICRON 201
CTA Remote Control Programming Manual
TCTAResultValue:
Beside the existing enumerating values these values are added:
Element (parameter) Type and description
RV_RATIO_TYPE Type: enum TCTARatioType
Type of the CT measurement:
SINGLE_RATIO,
MULTI_RATIO
measurement.
RV_MR_NO_TAPS Type: integer
Possible values: 2 – 6
Number of tap connections of the CT.
RV_MR_TAP_IN_USE Type: enum TCTATapValue
The tap in use is the tap combination actually used
during operation of the CT.
RV_MR_TEST_ENABLE_ Type: integer
X1_X2 Possible values: 0 - 1
...
Disable/enable a measurement or calculation on
for all combinations the appropriate tap combination.
between X1 and X6
...
SV_MR_TEST_ENABLE_
X5_X6
RV_MR_DEFINE_TAP Type: enum TCTATapValue
Select a certain tap combination.
Subsequent readings of measurement values with
Results.GetValue(RV_...) return the results of the
selected tap combination.
This selection is valid until a new selection is made.
RV_MR_SEC_WINDING_ Type: double
RATIO Possible values: 0.0 – 1.0
The measured secondary winding ratio of the
selected tap combination.
202 OMICRON
Multi-ratio support
Example:
Read some values of multi ratio CT
ICTAPtr pCTA(CLSID_CTA);
pCTA->Results->LocalLoadReport(L"C:\CTA_Test\MRResults.xml");
OMICRON 203
CTA Remote Control Programming Manual
9 Application examples
204 OMICRON
Error handling
10 Error handling
Errors can occur within the CTA remote component or can be sent from the
device itself. An example for the first is when a local report or settings file can’t
be loaded (no communication with the CT Analyzer happens during these
operations). An example for the latter is a failure in test execution.
For both cases, the error condition is communicated in several ways.
There are two useful C++ macros to deal with result codes. A look to their
implementation makes clear how this mechanism works:
Any negative value indicates a failure. To find out the reason of the error, the
Device Information can be consulted.
OMICRON 205
CTA Remote Control Programming Manual
10.1.4 Logfile
During operation, the CTA remote component writes a log file for the purpose
of error diagnosis. The log file is stored in the installation folder of the CTA
Remote Control Software, which is by default C:\Program
Files\OMICRON\CT Analyzer PC Toolset\CTARemote.exe.log
The log file can be very useful for coping with failures that are hard to find,
since it contains more information than the Device Information record and
includes the access history.
206 OMICRON
Error handling
10.2.1 Basics
In case of unstructured exception handling, an On Error statement is
inserted at the beginning of a block of code in order to handle any errors
occurring within that block. When an exception is raised in a procedure after
the On Error statement executes, the program branches to the line
argument specified in the On Error statement. The line argument (a line
number or line label) indicates the exception handler location.
Sometimes, a call is made from the original procedure to another procedure,
and an exception occurs in the called procedure. In this case, the exception
will propagate back to the calling procedure and execution will branch to the
line argument, if the called procedure does not handle the exception.
Note Unstructured error handling using On Error can degrade application
performance and result in code that is difficult to debug and maintain.
ErrorHandler:
' Code that handles errors.
Resume
End Sub
OMICRON 207
CTA Remote Control Programming Manual
Resume can also be used alone, outside the On Error statement. When
Resume is used this way, Visual Basic returns control to the statement that
caused the error. You generally use Resume after an error handler corrects
the error.
Visual Basic also provides the Resume Next statement, which directs control
to the line immediately following the line of code that caused the error. You
might use Resume Next for cases in which an error will not cause your
application to stop working. You might also use it if an error will not change the
expected results of your subroutine.
Another variation of the Resume statement is Resume Line, which is similar
to On Error GoTo Line. Resume Line passes control to a line you specify
in the line argument. You can use Resume Line only within an error handler.
Note When debugging your code, you must disable the On Error Resume
Next statement.
208 OMICRON
Error handling
10.2.6 An example
In the following code, the exception handler is named DivideByZero and
handles a specific error - that of attempting to divide by zero. If a different error
occurs, Visual Basic raises a run-time error and stops the application.
OMICRON 209
CTA Remote Control Programming Manual
Sub ErrorTest ()
' Declare variables.
Dim x As Integer, y As Integer, z As Integer
' The exception handler is named "DivideByZero".
On Error GoTo DivideByZero
' The main part of the code, which might cause an error.
x = 2
y = 0
z = x \ y
' This line disables the exception handler.
On Error GoTo 0
Console.WriteLine(x & "/" & y & " = " & z)
' Exit the subroutine before the error-handling code.
' Failure to do so can create unexpected results.
Exit Sub
' This is the exception handler, which deals with the error.
DivideByZero:
' Include a friendly message to let the user know what is happening.
Console.WriteLine("You have attempted to divide by zero!")
210 OMICRON
Warning messages of the CTA Remote Control Software
OMICRON 211
CTA Remote Control Programming Manual
534 CTA:SerialConnect: error opening COM port %d, maybe it's in use (%d)
Reason / Another application has locked the serial line. Close that
Troubleshooting application.
212 OMICRON
Warning messages of the CTA Remote Control Software
OMICRON 213
CTA Remote Control Programming Manual
214 OMICRON
Error and warning messages of the CT Analyzer
OMICRON 215
CTA Remote Control Programming Manual
Support
When you are working with our products we want to provide you with the greatest
possible benefits. If you need any support, we are here to assist you!
OMICRON electronics GmbH, Oberes Ried 1, 6833 Klaus, Austria, +43 59495
216 OMICRON
ENU 1039 06 01