Sie sind auf Seite 1von 48

27

TEST UNIVERSE

Annunciation Checker Automation Interface

OMICRON Test Universe

Manual Version: AnnucheckAut.AE.2 OMICRON electronics 2008. 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 and entirely 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. OMICRON electronics translates this manual from the source language English into a number of other languages. Any translation of this manual is done for local requirements, and in the event of a dispute between the English and a non-English version, the English version of this manual shall govern.

Contents

Contents
Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2 AnnuCheck Automation Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3
Object Hierarchy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Application Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Document Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 Signals Collection Object. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 Signal Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 nonFCSignals collection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 nonFCSignal Object. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 BinOuts Collection Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 BinOut Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 Locations Collection Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 Methods . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 Location Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 TestPoints Collection Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

OMICRON Test Universe

TestPoint Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 Constants Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45

AnnuCheck Automation Interface

AnnuCheck Automation Interface


Object Hierarchy
Figure 1: Object hierarchy of an AnnuCheck document

OMICRON Test Universe

Application Object
Properties
Application (read only) The application object is the root of the OMICRON Annunciation Checker 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 Annunciation Checker. If you want to create another Application object with CreateObject, a new instance of the OMICRON Annunciation Checker 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: Type: Description: object.Constants Object (Constants) Returns the object with the Constant Values (Constants) you can use with several functions. Dim otm As Object Dim annu As Object Set otm = Document.InsertObject("OMAnnuCheck.Document") Set annu = otm.Specific Dim constants As Object Set constants = annu.Constants

Example:

AnnuCheck Automation Interface

Document (read only) Syntax: Type: Description: Example: object.Document Object (Document) This property returns a Document Object (Document). Dim otm As Object Dim annu As Object Set otm = Document.InsertObject("OMAnnuCheck.Document") Set annu = otm.Specific Dim doc As Object Set doc = annu.Document

Parent (read only) Syntax: Type: Description: object.Parent Object This property always returns the parent object in the object hierarchy. In this case it is the Application Object (Application). Dim otm As Object Dim annu As Object Set otm = Document.InsertObject("OMAnnuCheck.Document") Set annu = otm.Specific Dim obj As Object Set obj = annu.Parent

Example:

OMICRON Test Universe

Visible Syntax: Type: Description: Example: object.Visible Boolean Shows/hides the main application window. Dim otm As Object Dim annu As Object Set otm = Document.InsertObject("OMAnnuCheck.Document") Set annu = otm.Specific 'Is the application visible ? If annu.Visible then MsgBox "Application is visible" Else 'Make the application visible annu.Visible = TRUE End If If you use an external OLE Automation controller (e.g., OMICRON Control Center) and you create the Application Object (Application) (and start the OMICRON Annunciation Checker application) you have to set the visible property to True to see the main window of the application.

Note:

AnnuCheck Automation Interface

Methods
Quit Syntax: Return type: Description: object.Quit None This command quits the OMICRON Annunciation Checker application and closes all open windows and the document. Dim otm As Object Dim annu As Object Set otm = Document.InsertObject("OMAnnuCheck.Document") Set annu = otm.Specific annu.Quit

Example:

OMICRON Test Universe

Document Object
With the Document Object (Document) you can control the document. From this object you can get references to the Signals Collection Object (Signals) (definition of test signals) and the Measurements Collection Object (Measurements) (definition of measurement conditions and results).

Properties
Application (read only) Syntax: Type: Description: Example: object.Application Object (Application) Returns the Application Object (Application). Dim otm As Object Dim annu As Object Set otm = Document.InsertObject("OMAnnuCheck.Document") Set annu = otm.Specific Dim app As Object Set app = annu.Document.Application

Parent (read only) Syntax: Type: Description: object.Parent Object This property always returns the parent object in the object hierarchy. In this case it is the Application Object (Application). Dim otm As Object Dim annu As Object Set otm = Document.InsertObject("OMAnnuCheck.Document") Set annu = otm.Specific Dim obj As Object Set obj = annu.Document.Parent

