Как добавить java библиотеки в wincc unified
Перейти к содержимому

Как добавить java библиотеки в wincc unified

  • автор:

Name already in use

Work fast with our official CLI. Learn more about the CLI.

Sign In Required

Please sign in to use Codespaces.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching Xcode

If nothing happens, download Xcode and try again.

Launching Visual Studio Code

Your codespace will open once ready.

There was a problem preparing your codespace, please try again.

Latest commit

Git stats

Files

Failed to load latest commit information.

README.md

WinCC OA (Open Architecture) for Java

WinCC Open Architecture for Java is an API to connect WinCC OA to Java.
It is based on the WinCC OA native API+JNI and works on Windows and Linux.
Because it’s using the WinCC OA API you need to have a valid WinCC OA API license.
An example WinCC OA project is available in the examples directory.
An example for Scala and Clojure can be found in the examples directory.

  • Java: the java library for WinCC OA (winccoa-java-x.x.jar)
  • Native: the native api which is used by the Java library

Manager (oa4j/Native/Manager <-> at.rocworks.oa4j.base)

Examples can be found in the Java/src/test directory and in the examples directory, please read the examples/WinCCOA/Readme.txt.
The JClient class is an easy to use static class. It should be thread safe and callback functions are processed in a separate thread, so that the main WinCC OA thread/loop will not be blocked by callback functions.

Driver (oa4j/Native/Driver <-> at.rocworks.oa4j.driver)

There is an API and framework to implement a WinCC OA driver program in Java. A driver program is used to connect WinCC OA to peripherial devices and exchange data. There is a driver class driver.JDriver and a driver.JDriverSimple class, which can be used to implement a driver. An example drivers can be found in another git respository — Mqtt, Apache Kafka, Epics (Experimental Physics and Industrial Control System), .

CtrlExt (oa4j\Native\CtrlExt <-> at.rocworks.oa4j.base.ExternHdl)

It is possible to call a Java function from WinCC OA control language. The control extension JavaCtrlExt must be loaded and a Subclass of ExternHdlFunction must be implemented. This class can be used to execute a function. Executing the Java function in Control is done with the control function «javaCall» and «javaCallAsync». E.g.: javaCall(«ApiTestExternHdl», «myFunTest», makeDynAnytype(«hello», 1, true), out); A list of variables can be passed as input parameters and a list of values can be passed out by the Java function (it is the return value of the Java function). It is also possible to execute ctrl callback functions from Java. An example can be found in examples/WinCCOA/panels/JavaCtrlExt.pnl and the Java source src/test/java/ApiTestExternHdl.java. For each javaCall a new Java object of the given class is created (where a reference pointer to the WaitCond object in C++ is stored in the case of an async call).

Deploy Java Manager

Compiled versions can be downloaded from here: http://rocworks.at/oa4j/

Unzip compiled versions and deploy it to WinCC Open Architecure:

Start a test manger to check if it works:

Logs are written to a file named «WCCILjava1.0.log» to the «log» directory from where the java program has been started! If there is no «log» directory, the log is written to the current directory.

Start Java Manager

Add the following lines to the WinCC OA message catalog «managers.cat». You will find this file here C:/Siemens/Automation/WinCC_OA/%VERS%/msg/de_AT.utf8/managers.cat. Change it for all languages.

Add a java section to your project config file

Add a new manager «WCCOAjava» in the console with the argument «-class ApiTestDpConnect».
The program is connected to «ExampleDP_Trend1» and «ExampleDP_Trend1″ and it writes a sum to ExampleDP_Trend3.».

Or ou can start the manager from commandline:

If you get a message «MSVCR100.dll is missing», then you need to install Microsoft Visual C++ 2010 SP1 Redistributable Package (x64) http://www.microsoft.com/en-us/download/details.aspx?id=13523

Config Java Manager

Compile Java Manager

Install WinCC OA

Add the path to the jvm.dll of your Java installation to the PATH environment variable
e.g. PATH=C:\Program Files\Java\jre1.8.0_\bin\server

Download Apache Maven https://maven.apache.org/download.cgi Copy content of zip to e.g. C:\Tools\apache-maven-3.5.0

Build Java Library
set VERS=3.18
set PROJ=Test
set PATH=%PATH%;C:\Tools\apache-maven-3.5.0\bin
set JAVA_HOME=C:\Program Files\Java\jdk1.8.0_131
set PROJ_HOME=C:\WinCC_OA_Proj%PROJ%
cd C:\Tools\oa4j\Project\Java
copy make.sh make.bat
make.bat
copy winccoa-java-1.0-SNAPSHOT.jar %PROJ_HOME%

