Main Content

Servo Motor

Represent connected servo motor and set angular position value

Add-On Required: This feature requires the Simulink Coder Support Package for VEX EDR V5 Robot Brain add-on.

  • Servo Motor block

Libraries:
Simulink Coder Support Package for VEX EDR V5 Robot Brain / Actuators

Description

The Servo Motor block represents a servo motor connected to a specified 3-wire port on a VEX® EDR V5 Robot Brain. The input signal to the block sets the angular position value of the servo motor. There are eight 3-wire ports on VEX EDR V5 Robot Brain that you can connect to servo motors.

Ports

Input

expand all

The input signal for the Servo Motor block can be derived from other blocks in the model. For example:

  • If a Gamepad Joystick block is connected as the input for a Servo Motor block, the input value can range from –128 to 127 based on the position of the joystick on the gamepad, which then translates to an angular position value (in degrees) of the servo. For block input value ‘0’, the servo motor is stationary.

  • If a Gamepad Button block along with a Gain block is connected as the input for a Servo Motor block, the input can be set to a particular value for the duration for which the button is kept pressed, which translates to an angular position value (in degrees) of the servo.

Data Types: double

Parameters

expand all

If you are using a 3-Wire Expander, specify the smart port on VEX EDR V5 Robot Brain to which the expander is connected.

Select the 3-wire port on the VEX EDR V5 Robot Brain that is connected to the servo motor.

Do not assign the same port to more than one Servo Motor block within the same model.

Version History

Introduced in R2018b