Difference between revisions of "Data Items"

From MTConnect® User's Portal
Jump to: navigation, search
Line 81: Line 81:
  
 
MTConnectDevices
 
MTConnectDevices
Devices
+
          Devices
Device
+
      Device
Components
+
Components
Axes
+
    Axes
Rotary [C]
+
      Rotary [C]
                    DataItems
+
                      DataItems
DataItem [Cvel]
+
    DataItem [Cvel]
                          Constraints SPINDLE
+
                                Constraints SPINDLE
Linear  [X]
+
      Linear  [X]
DataItems
+
  DataItems
DataItem [Xpos]
+
    DataItem [Xpos]
Linear  [Y]
+
      Linear  [Y]
DataItems
+
  DataItems
DataItem [Ypos]
+
    DataItem [Ypos]
Linear  [Z]
+
      Linear  [Z]
DataItems
+
  DataItems
DataItem [Zpos]
+
    DataItem [Zpos]
Controller
+
    Controller
              Path
+
                  Path
    DataItems
+
  DataItems
  DataItem [mode]
+
    DataItem [mode]
  DataItem [execution]
+
    DataItem [execution]
 +
 
 
</source>
 
</source>
  
 
The above example shows how the various containers make it easier to address individual parts of the [[Terminology|XML]] document.  For example, if one wanted to retrieve only the ''[[Terminology|DataItems]]'' for the ''[[Terminology|Controller]]'', you can express this using the following [[Terminology|XPath]]: //Controller/DataItems/*.  If you were interested in retrieving only the ''subcomponets'' of the ''Axes'' [[Terminology|component]], you would write the following [[Terminology|XPath]]: //Axes/Components/*.
 
The above example shows how the various containers make it easier to address individual parts of the [[Terminology|XML]] document.  For example, if one wanted to retrieve only the ''[[Terminology|DataItems]]'' for the ''[[Terminology|Controller]]'', you can express this using the following [[Terminology|XPath]]: //Controller/DataItems/*.  If you were interested in retrieving only the ''subcomponets'' of the ''Axes'' [[Terminology|component]], you would write the following [[Terminology|XPath]]: //Axes/Components/*.

Revision as of 12:15, 5 August 2013

A DataItem is a piece of information that can be collected from a Device, Component, or subcomponent. A DataItem MAY report both a numeric value (a numeric quantity reported as either a Sample or Event category) and a health status (reported as a Condition category). A DataItem specifies the type of data being collected and an array of optional attributes that further defines that data. The value of the data is provided in the Streams response.

The Agent transmits data items associated with each Component to an application. The actual values for those data items are delivered in Streams.

DataItem Structure

Contents

DataItem Schema

A DataItem MUST specify the type of data being collected, the id of the DataItem, and the category of the item. Since many data item types provide both a value (reported as either a Sample or Event category) and a health status (reported as a Condition category), each DataItem MUST report a category for each data type to aid the application in determining the specific meaning of the data. The DataItem MAY specify a Source sub-element to identify where the physical connection to the data source originates; ex. data relative to a servo motor may actually originate from a measurement made in the controller.

DataItem Schema

A DataItem MAY also specify a subtype to further qualify the type of data being provided. Subtypes are required for certain data items. For example, the Position has two subtypes: ACTUAL and COMMANDED. These are two separate DataItem(s) that can be reported independently. See the sections below addressing Sample, Event, and Condition for a complete list of type/subtype relations.

DataItem Attribtes

DataItem Attributes

DataItem Attribute: Category

MTConnect® provides three different categories of DataItem - SAMPLE, EVENT, and CONDITION. The category will indicate where the results will be reported in the XML Document as a response to a Sample or Current request.

SAMPLE

A Sample is the reading of the value of a continuously variable or analog DataItem. A continuous value can be sampled at any point-in-time and will always produce a result. An example of a continuous DataItem is the Linear X axis position.
A DataItem of the category Sample that are continuous are always scalar floating point or integers that can have an infinite number of possible values. This is different from state or discrete type DataItem that has a limited number of possible values. A DataItem of category Sample MUST have units.

