ConfocalAx

ConfocalAX_MeasureCurrentIlluminationPower, ConfocalAX_MeasureIlluminationPower

ConfocalAX_MeasureCurrentIlluminationPower

Description 

 ConfocalAX_MeasureCurrentIlluminationPower(
   char *Wavelengths,
   int  MaxStringLength,
   double *Laser Powers,
   double *Laser Measurements,
   int  MaxCount
);

The user prepares empty fields in the macro, and the macro fills them according to the current settings.

Example:

int a = Get_Info(INFO_ACQUIRETIME);
char buffTotal[2048];
char buffDesc[512];
char buffId[512];
char wavelengths[512];
double powers[8];
double measurements[8];
int i = 0;
char * laserName;
double power = 0;
double measured = 0;
int iWavelengthSubstringLength = 32;
int iMaxNumberOfLasers = 8;

memset(buffTotal, 0, 2048);
memset(buffDesc, 0, 512);
memset(buffId, 0, 512);
memset(wavelengths, 0, 512);

ConfocalAX_MeasureCurrentIlluminationPower(wavelengths, iWavelengthSubstringLength, powers, measurements, iMaxNumberOfLasers);

for(i = 0; i < iMaxNumberOfLasers; i = i+1)
{
   laserName = wavelengths+i*iWavelengthSubstringLength;
   power = powers[i];
   measured = measurements[i];
   
   if(strlen(laserName) <= 1)
      break;
   sprintf(buffDesc, "%s: %.2f > %.2f\n", "laserName,power,measured");
   strcat(buffTotal,buffDesc);
   
   sprintf(buffId, "meas%s", "laserName");
   sprintf(buffDesc, "Meas %s", "laserName");
   ND_SetRecordingDataDouble(buffId,-1,buffDesc,measured,"");
}

//enable whan you want to evaluate results withaout ND Acqusition
WaitText(0, buffTotal);

Parameters

char *Wavelengths

List of wavelengths (numbers only).

int MaxStringLength

Determines how many characters there are for a single wavelength text. It is used to split wavelengths buffer to array of wavelength strings.

double *Laser Powers

Range of laser powers at which the measurement is to be made.

double *Laser Measurements

Output field of measured values.

int MaxCount

How many items the arrays can hold.

ConfocalAX_MeasureIlluminationPower

Description 

 ConfocalAX_MeasureIlluminationPower(
   char *Wavelengths,
   int  MaxStringLength,
   double *Laser Powers,
   double *Laser Measurements,
   int  MaxCount
);

The user prepares a list of Wavelengths and Laser Powers and the macro fills in Laser Measurements based on what the user has entered.

Example:

int a = Get_Info(INFO_ACQUIRETIME);
char buffTotal[2048];
char buffDesc[512];
char buffId[512];
char wavelengths[512];
double powers[8];
double measurements[8];
int i = 0;
int wavelength = 0;
char * laserName;
double power = 0;
double measured = 0;
int iWavelengthSubstringLength = 32;
int iNumberOfLasers = 3;

memset(buffTotal, 0, 2048);
memset(buffDesc, 0, 512);
memset(buffId, 0, 512);
memset(wavelengths, 0, 512);

//define what to meassure
for(i = 0; i < iNumberOfLasers; i = i+1)
{
   laserName = wavelengths+i*iWavelengthSubstringLength; 
   if(i == 0){
      wavelength = 405;
      powers[i] = 42;
   }
   if(i == 1){
      wavelength = 488;
      powers[i] = 69;
   }
   if(i == 2){
      wavelength = 638;
      powers[i] = 66;
   }
   
   sprintf(laserName, "%d",wavelength);
}

ConfocalAX_MeasureIlluminationPower(wavelengths, iWavelengthSubstringLength, powers, measurements, iNumberOfLasers);

for(i = 0; i < 8; i = i+1)
{
   laserName = wavelengths+i*iWavelengthSubstringLength;
   power = powers[i];
   measured = measurements[i];
   
   if(strlen(laserName) <= 1)
      break;
   sprintf(buffDesc, "%s: %.2f > %.2f\n", "laserName,power,measured");
   strcat(buffTotal,buffDesc);
   
   sprintf(buffId, "measurements%s", "laserName");
   sprintf(buffDesc, "measurements %s", "laserName");
//   ND_SetRecordingDataDouble(buffId,-1,buffDesc,measured,"");
}
WaitText(0,buffTotal);

Parameters

char *Wavelengths

List of wavelengths (numbers only).

int MaxStringLength

Determines how many characters there are for a single wavelength text. It is used to split wavelengths buffer to array of wavelength strings.

double *Laser Powers

Range of laser powers at which the measurement is to be made.

double *Laser Measurements

Output field of measured values.

int MaxCount

How many items the arrays can hold.