Example:

10

AnnuCheck Automation Interface

Signals (read only) Syntax: Type: Description: object.Signals Object (Signals) This property returns the Signals Collection Object (Signals) of the document. With this object you can manipulate all the signals in your document. Dim otm As Object Dim annu As Object Set otm = Document.InsertObject("OMAnnuCheck.Document") Set annu = otm.Specific Dim signals As Object Set signals = annu.Document.Signals

Example:

Locations (read only) Syntax: Type: Description: object.Locations Object (Locations) This property returns the Locations Collection Object (Locations) of the document. With this object you can manipulate all the locations in your document. Dim otm As Object Dim annu As Object Set otm = Document.InsertObject("OMAnnuCheck.Document") Set annu = otm.Specific Dim locations As Object Set locations= annu.Document.Locations

Example:

11

OMICRON Test Universe

Comment Syntax: Type: Description: object.Comment String This property represents the comment of the document (see Edit / Comment menu command). 'Change document comment Dim otm As Object Dim annu As Object Set otm = Document.InsertObject("OMAnnuCheck.Document") Set annu = otm.Specific annu.Document.Comment = "This is my new comment." & vbCrLf & "Line2" MsgBox annu.Document.Comment

Example:

12

AnnuCheck Automation Interface

Signals Collection Object


Properties
Application (read only) Syntax: Type: Description: Example: object.Application Object (Application) Returns the Application Object (Application). Dim otm As Object Dim annu As Object Set otm = Document.InsertObject("OMAnnuCheck.Document") Set annu = otm.Specific Dim app As Object Set app = annu.Document.Signals.Application

13

OMICRON Test Universe

Count (read only) Syntax: Type: Description: object.Count Long This property returns the number of signals in the document. Note that there will always be at least one signal in the signals collection. Dim otm As Object Dim annu As Object Set otm = Document.InsertObject("OMAnnuCheck.Document") Set annu = otm.Specific 'Count twice Dim s As Object Dim ss As Object i = 0 Set ss = annu.Document.Signals For Each s in ss i = i+1 Next If i = ss.Count then MsgBox "We've counted correctly" End If

Example:

Parent (read only) Syntax: Type: Description: object.Parent Object This property always returns the parent object in the object hierarchy. In this case it is the Document Object (Document). Dim otm As Object Dim annu As Object Set otm = Document.InsertObject("OMAnnuCheck.Document") Set annu = otm.Specific Dim obj As Object Set obj = annu.Document.Signals.Parent

Example:

14

AnnuCheck Automation Interface

Item (default property) Syntax: object.Item(Index) (optional) Variant Index - Index number of the signal Object (Signal) This method returns Signal Object from the Signals Collection of the specified Index (must be between 1 and Signals.Count). Note that there will always be at least one signal in the signals collection. Dim otm As Object Dim annu As Object Set otm = Document.InsertObject("OMAnnuCheck.Document") Set annu = otm.Specific Dim signals As Object Set signals = annu.Document.Signals Dim signal As Object Set signal = signals(1)

Return type: Description:

Example:

15

OMICRON Test Universe

Methods
Add Syntax: Return type: Description: Example: object.Add() Object (Signal) This method adds a new Signal to the Signals collection. The reference to the newly created Signal Object is returned. Dim otm As Object Dim annu As Object Set otm = Document.InsertObject("OMAnnuCheck.Document") Set annu = otm.Specific 'Add signal Dim signals As Object Dim signal As Object Set signals = annu.Document.Signals Set signal = signals.Add

Remove Syntax: Return type: Description: object.Remove(Index) Long Index - Index of the signal to remove None This method removes the signal specified by the index from the signals collection. At least one signal must always exist, therefore you will get an error message if you try to remove the last signal in the collection. Dim otm As Object Dim annu As Object Set otm = Document.InsertObject("OMAnnuCheck.Document") Set annu = otm.Specific 'Add signal Dim signals As Object Set signals = annu.Document.Signals signals.Add 'And now remove it signals.Remove(2)

