Agilent Technologies E1418A User Manual page 45

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

Advertisement

/* Decode the second integer */
result = config [1];
if (result > 0)
else
/* Decode the third integer */
result=config[2];
if (num_chan < 9) result = result << 8; /* strip upper 8 bits */
for (i=num_chan;i>0;i – –)
/* Decode the fourth integer */
result=config[3];
if (num_chan < 9) result = result << 8; /* strip upper 8 bits */
for (i=num_chan;i>0;i – –)
Chapter 2
/* Terminal Module */
{
printf ("Module does NOT have a terminal module installed\n");
}
{
printf ("Module has a screw-type terminal module installed\n");
}
/* Isolated or non-isolated outputs */
{
if (result >= 0x8000)
{
printf ("Channel %d is configured for non-isolated output\n",i);
}
else
{
printf("Channel %d is configured for isolated output\n",i);
}
result = result << 1;
}
/* Output Mode Voltage or Current */
{
if (result >= 0x8000)
{
printf ("Channel %d is set to voltage output mode\n",i);
}
else
{
printf("Channel %d is set to current output mode\n",i);
}
result = result << 1;
}
Programming Examples
43

Advertisement

Table of Contents
loading

Table of Contents