Giter VIP home page Giter VIP logo

Comments (6)

jisotalo avatar jisotalo commented on July 20, 2024

Hi!

Please make sure you are using latest versions (node-red-contrib-ads-client 1.3.2 and ads-client 1.13.1). If the problem still occurs, please post all node connection settings.

from node-red-contrib-ads-client.

AndreSchm avatar AndreSchm commented on July 20, 2024

Hi,
unfortunately the error remains.
I´m using the default configuration and just adding AmsNetId and Port:
image
image
image
image
Thanks a lot.

from node-red-contrib-ads-client.

jisotalo avatar jisotalo commented on July 20, 2024

Damn. Haven't seen that kind of problem.

What happens if you run node-red on the PLC and try to connect using target address localhost. That should work basically always.

Could you also post logs with debugging level 3.

EDIT: Similar problem has been around previously but I think no solution was found jisotalo/ads-client#63

from node-red-contrib-ads-client.

AndreSchm avatar AndreSchm commented on July 20, 2024

Well it really looks like its the same issue.
Here is the level 3 log using localhost and port 851 on the PLC:

7 Apr 09:15:13 - [info] Starting modified nodes
7 Apr 09:15:13 - [info] [ads-client-connection:MyPlcConn] Connecting to localhost:851...
  ads-client setDebugging(): Debug level set to 3 +6ms
  ads-client _connect(): Starting to connect localhost:48898 +1ms
7 Apr 09:15:13 - [info] Started modified nodes
  ads-client _connect(): Socket connection established to localhost:48898 +4ms
  ads-client:details _registerAdsPort(): Registering an ADS port from ADS router localhost:48898 +458ms
  ads-client:details IO out ------> 8 bytes +1ms
  ads-client _connect(): Socket connect failed: Error: read ECONNRESET
  ads-client     at TCP.onStreamRead (node:internal/stream_base_commons:217:20) {
  ads-client   errno: -4077,
  ads-client   code: 'ECONNRESET',
  ads-client   syscall: 'read'
  ads-client } +9ms
  ads-client:details _registerAdsPort(): Socket connection errored. +2ms
7 Apr 09:15:13 - [info] [ads-client-connection:MyPlcConn] Connecting to localhost:851 failed, keeping trying..
7 Apr 09:15:13 - [warn] [ads-client-connection:MyPlcConn] Failed to connect localhost:851 at startup: ClientException: Connection to localhost:48898 failed (socket error -4077) (read ECONNRESET)
  ads-client _registerAdsPort(): Failed to unregister ADS port - Timeout - no response in 2000 ms +756ms
  ads-client _disconnect(): Connection closed successfully +0ms
  ads-client _connect(): Starting to connect localhost:48898 +3ms
  ads-client _connect(): Socket connection established to localhost:48898 +1ms
  ads-client:details _registerAdsPort(): Registering an ADS port from ADS router localhost:48898 +759ms
  ads-client:details IO out ------> 8 bytes +1ms
  ads-client _connect(): Socket connect failed: Error: read ECONNRESET
  ads-client     at TCP.onStreamRead (node:internal/stream_base_commons:217:20) {
  ads-client   errno: -4077,
  ads-client   code: 'ECONNRESET',
  ads-client   syscall: 'read'
  ads-client } +2ms

Everthing works fine on my engineering PC running win10 and TwinCAT v3.1.4024.22.

So either its a problem with 4022.22 (same version @Hopperpop struggeled with) or my installation process on the remote PLCs. I have no internet access on the PLCs so I run the node.js installer and move the .node-red and npm folders manually. Is there something more to pay attention to when trying to set up node-red offline?

from node-red-contrib-ads-client.

jisotalo avatar jisotalo commented on July 20, 2024

Hmm. That really looks 100% identical.

I really wonder what is the reason. I never have had that with few different versions but I got to admit I think I havent had 4022.10. @Hopperpop if you see this, did you ever find a solution?

Just to make sure:

  • Connection works on development PC with 4024 TwinCat when connecting to localhost (same machine)?
  • Connection does not work on development PC when connecting to PLC with 4022.10 using AmsNetID?
  • Connection does not work on PLC when connecting to localhost (same machine?)

By the way, double check that you aren't using secure ADS when creating route. I think it has also caused some issues, need to dig into that some day.

I'm sorry I have no experience on installing node-red without internet connection.

from node-red-contrib-ads-client.

AndreSchm avatar AndreSchm commented on July 20, 2024

Yes to all three questions. It is only 4022.22 causing the problem, 4024.22 is working fine. I will have a look on secure ADS.
Thanks a lot for your quick replies and effort.

from node-red-contrib-ads-client.

Related Issues (12)

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.