Example:

16

AnnuCheck Automation Interface

Signal Object
Properties
FCState Syntax: Type: Description: Example: object.FCState Object (FCState) This property returns the FCState Object of a given Signal. Dim otm As Object Dim annu As Object Set otm = Document.InsertObject("OMAnnuCheck.Document") Set annu = otm.Specific Dim fcState As Object Set fcState = annu.Document.Signals(1).FCState

BinOuts (read only) Syntax: Type: Description: object.BinOuts Object (BinOuts) This property returns the Binary Outputs Collection Object (BinOuts) of a given Signal Object (Signal). With this object you can manipulate the binary outputs settings of the signal. Dim otm As Object Dim annu As Object Set otm = Document.InsertObject("OMAnnuCheck.Document") Set annu = otm.Specific Dim binouts As Object Set binouts = annu.Document.Signals(1).BinOuts

Example:

17

OMICRON Test Universe

TestPoints (read only) Syntax: Type: Description: object.TestPoints Object (TestPoints) This property returns the Test Points Collection Object of a given Signal Object. With this object you can manipulate the individual test points for this signal. Dim otm As Object Dim annu As Object Set otm = Document.InsertObject("OMAnnuCheck.Document") Set annu = otm.Specific Dim testpoints As Object Set testpoints = annu.Document.Signals(1).TestPoints

Example:

nonFCSignals (read only) Syntax: Type: Description: object.nonFCSignals Object (nonFCSignals) This property returns the nonFCSignals Collection Object of the Signal. These are the "extra" analog outputs that are not included in the FCSignals collection, for example, the fourth voltage output, or the second current triplet of a CMC256 would be included in this collection. Dim otm As Object Dim annu As Object Set otm = Document.InsertObject("OMAnnuCheck.Document") Set annu = otm.Specific Dim nonfcsignals As Object Set nonfcsignals = annu.Document.Signals(1).nonFCSignals

Example:

18

AnnuCheck Automation Interface

Name Syntax: Type: Description: Example: object.Name String This property represents the name of the signal. 'Change signal name and display it Dim otm As Object Dim annu As Object Set otm = Document.InsertObject("OMAnnuCheck.Document") Set annu = otm.Specific Dim signal As Object Set signal = annu.Document.Signals(1) signal.Name = "Signal 20" MsgBox signal.Name

19

OMICRON Test Universe

Type Syntax: Type: Description: object.Type Long This property allows you to read, or set the type of the signal. 0 = Shot 1 = Steady State 2 = No Output There are constants defined in the Constants object for convienence: cSignalTypeShot, cSignalTypeSteadyState, cSignalTypeNoOutput Dim otm As Object Dim annu As Object Set otm = Document.InsertObject("OMAnnuCheck.Document") Set annu = otm.Specific Dim signal As Object Set signal = annu.Document.Signals(1) If signal.type = annu.Constants.cSignalTypeShot Then signal.type = annu.Constants.cSignalTypeSteadyState End If

Example:

20

AnnuCheck Automation Interface

LED Syntax: Type: Description: Example: object.LED String This property allows you to read or set the LED of a Signal. 'Change signal name and display it Dim otm As Object Dim annu As Object Set otm = Document.InsertObject("OMAnnuCheck.Document") Set annu = otm.Specific Dim signal As Object Set signal = annu.Document.Signals(1) signal.LED = "01"

PreFaultCurr Syntax: Type: Description: object.PreFaultCurr double This property allows you to read or set the pre-fault current (in amps) of the Signal. 'Change signal name and display it Dim otm As Object Dim annu As Object Set otm = Document.InsertObject("OMAnnuCheck.Document") Set annu = otm.Specific Dim signal As Object Set signal = annu.Document.Signals(1) ' Set prefault current to 1.5 A signal.PreFaultCurr = 1.5

