Analog I/O

Analog inputs allow the PLC to read variable values from sensors, such as temperature, pressure, or flow, by converting physical measurements into electrical signals, typically in the form of voltage (e.g., 0-10V) or current (e.g., 4-20mA). Conversely, analog outputs enable the PLC to control devices like motors, valves, or actuators by sending continuous electrical signals to adjust their operation with precision. These I/O channels are crucial for processes that require more than simple on/off control, providing fine-tuned adjustments to optimize performance in dynamic environments. Analog I/O API provides interface for controlling all analog inputs and outputs on your controller.

API Reference

List All Analog Inputs

get
/controller/ai
Responses
200

Successful Response

application/json
get
/controller/ai
GET /controller/ai HTTP/1.1
Host: robopipe-1.local
Accept: */*
200

Successful Response

[
  {
    "dev": "text",
    "circuit": "text",
    "modes": {
      "ANY_ADDITIONAL_PROPERTY": {
        "value": 1,
        "unit": "text",
        "range": []
      }
    },
    "mode": "Voltage"
  }
]

Get Analog Input

get
/controller/ai/{circuit}
Path parameters
circuitstringRequired
Responses
200

Successful Response

application/json
get
/controller/ai/{circuit}
GET /controller/ai/{circuit} HTTP/1.1
Host: robopipe-1.local
Accept: */*
{
  "dev": "text",
  "circuit": "text",
  "modes": {
    "ANY_ADDITIONAL_PROPERTY": {
      "value": 1,
      "unit": "text",
      "range": []
    }
  },
  "mode": "Voltage"
}

Set Analog Input

post
/controller/ai/{circuit}
Path parameters
circuitstringRequired
Body
modestring · enumOptionalDefault: VoltagePossible values:
Responses
200

Successful Response

application/json
post
/controller/ai/{circuit}
POST /controller/ai/{circuit} HTTP/1.1
Host: robopipe-1.local
Content-Type: application/json
Accept: */*
Content-Length: 18

{
  "mode": "Voltage"
}
{
  "dev": "text",
  "circuit": "text",
  "modes": {
    "ANY_ADDITIONAL_PROPERTY": {
      "value": 1,
      "unit": "text",
      "range": []
    }
  },
  "mode": "Voltage"
}

Set All Analog Inputs

post
/controller/ai
Body
modestring · enumOptionalDefault: VoltagePossible values:
Responses
200

Successful Response

application/json
post
/controller/ai
POST /controller/ai HTTP/1.1
Host: robopipe-1.local
Content-Type: application/json
Accept: */*
Content-Length: 18

{
  "mode": "Voltage"
}
[
  {
    "dev": "text",
    "circuit": "text",
    "modes": {
      "ANY_ADDITIONAL_PROPERTY": {
        "value": 1,
        "unit": "text",
        "range": []
      }
    },
    "mode": "Voltage"
  }
]

List All Analog Outputs

get
/controller/ao
Responses
200

Successful Response

application/json
get
/controller/ao
GET /controller/ao HTTP/1.1
Host: robopipe-1.local
Accept: */*
200

Successful Response

[
  {
    "dev": "text",
    "circuit": "text",
    "modes": {
      "ANY_ADDITIONAL_PROPERTY": {
        "value": 1,
        "unit": "text",
        "range": []
      }
    },
    "value": 1,
    "mode": "Voltage"
  }
]

Get Analog Output

get
/controller/ao/{circuit}
Path parameters
circuitstringRequired
Responses
200

Successful Response

application/json
get
/controller/ao/{circuit}
GET /controller/ao/{circuit} HTTP/1.1
Host: robopipe-1.local
Accept: */*
{
  "dev": "text",
  "circuit": "text",
  "modes": {
    "ANY_ADDITIONAL_PROPERTY": {
      "value": 1,
      "unit": "text",
      "range": []
    }
  },
  "value": 1,
  "mode": "Voltage"
}

Set Analog Output

post
/controller/ao/{circuit}
Path parameters
circuitstringRequired
Body
valuenumberRequired
modestring · enumOptionalDefault: VoltagePossible values:
Responses
200

Successful Response

application/json
post
/controller/ao/{circuit}
POST /controller/ao/{circuit} HTTP/1.1
Host: robopipe-1.local
Content-Type: application/json
Accept: */*
Content-Length: 28

{
  "value": 1,
  "mode": "Voltage"
}
{
  "dev": "text",
  "circuit": "text",
  "modes": {
    "ANY_ADDITIONAL_PROPERTY": {
      "value": 1,
      "unit": "text",
      "range": []
    }
  },
  "value": 1,
  "mode": "Voltage"
}

Set All Analog Outputs

post
/controller/ao
Body
valuenumberRequired
modestring · enumOptionalDefault: VoltagePossible values:
Responses
200

Successful Response

application/json
post
/controller/ao
POST /controller/ao HTTP/1.1
Host: robopipe-1.local
Content-Type: application/json
Accept: */*
Content-Length: 28

{
  "value": 1,
  "mode": "Voltage"
}
[
  {
    "dev": "text",
    "circuit": "text",
    "modes": {
      "ANY_ADDITIONAL_PROPERTY": {
        "value": 1,
        "unit": "text",
        "range": []
      }
    },
    "value": 1,
    "mode": "Voltage"
  }
]

Last updated