Skip to content

PLCs

System-level endpoints for listing and inspecting PLC connections.

List PLCs

GET /api/plcs

Returns all configured PLC targets with their connection status.

curl http://localhost:5000/api/plcs
{
  "data": [
    { "plcId": "Line1", "displayName": "Assembly Line 1", "isConnected": true },
    { "plcId": "Line2", "displayName": "Assembly Line 2", "isConnected": false }
  ],
  "error": null
}

Get PLC Status

GET /api/plcs/{plcId}/status

Returns detailed status for a single PLC, including ADS state when connected.

curl http://localhost:5000/api/plcs/Line1/status
{
  "data": {
    "plcId": "Line1",
    "displayName": "Assembly Line 1",
    "isConnected": true,
    "adsState": "Run"
  },
  "error": null
}

Returns 404 with PLC_NOT_FOUND if the alias doesn’t exist.