Example:

21

OMICRON Test Universe

PreFaultTime Syntax: Type: Description: object.PreFaultTime double This property allows you to read or set the pre-fault time (in seconds) of the Signal. 'Change signal name and display it Dim otm As Object Dim annu As Object Set otm = Document.InsertObject("OMAnnuCheck.Document") Set annu = otm.Specific Dim signal As Object Set signal = annu.Document.Signals(1) ' Set prefault time to 0.5 seconds signal.PreFaultTime = 0.5 MaxFaultTime Syntax: Type: Description: object.MaxFaultTime double This property allows you to read or set the post-fault time (in seconds) of the Signal. 'Change signal name and display it Dim otm As Object Dim annu As Object Set otm = Document.InsertObject("OMAnnuCheck.Document") Set annu = otm.Specific Dim signal As Object Set signal = annu.Document.Signals(1) ' Set maxfault time to 5 seconds signal.MaxFaultTime = 5.0

Example:

Example:

22

AnnuCheck Automation Interface

PostFaultTime Syntax: Type: Description: object.PostFaultTime double This property allows you to read or set the post-fault time (in seconds) of the Signal. Dim otm As Object Dim annu As Object Set otm = Document.InsertObject("OMAnnuCheck.Document") Set annu = otm.Specific Dim signal As Object Set signal = annu.Document.Signals(1) ' Set maxfault time to 1 second signal.PostFaultTime = 1.0 Instructions Syntax: Type: Description: object.Instructions string This property allows you to read or set the Instructions text of the Signal. Dim otm As Object Dim annu As Object Set otm = Document.InsertObject("OMAnnuCheck.Document") Set annu = otm.Specific Dim signal As Object Set signal = annu.Document.Signals(1) signal.Instructions = "Connect T2"

Example:

Example:

23

OMICRON Test Universe

PopupMsg Syntax: Type: Description: object.PopupMsg string This property allows you to read or set the pop-up message of the Signal. Dim otm As Object Dim annu As Object Set otm = Document.InsertObject("OMAnnuCheck.Document") Set annu = otm.Specific Dim signal As Object Set signal = annu.Document.Signals(1) signal.PopupMsg = "Press reset before running shot" TriggerID Syntax: Type: Description: object.TriggerID long This property specifies the signal ID of the trigger input of the Signal. Dim otm As Object Dim annu As Object Set otm = Document.InsertObject("OMAnnuCheck.Document") Set annu = otm.Specific annu.Document.Signals(1).TriggerID = annu.Constants.sigidTRIP

Example:

Example:

24

AnnuCheck Automation Interface

TriggerCondition Syntax: Type: Description: object.TriggerCondition long This property specifies the trigger condition of the trigger input. It can be is "Negative" (0), "Positive" (1) or "Don't care" (2). 0 = "Negative" means that the trigger condition occurs when the binary input goes from 1 -> 0. 1 = "Positive" means that the trigger condition occurs when the binary input goes from 0 -> 1. 2 = "Don't care" means that the binary input is ignored. Dim otm As Object Dim annu As Object Set otm = Document.InsertObject("OMAnnuCheck.Document") Set annu = otm.Specific annu.Document.Signals(1).TriggerID = annu.Constants.sigidTRIP 'Trigger condition will occur when Trip goes from 0 to 1 annu.Document.Signals(1).TriggerCondition = 0

Example:

BinOutLatching Syntax: Type: Description: object.BinOutLatching Boolean This property specifies the latching behaviour for all binary outputs. It is not possible to define the latching for each binary output. True = Latching On False = Latching Off Dim otm As Object Dim annu As Object Set otm = Document.InsertObject("OMAnnuCheck.Document") Set annu = otm.Specific 'Switch latching for all binary outputs on annu.Document.Signals(1).BinOutLatching = True

Example:

25

OMICRON Test Universe

nonFCSignals collection
These are the "extra" analog outputs that are not included in the FCSignals collection, for example, the fourth voltage output, or the second current triplet of a CMC256 would be included in this collection.

Properties
Application (read only) Syntax: Type: Description: Example: object.Application Object (Application) Returns the Application Object (Application). Dim otm As Object Dim annu As Object Set otm = Document.InsertObject("OMAnnuCheck.Document") Set annu = otm.Specific Dim app As Object Set app = annu.Document.Signals(1).nonFCSignals.Application

Count (read only) Syntax: Type: Description: object.Count Long This property returns the number of non FC signals in the signal. Dim otm As Object Dim annu As Object Set otm = Document.InsertObject("OMAnnuCheck.Document") Set annu = otm.Specific MsgBox "Number of nonFCSignals in signal 1: " & annu.Document.Signals(1).nonFCSignals.Count

Example:

26

AnnuCheck Automation Interface

Item (default property) Syntax: object.Item(Index) (optional) Variant Index - Index number of the non FC signal Object (nonFCSignal) This method returns an nonFCSignal Object from the nonFCSignals Collection. The parameter is the signal ID of the nonFCSignal. Signal IDs are constants from the Constants object. Dim otm As Object Dim annu As Object Set otm = Document.InsertObject("OMAnnuCheck.Document") Set annu = otm.Specific annu.Visible = True 'Set amplitude of V(1)-1 to 2A ' Note: this presumes that the signal has been routed in the HCC! Dim signal As Object Set signal = annu.Document.Signals(1) signal.nonFCSignals(annu.Constants.sigidUSER_ U1_1).Amplitude = 2.0

Return type: Description:

Example:

27

OMICRON Test Universe

ItemIndex Syntax: object.ItemIndex(Index) Variant Index - Index number of the non FC signal Object (nonFCSignal). This method returns an nonFCSignal Object from the nonFCSignals Collection. The index is the number of the analog output in the collection (between 1 and nonFCSignals.Count). Dim otm As Object Dim annu As Object Set otm = Document.InsertObject("OMAnnuCheck.Document") Set annu = otm.Specific 'Set amplitude of all nonFCSignals to 0 Dim signal As Object Set signal = annu.Document.Signals(1) For i = 1 To signal.nonFCSignals.Count signal.nonFCSignals.ItemIndex(i).Amplitude = 0.0 Next i

Return type: Description:

Example:

28

AnnuCheck Automation Interface

nonFCSignal Object
Properties
Amplitude Syntax: Return type: Description: Example: object.Amplitude Double This property specifies the amplitude of the nonFCSignal. Dim otm As Object Dim annu As Object Set otm = Document.InsertObject("OMAnnuCheck.Document") Set annu = otm.Specific 'Set amplitude of V(1)-1 to 2A ' Note: this presumes that the signal has been routed in the HCC! Dim signal As Object Set signal = annu.Document.Signals(1) signal.nonFCSignals(annu.Constants.sigidUSER_ U1_1).Amplitude = 2.0

29

OMICRON Test Universe

Frequency Syntax: Return type: Description: Example: object.Frequency Double This property specifies the frequency of the nonFCSignal. Dim otm As Object Dim annu As Object Set otm = Document.InsertObject("OMAnnuCheck.Document") Set annu = otm.Specific 'Set frequency of V(1)-1 to 60Hz' Note: this presumes that the signal has been routed in the HCC!Dim signal As Object Set signal = annu.Document.Signals(1)signal.nonFCSignals(a nnu.Constants.sigidUSER_U1_1).Frequency = 60.0

Phase Syntax: Return type: Description: Example: object.Phase Double This property specifies the phase of the nonFCSignal. Dim otm As Object Dim annu As Object Set otm = Document.InsertObject("OMAnnuCheck.Document") Set annu = otm.Specific 'Set phase of V(1)-1 to 37.4 ' Note: this presumes that the signal has been routed in the HCC! Dim signal As Object Set signal = annu.Document.Signals(1) signal.nonFCSignals(annu.Constants.sigidUSER_ U1_1).Phase = 37.4

