Communication protocol layer for motor control