PLCHome / node-red-contrib-ads

Beckhoff TwinCat ADS support for Node-Red.
MIT License
15 stars 11 forks source link

Connection problem #3

Closed vdwpsmt closed 6 years ago

vdwpsmt commented 6 years ago

Hi,

still no succes using the ads node. The socket connection seems to be working, but then I get several timeout messages and a reconnection attempt is made. My plc is a TC2 runtime on a windows CE system. following the documentation, the "create symbols" option should be enabled on 2 places:

log messages: image

Do I need to install something else on the target system (in my case windows CE)? (Twincat ADS webservice?)

Any more suggestions?

kind regards Pascal

PLCHome commented 6 years ago

44449633-ee15b680-a5ee-11e8-989b-8fffc65d6411

Did you insert the static route?

PLCHome commented 6 years ago

pic1 pic2 pic3 pic4

I have this configuration. I did not release the device ads I think the checkbox in the TaskConfiguration is disabled because in the PLC configuration the Dynamic Symbols are switched on, it was OK for me...

vdwpsmt commented 6 years ago

Hi,

Problem is mainly fixed now. Static route was ok, all other settings did not seem to have any influence.

The real problem was the fact that my Twincat system manager was always active at the same time, and connected to the same target. For now, I am running Node-RED and my twincat development on the same PC. apparently things get messed up when both systems are running at the same time from the same IP?

So, the Node-red connection is working fine as long as I don't start the twincat system manager or PLC control software and connect to the same target as my Node-Red node.

I found this issue that seems related to it: https://github.com/Beckhoff/ADS/issues/30 annoying problem...

thanks for the assistance. Pascal

PLCHome commented 6 years ago

If I understood correctly, it is on the router on the CE PLC. I found this:

  1. TwinCAT AMS Router doesn't allow multiple TCP connections from the same host. So when you use two AdsLib instances on the same host to connect to the same TwinCAT router, you will see that TwinCAT will close the first TCP connection and only respond to the newest.
  2. As ADS is transmitted over a TCP connection, there is no real time guarantee.

You can set up a second IPv4 on the PC and assign to this a ADS NET ID under Twincat. But you have to disable DHCP and enter all IP addresses by hand.

PLCHome commented 6 years ago

readme revised