Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   NI LabVIEW (http://www.chiefdelphi.com/forums/forumdisplay.php?f=182)
-   -   Labview Questions!! (http://www.chiefdelphi.com/forums/showthread.php?t=80889)

chsrobotics3283 22-01-2010 20:46

Labview Questions!!
 
I was looking at the Tank Drive Example under the examples folder in the startup of Labview. And I was wondering if I choose to use the Tank Drive function, how do I implement it to Robot Main.vi? Do I just copy and paste something? I am very confused on how to incorporate modified vi's. into Robot Main. vi

Alan Anderson 22-01-2010 23:52

Re: Labview Questions!!
 
I think the most appropriate way to use the example code is indeed to copy it from the example and paste it into your robot project. Only copy the parts you need.

jhersh 23-01-2010 06:36

Re: Labview Questions!!
 
Quote:

Originally Posted by chsrobotics3283 (Post 904942)
I was looking at the Tank Drive Example under the examples folder in the startup of Labview. And I was wondering if I choose to use the Tank Drive function, how do I implement it to Robot Main.vi? Do I just copy and paste something? I am very confused on how to incorporate modified vi's. into Robot Main. vi

You'll want to put it in the TeleOp VI and the Autonomous (independent or interative) VI, not directly in the RobotMain VI.

grosh 23-01-2010 11:11

Re: Labview Questions!!
 
Our team is also trying to change the example program from arcade to tank drive. The tank example is written in the Basic framework. I don't think the Basic Framework is available in this year. This is causing our team some confusion.

We have replaced the Arcade drive.VIs with Tank.VIs in the Teleop.vi-execute case-true case, Teleop.vi-stop case. We have also added another joystick reference in the open and close VIs.

Anything else we need to change? When we deploy the robot is still driving in tank.

PS- Will changing from arcade to tank affect our ability to camera track with the default camera tracking code?

millerbot1 23-01-2010 12:11

Re: Labview Questions!!
 
We also need to know how to do this. The basic robot main.vi is quite different from last years. Also if anybody knows how to wire the gyro the information is to technical for us.

Alan Anderson 23-01-2010 21:16

Re: Labview Questions!!
 
Quote:

Originally Posted by grosh (Post 905161)
Our team is also trying to change the example program from arcade to tank drive...

We have replaced the Arcade drive.VIs with Tank.VIs in the Teleop.vi-execute case-true case, Teleop.vi-stop case. We have also added another joystick reference in the open and close VIs.

Anything else we need to change? When we deploy the robot is still driving in tank.

I assume you mean it's still driving in Arcade mode. Otherwise, you'd be celebrating your success rather than asking for help. :)

You also need to change from reading the x and y axes of a single joystick to reading the y axes of two different joysticks.

But if you didn't do that properly, you'd find the robot driving oddly, sort of like a diagonal arcade but not quite. If it is still acting like the original arcade mode software, you might not be running the new code successfully. How are you deploying it?

Quote:

PS- Will changing from arcade to tank affect our ability to camera track with the default camera tracking code?
The "button 3 to track" code will still work exactly as it used to. It ignores the joystick control and instead uses a PID system to compute a steering value.

Joe Ross 23-01-2010 22:05

Re: Labview Questions!!
 
Quote:

Originally Posted by Alan Anderson (Post 905612)
The "button 3 to track" code will still work exactly as it used to. It ignores the joystick control and instead uses a PID system to compute a steering value.

As long as you changed the code from arcade to tank in the false case only.

grosh 24-01-2010 10:10

Re: Labview Questions!!
 
1 Attachment(s)
We added a second joystick reference in the begin and close VIs. (see attached) Joystick 1, motors, and gyro error outs are connected to an array function. Do all devices have to be connected to the array? We have been using the videos at LVMastery to learn LabView and the begin VI from the LVMastery videos do not have this array that is built in to the 2010 Game Robot Project.

We changed all arcade drive VIs with tank, in the true and false case. Do we need to change back to arcade in the true case? Can you explain the purpose of this case structure? The videos from LVMastery do not have this case structure.

Thanks in advance.

Greg McKaskle 24-01-2010 10:28

Re: Labview Questions!!
 
The error I/O in begin isn't really that important. Unwired errors will still show up in the diagnostics tab. Wiring the errors give you the ability to filter, respond, and retry, but simply building an array to pass out really doesn't accomplish anything.

You begin looks fine. How about the Teleop?

Greg McKaskle

grosh 24-01-2010 10:45

Re: Labview Questions!!
 
1 Attachment(s)
I've attached the Teleop False case. I changed the True case back to match the default code.

Alan Anderson 24-01-2010 11:18

Re: Labview Questions!!
 
You're reading Joystick 1 instead of Joystick 2 for your right side control. Unless you've changed the joystick read sub-vi, I think your robot will travel straight based on Joystick 1, it will never turn, and it will ignore Joystick 2.

chsrobotics3283 24-01-2010 11:34

Re: Labview Questions!!
 
grosh,

can you email me that code, I want to take a closer look at it because it is different from the one that I made.

grosh 24-01-2010 11:34

Re: Labview Questions!!
 
Oops. I will make the change and test on Monday. Thanks all!

One last question though...Is Arcade mode(default) needed in the True case as Joe stated earlier... or does it matter..or what?

Alan Anderson 24-01-2010 12:00

Re: Labview Questions!!
 
Quote:

Originally Posted by grosh (Post 905846)
Is Arcade mode(default) needed in the True case as Joe stated earlier... or does it matter..or what?

The True case is what executes while you press the joystick button. It uses the gyro and vision tracking to rotate the robot to face the target. It does that by controlling the "turn" input to the Arcade Drive vi.

If you want to change the target-seeking code to give commands to a Tank Drive vi instead, you can.

Mark McLeod 24-01-2010 13:16

Re: Labview Questions!!
 
Quote:

Originally Posted by Alan Anderson (Post 905865)
If you want to change the target-seeking code to give commands to a Tank Drive vi instead, you can.

However, there is no particular reason to do so. The use of Arcade Drive there doesn't affect your driving controls at all, since with the push of the button you've relinquished joystick control of the robot until you release the button.
Your joysticks will not revert to Arcade drive. They will only operate in Tank drive.


All times are GMT -5. The time now is 01:01.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi