Answer the question
In order to leave comments, you need to log in
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.
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
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question