Xentara v1.2.1
User Manual
Loading...
Searching...
No Matches
I/O Points

An I/O point represents a single input, output, or input/output within an I/O component. An I/O point can support the input direction (reading values), the output direction (writing values), or both directions.

I/O points are provided by I/O drivers. I/O drivers must be installed using plugins.

I/O points are not usually accessed directly, but through a [data point](Data Points].

Acquiring Values

The input values of I/O points will generally be acquired in one of two ways:

  • Some devices will push the value of an I/O to Xentara whenever it changes. An OPC UA server or an IEC 60870 device may push changed node values to Xentara, e.g.
  • Xentara can query the data from the device using a read or poll command. Queries will usually be implemented as I/O batches and query the values of several I/O points at the same time. Queries must usually be executed regularly, either using a timer, or in response to an event.

Writing Values

The output values of I/O points can generally be written in one of two ways:

  • The value of the I/O point can be pushed to the device immediately as soon as it is written.
  • The value of the I/O point can be cached within Xentara, and sent later at some specified time. This is usually done to integrate the writing of the values into the Xentara task scheduling mechanism, or to be able to write multiple outputs at the same time to improve performance (batch writing). These delayed write operations will usually be implemented as I/O batches, and must be triggered using a timer or an event.

A specific I/O component may support one or both of these methods.

Attributes of I/O Points

An I/O point that supports the input direction has at least the following attributes:

  • value The last known value of the input
  • updateTime The time that the last known value was updated
  • quality The quality of the value

An I/O point that supports the output direction has at least the following writable attributes:

  • value Writable attribute used to write the value to the output

An I/O point that supports both input and output directions will have all of the listed attributes.

Attention
Xentara I/O points are written asynchronously. If you write the value of an I/O point that supports both input and output directions, the value attribute will only reflect the new value once it has been sent to the I/O component, and the component has confirmed that the value has been accepted. Some I/O components may also modify the value you write, so that the value you read back may not be the same as the value you wrote. Some I/O components perform clamping, for example, where the value is clamped to a certain range before writing.

Different types of I/O points may have additional attributes. Many I/O points that supports the input direction also have one or more of the following attributes:

  • sourceTime The time stamp provided by the source of the data. This will usually be the physical device the I/O point is first acquired on.
  • changeTime The last time at which value of the input changed.
  • error The error code for the case where the value could not be acquired.

Many I/O points that supports the output direction also have one or more of the following attributes:

  • writeTime The last time the output was written.
  • writeError The error code for the case where the last write operation failed.

An I/O point may also have any number of other attributes not listed here.

The Quality Attribute

Each I/O point that supports the input direction has a quality associated with it. The quality denotes how reliable the value of the I/O point is. Xentara defines between the following qualities:

Quality Meaning
good

The value was successfully acquired.

Values with this quality have been acquired in the normal way without any errors or issues.

acceptable

The value was acquired in an acceptable way, but some problem occurred.

Values with this quality were acquired successfully, but may have reduced precision or accuracy. This may be due to using an alternate, inferior data source, to some non-critical error situation, or because a sensor or such is operating under conditions where the accuracy is reduced. Values with quality “acceptable” can still be used as inputs to control circuits, simulations, etc., but the results may not be as good as when using values with quality “good”.

unreliable

There was a problem acquiring the value, and it should not be relied upon.

Values with this quality can used for informational purposes, but are not reliable enough for system critical uses, such as control ciruits, safety systems, etc.

bad

The value could not be acquired correctly.

Values with this quality either could not be acquired at all, or a serious error was encountered, like exceeding the range of a sensor.

Accessing I/O Points

I/O points have at least the following members:

Attributes
keyThe I/O point’s primary key.
nameThe I/O point’s name. The name is the last point of the primary key.
UUIDThe unique UUID of the I/O point.
valueThe value of the I/O point. This will be readable for I/O points that support the input direction, and writable for I/O points that support the output direction. For I/O points that support both direction, this attribute will be readable and writable.
updateTimeThe last time the value was updated. This attribute is only available for I/O points that support the input direction.
qualityThe quality of the current value. This attribute is only available for I/O points that support the input direction.

I/O points can optionally also have the following members:

Optional Attributes
sourceTimeThe time stamp provided by the data source. This attribute is only available for I/O points that support the input direction.
changeTimeThe last time the value changed. This attribute is only available for I/O points that support the input direction.
writeTimeThe last time the value was written. This attribute is only available for I/O points that support the output direction.
errorThe last read error, as a protocol specific error code. This attribute is only available for I/O points that support the input direction.
writeErrorThe last write error, as a protocol specific error code. This attribute is only available for I/O points that support the output direction.
Optional Events
changedTriggered when any of the input data has changed. This event is only available for I/O points that support the input direction.
valueTriggered when the input value has changed. This event is only available for I/O points that support the input direction.
qualityTriggered when the quality of the input value has changed. This event is only available for I/O points that support the input direction.

Each individual type of I/O point can have additional members. Most I/O points will have an attribute containing the I/O address, for example. Please refer to the documentation of the specific I/O point for details.

To refer to a member, use its primary key. The primary key of the UUID attribute of an I/O point called “My.I/O.Point” is “My.I/O.Point.UUID”.