Weird LV behavior

Disclaimer: I know just barely enough to be slightly dangerous. After our inexperienced programming crew spun their wheels, I stepped in (for whatever that’s worth.) Imaged cRio and directly tethered to it for testing. Using four CIMs and standard joystick. For test purposes, used single joystick arcade drive with the standard LV template. When testing, full forward produced all four wheels turning forward WITH a significant lag. Same with full back. Turning left produced what I expected out of full forward and the same with turning right (but in a reverse direction.) I get no turning action at all. Not sure what is going on.
I did my research and deleted the vision code, but that made no difference.

Again, programming is not my long suit, but I am left scratching my head. Oh, we are updated software-wise as far as I know.

Can you post a screen shot of your Begin.vi and Teleop.vi? I suspect your problem is in one of these two.

Probably, you haven’t initialized your drive correctly in some fashion. You need to invert motors you haven’t or some such. Things to make sure of and try:

  1. Your signal wiring is correct. The PWM for the Left Front Motor is connected to the Jag for the left front motor, and so on.
  2. Your power wiring is correct. You really, really just want to connect the red wire of each motor to its corresponding M+ terminal. Black wire to the M- terminal. Do this for ALL your motors, fix direction problems in software.
  3. After 1 and 2, check motors individually. Unplug the PWMs so that you’re only running one motor per side. Wiggle joystick and check responses. Now replug/unplug PWMs to run the other two motors, still one motor per side. Wiggle joystick. If you’ve done 1 and 2, then you should see which motors aren’t responding like you expect, and those motors likely need to be inverted in your Begin.vi code.

Thanks for the quick reply. I have taken those steps both in hardware and software. The green/red signals on the Jaguars indicate that they are doing what they are supposed to–in the turning mode. Full forward/back produces the aforementioned lag. I have attached the image you suggested.LV1.jpg

LV1.jpg


LV1.jpg

Sorry, forgot to post the teleop screencap. Other than making the change and adding two motors, this is standard LV stuff.







The other useful piece of data is what is displayed on the diagnostics screen on the driver station.

What you describe could be caused by wiring two of your motors either backwards or on the wrong side of the robot. If the motors are fighting each other, nothing will move until one of them trips a breaker and the other wins.

Pull all the circuit breakers for the drive motors. Put one in at a time and verify that the motor drives in the direction you expect when you try forward/reverse/left/right commands. Remove that motor’s breaker before trying the next one. If a motor consistently turns in the wrong direction, you can either swap its wires on the Jaguar output or toggle the appropriate “Inverted” terminal for that motor on the Open 4 Motor Drive block. If a motor drives properly for left/right but not forward/reverse, it’s on the wrong side of the robot and you’ll have to find out which PWM cables to swap.

[edit]Based on your Begin code, I think you have PWMs 1 and 4 switched. You obviously duplicated the constants that were already there for the 2 Motor Drive, and that has confused you. The proper order of the PWM definitions is (top to bottom) Rear Left, Rear Right, Front Left, Front Right. Try deleting the PWM and Invert constants, then recreate them individually by right-clicking on the Open function’s terminals and choosing Create->Constant from the popup menu. Then right-click on the constant itself and choose Visible Items->Label. They’ll get the proper labels attached to them that way.[/edit]