Real-Time Measurement and Control

cancel
Showing results for 
Search instead for 
Did you mean: 

storing and naming data

Hi all,

 

I've gotten to a stage in my college project where I'm stumped again. Included is my simple program that increments the phase of a sine wave, comparing it to a stationary wave (i.e. phase always zero). The phase difference is then calculated. What I need to do is at every increment of phase is to store the phase difference. I need to create an algorithm that uses these values therefore they'll need, I assume, to have a name or number assigned to them.

 

 The screen shot below shows sample input data. With this data it can be seen that the phase changes every second by 72 degrees. So I need to store and name the phase difference each time it changes (or every second) to use in an algorithm I hope to create in LabVIEW.

 

Modulating Phase_FP.png

 

Can anyone offer any insight on how to do something like this

 Included is my simple vi as it stands.

 

Regards 

 

0 Kudos
Message 1 of 2
(3,055 Views)

If you wire the data from Phase Shift 2 out of the For Loop then at the loop boundary it will build an array of all the values that you can process outside of the loop.

 

Where the wire crosses the loop boundary the diagram will show you a small icon (solid color or a set of square brackets). This is called a tunnel. The tunnel indicates whether it will accumulate all values into an array (square brackets) or whether it will only pass the last value of the wire out of the array (solid color). By right clicking on the tunnel you can switch this option (Disable or Enable Indexing).

authored by
Christian L, CLA
Systems Engineering Manager - Automotive and Transportation
NI - Austin, TX


  
Message 2 of 2
(3,045 Views)