Go to Post I would much rather educate the audience than dumb-down the game. - dlavery [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
  #1   Spotlight this post!  
Unread 01-02-2014, 19:30
xXhunter47Xx's Avatar
xXhunter47Xx xXhunter47Xx is offline
Lord of Lazy
AKA: Austin $wagmaster1337
FRC #4738 (Patribots)
Team Role: College Student
 
Join Date: Jan 2014
Rookie Year: 2013
Location: San Diego
Posts: 305
xXhunter47Xx will become famous soon enough
Can I implement Scaling factor in PWM?

Because the motors are not running the same speed as each other.
Reply With Quote
  #2   Spotlight this post!  
Unread 01-02-2014, 19:40
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,100
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: Can I implement Scaling factor in PWM?

Quote:
Originally Posted by xXhunter47Xx View Post
Because the motors are not running the same speed as each other.
I assume this is for your drivetrain?

It's better to try to find the source of the problem, if you can, and fix it.

What symptoms are you observing that leads to your conclusion that the motors are not running at the same speed?

Have you calibrated all of the motor controllers in situ?

What kind of drivetrain? (e.g. 4 wheel skidsteer, 6 wheel drop center, mecanum/omni, chains/belts/straight-off-the-gearbox-output-shaft, etc).

What kind of operator interface? (e.g. Arcade, Tank, etc)?

Have you noticed that some of the motors are getting noticeably hotter than others?

What are the DS diagnostics telling you about your joystick values and your PWM commands?



Last edited by Ether : 01-02-2014 at 19:49.
Reply With Quote
  #3   Spotlight this post!  
Unread 01-02-2014, 20:20
xXhunter47Xx's Avatar
xXhunter47Xx xXhunter47Xx is offline
Lord of Lazy
AKA: Austin $wagmaster1337
FRC #4738 (Patribots)
Team Role: College Student
 
Join Date: Jan 2014
Rookie Year: 2013
Location: San Diego
Posts: 305
xXhunter47Xx will become famous soon enough
Re: Can I implement Scaling factor in PWM?

Yes for my drivetrain.
The problem is the resistance for each motor is different (I assume) because it's a custom built chassis and it isn't machined by a master machinist in the business for 101 years, it's drilled by 16-18 year old students. That's not exactly something we can fix.
What do you mean by situ?
We're using mecanum drive.
Sometimes Yes.
Not sure about what you mean by that last question.
Reply With Quote
  #4   Spotlight this post!  
Unread 01-02-2014, 20:53
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,100
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: Can I implement Scaling factor in PWM?

Quote:
Originally Posted by xXhunter47Xx View Post
it's drilled by 16-18 year old students. That's not exactly something we can fix.
The idea is to fix the drivetrain, not the students

What symptoms are you observing that leads to your conclusion that the motors are not running at the same speed?


Quote:
What do you mean by situ?
http://www.thefreedictionary.com/in-situ


Quote:
We're using mecanum drive
chains/belts/straight-off-the-gearbox-output-shaft?

What kind of operator interface? 3-axis joystick? Two 2-axis joysticks? Something else?


Quote:
Sometimes Yes.
Sometimes Yes what? Some motors getting hotter than others?

Are you using the same model motor controller for all 4 motors?


Quote:
Not sure about what you mean by that last question.
Diagnostics on driver station and dashboard.


Reply With Quote
  #5   Spotlight this post!  
Unread 02-02-2014, 13:18
xXhunter47Xx's Avatar
xXhunter47Xx xXhunter47Xx is offline
Lord of Lazy
AKA: Austin $wagmaster1337
FRC #4738 (Patribots)
Team Role: College Student
 
Join Date: Jan 2014
Rookie Year: 2013
Location: San Diego
Posts: 305
xXhunter47Xx will become famous soon enough
Re: Can I implement Scaling factor in PWM?

When we put it on blocks, creeping the robot forward not all the motors run the same speed. At full throttle and full reverse it all goes relatively the same.

Using 4 Jaguars straight of the gearbox output shaft. We're using a Logitech Xtreme 3D joystick with twist. The test was made using a Logitech Attack 3.

We are using Black Jaguars for all of them, and only one of them gets a little more hot. It's not that much of a difference.

I haven't been able to touch it since then since we're building on the chassis at this point in time. I'll update you on that when everything's mounted.
Reply With Quote
  #6   Spotlight this post!  
Unread 02-02-2014, 14:31
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,100
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: Can I implement Scaling factor in PWM?

Quote:
Originally Posted by xXhunter47Xx View Post
When we put it on blocks, creeping the robot forward not all the motors run the same speed. At full throttle and full reverse it all goes relatively the same.
That doesn't sound too unusual. Does it affect the way the vehicle drives? If so, how? (This is important to know, in order to make suggestions for correcting it).

Quote:
We are using Black Jaguars for all of them, and only one of them gets a little more hot. It's not that much of a difference.
How difficult would it be to swap the hot motor with one on the other side, and see if the problem follows the motor or stays on the same side.

Quote:
We're using a Logitech Xtreme 3D joystick with twist.
You haven't said yet, but if the problem is manifesting itself as undesired behavior while driving (and not just an observation made while the bot was on blocks), and if you are unable to identify (or correct) the root cause, you may be able mitigate it by using a gyro (about which more later).




Reply With Quote
  #7   Spotlight this post!  
Unread 02-02-2014, 17:38
Dexterium's Avatar
Dexterium Dexterium is offline
Registered User
AKA: Adam Poindexter
FRC #1208 (Metool Brigade)
Team Role: Programmer
 
Join Date: Sep 2012
Rookie Year: 2011
Location: United States
Posts: 24
Dexterium is an unknown quantity at this point
Re: Can I implement Scaling factor in PWM?

My team encounters this problem on every robot we make. We usually blame gearboxes and chains and forget a mechanical fix for it. The best way to augment the drive control is to place a gyro on the robot. While this is not a direct fix for the problem it treats the symptoms. The gyro detects the direction the robot is moving, compares it to the command from the joystick, and corrects the difference. The mecanum drive block has a place for a gyro input. All you have to do is pop the gyro on the bot (dead center) and connect it to the block.
Attached Thumbnails
Click image for larger version

Name:	am-2067-2.jpg
Views:	11
Size:	96.1 KB
ID:	16072  
Reply With Quote
  #8   Spotlight this post!  
Unread 02-02-2014, 22:48
xXhunter47Xx's Avatar
xXhunter47Xx xXhunter47Xx is offline
Lord of Lazy
AKA: Austin $wagmaster1337
FRC #4738 (Patribots)
Team Role: College Student
 
Join Date: Jan 2014
Rookie Year: 2013
Location: San Diego
Posts: 305
xXhunter47Xx will become famous soon enough
Re: Can I implement Scaling factor in PWM?

Quote:
Originally Posted by Ether View Post
That doesn't sound too unusual. Does it affect the way the vehicle drives? If so, how? (This is important to know, in order to make suggestions for correcting it).



How difficult would it be to swap the hot motor with one on the other side, and see if the problem follows the motor or stays on the same side.



You haven't said yet, but if the problem is manifesting itself as undesired behavior while driving (and not just an observation made while the bot was on blocks), and if you are unable to identify (or correct) the root cause, you may be able mitigate it by using a gyro (about which more later).




The vehicle drives great in every which direction except for strafing along the X axis. Our chassis is a custom built one that we forgot to implement ease of access to (terrible but hey learning experience).

We're going with CAN mode (which I'm not too terribly sure how to set up) on the Jags so we can implement encoders for Auton mode, and we tried implementing a gyro today but it didn't work out so well. It's wired up but I'm not sure how to code it. The mecanum drive block has a Gyro input but I don't know what to put into it. We have driven it on ground and it's great except for X-axis strafing.

Dexterium, would you mind if you posted an example of plugging the gyro into the block? Do you have to initialize the gyro in begin.vi?
Reply With Quote
  #9   Spotlight this post!  
Unread 02-02-2014, 23:39
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,100
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: Can I implement Scaling factor in PWM?

Quote:
Originally Posted by xXhunter47Xx View Post
The vehicle drives great in every which direction except for strafing along the X axis.
What happens when you try to strafe along the X axis?


Reply With Quote
  #10   Spotlight this post!  
Unread 03-02-2014, 00:05
xXhunter47Xx's Avatar
xXhunter47Xx xXhunter47Xx is offline
Lord of Lazy
AKA: Austin $wagmaster1337
FRC #4738 (Patribots)
Team Role: College Student
 
Join Date: Jan 2014
Rookie Year: 2013
Location: San Diego
Posts: 305
xXhunter47Xx will become famous soon enough
Re: Can I implement Scaling factor in PWM?

Strafing along the X the robot ends up rotating (before we used the Extreme 3D stick) because of what I can only assume is some motors are running way faster than the others. Again, this only happens during creep strafing. Full speed strafe is not a problem, but we would like low speed strafing for autonomous.
Thanks for all the help you provided so far by the way, my team and I appreciate it!
Reply With Quote
  #11   Spotlight this post!  
Unread 03-02-2014, 00:49
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,100
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: Can I implement Scaling factor in PWM?

Quote:
Originally Posted by xXhunter47Xx View Post
Strafing along the X the robot ends up rotating (before we used the Extreme 3D stick)
I'm a bit confused. Which of the following meanings is the intended one:
1) You used to have the problem when you were using the Extreme 3D joystick, but you aren't having the problem now

