06-19-2024 05:50 PM
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.
06-20-2024 04:40 AM
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.
06-20-2024 06:51 AM
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.
06-20-2024 06:53 AM
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
06-20-2024 07:21 AM
@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.
I do not have FPGA Modul, but the shown principle should be applicable.
06-20-2024 12:31 PM
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?
06-20-2024 12:32 PM
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?
06-20-2024 03:31 PM
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!
😊
06-21-2024 03:57 AM
@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)