Begin by connecting one motor to the port lettered A on your EV3 brick Attach a

Begin by connecting one motor to the port lettered a

This preview shows page 3 - 7 out of 10 pages.

Begin by connecting one motor to the port lettered A on your EV3 brick. Attach a short Lego piece to the red axel part, as shown below. This will act as a “compass needle”. Figure 1: Close-up of red axel with pointer attached Open LabVIEW, and start a new VI. Go to the Block Diagram, and open the Mindstorms Robotics submenu in the Function Palette. Finally, open the IO folder. You should see this:
Image of page 3
The Move Motors and Stop Motors are the most basic VIs available to move your motors. They actually offer less control than some more advanced VIs available to you. The Advanced Motors contains some motor VIs that are actually a little easier to work with to start. Open this folder. You should see this: The VI here we’ll focus on in Task 1 is Fixed Distance.
Image of page 4
An important point to remember from this VI help is that the VI measures distance in “encoder counts”. Each encoder count equals 1 degree. This means if we know the diameter of the wheel attached to the motor, we can figure out linear distance travelled – hence if you fix the encoder counts rotated, you fix the distance traveled. Right now, you simply need to demonstrate that you can turn your pointer around a given angle. We want to rotate 180 degrees from our starting point, wait 5 seconds, then rotate counterclockwise 90 degrees. We will need two motor VIs for this If you read the documentation on this VI, it seems to indicate it incorporates a waiting feature. This may not work! (Welcome to the world of EV3 motor control.) We are going to force the motor to wait by using the Wait For time VI: Start by putting the Wait For icon and two Fixed Distance icons on the Block Diagram, and wire their EV3 ports one to the other with a pink control flow wire like this:
Image of page 5
We can now enter 5 second on the Wait For VI. We see from the help that a positive value for distance corresponds to clockwise rotation, negative for counterclockwise. We can then enter a distance of 180 for the first VI, and -90 for the distance on the second VI: VERY IMPORTANT: We don’t really care about how fast the turns are, but
Image of page 6
Image of page 7

You've reached the end of your free preview.

Want to read all 10 pages?

  • Fall '07
  • walker
  • It

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

Stuck? We have tutors online 24/7 who can help you get unstuck.
A+ icon
Ask Expert Tutors You can ask You can ask You can ask (will expire )
Answers in as fast as 15 minutes