Digital I/O
Digital inputs receive signals from external devices like switches, sensors, or push buttons, indicating whether a condition is active or inactive (e.g., a door is open or closed). Digital outputs enable the PLC to control devices such as relays, lights, or solenoids by sending on/off signals to activate or deactivate them. These I/O channels are essential for processes that rely on clear, binary decisions, ensuring reliable control of equipment and systems in automated operations. The main difference between digital I/O and analog I/O is that digital I/O provides binary values (on/off, true/false, ...). Digital I/O API provides interface for controlling all digital inputs and outputs on your controller.
API Reference
GET /controller/di HTTP/1.1
Host: robopipe-1.local
Accept: */*
Successful Response
[
{
"dev": "text",
"circuit": "text",
"counter_modes": [
"Enabled"
],
"modes": [
"Simple"
],
"value": 0,
"counter": 1,
"counter_mode": "Enabled",
"mode": "Simple",
"debounce": 50
}
]
GET /controller/di/{circuit} HTTP/1.1
Host: robopipe-1.local
Accept: */*
{
"dev": "text",
"circuit": "text",
"counter_modes": [
"Enabled"
],
"modes": [
"Simple"
],
"value": 0,
"counter": 1,
"counter_mode": "Enabled",
"mode": "Simple",
"debounce": 50
}
Enabled
Possible values: Simple
Possible values: 50
POST /controller/di/{circuit} HTTP/1.1
Host: robopipe-1.local
Content-Type: application/json
Accept: */*
Content-Length: 68
{
"counter": 1,
"counter_mode": "Enabled",
"mode": "Simple",
"debounce": 50
}
{
"dev": "text",
"circuit": "text",
"counter_modes": [
"Enabled"
],
"modes": [
"Simple"
],
"value": 0,
"counter": 1,
"counter_mode": "Enabled",
"mode": "Simple",
"debounce": 50
}
Enabled
Possible values: Simple
Possible values: 50
POST /controller/di HTTP/1.1
Host: robopipe-1.local
Content-Type: application/json
Accept: */*
Content-Length: 68
{
"counter": 1,
"counter_mode": "Enabled",
"mode": "Simple",
"debounce": 50
}
[
{
"dev": "text",
"circuit": "text",
"counter_modes": [
"Enabled"
],
"modes": [
"Simple"
],
"value": 0,
"counter": 1,
"counter_mode": "Enabled",
"mode": "Simple",
"debounce": 50
}
]
GET /controller/do/{circuit} HTTP/1.1
Host: robopipe-1.local
Accept: */*
{
"dev": "text",
"circuit": "text",
"modes": [
"Simple"
],
"pwm_freq": 1,
"pwm_duty": 1,
"value": 1,
"mode": "Simple"
}
Mutually exclusive with value. Value must be between 0 and 100
POST /controller/do/{circuit} HTTP/1.1
Host: robopipe-1.local
Content-Type: application/json
Accept: */*
Content-Length: 37
{
"pwm_freq": 1,
"pwm_duty": 1,
"value": 1
}
{
"dev": "text",
"circuit": "text",
"modes": [
"Simple"
],
"pwm_freq": 1,
"pwm_duty": 1,
"value": 1,
"mode": "Simple"
}
Mutually exclusive with value. Value must be between 0 and 100
POST /controller/do HTTP/1.1
Host: robopipe-1.local
Content-Type: application/json
Accept: */*
Content-Length: 37
{
"pwm_freq": 1,
"pwm_duty": 1,
"value": 1
}
[
{
"dev": "text",
"circuit": "text",
"modes": [
"Simple"
],
"pwm_freq": 1,
"pwm_duty": 1,
"value": 1,
"mode": "Simple"
}
]
Last updated