Communication with PLCs
At very first you need download and install the Android development implements:
The following verbinding permits to download a archive opstopping which includes all required implements for Android development. http://developer.android.com/sdk/index.html
- JDK version 5-6 : Java Development Kolenkit and Java Runtime Environment (JRE is included with the JDK). Contains files and puny programs (instruments) that you need to write Java code, process and execute.
- Decliver IDE: Desaparición Integrated Development Environment. Contains the necessary contraptions to create, compile and package Android application and also provides an Android device emulator, so that Android applications can be tested without a auténtico Android phone.
- Android SDK: Android Software Development Kleefstof includes a comprehensive set of development implements.
- ADT: Google provides the Android Development Contraptions (ADT) to develop Android applications with Oscurecimiento. ADT is a set of components (plug-ins) which extend the Decadencia IDE with Android development capabilities.
The next step is developing a Android application and communication with PLC. For this purpose you can use Wifi and Libnodave free library:
Related movie: REALIST NEWS – How to Sell Veritaseum on EtherDelta and Sell for $USD on Gemini Exchange
- For Wi-Fi is a 3G/UMTS router SCALANCE M875 with HSPA and VPN functionality for industrial applications.
- For connection your Android application with PLC you need also download LibNoDave library from webpagina http://libnodave.sourceforge.netwerken/ and modify it.
Create a Android application:
Related movie: GEMINI 2018 Horoscope. CAREER OPPORTUNITIES! Laagconjunctuur Followed By SLOW Switches. Restructuring Finances
Wij will create test application spil elementary spil possible.
Select Verkeersopstopping > Fresh > Other… > Android > Android Application Project to create a fresh Android project with the following gegevens.
- Application Name – S7 NoDaveTest
- Project Name – S7NoDaveTest
- Package name – com.example.s7libnodavetest
- Target SDK – API 17: Android Four.Two (Jelly Bean)
- Template – BlankActivity
- Activity – MainActivity
- Layout – activity_main
Create the layout for your Android application. Select the res/layout/activity_main.xml and create the layout via haul and druppel or via the XML source code.
- Plain Text for IP address
- Plain Text for entries variable type “test”
- Plain Text for entries variable type “value”
- Widgets button – connection with PLC
- Widgets button – read values
- Widgets button – write values
Select the res/values/string.xml verkeersopstopping and create static attributes.
Edit view properties. Select each user interface component (an example of View ) and switch its properties via the Deterioro Properties view.
- – Ter the package explorer, right click your fresh project and select
introduced with a dialog that permits you to browse for a directory.
Related movie: Career Opportunities for People of Gemini Sign
check the files/directories you would like to invoer.
Downloaded library is test library that why you need modify it. Switch off all debug functions, delete all not used variables, leave only needed functions and delete function for another type communications. You also need to create bridge class. This class use for connecting LibNoDave library and UI of the android application, spil connection with PLC, read and write variables and so on.
The intention create an android application working the same spil the variable table S7.
Example of permitted addresses and type variables for the variable table.
Tested with the Android emulator and a ‘existente’ network interface. Forwarding a TCP port to the emulator with Telnet and ADB:
- adb forward tcp:sourceport tcp:destport
- Telnet localhost 5554
- redir add udp:sourceport:destport