Nothing in the KOP can prepare me for you.
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 23-01-2017, 20:35
mtthwroberts mtthwroberts is offline
Registered User
FRC #3669
 
Join Date: Jan 2017
Location: Ripon, Ca
Posts: 13
mtthwroberts is an unknown quantity at this point
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?
Reply With Quote
  #2   Spotlight this post!  
Unread 23-01-2017, 20:51
Mark McLeod's Avatar
Mark McLeod Mark McLeod is online now
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,964
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
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?
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
Reply With Quote
  #3   Spotlight this post!  
Unread 23-01-2017, 20:57
mtthwroberts mtthwroberts is offline
Registered User
FRC #3669
 
Join Date: Jan 2017
Location: Ripon, Ca
Posts: 13
mtthwroberts is an unknown quantity at this point
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?
Reply With Quote
  #4   Spotlight this post!  
Unread 23-01-2017, 21:02
Mark McLeod's Avatar
Mark McLeod Mark McLeod is online now
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,964
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
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.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 23-01-2017 at 21:10.
Reply With Quote
  #5   Spotlight this post!  
Unread 23-01-2017, 21:25
mtthwroberts mtthwroberts is offline
Registered User
FRC #3669
 
Join Date: Jan 2017
Location: Ripon, Ca
Posts: 13
mtthwroberts is an unknown quantity at this point
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!
Reply With Quote
  #6   Spotlight this post!  
Unread 23-01-2017, 21:54
Mark McLeod's Avatar
Mark McLeod Mark McLeod is online now
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,964
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
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?
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
Reply With Quote
  #7   Spotlight this post!  
Unread 23-01-2017, 23:14
mtthwroberts mtthwroberts is offline
Registered User
FRC #3669
 
Join Date: Jan 2017
Location: Ripon, Ca
Posts: 13
mtthwroberts is an unknown quantity at this point
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
Reply With Quote
  #8   Spotlight this post!  
Unread 24-01-2017, 07:55
Mark McLeod's Avatar
Mark McLeod Mark McLeod is online now
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,964
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
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.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 24-01-2017 at 08:47.
Reply With Quote
  #9   Spotlight this post!  
Unread 24-01-2017, 11:26
mtthwroberts mtthwroberts is offline
Registered User
FRC #3669
 
Join Date: Jan 2017
Location: Ripon, Ca
Posts: 13
mtthwroberts is an unknown quantity at this point
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!
Reply With Quote
  #10   Spotlight this post!  
Unread 24-01-2017, 20:05
mtthwroberts mtthwroberts is offline
Registered User
FRC #3669
 
Join Date: Jan 2017
Location: Ripon, Ca
Posts: 13
mtthwroberts is an unknown quantity at this point
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!
Reply With Quote
  #11   Spotlight this post!  
Unread 24-01-2017, 20:15
Jonathan L.'s Avatar
Jonathan L. Jonathan L. is offline
Programmer alumnus, mentor, and CSA
FRC #1094 (Channel Cats)
 
Join Date: Jan 2013
Rookie Year: 2011
Location: St. Louis MO
Posts: 89
Jonathan L. is a jewel in the roughJonathan L. is a jewel in the roughJonathan L. is a jewel in the roughJonathan L. is a jewel in the rough
Re: Motor Control RefNum Registry Error

Do you have two or four Talon SRXs controlling your drive motors?
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 12:55.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi