Sequencer Automation Interface
Sequencer Automation Interface
Automation Interface
OMICRON Test Universe
2
Contents
Contents
Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Object Hierarchy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .9
Reference . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10
Application Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .10
Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Application (read only) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Constants (read only) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
Document (read only) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Name (read only) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Parent (read only). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
Visible . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Methods. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Quit. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
Document Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .13
Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Application (read only) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Measurements (read only) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
Parent (read only). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
States (read only) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
Comment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
States Collection Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .16
Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Application (read only) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
Count (read only) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
Parent (read only). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Methods. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Add . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
Item (default property) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
Remove . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
State Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .21
Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
3
CPC 100
4
Contents
5
CPC 100
6
Contents
SetStopState . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
Constants Object . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .79
Properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
Analog Outputs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
Binary Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 80
Binary Outputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81
7
CPC 100
8
State Sequencer Automation
Interface
Object Hierarchy
*) = obsolete objects. Use Binary Inputs Collection and Binary Inputs instead.
9
OMICRON Test Universe
Reference
Application Object
Properties
Application (read only)
The application object is the root of the OMICRON State Sequencer 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 State Sequencer. If you want to
create another Application object with CreateObject, a new instance of the
OMICRON State Sequencer 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 seq As Object
Set otm = Document.InsertObject(“OMSeq.Document”)
Set seq = otm.Specific
Dim constants As Object
Set constants = seq.Constants
10
Document (read only)
Syntax: object.Document
Type: Object (Document)
Description: This property returns a Document Object (Document).
Example: Dim otm As Object
Dim seq As Object
Set otm = Document.InsertObject(“OMSeq.Document”)
Set seq = otm.Specific
Dim doc As Object
Set doc = seq.Document
Syntax: object.Name
Type: String
Description: Returns the name of the application.
Example: Dim otm As Object
Dim seq As Object
Set otm = Document.InsertObject(“OMSeq.Document”)
Set seq = otm.Specific
Dim Str As String
Set Str = seq.Name
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 seq As Object
Set otm = Document.InsertObject(“OMSeq.Document”)
Set seq = otm.Specific
Dim obj As Object
Set obj = seq.Parent
11
OMICRON Test Universe
Visible
Syntax: object.Visible
Type: Boolean
Description: Shows/hides the main application window.
Example: Dim otm As Object
Dim seq As Object
Set otm = Document.InsertObject(“OMSeq.Document”)
Set seq = otm.Specific
'Is the application visible ?
If seq.Visible then
MsgBox "Application is visible"
Else
'Make the application visible
seq.Visible = TRUE
End If
Methods
Quit
Syntax: object.Quit
Return type: None
Description: This command quits the OMICRON State Sequencer application
and closes all open windows and the document.
Example: Dim otm As Object
Dim seq As Object
Set otm = Document.InsertObject(“OMSeq.Document”)
Set seq = otm.Specific
seq.Quit
12
Document Object
With the Document Object (Document) you can control the document.
From this object you can get references to the States Collection Object (States)
(definition of test states) and the Measurements Collection Object
(Measurements) (definition of measurement conditions and results).
Properties
Application (read only)
Syntax: object.Application
Type: Object (Application)
Description: Returns the Application Object (Application).
Example: Dim otm As Object
Dim seq As Object
Set otm = Document.InsertObject(“OMSeq.Document”)
Set seq = otm.Specific
Dim app As Application
Set app = seq.Document.Application
Syntax: object.Measurements
Type: Object (Measurements)
Description: This property returns the Measurements Collection Object
(Measurements) of the document. With this object you can
manipulate all the measurement conditions in your document and
query the results.
Example: Dim otm As Object
Dim seq As Object
Set otm = Document.InsertObject(“OMSeq.Document”)
Set seq = otm.Specific
Dim measurements As Object
Set measurements = seq.Document.Measurements
13
OMICRON Test Universe
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 seq As Object
Set otm = Document.InsertObject(“OMSeq.Document”)
Set seq = otm.Specific
Dim obj As Object
Set obj = seq.Document.Parent
Syntax: object.States
Type: Object (States)
Description: This property returns the States Collection Object (States) of the
document. With this object you can manipulate all the states in
your document.
Example: Dim otm As Object
Dim seq As Object
Set otm = Document.InsertObject(“OMSeq.Document”)
Set seq = otm.Specific
Dim states As Object
Set states = seq.Document.States
14
Comment
Syntax: object.Comment
Type: String
Description: This property represents the comment of the document (see Edit /
Comment menu command).
Example: 'Change document comment
Dim otm As Object
Dim seq As Object
Set otm = Document.InsertObject(“OMSeq.Document”)
Set seq = otm.Specific
seq.Document.Comment = “This is my new comment.”
& vbCrLf & “Line2”
MsgBox seq.Document.Comment
15
OMICRON Test Universe
Syntax: object.Application
Type: Object (Application)
Description: Returns the Application Object (Application).
Example: Dim otm As Object
Dim seq As Object
Set otm = Document.InsertObject(“OMSeq.Document”)
Set seq = otm.Specific
Dim app As Application
Set app = seq.Document.States.Application
16
Count (read only)
Syntax: object.Count
Type: Long
Description: This property returns the number of states in the document.
Note: By default one state is always present.
Example: Dim otm As Object
Dim seq As Object
Set otm = Document.InsertObject(“OMSeq.Document”)
Set seq = otm.Specific
'Count twice
Dim s As Object
Dim ss As Object
i = 0
Set ss = seq.Document.States
For Each s in ss
i = i+1
Next
If i = ss.Count then
MsgBox "We've counted twice"
End If
17
OMICRON Test Universe
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 seq As Object
Set otm = Document.InsertObject(“OMSeq.Document”)
Set seq = otm.Specific
Dim obj As Object
Set obj = seq.Document.States.Parent
Methods
Add
Syntax: object.Add(Name)
(optional) Variant Name – Name of the new state
Return type: Object (State)
Description: This method adds a new state to the document. You can assign a
name. The State Object (State) of the new state is returned.
Note: By default one state is always present.
Example: Dim otm As Object
Dim seq As Object
Set otm = Document.InsertObject(“OMSeq.Document”)
Set seq = otm.Specific
'Add state
Dim states As Object
set states = seq.Document.States
states.Add(“A new state”)
18
Item (default property)
Syntax: object.Item(Index)
(optional) Variant Index – Index number of the state
Return type: Object (State/States)
Description: This method returns a State Object (State) from the States
Collection. The index is either the number of the state in the
document (between 1 and States.Count) or the name of the state.
If no index is given, the States Collection Object (States) is
returned.
Example: Dim otm As Object
Dim seq As Object
Set otm = Document.InsertObject(“OMSeq.Document”)
Set seq = otm.Specific
'Add 2 states
Dim states As Object
set states = seq.Document.States
states.Add
states.Add(“Named state”)
'Assign State 1
Dim state1 As Object
Set state1 = states.Item(1)
MsgBox state1.Name
'Assign State 2, use default property
Dim state2 As Object
Set state2 = states(“Named state”)
MsgBox state2.Name
19
OMICRON Test Universe
Remove
Syntax: object.Remove(Index)
Variant Index – Index of the state to remove
Return type: None
Description: This method removes the state specified by the index from the
document.
Note: By default one state is always present. So when the last
state is removed a new one is automatically created.
Example: Dim otm As Object
Dim seq As Object
Set otm = Document.InsertObject(“OMSeq.Document”)
Set seq = otm.Specific
'Add state
Dim states As Object
set states = seq.Document.States
states.Add(“State to remove”)
‘And now remove it
states.Remove(2)
20
State Object
Properties
AnalogOutputs (read only)
Syntax: object.AnalogOutputs
Type: Object (AnalogOutputs)
Description: This property returns the Analog Outputs Collection Object
(AnalogOutputs) of a given State Object (State). With this object
you can manipulate all the analog outputs settings of the state.
Example: Dim otm As Object
Dim seq As Object
Set otm = Document.InsertObject(“OMSeq.Document”)
Set seq = otm.Specific
Dim anaouts As Object
Set anaouts =
seq.Document.States(1).AnalogOutputs
21
OMICRON Test Universe
Syntax: object.Assessment
Type: Boolean
Description: This property provides assessment information for the binary input
level conditions of this state. It is False when at least one of the
conditions has failed and True otherwise. It returns True also when
the assessment cannot be done (e.g. when the test has not been
performed yet).
Example: 'Add a binary input level condition, test and
check results
Dim otm As Object
Dim seq As Object
Set otm = Document.InsertObject("OMSeq.Document")
Set seq = otm.Specific
seq.Visible = True
'Add binary input level condition
Dim State As Object
Set State = seq.Document.States(1)
Dim bininps As Object
Set bininps = State.BinaryInputs
Dim bininp As Object
Set bininp = bininps.ItemIndex(1)
Set bininp.LevelCondition = 1
'Test
otm.Test
'Now check the results
Dim Text As String
If State.Assessment Then
Text = "passed"
Else
Text = "failed"
End If
MsgBox "The measurement was assessed to " & Text
22
BinaryInputs (read only)
Syntax: object.BinaryInputs
Type: Object (BinaryInputs)
Description: This property returns the Binary Inputs Collection Object
(BinaryInputs) of a given State Object (State). With this object you
can manipulate the binary inputs settings of the state.
Example: Dim otm As Object
Dim seq As Object
Set otm = Document.InsertObject(“OMSeq.Document”)
Set seq = otm.Specific
Dim bininps As Object
Set bininps = seq.Document.States(1).BinaryInputs
Syntax: object.BinaryOutputs
Type: Object (BinaryOutputs)
Description: This property returns the Binary Outputs Collection Object
(BinaryOutputs) of a given State Object (State). With this object
you can manipulate the binary outputs settings of the state.
Example: Dim otm As Object
Dim seq As Object
Set otm = Document.InsertObject(“OMSeq.Document”)
Set seq = otm.Specific
Dim binouts As Object
Set binouts =
seq.Document.States(1).BinaryOutputs
23
OMICRON Test Universe
ForceAbsPhase
Syntax: object.ForceAbsPhase
Type: Boolean
Description: You can use this property to force the absolute phase mode for this
state.
By default (i.e. when creating a new state by using the Add method
of the States Collection object) this property is False.
Example: 'We need forced absolute phase mode
Dim otm As Object
Dim seq As Object
Set otm = Document.InsertObject(“OMSeq.Document”)
Set seq = otm.Specific
Dim state As Object
Set state = seq.Document.States(1)
state.ForceAbsPhase = True
Name
Syntax: object.Name
Type: String
Description: This property represents the name of the state.
Example: 'Change state name and display it
Dim otm As Object
Dim seq As Object
Set otm = Document.InsertObject(“OMSeq.Document”)
Set seq = otm.Specific
Dim state As Object
Set state = seq.Document.States(1)
state.Name = “We’ve changed it”
MsgBox state.Name
24
SameFreq
Syntax: object.SameFreq
Type: Boolean
Description: This property specifies wether all analog outputs of this state have
the same frequency or not.
By default (i.e. when creating a new state by using the Add method
of the States Collection object) this property is True. If you want
different frequencies for individual analog outputs you have to set
this property to False.
Example: 'Let’s have different frequencies
Dim otm As Object
Dim seq As Object
Set otm = Document.InsertObject(“OMSeq.Document”)
Set seq = otm.Specific
Dim state As Object
Set state = seq.Document.States(1)
state.SameFreq = False
'Let’s play with the frequencies
Dim anaout As Object
Dim freq As Double
freq = 47.0
For Each anaout In state.AnalogOutputs
anaout.Frequency = freq
freq = freq + 1.0
Next anaout
25
OMICRON Test Universe
Tolerance
Syntax: object.Tolerance
Type: Double
Description: This property specifies the time tolerance in seconds of the binary
input level conditions of this state.
Example: 'Let’s set the time tolerance to 20 ms
Dim otm As Object
Dim seq As Object
Set otm = Document.InsertObject(“OMSeq.Document”)
Set seq = otm.Specific
Dim state As Object
Set state = seq.Document.States(1)
state.Tolerance = 0.02
TriggerDelayTime
Syntax: object.TriggerDelayTime
Type: Double
Description: This property specifies the delay time in seconds after the trigger
condition is fulfilled.
By default (i.e. when creating a new state by using the Add method
of the States Collection object) this time is 0.0.
Example: 'Let’s make a break after the trigger
Dim otm As Object
Dim seq As Object
Set otm = Document.InsertObject(“OMSeq.Document”)
Set seq = otm.Specific
Dim state As Object
Set state = seq.Document.States(1)
state.TriggerDelayTime = 2.0
26
TriggerExtern
Syntax: object.TriggerExtern
Type: Boolean
Description: This property specifies wether the external trigger input of the
CMC test set should be used for triggering. If you want use
OMICRON CMGPS for triggering, this property has to be set to
True.
By default (i.e. when creating a new state by using the Add method
of the States Collection object) this property is False.
Setting this property to True disables the other trigger options
(TriggerManual, TriggerUseBinInp, TriggerUseMaxTime).
Example: 'Trigger on GPS signal
Dim otm As Object
Dim seq As Object
Set otm = Document.InsertObject(“OMSeq.Document”)
Set seq = otm.Specific
Dim state As Object
Set state = seq.Document.States(1)
state.TriggerExtern = True
27
OMICRON Test Universe
TriggerInstructionText
Syntax: object.TriggerInstructionText
Type: String
Description: This property specifies the text that is displayed when the
sequence is waiting for a ‘Key Pressed’ trigger.
The usage of this property only makes sense when TriggerManual
is set to True.
Example: 'Trigger on GPS signal
Dim otm As Object
Dim seq As Object
Set otm = Document.InsertObject(“OMSeq.Document”)
Set seq = otm.Specific
Dim state As Object
Set state = seq.Document.States(1)
state.TriggerManual = True
state.TriggerInstructionTitle = “Change Wiring”
state.TriggerInstructionText = “Please connect
the relay!”
TriggerInstructionTitle
Syntax: object.TriggerInstructionTitle
Type: String
Description: This property specifies the title that is displayed when the
sequence is waiting for a ‘Key Pressed’ trigger.
The usage of this property only makes sense when TriggerManual
is set to True.
Example: see TriggerInstructionText
28
TriggerLogic
Syntax: object.TriggerLogic
Type: Long
Description: This property specifies the trigger logic for binary input trigger
conditions. The logic can be either AND or OR. This means that
either all binary inputs have to match the specified condition to fulfil
the trigger (AND) or that only one of the binary inputs has to match
the specified condition (OR).
A value of 0 represents AND logic, a value of 1 represents OR
logic.
By default (i.e. when creating a new state by using the Add method
of the States Collection object) this property has a value of 1, i.e.
the logic is set to OR.
Example: 'Set trigger logic to AND
Dim otm As Object
Dim seq As Object
Set otm = Document.InsertObject(“OMSeq.Document”)
Set seq = otm.Specific
Dim state As Object
Set state = seq.Document.States(1)
state.TriggerLogic = 0
29
OMICRON Test Universe
TriggerManual
Syntax: object.TriggerManual
Type: Boolean
Description: This property specifies wether triggering should be done manually
by the user (by pressing a key).
By default (i.e. when creating a new state by using the Add method
of the States Collection object) this property is False.
Setting this property to True disables the other trigger options
(TriggerExtern, TriggerUseBinInp, TriggerUseMaxTime).
Example: 'Trigger manually
Dim otm As Object
Dim seq As Object
Set otm = Document.InsertObject(“OMSeq.Document”)
Set seq = otm.Specific
Dim state As Object
Set state = seq.Document.States(1)
state.TriggerManual = True
30
TriggerMaxTime
Syntax: object.TriggerMaxTime
Type: Double
Description: This property specifies the timeout for the trigger condition. It only
has an effect when the timeout for the trigger condition is enabled
(TriggerUseMaxTime).
By default (i.e. when creating a new state by using the Add method
of the States Collection object) this time is 1.0s.
Example: 'Use timeout for trigger condition
Dim otm As Object
Dim seq As Object
Set otm = Document.InsertObject(“OMSeq.Document”)
Set seq = otm.Specific
Dim state As Object
Set state = seq.Document.States(1)
state.TriggerUseMaxTime = True
'Set timeout of 1.5s
state.TriggerMaxTime = 1.5
TriggerName
Syntax: object.TriggerName
Type: String
Description: This property represents the name of the trigger.
Example: 'Change trigger name and display it
Dim otm As Object
Dim seq As Object
Set otm = Document.InsertObject(“OMSeq.Document”)
Set seq = otm.Specific
Dim state As Object
Set state = seq.Document.States(1)
state.TriggerName = “This trigger has a name”
MsgBox state.TriggerName
31
OMICRON Test Universe
Syntax: object.Triggers
Type: Object (Triggers)
Description: This property returns the Trigger Signals Collection Object
(Triggers) of a given State Object (State). With this object you can
manipulate the trigger settings of the state.
Example: Dim otm As Object
Dim seq As Object
Set otm = Document.InsertObject(“OMSeq.Document”)
Set seq = otm.Specific
Dim triggers As Object
Set triggers = seq.Document.States(1).Triggers
TriggerUseBinInp
Syntax: object.TriggerUseBinInp
Type: Boolean
Description: This property specifies wether the binary inputs should be used for
triggering.
By default (i.e. when creating a new state by using the Add method
of the States Collection object) this property is False.
Setting this property to True disables the the trigger options for
external and manual triggering (TriggerExtern, TriggerManual).
Example: 'Use binary inputs trigger condition
Dim otm As Object
Dim seq As Object
Set otm = Document.InsertObject(“OMSeq.Document”)
Set seq = otm.Specific
Dim state As Object
Set state = seq.Document.States(1)
state.TriggerUseBinInp = True
'Trigger on Trip L1
state.Triggers(seq.Constants.sigidTRIP_L1).Value
= 1
32
TriggerUseMaxTime
Syntax: object.TriggerUseMaxTime
Type: Boolean
Description: This property specifies whether to use a timeout for the trigger
condition.
By default (i.e. when creating a new state by using the Add method
of the States Collection object) this property is True.
Setting this property to True disables the the trigger options for
external and manual triggering (TriggerExtern, TriggerManual).
Example: 'Use timeout for trigger condition
Dim otm As Object
Dim seq As Object
Set otm = Document.InsertObject(“OMSeq.Document”)
Set seq = otm.Specific
Dim state As Object
Set state = seq.Document.States(1)
state.TriggerUseMaxTime = True
'Set timeout of 1.5s
state.TriggerMaxTime = 1.5
33
OMICRON Test Universe
Syntax: object.Application
Type: Object (Application)
Description: Returns the Application Object (Application).
Example: Dim otm As Object
Dim seq As Object
Set otm = Document.InsertObject(“OMSeq.Document”)
Set seq = otm.Specific
Dim app As Application
Set app =
seq.Document.States(1).AnalogOutputs.Application
Syntax: object.Count
Type: Long
Description: This property returns the number of analog outputs in the state.
Example: Dim otm As Object
Dim seq As Object
Set otm = Document.InsertObject(“OMSeq.Document”)
Set seq = otm.Specific
MsgBox "Number of analog outputs in state 1: " &
seq.Document.States(1).AnalogOutputs.Count
34
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 States Collection Object (States).
Example: Dim otm As Object
Dim seq As Object
Set otm = Document.InsertObject(“OMSeq.Document”)
Set seq = otm.Specific
Dim obj As Object
Set obj =
seq.Document.States(1).AnalogOutputs.Parent
Methods
Item (default property)
Syntax: object.Item(SignalID)
Long SignalID – Signal ID of the analog output
Return type: Object (AnalogOutput)
Description: This method returns an Analog Output Object (AnalogOutput) from
the Analog Outputs Collection. The parameter is the signal ID of
the analog output in the collection. Signal IDs are constants from
the Constants object.
Example: Dim otm As Object
Dim seq As Object
Set otm = Document.InsertObject(“OMSeq.Document”)
Set seq = otm.Specific
'Set amplitude of I L1 to 2A
Dim state As Object
Set state = seq.Document.States(1)
state.AnalogOutputs(seq.Constants.sigidIL1).Ampl
itude = 2.0
35
OMICRON Test Universe
ItemIndex
Syntax: object.ItemIndex(Index)
Variant Index – Index number of the analog output
Return type: Object (AnalogOutput)
Description: This method returns an Analog Output Object (AnalogOutput) from
the Analog Outputs Collection. The index is the number of the
analog output in the collection (between 1 and
AnalogOutputs.Count).
Example: Dim otm As Object
Dim seq As Object
Set otm = Document.InsertObject(“OMSeq.Document”)
Set seq = otm.Specific
'Set amplitude of first three analog outputs to 0
Dim state As Object
Set state = seq.Document.States(1)
For i = 1 To 3
state.AnalogOutputs.ItemIndex(i).Amplitude = 0.0
Next i
36
AnalogOutput Object
Properties
Amplitude
Syntax: object.Amplitude
Type: Double
Description: This property specifies the amplitude of the analog output.
Example: Dim otm As Object
Dim seq As Object
Set otm = Document.InsertObject(“OMSeq.Document”)
Set seq = otm.Specific
'Set amplitude of I L1 to 2A
Dim state As Object
Set state = seq.Document.States(1)
state.AnalogOutputs(seq.Constants.sigidIL1).Ampl
itude = 2.0
Frequency
Syntax: object.Frequency
Type: Double
Description: This property specifies the frequency of the analog output.
Example: Dim otm As Object
Dim seq As Object
Set otm = Document.InsertObject(“OMSeq.Document”)
Set seq = otm.Specific
'Set frequency of I L1 to 60Hz
Dim state As Object
Set state = seq.Document.States(1)
state.AnalogOutputs(seq.Constants.sigidIL1).Freq
uency = 60.0
37
OMICRON Test Universe
Phase
Syntax: object.Phase
Type: Double
Description: This property specifies the phase of the analog output.
Example: Dim otm As Object
Dim seq As Object
Set otm = Document.InsertObject(“OMSeq.Document”)
Set seq = otm.Specific
'Set phase of I L1 to 37.4°
Dim state As Object
Set state = seq.Document.States(1)
state.AnalogOutputs(seq.Constants.sigidIL1).Phas
e = 37.4
38
BinaryOutputs Collection Object
Properties
Application (read only)
Syntax: object.Application
Type: Object (Application)
Description: Returns the Application Object (Application).
Example: Dim otm As Object
Dim seq As Object
Set otm = Document.InsertObject(“OMSeq.Document”)
Set seq = otm.Specific
Dim app As Application
Set app =
seq.Document.States(1).BinaryOutputs.Application
Syntax: object.Count
Type: Long
Description: This property returns the number of binary outputs in the state.
Example: Dim otm As Object
Dim seq As Object
Set otm = Document.InsertObject(“OMSeq.Document”)
Set seq = otm.Specific
MsgBox "Number of binary outputs in state 1: " &
seq.Document.States(1).BinaryOutputs.Count
39
OMICRON Test Universe
Syntax: object.Parent
Type: Object
Description: This property always returns the parent object in the object
hierarchy. In this case it is the States Collection Object (States).
Example: Dim otm As Object
Dim seq As Object
Set otm = Document.InsertObject(“OMSeq.Document”)
Set seq = otm.Specific
Dim obj As Object
Set obj =
seq.Document.States(1).BinaryOutputs.Parent
Methods
Item (default property)
Syntax: object.Item(SignalID)
Long SignalID – Signal ID of the binary output
Return type: Object (BinaryOutput)
Description: This method returns a Binary Output Object (BinaryOutput) 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.
Example: Dim otm As Object
Dim seq As Object
Set otm = Document.InsertObject(“OMSeq.Document”)
Set seq = otm.Specific
'Set binary output for circuit breaker
Dim state As Object
Set state = seq.Document.States(1)
state.BinaryOutputs(seq.Constants.sigidAUX_CONT)
.Value = 1
40
ItemIndex
Syntax: object.ItemIndex(Index)
Variant Index – Index number of the binary output
Return type: Object (BinaryOutput)
Description: This method returns a Binary Output Object (BinaryOutput) from
the Binary Outputs Collection. The index is the number of the
binary output in the collection (between 1 and
BinaryOutputs.Count).
Example: Dim otm As Object
Dim seq As Object
Set otm = Document.InsertObject(“OMSeq.Document”)
Set seq = otm.Specific
'Set all binary outputs
Dim state As Object
Set state = seq.Document.States(1)
For i = 1 To state.BinaryOutputs.Count
state.BinaryOutputs.ItemIndex(i).Value = 1
Next i
41
OMICRON Test Universe
BinaryOutput Object
Properties
Value (default property)
Syntax: object.Value
Type: Boolean
Description: This property specifies wether the binary output is set (active) or
not (inactive).
Example: Dim otm As Object
Dim seq As Object
Set otm = Document.InsertObject(“OMSeq.Document”)
Set seq = otm.Specific
'Set binary output for circuit breaker
Dim state As Object
Set state = seq.Document.States(1)
state.BinaryOutputs(seq.Constants.sigidAUX_CONT)
.Value = 1
42
BinaryInputs Collection Object
Properties
Application (read only)
Syntax: object.Application
Type: Object (Application)
Description: Returns the Application Object (Application).
Example: Dim otm As Object
Dim seq As Object
Set otm = Document.InsertObject(“OMSeq.Document”)
Set seq = otm.Specific
Dim app As Application
Set app =
seq.Document.States(1).BinaryInputs.Application
Syntax: object.Count
Type: Long
Description: This property returns the number of binary inputs in the state.
Example: Dim otm As Object
Dim seq As Object
Set otm = Document.InsertObject(“OMSeq.Document”)
Set seq = otm.Specific
MsgBox "Number of binary inputs in state 1: " &
seq.Document.States(1).BinaryInputs.Count
43
OMICRON Test Universe
Syntax: object.Parent
Type: Object
Description: This property always returns the parent object in the object
hierarchy. In this case it is the States Collection Object (States).
Example: Dim otm As Object
Dim seq As Object
Set otm = Document.InsertObject(“OMSeq.Document”)
Set seq = otm.Specific
Dim obj As Object
Set obj =
seq.Document.States(1).BinaryInputs.Parent
Methods
Item (default property)
Syntax: object.Item(SignalID)
Long SignalID – Signal ID of the binary input
Return type: Object (BinaryInput)
Description: This method returns a Binary Input Object (BinaryInput) from the
Binary Inputs Collection. The parameter is the signal ID of the
binary input in the collection. Signal IDs are constants from the
Constants object.
Example: Dim otm As Object
Dim seq As Object
Set otm = Document.InsertObject(“OMSeq.Document”)
Set seq = otm.Specific
'Set binary input for trigger on trip signal
Dim state As Object
Set state = seq.Document.States(1)
state.BinaryInputs(seq.Constants.sigidTRIP).Trig
ger = 1
44
ItemIndex
Syntax: object.ItemIndex(Index)
Variant Index – Index number of the binary input
Return type: Object (BinaryInput)
Description: This method returns a Binary Input Object (BinaryInput) from the
Binary Inputs Collection. The index is the number of the binary
input in the collection (between 1 and BinaryInputs.Count).
Example: Dim otm As Object
Dim seq As Object
Set otm = Document.InsertObject(“OMSeq.Document”)
Set seq = otm.Specific
'Set the level condition of all binary inputs
Dim state As Object
Set state = seq.Document.States(1)
For i = 1 To state.BinaryInputs.Count
state.BinaryInputs.ItemIndex(i).LevelCondition =
1
Next I
45
OMICRON Test Universe
BinaryInput Object
Properties
Assessment (read only)
Syntax: object.Assessment
Type: Boolean
Description: This property provides assessment information for the binary input
level conditions of this state. It is False when at least one of the
conditions has failed and True otherwise. It returns True also when
the assessment cannot be done (e.g. when the test has not been
performed yet).
Example: 'Add a binary input level condition, test and
check results
Dim otm As Object
Dim seq As Object
Set otm = Document.InsertObject("OMSeq.Document")
Set seq = otm.Specific
seq.Visible = True
'Add binary input level condition
Dim State As Object
Set State = seq.Document.States(1)
Dim bininps As Object
Set bininps = State.BinaryInputs
Dim bininp As Object
Set bininp = bininps.ItemIndex(1)
Set bininp.LevelCondition = 1
'Test
otm.Test
'Now check the results
Dim Text As String
If bininp.Assessment Then
Text = "passed"
Else
Text = "failed"
End If
MsgBox "The binary input level was assessed to "
& Text
46
LevelCondtion
Syntax: object.LevelCondition
Type: Long
Description: This property specifies wether the level condition for the binary
input is “Negative” (0), “Positive” (1) or “Don’t care” (2).
“Negative” means that the condition is fulfilled when the binary
input is inactive, “Positive” means that the condition is fulfilled
when the binary input is active and “Don’t care” means that the
binary input does not participate in building the level condition, i.e.
is is irrelevant what state the binary input has.
Example: See example for property Assessment above.
Trigger
Syntax: object.Value
Type: Long
Description: This property specifies wether the trigger condition for the binary
input is “Negative” (0), “Positive” (1) or “Don’t care” (2).
“Negative” means that the trigger condition is fulfilled when the
binary input is inactive, “Positive” means that the trigger condition
is fulfilled when the binary input is active and “Don’t care” means
that the binary input does not participate in building the trigger
condition, i.e. is is irrelevant what state the binary input has.
Example: Dim otm As Object
Dim seq As Object
Set otm = Document.InsertObject("OMSeq.Document")
Set seq = otm.Specific
'Set all trigger conditions to 'Don't care'
Dim State As Object
Set State = seq.Document.States(1)
For i = 1 To State.BinaryInputs.Count
State.BinaryInputs.ItemIndex(i).Trigger = 2
Next I
'And now set trigger condition for Trip to
"Positive"
State.BinaryInputs(seq.Constants.sigidTRIP).Trig
ger = 1
47
OMICRON Test Universe
Properties
Application (read only)
Syntax: object.Application
Type: Object (Application)
Description: Returns the Application Object (Application).
Example: Dim otm As Object
Dim seq As Object
Set otm = Document.InsertObject(“OMSeq.Document”)
Set seq = otm.Specific
Dim app As Application
Set app =
seq.Document.States(1).Triggers.Application
Syntax: object.Count
Type: Long
Description: This property returns the number of binary input trigger conditions
in the Trigger Signals Collection of the state.
Example: Dim otm As Object
Dim seq As Object
Set otm = Document.InsertObject(“OMSeq.Document”)
Set seq = otm.Specific
MsgBox "Number of trigger signals in state 1: " &
seq.Document.States(1).Triggers.Count
48
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 States Collection Object (States).
Example: Dim otm As Object
Dim seq As Object
Set otm = Document.InsertObject(“OMSeq.Document”)
Set seq = otm.Specific
Dim obj As Object
Set obj = seq.Document.States(1).Triggers.Parent
Methods
Item (default property)
Syntax: object.Item(SignalID)
Long SignalID – Signal ID of the binary input
Return type: Object (Trigger)
Description: This method returns a Trigger Object (Trigger) from the Trigger
Signals Collection. The parameter is the signal ID of the binary
input in the collection. Signal IDs are constants from the Constants
object.
Example: Dim otm As Object
Dim seq As Object
Set otm = Document.InsertObject(“OMSeq.Document”)
Set seq = otm.Specific
'Set trigger condition for Start to “Positive”
Dim state As Object
Set state = seq.Document.States(1)
state.Triggers(seq.Constants.sigidSTART).Value =
1
49
OMICRON Test Universe
ItemIndex
Syntax: object.ItemIndex(Index)
Variant Index – Index number of the binary input trigger condition
Return type: Object (Trigger)
Description: This method returns a Trigger Object (Trigger) from the Trigger
Signals Collection. The index is the number of the trigger condition
in the collection (between 1 and Triggers.Count).
Example: Dim otm As Object
Dim seq As Object
Set otm = Document.InsertObject(“OMSeq.Document”)
Set seq = otm.Specific
'Set all trigger conditions to ‘Don’t care’
Dim state As Object
Set state = seq.Document.States(1)
For i = 1 To state.Triggers.Count
state.Triggers.ItemIndex(i).Value = 2
Next i
50
Trigger Object
This object is obsolete and supported for backwards compatibility only. Use
Binary Inputs Collection instead.
Properties
Value (default property)
Syntax: object.Value
Type: Long
Description: This property specifies wether the trigger condition for the binary
input is “Negative” (0), “Positive” (1) or “Don’t care” (2).
“Negative” means that the trigger condition is fulfilled when the
binary input is inactive, “Positive” means that the trigger condition
is fulfilled when the binary input is active and “Don’t care” means
that the binary input does not participate in building the trigger
condition, i.e. is is irrelevant what state the binary input has.
Example: Dim otm As Object
Dim seq As Object
Set otm = Document.InsertObject(“OMSeq.Document”)
Set seq = otm.Specific
'Set all trigger conditions to ‘Don’t care’
Dim state As Object
Set state = seq.Document.States(1)
For i = 1 To state.Triggers.Count
state.Triggers.ItemIndex(i).Value = 2
Next i
'And now set trigger condition for Start to
“Positive”
state.Triggers(seq.Constants.sigidSTART).Value =
1
51
OMICRON Test Universe
Syntax: object.Application
Type: Object (Application)
Description: Returns the Application Object (Application).
Example: Dim otm As Object
Dim seq As Object
Set otm = Document.InsertObject(“OMSeq.Document”)
Set seq = otm.Specific
Dim app As Application
Set app = seq.Document.Measurements.Application
52
Count (read only)
Syntax: object.Count
Type: Long
Description: This property returns the number of measurement conditions in
the document.
Note: By default one measurement condition is always present.
Example: Dim otm As Object
Dim seq As Object
Set otm = Document.InsertObject(“OMSeq.Document”)
Set seq = otm.Specific
'Count twice
Dim m As Object
Dim ms As Object
i = 0
Set ms = seq.Document.Measurements
For Each m in ms
i = i+1
Next
If i = ms.Count then
MsgBox "We've counted twice"
End If
53
OMICRON Test Universe
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 seq As Object
Set otm = Document.InsertObject(“OMSeq.Document”)
Set seq = otm.Specific
Dim obj As Object
Set obj = seq.Document.Measurements.Parent
Methods
Add
Syntax: object.Add(Name)
(optional) Variant Name – Name of the new measurement
condition
Return type: Object (Measurement)
Description: This method adds a new measurement condition to the document.
You can assign a name. The Measurement Object (Measurement)
of the new measurement condition is returned.
Note: By default one measurement condition is always present.
Example: Dim otm As Object
Dim seq As Object
Set otm = Document.InsertObject(“OMSeq.Document”)
Set seq = otm.Specific
'Add measurement condition
Dim measurements As Object
set measurements = seq.Document.Measurements
measurements.Add(“A new measurement condition”)
54
Item (default property)
Syntax: object.Item(Index)
(optional) Variant Index – Index number of the measurement
Return type: Object (Measurement/Measurements)
Description: This method returns a Measurement Object (Measurement) from
the Measurements Collection. The index is either the number of
the measurement in the document (between 1 and
Measurements.Count) or the name of the measurement condition.
If no index is given, the Measurement Collection Object
(Measurements) is returned.
Example: Dim otm As Object
Dim seq As Object
Set otm = Document.InsertObject(“OMSeq.Document”)
Set seq = otm.Specific
'Add a measurement condition
Dim measurements As Object
set measurements = seq.Document.Measurements
Measurements.Add(“Named condition”)
'Assign measurement condition, use default
property
Dim measurement As Object
Set measurement = measurements(“Named condition”)
MsgBox measurement.Name
55
OMICRON Test Universe
Remove
Syntax: object.Remove(Index)
Variant Index – Index of the measurement condition to remove
Return type: None
Description: This method removes the measurement condition specified by the
index from the document.
Note: By default one measurement condition is always present. So
when the last measurement condition is removed a new one is
automatically created.
Example: Dim otm As Object
Dim seq As Object
Set otm = Document.InsertObject(“OMSeq.Document”)
Set seq = otm.Specific
'Add measurement condition
Dim measurements As Object
set measurements = seq.Document.Measurements
measurements.Add(“Measurement to remove”)
‘And now remove it
measurements.Remove(2)
56
Measurement Object
Properties
Assessment (read only)
Syntax: object.Assessment
Type: Boolean
Description: This property provides assessment information for the
measurement. It is False when the condition has failed and True
otherwise. It returns True also when the assessment cannot be
done (e.g. when the test has not been performed yet).
Example: 'Add a measurement condition, test and check
results
Dim otm As Object
Dim seq As Object
Set otm = Document.InsertObject(“OMSeq.Document”)
Set seq = otm.Specific
'Add measurement condition
Dim measurements As Object
Dim measurement As Object
set measurements = seq.Document.Measurements
Set measurement = measurements.Add(“A new
measurement condition”)
'Test
otm.Test
'Now check the results
Dim text As String
If measurement.Assessment Then
text = “passed”
Else
text = “failed”
End If
MsgBox “The measurement was assessed to “ & text
57
OMICRON Test Universe
Name
Syntax: object.Name
Type: String
Description: This property represents the name of the measurement condition.
Example: 'Change measurement condition name and display it
Dim otm As Object
Dim seq As Object
Set otm = Document.InsertObject(“OMSeq.Document”)
Set seq = otm.Specific
Dim measurement As Object
Set measurement = seq.Document.Measurements(1)
measurement.Name = “We’ve changed it”
MsgBox measurement.Name
58
TAct (read only)
Syntax: object.TAct
Type: Double
Description: This property provides the actual time of the measurement after a
test has been performed. When the test has not been performed
yet it is invalid. This can be found out through the property
TActValid.
Example: 'Let’s check the actual time
Dim otm As Object
Dim seq As Object
Set otm = Document.InsertObject(“OMSeq.Document”)
Set seq = otm.Specific
'Add measurement condition
Dim measurements As Object
Dim measurement As Object
set measurements = seq.Document.Measurements
Set measurement = measurements.Add(“A new
measurement condition”)
'Test
otm.Test
'Now check the results
If measurement.TActValid Then
MsgBox “Actual time: “ & measurement.TAct
Else
MsgBox “The actual time is not available.“
End If
59
OMICRON Test Universe
Syntax: object.TActValid
Type: Boolean
Description: This property specifies wehther the actual time of the
measurement (TAct) is valid or not. The actual time is invalid when
the test has not been performed yet or when the time could not be
measured. The latter can happen because the specified condition
did not occur or because there was no condition specified at all.
Example: 'Let’s check the actual time
Dim otm As Object
Dim seq As Object
Set otm = Document.InsertObject(“OMSeq.Document”)
Set seq = otm.Specific
'Add measurement condition
Dim measurements As Object
Dim measurement As Object
set measurements = seq.Document.Measurements
Set measurement = measurements.Add(“A new
measurement condition”)
'Test
otm.Test
'Now check the results
If measurement.TActValid Then
MsgBox “Actual time: “ & measurement.TAct
Else
MsgBox “The actual time is not available.“
End If
60
TDev (read only)
Syntax: object.TDev
Type: Double
Description: This property provides the deviation of actual time from the
nominal time after a test has been performed. When the test has
not been performed yet it is invalid. This can be found out through
the property TDevValid.
Example: 'Let’s check the deviation
Dim otm As Object
Dim seq As Object
Set otm = Document.InsertObject(“OMSeq.Document”)
Set seq = otm.Specific
'Add measurement condition
Dim measurements As Object
Dim measurement As Object
set measurements = seq.Document.Measurements
Set measurement = measurements.Add(“A new
measurement condition”)
'Test
otm.Test
'Now check the results
If measurement.TDevValid Then
MsgBox “Deviation: “ & measurement.TDev
Else
MsgBox “The deviation is not available.“
End If
61
OMICRON Test Universe
TDevNeg
Syntax: object.TDevNeg
Type: Double
Description: This property specifies the maximum negative deviation of the
actual time (TAct) from the nominal time (TNom) in seconds. The
value itself has to be greater or equal to 0.
Example: 'Let’s set the nominal and the allowed deviations
Dim otm As Object
Dim seq As Object
Set otm = Document.InsertObject(“OMSeq.Document”)
Set seq = otm.Specific
'Add measurement condition
Dim measurements As Object
Dim measurement As Object
set measurements = seq.Document.Measurements
Set measurement = measurements.Add(“A new
measurement condition”)
‘Set the nominal time to 700ms
measurement.TNom = 0.7
‘Set the allowed negative deviation to 30ms
measurement.TDevNeg = 0.03
‘Set the allowed positive deviation to 50ms
measurement.TDevPos = 0.05
62
TDevPos
Syntax: object.TDevPos
Type: Double
Description: This property specifies the maximum positive deviation of the
actual time (TAct) from the nominal time (TNom) in seconds. The
value itself has to be greater or equal to 0.
Example: 'Let’s set the nominal and the allowed deviations
Dim otm As Object
Dim seq As Object
Set otm = Document.InsertObject(“OMSeq.Document”)
Set seq = otm.Specific
'Add measurement condition
Dim measurements As Object
Dim measurement As Object
set measurements = seq.Document.Measurements
Set measurement = measurements.Add(“A new
measurement condition”)
‘Set the nominal time to 700ms
measurement.TNom = 0.7
‘Set the allowed negative deviation to 30ms
measurement.TDevNeg = 0.03
‘Set the allowed positive deviation to 50ms
measurement.TDevPos = 0.05
63
OMICRON Test Universe
Syntax: object.TDevValid
Type: Boolean
Description: This property specifies wehther the deviation of the actual time
from the nominal time (TDev) is valid or not. The deviation is
invalid when the test has not been performed yet or when the time
could not be measured. The latter can happen because the
specified condition did not occur or because there was no
condition specified at all.
Example: 'Let’s check the deviation
Dim otm As Object
Dim seq As Object
Set otm = Document.InsertObject(“OMSeq.Document”)
Set seq = otm.Specific
'Add measurement condition
Dim measurements As Object
Dim measurement As Object
set measurements = seq.Document.Measurements
Set measurement = measurements.Add(“A new
measurement condition”)
'Test
otm.Test
'Now check the results
If measurement.TDevValid Then
MsgBox “Deviation: “ & measurement.TDev
Else
MsgBox “The deviation is not available.“
End If
64
TNom
Syntax: object.TNom
Type: Double
Description: This property specifies the nominal time in seconds. The value has
to be greater or equal to 0.
Example: 'Let’s set the nominal and the allowed deviations
Dim otm As Object
Dim seq As Object
Set otm = Document.InsertObject(“OMSeq.Document”)
Set seq = otm.Specific
'Add measurement condition
Dim measurements As Object
Dim measurement As Object
set measurements = seq.Document.Measurements
Set measurement = measurements.Add(“A new
measurement condition”)
‘Set the nominal time to 700ms
measurement.TNom = 0.7
‘Set the allowed negative deviation to 30ms
measurement.TDevNeg = 0.03
‘Set the allowed positive deviation to 50ms
measurement.TDevPos = 0.05
65
OMICRON Test Universe
Methods
GetIgnoreBeforeState
Syntax: object.GetIgnoreBeforeState
Return type: Long
Description: This method returns the index of the state of the “Ignore before”
condition. It is only applicable if the “Ignore before” property has
been set. This can be found out by calling IsIgnoreBeforeState.
Example: Dim otm As Object
Dim seq As Object
Set otm = Document.InsertObject(“OMSeq.Document”)
Set seq = otm.Specific
Dim measurement As Object
Set measurement = seq.Document.Measurements(1)
If measurement.IsIgnoreBeforeState Then
MsgBox “All states before state no. “ & _
measurement.GetIgnoreBeforeState & _
“ are ignored”
Else
MsgBox measurement.Name & “has no ‘ignore before’
condition”
End If
66
GetStartSignalID
Syntax: object.GetStartSignalID
Return type: Long
Description: This method returns the signal ID of the binary input of the start
condition. It only applies if the condition is a signal condition, not a
state condition. This can be found out by calling IsStartSignal.
The value is one of the signal ID properties of the Constants
object.
Example: Dim otm As Object
Dim seq As Object
Set otm = Document.InsertObject(“OMSeq.Document”)
Set seq = otm.Specific
Dim measurement As Object
Set measurement = seq.Document.Measurements(1)
If measurement.IsStartSignal Then
Dim text as String
If measurement.GetStartSignalSlope = 0 Then
text = “going”
Else
text = “coming”
End If
MsgBox “Measurement starts with “ & text & _
“ slope of signal ID “ &
measurement.GetStartSignalID
End If
67
OMICRON Test Universe
GetStartSignalSlope
Syntax: object.GetStartSignalSlope
Return type: Long
Description: This method returns the slope of the binary input of the start
condition. It only applies if the condition is a signal condition, not a
state condition. This can be found out by calling IsStartSignal.
The value is either 0 for a going slope (1®0) or 1 for a coming
slope (0®1).
Example: Dim otm As Object
Dim seq As Object
Set otm = Document.InsertObject(“OMSeq.Document”)
Set seq = otm.Specific
Dim measurement As Object
Set measurement = seq.Document.Measurements(1)
If measurement.IsStartSignal Then
Dim text as String
If measurement.GetStartSignalSlope = 0 Then
text = “going”
Else
text = “coming”
End If
MsgBox “Measurement starts with “ & text & _
“ slope of signal ID “ &
measurement.GetStartSignalID
End If
68
GetStartState
Syntax: object.GetStartState
Return type: Long
Description: This method returns the index of the state of the start condition. It
only applies if the condition is a state condition, not a signal
condition. This can be found out by calling IsStartState.
Example: Dim otm As Object
Dim seq As Object
Set otm = Document.InsertObject(“OMSeq.Document”)
Set seq = otm.Specific
Dim measurement As Object
Set measurement = seq.Document.Measurements(1)
If measurement.IsStartState Then
MsgBox “Measurement starts with state no. “ & _
measurement.GetStartState
End If
69
OMICRON Test Universe
GetStopSignalID
Syntax: object.GetStopSignalID
Return type: Long
Description: This method returns the signal ID of the binary input of the stop
condition. It only applies if the condition is a signal condition, not a
state condition. This can be found out by calling IsStopSignal.
The value is one of the signal ID properties of the Constants
object.
Example: Dim otm As Object
Dim seq As Object
Set otm = Document.InsertObject(“OMSeq.Document”)
Set seq = otm.Specific
Dim measurement As Object
Set measurement = seq.Document.Measurements(1)
If measurement.IsStopSignal Then
Dim text as String
If measurement.GetStopSignalSlope = 0 Then
text = “going”
Else
text = “coming”
End If
MsgBox “Measurement stops with “ & text & _
“ slope of signal ID “ &
measurement.GetStopSignalID
End If
70
GetStopSignalSlope
Syntax: object.GetStopSignalSlope
Return type: Long
Description: This method returns the slope of the binary input of the stop
condition. It only applies if the condition is a signal condition, not a
state condition. This can be found out by calling IsStopSignal.
The value is either 0 for a going slope (1®0) or 1 for a coming
slope (0®1).
Example: Dim otm As Object
Dim seq As Object
Set otm = Document.InsertObject(“OMSeq.Document”)
Set seq = otm.Specific
Dim measurement As Object
Set measurement = seq.Document.Measurements(1)
If measurement.IsStopSignal Then
Dim text as String
If measurement.GetStopSignalSlope = 0 Then
text = “going”
Else
text = “coming”
End If
MsgBox “Measurement stops with “ & text & _
“ slope of signal ID “ &
measurement.GetStopSignalID
End If
71
OMICRON Test Universe
GetStopState
Syntax: object.GetStopState
Return type: Long
Description: This method returns the index of the state of the stop condition. It
only applies if the condition is a state condition, not a signal
condition. This can be found out by calling IsStopState.
Example: Dim otm As Object
Dim seq As Object
Set otm = Document.InsertObject(“OMSeq.Document”)
Set seq = otm.Specific
Dim measurement As Object
Set measurement = seq.Document.Measurements(1)
If measurement.IsStopState Then
MsgBox “Measurement stops with state no. “ & _
measurement.GetStopState
End If
IsIgnoreBeforeState
Syntax: object.IsIgnoreBeforeState
Return type: Boolean
Description: This method returns whether the measurement condition has the
“Ignore before state” property set (see also SetIgnoreBeforeState).
Example: Dim otm As Object
Dim seq As Object
Set otm = Document.InsertObject(“OMSeq.Document”)
Set seq = otm.Specific
Dim measurement As Object
Set measurement = seq.Document.Measurements(1)
If measurement.IsIgnoreBeforeState Then
MsgBox “All states before state no. “ & _
measurement.GetIgnoreBeforeState & _
“ are ignored”
Else
MsgBox measurement.Name & “has no ‘ignore before’
condition”
End If
72
IsStartSignal
Syntax: object.IsStartSignal
Return type: Boolean
Description: This method returns whether the start condition specifies
measurement starting with a signal change as opposed to a state
(see also SetStartSignal, SetStartState).
Example: Dim otm As Object
Dim seq As Object
Set otm = Document.InsertObject(“OMSeq.Document”)
Set seq = otm.Specific
Dim measurement As Object
Set measurement = seq.Document.Measurements(1)
If measurement.IsStartSignal Then
Dim text as String
If measurement.GetStartSignalSlope = 0 Then
text = “going”
Else
text = “coming”
End If
MsgBox “Measurement starts with “ & text & _
“ slope of signal ID “ &
measurement.GetStartSignalID
End If
73
OMICRON Test Universe
IsStartState
Syntax: object.IsStartState
Return type: Boolean
Description: This method returns whether the start condition specifies
measurement starting with a state as opposed to a signal change
(see also SetStartState, SetStartSignal).
Example: Dim otm As Object
Dim seq As Object
Set otm = Document.InsertObject(“OMSeq.Document”)
Set seq = otm.Specific
Dim measurement As Object
Set measurement = seq.Document.Measurements(1)
If measurement.IsStartState Then
MsgBox “Measurement starts with state no. “ & _
measurement.GetStartState
End If
74
IsStopSignal
Syntax: object.IsStopSignal
Return type: Boolean
Description: This method returns whether the stop condition specifies
measurement stoping with a signal change as opposed to a state
(see also SetStopSignal, SetStopState).
Example: Dim otm As Object
Dim seq As Object
Set otm = Document.InsertObject(“OMSeq.Document”)
Set seq = otm.Specific
Dim measurement As Object
Set measurement = seq.Document.Measurements(1)
If measurement.IsStopSignal Then
Dim text as String
If measurement.GetStopSignalSlope = 0 Then
text = “going”
Else
text = “coming”
End If
MsgBox “Measurement stops with “ & text & _
“ slope of signal ID “ &
measurement.GetStopSignalID
End If
75
OMICRON Test Universe
IsStopState
Syntax: object.IsStopState
Return type: Boolean
Description: This method returns whether the stop condition specifies
measurement stoping with a state as opposed to a signal change
(see also SetStopState, SetStopSignal).
Example: Dim otm As Object
Dim seq As Object
Set otm = Document.InsertObject(“OMSeq.Document”)
Set seq = otm.Specific
Dim measurement As Object
Set measurement = seq.Document.Measurements(1)
If measurement.IsStopState Then
MsgBox “Measurement stops with state no. “ & _
measurement.GetStopState
End If
SetIgnoreBeforeState
Syntax: object.SetIgnoreBeforeState(Index)
Variant Index – Index number or name of the state
Return type: None
Description: With this method you can set the “Ignore before state” condition.
This means that the measurement condition is not evaluated
before the state specified here starts.
Example: Dim otm As Object
Dim seq As Object
Set otm = Document.InsertObject(“OMSeq.Document”)
Set seq = otm.Specific
Dim measurement As Object
Set measurement = seq.Document.Measurements(1)
measurement.SetIgnoreBeforeState(1)
76
SetStartSignal
SetStartState
77
OMICRON Test Universe
SetStopSignal
SetStopState
78
Constants Object
Properties
The following is a list of all signal IDs supported by the OMICRON State
Sequencer.
Analog Outputs
sigidUL1N
sigidUL2N
sigidUL3N
sigidU_N
sigidU_0
sigidU_1
sigidU_2
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
79
OMICRON Test Universe
sigidI_2
sigidI_PRIM_L1
sigidI_PRIM_L2
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
sigidTRIP_L1
sigidTRIP_L2
sigidTRIP_L3
80
sigidTRIP_L1_ONLY
sigidTRIP_L2_ONLY
sigidTRIP_L3_ONLY
sigidTRIP_1_PHASE
sigidTRIP_3_PHASE
sigidTRIP_IDIFF_GR
sigidTRIP_IDIFF_GRGR
sigidSTART
sigidSTART_L1
sigidSTART_L2
sigidSTART_L3
sigidUSER_INPBIN_DEF1
sigidUSER_INPBIN_DEF2
sigidUSER_INPBIN_DEF3
sigidUSER_INPBIN_DEF4
sigidUSER_INPBIN_DEF5
sigidUSER_INPBIN_DEF6
sigidUSER_INPBIN_DEF7
sigidUSER_INPBIN_DEF8
sigidUSER_INPBIN_DEF9
sigidUSER_INPBIN_DEF10
Binary Outputs
sigidAUX_CONT
sigidAUX_CONT_L1
sigidAUX_CONT_L2
sigidAUX_CONT_L3
sigidUSER_OUTBIN_DEF1
sigidUSER_OUTBIN_DEF2
sigidUSER_OUTBIN_DEF3
sigidUSER_OUTBIN_DEF4
81
OMICRON Test Universe
sigidUSER_OUTBIN_DEF5
sigidUSER_OUTBIN_DEF6
sigidUSER_OUTBIN_DEF7
sigidUSER_OUTBIN_DEF8
82