30

AnnuCheck Automation Interface

BinOuts Collection Object


Properties
Application (read only) Syntax: Type: Description: Example: object.Application Object (Application) Returns the Application Object (Application). Dim otm As Object Dim annu As Object Set otm = Document.InsertObject("OMAnnuCheck.Document") Set annu = otm.Specific Dim app As Object Set app = annu.Document.Signals(1).BinOuts.Application

Count (read only) Syntax: Type: Description: object.Count Long This property returns the number of binary outputs in the signal. Dim otm As Object Dim annu As Object Set otm = Document.InsertObject("OMAnnuCheck.Document") Set annu = otm.Specific MsgBox "Number of binary outputs in signal 1: " & annu.Document.Signals(1).BinOuts.Count

Example:

31

OMICRON Test Universe

Item (default property) Syntax: object.Item(SignalID) Long SignalID - Signal ID of the binary output Object (BinOut) This method returns a Binary Output Object (BinOut) from the Binary Outputs Collection. The parameter is the signal ID of the binary output in the collection. Signal IDs are constants from the Constants object. Dim otm As Object Dim annu As Object Set otm = Document.InsertObject("OMAnnuCheck.Document") Set annu = otm.Specific 'Set binary output for circuit breaker Dim signal As Object Set signal = annu.Document.Signals(1) signal.BinOuts(annu.Constants.sigidUSER_ OUTBIN_DEF1).Value = 1

Return type: Description:

Example:

32

AnnuCheck Automation Interface

ItemIndex Syntax: object.ItemIndex(Index) Variant Index - Index number of the binary output Object (BinOut) This method returns a Binary Output Object (BinOut) from the Binary Outputs Collection. The index is the number of the binary output in the collection (between 1 and BinOuts.Count). Dim otm As Object Dim annu As Object Set otm = Document.InsertObject("OMAnnuCheck.Document") Set annu = otm.Specific 'Set all binary outputs Dim signal As Object Set signal = annu.Document.Signals(1) For i = 1 To signal.BinOuts.Count signal.BinOuts.ItemIndex(i).Value = 1 Next i

Return type: Description:

Example:

33

OMICRON Test Universe

BinOut Object
Properties
Value (default property) Syntax: Type: Description: object.Value Boolean This property specifies whether the binary output is set (active) or not (inactive). Dim otm As Object Dim annu As Object Set otm = Document.InsertObject("OMAnnuCheck.Document") Set annu = otm.Specific 'Set binary output for circuit breaker Dim signal As Object Set signal = annu.Document.Signals(1) signal.BinOuts(annu.Constants. sigidUSER_OUTBIN_DEF1).Value = 1

Example:

34

AnnuCheck Automation Interface

Locations Collection Object


Properties
Application (read only) Syntax: Type: Description: Example: object.Application Object (Application) Returns the Application Object (Application). Dim otm As Object Dim annu As Object Set otm = Document.InsertObject("OMAnnuCheck.Document") Set annu = otm.Specific Dim app As Object Set app = annu.Document.Locations.Application

Parent (read only) Syntax: Type: Description: object.Parent Object This property always returns the parent object in the object hierarchy. In this case it is the Document Object (Document). Dim otm As Object Dim annu As Object Set otm = Document.InsertObject("OMAnnuCheck.Document") Set annu = otm.Specific Dim obj As Object Set obj = annu.Document.Locations.Parent

Example:

35

OMICRON Test Universe

Count (read only) Syntax: Type: Description: object.Count Long This property returns the number of locations in the test document. Note that there will always be at least one location in the locations collection. Dim otm As Object Dim annu As Object Set otm = Document.InsertObject("OMAnnuCheck.Document") Set annu = otm.Specific Dim testpoints As Object Dim testpoint As Object i = 0 Set testpoints = annu.Document.Signals(1).TestPoints For Each testpoint in testpointsi = i+1 Next If i = testpoints.Count then MsgBox "Counted correctly" End If

