Skip to content

5. API: G15 Function

waiweng83 edited this page Aug 11, 2015 · 19 revisions

These are the functions to communicate with the G15 servo motors.

Function: eG15SetPosition

Set the goal position for G15 servo motor.

Function Prototype:

EM_ERROR eG15SetPosition(unsigned char ucId, EM_WRITE_MODE eWriteMode,
                         unsigned short usPosition, G15_POSITIONING_MODE ePositioningMode);

Parameters:

  • ucId - G15 ID.
  • eWriteMode - Write immediately or wait for action command.
  • usPosition - Goal position (0 - 1087).
  • ePositioningMode - Positioning mode.

Return:

  • Error Code.

Example:
// Set the goal position of G15 to 500. eG15SetPosition(100, WRITE_NOW, 500, NORMAL_POSITIONING);

Clone this wiki locally