Magnet#
Energize Electromagnet#
The Energize Electromagnet block is used to set the VEX Robot Electromagnet to two different actions: boost or drop.
Select which mode for the Electromagnet to use:
boost - turns on the electromagnet for as long as the duration was set using the Set Electromagnet Duration block.
drop - releases any object the electromagnet is holding.
In this example, the robot will set its electromagnet power to 75% and its duration to short (250 milliseconds) before turning on. After 250 ms, the electromagnet will automatically turn off.
Set Electromagnet Power#
The Set Electromagnet Power block is used to set the Electromagnet power that will be used when picking up an object with the Energize Electromagnet block.
You can use the Set Electromagnet Power block to adjust the strength of the electromagnet when picking up objects of varying weights. The block allows you to set the power level between 0% and 100%, giving you control over the electromagnet’s lifting capacity.
In this example, the robot will set its electromagnet power to 75% and its duration to short (250 milliseconds) before turning on. After 250 ms, the electromagnet will automatically turn off.
Set Electromagnet Duration#
The Set Electromagnet Duration block is used to set how long the Electromagnet is turned on for.
Select which duration for the Electromagnet to use when it is powered on for a boost. If this block is not used, the default duration is medium or 500 milliseconds.
short - 250 milliseconds
medium - 500 milliseconds
long - 1000 milliseconds
In this example, the robot will set its electromagnet power to 75% and its duration to short (250 milliseconds) before turning on. After 250 ms, the electromagnet will automatically turn off.