|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
labVIEW joystick connection issues
Hello I am the programmer for team 4717. This is our first year first in the competition and we are having trouble getting our code to work properly in our robot, we have isolated the problem to our labVIEW code. We can get one one joystick to connect to the robot at a time even if two joysticks register on the dashboard only one will operate. Any sort of help will be very appreciated.
|
|
#2
|
|||||
|
|||||
|
Re: labVIEW joystick connection issues
How did you update your code to handle the second joystick?
The default Arcade code comes assuming a single joystick. If you added a second joystick, what does your code do with it? |
|
#3
|
|||
|
|||
|
Re: labVIEW joystick connection issues
The existing code only runs 1 motor controller. We can't get the other controller to respond no matter where it is plugged in. We know it works because we changed the second controller to the slot where the first has been working and all is golden.
So.... We duplicated all the joystick code in teleop.vi and went in and changed it to USB2 (where the second joystick is attached), and duplicated all the linked modules, adjusting them where we could find to adjust them to try and control the other side. Now, the dashboard thinks it has 2 joysticks, but just 1 of them is making any feedback on the readouts. The Driver Station recognized we have both joysticks attached, but LabView isn't the most intuitive at digging through pre-existing code. |
|
#4
|
|||||
|
|||||
|
Re: labVIEW joystick connection issues
Quote:
Quote:
Quote:
Quote:
|
|
#5
|
|||||
|
|||||
|
Re: labVIEW joystick connection issues
So you have two distinct problems.
Although your question is about the second problem, I don't expect your recoding of the Joystick to do you much good until you've resolved the first issue of the unresponsive motor controller. From your testing of the motor controller in the PWM port that works, it sounds like the motor controllers are fine and the PWM cables are plugged into them properly. Which PWM port works? When the non-working PWM port is connected, what is the motor controller status light doing? Are the three green power lights on the Digital Sidecar all brightly lit? For the addition of the Joystick you might want to post your Begin.vi and Teleop.vi, so we can see if anything's not hooked up right. But the PWM port won't suddenly start working because a new joystick was added. |
|
#6
|
|||
|
|||
|
Re: labVIEW joystick connection issues
Ok, I'm Carl's teacher/coach/programming-overseer/whatever. Maybe I can clarify a little what we've tried.
When we did the whole "select all"/copy/paste in regards to the joystick/motor blocks of code, we changed all the names of one set to "Joystick 2" and ".... Motor 2..." and all. The vi's that are part of the section were opened and saved with "2" in the name. I just found the "Tank Drive" block. (Yeah, yeah, LabView isn't high on my list of favorite programming environments but Eclipse won't deploy to the cRio so we are going with LV at the moment). I tried plugging it in place of the Arcade Drive block. That was an interesting change of effects -- now, I get nothing when I push the one working stick forward or backward, but it pulses now when we push it in any other direction. I'd like to get this driving for a show-and-tell tonight, but I'm about to pull what hair I have out over this. We are plugged into PWM2 which is actually sending working signals to the motor controller. PWM1 and PWM3 .....not so much. Tell me what pics you want to see and we will take them. |
|
#7
|
|||||
|
|||||
|
Re: labVIEW joystick connection issues
I'd like to see a photo of the Digital Sidecar with power on, showing the wiring and status lights.
It's easiest to create a new default Arcade robot project, build and download that until the wiring problem gets sorted out. If you want to zip up your current robot project and attach it to a post here, we'll take a look and see what's not working in there. |
|
#8
|
|||||
|
|||||
|
Re: labVIEW joystick connection issues
Quote:
I agree with Mark's advice. Create a fresh Arcade project and get it to control your robot so you can verify things are properly wired. Then we can help you make changes and additions to control other robot functions. |
|
#9
|
|||
|
|||
|
Re: labVIEW joystick connection issues
You may also want to try using Test Mode.
With the code running, change the driver station into test mode and on the dashboard click to the Test tab. It will show you the joysticks and motors that have been opened. If you enable the robot on the DS, you can now see the values of the joysticks in the table. See if they change when moved. You can also select the Value of a motor, set the slider to a value and Enable the motor to see if it works using this code. If it doesn't work in test mode, it is either because it wasn't opened properly in Begin, or more likely due to an electrical issue. Greg McKaskle |
|
#10
|
|||
|
|||
|
Re: labVIEW joystick connection issues
We have restarted, again, with an entirely fresh project.
The only modifications we have done to it is, in Begin.vi, change from the Jaguar controller (in the drop-down) to Victor (which is what we have). We have verified that the ports the controllers are plugged into are the ports listed there, as well. Still, only 1 side is working. ![]() |
|
#11
|
|||
|
|||
|
Re: labVIEW joystick connection issues
Just a side note - The two white wires in the end of your Power Distribution Board are illegal and will not pass inspection. Wrapping each end of the wire in red electrical tape will not suffice - the entirety of the wire's insulation must be red.
|
|
#12
|
|||
|
|||
|
Re: labVIEW joystick connection issues
Thanks, we will take care of that in the next hour and I'll talk to my electrician mentor to ensure no more white wire is used.
|
|
#13
|
||||||
|
||||||
|
Re: labVIEW joystick connection issues
White is a legal color for positive voltage. See R50A.
|
|
#14
|
|||||
|
|||||
|
Re: labVIEW joystick connection issues
That actually helps narrow the problem down a bit.
It isn't the code if you're using the default arcade project, so it's the wiring. The Sidecar looks clean and the connections proper. Power is good. One candidate is a bad or reversed crimp on the 37-pin ribbon cable. Especially since they had to be hand-made, those have a high potential for wiring issues. You can use a multi-meter to test that each pin connects through to the other end. When you take the cable and plug it into itself, does it form a simple loop (correct) or does it form a mobius strip (reversed)? I assume that if the PWM connections at the Sidecar are swapped, that the corresponding inoperable Victor then starts operating normally? And PWM 2 is still the port that works and PWM 1 is the port that doesn't work? Last edited by Mark McLeod : 05-02-2013 at 13:17. |
|
#15
|
|||
|
|||
|
Re: labVIEW joystick connection issues
The 37-pin cable forms a simple loop. We will run it through the multi-meter later this afternoon just to be absolutely sure all is 100% with it.
Yes, if we swap the PWM connectors, the other Victor functions. However, it's PWM 1, not 2, that's working |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|