Most states defined in this standard are simple – i.e. they are either True or False. The TwoStateVariableTypeis introduced specifically for this use case. More complex states are modelled by using a StateMachineTypedefined in 10000-16.

The TwoStateVariableTypeis derived from the StateVariableTypedefined in 10000-16. and formally defined in Table 3.

Table 3– TwoStateVariableType definition

Attribute

Value

BrowseName

TwoStateVariableType

DataType

LocalizedText

ValueRank

-1 (-1 = Scalar)

IsAbstract

False

References

NodeClass

BrowseName

DataType

TypeDefinition

ModellingRule

Subtype of the StateVariableTypedefined in 10000-16.

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

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

ConformanceUnits

A & C Basic

The Value Attributeof an instance of TwoStateVariableTypecontains the current state as a human readable name. The EnabledStatefor example, might contain the name “Enabled” when True and “Disabled” when False.

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

TransitionTimespecifies the time when the current state was entered.

EffectiveTransitionTimespecifies 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 TransitionTimestays at the point in time where the Alarmbecame active whereas the EffectiveTransitionTimechanges with each shift of a sub state.

The optional Property EffectiveDisplayName from theStateVariableTypeis used if a state has sub states. It contains a human readable name for the current state after taking the state of any SubStateMachinesin account. As an example, the EffectiveDisplayNameof the EnabledStatecould contain “Active/HighHigh” to specify that the Conditionis active and has exceeded the HighHigh limit.

Other optional Propertiesof the StateVariableTypehave no defined meaning for TwoStateVariableType.

TrueState and FalseState contain the localized string for the TwoStateVariableTypevaluewhen its Id Propertyhas the value True or False, respectively. Since the two Propertiesprovide meta-data for the Type, Serversshall not allow these Propertiesto be selected in the Eventfilter for a MonitoredItem. The TrueState Propertyand FalseState Propertyshall only exist on InstanceDeclarations. See Figure 9for an illustration. Clientscan use the Read Serviceto get the values of the TrueStateand FalseState Property.

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

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

image012.png

Figure 9- TwoStateVariable Illustration