7.5 LogbookType

The LogbookType Object provides access to the Encoder’s fault buffer.

Table 22 – LogbookType Definition
Attribute Value
BrowseNameLogbookType
IsAbstractFalse
References Node Class BrowseName DataType TypeDefinition Other
Subtype of the 0:BaseObjectType defined in OPC 10000-5.
0:HasComponentVariableLogEntriesLogEntryDataType[]0:BaseDataVariableTypeM, RO
0:HasPropertyVariableLogbookSize0:UInt160:PropertyTypeM, RO
0:HasComponentMethodDeleteLogbookO
0:HasComponentMethodGetFilteredLogbookEntriesO
0:HasComponentMethodGetCurrentFaultSituationO
0:HasComponentMethodGetActiveDiagnosisO
0:HasComponentMethodGetHistoricFaultSituationO
0:GeneratesEventObjectTypeLogbookEventType
Conformance Units
PNENC Logbook

The LogEntries array Variable consists of LogEntryDataType structure elements. The array is limited to the maximum size specified by the LogbookSize Property. The array contains LogEntryDataType elements for events and starts with the most recent event (the element with the most recent EventComing timestamp). If the Server maintains different fault situations in its fault buffer (see [PDP] 6.3.8.3 Fault Buffer Mechanism), faults (events) which are still present after an acknowledge generate a new entry in the actual fault situation causing more than one entry with the same EventNumber for one event.

The LogbookSize Property contains the maximum length of the LogEntries array. The actual length of the array may be smaller.

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

7.5.1 DeleteLogbook Method

The DeleteLogbook Method clears the LogEntries array and resets the fault buffer of the Encoder Object. The security constraints defined in chapter 6.6 apply.

Signature

	DeleteLogbook (
	);

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

Table 23 – 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.

7.5.2 GetFilteredLogbookEntries Method

The GetFilteredLogbookEntries Method returns a LogEntries array matching the filter criteria. Method invocation shall be possible for all users (read-only).

Signature

	GetFilteredLogbookEntries (
		[in] 0:Byte					LogbookFilterOptions,
		[in] 0:Byte					FaultSituationNumber
		[in] EventTypeEnumeration 		EventType,
		[in] 0:Int32					EventCode,
		[in] 0:Duration				EventAppearanceInterval,
	[out] LogEntryDataType[] 		FilteredLogEntries
	);
Argument Description
LogbookFilterOptions

Parameter allowing to restrict the returned logbook entries to those having valid EventGoing and/or EventAcknowledged timestamps.

If set to 1 (“GOING” filter), only logbook entries with valid EventGoing timestamp are returned.

If set to 2 (“ACKNOWLEDGED” filter), only entries with valid EventAcknowledged timestamp are returned.

If set to 3, the logic applied is “AND”: only logbook entries meeting both filter criteria are returned.

Set to 0 if no filtering shall be applied.

If a value greater than 3 is passed, the Method Result Code shall be set to Bad_InvalidArgument.

FaultSituationNumberRestricts the returned logbook entries to those with the FaultSituationNumber field equal to this parameter. Passing 255 means “don’t care”.
EventTypeRestricts the returned logbook entries to those with the EventType field equal to this parameter. Passing “UNSPECIFIED” means “don’t care”.
EventCodeRestricts the returned logbook entries to those with the EventCode field equal to this parameter (See Table 69 fault codes). Passing 0 means “don’t care”.
EventAppearanceIntervalTime interval encoded as 0:Duration defined in [OPC 10000-3]. Restricts the returned logbook entries to those appearing within a timespan from the past up to now. The EventComing field of the logbook entries is used for checking this filter. Passing 0 means “don’t care”.
FilteredLogEntriesArray containing the logbook entries matching all filter criteria passed with the first 5 parameters. An empty array is returned if no logbook entry matches the filter criteria.

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

Table 24 – Possible Method Result Codes
Result Code Description
GoodThe Method execution was successful.
Bad_InvalidArgumentThe Server is unable to execute the Method due to invalid arguments. For instance, the EventCode passed may be unknown.
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.

7.5.3 GetCurrentFaultSituation Method

The GetCurrentFaultSituation Method returns all log entries which occurred since the last acknowledge as LogEntries array. Starting with the most recent one, all log entries without valid EventAcknowledged timestamp are returned. Method invocation shall be possible for all users (read-only).

Signature

	GetCurrentFaultSituation (
		[out] LogEntryDataType[] 	CurrentLogEntries
	);
	
Argument Description
CurrentLogEntriesArray containing the log entries occurred since the last acknowledge. An empty array is returned if no logbook entry matches the filter criteria.

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

Table 25 – Possible Method Result Codes
Result Code Description
GoodThe Method execution was successful.
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.

7.5.4 GetHistoricFaultSituation Method

The GetHistoricFaultSituation Method returns a LogEntries array with valid EventGoing field. Method invocation shall be possible for all users (read-only).

Signature

	GetHistoricFaultSituation (
		[in]  0:Byte				FaultSituationNumber,	
	[out] LogEntryDataType[] 	HistoricLogEntries
	);
	
Argument Description
FaultSituationNumberFault situation number the faults belong to. 0 identifies the current situation, 1 the historic situation preceding the current situation, and so on (see explanation below).
HistoricLogEntriesArray containing the log entries with valid EventGoing field entry. An empty array is returned if no logbook entry matches the filter criteria.

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

Table 26 – Possible Method Result Codes
Result Code Description
GoodThe Method execution was successful.
Bad_InvalidArgumentThe fault situation specified by FaultSituationNumber does not exist.
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.

7.5.5 GetActiveDiagnosis Method

The GetActiveDiagnosis Method returns a LogEntries array containing log entries belonging to the current fault situation (log entries with FaultSituationNumber equal to 0) with valid EventComing timestamp, but with missing EventGoing timestamp. The method returns a subset of the entries returned by the GetCurrentFaultSituation Method. Method invocation shall be possible for all users (read-only).

Signature

	GetActiveDiagnosis (
		[out] LogEntryDataType[] 	ActiveDiagnosis
	);
	
Argument Description
ActiveDiagnosisArray containing the log entries with missing EventGoing field entry. An empty array is returned if no logbook entry matches the filter criteria.

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

Table 27 – Possible Method Result Codes
Result Code Description
GoodThe Method execution was successful.
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 Server might provide the Client with information about new incidents by sending LogbookEventType Events.