Download as pdf or txt
Download as pdf or txt
You are on page 1of 24

VI Starting

Automation Interface
OMICRON Test Universe

Manual Version: VISAutInt.AE.2 - Year: 2012


© OMICRON electronics. All rights reserved.
This manual is a publication of OMICRON electronics GmbH.
All rights including translation reserved. Reproduction of any kind, e.g., photocopying, microfilming, optical
character recognition and/or storage in electronic data processing systems, requires the explicit consent of
OMICRON electronics.
Reprinting, wholly or in part, is not permitted. The product information, specifications, and technical data
embodied in this manual represent the technical status at the time of writing and are subject to change without
prior notice.
We have done our best to ensure that the information given in this manual is useful, accurate, up-to-date and
reliable. However, OMICRON electronics does not assume responsibility for any inaccuracies which may be
present.
The user is responsible for every application that makes use of an OMICRON product.

2
Contents

Contents

Object Hierarchy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3
Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4
Application Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .4
Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Application (read only) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Constants (read only) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Document (read only) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Name (read only) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Parent (read only). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Visible . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
Methods. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Quit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Document Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .8
Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Application (read only) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Comment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Parent (read only). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Shots (read only) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
TestSettings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Methods. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
UpdateAllViews . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
TestSettings Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .12
Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
FaultType . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
PhaseAngle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
ShotDuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Pause . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13

1
OMICRON Test Universe

Shots Collection Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .14


Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Application (read only) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Count (read only) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Parent (read only). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Item (default property) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
Methods. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Add . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Remove . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
RemoveAll . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Shot Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .17
Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
StatusString(read only). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Status (read only) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Voltage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Current . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
PickUp (read only) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Deviation (read only) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
DropOff (read only). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
ResetRatio (read only) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
Constants Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .22
Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Fault Types. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
Shot Status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22

2
VI Starting Automation Interface

VI Starting Automation Interface


Object Hierarchy
An VI Starting Document contains two different objects (refer to figure 1):

1 Test Settings: it defines the test model and the test parameters.

2 Shots Collection: it store all the shots.

Figure 1:
Object hierarchy of an
VI Starting Document Application

Constants

Document

Test Settings

Shots Collection

Shot

3
OMICRON Test Universe

Reference
Application Object
Properties
Application (read only)
The application object is the root of the OMICRON VI Starting object hierarchy.
It is the only object that can be created directly by other OLE Automation
controllers (e.g. MS Excel using CreateObject).
This object is unique within the OMICRON VI Starting Module. If you want to
create another Application object with CreateObject, a new instance of the
OMICRON VI Starting program is started to handle this object.
You can use this object as a starting point to navigate through the hierarchy tree.
You can get references to the Document Object (Document) and the Predefined
Constant Values (Constants) objects.
Constants (read only)

Syntax: object.Constants

Type: Object (Constants)

Description: Returns the object with the constant values (Constants) you
can use with several functions.

Example: Dim otm As Object


Dim vist As Object
Set otm =
Document.InsertObject(“OMVISt.Document”)
Set vist = otm.Specific
Dim constants As Object
Set constants = vist.Constants

4
VI Starting Automation Interface

Document (read only)

Syntax: object.Document

Type: Object (Document)

Description: This property returns a Document Object (Document).

Example: Dim otm As Object


Dim vist As Object
Set otm =
Document.InsertObject(“OMVISt.Document”)
Set vist = otm.Specific
Dim doc As Object
Set doc = vist.Document

Name (read only)

Syntax: object.Name

Type: String

Description: Returns the name of the application.

Example: Dim otm As Object


Dim vist As Object
Set otm =
Document.InsertObject(“OMVISt.Document”)
Set vist = otm.Specific
Dim Str As String
Set Str = vist.Name

5
OMICRON Test Universe

Parent (read only)

Syntax: object.Parent

Type: Object

Description: This property always returns the parent object in the object
hierarchy. In this case it is the Application Object
(Application).

Example: Dim otm As Object


Dim vist As Object
Set otm =
Document.InsertObject(“OMVISt.Document”)
Set vist = otm.Specific
Dim obj As Object
Set obj = vist.Parent

Visible

Syntax: object.Visible

Type: Boolean

Description: Shows/hides the main application window.

Example: Dim otm As Object


Dim vist As Object
Set otm =
Document.InsertObject(“OMVISt.Document”)
Set vist = otm.Specific
'Is the application visible ?
If vist.Visible Then
MsgBox "Application is visible"
Else'Make the application visible
vist.Visible = TRUE
End If

Note: If you use an external OLE Automation controller (e.g. OMICRON Con-
trol Center) and you create the Application Object (Application) (and start the
OMICRON VI Starting application) you have to set the visible property to TRUE
to see the main window of the application.

6
VI Starting Automation Interface

Methods
Quit

Syntax: object.Quit

Return None
type:

Description: This command quits the OMICRON VI Starting application


and closes all open windows and the document.

Example: Dim otm As Object


Dim vist As Object
Set otm =
Document.InsertObject(“OMVISt.Document”)
Set vist = otm.Specific
vist.Quit

