Data

The Data components pass input data through to another component, and can direct the process flow according to various circumstances.

ConfidenceOf

The ConfidenceOf component retrieves the confidence value of the input data point, as an integer value from 0 to 100 (a percentage). If the confidence value does not exist, the process assumes a confidence value of 100 and continues.

The confidence of entity values is taken from the underlying historian, with the Adaptor mapping the historian's "data quality" value to a confidence. For example, some historians report a confidence as a percentage directly, whereas others have a status (such as good or bad) which is mapped to a value of 100 or 0 respectively.

Properties

This component has no additional properties.

Inputs

Flow

The component that acts as a trigger for this component should be connected to this pin.

Number

The data point for which to retrieve the confidence value. This input is required. Not connecting this pin will produce an error.

Outputs

Number 

The confidence value of the input, between 0 and 100. Not connecting this pin will produce a warning.

Example

In the following example, the temperature is split into two flows. One flow checks to see if the confidence is greater than 90%. If not, an event is raised and the state of the entity changes to Low Confidence.

If the confidence is greater than 90%, the temperature value is checked to see if it is greater than 50. If it is, an event is raised and the state of the entity changes to Above. Otherwise, an event is raised and the state of the entity changes to Below.

Get Discrete Single

The Get Discrete Single component retrieves the value of the current data point from an input data stream that has a discrete process data type.

Module Properties

This component has no additional properties.

Process Properties

Process Data Type

You should ensure the process data type is set to Discrete.

Default State

You can specify one of the states in the process to be the default or "normal" state for the process.

Inputs

Flow 

The output pin of another component, typically an event, should be connected to the flow pin for this component.

Input

An Input or Primary Input component that retrieves a data stream.

Outputs

Number 

If the data point retrieved is a number value, the process follows this path.

Text 

If the data point retrieved is a text value, the process follows this path.

NoData 

If the input stream contains no data, the process follows this path. Note that this pin will not be triggered while testing the process.

Example

In the following example, data is fetched from three sources. Discrete data is obtained as the primary input, which is evaluated against min and max values from two different continuous data sources. If the primary input does not contain any data points, the state of the entity changes to No Data.

Get Single

The Get Single component retrieves the value of the current data point from an input data stream that has a continuous process data type.

Module Properties

This component has no additional properties.

Process Properties

Process Data Type

You should ensure the process data type is set to Continuous.

Default State

You can specify one of the states in the process to be the default or "normal" state for the process.

Inputs

Flow 

The output pin of another component, typically an event, should be connected to the flow pin for this component.

Input 

An Input or Primary Input component that retrieves a data stream.

Outputs

Number 

If the data point retrieved is a number value, the process follows this path.

Text 

If the data point retrieved is a text value, the process follows this path.

Example

In the following example, a temperature value is retrieved from an input stream. We are expecting a number, so if a string is supplied then the process terminates with an error. If a number is supplied, the process continues to run until it raises an event.

Get Window

The Get Window component retrieves an historical period of data from the input data stream for a specified period.

For example, you might want to retrieve all the data from the previous 24 hours, or you may want to get the last 10 data points.

Module Properties

This component has no additional properties.

Process Properties

Data Windowing Type

You must specify a Data Windowing Type for the process to pass validation. The Data Windowing Type must be consistent with the data types retrieved by the process. Options are:

  • Data Points: Retrieve the latest specified number of data points. This is often used for data that is produced at random time intervals.
  • Time Period: Retrieves all the data specified for the time period from the current time. The more data that is retained, the more memory that is used.

Note: If you don’t specify a large enough data window, you may get more data than you asked for because of the way data is cached in Sentinel. Ensure that the number of data points or time period is larger than the largest period you go back. E.g. If your input period is 1 week, ensure the Time Period specified in the Data Windowing options is larger than 1 week. Similarly, if your input retrieves 10 data points, ensure the Data Points specified in the Data Windowing options is more than 10.

Inputs

Flow 

The component that acts as a trigger for this component should be connected to this pin.

Data Stream 

An Input or Primary Input component that retrieves a data stream. This input is required. Not connecting this pin will produce an error.

The period of data to retrieve. This can either be a number of data points or a time period, as specified in the Data Windowing property. This input is required. Not connecting this pin will produce an error. You could connect to any component that produces either a number or a time period, such as:

Outputs

Data Set

An array of values retrieved from the input data source. Not connecting this pin will produce a warning.

Example

In the following example, we compare the first and last value of a given time period. The process retrieves a 24-hour window of data using Get Window, then uses Get First to get the first value of that window, and then compares it with the current value.

Get Window From

The Get Window From component retrieves an historical period of data from the input data stream for a specified period, ending at a specified time.

For example, you may want to get the all the data for the previous week, ending on the last day of the week.

Module Properties

This component has no additional properties.

Process Properties

Data Windowing Type

You must specify a Data Windowing Type for the process to pass validation. The Data Windowing Type must be consistent with the data types retrieved by the process. Options are:

  • Data Points: Retrieve the latest specified number of data points. This is often used for data that is produced at random time intervals.
  • Time Period: Retrieves all the data specified for the time period from the current time. The more data that is retained, the more memory that is used.