Or compile oa4j from the Native/Tools directory.
Open vc-start_3.XX.bat to start Visual Studio.

Open the solution from Native/Manager/build and build it.
→ use the solution in dir «build» for WinCC OA Version >= 3.19 → use the solution in dir «build-318» for WinCC OA Version 3.18
→ use the solution in dir «build-pre-318» for WinCC OA Version < 3.18

Java is everywhere… WinCC OA Java Manager…

From laptops to datacenters, game consoles to scientific supercomputers, cell phones to the Internet, Java is everywhere! Now connected to WinCC OA.

Here you will find an implementation of an API to connect WinCC OA to Java. It is based on the WinCC OA native API and JNI. This version is for WinCC OA 3.14 on Windows. Same works on Linux, but is not in the Zip, if you want it for Linux, just send me an email.

An example for a dpSet in Java see blow, more examples are in the zip/source directory. The JClient class is an easy to use static class. It should be thread safe and callback functions are processed in a separate thread, so that the main WinCC OA thread/loop will not be blocked by callback functions.

Based on that a NoSQL database logger was created, it is able to handle up to 40000-50000 value changes by dpQueryConnect. MQTT was connected to WinCC OA with a few lines of code (see WinCC OA and MQTT).

Как добавить java библиотеки в wincc unified

A, TIA WinCC Unifiedgetting StartedClassic Introduction

This kit is designed for entry-learning TIA WinCC Unified’s. Its biggest feature is built around a practical project to introduce. I believe that many read some tutorials on the market friends have such a feeling, that feeling after reading all understand each knowledge point, but the face of a real project when I do not know where to start! So why is there such a feeling it? Because these tutorials out of practice, they are mostly software will help with the re-organization, there is simply out of touch and practical application. We need to know that help is like a dictionary software, we do not know how to write a word, it needs the dictionary interpretation of how the case. The essay is not possible to learn how the dictionary can be successful alone, it is more like a systematic project, the whole idea is to help these structures and frameworks that are not. This is exactly the difference between the book and other tutorials, the most important feature of this book, it is in the back with a complete project case modeled to explain, from planning and design to complete process configuration are inside . With confidence as long as you read the book carefully, even if there is no project experience before you can do to face his first project.

Two, TIA WinCC Unifiedgetting StartedClassic catalog

Third, how to get

No. HwLib public attention, micro-channel circle of friends to forward the following eight articles (limit one per day), each article of not less than 10 to Chan.

TIA WinCC Unified classic entry (free version)

Top TIA Portal Programming — order (meaning frame)

TIA WinCC Unified first experience

HwLib (Huilan Bo) technical team product data (2020 year)

TIA Portal V16.0 (WinCC Unified) Installation Guide

Some common methods to read the data into the database of the PLC

Why self-control engineers to learn high-level programming language

Automation engineer C # Road (1)

Forwarding rules:

1, turn a daily limit, and the shield is not set, each article of not less than 10 praise;

2, only micro-channel circle of friends;

3, previously forwarded the still valid;

If you want to get the free version please add QQ group 529,694,547 after the share screenshots to the group administrator can be.

Of course, you can also choose the paid version, the paid version link:

About HwLib (Huilan Bo) technical team other products, the X treasure search shop "hwlib" or "Hui Lanbo"

88.PNG

For more information on HwLib (Huilan Bo) technical team: www.hwlib.cn

HwLib (Huilan Bo) Technical Team Technical Data:

link:
extraction code: 63rt

Free and paid versions of the differences:

1, paid version offers a free update, free version has not been updated;

2, the full paid version will be presented examples, there is no free version;

Форум АСУТП

Alex788 здесь недавно
здесь недавноСообщения: 2 Зарегистрирован: 11 июн 2022, 10:35 Имя: Александр Страна: Russia город/регион: Moscov

WinCC Unified вопрос

Сообщение Alex788 » 11 июн 2022, 11:00

Добрый день, уважаемые коллеги!
Я никогда раньше не использовал TIA Portal и у меня возникла проблема после установки.
Добавил в устройства — ПК, сетевую карту и WinCC Unified. Написав простую программу я загружаю её, но у меня не находит IP — адрес самого WinCC Unified при подключении. Установку ПО и написания программы делал согласно видео-урока. Подскажите пожалуйста как я могу решить эту проблему?

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *