Machine state and alarms from an MTConnect agent right in the chat
Connect an MTConnect agent to the AI agent: machine state, CONDITION alarms, program and part count. The agent gathers a shift's warnings and output.
How the agent works with MTConnect
An MTConnect agent usually sits on the site's network next to the machines, so the gateway reaches it: a program installed on a computer on the same network. The gateway is added on the Gateways tab and assigned to the connection. The connection takes the agent address, for example http://10.0.12.5:5000, and a device name if needed. While there is no link outside, the gateway keeps the data on disk.
The gateway reads the agent the way the standard's clients do: /probe gives the device model and every DataItem becomes a tag, /current gives the present, then /sample page by page from nextSequence. Each observation is read exactly once, with the agent's time. If observations have left the agent's ring buffer, the gateway reads /current again: intermediate values are lost, the present is not. An agent restart with a new instanceId reads the model again.
The gateway sends the agent only three GET requests: probe, current and sample. PUT and POST, an adapter's way of writing to the agent, are not used by the driver, so the agent receives nothing from the gateway and the machine is not controlled through it. CONDITION items become alarms at the Warning or Fault level; MTConnect has no acknowledgement, and the gateway does not pretend otherwise.
Polling waits the Scan interval (1000 ms by default) between requests, and none while the agent still has unread observations. A request that does not finish within the Timeout ends the round, and the gateway starts again from the position it remembered, also after its own restart. The machine state word comes from EXECUTION by the same rules as for FANUC controls over FOCAS, so one control reads the same by either path.
Integration scenarios
How the machines are now
The agent shows each machine of the MTConnect agent with its state word (running, interrupted, stopped, idle) and its number of active alarms.
Alarms and warnings
The agent collects Warning and Fault from CONDITION items over a shift with codes, texts and the time each was raised and cleared.
Program and parts
The agent reads the active program, the controller mode and the part count and shows how many parts were added over a period.
Running and downtime
The agent takes EXECUTION observations for a period and works out how long the machine ran, sat in feed hold or waited.
Spindle and overrides
The agent collects the history of spindle speed and feed and spindle overrides in intervals: minimum, maximum and average.
Machine identity
The agent names the manufacturer, model and serial number of each device from the agent's description.
MTConnect examples
5 предупреждений и одна авария, все сняты.
- Fault на фрезерном №3 в 10:24: перегрев шпинделя, снят через 18 минут
- 4 из 5 предупреждений по уровню СОЖ на токарных
Коды и тексты беру из элементов CONDITION агента MTConnect.
How to connect
Before you connect
- An MTConnect agent serving /probe, /current and /sample
- Network access to the agent from the gateway computer without a proxy
- A computer on the site's network for the gateway program
- For https://, an agent certificate the gateway trusts
- Server admits listed addresses only? Allow connections from 158.160.205.91 and 87.228.27.163.
- 1
Check that the agent answers
From the gateway computer open the agent address with /probe and /current: the agent must return XML. The gateway reaches it without a proxy and follows no redirects.
- 2
Choose the agent's device
If the agent serves several machines and you need one, enter the device name or UUID from /probe. Left empty, the gateway reads every device of the agent.
- 3
For https, trust the agent's certificate
If the agent's address is https:// with a self-signed certificate, put the certificate into pki/mtconnect/trusted/ in the gateway's data folder.
FAQ
Install the gateway on a computer on the site's network and add it on the Gateways tab. In the MTConnect connection enter the agent address, for example http://10.0.12.5:5000, and a device name or UUID if needed. Empty means every device of the agent.
The agent's device model as tags: SAMPLE and EVENT values with history, alarms from CONDITION, the manufacturer, model and serial number, and the derived state word of each machine, its program and part count when the agent declares them.
No. The gateway makes only the GET requests probe, current and sample. The driver has no PUT or POST to the agent, and a machine cannot be controlled through MTConnect.
No. The gateway asks for XML in every request (Accept: application/xml), and 2.x agents return it even when set to JSON by default. The driver reads the XML documents of every version.