TRB246 Input/Output
The information in this page is updated in accordance with firmware version TRB2M_R_00.07.22.
Summary
Inputs and outputs are used for monitoring and controlling a connected device or receiving signals from that device in order to trigger certain events.
This chapter of the user manual provides an overview of the Input/Output section for TRB246 devices.
Physical characteristics and I/O pin mapping
Electrical characteristics and I/O pin mapping information are presented below.
16 pin Connector Pinout
- +: 9-30 VDC positive (+).
- D1, D2, D3 - programmable input/output pins; can be set to:
- open collector (OC) output; max 30 V, 300 mA;
- digital input; 0-6 V is detected as logic "low"; 8-30 V is detected as logic "high".
- CTS - RS232 clear data to send (output).
- RTS - RS232 request data to send (input).
- R+ - RS485 receiver positive signal.
- D+ - RS485 driver positive signal.
- - - negative/ground (-).
- ⏚ - GND pins for D1, D2, D3, A, RS232 and RS485
- A - Analog input. Voltage range: 0-30 V.
- TX - RS232 transmitted data (input).
- RX - RS232 received data (output).
- R- - RS485 receiver negative signal.
- D- - RS485 driver negative signal.
- Note: input circuit components have tolerance of +-1%.
Status
The Status page displays the current states of the device's input and output pins:
Note: You can edit the ADC/ACL formula to customize values and other Input/Output inversions, relays closures, if supported by the device, by clicking the edit button in the "Actions" column.
Example - Custom I/O status labels for "Analog input":
Example - Custom I/O status labels for "Analog current loop":
Status from command line
You can also obtain the status of input and output pins via the command line (CLI or SSH). List of possible ubus values in TRB246 devices:
ioman.adc.adc0 - Analog input ioman.gpio.dio0 - Configurable input/output (PIN2) ioman.gpio.dio1 - Configurable input/output (PIN3) ioman.gpio.dio2 - Configurable input/output (PIN4)
Call command ubus call value status :
root@Teltonika-TRB246:~# ubus call ioman.gpio.dio0 status
{
"value": "0",
"direction": "out",
"bi_dir": true,
"invert_input": false
}
- dio0 is configurable input / output:
- "value": "0" means low level state.
- "value": "1" means high level state.
- "direction": "in" means input state.
- "direction": "out" means output state.
- adc0 is analog input:
- "value": "0.54" means 0.54V.
To change input settings, use the update command and specify a value:
ubus call ioman.gpio.dio0 update '{"value":"0"}'
ubus call ioman.gpio.dio0 update '{"value":"1"}'
ubus call ioman.gpio.dio0 update '{"direction":"in"}'
ubus call ioman.gpio.dio0 update '{"direction":"out"}'
Note: Changes of configurable pin type from output to input (and reverse) could causes the issues where the specific type was set in configurations. Make sure that configurations do not contradict one another.
Scheduler
The output Scheduler can be used to configure a timetable of when an output should be turned on or off, based on days of the week or month and hours of the day. The General Configuration section is used to turn the Output Scheduler on or off.
Note: I/O Scheduler is additional software on some devices that can be installed from the System → Package Manager page.
The Scheduler is configured in the form of Instances. A Scheduler Instance defines a time interval during which the state of an output associated with the instance will be set to "High". The Output Scheduler Instances list is empty by default. Click the 'Add' button in order to create a new Scheduler Instance:
After this you should be redirected to the configuration page for the newly added Instance which should look similar to this:
| Field | Value | Description |
|---|---|---|
| Enable | off | on; default: off | Turns the Scheduler Instance on or off. |
| Pin | output pin; default: P. S. Different devices have different output settings. | Output pin. The state of the selected output will be set to "High" during the time interval defined in the fields below. |
| Interval Type | Weekdays | Month Days; default: Weekdays | Selects the interval type for scheduler to use. |
| Start Day | [Monday..Sunday] | [1..31]; default: Monday | 1 | The day that marks the start of the time interval. |
| Start Time | hh:mm ([00..23]:[00..59]); default: 12:00 | The hour and minute that mark the start of the time interval. |
| End Day | [Monday..Sunday] | [1..31]; default: Tuesday | 1 | The day that marks the end of the time interval. |
| End Time | hh:mm ([00..23]:[00..59]); default: 12:00 | The hour and minute that mark the end of the time interval. |
| Force Last Day | off | on; default: off | Forces intervals to accept last day of month as a valid option if selected day does not exist during ongoing month. This field becomes visible only when 'Interval Type' is set to Month Days. |
Note: A Scheduler Instance will not work unless you turn both the the Scheduler service and the individual instance on.
Impulse Counter
Impulse Counter service can register chages in the `Configurable Input/Output` state of a Power socket when a value is transitioned from low to high, from high to low, or both.
Configuration
The configuration page is used to enable impulse counter and select GPIO pins for input configuration.
Impulse counter configuration
| Field | Value | Description |
|---|---|---|
| Status | Status of service, whether it is currently running. | |
| Enabled | off | on; default: off | Enable impulse counter. |
| Count store duration | Hour | Day | Week | Month; default: Day | Define for how long the impulse counts are retained, in seconds, before being reset. |
| Reset counts | -(interactive buttom) | Reset collected impulse counts. |
Input configuration
A Input configuration defines which `Configurable Inputs/Outputs` will be used for impulse counting. Input configuration list is empty by default. Click the 'Add' button in order to create a new Input instance:
You will then be taken to the configuration page for the newly added input:
| Field | Value | Description |
|---|---|---|
| Enable | off | on; default: on | Enable input configuration. |
| Name | string; default: none | Name of input configuration. |
| GPIO pin | Configurable Input/Output (3) | Configurable Input/Output (4) ; default: Configurable Input/Output (3) | Select GPIO pin for input configuration. |
| Edge | Rising | Falling | Both; default: Rising | Select the edge option to have the impulse counter increment on the signal`s transition from low to high, high to low, or both. |
| Debounce | integer; default: 0 | Debounce filters out rapid, unintended signals. Set between 0-1000 ms to ensure only stable inputs are registered. |
Statistics
Statistics page displays PIN statistics in routers local time.








