Device Reference
Complete reference of all Brainboxes devices supported by the Brainboxes.IO library.
ED-Series (Ethernet Remote IO)
ED-series devices provide digital and/or analog IO lines accessible over Ethernet. All ED devices connect via TCPConnection and support both ASCII (port 9500) and Modbus TCP (port 502) protocols.
Digital IO Devices
| Class | Product | Digital Inputs | Digital Outputs | Description |
|---|---|---|---|---|
ED588 | ED-588 | 8 | 8 | 8 DI + 8 DO + Serial Gateway |
ED516 | ED-516 | 16 | 0 | 16 Digital Inputs + Serial Gateway |
ED527 | ED-527 | 0 | 16 | 16 Digital Outputs + Serial Gateway |
ED538 | ED-538 | 8 | 4 (relay) | 8 DI + 4 Relays + Serial Gateway |
ED004 | ED-004 | 4 | 4 | 4 DIO + RS-232 |
ED204 | ED-204 | 4 | 4 | 4 DIO + RS-232 |
ED008 | ED-008 | 8 | 8 | 8 Digital IO Ports |
ED038 | ED-038 | 3 | 3 (relay) | 3 Relays + 3 Digital Inputs |
Analog IO Devices
| Class | Product | Analog Inputs | Analog Outputs | Sensor Type | Description |
|---|---|---|---|---|---|
ED549 | ED-549 | 8 | 0 | Voltage/Current/Temp | 8 Analog Inputs + Serial Gateway |
ED560 | ED-560 | 0 | 4 | Voltage/Current | 4 Analog Outputs + Serial Gateway |
ED582 | ED-582 | 4 | 0 | RTD (PT100/PT1000) | 4 RTD Temperature Inputs + Serial Gateway |
ED593 | ED-593 | 8 | 0 | Thermocouple | 8 Thermocouple Inputs + Serial Gateway |
Edge Controller
| Class | Product | Digital IO | Serial Ports | Description |
|---|---|---|---|---|
BB400 | BB-400 | 8 | 1 | Industrial Raspberry Pi Edge Controller |
The BB-400 has the same IO as the ED-008 but also runs Linux, allowing code to execute locally on the device.
Digital I/O vs Digital Inputs and Digital Outputs
Note ED-008, ED-004, ED-204 and BB-400 have Digital IO Lines. These lines can behave as either inputs or outputs depending on how they are wired (see manual). From a software perspective simply treat the device as having distinct input and distinct outputs and only read the data which is useful.
E.g. BB-400 has DIO 0 connected to an LED (output) and DIO 1 connected to a button (input)
// connect to BB-400
using (EDDevice ed = EDDevice.Create("192.168.0.100"))
{
// set DIO0, wired to LED, to ON
ed.Outputs[0].Value = 1;
// read DIO1, wired to button, input state
Console.WriteLine($"Button is: {ed.Inputs[1].Value == 1 ? 'on':'off'}");
}
ES-Series (Ethernet to Serial)
ES-series devices convert Ethernet TCP/IP connections to physical serial ports. Each port connects via its own TCP connection (ports 9001, 9002, etc.).
Light Industrial RS-232 Devices
| Class | Product | Ports | Description |
|---|---|---|---|
ES246 | ES-246 | 1 | 1-port RS-232 |
ES257 | ES-257 | 2 | 2-port RS-232 |
ES357 | ES-357 | 2 | Enhanced 1-port RS-232 + 1-port RS422/485 |
ES446 | ES-446 | 1 | PoE 1-port RS-232 |
ES457 | ES-457 | 2 | PoE 2-port RS-232 |
ES701 | ES-701 | 4 | 4-port RS-232 |
ES279 | ES-279 | 8 | 8-port RS-232 |
Light Industrial RS-422/485 Devices
| Class | Product | Ports | Description |
|---|---|---|---|
ES313 | ES-313 | 1 | 1-port RS-422/485 |
ES320 | ES-320 | 2 | 2-port RS-422/485 |
ES413 | ES-413 | 1 | PoE 1-port RS-422/485 |
ES420 | ES-420 | 2 | PoE 2-port RS-422/485 |
ES346 | ES-346 | 4 | 4-port RS-422/485 |
ES842 | ES-842 | 8 | 8-port RS-422/485 |
Industrial RS-232/422/485 Devices
| Class | Product | Ports | Description |
|---|---|---|---|
ES511 | ES-511 | 1 | Industrial 1-port RS-232/422/485 |
ES522 | ES-522 | 2 | Industrial 2-port RS-232/422/485 |
ES551 | ES-551 | 1 | Industrial Isolated 1-port RS-422/485 |
ES571 | ES-571 | 1 | Industrial 1-port RS-422/485 + Ethernet Switch |
Common Patterns
Factory Method (recommended)
The factory method auto-detects the device type by connecting and reading the device's XML configuration:
// ED-series: returns the correct subclass (ED588, ED516, etc.)
using (EDDevice ed = EDDevice.Create("192.168.0.100"))
{
Console.WriteLine($"Found: {ed.GetType().Name}");
Console.WriteLine($"Full Debug Description: {ed.Describe()}");
}
// ES-series: returns the correct subclass (ES246, ES257, etc.)
ESDevice es = ESDevice.Create("192.168.0.100");
Direct Construction
When you know the device type, construct it directly to avoid the auto-detection network call:
// ED-series with auto-created connection
// set port the port number of either the ascii protocol (default 9500) or Modbus protocol (default 502)
var connection = new TCPConnection("192.168.0.100", portNumber);
var ed = new ED588(connection);
ed.Connect();
// ES-series (constructor creates connections for all ports) each serial Port has its own TCP port number therefore not required in the constructor for the device
var es = new ES246("192.168.0.100");
es.Connect();
Modbus TCP
To use Modbus TCP instead of ASCII, set the device through the web UI to Modbus TCP mode and use the correct TCP port (default 502)
var connection = new TCPConnection("192.168.0.100", TCPConnection.DEFAULT_MODBUSTCP_PORT);
var ed = new ED588(connection, new ModbusTCPProtocol());
ed.Connect();
Default TCP Ports
| Port | Purpose |
|---|---|
| 9500 | ASCII protocol (ED-series default) |
| 502 | Modbus TCP protocol |
| 9001 | ES-series serial port 1 |
| 9002 | ES-series serial port 2 |
| 9003+ | ES-series serial ports 3+ |
| 80 | Device web configuration page (used by factory methods) |