LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Phase difference block

Hi, I'm just a new LabVIEW user, and I have a problem with searching of "phase difference" block. When I used a "search" option in function pallete there isn't this block too. I don't know which block or set of blocks can replace this one. If it's important - I have the latest LabVIEW version. 

0 Kudos
Message 1 of 14
(663 Views)

It does not really even look from any toolkit. Where is the image from?

 

Maybe we should take a step back and see what kind of phase difference you are trying to measure. Would be easy to write the subVI from scratch. What are the inputs (arrays, waveforms, dynamic, etc)? What kind of signal is this (one dominant frequency)? What is the purpose?

0 Kudos
Message 2 of 14
(644 Views)

I have to reproduce some kind of program to see, how is it working. I've got a screenshot. I only know that this is a program for determining phase shift or frequency characteristics. Truly I don't know nothing more :(. 

0 Kudos
Message 3 of 14
(628 Views)

Why would you need to "reproduce" a program form a picture full of questionable code, express VIs and dynamic data. The code is poorly written and the configuration of express VIs and the content of dynamic data wires cannot be determined from a block diagram picture.

 

It is safe to say it cannot be reproduced exactly given the information in the image. More cofusing is also the fact that many wires are backwards and hidden underneath other object and we cannot even tell what's connected where. Most terminals don't have labels.

 

All that said, it seems to simulate a sine signal and sends it to an analog output. Similarly, it seems to read two signals from an analog input (maybe they represent quadrature detection?) and the missing subVI seems to determine the relative phase (in radians, then converted to degrees). In any case, measuring the phase difference between two sinusoidal signal of the same frequency is trivial and my guess is that your missing subVI does not contain much code at all.

 

In addition it does some measurement in the excitation and return signals as well as write them to disk.

For the style of the boolean constant we can assume that the LabVIEW version is ancient! (pre 2010!)

 


@konradsk98 wrote:

I have to reproduce some kind of program to see, how is it working.


 

How do you even know that the program is "working"? 

 

0 Kudos
Message 4 of 14
(618 Views)

Nah. I just got a quest from lecturer. In this case I will figure it out with him. Thank You for replying.

0 Kudos
Message 5 of 14
(597 Views)

You might have noticed that LabVIEW is programmed "graphically".  Unlike Python or C++, a "picture" of LabVIEW code doesn't show us "everything we need to see to understand the code", unlike a picture of a 1000-line listing of,, say, a Python routine.

 

For this reason, attaching your LabVIEW code (generally a file with the extension ".vi") is helpful/required.  Not everyone is running the most recent version of LabVIEW (though I recently followed Altenbach's suggestion and build a VM with LabVIEW 2024), so to reach the maximum number of "experts" on the Forum, you should submit the original (LabVIEW 2024) routine and another copy generated with "Save for Previous Version" (on the File Menu), specifying LabVIEW 2019.

 

Believe me, we are eager to help/teach, but it is not clear (yet) if this Phase Diff sub-VI is a LabVIEW function or possibly a sub-VI that is included in the code base you are trying to understand.  Do you open a LabVIEW Project (that would be a file with the extension ".lvproj") to open the VI whose "picture" you showed?  Were there any other VIs (possibly one named "Phase Diff.vi") present?  If so, send that along, as well.

 

Bob Schor

0 Kudos
Message 6 of 14
(579 Views)

Right after I posted the previous comment/request, I thought about the question you asked, which I'll paraphrase as "how can I take a more-or-less clean signal from two points in the circuit (assumed responding more-or-less as a sinusoid of some unknown frequency) and determine the phase difference between the two signals?

 

So I went back to look at the "picture" (which, as "pictures" often do, doesn't show all of the LabVIEW code, including where Signal #2 comes from!!! (which is why we jump up and down and rant and rave about "Post your Code, not pictures of code")(sorry about the digression).  I asked myself "If I wanted to do a quick and dirty piece of code that assumes the data are fairly clean (maybe because I've seen a chart of the two waveforms)", how would I write a simple Phase Difference VI?

 

Sampled signals occur a lot in LabVIEW, and there is an entire Palette entry dedicated to the type of data you get from sampled signals (except, of course, when you don't use DAQmx, but rely on the Dreaded DAQ Assistant and other Express VIs).  I'm referring to the Waveform Palette, which has sub-Palettes for Analog Waveforms and Measurements.  Might be worth investigating ...

 

Bob Schor

0 Kudos
Message 7 of 14
(572 Views)

Hi. I talked to my professor about this program today and there is what I remember:
I have got a measurement data for three accelerometers, and by using algorithm Levenberg-Marquardt in Curve fitting I have to approximate this data (frequency and amplitude).
Firstly I need to import this data from Excel file to LabVIEW (I don't know why "Read and measurement data" can take only half of whole table by using tab-delimited method) and get a chart of measurement points. Later I have to set a number of iteration (1000, 10000), and put some model (amplitude characteristic - a formula).

Screenshot in attachment shows example of this program. Unfortunately I'm trying to do something in this case, but there is no effects of my work. The formula has w (omega) and I know I have to correct w=2πf.

 

0 Kudos
Message 8 of 14
(287 Views)

This code makes very little sense, for example why would you need to re-read the same file with every iteration??

Fitting would be significantly more efficient without express vis.

 

0 Kudos
Message 9 of 14
(262 Views)

Unfortunately I can't give you any answer for this question. This program was created maybe about 12 years ago? The only thing I've got is this screenshot of example of this program. If there is any possibility to do it better I would be appreciated.

0 Kudos
Message 10 of 14
(247 Views)