Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   NI LabVIEW (http://www.chiefdelphi.com/forums/forumdisplay.php?f=182)
-   -   AI Programming (http://www.chiefdelphi.com/forums/showthread.php?t=73785)

PWHSrobotics 06-02-2009 22:48

AI Programming
 
This is a noob question,

How do I send other references (like sensors) to the AI VI ? it doesn't use the front panel like I normally send VI's references.

airnate 06-02-2009 22:56

Re: AI Programming
 
Sorry. Maybe I'm missing something obvious, but what are you referring to as the AI vi?

PWHSrobotics 06-02-2009 23:16

Re: AI Programming
 
sorry, my bad

'Autonomous Independent' VI in labview I want to send it other sensor references, also how do I send it just the normal 'Motor' Control from the Arcade drive provided in the default Robot Basic VI

airnate 06-02-2009 23:44

Re: AI Programming
 
Probably the easiest way to do this is to create more controls on the Basic Robot Global.vi, which as the name implies, is a global variable.

For instance if you want to pass an Accelerometer device reference to the Autonomous Independent vi,

1. Drop the Accelerometer Open.vi in Basic Robot Main.vi
2. Double click the Accelerometer Open.vi to open it.
3. Copy the AccelerometerDevRef (select the indicator and press Ctrl-C)
4. Open Robot Global.vi from the project window.
5. Paste the AccelerometerDevRef on the Robot Global.vi and name it (let's say "Accel1" for this example).
6. Drag the Robot Global.vi from the Project window to the Basic Robot Main.
7. Click on the Robot Global and select "Accel1" (or whatever you named in step 2).
8. Wire the Accelerometer Open.vi to the Accel1 global
9. Drag another Robot Global.vi from the project to Autonomous Independent vi
10. Right click on it and select "Change to Read"
11. use it to wire whatever you're going to do with the sensor.

You can see that the basic robot framework already has a RobotDriveDevRef which may be the "motor" reference that you were asking about.

Actually, you should be careful to distinguish between "drive" references and "motor" references. The "Drive" VIs are used where two or more motors used together as a drive system (e.g. arcade, tank). The "Motor" VIs are used for control of a single motor.

PWHSrobotics 08-02-2009 21:16

Re: AI Programming
 
thankyou guys for your help. Got another question (of course lol) the new Get Alliance VI ...I get red/blue alliance, but it gives you position 1-3, what position corresponds to where on the field.

Much appreciated for your help.

Greg McKaskle 08-02-2009 23:17

Re: AI Programming
 
I think that will indicate which initial location on the field a robot will start in.

Greg McKaskle

PWHSrobotics 09-02-2009 07:37

Re: AI Programming
 
yep, I know :) Was just curios as to what number corresponded to which spot. for I can incorporate that into the Auto period.

PhilBot 09-02-2009 08:14

Re: AI Programming
 
no, the position related to where your drivers are. Not a lot of use for auto.

PWHSrobotics 09-02-2009 18:54

Re: AI Programming
 
yes, but just for kicks, how does the numbering work? Does anyone know? is 1 closes and 3 farthest? or what?

Vikesrock 09-02-2009 18:59

Re: AI Programming
 
Quote:

Originally Posted by PWHSrobotics (Post 817473)
yes, but just for kicks, how does the numbering work? Does anyone know? is 1 closes and 3 farthest? or what?

Closest to or farthest from what?

See this thread for more info:
http://forums.usfirst.org/showthread.php?t=11671

PWHSrobotics 09-02-2009 20:26

Re: AI Programming
 
hmm, so I see the R1, R2, R3 etc. My last question is this, do each of those 'Positions' correspond to any particular starting point, or is it all figured out on each alliance and has nothing to do with your robots' starting position

Vikesrock 09-02-2009 20:27

Re: AI Programming
 
The starting position of your robot will be negotiated with your alliance partners prior to the match and is not related to which driver's station position your team is assigned to.

PWHSrobotics 09-02-2009 21:20

Re: AI Programming
 
ok, thank you very much for everyone's help


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

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