RCServo Entity

group RCServoEntity

Interface to servo entities on BrainStem modules. Servo entities are built upon the digital input/output pins and therefore can also be inputs or outputs. Please see the product datasheet on the configuration limitations.

void rcservo_getEnable(unsigned int *id, struct Result *result, int rcServoNum)

Get the enable status of the servo channel.

Parameters
  • id: The id assigned by the create stem vi.

  • result: object, containing NO_ERROR and the enable status or a non zero Error code.

  • rcServoNum: The index of the RCServo entity.

void rcservo_setEnable(unsigned int *id, struct Result *result, int rcServoNum, int enable)

Enable the servo channel

Parameters
  • id: The id assigned by the create stem vi.

  • result: object, containing NO_ERROR or a non zero Error code.

  • rcServoNum: The index of the RCServo entity.

  • enable: The state to be set. 0 = Disabled; 1 = Enabled.

void rcservo_getPosition(unsigned int *id, struct Result *result, int rcServoNum)

Get the position of the servo channel

Parameters
  • id: The id assigned by the create stem vi.

  • result: object, containing NO_ERROR and the position or a non zero Error code.

  • rcServoNum: The index of the RCServo entity.

void rcservo_setPosition(unsigned int *id, struct Result *result, int rcServoNum, int position)

Set the position of the servo channel

Parameters
  • id: The id assigned by the create stem vi.

  • result: object, containing NO_ERROR or a non zero Error code.

  • rcServoNum: The index of the RCServo entity.

  • position: The position to be set. 64 = 1ms pulse; 192 = 2mS pulse.

void rcservo_getReverse(unsigned int *id, struct Result *result, int rcServoNum)

Get the reverse status of the servo channel

Parameters
  • id: The id assigned by the create stem vi.

  • result: object, containing NO_ERROR and the reverse status or a non zero Error code.

  • rcServoNum: The index of the RCServo entity.

void rcservo_setReverse(unsigned int *id, struct Result *result, int rcServoNum, int reverse)

Set the output to be reversed on the servo channel

Parameters
  • id: The id assigned by the create stem vi.

  • result: object, containing NO_ERROR or a non zero Error code.

  • rcServoNum: The index of the RCServo entity.

  • reverse: Status to be set. 0 = Not Reveresed; 1 = Reversed.