• No results found

MTConnect Application Development. Leveraging Web Technologies

N/A
N/A
Protected

Academic year: 2021

Share "MTConnect Application Development. Leveraging Web Technologies"

Copied!
29
0
0

Loading.... (view fulltext now)

Full text

(1)

MTConnect Application

Development

Leveraging Web

Technologies

(2)

Background

Benjamin Kiefer

University of Waterloo B. Asc – Mechatronics

Pratt & Whitney – Controls Software

Jared Evans

University of Waterloo B. Asc

Apple Inc – HW Engineering Manager

MAJiK Systems

(3)

Why Use Web Applications in Manufacturing

Available to everyone within your organization

Operating System Independent

(4)

Why MTConnect is a Good Fit

Based off of HTTP Protocol

RESTful Interface

(5)

Structure of a Web Application

Clients

Application Server

Data/API Server

Database

Other Data Sources

Application Server

Data/API Server

Database

(6)

Data Sources

Traditional Web Applications:

People are the source of all data

Emerging Trends:

Web-Enabled Devices, Servers, and ‘Agents’

provide data as well as people

API Design becomes a huge factor for anyone

(7)

HTTP Protocol

Foundation of the World Wide Web

Application Level Protocol

Uses TCP for its transport layer protocol

Request-Response Based Protocol

(8)

RESTful Interface

Representational State Transfer

Stateless – Client’s responsibility to track its own

state

Uniform Interface – Resources and Information

always accessed the same way

Scalability and Performance – Separation of data

(9)

HTTP REST Example

https://www.facebook.com/search/bwkiefer/friends

https://www.google.ca/search?q=mtconnect+institute

(10)

MTConnect Example

(11)

Developing with REST

Language Independent

Distributes Computing Load

Standardizes API and Data Representation for

(12)

Developing Using MTConnect

Your application is the ‘Client’, the MTConnect

Agent is the ‘Server’

Your Application requests data from the

MTConnect Agent based on your needs

Agent responds with requested data

Your application parses data and completes

(13)

MTConnect Overview

MTConnect

Standard

Agent

Adapte

r

CNC Machine

MTConnect App

Adapte

r

CNC Machine

Adapte

r

Sensor

Adapte

r

HMI

Agent

Data

F

lo

w

(14)

MTConnect Basics

Probe

Describes Agent’s Devices, Components, and Data Items

Assets

– Things associated with a device that are not a component

Sample

– Retrieves values for components’ Data Items

(15)

Data Hierarchy within the Agent

(16)

Configuring an Agent

Source Code

-

https://github.com/mtconnect/cppagent

Agent.cfg – Boost C++ File Format that tells the agent

where the adapters it is connecting to should be located

Devices.xml – Same format as an MTConnectDevices

document. Data served by adapter should match a

DataItem tag in Devices.xml

(17)

Components and Data Items

Adapter Data Output:

2013-05-13T16:00:05.0000Z|mode|AUTOMATIC

Agent DataItem:

<DataItem type="CONTROLLER_MODE" category="EVENT" id="p2" name="mode"/>

Agent tries to map Adapter data to a DataItem that

has an ID, Name, or Source that matches Adapter Key

(18)

Running an Agent from your

Command Line

Build MTConnect Agent

Agent.cfg

Devices.xml

Run Mtconnect Agent

(19)

What Data Are You Interested In?

Sample – Values read from the Device at a certain

time

Event – State or Message from the Device

(20)

MTConnect XML Format

MTConnectDevices Devices Device Components Axes Rotary [C] DataItems DataItem [Cvel] Constraints Linear [X] DataItems DataItem [Xpos] Linear [Y] DataItems DataItem [Ypos] Controller Path DataItems DataItem [Cvel] <MTConnectDevices> <Header></Header> <Devices> <Device> <Axes> <Rotary>...</Rotary> <Linear>…</Linear> </Axes> </Device> </Devices> </MTConnectDevices>
(21)

Probing The Agent

Your

Application

