So on our bot, we decided to have 4 joysticks. 2 for the driver, in tank mode, and 2 for the person handling the ball mechanism. Driver gets USB1 and USB2, and ball handler gets USB3 and USB4.
I spent hours today trying to figure out why when I go all the way to -1 on the USB3 and 4 joysticks, nothing happened… Then I just set up the motor VI with a constant of -1, and it ran. Then I hooked up the joystick indicator to a display, and realized that the joystick wasn’t talking to the program.
I tried too many things to list in order to get it work. Several reboots, switching around joysticks, and can’t find a way around it.
Anybody have any ideas on why it’s doing that? I’m pretty much stumped.
I did swap them, and had the same issue. I even plugged them into the computer to verify that they work… they do.
Not really sure how to share labview code, in php I’d just copy and paste… so I’ll screenshot it, I guess. Don’t mind the random uncompleted code, I’m attempting to implement traction control and figure how to make buttons execute code. Got to tackle one thing at a time, though.
When I attempt to use USB 3 and 4, the following is what the numeric indicators read:
Numeric 5: always zero
Numeric 6: always zero
The code seems pretty straight forward.
To eliminate it as a possible source I’d try a default template switched to use USB3 then USB4, then post your results on the FIRST forum where they can make a determination if the USB ports are bad.
Actually, this was one of the first things I tried.
Tried doing that too, but I’ll have to try the posting on the FIRST forums part.
I’ll try that tommorow. I don’t know if we updated the driver station when we updated the cRIO, or if that even matters, but hopefully it’ll give us some results.
Not exactly on topic, but i see that you are using 12 Boolean indicators to show the different buttons on the joystick. Might i suggest just creating an indicator on the output to the “Get Raw” VI (the pink wire), and it will be much less cluttered and you can still see each separate button on teh frontpanel.
I actually haven’t looked into any other vi’s yet, just the sub-vi’s. I’ve just been messing with main.vi. I’m not sure right now, I don’t have access to labview right now, but I think begin.vi is only in the advanced framework?
Speaking of which, I tried the advanced framework, and the joysticks still do not work.
We just tested three joysticks with the basic framework, and all worked. If a simplified example will not work after a reboot, I’d diagnose it as a HW problem.