Note: If you don’t specify a large enough data window, you may get more data than you asked for because of the way data is cached in Sentinel. Ensure that the number of data points or time period is larger than the largest period you go back. E.g. If your input period is 1 week, ensure the Time Period specified in the Data Windowing options is larger than 1 week. Similarly, if your input retrieves 10 data points, ensure the Data Points specified in the Data Windowing options is more than 10.

Inputs

Flow 

The component that acts as a trigger for this component should be connected to this pin.

Data Stream 

An Input or Primary Input component that retrieves a data stream. This input is required. Not connecting this pin will produce an error.

end

The ending timestamp to look back from. This input is required. Not connecting this pin will produce an error.

P

The period of time for which to retrieve data. For example, 7 days. This input is required. Not connecting this pin will produce an error.

Outputs

Data Set

An array of values retrieved from the input data source. Not connecting this pin will produce a warning.

Example

In the following example, the input data is compared with the data from the previous day to see if it is above or below. We use the Get Window From component to retrieve the previous day's data, ending at the current timestamp.

The previous day's value is obtained by using the Get First component to retrieve the first value in the data set supplied by Get Window From.

We then compare that value with the current value obtained by the Get Single component.

Get Window Start Filter

The Get Window Start Filter component retrieves an historical period of data from the input data stream for a specified period, starting at a specified time.

For example, you may want to get the first week worth of data from the previous month.

Module Properties

This component has no additional properties.

Process Properties

Data Windowing Type

You must specify a Data Windowing Type for the process to pass validation. The Data Windowing Type must be consistent with the data types retrieved by the process. Options are:

  • Data Points: Retrieve the latest specified number of data points. This is often used for data that is produced at random time intervals.
  • Time Period: Retrieves all the data specified for the time period from the current time. The more data that is retained, the more memory that is used.

Note: If you don’t specify a large enough data window, you may get more data than you asked for because of the way data is cached in Sentinel. Ensure that the number of data points or time period is larger than the largest period you go back. E.g. If your input period is 1 week, ensure the Time Period specified in the Data Windowing options is larger than 1 week. Similarly, if your input retrieves 10 data points, ensure the Data Points specified in the Data Windowing options is more than 10.

Inputs

Flow 

The component that acts as a trigger for this component should be connected to this pin.

Data Stream 

An Input or Primary Input component that retrieves a data stream. This input is required. Not connecting this pin will produce an error.

The period of data to retrieve. This can either be a number of data points or a time period, as specified in the Data Windowing property. This input is required. Not connecting this pin will produce an error. You could connect to any component that produces either a number or a time period, such as:

start

The starting timestamp to look forward from. No data is returned before this time. For example, we could specify the start time to be the time that the process came out of suppression. This input is required. Not connecting this pin will produce an error.

Outputs

Data Set

An array of values retrieved from the input data source. Not connecting this pin will produce a warning.

Example

In the following example, Get Window Start Filter is used to retrieve the Daily Oil data for the first week of the year. The values obtained over that first week are averaged. If the average is greater than 100,000, an event is raised and the state of the entity changes to Above, otherwise an event is raised and the state of the entity changes to Below.

Merge

The Merge component is used to merge together one or more data flows. Any input data that is received is forwarded as the output data.

When the process flows backwards through the Merge component to retrieve data, the process always follows the top pin only.

Properties

Num Inputs

The number of input pins for this component. You can specify up to 16 inputs.

Inputs

Mixed 

Any data type to forward to the output pin.

Outputs

Mixed 

Any data type to forward to the connected component. Not connecting this pin will produce a warning.

Example

In the following example, the input temperature is checked to see if it is above 28. If it is, an event is raised. When this event is raised, the text Above Event is sent to the log.

If the temperature is not higher than 28, a different event is raised. When this event is raised, the text Below Event is sent to the log. The Merge component is used as a pathway to join the two flows and send the relevant text to the log.

Pass Through

The Pass Through component forwards the input to the output.

Properties

This component has no additional properties.

Inputs

Flow 

The component that acts as a trigger for this component should be connected to this pin. This pin must be connected. Not connecting this pin will produce an error.

Mixed 

Any data type to forward to the output pin. This input is required. Not connecting this pin will produce an error.

Outputs

Mixed 

Any data type to forward to the connected component. Not connecting this pin will produce a warning.

Example

In the following example, the input temperature is checked to see if it is above 28. If it is, an event is raised. When this event is raised, the text Above Event is sent to the log.

If the temperature is not higher than 28, a different event is raised. When this event is raised, the text Below Event is sent to the log.

The Pass Through component is used as the bridge to send the relevant text to the log.

Relay

The Relay component sends the input data to one of the output pins, depending on the Boolean input.

Properties

This component has no additional properties.

Inputs

Flow 

The component that acts as a trigger for this component should be connected to this pin.

Boolean

The Boolean value that determines which output pin should be followed. This input is required. Not connecting this pin will produce an error.

