Skip to content

Beckhoff ADS

There are 2 "ADS connection type" configureable at Configuration / ADS Properties:

  • TctnProxy (Standalone/Linux): New standalone ADS implementation compatible with Windows (64bit only) and Linux, based on AdsToJava library.
  • Should be runnable without TwinCAT router installation.
  • Support for new Beckhoff ARM PLC's (CX9240, ...).
  • TctProxy (TwinCAT via DLL): Deprecated implementation for ADS (running on Windows only)

Windows: Failed to load library (TctDllAdapterX64.dll, AdsToJava-3.dll)

Error at backend terminal:

Juni 11, 2025 11:24:41 AM at.alphagate.ap.tctproxy.TctAdsConnection init
SCHWERWIEGEND: Can't load/find library TctDllAdapterX64
java.lang.UnsatisfiedLinkError: Failed to load library ("C:\temp\serviceUi\lib\win\TctDllAdapterX64.dll") JVMPORT015E Verweise auf gemeinsam genutzte Bibliotheken k÷nnen nicht aufgel÷st werden - eine vorausgesetzte, gemeinsam genutzte Bibliothek fehlt m÷glicherweise.
        at java.base/jdk.internal.loader.NativeLibraries.load(Native Method)
        at java.base/jdk.internal.loader.NativeLibraries$NativeLibraryImpl.open(Unknown Source)
        at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(Unknown Source)
        at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(Unknown Source)
        at java.base/jdk.internal.loader.NativeLibraries.findFromPaths(Unknown Source)
        at java.base/jdk.internal.loader.NativeLibraries.loadLibrary(Unknown Source)
        at java.base/java.lang.ClassLoader.loadLibrary(Unknown Source)
        at java.base/java.lang.System.loadLibrary(Unknown Source)
        at at.alphagate.ap.tctproxy.TctAdsConnection.init(TctAdsConnection.java:74)
        at at.alphagate.ap.tctproxy.TctConnection.openConnection(TctConnection.java:386)
        at at.alphagate.ap.ApConnection.openConnectionInt(ApConnection.java:984)
        at at.alphagate.ap.ApConnection.startItemMapping(ApConnection.java:429)
        at at.alphagate.ap.ApConnection.connectItems(ApConnection.java:401)
        at swiss.avm.up.connect.core.plcconnection.PlcConnectionHandler.lambda$asyncConnectItems$3(PlcConnectionHandler.java:382)
        at java.base/java.lang.Thread.run(Unknown Source)

Requirements for Service Ui ADS connection:

  • TctDllAdapterX32.dll / TctDllAdapterX64.dll are located at "lib/win" folder of ServiceUi. This folder must be part of $PATH (java.library.path). That will be the case while starting ServiceUi with given UPconnect.exe.
  • Valid TwinCAT runtime installation
  • C++ Library MSVCP100.DLL must be available
  • Some images from Beckhoff or after Windows Update, manual installation is required: https://www.microsoft.com/en-us/download/details.aspx?id=26999&msockid=20fd27ccf376682400ae3203f2706940

Linux: Can't load AdsToJava-3

Error at backend terminal:

Feb 02, 2026 7:58:25 AM at.alphagate.ap.ApConnection openConnectionInt
INFO: Open connection 'plc': simulated=false; startMode=manual; localAmsNetId=null; amsNetId=192.168.7.248.1.1; targetIp=null; port=851; blockedRead=true; blockedWrite=true
Can't load AdsToJava-3
Feb 02, 2026 7:58:25 AM at.alphagate.ap.ApConnection openConnectionInt
SEVERE: Connection 'plc': Caught unexpected exception while opening connection
java.lang.UnsatisfiedLinkError: de/beckhoff/jni/tcads/AdsCallDllFunction.callDllDoInitDll()J
        at de.beckhoff.jni.tcads.AdsCallDllFunction.<clinit>(AdsCallDllFunction.java:770)
        at at.alphagate.ap.tctnproxy.TctnAdsConnection.open(TctnAdsConnection.java:2861)
        at at.alphagate.ap.tctnproxy.TctnConnection.openConnection(TctnConnection.java:491)
        at at.alphagate.ap.ApConnection.openConnectionInt(ApConnection.java:984)
        at at.alphagate.ap.ApConnection.startItemMapping(ApConnection.java:429)
        at at.alphagate.ap.ApConnection.connectItems(ApConnection.java:401)
        at swiss.avm.up.connect.core.plcconnection.PlcConnectionHandler.lambda$asyncConnectItems$3(PlcConnectionHandler.java:405)
        at java.base/java.lang.Thread.run(Thread.java:1595)
07:58:25.814 [Thread-2] ERROR (PlcConnectionHandler.java:419) - PLC connecting failed (Thread): java.lang.UnsatisfiedLinkError: de/beckhoff/jni/tcads/AdsCallDllFunction.callDllDoInitDll()J
07:58:25.855 [Thread-2] INFO  (AvisConnectionAliveDaemon.java:194) - A-VIS state update timeout (java.lang.UnsatisfiedLinkError: de/beckhoff/jni/tcads/AdsCallDllFunction.callDllDoInitDll()J)

Requirements for Service Ui ADS connection:

Linux

With actual Service Ui version there is no simple package release available. To setup AdsToJava dependencies, following files located at "lib/linux" folder must copied to system library folders like:

sudo cp lib/linux/libAdsToJava-3.so /lib/x86_64-linux-gnu/jni/
sudo cp lib/linux/libads.so /lib/x86_64-linux-gnu/libads.so.3
  • they must have read access by service Ui process
  • Consider "libads.so" must renamed to "libads.so.3"

Background information

  • libAdsToJava-3.so is loaded from Service Ui (Java JNI) and could also be located somewhere else and must be then be part of java.library.path
  • To check dependency from libAdsToJava-3.so to libads.so could be checked with "ldd" command:
sbi@ubuntu-ecs:/lib/x86_64-linux-gnu/jni$ ldd libAdsToJava-3.so 
    linux-vdso.so.1 (0x00007240868b4000)
    libads.so.3 => /lib/x86_64-linux-gnu/libads.so.3 (0x00007240867a8000)
    libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x0000724086400000)
    libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x000072408677a000)
    libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x0000724086000000)
    libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x0000724086691000)
    /lib64/ld-linux-x86-64.so.2 (0x00007240868b6000)

Windows

TctDllAdapterX32.dll / TctDllAdapterX64.dll are located at "lib/win" folder of ServiceUi. This folder must be part of $PATH (java.library.path). That will be the case while starting ServiceUi with given UPconnect.exe.

Interface data not displayed correctly

Problem that interface data not displayed correctly or without data displayed:

2022-02-10_11h12_17

Check if ControllerInterface/InterfaceData contains a record or arrayIndex constant that is part of a not generated library. In this case, check all members for correct data type, array length and string length definition.