Go to Post Coming up next on Pimp My Ride.....Yo man, here is the real deal. A two-oh-oh-six Segway I-one-eighty, with stock rims, stock fenders, and two 3 horse motors that red-line at twelve point five miles per hour. Get ready, because I'm going pimp this ride! - artdutra04 [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 04-04-2010, 20:56
RoboGuy RoboGuy is offline
Registered User
FRC #3452 (GreengineerZ)
Team Role: Programmer
 
Join Date: Apr 2010
Rookie Year: 2010
Location: Michigan
Posts: 14
RoboGuy is on a distinguished road
Help with CAN bus closed-loop speed control

Will the SetMotorSpeed.vi in LabVIEW set the "speed" or the "voltage" of motors if the Jaguars that are controlling the motors with CAN bus off the digital sidecar? Thanks in advance.
  #2   Spotlight this post!  
Unread 05-04-2010, 14:07
kamocat's Avatar
kamocat kamocat is offline
Test Engineer
AKA: Marshal Horn
FRC #3213 (Thunder Tech)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 2008
Location: Tacoma
Posts: 894
kamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nice
Send a message via AIM to kamocat Send a message via MSN to kamocat
Re: Help with CAN bus closed-loop speed control

The "set-speed" should set the speed, with feedback. (it requires an encoder)
I believe it's in RPM, but I don't recall.

The "set-voltage" is proportional; -1 to 1 just like the pwm-based "set-speed" in the WPI libraries.
__________________
-- Marshal Horn
  #3   Spotlight this post!  
Unread 05-04-2010, 15:09
RoboGuy RoboGuy is offline
Registered User
FRC #3452 (GreengineerZ)
Team Role: Programmer
 
Join Date: Apr 2010
Rookie Year: 2010
Location: Michigan
Posts: 14
RoboGuy is on a distinguished road
Re: Help with CAN bus closed-loop speed control

Which sub-pallete are the set-speed and set-voltage vi's in?
  #4   Spotlight this post!  
Unread 05-04-2010, 15:41
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,570
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: Help with CAN bus closed-loop speed control

All of the CAN VIs are available on FIRSTForge. http://firstforge.wpi.edu/sf/frs/do/....canjaguar/frs

The VIs included with LabVIEW do not support CAN. The SetSpeed VI that comes with LabVIEW uses PWM and sets a voltage, it doesn't actually set a closed loop speed.

CAN does not run from the digital sidecar, it either runs from the serial port on the cRIO through a black jaguar or from ethernet through a 2CAN. When you said CAN, did you really mean PWM?
  #5   Spotlight this post!  
Unread 05-04-2010, 23:03
RoboGuy RoboGuy is offline
Registered User
FRC #3452 (GreengineerZ)
Team Role: Programmer
 
Join Date: Apr 2010
Rookie Year: 2010
Location: Michigan
Posts: 14
RoboGuy is on a distinguished road
Re: Help with CAN bus closed-loop speed control

No I meant CAN. I'm sorry I didn't make that clear. I downloaded and looked at those vi's from Firstforge and it seems to me that they want inputs from encoders through the digital sidecar. But is there a way to program the Jaguars in Labview to perform closed-loop speed control by feeding the encoder wires straight to the Jaugars and hooking the Jaugars to CAN bus? (by the way, my team is using gray Jaugars just to let you know)
  #6   Spotlight this post!  
Unread 10-04-2010, 03:31
kamocat's Avatar
kamocat kamocat is offline
Test Engineer
AKA: Marshal Horn
FRC #3213 (Thunder Tech)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 2008
Location: Tacoma
Posts: 894
kamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nice
Send a message via AIM to kamocat Send a message via MSN to kamocat
Re: Help with CAN bus closed-loop speed control

Well, if you're using CAN, then the encoders SHOULD be hooked up directly to the jaguars.
The documentation may not explicitly say it, but if you're using CAN speed control (as opposed to voltage control), the encoders must be connected to the Jaguar, not the digital sidecar.
__________________
-- Marshal Horn
  #7   Spotlight this post!  
Unread 13-04-2010, 15:32
RoboGuy RoboGuy is offline
Registered User
FRC #3452 (GreengineerZ)
Team Role: Programmer
 
Join Date: Apr 2010
Rookie Year: 2010
Location: Michigan
Posts: 14
RoboGuy is on a distinguished road
Re: Help with CAN bus closed-loop speed control

Well, the problem is I don't know how to tell the Jaguars, in LabVIEW, to utilize the closed-loop speed control that the Jaguars already have in them when encoders are wired straight to the Jaguars and the Jaguars are daisy-chained with CAN from the serial port on the CompactRIO.
  #8   Spotlight this post!  
