F.2 OPC-UA client function
We provide the following programs to use the CE50-10 as an OPC-UA client.
•
Library: OSS Open62541
•
Sample programs for operation verification:
tutorial_server_variable.c
(server program) and
client.c
(client program)
(1) Compiling a program that uses the OPC-UA library
To compile a C program that uses Open62541, run the following command.
$ gcc
C-program-file-name
-lopen62541 -o
program-name
(2) Verifying operation of the OPC-UA sample program
You can run the sample program to check communication between the client and the server via the OPCUA protocol.
The following describes how to run the sample program.
[Enter]
in command examples indicates pressing of the
Enter
key on the keyboard.
1. Copy the sample program to any directory.
$ cp /usr/share/open62541/examples/{tutorial_server_variable.c,client.c} .
2. Compile the sample program.
$ gcc client.c -lopen62541 -o client
$ gcc tutorial_server_variable.c -lopen62541 -o server
3. Run the sample program.
$ ./server &
$ ./client
When OPC-UA communication is successful, the following appears.
Connection 5 | SecureChannel 2 | Session ab3211ff-db96-588f-bc5b-358373d79d49 | Act
ivateSession: Session activated
4. Terminate the client, and then terminate the server.
To terminate the client, Press the
Ctrl
and
C
keys at the same time.
To terminate the server, run the following command.
$ kill %1
This concludes operation verification of the OPC-UA sample program.
F. Option Functions for Application Programs
169
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 ...