{"id":722,"date":"2016-05-27T22:41:24","date_gmt":"2016-05-27T20:41:24","guid":{"rendered":"http:\/\/www.rocworks.at\/wordpress\/?p=722"},"modified":"2017-02-16T09:37:52","modified_gmt":"2017-02-16T07:37:52","slug":"wincc-oa-java-manager-connect-everything-to-wincc-oa","status":"publish","type":"post","link":"https:\/\/www.rocworks.at\/wordpress\/?p=722","title":{"rendered":"Java is everywhere&#8230; WinCC OA Java Manager&#8230;"},"content":{"rendered":"<p>From laptops to datacenters, game consoles to scientific supercomputers, cell phones to the Internet, Java is everywhere! Now connected to WinCC OA.<\/p>\n<p>Here you will find an implementation of\u00a0an API to\u00a0connect WinCC OA to Java. It is based on the\u00a0WinCC OA native API and\u00a0JNI. 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.<\/p>\n<p>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\u00a0will not be blocked by callback functions.<\/p>\n<p>Based on that a NoSQL database logger was created, it is\u00a0able to handle up to 40000-50000\u00a0value changes by dpQueryConnect. MQTT was connected\u00a0to WinCC OA with a few lines of code (see\u00a0<a href=\"http:\/\/www.rocworks.at\/wordpress\/?p=710\" target=\"_blank\">WinCC OA and MQTT<\/a>).<\/p>\n<p>Download from GitHub:\u00a0<a href=\"https:\/\/github.com\/vogler75\/oa4j.git\">https:\/\/github.com\/vogler75\/oa4j.git<\/a><\/p>\n<p>How to use\/install? In the zip is a ReadMe.txt with a step by step instruction.<\/p>\n<pre>JManager m = new JManager();\r\nm.init(args).start(); \r\nret = JClient.dpSet()\r\n .add(\"System1:ExampleDP_Trend1.:_original.._value\", new FloatVar(Math.random()))\r\n .add(\"System1:ExampleDP_SumAlert.:_original.._value\", new TextVar(\"hello world\"))\r\n .await()\r\n .getRetCode();\r\nDebug.out.log(Level.INFO, \"retCode={0}\", ret); \r\nm.stop();<\/pre>\n<p><a href=\"http:\/\/www.rocworks.at\/wordpress\/?attachment_id=727\" rel=\"attachment wp-att-727\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-727\" src=\"http:\/\/www.rocworks.at\/wordpress\/wp-content\/uploads\/2016\/05\/WCCOAjava-1.png\" alt=\"WCCOAjava\" width=\"347\" height=\"49\" srcset=\"https:\/\/www.rocworks.at\/wordpress\/wp-content\/uploads\/2016\/05\/WCCOAjava-1.png 347w, https:\/\/www.rocworks.at\/wordpress\/wp-content\/uploads\/2016\/05\/WCCOAjava-1-300x42.png 300w\" sizes=\"auto, (max-width: 347px) 100vw, 347px\" \/><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>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\u00a0an API to\u00a0connect WinCC OA to Java. It is based on the\u00a0WinCC OA native API and\u00a0JNI. This version is for WinCC OA 3.14 on Windows. Same works &hellip; <a href=\"https:\/\/www.rocworks.at\/wordpress\/?p=722\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Java is everywhere&#8230; WinCC OA Java Manager&#8230;<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1,29,3],"tags":[31,26],"class_list":["post-722","post","type-post","status-publish","format-standard","hentry","category-allgemein","category-bigdatanosql","category-wincc-oa","tag-java","tag-wincc-oa"],"_links":{"self":[{"href":"https:\/\/www.rocworks.at\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/722","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rocworks.at\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rocworks.at\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rocworks.at\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rocworks.at\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=722"}],"version-history":[{"count":10,"href":"https:\/\/www.rocworks.at\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/722\/revisions"}],"predecessor-version":[{"id":789,"href":"https:\/\/www.rocworks.at\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/722\/revisions\/789"}],"wp:attachment":[{"href":"https:\/\/www.rocworks.at\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=722"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rocworks.at\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=722"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rocworks.at\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=722"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}