08-28-2009 03:09 AM
Hi,
We have an existing application built in power builter and C++. There are two functions are used to get and read reasurement. Can any body let me know exact functionalities of these functions. Please note that I have read the NI-DSA Manual but that's not much helpfull to me.
The functions used in the code are:
1. NIDSA_get_measurement_length (dsa_session, ipchannel, 2, &measurement_length, &Real_Or_Complex);
Here I want to know the use of "&Real_Or_Complex" variable. This variable has been first set to 0 in our code and passed into the above function. If we pass 1 into this function then do we get any variation in the result or its doen't matter what value we are passing in the funtion as its reference type and assigned internally in the function. Please clerify.
2. NIDSA_read_measurement (dsa_session, ipchannel, 0,measurement_length, 2, 0, 1,0, &x0, &dx, measurement);
Similar question here for parameters &x0 and &dx. After this function a for loop is applied as below:
for (int i=0; i<= 801 ; i ++)
{
mag[i] = x0 + i * dx; //Here mag is an arry of size 801
}
As per my assumption, the values of x0 and dx should remain constant untill the loop ends. I am attaching the an excel file having magnitude calculated for different samples so please let us know what could be the values on x0 and dx as we are unable to figure out the exact solution. The intresting thing here is that for every sample the first magnitude values calculated as 100.125 and the result varies from sample to sample.
Please note that this application in running on production from where we collected the data for some samples. We don't have access to that application and need to understand the application using the available code.