MTConnect Agent Configuration
The agent plugin can handle multiple agent instances. Each of them has its own context and runs as an independent task.
The service is configured in the settings.json
. It contains all settings of the agent plugin.
Service Instances
Each service instance represents a MTConnect agent and has its own configuration.
Attribute | Description | Data Type |
---|---|---|
Id | Instance Id | System.Guid |
Parameter | Description | Data Type |
---|---|---|
Port | Listening port of the agent | System.Int32 |
Name | Name of the agent. Default is "mtc" | System.String |
SyntaxVersion | Version of the MtConnect syntax. Default is '1.3' | System.String |
BufferSize | Buffer size of the agent sample buffer. Default is 1024 samples | System.Int32 |
Example
{
"Disable": false,
"Agents": [
{
"Id": "79742628-1E34-4A83-A7C0-C46EA24EA9FA",
"Name": "Agent1",
"Port": 8085,
"SyntaxVersion": "1.8",
"BufferSize": 4048
}
]
}
MTConnect Data Model
The MTConnect data model is typically configured and setup in the device information file of any device. MTConnect specification foresees a very detailed definition of data points which goes far beyond the default properties of HumanOS® based data access points.
To meet the specification requirements, customized properties can be added to the any group and data access points.
Enriching Device Information
The device is mapped to a MTConnect device.
Attribute | Description | Data Type |
---|---|---|
mtc:DeviceName | Optional. Overrides the device name. Must be a valid NMTOKEN. | System.String |
mtc:DeviceId | Optional. Sets the device id. Default is the GUID of the device. | System.String |
Enriching Component Information
Any group information is mapped to a component (or sub-component) of the device.
Attribute | Description | Data Type |
---|---|---|
mtc:ComponentName | Optional. Overrides the component name. If provided it must be a valid NMTOKEN. | System.String |
mtc:ComponentType | Optional. Overrides the component type. Default is "Component". Must be a valid NMTOKEN. | System.String |
mtc:ComponentId | Optional. Sets the component id. Default is the GUID of the group. | System.String |
The specification of MTConnect declares following component types. Note the hierarchical structure:
- Axes
- Linear
- Rotary
- Chuck
- Controller
- Path
- Systems
- Hydraulic
- Pneumatic
- Coolant
- Lubrication
- Electric
- Enclosure
- Protective
- ProcessPower
- Feeder
- Dielectric
- EndEffector
- Auxiliaries
- Loader
- WasteDisposal
- ToolingDelivery
- BarFeeder
- Environmental
- Sensor
- Deposition
- Resources
- Materials
- Stock
- Materials
- Interfaces
Example of MtConnect Component: Shows an example enriching a component with name and id.
{
"Id": "8f0b422b-d363-4e3b-85ad-564909f61483",
"Name": "Fanuc Controller",
"Properties": [
{
"Name": "mtc:ComponentType",
"Value": "Controller"
},
{
"Name": "mtc:ComponentId",
"Value": "Lct1"
}
]
}
Enriching Events, Condition and Sample Information
Following table shows the HumanOS® predefined properties for data access points and their mapping to MTConnect:
Attribute | Description | Data Type |
---|---|---|
Id | Id of data node is mapped directly to MTConnect id | System.Guid |
Name | Name is mapped to DataItemName | System.String |
Units | Units are transformed to the units specification of MTConnect | System.String |
DataClass | Streams are mapped to MTConnect sample class; Events are mapped to MTConnect event or condition class, dependent on whether the property mtc:ConditionValues exists | EDataClass |
Some MTConnect settings can be specified as extra properties:
Attribute | Description | Data Type |
---|---|---|
mtc:Ignore | Ignore the data node completely | System.Boolean |
mtc:DataItemId | Optional property to specify a data item id. Default is the GUID of the data access. | System.String |
mtc:DataItemName | Optional property to specify a data item name. Default is the name of the data access. Must be a valid NMTOKEN. | System.String |
mtc:InformationType | Type of the event, condition or sample class | System.String |
mtc:InformationSubType | Subtype of the event, condition or sample class | System.String |
mtc:Values | Optional value mapping. Each mapping must be separated with ; . The wildcard * indicates "any value". Example: 1=VALUE1;2=Value2;*=Value3 | System.String |
mtc:ConditionValues | Optional condition value mapping. See Condition Node below | System.String |
Condition Node
If the property mtc:ConditionValues
is created, the data node is treated as a condition.
The Property must contain a value mapping structured as follows:
- Each mapping must be separated with ";"
- Each mapping must contain one of the following values
- Normal
- Warning
- Fault
- The wildcard
*
indicates "any value".
Example:
1=Normal;2=Warning;*=Fault
Example of MTConnect Event
Example showing customized data item id and value mapping. Note that the name of the data node is taken as the dataItemName in MtConnect. Therefore the data node name must be a NMTOKEN.
{
"Id": "19ddf2b6-3ccb-42c1-9ccc-bc3453917dae",
"Name": "CncRunningState",
"DataType": "System.Int32",
"Unit": "",
"Address": "Nc1.Dynamic.Float64:5",
"Access": {
"Read": true,
"Receive": true
},
"HistoryMode": {
"Retention": 8000,
"SamplingRate": 2000
},
"Properties": [
{
"Name": "mtc:InformationType",
"Value": "EXECUTION"
},
{
"Name": "mtc:DataItemId",
"Value": "Lpexecution"
},
{
"Name": "mtc:Values",
"Value": "*=INACTIVE;1=PROGRAM_STOPPED;2=FEED_HOLD;3=ACTIVE"
}
]
}
Example of MTConnect Sample:
This example shows a data sample configuration. Note that the dataItemName
is overwritten by the property mtc:DataItemName
.
{
"Id": "561AF35C-18D3-421F-8874-C3359782F2A6",
"Name": "Current Spindle Speed",
"DataType": "System.Double",
"DataClass": "Stream",
"Unit": "1/min",
"Address": "Nc1.Dynamic.Float64:3",
"Access": {
"Read": true,
"Receive": true
},
"HistoryMode": {
"Retention": 500,
"SamplingRate": 2000
},
"Properties": [
{
"Name": "mtc:DataItemName",
"Value": "CurrentSpindleSpeed"
},
{
"Name": "mtc:InformationType",
"Value": "SPINDLE_SPEED"
},
{
"Name": "mtc:InformationSubType",
"Value": "ACTUAL"
}
]
}
Maps to MTConnect sample (call http://localhost:8085/probe)
<DataItem category="SAMPLE" id="15c40e92-45ad-4fd8-838c-8f2f397d7dc7" type="STREAM" units="MILLIMETER/SECOND" nativeUnits="MILLIMETER/MINUTE" name="Current Axis Feed" />
Example of MTConnect Condition:
{
"Id": "1BBC0F82-FE7F-4249-87D3-9660F91B1C2A",
"Name": "Available",
"DataType": "System.Int32",
"DataClass": "Event",
"Unit": "",
"Address": "Global.System.Control.Int32:0",
"Access": {
"Read": true,
"Receive": true
},
"Properties": [
{
"Name": "mtc:ConditionValues",
"Value": "1=Normal;2=Warning;*=Fault"
}
]
}
Unit Mapping
HumanOS® uses the metric ISO units, like [mm] or [1/min]. These units must be mapped to MTConnect protocol spec.
HumanOS® (native) | MTConnect® |
---|---|
A | AMPERE |
°C | CELSIUS |
Number | COUNT |
dB | DECIBEL |
° | DEGREE |
°/s | DEGREE/SECOND |
°/s^2 | DEGREE/SECOND^2 |
Hz | HERTZ |
J | JOULE |
kg | KILOGRAM |
l | LITER |
l/s | LITER/SECOND |
urad | MICRO_RADIAN |
mm | MILLIMETER |
mm/min | MILLIMETER/SECONDS* |
m/s | MILLIMETER/SECONDS* |
mm/s | MILLIMETER/SECONDS |
mm/s^2 | MILLIMETER/SECOND^2 |
<not supported> | MILLIMETER_3D |
N | NEWTON |
Nm | NEWTON_METER |
O | OHM |
Pa | PASCAL |
Pas | PASCAL_SECOND |
% | PERCENT |
Ph | PH |
1/min | REVOLUTION/MINUTE |
s | SECOND |
S/m | SIEMENS/METER |
V | VOLT |
VA | VOLT_AMPERE |
<not supported> | VOLT_AMPERE_REACTIVE |
W | WATT |
Ws | WATT_SECOND |
(*) mapping of units also includes conversion of the value itself.
Component Structure
MTConnect suggests a detailed component structure of the devices. The component structure can be achieved by grouping data nodes in the device information file.
The component name is given by an extra property:
Attribute | Description | Data Type |
---|---|---|
mtc:ComponentName | Name of the component node in MTConnect | System.String |
{
"Id": "ECE37FDF-4862-4543-AF23-48FFDB8203C7",
"Name": "Machine",
"DriverId": "B3CCD1A7-A49B-46FC-B983-5284992F6444",
"Address": "CNC-1",
"Groups": [
{
"Id": "A19370F6-91A1-47E2-86E2-CC67050482C4",
"Name": "MachineAxes",
"Properties": [
{
"Name": "mtc:ComponentType",
"Value": "Axes"
}
],
"Groups": [
{
"Id": "3C141482-35AA-4369-9F09-841448487CD8",
"Name": "X",
"Properties": [
{
"Name": "mtc:ComponentType",
"Value": "Linear"
}
],
"DataNodes": [
{
"Id": "13BB68D0-3B8E-42B9-A5BC-993E5B0D49A8",
"Name": "X-Position-Absolute",
"DataType": "System.Double",
"DataClass": "Stream",
"Unit": "mm",
"Address": "Nc1.Dynamic.Float64:200°1",
"Access": {
"Read": true,
"Receive": true
},
"HistoryMode": {
"Retention": 1,
"SamplingRate": 2000
},
"Properties": [
{
"Name": "mtc:InformationType",
"Value": "POSITION"
},
{
"Name": "mtc:InformationType",
"Value": "ACTUAL"
}
]
}
]
},
{
"Id": "EF8C291F-E016-4AAF-96D5-EE90B8EBB0DB",
"Name": "Y",
"Properties": [
{
"Name": "mtc:ComponentType",
"Value": "Linear"
}
],
"DataNodes": [
{
"Id": "8C10067A-1AC1-41AB-8619-604978DBDEBF",
"Name": "Y-Position-Absolute",
"DataType": "System.Double",
"DataClass": "Stream",
"Unit": "mm",
"Address": "Nc1.Dynamic.Float64:200°2",
"Access": {
"Read": true,
"Receive": true
},
"HistoryMode": {
"Retention": 1,
"SamplingRate": 2000
},
"Properties": [
{
"Name": "mtc:InformationType",
"Value": "POSITION"
},
{
"Name": "mtc:InformationType",
"Value": "ACTUAL"
}
]
}
]
}
]
}
]
}
Maps to the MTConnect device structure (http://localhost:8085/probe):
<Devices>
<Device id="ece37fdf-4862-4543-af23-48ffdb8203c7" name="Rollomatic 233" uuid="ece37fdf-4862-4543-af23-48ffdb8203c7">
<DataItems>
<DataItem category="EVENT" id="87da9093-b415-45cf-83a0-5af75177c4c1" type="AVAILABILITY" name="Available" />
<DataItem category="EVENT" id="ece37fdf-4862-4543-af23-48ffdb8203c7" type="AVAILABILITY" />
</DataItems>
<Components>
<Component id="fa1611ab-b6c9-4ff4-b34d-bf35e6a44232" name="AlarmEventPool" />
<Axes id="a19370f6-91a1-47e2-86e2-cc67050482c4" name="MachineAxes">
<Components>
<Linear id="3c141482-35aa-4369-9f09-841448487cd8" name="X">
<DataItems>
<DataItem category="SAMPLE" id="13bb68d0-3b8e-42b9-a5bc-993e5b0d49a8" type="POSITION" units="MILLIMETER" name="X-Position-Absolute" subType="ACTUAL" />
</DataItems>
</Linear>
<Linear id="ef8c291f-e016-4aaf-96d5-ee90b8ebb0db" name="Y">
<DataItems>
<DataItem category="SAMPLE" id="8c10067a-1ac1-41ab-8619-604978dbdebf" type="POSITION" units="MILLIMETER" name="Y-Position-Absolute" subType="ACTUAL" />
</DataItems>
</Linear>
<Rotary id="e05c2439-ca1a-44db-8af1-32f4e2f20d2f" name="C">
<DataItems>
<DataItem category="SAMPLE" id="561af35c-18d3-421f-8874-c3359782f2a6" type="ROTARY_VELOCITY" units="REVOLUTION/MINUTE" name="Current Spindle Speed" subType="ACTUAL" />
</DataItems>
</Rotary>
</Components>
</Axes>
</Components>
</Device>
</Devices>
Multiple Devices
The HumanOS® MTConnect Agent is able to handle multiple device instances. Assume there are 10 FANUC machines connected to the HumanOS IoT Gateway. All machines are accessible through a single MTConnect agent collecting and buffering all events and samples of these ten machines.
To query a specific machine, use the machine name in the URL.
Probes all devices at once: http://localhost:8085
Probes only the "Machine-1" device: http://localhost:8085/Machine-1/probe
Glossary
- NMTOKEN: The data type for XML identifiers.
Note: The identifier must start with a letter, an underscore "
_
" or a colon. The next character must be a letter, a number, or one of the following ".
", "-
", "_
", ":
". The identifier must not have any spaces or special characters.
OPC-UA to MTConnect Bridge
HumanOS® IoT Gateway is able to bridge the OPC-UA to MTConnect protocol. OPC-UA enabled devices can be connected using the OPC-UA control driver. The data access points are specified in the device information file.