LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Phase Shift on LabVIEW FPGA not Working

Hello I am trying to implement a phase shift between two signals from analog IO on a LabVIEW FPGA and visualize shifted signal on an oscilloscope. For the past 3 weeks I have been battling with this. I even purchased the book "Digital Signal Processing Laboratory: LabVIEW Based FPGA Implementation" and still couldn't figure out how to achieve this. I have tried using FIFO for this purpose to no success. I have tried using "Wait" block to delay the rate at which both loops run. I have also tried using "The Sine Wave" express VI with a phase offset which produces phase shifted waveforms independent of the offset value set. Now I am frustrated and do not know what to do. I need help with this.

 

Hope I get some help this time. I will very much appreciate it.

Download All
0 Kudos
Message 1 of 9
(740 Views)

Your attached images contain absolutely no context to help understand what on earth you are trying. There is no sine and no delay visible anywhere in your code. Your images do not seem to match your post text at all.

 

Can you elaborate? If you want help, you need to give something for us to help you with.... we're not psychic.

0 Kudos
Message 2 of 9
(694 Views)

So the two (2) sine waves signals coming from the Analog IO A01 and A02 are then visualized on the WaveChart 2 and WaveChart 3 as included in 'Capture1.PNG' image. And I am trying to phase shift the signal using the "Wait" block with the intention that the two loops will run with different delay times.

 

I am sorry but I am still new to LabVIEW and LabVIEW FPGA.

 

Thank you.

0 Kudos
Message 3 of 9
(680 Views)

How about attaching the FPGA code, and possibly the code calling the FPGA, saved for LabVIEW 2019 or 2021 (or earlier ...)?  [Note that "code" means "files with the extension .VI or .CTL"]

 

Bob Schor

0 Kudos
Message 4 of 9
(678 Views)

@lquarshie wrote:

So the two (2) sine waves signals coming from the Analog IO A01 and A02 are then visualized on the WaveChart 2 and WaveChart 3 as included in 'Capture1.PNG' image. And I am trying to phase shift the signal using the "Wait" block with the intention that the two loops will run with different delay times.

 

I am sorry but I am still new to LabVIEW and LabVIEW FPGA.

 

Thank you.


You read AI1 and output it directly to AO2 and you read AI0 and output it directly to AO3.

What the 'Wait' does is: It defines when the values are read and written, but the signal is not delayed.

 

I think what you are looking for is something like the feedback node, which outputs the value it receives in the next iteration of the loop. 

Try to place a feedback node between AI and AO node.

As an alternative you can use a shift register and connect AI to the right side of a shift register and the left side of the shift register to AO. 

 

Delay.png

I do not have FPGA Modul, but the shown principle should be applicable.

0 Kudos
Message 5 of 9
(671 Views)

I am using LabVIEW 2014 running on NI PXIe - 8135 embedded controller.

 

Also I have attached two different VIs in the lvproj zip named 'PDSignalGeneratorv0.vi' and 'PDSignalGenerator1.v1.'

 

What could I be doing wrong to not get the right response?

0 Kudos
Message 6 of 9
(651 Views)

I order not to sound dumb and lazy. I have tried different iterations of your suggestion and look at what I am still getting.

 

What am I doing wrong?

0 Kudos
Message 7 of 9
(650 Views)

Thanks very much. Now it is working!!!

I think I have figured out why it wasn't working. I used the 'Wait' block/function rather than the 'Loop Timer' block/function.

Now I am trying different instances by changing the delay in the two feedback nodes to see whether I wasn't just lucky.

I am so much grateful for your assistance. I wish I could hug you or high-five you! You made my day a great day! I cannot be thankful enough!

😊

0 Kudos
Message 8 of 9
(640 Views)

@lquarshie wrote:

Thanks very much. Now it is working!!!

[...]

I am so much grateful for your assistance. I wish I could hug you or high-five you! You made my day a great day! I cannot be thankful enough!

😊


In the NI forums high-fives are kudos . 😉

 

More info: Unofficial Forum Rules and Guidelines - Discussion Forums - National Instruments (ni.com)

 

200913_Untitled

 

0 Kudos
Message 9 of 9
(617 Views)