MTConnect

Agent

GET Request: http://agent.mtconnect.org/probe 200 OK <MTConnectDevices …> <Header>…</Header> <Devices> <Device name=“mill”>…</Device> <Device name=“lathe”>…</Device> </Devices> </MTConnectDevices> Store Devices the Agent Returns in Device Queue
(22)

Probing Individual Devices

Your

Application

MTConnect

Agent

For Each Device in Device Queue: GET Request: http://agent.mtconnect.org/<deviceName>/probe 200 OK <MTConnectDevices …> <Header>…</Header> <Devices> <Device name=“deviceName”>…<Device> </Devices> </MTConnectDevices> Device Queue

(23)

Current

Your

Application

MTConnect

Agent

GET Request: http://agent.mtconnect.org/<deviceName>/current 200 OK <MTConnectStreams …> <Header nextSequence=“123”>…</Header> <Streams> <DeviceStream name=“device”>…<DeviceStream> </Streams> </MTConnectStreams> Device Queue Store ‘nextSequence’ For Each Device in Queue
(24)

Sample

Your

Application

MTConnect

Agent

GET Request: http://agent.mtconnect.org/<deviceName>/sample?from=‘124’&count=100 200 OK <MTConnectStreams …> <Header nextSequence=“159”>…</Header> <Streams> <DeviceStream name=“device”>…<DeviceStream> </Streams> </MTConnectStreams> Device Queue Store ‘nextSequence’ For Each Device in Queue
(25)

Sample

Your

Application

MTConnect

Agent

GET Request: http://agent.mtconnect.org/<deviceName>/sample?from=‘160’&count=100 200 OK <MTConnectStreams …>

<Header nextSequence=“201”>…</Header>

<Streams> <DeviceStream name=“device”>…<DeviceStream> </Streams> </MTConnectStreams> Device Queue Store ‘nextSequence’ For Each Device in Queue

(26)

Streaming ‘Real-Time’ with MTConnect

http://agent.mtconnect.org/sample?interval=0&heartbeat=1000

Interval – Send data every 0 ms (if data is available)

Heartbeat – If there is no data available, the agent must send

out a heartbeat to maintain contact with the client every 1000

(27)

Fault Tolerance

Applications can be made fault tolerant by persisting

‘nextSequence’ number

If application is disconnected from Agent, it can pick up from where

it left off after re-establishing connection

Agent’s Buffer has finite memory. Like other application level

protocols, if Agent’s Buffer is exceeded during period that

application is disconnected, information is permanently lost

(28)

Where to Send Data

Real Time Data can be sent directly to Clients through Web

(29)
https://www.facebook.com/search/bwkiefer/friends https://www.google.ca/search?q=mtconnect+institute https://github.com/mtconnect/cppagent http://agent.mtconnect.org/sample?interval=0&heartbeat=1000

References

Related documents

We em- ploy a recursive framework for real-time, 3-D tracking of human motion that enables pixel-level, probabilistic processes to take advantage of the contextual knowledge encoded

In polar coordinates, iris boundaries are horizontal edge points, non-iris boundary that caused by iris textures, eyelashes, eyelids, and lamp-house are not horizontal edge points..

concentrate on the objective at hand, not on equipment. This &#34;forgiveness&#34; doesn't end when the shaft leaves your bow. Suppose the arrow passes near a branch or twig. If

To address these questions, the following goals were set: (a) to reproduce field explosions pertaining to primary blast injury as accurate as possible in a controlled

The code allows simulation of key facilities of the external fuel cycle (fuel fabrication and reprocessing facilities, SNF storage, uranium, plutonium, neptunium, americium and

“ the seven words of our LORD on

The exact estimation of quantization effects requires numerical simulation and is not amenable to exact analytical methods.. But an approach that has proven useful is to treat

In memory of Harold Taub, beloved husband of Paula Taub by: Karen &amp; Charles Rosen.. Honouring Maria Belenkova-Buford on her marriage by: Karen &amp;