Motor 393#
To make Motor 393 blocks appear in VEXcode V5, a Motor 393 must be configured in the Devices window.
Spin Motor 393#
The Spin Motor 393 block is used to spin a Motor 393 connected to a Motor Controller 29 forever, until a new Motion block is used or the program is stopped.
This is a non-waiting block and allows any subsequent blocks to execute without delay.
spin [Motor39316E v] [forward v]
Select which Motor 393 to use.
Select which direction for the Motor 393 to move in.
In this example, the Motor 393 will spin forward for 2 seconds before stopping.
when started :: hat events
spin [Motor39316E v] [forward v]
wait (2) seconds
stop [Motor39316E v]
Set Motor 393 Velocity#
The Set Motor 393 Velocity block is used to set the speed of a Motor 393 connected to a Motor Controller 29.
This is a non-waiting block and allows any subsequent blocks to execute without delay.
set [Motor 1 v] velocity to (50) [% v]
Select which Motor 393 to use.
The Set Motor 393 Velocity block will accept a range of -100% to 100%.
Setting a Motor 393’s velocity to a negative value will cause the Motor 393 to spin in reverse and setting the velocity to 0 will cause the Motor 393 to stop.
In this example, the Motor 393 will spin forward for 1 second before setting the motor’s velocity to 100%.
when started :: hat events
spin [Motor1 v] [forward v] for (1) [turns v] ▶
set [Motor1 v] velocity to (75) [% v]
spin [Motor1 v] [reverse v] for (1) [turns v] ▶
Stop Motor 393#
The Stop Motor 393 block is used to stop a Motor 393 connected to a Motor Controller 29 from moving.
This is a non-waiting block and allows any subsequent blocks to execute without delay.
stop [Motor39316E v]
Select which Motor 393 to use.
In this example, the Motor 393 will spin forward for 2 seconds before stopping.
when started :: hat events
spin [Motor39316E v] [forward v]
wait (2) seconds
stop [Motor39316E v]