Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

Sine Wave PID Control

Hi, I'm using an NI myRIO to control a voice coil actuator (VCA). I am using the following code (attached) to implement position control. I am able to put the VCA in a set position and I am able to have it move sinusoidally. However, what I would like to do now is have it move at a discrete, rather than continous, sinusoid. Basically, I just want it to move 1 period of a sine wave and then stop (at a set amplitude and frequency). Right now I'm using the Sine Signal which uses the current time of the simulation loop, and I've tried implementing other ways of calculating the sine wave signal but they didn't seem to work within the control loop. I'm not sure if there is a way to do this or if I should be going about it a different way. I would appreciate any advice. Thanks...

0 Kudos
Message 1 of 2
(4,526 Views)

I'm not sure if you're just looking for an alternative method for signal generation, but if so, I would recommend taking a look at the link below.

 

http://www.ni.com/white-paper/4087/en/

0 Kudos
Message 2 of 2
(4,497 Views)