Although there is no official Electromagnet block for the VEX V5 support package. You can use the prototype block attached to this answer to write and read from the electromagnet actuator.
How to use the block:
- Open the Simulink model and copy the blocks to your desired model.
- Make sure the folder with the source files is added to your MATLAB path (right-click>add to path), or the files are located in the same folder as your Simulink model
- Use MATLAB R2022a or later
- Measurements dont have assigned units or ranges