LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview, Change the phase between 2 signals dynamically

Solved!
Go to solution

Hello,

 

I'm working on a big VI , and for testing my VI I have some controls.  A part of my VI is to generate 2 sine signals with the same amplitude and frequency and a phase difference between thoses 2 signals.

 

My example is quite simple but very similar the one I use :

 

- I can change frequency and amplitude while the VI is running.

- I can't change the phase.

 

Anyone have an idea ?

 

 

thank in advance 😉

0 Kudos
Message 1 of 8
(4,540 Views)

HI,

I looked in help and there is written: "Phase (deg)—Initial phase in degrees of the waveform. The default is 0. "

 

So, I think that you are able to set phase only before VI's start.

 

Simyfren

0 Kudos
Message 2 of 8
(4,524 Views)

Hi,

 

Thank you for your rapidity, I had only look with the CTRL+H view  ..

 

Do you have an idea for increase this value during the run ?

 

I have tried sinewave generator but it work like the "simulate signal" ..

0 Kudos
Message 3 of 8
(4,516 Views)

Try to use block "Sine".

 

Here is small example:

two_sinus.png

 

Hope this helps!

Simyfren

0 Kudos
Message 4 of 8
(4,508 Views)

Hi Simyfren,

 

I have try your solution but it doesn't give anything usable for me..

 

I have also tested a lot of stuff but nothing comes good.

 

If anyone have an idea, he's welcome 🙂

 

Max

0 Kudos
Message 5 of 8
(4,420 Views)

Max,

 

When you say nothing useful, do you mean the VI did not run? Or, do you mean it runs but does not behave the way you want it to?

 

Dan

0 Kudos
Message 6 of 8
(4,408 Views)

Hi Danl_B,

 

My VI run, but I haven't a sine at my output. if I use a graph chart I can see a sine (not really good in résolution, it's more like a triangle) .

 

And if I set this signal for my DAQ analog Output and after that Acquiring with an other DAQ, it doesn't show me a sine but a square with strange change of amplitude.

 

I hope you can understand what I mean, my english is poor..

 

Max

0 Kudos
Message 7 of 8
(4,387 Views)
Solution
Accepted by topic author MaxLamb

I have find the solution :

 

I have set the input "reset signal" of Simulate_signal.vi with a constant TRUE. And with that it works fine ! 

 

 

Sorry for being a noob 😉

Hope this will help someone else.

Message 8 of 8
(4,380 Views)