robopipe.io
SolutionShopAbout UsDocumentationSupport
  • Welcome
  • Getting started
    • Setup
    • Hello world
  • Examples
    • Capsule counting
  • API
    • REST API Reference
      • Cameras
      • Streams
      • Neural Network
      • Controller
      • Analog I/O
      • Digital I/O
      • Led
    • WebSocket API Reference
      • Video Stream
      • NN Inference
    • Configuration
  • Other
    • Supported devices
    • Generic Devices
    • Troubleshooting
  • Resources
    • Robopipe Reddit
    • Robopipe GitHub
    • Luxonis
    • Unipi
Powered by GitBook
On this page
Edit on GitHub
  1. API
  2. REST API Reference

Analog I/O

PreviousControllerNextDigital I/O

Last updated 4 months ago

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
Responses
200
Successful Response
application/json
get
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
Path parameters
circuitstringRequired
Responses
200
Successful Response
application/json
422
Validation Error
application/json
get
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"
}

List All Analog Outputs

get
Responses
200
Successful Response
application/json
get
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
Path parameters
circuitstringRequired
Responses
200
Successful Response
application/json
422
Validation Error
application/json
get
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"
}
  • API Reference
  • GETList All Analog Inputs
  • GETGet Analog Input
  • POSTSet Analog Input
  • POSTSet All Analog Inputs
  • GETList All Analog Outputs
  • GETGet Analog Output
  • POSTSet Analog Output
  • POSTSet All Analog Outputs

Set Analog Input

post
Path parameters
circuitstringRequired
Body
modestring · enumOptionalDefault: VoltagePossible values:
Responses
200
Successful Response
application/json
422
Validation Error
application/json
post
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
Body
modestring · enumOptionalDefault: VoltagePossible values:
Responses
200
Successful Response
application/json
422
Validation Error
application/json
post
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"
  }
]

Set Analog Output

post
Path parameters
circuitstringRequired
Body
valuenumberRequired
modestring · enumOptionalDefault: VoltagePossible values:
Responses
200
Successful Response
application/json
422
Validation Error
application/json
post
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
Body
valuenumberRequired
modestring · enumOptionalDefault: VoltagePossible values:
Responses
200
Successful Response
application/json
422
Validation Error
application/json
post
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"
  }
]