Go to Post IMO, everyone should experience at least one Battlecry. - Dan Petrovic [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 30-10-2016, 13:45
Ari423's Avatar
Ari423 Ari423 is online now
LabVIEW aficionado and robot addict
AKA: The guy with the yellow hat
FRC #5987 (Galaxia)
Team Role: Mentor
 
Join Date: Mar 2015
Rookie Year: 2012
Location: Haifa, Israel
Posts: 496
Ari423 has a brilliant futureAri423 has a brilliant futureAri423 has a brilliant futureAri423 has a brilliant futureAri423 has a brilliant futureAri423 has a brilliant futureAri423 has a brilliant futureAri423 has a brilliant futureAri423 has a brilliant futureAri423 has a brilliant futureAri423 has a brilliant future
Motion Profiling VI

To keep myself awake during class I made a VI that calculates motion profiles given a distance to travel, initial and final velocities, and max allowed velocity and acceleration. You can specify a timestep, or you can let it auto-calculate the timestep for maximum resolution on the graphs. If you want to see the derivation of the math behind it, send me a PM (it's just a lot of long algebra expressions).

The loop is used to create the graph and tables. If you wanted to use this on a robot, you could get rid of the loop, graphs, tables, and timestep inputs/outputs. Just get the three time value outputs and switch states (accelerating, coasting, decelerating) when that much time has elapsed.

Let me know if you have any questions or find any problems with it.
Attached Files
File Type: vi Motion Profiling.vi (23.3 KB, 22 views)
__________________
2017-present: Mentor FRC 5987
2017-present: CSA for FIRST in Israel
2012-2016: Member FRC 423
2013: Programmer
2014: Head Programmer, Wiring
2015: Head Programmer, Wiring
2016: Captain, Head Programmer, Wiring, Manipulator, Chassis, CAD, Business, Outreach (basically everything)


Reply With Quote
  #2   Spotlight this post!  
Unread 30-10-2016, 14:43
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 7,995
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: Motion Profiling VI

Quote:
Originally Posted by Ari423 View Post
To keep myself awake during class I made a VI that calculates motion profiles given a distance to travel, initial and final velocities...Let me know if you have any questions or find any problems with it.
What about initial and final acceleration?



Reply With Quote
  #3   Spotlight this post!  
Unread 30-10-2016, 15:07
Ari423's Avatar
Ari423 Ari423 is online now
LabVIEW aficionado and robot addict
AKA: The guy with the yellow hat
FRC #5987 (Galaxia)
Team Role: Mentor
 
Join Date: Mar 2015
Rookie Year: 2012
Location: Haifa, Israel
Posts: 496
Ari423 has a brilliant futureAri423 has a brilliant futureAri423 has a brilliant futureAri423 has a brilliant futureAri423 has a brilliant futureAri423 has a brilliant futureAri423 has a brilliant futureAri423 has a brilliant futureAri423 has a brilliant futureAri423 has a brilliant futureAri423 has a brilliant future
Re: Motion Profiling VI

Quote:
Originally Posted by Ether View Post
What about initial and final acceleration?
Right now the profiles it produces are acceleration limited, not jerk limited. So (as I understand it) initial and final accelerations are not needed - they are always 0 in this model. My next version will be jerk-limited so it will include max jerk and initial and final accelerations. You have more experience with this stuff than I do, so let me know if I'm mistaken with this.
__________________
2017-present: Mentor FRC 5987
2017-present: CSA for FIRST in Israel
2012-2016: Member FRC 423
2013: Programmer
2014: Head Programmer, Wiring
2015: Head Programmer, Wiring
2016: Captain, Head Programmer, Wiring, Manipulator, Chassis, CAD, Business, Outreach (basically everything)


Reply With Quote
  #4   Spotlight this post!  
Unread 30-10-2016, 17:13
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 7,995
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: Motion Profiling VI


Have you ever ridden in a car with a student driver who, when approaching a stop sign, keeps their foot pressed on the brake pedal with constant force all the way until the car jerks to a stop?

That's what you get if your acceleration (deceleration) is not tapered to zero as you approach the destination.



Last edited by Ether : 30-10-2016 at 18:09.
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:47.

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