7
OMICRON Test Universe

Document Object
With the Document Object (Document) you can control the document.
From this object you can get references to the Shots Collection Object (Shots)
and the Test Settings Object (TestSettings).

Properties
Application (read only)

Syntax: Object.Application

Type: Object (Application)

Description: Returns the Application Object (Application).

Example: Dim otm As Object


Dim vist As Object
Set otm =
Document.InsertObject(“OMVISt.Document”)
Set vist = otm.Specific
Dim app As Application
Set app = vist.Document.Application

Comment

Syntax: object.Comment

Type: String

Description: This property allows access to the comment string which can
be shown in the report.

Example: Dim otm As Object


Dim vist As Object
Set otm =
Document.InsertObject(“OMVISt.Document”)
Set vist = otm.Specific
'Set comment
vist.Document.Comment = "This test is
simulated."

8
VI Starting Automation Interface

Parent (read only)

Syntax: object.Parent

Type: Object

Description: This property always returns the parent object in the object
hierarchy. In this case it is the Application Object
(Application).

Example: Dim otm As Object


Dim vist As Object
Set otm =
Document.InsertObject(“OMVISt.Document”)
Set vist = otm.Specific
Dim obj As Object
Set obj = vist.Document.Parent

Shots (read only)

Syntax: object.Shots

Type: Object (Shots)

Description: This property returns the Shots Collection Object (Shots) of


the document. With this object you can access to the the
Shots in your document.

Example: Dim otm As Object


Dim vist As Object
Set otm =
Document.InsertObject(“OMVISt.Document”)
Set vist = otm.Specific
Dim shots As Object
Set shots = vist.Document.Shots

9
OMICRON Test Universe

TestSettings

Syntax: object.TestSettings

Type: Object

Description: This property returns the test settings object.

Example: Dim otm As Object


Dim vist As Object
Set otm =
Document.InsertObject(“OMVISt.Document”)
Set vist = otm.Specific
Dim obj As Object
Set obj = vist.Document.TestSettings

10
VI Starting Automation Interface

Methods
UpdateAllViews

Syntax: object.UpdateAllViews(hint)
Long hint

Type: None

Description: This method updates the UI and the report. The optional Hint
parameter specifies which view becomes the update. By
calling this method without parameter, all the UI is updated.

Example: Dim otm As Object


Dim vist As Object
Set otm =
Document.InsertObject(“OMVISt.Document”)
Set vist = otm.Specific
vist.Shots.Add
vist.Document.UpdateAllViews

11
OMICRON Test Universe

TestSettings Object
Properties
FaultType

Syntax: object.FaultType

Type: Long

Description: The fault type. Possible values are FTL1N, FTL2N … See
Constants object for the complete list.

Example: Dim otm As Object


Dim vist As Object
Set otm =
Document.InsertObject(“OMVISt.Document”)
Set vist = otm.Specific
‘Set fault type to L23
vist.Document.TestSettings.FaultType =
vist.Constants.FTL2L3

PhaseAngle

Syntax: object.PhaseAngle

Type: Double

Description: Phase angle of I in reference to V.

Example: Dim otm As Object


Dim vist As Object
Set otm =
Document.InsertObject(“OMVISt.Document”)
Set vist = otm.Specific
‘Set PhaseAngle
vist.Document.TestSettings.PhaseAngle = 45.15

12
VI Starting Automation Interface

ShotDuration

Syntax: object.ShotDuration

Type: Double

Description: Time for which the test quantities are applied to the test object
during one shot.

Example: Dim otm As Object


Dim vist As Object
Set otm =
Document.InsertObject(“OMVISt.Document”)
Set vist = otm.Specific
‘Set ShotDuration
vist.Document.TestSettings.ShotDuration = 2.50

Pause

Syntax: object.Pause

Type: Double

Description: Pause time between two shots.

Example: Dim otm As Object


Dim vist As Object
Set otm =
Document.InsertObject(“OMVISt.Document”)
Set vist = otm.Specific
‘Set Pause
vist.Document.TestSettings.Pause = 10.50

13
OMICRON Test Universe

Shots Collection Object


Properties
Application (read only)

Syntax: object.Application

Type: Object (Application)

Description: Returns the Application Object (Application).

Example: Dim otm As Object


Dim vist As Object
Set otm =
Document.InsertObject(“OMVISt.Document”)
Set vist = otm.Specific
Dim app As Application
Set app = vist.Document.Shots.Application

Count (read only)

Syntax: object.Count

Type: Long

Description: This property returns the number of shots.

Example: Dim otm As Object


Dim vist As Object
Set otm =
Document.InsertObject(“OMVISt.Document”)
Set vist = otm.Specific
MsgBox "Number of shots : " &
vist.Document.Shots.Count

14
VI Starting Automation Interface

Parent (read only)

Syntax: object.Parent

Type: Object

Description: This property always returns the parent object in the object
hierarchy. In this case it is the Document Object
(Document).

Example: Dim otm As Object


