Go to Post However, it is logistically impossible, so it's now just a joke. - EricH [more]
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
  #16   Spotlight this post!  
Unread 24-05-2015, 15:00
TBots TBots is offline
Registered User
FRC #3350
 
Join Date: Sep 2014
Location: Texarkana
Posts: 39
TBots is an unknown quantity at this point
Re: Talon SRX and Analog Encoders

Ether, what did you mean when you said this?

Quote:
Originally Posted by Ether View Post

use the appropriate CAN commands to set the gains in the Talon's PID controller.
Do you mean the difference in the current position of the encoder and the set point?
Reply With Quote
  #17   Spotlight this post!  
Unread 24-05-2015, 15:52
MaGiC_PiKaChU's Avatar
MaGiC_PiKaChU MaGiC_PiKaChU is offline
Drive Coach
AKA: Antoine L.
FRC #3360 (Hyperion)
Team Role: Mentor
 
Join Date: Mar 2014
Rookie Year: 2012
Location: Sherbrooke
Posts: 608
MaGiC_PiKaChU has a reputation beyond reputeMaGiC_PiKaChU has a reputation beyond reputeMaGiC_PiKaChU has a reputation beyond reputeMaGiC_PiKaChU has a reputation beyond reputeMaGiC_PiKaChU has a reputation beyond reputeMaGiC_PiKaChU has a reputation beyond reputeMaGiC_PiKaChU has a reputation beyond reputeMaGiC_PiKaChU has a reputation beyond reputeMaGiC_PiKaChU has a reputation beyond reputeMaGiC_PiKaChU has a reputation beyond reputeMaGiC_PiKaChU has a reputation beyond repute
Re: Talon SRX and Analog Encoders

Quote:
Originally Posted by TBots View Post
Ether, what did you mean when you said this?

Do you mean the difference in the current position of the encoder and the set point?
You have a command probably called "SetPID"... It allows you to place your parameters for the PID control, when you control with the position. You call this once before your control loop. if you never worked with PIDs before, I'm pretty sure Ether could help you
__________________
2012 - 3360 - Junior member
2013 - 3360 - Lead Programmer, Human player
2014 - 3360 - Lead Programmer, Human player
2015 - 3360 - Lead Programmer, Driver
2016 - 3360 - Mentor, Drive coach



Reply With Quote
  #18   Spotlight this post!  
Unread 24-05-2015, 16:26
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,086
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Talon SRX and Analog Encoders

Quote:
Originally Posted by TBots View Post
Do you mean the difference in the current position of the encoder and the set point?
No. Watch this video. It explains what PID gains are.


Reply With Quote
  #19   Spotlight this post!  
Unread 24-05-2015, 22:54
TBots TBots is offline
Registered User
FRC #3350
 
Join Date: Sep 2014
Location: Texarkana
Posts: 39
TBots is an unknown quantity at this point
Re: Talon SRX and Analog Encoders

Ah I see, you just mean the constants associated with PID. I understand now.

How frequent is the tele-op code executed on the roboRIO?

I need to know so I can choose the sensitivity of the joystick. Ill then use the values of the joystick in the math for the set point.
Reply With Quote
  #20   Spotlight this post!  
Unread 25-05-2015, 12:35
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,086
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Talon SRX and Analog Encoders

Quote:
Originally Posted by TBots View Post
I need to know [TeleOp frequency] so I can choose the sensitivity of the joystick.
Please explain in a bit more detail what you mean.


Reply With Quote
  #21   Spotlight this post!  
Unread 25-05-2015, 13:10
MaGiC_PiKaChU's Avatar
MaGiC_PiKaChU MaGiC_PiKaChU is offline
Drive Coach
AKA: Antoine L.
FRC #3360 (Hyperion)
Team Role: Mentor
 
Join Date: Mar 2014
Rookie Year: 2012
Location: Sherbrooke
Posts: 608
MaGiC_PiKaChU has a reputation beyond reputeMaGiC_PiKaChU has a reputation beyond reputeMaGiC_PiKaChU has a reputation beyond reputeMaGiC_PiKaChU has a reputation beyond reputeMaGiC_PiKaChU has a reputation beyond reputeMaGiC_PiKaChU has a reputation beyond reputeMaGiC_PiKaChU has a reputation beyond reputeMaGiC_PiKaChU has a reputation beyond reputeMaGiC_PiKaChU has a reputation beyond reputeMaGiC_PiKaChU has a reputation beyond reputeMaGiC_PiKaChU has a reputation beyond repute
Re: Talon SRX and Analog Encoders

Quote:
Originally Posted by Ether View Post
Please explain in a bit more detail what you mean.
pretty sure he means how many times the roboRio runs the teleoperated loop very second...

