This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Gear Transmission

Set a scalar value (1 to 4) based on input values


Simulink Coder Support Package for ARM Cortex-based VEX Microcontroller/Utilities

Simulink Coder Support Package for VEX EDR V5 Robot Brain/Utilities


Set a scalar value in the range 1 to 4, based on the signals to the input ports. The input ports, Up and Down receive a logical value from a digital button. When the Up value is HIGH (1) then the Gear Transmission block output is incremented by 1. If the Down value is HIGH (1), the Gear Transmission block output is decremented by 1. If neither of the input values change, the gear value does not change. The gear value does not change to go below 1 or above 4, even if the input values change.

For instance, use this block in a model to control the motor speed of robot by providing the gear output value as the scaling factor to the Gamepad Joystick signal. This value can scale up or down the speed value of the motors for the range of the joystick.