View Single Post
  #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