Agilent Technologies E1418A User Manual page 46

8/16-channel d/a converter module scpi programming guide
Table of Contents

Advertisement

/* Decode the fifth integer */
result=config[4];
if (num_chan < 9) result = result << 8; /* strip upper 8 bits */
for (i=num_chan;i>0;i – –)
/* Decode the sixth integer */
result=config[5];
if (num_chan < 9) result = result << 8; /* strip upper 8 bits */
for (i=num_chan;i>0;i – –)
}
44
Programming Examples
/* Channel relay open or closed */
{
if (result >= 0x8000)
{
printf ("Channel %d output is disabled\n",i);
}
else
{
printf("Channel %d output is enabled\n",i);
}
result = result << 1;
}
/* P/J Jumper position */
{
if (result >= 0x8000)
{
printf ("Channel %d output mode is programmable\n",i);
}
else
{
printf("Channel %d output mode is fixed and jumper selected\n",i);
}
result = result << 1;
}
Chapter 2

Advertisement

Table of Contents
loading

Table of Contents