2) You used to have the problem, but you aren't having the problem now that you are using the Extreme 3D joystick

3) You didn't have the problem when you were using the Extreme 3D joystick, but now you have the problem

4) You didn't have the problem, but now that you are using the Extreme 3D joystick you have the problem

5) Something entirely different?

What diameter mec wheels are you using? And are they VEX or AM?

Have you tried temporarily disabling rotation and forward/reverse in your code (simply by multiplying those axes by zero) and then running the robot to see how well the strafe behaves?

Check all the rollers on each wheel. Do they all spin freely? Or are some "dragging" somewhat? Do all the rollers have the same amount of axial free play, or is there a lot of variation? Some of the models of affordable mec wheels used in FRC robotics can display the symptoms you are describing if they are not meticulously assembled and adjusted.

If your attempts to locate and correct the root cause of the problem are not successful, a gyro can be used to help minimize rotation of the robot (when you don't want rotation).


Reply With Quote
  #12   Spotlight this post!  
Unread 03-02-2014, 10:24
xXhunter47Xx's Avatar
xXhunter47Xx xXhunter47Xx is offline
Lord of Lazy
AKA: Austin $wagmaster1337
FRC #4738 (Patribots)
Team Role: College Student
 
Join Date: Jan 2014
Rookie Year: 2013
Location: San Diego
Posts: 305
xXhunter47Xx will become famous soon enough
Re: Can I implement Scaling factor in PWM?

Oh no we're having this problem with both joysticks but I wanted to rule out twisting the joystick while strafing as a factor. We removed both y and rotational axis to see if it would happen and it did.
We are using 6 inch andyMark wheels (big metal ones). We are implementing a gyro and shaft encoders to solve the problem. I just don't know where to plug the gyro in from teleop.vi.
Reply With Quote
  #13   Spotlight this post!  
Unread 03-02-2014, 10:50
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,100
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: Can I implement Scaling factor in PWM?

Quote:
Originally Posted by xXhunter47Xx View Post
Oh no we're having this problem with both joysticks but I wanted to rule out twisting the joystick while strafing as a factor. We removed both y and rotational axis to see if it would happen and it did.
That rules out an errant "rotate" command signal as the root cause.


Quote:
We are using 6 inch andyMark wheels (big metal ones).
Check all the rollers on each wheel. Do they all spin freely? Or are some "dragging" somewhat? Do all the rollers have the same amount of axial free play, or is there a lot of variation?

Also, how difficult would it be to swap the hot motor with one on the other side, and see if the problem follows the motor or stays on the same side?


Quote:
We are implementing a gyro and shaft encoders to solve the problem. I just don't know where to plug the gyro in from teleop.vi
The only place I know of to "just plug in" the gyro in LabVIEW is in the VI for 3 DoF (mec or omni) drive. But this gives you field-centric joystick control - it does not prevent rotation.

If you want to use the gyro to help minimize rotation while strafing, that can be done. I could post some C pseudo-code if that would be helpful - or maybe a LabVIEW guru could post a LabVIEW picture.



Last edited by Ether : 03-02-2014 at 10:54.
Reply With Quote
  #14   Spotlight this post!  
Unread 03-02-2014, 13:20
xXhunter47Xx's Avatar
xXhunter47Xx xXhunter47Xx is offline
Lord of Lazy
AKA: Austin $wagmaster1337
FRC #4738 (Patribots)
Team Role: College Student
 
Join Date: Jan 2014
Rookie Year: 2013
Location: San Diego
Posts: 305
xXhunter47Xx will become famous soon enough
Re: Can I implement Scaling factor in PWM?

Some rollers drag and some have free play or a combination of both.
What I meant for the gyro was that I wanted the robot to have field centric control, not to solve my problem. That's what the shaft encoders are for (hopefully). We only want slow speed strafing for auton mode anyways.

Like I said, the gearboxes are extremely hard to take off and swapping motors takes away a lot of time that can be used doing something else.
Reply With Quote
  #15   Spotlight this post!  
Unread 03-02-2014, 13:45
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,100
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: Can I implement Scaling factor in PWM?

Quote:
Originally Posted by xXhunter47Xx View Post
What I meant for the gyro was that I wanted the robot to have field centric control, not to solve my problem.
In that case, in your code connect the gyro signal to the gyro input at the top of the icon.

Quote:
Originally Posted by xXhunter47Xx View Post
Some rollers drag and some have free play or a combination of both.
Yikes. You should try to fix that. Are you sure you have the 6" wheels and not the 8" ones??


Quote:
Originally Posted by xXhunter47Xx View Post
Like I said, the gearboxes are extremely hard to take off and swapping motors takes away a lot of time that can be used doing something else.
What post number was that? I didn't see it.


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 21:03.

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