EOS Protocol

Change History

Revision 3 Notes

  • Group ID added to INFO packet
  • Added servo signal packets
  • Added servo config get/set packets
  • Added stepper config get/set packets
  • Reduced address space to 32 (not feasible to poll that many devices and saves memory on controllers)

Revision 2 Notes

  • Updated Info eesponse packet to be compatible with Helios

Electrical Signaling

The EOS bus is designed around a multi-drop RS-485 signal. The bus will have one master node which will poll all other devices and communicate with the host computer. Device are slaves and do not transmit on the bus until sent a command from the bus master which requires a response.

Addressing

Each EOS bus can handle 30 (1-30) unique device addresses and has facilities for 10 group addresses. (Note: bandwidth limitation of the serial bus will limit actual devices to a dozen or less.). Un-configured devices will default to address 31 and must be assigned an address. New devices must be added to the bus one at a time to avoid addressing collision.

Address 0: Reserved for the bus master controller
Address 1-30: Active device addresses
Address 31: Un-configured devices will start with a default address of 31.

Group and Broadcast Addresses

Group Addressing (Message can not require responses!)
Address 240-254: Group addresses. Devices can be configured to participate in one or more groups.
Address 255: Broadcast address. All devices will receive this message.

Packet Structure

Byte 0 = Destination Address
Byte 1 = Source Address
Byte 2 = Command Byte
Byte 3 = Data Length (0-250)
Byte 4 - X = Packet Data
Byte X + 1 (Last Byte) = CheckSum (Simple rollover checksum)

Commands

Command bytes indicate the desired action and responses. Commands are 6 bit numbers with two bit flags at bits 7 & 8.
Bits 0-5 Command Number
Bit 6: Flag indicating this is a response packet for the command.
Bit 7: Flag indicating this command expects a response.

Reset
Command Value: 1
Description: Triggers addressed board
Packet Data: 0 bytes
Response: None

Info
Command Value: 130
Description: Command sent to device to ask for it's capabilities
Packet Data: 0 bytes
Response: 19 bytes
// Bytes 1-8 = Board Name
// Byte 9 = Number of digital intputs
// Byte 10 = Number of analog inputs
// Byte 11 = Number of rotary encoders
// Byte 12 = Number of led outputs
// Byte 13 = Number of steppers motor outputs
// Byte 14 = Number of servo motor outputs
// Byte 15 = Number of alpha/numeric displays (0-255)
// Bytes 16-19 = Firmware Version

Set Address
Command Value: 3
Description: Command which resets board address, should always follow up with a bus reset so the new address is registered in the polling loop.
Packet Data: 1 Byte
// Byte 1 New Address - Valid addresses are 1-100
Response: None

Set Name
Command Value: 4
Description: Command which sets a board name.
Packet Data: 8 bytes
// Byte 1-8: Name (zero terminated if shorter than 8)

Set Group Address
Command Value: 5
Description: Command which resets board broadcast group.
Packet Data: 1 byte
// Byte 1 New Address - Valid addresses are 0-9
Response: None

Get Config
Command Value: 134
Description: Command to retrieve config settings for an interface board.
Packet Data: data length and content are specified per board
Response: data length and content specified per board

Set Config
Command Value: 7
Description: Command to sets config setting for an interface board.
Packet Data: data length and content are specified per board
Response: data length and content are specified per board

Set Backlight Level
Command Value: 8
Description: Command to set the backlight brightness.
Packet Data: 1 byte data length
// Byte 1 = Brightness (0 = Full Dark, 255 = Full Bright)
Response: None

Set Backlight Power
Command Value: 9
Description: Command to set backlight power.
Packet Data: 1 byte data length
// Byte 1 = Power (0 = Off, 1 = On)
Response: None

Set LED Level
Command Value: 10
Description: Command to set the led brightness.
Packet Data: 1 byte data length
// Byte 1 = Brightness (0 = Full Dark, 255 = Full Bright)
Response: None

Set LED Power
Command Value: 11
Description: Command to set led power.
Packet Data: 1 byte data length
// Byte 1 = Power (0 = Off, 1 = On)
Response: None

Set Display Text
Command Value: 12
Description: Packet which will set the display text for a given display.
Packet Data: Variable Length
// Byte 1 = Display ID
// Byte 2 = Text Length
// Bytes 3-x = Text to be displayed.
Response: None

Zero Stepper Position
Command Value: 13
Description: Packet which will set the current position of a stepper motor without moving the stepper.
Packet Data: 5 bytes data length
// Byte 1 = Stepper Number
// Bytes 2-5 = Long value of new current position
Response: None

Set Stepper Target Position
Command Value: 14
Description: Packet which will set the target position of a stepper motor.
Packet Data: 5 bytes data length
// Byte 1 = Stepper Number
// Bytes 2-5 = Long value of new current position
Response: None

Set Servo Signal Value
Command Value: 15
Description: Packet which will set the signal value for the servo.
//
// Data: 3 bytes data length
// Byte 1 = Servo Number
// Bytes 2-3 = Singal value in microseconds

Set Servo Config
Command Value: 16
Description: Packet which will set the configuration parameters for a servo.
//
// Data: 7 bytes data length
// Byte 1 = Servo Number
// Bytes 2-3 = Minimum signal value in microseconds.
// Bytes 4-5 = Maximum signal value in microseconds.
// Bytes 6-7 = Default signal value in microseconds.

Get Servo Config
Command Value: 145
Description: Packet which will get the configuration parameters for a servo.
//
// Data: 1 data length
// Byte 1 = Servo Number
//
// Response: 7 bytes data length
// Byte 1 = Servo Number
// Bytes 2-3 = Minimum signal value in microseconds.
// Bytes 4-5 = Maximum signal value in microseconds.
// Bytes 6-7 = Default signal value in microseconds.

Set Stepper Config
Command Value: 18
Description: Packet which will set the configuration parameters for a stepper.
//
// Data: 1 data length
// Byte 1 = Stepper Number
// Bytes 2-3 = Maximum speed in steps per second.
// Bytes 4-7 = Idle sleep timeout.

Get Stepper Config
Command Value: 147
Description: Packet which will get the configuration parameters for a stepper.
//
// Data: 1 data length
// Byte 1 = Stepper Number
//
// Response: 7 bytes data length
// Byte 1 = Stepper Number
// Bytes 2-3 = Maximum speed in steps per second.
// Bytes 4-7 = Idle sleep timeout.

Poll Status
Command Value: 191
Description: Command to poll input changes for an interface board
Packet Data: 0 data length
Response: data length depending on inputs with a zero length pack data
// meaning no change since last poll.
// 1 bit per digital input in 8bit banks
// 2 bytes per analong input
// 1 byte per rotary encoder (signed byte indicating number of steps per last poll)