5 Model ToC Previous Next

5.2 Two-state state machines ToC Previous Next index

Most states defined in this standard are simple – i.e. they are either True or False. The TwoStateVariableType is introduced specifically for this use case. More complex states are modelled by using a StateMachineType defined in OPC 10000-5.

The TwoStateVariableType is derived from the StateVariableType defined in OPC 10000-5 and formally defined in Table 3.

Table 3 – TwoStateVariableType definition

Attribute Value
BrowseName TwoStateVariableType
DataType LocalizedText
ValueRank -1 (-1 = Scalar)
IsAbstract False

Subtype of the StateVariableType defined in OPC 10000-5.

Note that a Reference to this subtype is not shown in the definition of the StateVariableType

References NodeClass BrowseName DataType TypeDefinition Modelling Rule
HasProperty Variable Id Boolean PropertyType Mandatory
HasProperty Variable TransitionTime UtcTime PropertyType Optional
HasProperty Variable EffectiveTransitionTime UtcTime PropertyType Optional
HasProperty Variable TrueState LocalizedText PropertyType Optional
HasProperty Variable FalseState LocalizedText PropertyType Optional

The Value Attribute of an instance of TwoStateVariableType contains the current state as a human readable name. The EnabledState for example, might contain the name “Enabled” when True and “Disabled” when False.

Id is inherited from the StateVariableType and overridden to reflect the required DataType (Boolean). The value shall be the current state, i.e. either True or False.

TransitionTime specifies the time when the current state was entered.

EffectiveTransitionTime specifies the time when the current state or one of its sub states was entered. If, for example, a LevelAlarm is active and – while active – switches several times between High and HighHigh, then the TransitionTime stays at the point in time where the Alarm became active whereas the EffectiveTransitionTime changes with each shift of a sub state.

The optional Property EffectiveDisplayName from the StateVariableType is used if a state has sub states. It contains a human readable name for the current state after taking the state of any SubStateMachines in account. As an example, the EffectiveDisplayName of the EnabledState could contain “Active/HighHigh” to specify that the Condition is active and has exceeded the HighHigh limit.

Other optional Properties of the StateVariableType have no defined meaning for TwoStateVariableType.

TrueState and FalseState contain the localized string for the TwoStateVariableType value when its Id Property has the value True or False, respectively. Since the two Properties provide meta-data for the Type, Servers may not allow these Properties to be selected in the Event filter for a MonitoredItem. Clients can use the Read Service to get the information from the specific ConditionType.

A HasTrueSubState Reference is used to indicate that the True state has sub states.

A HasFalseSubState Reference is used to indicate that the False state has sub states.

Previous Next