View Single Post
  #3   Spotlight this post!  
Unread 10-02-2011, 01:28
Acarid Acarid is offline
<3 Nested Clusters
FRC #2521
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Eugene, Oregon
Posts: 10
Acarid is an unknown quantity at this point
Re: Line Following Help

Quote:
Originally Posted by stormyweathers View Post
I have carefully looked at the framework auto ind code, but I am still a bit fuzzy.
the driverstation inputs that are fed into the "Left Right Straight" case stucture; how do I pick which one is set?

also just using the default framework, the robot ALWAYS runs in reverse
any ideas on how to fix this?

my team is using mecanum wheels (which run perfectly in teleop), how do I adjust the code to use this drive system?

for reference, our IR sensors are rigged to connect the white cable to DIO, but I have tried the auto code negating the IR input already to no avail.

I have tried doing a complicated alternate drive system as follows:
in "open.vi" I open 3 drive motor control VI's "MainDrive"(4motor) "AutoFront"(2 motor) and "AutoRear" (2 motor)
the four motors are wired appropriately.
In teleop, I run the MainDrive to mecanum cartesian
In Auto, I pass the X axis control to the X input on AutoFront and AutoBack, and pass the Y axis control to the Y input on AutoFront and AutoBack

I expected this to work somewhat, but by doing this, not only did it not work, it prevented my teleop code from working AND shortened the run time in auto to less than 4 seconds.

can anyone help me?
I am coding this alone and have never used labview before
I
The case structure selects them by converting the true/false inputs from the IR sensors into 1s and 0s of a binary number, and from there into a decimal number. That is why the cases read "7" "1" "0" etc...
You really don't need to understand that though.

The default framework doesn't open the IR sensors in begin.vi, I suspect that is causing your problems. Open 3 DIOs, named IR1, IR2, IR3, wire the sensors to the digital sidecar to match the pwm selected on the open.

You do not need to alter the code for mecanum drive, just make sure the same 4wheel drive reference is wired into the arcade drive vi.
I don't think there is any reason on any normal robot to open more than one drive.

Alone on the first year? That's rough but a lot of fun. Let me know if I should explain this in more detail or if you need help with anything else.
Reply With Quote