Example:

Item (default property) Syntax: Return type: Description: object.Item(Index) (optional) Variant Index - Index number of the location Object (Location) This method returns a Location Object from the Locations Collection at the specified Index (must be between 1 and Locations.Count). Note that there will always be at least one location in the locations collection. 'Change signal name and display it Dim otm As Object Dim annu As Object Set otm = Document.InsertObject("OMAnnuCheck.Document") Set annu = otm.Specific Dim locations As Object set locations = annu.Document.Locations Dim location As Object Set location = locations(1)

Example:

36

AnnuCheck Automation Interface

Methods
Add Syntax: Return type: Description: object.Add() Object (Location) This method adds a new Location to the Locations collection. The reference to the newly created Location Object is returned. Dim otm As Object Dim annu As Object Set otm = Document.InsertObject("OMAnnuCheck.Document") Set annu = otm.Specific Dim locations As Object Dim location As Object Set locations = annu.Document.Locations Set location = locations.Add

Example:

Remove Syntax: object.Remove(Index) Long Index - Index of the signal to remove None This method removes the location specified by the index from the locations collection. At least one location must always exist, therefore you will get an error message if you try to remove the last location in the collection. Dim otm As Object Dim annu As Object Set otm = Document.InsertObject("OMAnnuCheck.Document") Set annu = otm.Specific Dim locations As Object set locations = annu.Document.Locations locations.Add 'And now remove it locations.Remove(2)

Return type: Description:

Example:

37

OMICRON Test Universe

Location Object
Properties
Name Syntax: Return type: Description: Example: object.Name String This property represents the name of the location. 'Change location name and display it Dim otm As Object Dim annu As Object Set otm = Document.InsertObject("OMAnnuCheck.Document") Set annu = otm.Specific Dim location As Object Set location = annu.Document.Locations(1) location.Name = "Location 20" MsgBox location.Name

38

AnnuCheck Automation Interface

TestPoints Collection Object


Properties
Application (read only) Syntax: Return type: Description: Example: object.Application Object (Application) Returns the Application Object (Application). Dim otm As Object Dim annu As Object Set otm = Document.InsertObject("OMAnnuCheck.Document") Set annu = otm.Specific Dim app As Object Set app = annu.Document.Signals(1).TestPoints.Application

Count (read only) Syntax: Return type: Description: Example: object.Count Long This property returns the number of test points in the signal. Dim otm As Object Dim annu As Object Set otm = Document.InsertObject("OMAnnuCheck.Document") Set annu = otm.Specific Dim testpoints As Object Dim testpoint As Object i = 0 Set testpoints = annu.Document.Signals(1).TestPoints For Each testpoint in testpoints i = i+1 Next If i = testpoints.Count then MsgBox "Counted correctly" End If

39

OMICRON Test Universe

Item (default property) Syntax: object.Item(Index) (optional) Variant Index - Index number of the testpoint Object (TestPoint) This method returns a TestPoint Object from the TestPoints Collection at the specified Index (must be between 1 and TestPoints.Count). Note that there will always be at least one testpoint in the testpoints collection. Dim otm As Object Dim annu As Object Set otm = Document.InsertObject("OMAnnuCheck.Document") Set annu = otm.Specific 'Add 2 testpoints Dim testpoints As Object set testpoints = annu.Document.Signals(1).TestPoints Dim testpoint As Object Set testpoint = testpoints(1)

Return type: Description:

Example:

40

AnnuCheck Automation Interface

TestPoint Object
Properties
Used Syntax: Return type: Description: Example: object.Used boolean This property allows you to enable or disable the testpoint. Dim otm As Object Dim annu As Object Set otm = Document.InsertObject("OMAnnuCheck.Document") Set annu = otm.Specific Dim testpoint As Object Set testpoint = annu.Document.Signals(1).TestPoints(1) If testpoint.Used Then MsgBox "Test point enabled" End If ' disable testpoint testpoint.Used = False

