Universal OPC UA Server
Readme
Dieser Text liegt dem Setup bei; er ist in englischer Sprache verfasst.
Zurück zum Universal OPC UA Server
A free tool from netzmal GmbH, the makers of the Industrial Data Processing Suite (https://idps.io)
What it is
A small OPC UA server for Windows. You define the variables in a text file, and every OPC UA client can read and write them. The server runs as a Windows service in the background. Typical uses: - Test an OPC UA client, a visualisation or an IDPS instance without a machine. - Provide values from IDPS (target "OPC UA") to other systems as OPC UA variables. - Exchange a few values between programs that both speak OPC UA. It is not a gateway to a PLC: the server only holds the variables you define.
Quick start
1. Run the setup. It installs the service "Universal OPC UA Server" and starts it.
2. Connect your OPC UA client to
opc.tcp://<computer name or IP>:4334/UA/UNIVERSAL_OPC_SERVER_UA
Security policy "None" and anonymous login work out of the box. On the same computer you can use
"localhost" as computer name. After the very first start the server needs up to a minute
until it accepts connections (it creates its certificate).
3. Browse to Objects > Variables. You find some example variables there. The variables "Demo.*"
change by themselves, so you see live values immediately.
4. Define your own variables: Start menu > Universal OPC UA Server > Edit variables.
Save the file - the server applies the change after a few seconds. No restart is needed.
Clients on other computers need the firewall rule that the setup offers to create (incoming
connections to the server, domain and private networks).Variables (variables.ini)
One section per variable; the section name is the variable name.
[Line1.Counter]
kind=uint32
init=0
[Line1.Temperature]
kind=double
simulate=sine
min=18
max=24
period=120
The node id of a variable is ns=1;s=<name>, for example ns=1;s=Line1.Counter
kind data type: double, float, int32, uint32, int16, uint16, sbyte, byte, boolean, string
init initial value (optional)
sampling minimum sampling interval in milliseconds (optional, default 1000)
simulate the server changes the value itself every "sampling" milliseconds (optional):
counter counts up by 1 from min to max, then starts again at min
random random value between min and max
sine sine wave between min and max, one wave every "period" seconds
toggle boolean changes between false and true
min, max range for simulate (default 0 and 100)
period duration of one sine wave in seconds (default 60)
Comments start with ";" and must be on their own line. All clients may write all variables,
including simulated ones (a simulated value is overwritten at the next step).Server settings (config.ini)
port TCP port, default 4334
authRequired true = clients must log in with a user name and password from auth.ini
save 0 = values start with "init" after every start;
60 = values are saved every 60 seconds to Data\values.json and restored at the
next start (changes of the last interval can be lost when the service is stopped)
debug false, true (logs every read and write) or verbose (logs every request)
Note: when a configuration file changes, the server restarts its OPC UA endpoint. Connected clients
are disconnected for a moment and have to reconnect. With save=0 all values return to "init".Users (auth.ini)
Only used with authRequired=true. One section per user:
[operator]
password=your-password
Enter the password in plain text and save the file. A few seconds later the server encrypts it and
rewrites the file:
[operator]
password=
passwordCrypt=scrypt$3f1c...$9a47...
"passwordCrypt" is a salted hash (scrypt): the password cannot be read from it, not even by the
server. So a forgotten password cannot be recovered - set a new one instead.
Change a password enter the new one behind "password=" and save; "passwordCrypt" is replaced
Remove a user delete the whole section
Copy to another PC the file can be copied as it is, the encrypted passwords stay valid
Remove the example users or give them your own passwords before you enable authentication.
With authentication enabled, anonymous clients are rejected. Note that with security policy "None"
the connection itself is not encrypted; choose a signing/encrypting policy in the client if the
password must not travel readable over the network.Files and folders
config.ini, variables.ini, auth.ini configuration (kept when you update or uninstall)
Log\server.log log file, 1 MB per file, 7 files
Data\values.json saved values (only with save > 0)
_Service Restart.cmd restarts the service
_Service Install.cmd / Uninstall.cmd registers / removes the service
_Run.cmd runs the server in a console window for testing
(stop the service first)Troubleshooting
Look into Log\server.log first (Start menu > Universal OPC UA Server > Log files).
The client cannot connect from another computer
Check the firewall rule and the port. Some clients need the computer name of the server
to be resolvable, because the server reports its address with the computer name.
"The port is already in use"
Another program uses the port, or the server runs twice (service and _Run.cmd).
Choose another port in config.ini.
A variable is missing
The log shows the reason, e.g. an unknown "kind".
The client reports an untrusted certificate
The server creates its own (self-signed) certificate at the first start. Accept it in the client.Technical data
- Windows 10 / Windows Server 2016 or newer, 64 bit
- OPC UA binary protocol (opc.tcp), based on node-opcua and Node.js (both included)
- Security policies as provided by node-opcua (None, Basic256Sha256, ...);
login anonymous or with user name and password
- No internet connection required, no data leaves the computerLicense and support
The Universal OPC UA Server is free of charge, also for commercial use. There is no obligation to provide updates or support; defects and liability are governed by License.txt (German, with an English translation). It is a test and auxiliary tool and not intended for safety-related tasks. The included third-party components are listed in ThirdPartyNotices.txt. netzmal GmbH, Husum, Germany - https://idps.io - info@netzmal.de