Dim vist As Object
Set otm =
Document.InsertObject(“OMVISt.Document”)
Set vist = otm.Specific
Dim obj As Object
Set obj = vist.Document.Shots.Parent

Item (default property)

Syntax: object.Item(index)
Long index

Return type: Object (Shot)

Description: Returns a Shot Object (Shot) from the Shots Collection. The
parameter is the shot index in the collection.

15
OMICRON Test Universe

Methods
Add

Syntax: object.Add

Return Object (Shot)


type:

Description: This method adds a shot to the Shots collection and returns
the created Shot Object (Shot).

Remove

Syntax: object.Remove(index)
Long index

Return none
type:

Description: This method removes the specified shot from the Shots
collection.

RemoveAll

Syntax: object.RemoveAll

Return none
type:

Description: This method removes all the shots from the Shots collection.

16
VI Starting Automation Interface

Shot Object
Properties
StatusString(read only)

Syntax: object.StatusString

Type: String

Description: This property returns the shot status string.

Example: Dim otm As Object


Dim vist As Object
Set otm =
Document.InsertObject(“OMVISt.Document”)
Set vist = otm.Specific
Dim shots As Object
Set shots = vist.Document.Shots
shots.Add()
otm.Test
MsgBox “Status: ” & shots(1).StatusString

17
OMICRON Test Universe

Status (read only)

Syntax: object.Status

Type: Long

Description: This property returns the shot status. Possible values are:
SSFailed, SSNotTested … See Constants object for the
complete list.

Example: Dim otm As Object


Dim vist As Object
Set otm =
Document.InsertObject(“OMVISt.Document”)
Set vist = otm.Specific
Dim shots As Object
Set shots = vist.Document.Shots
shots.Add()
otm.Test
If shots(1).Status = vist.Constants.SSFailed
Then
MsgBox “Test failed”
End If

Voltage

Syntax: object.Voltage

Type: Double

Description: Voltage of the test point as one of the “fault quantities”.

Example: Dim otm As Object


Dim vist As Object
Set otm =
Document.InsertObject(“OMVISt.Document”)
Set vist = otm.Specific
Dim shots As Object
Set shots = vist.Document.Shots
shots.Add()
shots(1).Voltage = 25.50

18
VI Starting Automation Interface

Current

Syntax: object.Current

Type: Double

Description: Current of the test point as the other of the “fault quantities”.

Example: Dim otm As Object


Dim vist As Object
Set otm =
Document.InsertObject(“OMVISt.Document”)
Set vist = otm.Specific
Dim shots As Object
Set shots = vist.Document.Shots
Dim shot As Object
Set shot = shots.Add()
shot.Current = 2.5

PickUp (read only)

Syntax: object.PickUp

Type: Double

Description: Pick-Up value of the test point after testing.

Example: Dim otm As Object


Dim vist As Object
Set otm =
Document.InsertObject(“OMVISt.Document”)
Set vist = otm.Specific
Dim shots As Object
Set shots = vist.Document.Shots
Dim shot As Object
Set shot = shots.Add()
otm.Test()
MsgBox "PickUp value : " & shot.PickUp

19
OMICRON Test Universe

Deviation (read only)

Syntax: object.Deviation

Type: Double

Description: Deviation of pickup voltage to nominal voltage


(object.Voltage).

Example: Dim otm As Object


Dim vist As Object
Set otm =
Document.InsertObject(“OMVISt.Document”)
Set vist = otm.Specific
Dim shots As Object
Set shots = vist.Document.Shots
Dim shot As Object
Set shot = shots.Add()
otm.Test()
MsgBox "Deviation value : " & shot.Deviation

DropOff (read only)

Syntax: object.DropOff

Type: Double

Description: Drop-Off value of voltage after test.

Example: Dim otm As Object


Dim vist As Object
Set otm =
Document.InsertObject(“OMVISt.Document”)
Set vist = otm.Specific
Dim shots As Object
Set shots = vist.Document.Shots
Dim shot As Object
Set shot = shots.Add()
otm.Test()
MsgBox "DropOff value : " & shot.DropOff

20
VI Starting Automation Interface

ResetRatio (read only)

Syntax: object.ResetRatio

Type: Double

Description: Ratio of Drop-Off and Pick-Up value.

Example: Dim otm As Object


Dim vist As Object
Set otm =
Document.InsertObject(“OMVISt.Document”)
Set vist = otm.Specific
Dim shots As Object
Set shots = vist.Document.Shots
Dim shot As Object
Set shot = shots.Add()
otm.Test
MsgBox "ResetRatio value : " &
shot.ResetRatio

21
OMICRON Test Universe

Constants Object
Properties
The following is a list some useful IDs supported by the OMICRON VI Starting
Module.
Note: Do NOT use these IDs out of the Automation scope.
Fault Types
FTL1N
FTL2N
FTL3N
FTL1L2
FTL2L3
FTL3L1
FTL1L2L3

Shot Status
SSFailed
SSNotTested
SSUntestable
SSPassed
SSOverloadPassed
SSOverloadFailed

22

You might also like