API Documentation: [cpp] [python] [.NET] [LabVIEW]

The RCServo entity provides a pulsed signal based on the RC servo standard. This consist of a period lasting 20ms with a high pulse between 1-2ms. The time high corresponds to a specific position determined by the servo being used. For example if you are using a 90 degree servo a 1.5ms pulse will correspond to the 45 degrees. 1ms and 2ms pulses will correspond to 0 and 90 degree positions respectively.

The RCServo entity is an overload to the Digital Entity and therefor requires proper configuration of the Digital entity before the RCServo entity can be enabled.

The MTM-USBSTEM board is equipped with 4 RC servo inputs and 4 RC servo outputs. The RC Servo entity is an overload of the Digital Entity and thus requires proper configuration before this entity can be enabled.

With the RC servo entity, digital output pins generate pulsed signal based on the RC Servo standard consisting of a period lasting 20ms and high pulse time between 1-2ms. The high time corresponds to a specific position determined by the specific servo being used. RC servo inputs, measure this high time and return the corresponding position for a servo.

Get/Set Enable

This functions gets/sets the RCServo function for a given pin (pending, it has been properly configured in the digital entity). At a firmware level this enables/disables the timers.

stem.servo[index].setEnable(bEnable) [cpp] [python] [NET] [LabVIEW]

stem.servo[index].getEnable() [cpp] [python] [NET] [LabVIEW]

Get/Set Position

This functions gets/sets the RCServo position. For outputs this will return the currently set position; however, for inputs it will return the value seen at the pin pending the pulse is valid. If the pulse or period are invalid a zero will be returned along with the error code aErrRange. Only index 4-7.

stem.servo[index].setPosition(position) [cpp] [python] [NET] [LabVIEW]

stem.servo[index].getPosition() [cpp] [python] [NET] [LabVIEW]

Get/Set Reverse

This functions gets/sets the reverse (invert) option in the RCServo Class. Only index 4-7.

stem.servo[index].setReverse(reverse) [cpp] [python] [NET] [LabVIEW]

stem.servo[index].getReverse() [cpp] [python] [NET] [LabVIEW]