Agilent Technologies E1330A Service Manual page 41

Quad 8-bit digital input/output modules
Table of Contents

Advertisement

printf("\n\nBit walk test of all ports for read and write (no handshake)");
for (i = 0; i <= 7; i++)
{
for (j = 0; j <= 3; j++)
{
iprintf (id, "SOUR:DIG:DATA%u #B%s\n", j, bit_walk[i]);
if (j < 2)
iprintf (id, "MEAS:DIG:DATA%u?\n", j+2);
else
iprintf (id, "MEAS:DIG:DATA%u?\n", j-2);
iscanf(id, "%t", a);
number = atoi(a);
if (number != bit_val[i])
{
fail = 1;
printf("\nFailure of bit walk");
printf("\n WRITE at port %u", j);
if (j < 2)
printf("\n READ at port %u", j+2);
else
printf("\n READ at port %u", j-2);
}
}
}
printf("\nEnd of bit walk test");
/*---------------------------------Handshake line test-----------------------------*/
printf("\n\nHandshake line test");
(j = 1; j >= 0; j = j - 1)
{
for (i = 0; i <= 3; i++)
{
iprintf(id, "SOUR:DIG:CONT%u %u\n", i, j);
if (i < 2)
iprintf(id, "MEAS:DIG:FLAG%u?\n", i+2);
else
iprintf(id, "MEAS:DIG:FLAG%u?\n", i-2);
iscanf(id, "%1t", a);
if (atoi(a) != j)
{
fail = 1;
printf("\nFailure of handshake lines");
if (i < 2)
printf("\n CTL line on port %u to FLG line on port %u", i, i+2);
else
printf("\n CTL line on port %u to FLG line on port %u", i, i-2);
Example C Programs A-3

Advertisement

Table of Contents
loading

This manual is also suitable for:

75000 b seriesE1330b

Table of Contents