Go to Post It takes a village to raise a robotics student... - Bob Steele [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 28-01-2012, 10:16
windtakers windtakers is offline
Registered User
AKA: Blake Dansfield
FRC #3620 (Average Joes)
Team Role: Programmer
 
Join Date: Jan 2011
Rookie Year: 2011
Location: michigan
Posts: 33
windtakers is an unknown quantity at this point
Labview Motor Ramp up/down voltage

How do you ramp the voltage of a motor in labview.
Reply With Quote
  #2   Spotlight this post!  
Unread 29-01-2012, 18:17
dubiousSwain's Avatar
dubiousSwain dubiousSwain is offline
The ride never ends
AKA: Christian Steward
FRC #5420 (Velocity)
Team Role: Mentor
 
Join Date: Oct 2011
Rookie Year: 2011
Location: USA
Posts: 304
dubiousSwain has a reputation beyond reputedubiousSwain has a reputation beyond reputedubiousSwain has a reputation beyond reputedubiousSwain has a reputation beyond reputedubiousSwain has a reputation beyond reputedubiousSwain has a reputation beyond reputedubiousSwain has a reputation beyond reputedubiousSwain has a reputation beyond reputedubiousSwain has a reputation beyond reputedubiousSwain has a reputation beyond reputedubiousSwain has a reputation beyond repute
Re: Labview Motor Ramp up/down voltage

i would recommend having your drive team do it manually in case you need to accelerate quickly, but to do it with code i would recommend a PID loop that runs once when the joystick has input then resets when the joystick goes back to zero.
__________________
2015 MAR District Champions




Reply With Quote
  #3   Spotlight this post!  
Unread 29-01-2012, 19:17
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: Labview Motor Ramp up/down voltage

Quote:
Originally Posted by windtakers View Post
How do you ramp the voltage of a motor in labview.
write the LabVIEW equivalent of this:

Code:
if (new>prev) {
  if (new<=prev+max) {output=new;} else {output=prev+max;}
  }
else {
  if (new>=prev-max) {output=new;} else {output=prev-max;}
  }
prev=output;
"new" is the current cycle's output you want to filter

"output" is the filtered value to output

"prev" is the value you output in the previous cycle

"max" is the max change in output you want to allow per cycle.


Last edited by Ether : 29-01-2012 at 20:57. Reason: duh. coding error
Reply With Quote
  #4   Spotlight this post!  
Unread 29-01-2012, 20:39
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,579
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: Labview Motor Ramp up/down voltage

You could also take advantage the ramp built into the jaguars, either through CAN, or through the (new) preset ramp rate. See Q7 - Q10 in the Jaguar FAQ.
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 22:22.

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