Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Cannot locate all output parameters required from DAQmx task read values using measurement studio.

Hi, 

 

We were using Traditional DAQ earlier with Borland C++.

We were using NIDSA_read_measurement (dsa_session, ipchannel, 0,measurement_length, 2, 0, 1,0, &x0, &dx, measurement); to calculate frequency and magnitude as shown

below:

objCurrentMagnitude = x0 + i * dx;objCurrentFrequency = measurement[i] * 1000 ;  

 

 We are planning to use DAQmx with NI card 4461.

We will make use of measurement studio to define drivers etc. We read continous data from card.

Then we define a   DaqTask1Component in our C# code and read data on its DataReady event. 

AnalogWaveform<double>[] contains the data read from the cards and i can fetch value from 

 

 void objDaqTask_DataReady(object sender, DaqTask1ComponentDataReadyEventArgs e)

{         

  for(int i=0;i<e.GetData()[0].Samples.Count;i++)        

  {               

  double val = e.GetData()[0].Samples[i].Value;         

        //Frequency - How to calculate. In traditional C++ it was objCurrentMagnitude = x0 + i * dx;           

      //Magnitude - How to calculate. In traditional C++ it was objCurrentFrequency = measurement[i] * 1000 ;

          }

}  

 

How can i calculate the magnitude and frequency in DAQmx as i was doing with Traditional DAQ?

Do i need three parameters i.e. x0,dx,measurement here?If yes, where can i found the three parameters to calculate the freq and magnitude?

 

 Regards,

Nirdesh 

Message Edited by Nirdesh on 05-05-2009 02:30 AM
0 Kudos
Message 1 of 3
(3,971 Views)
Duplicate
Simran K
National Instruments
Applications Engineer
0 Kudos
Message 2 of 3
(3,863 Views)
replied in the duplicate post...
.......^___________________^
....../ '---_BOT ____________ ]
...../_==O;;;;;;;;_______.:/
.....),---.(_(____)/.....
....// (..) ),----/....
...//____//......
..//____//......
.//____//......
..-------
0 Kudos
Message 3 of 3
(3,800 Views)