12/18/2023 0 Comments Vecode solutions![]() Delete the existing Inport, Outport and the connection between them.Ģ. Double click and open the Driver subsystem. In this task, you will create control logic required for the Driver Controlled mode, which helps you to control the robot's arm using the joystick (analog channel 1) on the V5 Controller gamepad:ġ. Task 5 - Implement logic for Driver Controlled mode This completes the logic required for the Pre-Autonomous mode that sets the robot's arm at a vertical position. Connect the output of the Gain block to the input of the Robot Arm Motor block. Double-click the Robot Arm Motor block, and select the Port as A. Drag and drop the DC Motor block from the Actuators category in the VEX V5 library to the subsystem. Connect the output of the Compare to Constant block to the input of the Gain block.Ĩ. Drag and drop the Gain block from the Math Library category in the VEX V5 library to the subsystem. Connect the output of the Potentiometer block to the input of the Compare to Constant block.Ħ. Double-click the block, select the Operator value as ≤= and set the Constant Value parameter to a value that represents the vertical postion of the robot's arm (based on the calibration).ĥ. Drag and drop the Compare to Constant block from the Logical Operations category in the VEX V5 library to the subsystem. Double-click the Potentiometer block, and select the Port as B. In the Simulink Library Browser, navigate to Simulink Coder Support Package for VEX EDR V5 Robot Brain > Sensors, and drag and drop the Analog Input block into the Pre-Autonomous subsystem. Double click and open the Pre-Autonomous subsystem. In this task, you will create control logic required for the Pre-Autonomous mode, which will set the robot's arm at a vertical position:ġ. ![]() Task 3 - Create logic for Pre-Autonomous mode Tip: This basic model is also available as a template named Competition Model on the Simulink Start page (Launch Simulink, navigate to Simulink Coder Support Package for VEX EDR V5 Robot Brain, and select Competition Model). Connect the Pre-Auto port of the Competition Switch to the Pre-Autonomous subsystem, the Auto port to the Autonomous subsystem, and the Driver port to the Driver subsystem. In the Simulink Library Browser, navigate to Simulink Coder Support Package for VEX EDR V5 Robot Brain > Gamepad, and drag and drop the Competition Switch block into your Simulink model.ĥ. ![]() Rename the three Enabled Subsystem blocks as Pre-Autonomous, Autonomous and Driver.Ĥ. In the Simulink Library Browser, navigate to Simulink > Ports & Subsystems, and drag and drop the Enabled Subsystem block to your model. Launch Simulink and open a Blank Model.Ģ. In this task, you will create the basic model that incorporates separate control logic based on the various modes available with the VEXnet Competition Switch:ġ. Task 2 - Create the basic model with Competition Switch On the VEXnet Competition Switch, set the Enable/Disable switch to Disable state and the Driver/Autonomous switch to Autonomous state. Connect the VEXnet Competition Switch to the Ethernet port located at the back of the V5 Controller (gamepad), using an Ethernet cable. (This connection will enable wireless connectivity between the V5 Robot Brain and the gamepad after they are switched on.)Ħ. Connect the V5 Robot Radio to Smart Port 21 on the V5 Robot Brain, using the 300 mm Smart Cable. Connect the Potentiometer (attached to the arm's shaft) to the 3-wire port B on the VEX V5 Robot Brain.ĥ. Use the Motor Controller 29 cables to establish the connection between the motors leads and the port on V5 Robot Brain.Ĥ. Connect the DC motor (attached to the arm's shaft) to the 3-wire port A on the VEX V5 Robot Brain. Connect the VEX EDR V5 Robot Brain to your computer using the USB cable.ģ. Connect the V5 Robot Battery to the VEX EDR V5 Robot Brain.Ģ. VEXnet Competition Switch(or the VEX field controller)Īfter you assemble the robot and attach the other components listed in the previous section, proceed with the connections listed below:ġ.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |