/
MATES
/ Modular Automatic Test Equipment System API
2.5.0.0
Main Page
Related Pages
Namespaces
Data Structures
Files
Examples
mates_test_07.c
#include <stdio.h>
#include "
mates.h
"
int
main(
void
)
{
MATES_HANDLE
h =
mates_open
(
"proxy.mon"
, 1);
int
success = 0;
int
value;
/* Check if node is present. */
if
(
mates_discover_single_node
(h,
mates_dio3_mk1_1
) !=
UOS_STATUS_OK
)
{
mates_close
(h);
return
(0);
}
if
(
mates_get_dout
(h,
mates_dio3_mk1_1
,
MATES_OUT20
, &value) ==
UOS_STATUS_OK
)
{
success++;
printf(
"Channel #40 is set to: %d\n"
, value);
}
if
(
mates_set_dout
(h,
mates_dio3_mk1_1
,
MATES_OUT20
, !value) ==
UOS_STATUS_OK
)
{
success++;
printf(
"Successfully toggled output\n"
);
}
mates_close
(h);
return
((success == 2) ? 0 : -1);
}