A.Quarter.To.Seven

Some of Stef's Stuff

ScadaBR and libNodave – part I

by Stefano on 2013.09.01, no comments

Want create site? Find Free WordPress Themes and plugins.

Communication with Siemens PLCs can be done the “free way” using ScadaBR (fork of Mango M2M) and libNodave. Following is the code used in ScadaBR to program new sources¬† to be accessed on communication channels provided by libNodave. Use the ScadaBR wiki as reference, in particular how to integrate new protocols.

Setup ScadaBR dev environment

  • IDE of choice is Eclipse. Take care to install WTP , WST Server Adapters, and be sure to have plugins to manage SVN and CVS repositories.
  • Apache Tomcat 6 server will host the SCADA, download and install it on your machine. Integrate Tomcat and Eclipse WTP following these tutorials:
  1. Integrating Eclipse and Tomcat – WTP (Web Tools Platform) Guide
  2. Apache Tomcat Eclipse Integration

NOTE: when configuring Tomcat Server I found useful take control of Tomcat installation instead of output all the stuff to default .metadata/etc… but it’s your choice.

Start the server and browse to localhost:8080; if the installation is OK you should see Tomcat welcome screen.

  • Checkout ScadaBR project source from the following SVN repository svn://svn.code.sf.net/p/scadabr/code/trunk

And this point, if you’re lucky, right-clicking on the project and selecting Run on Server from the context menu, should launch ScadaBR (login page opened in the default web browser)…but this was definitely not my case!

PROBLEM

– launching ScadaBR started the server but not the app, for the following reason

SEVERE: Error configuring application listener of class com.serotonin.mango.MangoContextListener
java.lang.ClassNotFoundException: com.serotonin.mango.MangoContextListener

– looking for a solution in WEB-INF/classes showed that nothing was there but empty folders. No compiled classes…nothing.

– back to the /src folder, opening MangoContextListener.java triggered some kind of validation highlighting dozens of errors. The Eclipse IDE didn’t validate the project correctly showing No errors when in fact they were all over the place

SOLUTION

– copy seroUtils.jar library to WEB-INF/lib from elsewere

– from the project’s context menu, in Targeted Runtimes, check a Tomcat 6 runtimes; this will provide the builder with the runtime to compile against.

– force a Build operation from the project’s context menu and be sure that only Warnings and no Errors appear in Problem view.

That’s it for the SCADA.

Did you find apk for android? You can find new Free Android Games and apps.

Leave a Reply

Your email address will not be published. Required fields are marked *