|
|
|
| Nothing in the KOP can prepare me for you. |
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
Motor Control RefNum Registry Error
I'm having trouble getting two joysticks to initialize, and one of the errors I'm getting at the driver station (not sure if it's related, but it seems like it is) is that the data type of the variant that feeds into the Generic Set Get Refnum is not compatible with the data type wired into the input. Take a look: http://imgur.com/a/tW86x
Does anyone know what's causing this? |
|
#2
|
|||||
|
|||||
|
Re: Motor Control RefNum Registry Error
It looks like you're using a Talon SRX via PWM?
That code doesn't look like it's from 2017. Are you reusing code from last year? Have you tried creating a new project for 2017 and starting with that? |
|
#3
|
|||
|
|||
|
Re: Motor Control RefNum Registry Error
I'm not sure why it doesn't look like this year's code, but this was a fresh 2017 project... Where is it set to PWM? How do we change that?
|
|
#4
|
|||||
|
|||||
|
Re: Motor Control RefNum Registry Error
You'd have to post your code for me to have any hope of commenting on it.
Begin and Teleop That library routine snaphot you posted is a Motor Get, but Motor Get only handles Talon PWMs, not Talon CAN. Last edited by Mark McLeod : 23-01-2017 at 21:10. |
|
#5
|
|||
|
|||
|
Re: Motor Control RefNum Registry Error
http://imgur.com/uXvZnr0
The weird thing is that the code does work (even with the error), but only one joystick is working... Thanks for the help! |
|
#6
|
|||||
|
|||||
|
Re: Motor Control RefNum Registry Error
You're mixing mismatched vi's and they're sort of partially doing something accidentally.
Take a look at the other code I posted for how to setup a 4-motor drive. There's an undefined motor in Teleop. Are your joysticks in positions 3 and 4 on the Driver Station USB tab? |
|
#7
|
|||
|
|||
|
Re: Motor Control RefNum Registry Error
Ok, I set it up the same way as you did in your example (see teleop and begin block diagrams in the third picture). I still get the error with the registry get icon (first picture). But the real issue is that both joystick get values are reading the same joystick (see indicators on the Teleop Front Panel in the second picture)... It really doesn't make any sense to me. I think that it's referencing the device at the same usb port. Another weird thing is that when I reorder the joysticks on the driver station, the other joystick works, but the one that was working before no longer works. Could it be a problem with the driver station???
Thanks for the help. http://imgur.com/a/HMcRu http://imgur.com/qpEGJra http://imgur.com/KpVYn04 |
|
#8
|
|||||
|
|||||
|
Re: Motor Control RefNum Registry Error
Try changing your joysticks to USB0 and USB1 in Begin and on the Driver Station USB tab just to see it it's position related.
Which of the two different Teleop pictures you posted is the one I should look at? The joystick axes in one conflict with each other, so if you swapped them they would respond differently if at all. That could make it seem like one is working and the other not working. What kind of joysticks are they? I replicated your code and don't get the error on the Drive Refnum Get, so it's something you've typed, probably by accident. If you want to zip the entire project (Documents->LabVIEW Data->2017 Robot Project) and post it here I can tell you where the typo is. Last edited by Mark McLeod : 24-01-2017 at 08:47. |
|
#9
|
|||
|
|||
|
Re: Motor Control RefNum Registry Error
Changing to USB0 and USB1 to match the driver station didn't help. I also tried changing the driver station positions to 3 and 4 to match teleport, but that didn't work either...
Both Teleop pictures are the same, but on this one I made indicators to see what values the joysticks were reading, and they show the same value... I think it is referencing the same device for both joystick 1 and joystick 0. http://imgur.com/qpEGJra They're both Logitech 3D extreme joysticks. I've tried a changing the axes up with no avail. However, I can get everything to work if I use one joystick axis for the left side and the other joystick axis for the right side. The real problem is that I can't get different values from the different joysticks to feed into the tank drive tile. I will post the vi later when I get back to our robotics lab. Thanks for the help! |
|
#10
|
|||
|
|||
|
Re: Motor Control RefNum Registry Error
Here is our code. Let me know what you find.
https://drive.google.com/file/d/0B6o...ew?usp=sharing Thanks for the help! |
|
#11
|
||||
|
||||
|
Re: Motor Control RefNum Registry Error
Do you have two or four Talon SRXs controlling your drive motors?
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|