Comments (9)
Hey,
"connection closed by remote" indicates that you have no route to your ADS client on your TwinCAT machine. If your ADS client runs on 192.168.10.1 add a TCP route to that ip with the Ams net id of 192.168.10.1.1.1.
It took me multiple days to figure out that that was the problem all along :-)
Maybe we should add it to the readme.
Good luck!
Michael
from ads.
Hi Michael
Thank you so much for quickly replying and sharing, it is a great help!. I put route as static on TwinCAT project under Route Settings, and message "connection closed by remote" is gone, but still getting read failed, now with different error code: 1799. To be honest, no idea. I tried to read different things but no success, at least it is a little better than before.
Thank you so much, appreciate any help
Reyan
from ads.
Hi Michael
Thank you so much for quickly replying and sharing, it is a great help!. I put route as static on TwinCAT project under Route Settings, and message "connection closed by remote" is gone, but still getting read failed, now with different error code: 1799. To be honest, no idea. I tried to read different things but no success, at least it is a little better than before.
Thank you so much, appreciate any help
Reyan
from ads.
Glad I could help.
Never seen 1799 before... It means "device not ready". Try to run the readState example first to see which state the device is in.
Good luck
Michael
from ads.
Michael
Thanks again, It is shown state: 6, dev state:1. I don't 't know what does it means.
Good news!!!, I did new fresh downloading, and now it is able to read good values!!!
I was jumping here on my seat!!.
Thanks a lot, it was a great help!!!!
from ads.
Please check the readme. The way to add route is described. Furthermore you will find the documentation to the ADS return codes and TwinCAT state enumerations.
from ads.
I know that it is described in the readme file. However, if multiple people run into the same problem it might be worth to highlight that information.
Regards
Michael
from ads.
Appreciate a lot the great help from you, and sharing nice library work. As a new user, I have only a couple of comments, that maybe could help other people like me (beginner in Beckhoff):
1- The way I read first from readme I misunderstand because I was thinking was mentioned about the example cpp itself, which has AdsAddRoute and I though with it was enough. For some reason we have to have it on the cpp and also explicitly set on TwinCAT project with the client IP, which is in my mind still is a little confusing, typically the comm server handle the clients request doesn't need to define at server itself which clients will be connected. It could be nice, if possible, to have option to add this from the client program also without touching the server it self.
2- Some link referenced on AdsLib.h works but others I couldn't opened correctly, for example in AdsSyncReadDevice, the adsState link info works, but the return code doesn't. It is a little difficult for a person not familiar with Bechkoff try to find the meaning of these codes. Maybe could be helpful to have a functions that return text message for: Ads State, Ade device status, and return codes.
Thank you so much for great work!!! and shared with community
Note: By the way I created kind of very simple ads_map (mimic what it is on S7 in Snap7 library) to handle different data types with read/write operation on buffer, not sure if like to take a look. The idea is to handle different data types in/from buffer, and make it easy for parsing in client program. I believe could help to handle easier the reading or writing data.
Bests
Reyan
from ads.
@reyanvaldes Can you explain that how is Adslib define in .pro file?
from ads.
Related Issues (20)
- Two application running on the same machine that read a variable from the same plc concurrently HOT 8
- Use std::function for callback HOT 1
- ADS-sum command: Read or Write a list of variables with one single ADS-command HOT 1
- impossible to compile under ubuntu 20.04.5 HOT 1
- CMake Error at CMakeLists.txt:40 (install): install TARGETS given target "ads" which does not exist in this directory. HOT 3
- Unreachable PLC Blocks All Other Operations During Timeout Period HOT 2
- Reading route using `adstool`
- Will beckhoff officially launch the golang version of the ADS API HOT 2
- SymbolAccess for Bool HOT 5
- ADS Server HOT 1
- Async WriteReqEx HOT 5
- AdsNotification cycle time deviation HOT 2
- RGB Image over ADS HOT 1
- Port: 30000 already in used as 0x7ffe55930ed0 terminate called after throwing an instance of 'AdsException'
- Passing IP from terminal
- ADS Connection Error With Docker Container HOT 1
- CMake build failing HOT 2
- ADS READ for TwinCAT Motion
- Info: connection closed by remote in sockets.cpp HOT 2
- twincat3 - ubuntu error code 6 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ads.