Anritsu ML2430A Manuel d'utilisateur Page 221

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 271
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 220
/* Read and cast the data */
while (count < length)
{
real_data1[loop++] = ((float)(*bin_value++))/1024.0;
count += 4;
}
real1_entries = loop;
}
else if (decode_type == OFFSET_TABLE_BINARY_DATA)
{
/* Decode header */
/* Find # character. */
cptr = strtok(&buffer[0],"#");
cptr = strtok(NULL,"#");
/* Get the number of characters for binary length */
ch_val[0] = *cptr++;
ch_val[1] = NULL;
count = atoi(&ch_val[0]);
/* Get length of binary data */
for (loop = 0; loop < count; loop++)
{
ch_val[loop] = *cptr++;
}
ch_val[count] = NULL;
length = atoi(&ch_val[0]);
*cptr++; /* Read past comma for offset tables. */
/* The binary offset table is 200 sets frequency and dB */
/* These are held in single precision floating point. */
/* To convert to the real values, re-order the bytes. */
/* */
count = 0;
loop = 0;
while (count < length)
{
/* Frequency conversion */
bin_data.cval[2] = *cptr++;
bin_data.cval[3] = *cptr++;
bin_data.cval[0] = *cptr++;
bin_data.cval[1] = *cptr++;
real_data1[loop] = bin_data.fval;
/* dB conversion */
bin_data.cval[2] = *cptr++;
bin_data.cval[3] = *cptr++;
bin_data.cval[0] = *cptr++;
bin_data.cval[1] = *cptr++;
real_data2[loop++] = bin_data.fval;
count += 8;
}
real1_entries = loop;
real2_entries = loop;
}
6-134 ML2430A OM
PROGRAMMING EXAMPLES GPIB OPERATION
Vue de la page 220
1 2 ... 216 217 218 219 220 221 222 223 224 225 226 ... 270 271

Commentaires sur ces manuels

Pas de commentaire