EVENT

A DataItem of the category Event comprises discrete information from the device. There are two types of Event: those representing state, with two or more discrete values; and those representing messages that contain plain text data. An example of a state type Event is a DoorStatus that can be either OPEN, UNLATCHED, or CLOSED. An example of a message type Event is a PROGRAM that can be any valid string of characters. A DataItem of category Event does not have intermediate values that vary over time, as do Samples. An Event can be thought of as streaming information that if taken at any point in time represents the current state of the device.

CONDITION

A DataItem that communicates the device’s health and ability to function. A DataItem of category Condition can be one of UNAVAILABLE, NORMAL, WARNING, or FAULT. A DataItem of category Condition MAY report multiple active conditions at one time; whereas a DataItem of category Sample or Event can only have a single value at any one point in time.

DataItem Attribute: coordinateSystem

A DataItem can specify an optional coordinate system that is being used. If not specified, the Axes coordinates MUST be MACHINE and the Path coordinates MUST be WORK. The possible values of coordinates are:

MACHINE

An unchangeable coordinate system that has machine zero as its origin.

WORK

The coordinate system that represents the working area for a particular workpiece whose origin is shifted within the MACHINE coordinate system. If the WORK coordinates are not currently defined in the device, the MACHINE coordinates will be used.

DataItem Attribute: units

Units MUST be specified for any DataItem with category Sample. The nativeUnits MAY also be specified if they apply to the type of data and if they differ from the units. The Agent is responsible for converting the nativeUnits to the units before sending them to the applications. In addition, nativeUnits MAY be scaled using the nativeScale attribute; for example, if the device measures velocity in 100 ft/min, MTConnect® would represent it with the following attributes: nativeUnits=“FEET/MINUTE” and nativeScale=“100”.

DataItem Attribute: statistic

The statistic attribute indicates that the data has been processed using a statistical operation like average, mean, or root square. statistic may be reported for any Sample type DataItem. These values are calculated values generated by the Component or Device providing additional data regarding a DataItem sampled over a specified period of time. All statistic data is reported in the standard units of the DataItem.

The value of statistic is periodically reset. When statistic values are reported as a Streams value, the value of the statistic MUST include an attribute Duration. Duration defines the time elapsed since the statistic calculation was last reset.

DataItem Statistics

DataItem Attribute: representation

The representation attribute defines the format for data consisting of multiple data points or a file presented as a single DataItem. Each representation will have a unique format defined for each representation. At this time, the only representations defined are TIME_SERIES and VALUE.

DataItem Representations

DataItem Attribute: nativeUnits

The nativeUnits attribute adds additional values to the units values. This is the list of nativeUnits currently supported by MTConnect® and the MTConnect® schema.

DataItem Native Units

DataItem Types

For a list of DataItem types for SAMPLE category, click here.

For a list of DataItem types for EVENT category, click here.

For a list of DataItem types for CONDITION category, click here.

Schema Structure for DataItems

The following document structure defines a typical machine with rotary and linear axes and a controller.

	MTConnectDevices
           Devices
	      Device
		 Components
		    Axes
		       Rotary [C]
                    	  DataItems
			     DataItem [Cvel]
                                Constraints SPINDLE
		       Linear  [X]
			  DataItems
			     DataItem [Xpos]
		       Linear  [Y]
			  DataItems
			     DataItem [Ypos]
		       Linear  [Z]
			  DataItems
			     DataItem [Zpos]
		    Controller
             	       Path
			  DataItems
			     DataItem [mode]
			     DataItem [execution]

The above example shows how the various containers make it easier to address individual parts of the XML document. For example, if one wanted to retrieve only the DataItems for the Controller, you can express this using the following XPath: //Controller/DataItems/*. If you were interested in retrieving only the subcomponets of the Axes component, you would write the following XPath: //Axes/Components/*.