I guess it depends how much code you run... you can find the number of iteration by printing the time each time you enter the loop... I don't know how that is useful for your PID control tough
__________________
2012 - 3360 - Junior member
2013 - 3360 - Lead Programmer, Human player
2014 - 3360 - Lead Programmer, Human player
2015 - 3360 - Lead Programmer, Driver
2016 - 3360 - Mentor, Drive coach



Reply With Quote
  #22   Spotlight this post!  
Unread 25-05-2015, 14:02
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,086
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Talon SRX and Analog Encoders


Let me try again:

Quote:
Originally Posted by TBots View Post
I need to know [TeleOP frequency] so I can choose the sensitivity of the joystick
@Tbots: ..Please explain in a bit more detail the relationship between the TeleOp frequency and the bolded portion above.



Reply With Quote
  #23   Spotlight this post!  
Unread 29-05-2015, 15:44
TBots TBots is offline
Registered User
FRC #3350
 
Join Date: Sep 2014
Location: Texarkana
Posts: 39
TBots is an unknown quantity at this point
Re: Talon SRX and Analog Encoders

In order to scale -1 to 1, the normal scale of the joystick, to 0 to 1024, we would have to add one and multiply by 512 the original value of the joystick. The problem is, since we would be using a joystick, whoever was driving would have to hold that position on the joystick else the wheel would return back to the the 512th position.

The only way I can think to avoid this, is if a button would increase the value of the angle while another one lowered it. The only problem is I'd have to know how often the tele-op vi was executed. Otherwise I wouldn't know by how much to increase the value. In other words, I wouldn't know how sensitive to make the joystick.

In the case that the button was held down, the wheel may have too large of an increase in angle and mess up the wires of the wheel. This is why I'd need to know how long it takes tele-op to execute, in order to determine what magnitude the decrease/increase would need to be.
Reply With Quote
  #24   Spotlight this post!  
Unread 29-05-2015, 16:12
TBots TBots is offline
Registered User
FRC #3350
 
Join Date: Sep 2014
Location: Texarkana
Posts: 39
TBots is an unknown quantity at this point
Re: Talon SRX and Analog Encoders

MaGiC_PiKaChU, when connecting the encoders with the data cable and using a breadboard and resistors, how did you connect the data cable? It has two rows of holes in it, each with 5 holes. 2x5. How did you connect these to the breadboard?

Also, do you have to have a d-link connected to the robot in order to enter web-based configuration? We've never used web-based configuration, but we need to use it to configure the SRX.
Reply With Quote
  #25   Spotlight this post!  
Unread 29-05-2015, 16:31
randantor randantor is offline
Registered User
AKA: James Y
FRC #0624 (CRyptonite)
Team Role: Alumni
 
Join Date: Jun 2013
Rookie Year: 2012
Location: Katy, TX
Posts: 48
randantor is a glorious beacon of lightrandantor is a glorious beacon of lightrandantor is a glorious beacon of lightrandantor is a glorious beacon of lightrandantor is a glorious beacon of lightrandantor is a glorious beacon of light
Re: Talon SRX and Analog Encoders

In LabVIEW, the Teleop VI runs every time the robot receives a packet from the driver station, so the delay could be pretty irregular.

A way to achieve what I think you're looking for would be to measure the time delta between each run of Teleop, and multiply that by the joystick value before applying the scaling factor and integrating, to ensure that the joystick power is being applied "evenly" with respect to time.

For example:
Reply With Quote
  #26   Spotlight this post!  
Unread 29-05-2015, 16:46
MaGiC_PiKaChU's Avatar
MaGiC_PiKaChU MaGiC_PiKaChU is offline
Drive Coach
AKA: Antoine L.
FRC #3360 (Hyperion)
Team Role: Mentor
 
Join Date: Mar 2014
Rookie Year: 2012
Location: Sherbrooke
Posts: 608
MaGiC_PiKaChU has a reputation beyond reputeMaGiC_PiKaChU has a reputation beyond reputeMaGiC_PiKaChU has a reputation beyond reputeMaGiC_PiKaChU has a reputation beyond reputeMaGiC_PiKaChU has a reputation beyond reputeMaGiC_PiKaChU has a reputation beyond reputeMaGiC_PiKaChU has a reputation beyond reputeMaGiC_PiKaChU has a reputation beyond reputeMaGiC_PiKaChU has a reputation beyond reputeMaGiC_PiKaChU has a reputation beyond reputeMaGiC_PiKaChU has a reputation beyond repute
Re: Talon SRX and Analog Encoders

Quote:
Originally Posted by TBots View Post
MaGiC_PiKaChU, when connecting the encoders with the data cable and using a breadboard and resistors, how did you connect the data cable? It has two rows of holes in it, each with 5 holes. 2x5. How did you connect these to the breadboard?

