Running and installing OPC UA



  • Hello there,
    I am using QT 5.11.1. I would like to run the OPC UA demo application. These are the steps I did:

    • Install QT 5.11.1
    • clone the OPC UC repo from here: https://code.qt.io/cgit/qt/qtopcua.git/
    • Open the qtopcua.pro project file in QT Creator.
    • Add install as make argument (release build).
    • Build the project, I could see from the outputs that the built libs were copied.
    • In the same git repo navigate to qtopcua/examples/opcua/opcuaviewer and open opcuaviewer.pro.
    • Compilation is succesfull.
    • When trying to run the console logger says: QApplication: invalid style override passed, ignoring it. and the App says:

    0_1531138888495_a72bc2ef-9f3f-4b60-ba2d-b7c7e5be568a-image.png

    After clicking OK:

    0_1531139001920_bfcbf6b1-e919-4bbb-90f3-24a089946301-image.png

    I would appreciate all help regarding solving this problem.


  • Qt Champions 2017

    Hi @Bremenpl,

    QtOPCUA is "just" a wrapper around different OPC backends (plugins). It seems you have no plugins available. For example, you can use the toolkit from Unified Automation (commercial) or the open62541 toolkit (open source).

    Please see https://blog.basyskom.com/building-qt-opc-ua-with-open62541 for building instructions.



  • @aha_1980 Hello, thank you for answer.
    I have followed the link you provided and did the steps for linux host. I have noticed few problems:

    • After building the open62541 I built the Qt OPC UA itself, but when doing the cmake reported:
    lukasz@xub:/tmp/qtopcua/build$ ~/Qt/5.11.1/gcc_64/bin/qmake ..
    Info: creating stash file /tmp/qtopcua/build/.qmake.stash
    Info: creating cache file /tmp/qtopcua/build/.qmake.cache
    
    Running configuration tests...
    Checking for FreeOpcua... no
    Checking for Open62541... no
    Checking for Unified Automation C++ SDK... no
    Done running configuration tests.
    
    Configure summary:
    
    Qt Opcua:
      FreeOpcua .............................. no
      Open62541 .............................. no
      Unified Automation C++ SDK ............. no
    
    Qt is now configured for building. Just run 'make'.
    Once everything is built, Qt is installed.
    You should NOT run 'make install'.
    Note that this build cannot be deployed to other machines or devices.
    
    Prior to reconfiguration, make sure you remove any leftovers from
    the previous build.
    
    

    Like the open62541 was not installed. After building and installing the Qt OPCA UA I tried installing the examples, but there are no executables in the examples directory.


  • Qt Champions 2017

    @Bremenpl said in Running and installing OPC UA:

    Checking for Open62541... no

    Hmm... strange. Looks like he can't find the dependency.

    I have not worked with this Qt module so I cannot really help you here. Maybe someone else here has some insight....



  • Will just add the make install output on the open62541 lib:

    lukasz@xub:/tmp/open62541/build$ sudo make install
    [  5%] Built target open62541-generator-transport
    [ 10%] Built target open62541-generator-statuscode
    [ 15%] Built target open62541-generator-namespace
    [ 21%] Built target open62541-generator-types
    [ 47%] Built target open62541-amalgamation-source
    [ 57%] Built target open62541-amalgamation-header
    [ 94%] Built target open62541-object
    [100%] Built target open62541
    Install the project...
    -- Install configuration: "Release"
    -- Up-to-date: /usr/local/lib/libopen62541.so.0.3.0
    -- Up-to-date: /usr/local/lib/libopen62541.so.0
    -- Up-to-date: /usr/local/lib/libopen62541.so
    -- Up-to-date: /usr/local/lib/cmake/open62541Targets.cmake
    -- Up-to-date: /usr/local/lib/cmake/open62541Targets-release.cmake
    -- Up-to-date: /usr/local/lib/cmake/open62541-config.cmake
    -- Up-to-date: /usr/local/lib/cmake/open62541ConfigVersion.cmake
    -- Up-to-date: /usr/local/lib/pkgconfig/open62541.pc
    -- Up-to-date: /usr/local/include/open62541/open62541.h
    -- Up-to-date: /usr/local/include/open62541/deps
    -- Up-to-date: /usr/local/include/open62541/deps/pcg_basic.c
    -- Up-to-date: /usr/local/include/open62541/deps/queue.h
    -- Up-to-date: /usr/local/include/open62541/deps/ua-nodeset
    -- Up-to-date: /usr/local/include/open62541/deps/mdnsd
    -- Up-to-date: /usr/local/include/open62541/deps/ms_stdint.h
    -- Up-to-date: /usr/local/include/open62541/deps/pcg_basic.h
    -- Up-to-date: /usr/local/include/open62541/deps/libc_time.c
    -- Up-to-date: /usr/local/include/open62541/deps/libc_time.h
    -- Up-to-date: /usr/local/share/open62541/tools
    -- Up-to-date: /usr/local/share/open62541/tools/update_copyright_header.py
    -- Up-to-date: /usr/local/share/open62541/tools/amalgamate.py
    -- Up-to-date: /usr/local/share/open62541/tools/cmake
    -- Up-to-date: /usr/local/share/open62541/tools/cmake/AssignSourceGroup.cmake
    -- Up-to-date: /usr/local/share/open62541/tools/cmake/FindCheck.cmake
    -- Up-to-date: /usr/local/share/open62541/tools/cmake/FindClangTools.cmake
    -- Up-to-date: /usr/local/share/open62541/tools/cmake/Toolchain-QNX-6.5.0.cmake
    -- Up-to-date: /usr/local/share/open62541/tools/cmake/FindMbedTLS.cmake
    -- Up-to-date: /usr/local/share/open62541/tools/cmake/Toolchain-mingw32.cmake
    -- Up-to-date: /usr/local/share/open62541/tools/cmake/Toolchain-rpi64.cmake
    -- Up-to-date: /usr/local/share/open62541/tools/cmake/Toolchain-mingw64.cmake
    -- Up-to-date: /usr/local/share/open62541/tools/cmake/FindValgrind.cmake
    -- Up-to-date: /usr/local/share/open62541/tools/cmake/Toolchain-gcc-m32.cmake
    -- Up-to-date: /usr/local/share/open62541/tools/cmake/FindSphinx.cmake
    -- Up-to-date: /usr/local/share/open62541/tools/cmake/Toolchain-rpi.cmake
    -- Up-to-date: /usr/local/share/open62541/tools/cmake/open62541-config.cmake.in
    -- Up-to-date: /usr/local/share/open62541/tools/generate_datatypes.py
    -- Up-to-date: /usr/local/share/open62541/tools/schema
    -- Up-to-date: /usr/local/share/open62541/tools/schema/datatypes_minimal.txt
    -- Up-to-date: /usr/local/share/open62541/tools/schema/Opc.Ua.StatusCodes.csv
    -- Up-to-date: /usr/local/share/open62541/tools/schema/Opc.Ua.Types.bsd
    -- Up-to-date: /usr/local/share/open62541/tools/schema/datatypes_transport.txt
    -- Up-to-date: /usr/local/share/open62541/tools/schema/Custom.Opc.Ua.Transport.bsd
    -- Up-to-date: /usr/local/share/open62541/tools/schema/NodeIds.csv
    -- Up-to-date: /usr/local/share/open62541/tools/schema/Opc.Ua.NodeSet2.Minimal.xml
    -- Up-to-date: /usr/local/share/open62541/tools/valgrind_check_error.py
    -- Up-to-date: /usr/local/share/open62541/tools/gdb-prettyprint.py
    -- Up-to-date: /usr/local/share/open62541/tools/c2rst.py
    -- Up-to-date: /usr/local/share/open62541/tools/certs
    -- Up-to-date: /usr/local/share/open62541/tools/certs/create_self-signed.py
    -- Up-to-date: /usr/local/share/open62541/tools/certs/localhost.cnf
    -- Up-to-date: /usr/local/share/open62541/tools/generate_statuscode_descriptions.py
    -- Up-to-date: /usr/local/share/open62541/tools/appveyor
    -- Up-to-date: /usr/local/share/open62541/tools/appveyor/install.ps1
    -- Up-to-date: /usr/local/share/open62541/tools/appveyor/build.ps1
    -- Up-to-date: /usr/local/share/open62541/tools/nodeset_compiler
    -- Up-to-date: /usr/local/share/open62541/tools/nodeset_compiler/NodeID_Blacklist.txt
    -- Up-to-date: /usr/local/share/open62541/tools/nodeset_compiler/constants.pyc
    -- Up-to-date: /usr/local/share/open62541/tools/nodeset_compiler/nodeset.pyc
    -- Up-to-date: /usr/local/share/open62541/tools/nodeset_compiler/datatypes.py
    -- Up-to-date: /usr/local/share/open62541/tools/nodeset_compiler/nodeset.py
    -- Up-to-date: /usr/local/share/open62541/tools/nodeset_compiler/nodeset_testing.py
    -- Up-to-date: /usr/local/share/open62541/tools/nodeset_compiler/datatypes.pyc
    -- Up-to-date: /usr/local/share/open62541/tools/nodeset_compiler/backend_open62541_nodes.py
    -- Up-to-date: /usr/local/share/open62541/tools/nodeset_compiler/__init__.pyc
    -- Up-to-date: /usr/local/share/open62541/tools/nodeset_compiler/NodeID_AssumeExternal.txt
    -- Up-to-date: /usr/local/share/open62541/tools/nodeset_compiler/nodeset_compiler.py
    -- Up-to-date: /usr/local/share/open62541/tools/nodeset_compiler/NodeID_NS0_Base.txt
    -- Up-to-date: /usr/local/share/open62541/tools/nodeset_compiler/backend_open62541_nodes.pyc
    -- Up-to-date: /usr/local/share/open62541/tools/nodeset_compiler/backend_open62541_datatypes.pyc
    -- Up-to-date: /usr/local/share/open62541/tools/nodeset_compiler/opaque_type_mapping.pyc
    -- Up-to-date: /usr/local/share/open62541/tools/nodeset_compiler/constants.py
    -- Up-to-date: /usr/local/share/open62541/tools/nodeset_compiler/opaque_type_mapping.py
    -- Up-to-date: /usr/local/share/open62541/tools/nodeset_compiler/backend_open62541_datatypes.py
    -- Up-to-date: /usr/local/share/open62541/tools/nodeset_compiler/backend_open62541.pyc
    -- Up-to-date: /usr/local/share/open62541/tools/nodeset_compiler/README.md
    -- Up-to-date: /usr/local/share/open62541/tools/nodeset_compiler/backend_open62541.py
    -- Up-to-date: /usr/local/share/open62541/tools/nodeset_compiler/__init__.py
    -- Up-to-date: /usr/local/share/open62541/tools/nodeset_compiler/backend_graphviz.py
    -- Up-to-date: /usr/local/share/open62541/tools/nodeset_compiler/nodes.py
    -- Up-to-date: /usr/local/share/open62541/tools/nodeset_compiler/nodes.pyc
    -- Up-to-date: /usr/local/share/open62541/tools/valgrind_suppressions.supp
    -- Up-to-date: /usr/local/share/open62541/tools/travis
    -- Up-to-date: /usr/local/share/open62541/tools/travis/travis_push_coverity.sh
    -- Up-to-date: /usr/local/share/open62541/tools/travis/travis_linux_script.sh
    -- Up-to-date: /usr/local/share/open62541/tools/travis/travis_linux_before_install.sh
    -- Up-to-date: /usr/local/share/open62541/tools/travis/travis_push_doc.sh
    -- Up-to-date: /usr/local/share/open62541/tools/travis/travis_linux_after_success.sh
    -- Up-to-date: /usr/local/share/open62541/tools/travis/travis_osx_before_install.sh
    -- Up-to-date: /usr/local/share/open62541/tools/travis/travis_osx_script.sh
    -- Up-to-date: /usr/local/share/open62541/tools/travis/travis_push_release.sh
    -- Up-to-date: /usr/local/share/open62541/tools/clang-format_precommit_hook
    
    


  • Hi @Bremenpl

    the output looks like you were using a completely clean build dir for Qt OPC UA after installing open62541. The detection should have worked with a correct open62541 and pkg-config setup.

    Could you please provide the content of the config.log file created by qmake?


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.