Unread 13-04-2010, 15:46
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,570
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: Help with CAN bus closed-loop speed control

Have you looked at the speed control example that is included with the CanJaguar for LabVIEW download from FIRSTForge?
  #9   Spotlight this post!  
Unread 13-04-2010, 16:17
RoboGuy RoboGuy is offline
Registered User
FRC #3452 (GreengineerZ)
Team Role: Programmer
 
Join Date: Apr 2010
Rookie Year: 2010
Location: Michigan
Posts: 14
RoboGuy is on a distinguished road
Re: Help with CAN bus closed-loop speed control

Yes, but the default form of that example requires inputs from encoders or potentiometers to the cRIO for the code to work right.
  #10   Spotlight this post!  
Unread 13-04-2010, 18:09
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,570
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: Help with CAN bus closed-loop speed control

The file I'm looking at "CAN Jaguar - Speed Control Example.vi" does not use encoders or potentiometers on the cRIO. It uses an encoder on the Jaguar.
  #11   Spotlight this post!  
Unread 13-04-2010, 19:33
Chris Hibner's Avatar Unsung FIRST Hero
Chris Hibner Chris Hibner is offline
Eschewing Obfuscation Since 1990
AKA: Lars Kamen's Roadie
FRC #0051 (Wings of Fire)
Team Role: Engineer
 
Join Date: May 2001
Rookie Year: 1997
Location: Canton, MI
Posts: 1,488
Chris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond repute
Re: Help with CAN bus closed-loop speed control

We didn't use CAN this year so I may off base with this so keep that in mind...

As far as I know, CAN gives you feedback on current. Current is proportional to torque in a DC motor. That means you can perform feedback and control torque, so you won't be directly controlling speed.
__________________
-
An ounce of perception is worth a pound of obscure.
  #12   Spotlight this post!  
Unread 13-04-2010, 19:36
kamocat's Avatar
kamocat kamocat is offline
Test Engineer
AKA: Marshal Horn
FRC #3213 (Thunder Tech)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 2008
Location: Tacoma
Posts: 894
kamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nicekamocat is just really nice
Send a message via AIM to kamocat Send a message via MSN to kamocat
Re: Help with CAN bus closed-loop speed control

Current is only one of the control modes.
There's Voltage, Speed, Position, and Current.
Current is often advertised because it is not a readily available option without CAN.
__________________
-- Marshal Horn
  #13   Spotlight this post!  
Unread 13-04-2010, 21:06
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: Help with CAN bus closed-loop speed control

Quote:
Originally Posted by Joe Ross View Post
The file I'm looking at "CAN Jaguar - Speed Control Example.vi" does not use encoders or potentiometers on the cRIO. It uses an encoder on the Jaguar.
Joe,

Would you please post a link to that file you're looking at?

I am told by our programmer (and others) that the WPI CAN/Jaguar VIs they have looked at only support closed-loop speed control performed by cRIO using encoder signals passed to the cRIO, not closed-loop speed control performed by the Jags using encoder signals connected to the Jags.

Thanks.

~
  #14   Spotlight this post!  
Unread 13-04-2010, 21:39
Radical Pi Radical Pi is offline
Putting the Jumper in the Bumper
AKA: Ian Thompson
FRC #0639 (Code Red Robotics)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2010
Location: New York
Posts: 655
Radical Pi has a spectacular aura aboutRadical Pi has a spectacular aura aboutRadical Pi has a spectacular aura about
Re: Help with CAN bus closed-loop speed control

Are you looking at the latest version from firstforge? The C++ version of the code didn't get closed-loop finished until midway through the season. LabVIEW most likely would be a similar situation
__________________

"To have no errors would be life without meaning. No strugle, no joy"
"A network is only as strong as it's weakest linksys"
  #15   Spotlight this post!  
Unread 13-04-2010, 23:04
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: Help with CAN bus closed-loop speed control

Quote:
Originally Posted by Radical Pi View Post
Are you looking at the latest version from firstforge? The C++ version of the code didn't get closed-loop finished until midway through the season. LabVIEW most likely would be a similar situation
Thanks, I'll download the latest rev and ask them to look at it again.


~
Closed Thread


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Closed Loop Speed Control kgzak NI LabVIEW 16 29-03-2010 21:27
closed-loop torque (current) wheel control for mecanum Ether Programming 3 07-02-2010 00:54
Radio Packet loss + closed loop control system = lunging robot Dave K. Control System 5 20-02-2007 06:09
PID control loops - closed loop feedback KenWittlief Technical Discussion 56 26-04-2004 21:27
How Can You Make A Closed Loop System???? GRR_340 Pneumatics 6 21-03-2002 12:27


All times are GMT -5. The time now is 09:43.

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