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.

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

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

Probably the easiest way to do this is to create more controls on the Basic Robot, 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 in Basic Robot
  2. Double click the Accelerometer to open it.
  3. Copy the AccelerometerDevRef (select the indicator and press Ctrl-C)
  4. Open Robot from the project window.
  5. Paste the AccelerometerDevRef on the Robot and name it (let’s say “Accel1” for this example).
  6. Drag the Robot 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 to the Accel1 global
  9. Drag another Robot 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.

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.

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

Greg McKaskle

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

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

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:

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

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.

ok, thank you very much for everyone’s help