Represent connected servo motor and set angular position value
Simulink Coder Support Package for VEX EDR V5 Robot Brain / Actuators
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.
Port_1— Input signal that sets angular position of servo motor
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.
Port— Select the 3-wire port connected to the servo motor
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.