/
MATES
/ Modular Automatic Test Equipment System API
2.5.0.0
Main Page
Related Pages
Namespaces
Data Structures
Files
Examples
mates_test_30.c
#include <stdio.h>
#include "
mates.h
"
int
main(
void
)
{
MATES_HANDLE
h =
mates_open
(
"proxy.mon"
, 1);
int
success = 0;
/* Check if node is present. */
if
(
mates_discover_single_node
(h,
mates_dio3_mk1_1
) !=
UOS_STATUS_OK
)
{
mates_close
(h);
return
(0);
}
/* Set value of output OUT01. */
if
(
mates_set_dout
(h,
mates_dio3_mk1_1
, 0, 1) ==
UOS_STATUS_OK
)
{
success++;
}
/* Now save the new value as default. */
if
(
mates_save_default
(h,
mates_dio3_mk1_1
, 0) ==
UOS_STATUS_OK
)
{
success++;
}
/* Repeat with default value of 0. */
if
(
mates_set_dout
(h,
mates_dio3_mk1_1
, 0, 0) ==
UOS_STATUS_OK
)
{
success++;
}
if
(
mates_save_default
(h,
mates_dio3_mk1_1
, 0) ==
UOS_STATUS_OK
)
{
success++;
}
mates_close
(h);
return
((success == 4) ? 0 : -1);
}