EasyManua.ls Logo

Anritsu ML2437A - Page 268

Anritsu ML2437A
314 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Programming Examples GPIB Operation
8-138 PN: 10585-00001 Rev. P ML2437A/38A OM/PM
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++;

Table of Contents

Related product manuals