Simple IO Protocol - turag-ev/TURAG-Feldbus Wiki

Simple IO protocol supporting binary and 16 bit analog in-/outputs (originally named ASEB protocol).

The first byte of a packet (address) and the last (checksum) are left out in all packet descriptions/representations on this page.

Overview

  • A maximum of 16 channels are supported for each input and output type, the exact number can be set.
  • An index is assigned to each channel.
  • All input values are read out at once with the Sync command.
  • Outputs are set with separate commands.
  • Setting initial values is error-free by definition - the device should ensure that this is fulfilled.
  • Outputs can have an initial value other than 0. Therefore it is possible to read the status of outputs.
16-bit values are transmitted as Little Endian.
IO type Index range Description
Digital Inputs 1-16 Transmitted as a 16-bit bit mask regardless of the exact number.
Analog Inputs 17-32 Signed 16 bit values.
Digital Outputs 33-48 Transmitted as byte value.
Analog Outputs 49-64 Signed 16 bit values.

Basic commands

Name Request Response
Sync <0xFF> [<digital inputs if at least one available, 2 byte>][<1. analog input, 2 byte>][<2. analog input>][...]
Set digital output <Index><Byte> <empty packet>
Set analog output <Index><Low-Byte><High-Byte> <empty packet>
Read digital output value <Index> <Byte>
Read analog output value <Index> <Low-Byte><High-Byte>

Extended commands

Commands to query information about the available channels. The request always consists of one byte with the command + possibly the index of a channel. The answer is usually a number with a length between 1 and 4 bytes.

Command Command Key Channel index required as 2. byte? Response length
Length of a Sync Response 0xF4 - uint8
Number of digital inputs 0xF7 - uint8
Number of digital outputs 0xF8 - uint8
Number of analog inputs 0xF9 - uint8
Number of analog outputs 0xFC - uint8
Length of channel label 0xF6 yes uint8
Channel label 0xF5 yes variable
⚠️ **GitHub.com Fallback** ⚠️