Git Product home page Git Product logo

Comments (9)

mwiarda avatar mwiarda commented on August 23, 2024

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.

reyanvaldes avatar reyanvaldes commented on August 23, 2024

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.
ads_testing2

Thank you so much, appreciate any help
Reyan

from ads.

reyanvaldes avatar reyanvaldes commented on August 23, 2024

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.
ads_testing2

Thank you so much, appreciate any help
Reyan

from ads.

mwiarda avatar mwiarda commented on August 23, 2024

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.

reyanvaldes avatar reyanvaldes commented on August 23, 2024

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.

soberschmidt avatar soberschmidt commented on August 23, 2024

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.

mwiarda avatar mwiarda commented on August 23, 2024

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.

reyanvaldes avatar reyanvaldes commented on August 23, 2024

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.

techaitr avatar techaitr commented on August 23, 2024

@reyanvaldes Can you explain that how is Adslib define in .pro file?

from ads.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.