06-10-2023 01:01 PM
Hello, I am new to Labview.
I would like to use Labview to control the position of a servo motor (which also has a separate cable for position feedback).
I found a video which uses an Arduino. This is what I intend to do as well: (Link)
Instead of using a dial to manually change the position of the servo, I would like to push a button after which the servo rotates from 0 to 90 degrees (within a certain time).
To prevent large acceleration/torque spikes, I would like to gradually change the angle from 0 to 90 using a sine function:
Any help on how to implement this will be greatly appreciated!
06-11-2023 09:03 PM
Well, I've done some "motion control" using what I called a "Position Trapezoid with constant acceleration". It had three parameters -- the distance to travel, the speed (or "absolute value of velocity") of the movement, and the acceleration/deceleration at the ends of the velocity "steps". Given a fixed sampling frequency, a little calculating (and simple algebra), you divide the "change in position" into "acceleration "steps" to reach the desired "constant velocity", a "constant velocity" section to get most of the way to the "new position", and a "deceleration" section mirroring the acceleration part. It's been a bunch of years since I did this derivation, but it was a fun exercise in algebra -- you should be able to do the simple math.
Bob Schor
06-12-2023 09:38 AM
In general there are three ways of using LabVIEW with an Arduino