MATES / Modular Automatic Test Equipment System API  2.5.0.0
mates_test_32.c
#include <stdio.h>
#include "mates.h"
int main(void)
{
MATES_HANDLE h = mates_open("proxy.mon", 1);
int success = 0;
int i1, i2;
/* Check if node is present. */
{
return (0);
}
/* Generate quadrature waveform on OUT01 and OUT02 at 1 Hz. */
mates_setup_generator(h, mates_dio3_mk1_1, 0, 1000000, 0, 500000);
mates_setup_generator(h, mates_dio3_mk1_1, 1, 1000000, 250000, 750000);
/* Assume we have outputs to inputs loopback present. */
i1 == 1 && i2 == 0)
{
success++;
}
printf("i1 = %d, i2 = %d\n", i1, i2);
Sleep(260);
i1 == 1 && i2 == 1)
{
success++;
}
printf("i1 = %d, i2 = %d\n", i1, i2);
Sleep(250);
i1 == 0 && i2 == 1)
{
success++;
}
printf("i1 = %d, i2 = %d\n", i1, i2);
Sleep(250);
i1 == 0 && i2 == 0)
{
success++;
}
printf("i1 = %d, i2 = %d\n", i1, i2);
/* Disable generators. */
return ((success == 4) ? 0 : -1);
}