Servosila-SC-25-Programming-Guide

Encoding COMMANDS
See sample C++ projects slcan-esc-command and canbus-esc-command for details on
how to encode and send out a command to a Servosila SC-25 Brushless Motor Controller.
Hint: press a “View” button in command section of the “Servoscope” software to view properly
rendered commands.
15 www.servosila.com
Node ID + COB ID
Payload (8 bytes, binary)CAN ID (11 bits)
0 1 2 3 4 5 6 7
Command Code
The very first byte in Payload of a command carries a Command Code.
All Command Codes are given in Servosila Device Reference document.
For example, 0x20 means “Electronic Speed Control”.
COB ID
The parameter is listed in Servosila Device Reference document for each command.
For example, COB ID to be used with “Electronic Speed Control” command is 0x200.
Node ID (destination device)
The parameter is a unique identifier assigned to each controller.
This parameter tells which controller the command is directed to.
The ID of a particular device can be changed using
the “Servoscope” software tool.
Command-specific payload section
Most commands have parameters. Those parameters are encoded
in this section. Position of each parameter and parameters data type
are listed in Servosila Device Reference document.
For example, “Electronic Speed Control” command has
a single parameter called “Speed” of FLOAT32 type,
encoded starting from byte 4 of the Payload.