7.2 EncoderSensorType

The EncoderSensorType offers Encoder sensor related settings and functions as preset control and latch functionality.

Table 16 – EncoderSensorType Definition
Attribute Value
BrowseNameEncoderSensorType
IsAbstractFalse
References Node Class BrowseName DataType TypeDefinition Other
Subtype of the 0:BaseObjectType defined in OPC 10000-5.
0:HasComponentMethodPresetControlO
0:HasComponentVariablePositionOffset0:Number0:BaseDataVariableTypeM, RO
0:HasComponentMethodRef1LatchStartO
0:HasComponentVariableRef1LatchActive0:Boolean0:BaseDataVariableTypeO, RO
0:HasComponentVariableRef1LastLatchedPos0:Number0:BaseDataVariableTypeO, RO
0:GeneratesEventObjectTypeEncoderRefLatchEventType
Conformance Units
PNENC Sensor

Clients must lock the parent EncoderChannelType Object before invoking a Method of the EncoderSensorType Object.

7.2.1 PresetControl Method

This Method sets the preset value of the Encoder. The security constraints defined in chapter 6.6 apply.

Signature

	PresetControl (
		[in] 0:Number	 PresetValue
		);
	
Argument Description
PresetValueThe desired preset value to apply.

The Method Result Codes (defined in Call Service) are defined in Table 15.

Table 17 – Possible Method Result Codes
Result Code Description
GoodThe Method execution was successful.
Bad_UserAccessDeniedThe user has not the right to execute the Method.
Bad_InvalidArgumentThe Server is not able to apply the preset value. The preset value may be outside the permissive value bounds.
Bad_LockedThe parent EncoderChannelType Object is locked by a different Client’s Session.
Bad_RequiresLockThe parent EncoderChannelType Object is not locked. Clients must lock the parent EncoderChannelType Object before invoking a Method.
Bad_UnexpectedErrorThe server is not able to execute the function because an unexpected error occurred. The Device might be temporarily unavailable or unreachable due to network failure.

The PositionOffset Variable contains the calculated offset belonging to the current preset value of the Encoder.

7.2.2 Ref1LatchStart Method

This Method starts the latch capture function of the Encoder. The security constraints defined in chapter 6.6 apply.

Signature

	Ref1LatchStart (
		);
	

The Method Result Codes (defined in Call Service) are defined in Table 15.

Table 18 – Possible Method Result Codes
Result Code Description
GoodThe Method execution was successful.
Bad_UserAccessDeniedThe user has not the right to execute the Method.
Bad_LockedThe parent EncoderChannelType Object is locked by a different Client’s Session.
Bad_RequiresLockThe parent EncoderChannelType Object is not locked. Clients must lock the parent EncoderChannelType Object before invoking a Method.
Bad_UnexpectedErrorThe server is not able to execute the function because an unexpected error occurred. The Device might be temporarily unavailable or unreachable due to network failure.

The Ref1LatchActive Variable contains True if the Ref1 latch is active, otherwise False.

The Ref1LastLatchedPos Variable contains the last latched Ref1 position of the Encoder.

The Server might provide the Client with information about changes of the Ref1 latch data by sending EncoderRefLatchEventType Events.