Main Content

Servo Motor

Represent connected servo motor and set angular position value

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

  • Servo Motor block

Description

TheServo Motorblock 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 theServo Motorblock can be derived from other blocks in the model. For example:

  • If aGamepad Joystickblock is connected as the input for aServo Motorblock, 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 aGamepad Buttonblock along with a Gain block is connected as the input for aServo Motor块,可以设置为一个特定的输入值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

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 oneServo Motorblock within the same model.

Version History

Introduced in R2018b

See Also

||