Mixed 

The data value that is to be sent to the output pin. This input is required. Not connecting this pin will produce an error.

Outputs

If the Boolean value is True, the process follows this path. Not connecting this pin will produce a warning.

If the Boolean value is False, the process follows this path. Not connecting this pin will produce a warning.

Example

In the following example, the Relay component is used to direct the flow to raise an event and change the state to Above or Below as required. It also takes the temperature value and passes it through to the event for use as metadata in the Sentinel event report.

Sequence

The Sequence component iterates the process over each output connection, from the first pin at the top to the last pin at the bottom, passing the input data to each pin.

The process first follows the first pin, and once that process has finished the process returns to the Sequence component and commences the second path, and so on until the last path is completed, or until the iteration is stopped prematurely by an End or Error component on one of the process paths.

Properties

Num Outputs

The number of output pins for this component. You can specify up to 16 outputs.

Inputs

Flow 

The component that acts as a trigger for this component should be connected to this pin.

Mixed 

The input data, of any data type, to send to the output pins. This input is required. Not connecting this pin will produce an error.

Outputs

Mixed 

The output pins direct the data flow. Missing output connections will be skipped in the process flow.

Example

The following example is similar to that used in Flow Sequence. Temp 1 is checked against Temp 2. If Temp 1 is greater than Temp 2, the following things happen:

  1. Temp 1 is checked to see if it is greater than Temp 2 + 25. If it is, an event is raised and the entity changes to a Primary state, then the process ends.
    If not, the process returns to the next output pin of the Sequence.
  2. Temp 1 is checked to see if it is greater than Temp 2 + 10. If it is, an event is raised and the entity changes to a Secondary state, then the process ends.
    If not, the process returns to the next output pin of the Sequence.
  3. When the process reaches the final pin in the Sequence, an event is raised and the entity changes to a Default state.

Split

The Split component is used to send a data point to several components simultaneously. The process flow, however, follows the top pin. The data point is sent to the other components in preparation for further processing, to avoid repeated calls to fetch data.

Note: It is important to locate the Start component after the Split component, otherwise the process flow will only ever follow that of the top pin.

Properties

Num Outputs

The number of output pins for this component. You can specify up to 16 outputs.

Inputs

Mixed 

A single data point, of any data type, which is to be split into multiple data flows. This input is required. Not connecting this pin will produce an error.

Outputs

Mixed 

The data point is sent to all output pins simultaneously. Not connecting this pin will produce a warning.

Example

In the following example, the Split component is used to send the temperature data to three components:

  • The first stream is evaluated against a constant to raise an event and change the state of the entity to Above or Below.
  • The second stream is used as metadata for the event that changes the state of the entity to Above.
  • The third stream is used to log the temperature value if the state of the entity changes to Above.

Switch

The Switch component forwards the input data point to the ‘T’ pin only if the Boolean input is True. If the Boolean input is False, the flow follows the ‘F’ output pin.

Properties

This component has no additional properties.

Inputs

Flow 

The component that acts as a trigger for this component should be connected to this pin.

Boolean

The Boolean value that determines whether to send data to the ‘T’ pin. This input is required. Not connecting this pin will produce an error.

Number 

The data value that is to be sent to the ‘T’ pin, if the Boolean value is True. This input is required. Not connecting this pin will produce an error.

Outputs

If the Boolean value is True, the process follows this path. Not connecting this pin will produce a warning.

If the Boolean value is False, the process follows this path.

Example

In the following example, the Switch component is used to direct the flow to raise an event and change the state of the entity to Above, only if the Temperature is greater than Max. It also takes the temperature value and passes it through to the event for use as metadata in the Sentinel event report.

TimestampOf

The TimestampOf component retrieves the timestamp of the input. If the input does not have a timestamp, the process ends.

Properties

This component has no additional properties.

Inputs

Flow 

The component that acts as a trigger for this component should be connected to this pin.

Mixed 

The input which has a timestamp. This input is required. Not connecting this pin will produce an error.

Outputs

Date Time

The timestamp of the input. Not connecting this pin will produce a warning.

Example

In the following example, the timestamps of both inputs are retrieved. The first timestamp is written to memory, and the second timestamp is processed by the attached component.

Value Writer

The Value Writer component is used to write a data point to an entity.

Properties

This component has no additional properties.

Inputs

Flow 

The component that acts as a trigger for this component should be connected to this pin.

name

The name of the entity. This input is required. Not connecting this pin will produce an error.

value 

The value to write to the entity. This input is required. Not connecting this pin will produce an error.

Note: This value must have a timestamp.

Outputs

Mixed

The value that will be written to the entity. The value includes the confidence value if supplied (e.g. a value can have a confidence if it was read from a stream), otherwise it assumes a confidence of 100. Not connecting this pin will produce a warning.

Example

In the following example, the temperature is compared against a maximum value. If the temperature is greater than the maximum, an event is raised and the state of the entity changes to Above, and a value of 0 is written to the entity.

Related: Sentinel Studio PrimersCreating a User Process, Usage Examples

Comments are closed