LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Changing phase angle of signal dynamically over time

Changing phase angle of signal dynamically over time

Greetings All
I'm trying to have my vi change my phase angle from 0 to 360 over time
I can get it to work by manually changing/adjusting the phase slider
but how can I have it increase or decrease over time automatically/dynamically.

Example:
Have 1st signal phase change from 0 to 360 over a second and repeat until time target to stop variable is reached.
Have 2nd signal phase change from 0 to 360 ten times a second and repeat until time target to stop variable is reached.


The reason I'm using mathscript is due to the fact I will be creating multiple signals
with multiple sin and cos that include about 50 terms and using the sin and cos vi's
would get vary messy very quick.  And I don't think having several timers would work in one loop.  I'm Basically testing out different ways standing waves are created using multiple signals.

Some ideas I had but not sure how to implement/or if they would work:
1) I was going to tie the x value back into the phase/degrees1 variable and multiply then do a modulo 360 so whatever time it is it would only go from phase 0 to 360.
(the problem is it looks like it skips values and not sure how to implement on multiple signals in same loop running at different speeds)

thanks
sal22
 
PS I'm using labview 8.6
Download All
0 Kudos
Message 1 of 1
(2,986 Views)