S
S
Salavat2013-12-25 14:22:26
Java
Salavat, 2013-12-25 14:22:26

Where can I find an example of working with the ADS protocol in Java for Android?

To communicate with the controller, BECKHOFF has developed a special ADS data exchange protocol based on TCP / IP. The protocol is open. The toolkit for working with this protocol is provided free of charge in the form of library files and supports DLL, OCX, VB Script, J Script, .NET, Java for Windows, and there is also an open source project for implementing this protocol under Linux.

Where can I find an example of working with a protocol in java for android?
In particular, I'm interested in reading and writing to the controller's fixed memory address. For example VBScript code:
Dim TcClient, VarBool, VarInt16
    Set TcClient = CreateObject("TCSCRIPT.TcScriptSync")   ' загружаем COM объект
    Call TcClient.ConnectTo("192.168.208.188.1.1", 800)  ' подключаемся к контроллеру на 800 порт
    VarInt16 = TcClient.ReadInt16(&H4020, 0) ' читаем целое двухбайтовое число из памяти
    VarBool = TcClient.ReadBool(&H4021, 9) ' читаем значение переменной MySuperBool
    Call TcClient.WriteBool(&H4021, 9, NOT VarBool) ' меняем значение булевой переменной на противоположное 
    Call TcClient.WriteInt16(&H4020, 0, VarInt16 + 1) ' увеличиваем значение целого на единицу

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
svd71, 2013-12-26
@Salavat

Search here. You are unlikely to find.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question