LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Simple Timed Servo Motion?

I'm looking to input my degrees as a function of time that ranges from 0 to some variable degree maximum over a variable amount of time, and then ramps back down at the same rate. Any suggestions? I've tinkered with a timed loop but I don't know exactly how to manipulate it to give me exactly what I want so any help is greatly appreciated.

 

I've attached a screenshot of my block diagram and the input I'm looking to have values read into.

0 Kudos
Message 1 of 2
(2,133 Views)

The Ramp Pattern VI will give you a ramped array based on the number of samples, the starting value, and the ending value.  Then, the array elements can be passed individually to a function in a For Loop via an auto-indexing tunnel. Finally, you can control the execution time by including the Wait(ms) VI in the For Loop.

 

The following resources should help you if you have any questions about the aforementioned functions:

 

“Ramp Pattern VI”

https://www.ni.com/docs/en-US/bundle/labview-api-ref/page/vi-lib/analysis/1siggen-llb/ramp-pattern-v...

 

“Passing Elements in an Array through a Loop”

https://www.ni.com/docs/en-US/bundle/labview/page/processing-individual-elements-in-an-array-or-a-co...

 

“Wait (ms) Function”

https://www.ni.com/docs/en-US/bundle/labview-api-ref/page/functions/wait-ms.html

Cameron
0 Kudos
Message 2 of 2
(2,090 Views)