LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to convert waveform into complex number

Hi,

 

I need to convert the acquired voltage and current waveform through DAQ card into complex numbers in order to find the phase relationship

between the waveform.Can u tell me is there any method to convert the acquired waveform into complex number array

or is there any other method to find the phase??

 

please help me in this

 

Regards

Meenatchi

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

Hi,

 

You can try with Extract single tone information.Vi which is available in waveform>Analog waveform>measurement palette to find phase,ampl,freq and for complex numbers see in mathematics>Numeric>complex/polynomials.

0 Kudos
Message 2 of 8
(4,314 Views)
can you please send any sample code for waveform to complex number array conversion
0 Kudos
Message 3 of 8
(4,301 Views)
The waveform datatype consists of three components: a starting time, a delta t between points, and an array of values. You can use the Get Waveform Components function to extract any or all of these individual components, and then you can do whatever you want with them, such as piping them into the Complex number functions. Remember: the functions are polymorphic, which means they work with scalars as well as arrays.
0 Kudos
Message 4 of 8
(4,283 Views)
Dear Meenatchi,

I am attaching two sample VI s for the issue you are facing. Hope this helps.

The waveform in array format.vi gives you the values of the waveform obtained from your DAQ card in an array directly. You can choose this mode by selecting it from the options available on the DAQmx read vi. But if you still want to extract the array from the waveform data type please navigate to programming >> waveform >> get waveform components and extract the array component.

The phase of the complex number created.vi gives you and array of the phases. Please specify the number of iterations of the for loop that determines the size of the array.

If you need any further assistance, please feel free to contact us.

Regards,
Pavan Ramesh
Applications Engineer
NI India
0 Kudos
Message 5 of 8
(4,260 Views)
can u please send this vi in labview version 8.5
0 Kudos
Message 6 of 8
(4,257 Views)
I have sent you the VI that would open in LV 8.5

You can make the other VI by selecting the waveform output from the options provided in DAQmx read VI. Please navigate in the functions pallete of the block diagram to
Measurement I/O >> DAQ mx- DataAquisition >> DAQmx Read vi

Hope the inputs helps you.

Regards,
Pavan
Applications Engineer
NI
0 Kudos
Message 7 of 8
(4,243 Views)

 Pavan wrote


I am attaching two sample VI s for the issue you are facing. Hope this helps.

 

As I've pointed out before, the complex number functions are polymorphic. This means you can wire an array, and you'll get an array. Your for-loop is completely pointless. Besides, you have the for-loop set up for auto-indexing, and you're still wiring a value for N! This is simply wrong. As an Applications Engineer from NI you should know this.

 

Also, I'm not sure what you're calculating. If you want to know the phase difference between two signals, take the difference in time between the peaks of the respective waveforms, and multiply by the frequency then by 360.

Message Edited by smercurio_fc on 11-14-2008 08:58 AM
0 Kudos
Message 8 of 8
(4,225 Views)