Also, do you have to have a d-link connected to the robot in order to enter web-based configuration? We've never used web-based configuration, but we need to use it to configure the SRX.
1- we had tons of data cables, so we cut one side to connect each wire individually... you could also plug a small wire into each hole, but that would be harder

2- No, your RoboRio has its own IP address, it changes if you connect via USB or ethernet. I don't remember the defaults, because we changed it to 10.33.60.2 as soon as we got it. You can find this address somewhere in the user's manual
__________________
2012 - 3360 - Junior member
2013 - 3360 - Lead Programmer, Human player
2014 - 3360 - Lead Programmer, Human player
2015 - 3360 - Lead Programmer, Driver
2016 - 3360 - Mentor, Drive coach



Reply With Quote
  #27   Spotlight this post!  
Unread 29-05-2015, 18:09
TBots TBots is offline
Registered User
FRC #3350
 
Join Date: Sep 2014
Location: Texarkana
Posts: 39
TBots is an unknown quantity at this point
Re: Talon SRX and Analog Encoders

Quote:
Originally Posted by MaGiC_PiKaChU View Post
1- we had tons of data cables, so we cut one side to connect each wire individually... you could also plug a small wire into each hole, but that would be harder
Cutting them would make it hard to plug them into the breakout board later. Just the same, we have had a lot of difficulty trying to find wires small enough to fit into the data cable's slots. Do you know what each hole does on the data cable?

Quote:
Originally Posted by MaGiC_PiKaChU View Post
2- No, your RoboRio has its own IP address, it changes if you connect via USB or ethernet. I don't remember the defaults, because we changed it to 10.33.60.2 as soon as we got it. You can find this address somewhere in the user's manual
The IP changes?? you mean it's not “roborio-XXXX.local”
where XXXX is the team number? It has an extension such as .2 or .6?
Reply With Quote
  #28   Spotlight this post!  
Unread 29-05-2015, 18:13
TBots TBots is offline
Registered User
FRC #3350
 
Join Date: Sep 2014
Location: Texarkana
Posts: 39
TBots is an unknown quantity at this point
Re: Talon SRX and Analog Encoders

Quote:
Originally Posted by randantor View Post
A way to achieve what I think you're looking for would be to measure the time delta between each run of Teleop, and multiply that by the joystick value before applying the scaling factor and integrating, to ensure that the joystick power is being applied "evenly" with respect to time.
I've never heard of measuring time, but it sounds like a great idea! Ill see if I can find it.

Thank you for the help!
Reply With Quote
  #29   Spotlight this post!  
Unread 29-05-2015, 21:25
MaGiC_PiKaChU's Avatar
MaGiC_PiKaChU MaGiC_PiKaChU is offline
Drive Coach
AKA: Antoine L.
FRC #3360 (Hyperion)
Team Role: Mentor
 
Join Date: Mar 2014
Rookie Year: 2012
Location: Sherbrooke
Posts: 608
MaGiC_PiKaChU has a reputation beyond reputeMaGiC_PiKaChU has a reputation beyond reputeMaGiC_PiKaChU has a reputation beyond reputeMaGiC_PiKaChU has a reputation beyond reputeMaGiC_PiKaChU has a reputation beyond reputeMaGiC_PiKaChU has a reputation beyond reputeMaGiC_PiKaChU has a reputation beyond reputeMaGiC_PiKaChU has a reputation beyond reputeMaGiC_PiKaChU has a reputation beyond reputeMaGiC_PiKaChU has a reputation beyond reputeMaGiC_PiKaChU has a reputation beyond repute
Re: Talon SRX and Analog Encoders

Quote:
Originally Posted by TBots View Post
Cutting them would make it hard to plug them into the breakout board later. Just the same, we have had a lot of difficulty trying to find wires small enough to fit into the data cable's slots. Do you know what each hole does on the data cable?
see my thumbnail

Quote:
Originally Posted by TBots View Post
The IP changes?? you mean it's not “roborio-XXXX.local”
where XXXX is the team number? It has an extension such as .2 or .6?
I don't remember... as long as you find the right IP you'll be able to configure your SRX... I always connected using 10.33.60.2, in my case
Attached Thumbnails
Click image for larger version

Name:	Capture d’écran 2015-05-29 à 21.23.36.png
Views:	18
Size:	59.3 KB
ID:	19065  
__________________
2012 - 3360 - Junior member
2013 - 3360 - Lead Programmer, Human player
2014 - 3360 - Lead Programmer, Human player
2015 - 3360 - Lead Programmer, Driver
2016 - 3360 - Mentor, Drive coach



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 20:15.

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