Random questions from first year programmer

Hey everyone!
As you can tell, it’s my first year programming and I have no idea what to do. My team has no programming mentor so I’m just relying on CD. I was hoping someone could answer some of my questions since I finally got LabVIEW up and running.

  1. What’s the difference between Arcade Drive Robot and Arcade Robot with Arm?
  2. Which one should I choose to start the code?
  3. Can you explain how to program an Arcade Drive so that someone with no programming experience can understand?

I’ll be putting up more questions as I go along, so please bear with me.
Thanks!::safety::

No difference as far as coding the robot goes.
The other options just define what the optional associated simulator can handle. So just Arcade offers you a simulation that just drives around, while Arcade w/arm offers a simulation that drives around and has a simple arm to play with.

I’d just start with Arcade. It’s sufficient.

The default LabVIEW code is already programmed for Arcade drive. Look in Teleop.vi to see how that is done.
Arcade drive mixes the x/y axis of a single joystick to get robot motion.
The y axis is forward and backward. Push forward, the robot goes forward.
The x axis is spin or turn. Push sideways and the robot starts to spin. Push sideways and forward and the robot arcs.

How do I update the firmware for the roboRIO? These are the instructions I’ve been following from the LabVIEW tutorials:

Navigate to and choose: C:\Program Files (x86)\National Instruments\Shared\Firmware\cRIO\76F2\roboRIO_2.1.0f3.cfg (or newer)

I can’t find the roboRIO to connect to when trying to update. Everything is connected and power is on. I already imaged the roboRIO if that might be an issue. Any suggestions? Thanks in advance!

Oops, nevermind! I figured it out! :smiley:

One of those rules of the Universe…
You can’t figure a problem out until right after you post about it.

Ok, so this is a very silly question, but how do I get communications to work? I have absolutely no idea how to do it. Everything has power and is connected, and the COMM on the PDP is blinking red. I don’t even know where to start.

Also, how do I get the motors to respond to the joystick when I move it? The LabVIEW tutorials show it already working, so I’m lost again.

The PDP blinking red means the CAN wiring is not hooked up or is reversed somewhere. You don’t need that right away if you are just run your motors, but you’ll need to fix that eventually.

Is your Driver Station Enabled?
Do the Communications and Robot Code indicators on the Driver Station show green?

You’ll need the Driver Station communicating with the roboRIO over a USB
or Ethernet through the DLink router setup with the Bridge Cinfiguration Utility.

How do you have the CAN bus wired? Are you using the Pneumatic Control Module? What position is the CAN termination jumper on the PDP set to?

I don’t have the CAN wired and I’m not using the Pneumatics Control Module.

P.S. Ignore my question about the joysticks. Apparently I had them connected wrong XD

Actually, it’s really just a restatement of the first step of the design process. Because posting a question is (hopefully) mostly a matter of defining the question.

Start at the ScreenSteps Live web site. You want to follow the links to the 2015 FRC Control System, then 2015 Control System Hardware, and finally Wiring the 2015 FRC Control System. Read each step carefully, even if it doesn’t seem to apply to your system at first.

The blinking red light is confirming that you don’t have CAN wired.

Alright thank you!

New question: When I drive forward with the joystick, the motors spin backward. However going left is left and right is right. I’m using the program that was already on LabVIEW so I’m a little hesitant on changing it too much without some clarification. So, is there a way to change it or is it supposed to do that?

Question 2: How do I create an autonomous program to move and lift things? Can someone show me a screenshot of a simple autonomous program? I’m not sure how to approach autonomous programming and I don’t want to mess up any of the base codes.

P.S. You guys are the best! :smiley:

This sounds like you might have your motors swapped. Can you verify that the Left and Right motors going into the Open 2 Motor in Begin match the actual left and right motors on your drivebase?

To talk about how the motors are backwards I agree how setup might be backwards as it has happened to me but also make sure that the electrical wiring is not backwards. I can’t really explain it well as I am Software Lead and not Electrical Lead. If not you could always insert a negative block (It’s under Numerical and it has a -x on it) and attacth it to you inputs and it will flip your Y-axis controls (forwards and backwards) and that should fix it software wise. Also a note that in autonomous coding forward is negative and backwards is positive values. I have always run into this situation in the old labview and the new one.

If you do have the motors swapped, it can be fixed in at least three ways as I believe the post above was trying to explain:

  1. Software (swap left and right port numbers or variables in the code)
  2. Controls (swap one end of the PWM cables, either the controller or the RIO)
  3. motors - swap the wiring from motor to controller at one end
  4. Actually, you could physically swap the motors along with the wires, but that would be more work than necessary

Thanks guys! I went down the list of possible issues and it turns out the motors weren’t connected to the right controllers. I swapped the positions of the PWM cables and it worked perfectly! :smiley:

Thank you all so much!

Alright, so programming has run pretty smoothly. I’ve got everything for teleop set and running perfectly, thanks to all of you wonderful people. :slight_smile: This will probably be my one of my last questions:

How do I program pneumatics and another motor(for the arm) in autonomous?

I can figure out the driving through all the examples, but I can’t find a lot on pneumatics and extra motors.