USER_GREEN
,
USER_RED
, or
USER_OFF
If the
USER_INFO
argument is specified, one of these values is returned according to the the current status of the
AP lamp.
G.2 didoctl (DIDO input/output operation)
This interface allows the user to operate DI input and DO output.
(1) Compiling
To compile the program in the development environment, enter as follows:
$ sudo cc -I/hitachi/usr/include -o xxx xxx.c -L/hitachi/lib64 -lecextio
• xxx
: Specify the object file name.
• xxx.c
: Specify the source file name.
(2) Reference
(a) Format
#include <stdio.h>
#include <ecextioctl.h>
int didoctl(int board, int cmd, int *buf)
(b) Description
DI inputs data to the unit and DO outputs data from the unit. The value specified for the
cmd
argument determines
whether access is made to DI or DO. This interface accesses all DI or DO channels by a single call. Four DI channels
or ten DO channels can be accessed.
The standard access time for DI or DO is approximately 5 milliseconds or less in a normal state. If DI or DO does not
return a response for 10 milliseconds, a timeout is detected and the processing terminates abnormally. At this time, the
error code
ETIMEDOUT
is returned.
(c) Arguments
board
Specify the access target I/O board number. For the CE50-10, specify
BOARD_NO1
, which is defined in
ecextioctl.h
.
If a value other than
BOARD_NO1
is specified, processing terminates abnormally, the return value is
-1
, and
EINVAL
is returned for the error number (
errno
).
cmd
Specify the processing details.
•
DIO_READ
: Access DI and input data to the unit.
•
DIO_WRITE
: Access DO and output data from the unit.
Note that
DIO_READ
and
DIO_WRITE
are defined in
ecextioctl.h
.
buf
When you specify
DIO_READ
for
cmd
, specify the address of the area in which input data is to be stored.
When you specify
DIO_WRITE
for
cmd
, specify the address of the area in which output data is to be stored.
The following shows the format of the area specified for
buf
.
G. Library Interface Reference
171
Summary of Contents for CE50-10
Page 1: ...Hitachi Industrial Edge Computer CE50 10 Instruction Manual CC 65 0171 ...
Page 10: ......
Page 23: ...Figure 1 6 Attaching mounting brackets 4 1 Installing the CE50 10 7 ...
Page 26: ......
Page 38: ......
Page 42: ...4 2 5 Connection diagram Figure 4 2 Connection diagram 4 External Contact Functions 26 ...
Page 44: ......
Page 87: ... sudo etc init d netfilter persistent save 5 Configuring Software Environment 71 ...
Page 117: ...version information 13 Log out from the unit exit 5 Configuring Software Environment 101 ...
Page 148: ......
Page 149: ...7 Maintaining the CE50 10 This chapter describes maintenance of the CE50 10 133 ...
Page 157: ...8 Troubleshooting This chapter describes troubleshooting of the CE50 10 141 ...
Page 162: ...8 1 14 Cannot turn off the power to the unit Please contact us 8 Troubleshooting 146 ...