41

OMICRON Test Universe

Expected Syntax: Return type: Description: object.Expected String This property allows you to set or read the Expected result of the testpoint. Dim otm As Object Dim annu As Object Set otm = Document.InsertObject("OMAnnuCheck.Document") Set annu = otm.Specific Dim testpoint As Object Set testpoint = annu.Document.Signals(1).TestPoints(1) testpoint.Expected = "On" MsgBox testpoint.Expected

Example:

42

AnnuCheck Automation Interface

Measured Syntax: Return type: Description: object.Measured String This property allows you to set or read the Measured result of the testpoint. Dim otm As Object Dim annu As Object Set otm = Document.InsertObject("OMAnnuCheck.Document") Set annu = otm.Specific Dim testpoint As Object Set testpoint = annu.Document.Signals(1).TestPoints(1) testpoint.Measured = "On" MsgBox testpoint.Measured

Example:

43

OMICRON Test Universe

Assessment Syntax: Return type: Description: object.Assessment long This property allows you to set or read the Assessment of the testpoint. 0 = not tested 1 = passed 2 = failed There are constants defined in the Constants object for convenience: cTestPointNotTested, cTestPointPassed, cTestPointFailed Dim otm As Object Dim annu As Object Set otm = Document.InsertObject("OMAnnuCheck.Document") Set annu = otm.Specific Dim testpoint As Object Set testpoint = annu.Document.Signals(1).TestPoints(1) testpoint.Assessment = cTestPointFailed MsgBox testpoint.Assessment

Example:

44

AnnuCheck Automation Interface

Constants Object
Properties
The following is a list of all signal IDs supported by the OMICRON Annunciation Checker. Analog Outputs sigidUL1N sigidUL2N sigidUL3N sigidUSER_U1_1 sigidUSER_U1_2 sigidUSER_U1_3 sigidUSER_U2_1 sigidUSER_U2_2 sigidUSER_U2_3 sigidUSER_U3_1 sigidUSER_U3_2 sigidUSER_U3_3 sigidUSER_U4_1 sigidUSER_U4_2 sigidUSER_U4_3 sigidIL1 sigidIL2 sigidIL3 sigidI_N sigidI_0 sigidI_1 sigidI_2 sigidI_PRIM_L1 sigidI_PRIM_L2

45

OMICRON Test Universe

sigidI_PRIM_L3 sigidI_ZERO_PRIM sigidI_SEC_L1 sigidI_SEC_L2 sigidI_SEC_L3 sigidI_ZERO_SEC sigidI_TERT_L1 sigidI_TERT_L2 sigidI_TERT_L3 sigidI_ZERO_TERT sigidUSER_I1_1 sigidUSER_I1_2 sigidUSER_I1_3 sigidUSER_I2_1 sigidUSER_I2_2 sigidUSER_I2_3 sigidUSER_I3_1 sigidUSER_I3_2 sigidUSER_I3_3 sigidUSER_I4_1 sigidUSER_I4_2 sigidUSER_I4_3 Binary Inputs sigidTRIP sigidSTART Binary Outputs sigidAUX_CONT sigidAUX_CONT_L1 sigidAUX_CONT_L2 sigidAUX_CONT_L3

46

AnnuCheck Automation Interface

sigidUSER_OUTBIN_DEF1 sigidUSER_OUTBIN_DEF2 sigidUSER_OUTBIN_DEF3 sigidUSER_OUTBIN_DEF4 sigidUSER_OUTBIN_DEF5 sigidUSER_OUTBIN_DEF6 sigidUSER_OUTBIN_DEF7 sigidUSER_OUTBIN_DEF8 Miscellanous cTestPointPassed cTestPointFailed cTestPointNotTested cSignalTypeShot cSignalTypeSteadyState cSignalTypeNoOutput

47

OMICRON Test Universe

48

Das könnte Ihnen auch gefallen