A HMI (Human Machine Interface) is the system by which people can interact with a machine. The user interface includes hardware (physical) and software (logical) components. User interfaces exist for various systems, and provide a means of:
- Input, allowing the users to manipulate a system
- Output, allowing the system to indicate the effects of the users’ manipulation
Mango M2M and Arduino
In this case we are using an Arduino for the microcontroller which Mango can communicate with using the Modbus Protocol. Mango M2M is no longer in development however you can still get it for FREE. I suggest getting version 1.12.1 as 1.12.5(latest) had a bug where it was throwing an error every time you load a page. There are a few mango clones out there that are activelyactivly being developed which I intend to try out eventually.
Infinite Automation took over Mango M2M a few years ago, they offer a free version with limitations http://infiniteautomation.com/
ScadaBR is a derivative of Mango and free as far as I know however the company is German, I am not sure how good the English support is. http://www.scadabr.com.br/
The bottom line is Mango M2M has some great features and for the price of free it is hard to beat. I am a little disappointed in the flexibility when it comes to screen creation.
Installing Mango M2M
How to build the HMI
The old Mango site where you can get your hands on the software. http://forum.infiniteautomation.com/download.jsp
Java SE 6 Download http://www.oracle.com/technetwork/java/javasebusiness/downloads/java-archive-downloads-javase6-419409.html#jdk-6u45-oth-JPR
My Blog Post on the Arduino Modbus PLC/RTU http://www.electronhacks.com/2014/04/arduino-modbus-plc-rtu/
I can’t find Mango 1.12.1 online anywhere so here is a direct download of the windows version. http://www.electronhacks.com/eh/Files/Mango/mango-1.12.1.zip
Mango requires the pre-installation of Java JDK 1.6.
Serial-based data sources (such as Modbus RTU) require the presence of the RXTXcomm API software. If you do not use these protocols, you can skip this section.
Download the following files to the given directories. RXTXcomm.jar is required for all host types. Note that the Linux library is for x86 hosts only. For other host types, please see rxtx.org.
•RXTXcomm.jar: save in <jdk1.6-home>\jre\lib\ext
•rxtxSerial.dll: save in <jdk1.6-home>\jre\bin
•librxtxSerial.so: save in <jdk1.6-home>/jre/lib/i386
Mango is a web application that requires a Java Servlet/JSP container within which to run. It has been tested with Apache Tomcat, but has no known dependencies. If you already have Tomcat or another container installed, you should be able to install the Mango WAR file as a web application. If you do not have a container installed on your host system, you can download Tomcat.
Mango M2M Binaries
If you only wish to run Mango as an application, download the binary package for your system. mango-1.12.5.zip
Mango M2M Source
Mango source is available for version 1.12.5. More recent source code will be available in the upcoming release of Mango Automation.
These instructions assume that you have successfully installed the Java JDK 1.6.0 (or higher), and RXTXcomm if required).
Ensure that JDK 1.6.0 runs by default by executing the command “java -version” at a command prompt. (It should print out “java version “1.6.0″”.) Mango will not start properly under an older version of Java. If the correct version of Java is not displayed, set your JAVA_HOME environment variable to <jdk1.6-home>.
Create a directory in which to unzip Tomcat. We will refer to this directory as <tomcat-home>. Unzip Tomcat in this directory. By default, Tomcat will service requests at port 8080. To change this to another port, edit the “Connector” element in <tomcat-home>/conf/server.xml.
To start Tomcat, execute either <tomcat-home>/bin/startup.bat (Windows) or <tomcat-home>/bin/startup.sh (*nix), depending on your host system type. If Tomcat started successfully, you should see a Tomcat welcome page when you direct your browser to http://localhost:8080/ (if you did not change the port in server.xml).
Shut down Tomcat before continuing with the installation. Either close the Tomcat window, or execute either <tomcat-home>/bin/shutdown.bat (Windows) or <tomcat-home>/bin/shutdown.sh (*nix), depending on your host system type.
Installing Mango M2M
These instructions assume that you will be installing Mango as the root application within Tomcat.
You may optionally clear out the applications that are shipped with Tomcat, as they are not required. To do so, delete all directories under <tomcat-home>/webapps. Then, recreate the ROOT subdirectory.
Unzip the Mango binary archive into the <tomcat-home>/webapps/ROOT directory. When you start Tomcat next (see above), Mango will be started as well. Depending on the speed of your system it could take a few minutes to create the database tables. Tomcat (and Mango) will have completed starting up when the Tomcat console displays the message “INFO: Server startup in xxx ms” (where “xxx” is the number of milliseconds it took to start up). When you direct your browser to your Tomcat installation, you should now see the Mango login page.
Upon installation, Mango creates a single login account with username “admin” and password “admin”. Once you log in, you are strongly encouraged to change at least the password for this account on the “Users” page (). Also, you can set various system properties on the “System settings” page ().