Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Help required to get magnitude values from voltage signal

Hi Vaibhav,

 

As per the manual, Zoom FFT Analyzer has been configured in the existing application. Please have a look in the following lines of existing application:

 

   

    NIDSA_init ("DAQ::1", VI_TRUE, VI_TRUE, &dsa_session );

    NIDSA_configure_source      (dsa_session, 1, 0);

    NIDSA_set_input_auto_range  (dsa_session, "-1", 1);

 

    NIDSA_configure_trigger     (dsa_session, 0, "-1",0.0, 0, 0, 0);

    NIDSA_configure_dsa_mode    (dsa_session, 0);

    NIDSA_set_input_coupling    (dsa_session, "-1", 1);

    NIDSA_set_baseband_span     (dsa_session, "-1",3800.0);

 

 

    NIDSA_configure_zoom_fft_engine     (dsa_session, "-1",  1,   1, 1, 1);

    NIDSA_configure_zoom_fft_averaging  (dsa_session, "-1",  0,   0, 0, 0);

 

    NIDSA_configure_zoom_fft_settings   (dsa_session, "-1",  1024,1, 0.001, 0.0);

    NIDSA_set_baseband_span     (dsa_session, "-1",3800.0);

 

 

    NIDSA_configure_zoom_frequencies    (dsa_session,"-1", 0, 0 );

    NIDSA_configure_zoom_frequencies    (dsa_session,"-1", 1, 50 );

    NIDSA_configure_zoom_frequencies    (dsa_session,"-1", 2, 100 );

    NIDSA_configure_zoom_fft_span       (dsa_session,"-1", 0, 0);

    NIDSA_configure_zoom_fft_span       (dsa_session,"-1", 1, 50);

    NIDSA_configure_zoom_fft_span       (dsa_session,"-1", 2, 100);

 

Now kindly help us in this regard to configure our new application in a similar way. 

 

Regards,

Bipul Dobhal

0 Kudos
Message 11 of 17
(2,568 Views)

Bipul,

 

It isn't clear what measurement you're attempting to make using the FFT functions.  For instance, you could be measuring FFT(Re, Im) or FFT(Mag, Phase) or simple FFT(pt. by pt.) etc. Using the .NET code you gave here earlier, you were trying to measure the magnitude of FFT. If you can confirm what you're trying to measure, it would be possible to go further.

 

I do not believe there is a problem with configuring the ZoomFFT, rather, the issue seems to intrinsically be with determining what measurement the C++ code is making. For that, I again recommend using another ADE like LabVIEW.

 

Regards,

Vaibhav.

0 Kudos
Message 12 of 17
(2,554 Views)

Hi Vaibhav,

 

I am not sure about the type of measurement in the existing application. But the user who are using the application assuming FFT (mag, phase) type of measurement. They bother only about the frequency and magnitude values.

 

If we follow the same assumption then what steps should we follow to proceed further?

 

Regards,

Bipul Dobhal

0 Kudos
Message 13 of 17
(2,545 Views)

Bipul,

 

You're already making the FFT(Mag, Phase) measurement using your .NET code. You can confirm this by inputting the same array to another ADE.

 

Vaibhav.

0 Kudos
Message 14 of 17
(2,523 Views)

Hi Vaibhav,

 

I am once again with new query. After analysis of existing application I came across one more C++ file having following logic mentioned to get frequency and magnitude. Can you check this code and update me with the next steps to be followed in new application.

float if_mult =  1468 ;

void read_data(TdxfLabel  *label_scale, TFastFourier *fourier, TRChart  *RChart1, TCo_Period_data *com_object, short ai_sample )

{

   double   ldb_mag,    ldb_freq ;

   int      li_tmp ;

 

   fourier->Clear();

 

   li_tmp   =   fourier->SpectrumSize ;

 

   for (int i=1; i< li_tmp; i++)

   {        

        AI_VRead ( 1, 0, 1, &idb_volt1) ;

        fourier->RealSpec[ i ] = idb_volt1 * if_mult ;

   }

 

   fourier->Transform();

 

   for (int j=1; j< li_tmp / 2; j++)

   {

         ldb_mag   =   fourier->Magnitude[j] ;

         ldb_freq  =   fourier->FreqOfLine( j, 0.01) ;         

   }   

}

Please try to understand that we can’t executed the existing code, we can just check the logic manually. And new software is also at client side we have only DLLs of the new software.

 

Regards,

Bipul Dobhal 
0 Kudos
Message 15 of 17
(2,482 Views)

Hi Akshat,

 

I am uploading a new excel sheet having voltage values (input) are also available. Please analyze the data as your understandings

 

Regards,

Bipul Dobhal

0 Kudos
Message 16 of 17
(2,381 Views)

Hi,

 

For card NI-DSA-4451, Is there a way that I can get the configuration settings from the computer without MAX software.

 

I appreciate any help in this regard.

 

Thanks

0 Kudos
Message 17 of 17
(1,916 Views)