PLCHome / node-red-contrib-ads

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

Multiple notifications #5

Closed ghost closed 5 years ago

ghost commented 5 years ago

Hi, nice project.. Im trying to replace a damaged touch panel by setting up a node red web visu. Anyway, i try to read multiple values by multiple notifications but some just doesent comunicate. I saw they did something on the api to prevent read timeouts. Im not sure how i should read the values now. I have tried to trigger the ADS IN manualy but that doesent work. On the api they have the Multiread function, i think i need something like that, or im not sure if that works. Anyway, is there a workaround to read the values? Cheerz

PLCHome commented 5 years ago

Multiread is a special ADS communication that is only supported in newer PLCs. In principle, it makes no difference whether a multiread or single read is performed. only the network load increases.

ghost commented 5 years ago

Hi Chris, i dont know whats the problem but im not able to read more than 7-8 inputs. The other ones just dont return values. Now i set up a sequential read manualy by using a timed function node but thats not the best way. Its a bit slow.

PLCHome commented 5 years ago

Let's start from scratch.

I currently have no problem with the notification. Currently 140 to Twincat 2.11 under Docker with Jessie on RPI3. Have you ever tried to read the variable list with the node?

ghost commented 5 years ago

twincat version is 2.11 node-red 0.19.4 nodejs 8.12.0

but i have tried before on a debian vm with nodejs 10 same result. what you mean with read variable list with the node?

Am Mo., 1. Okt. 2018 um 09:52 Uhr schrieb ChrisHanuta < notifications@github.com>:

Let's start from scratch.

  • Twincat version.
  • Node Red Version
  • Operating System for Node Red

I currently have no problem with the notification. Currently 140 to Twincat 2.11 under Docker with Jessie on RPI3. Have you ever tried to read the variable list with the node?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ChrisHanuta/node-red-contrib-ads/issues/5#issuecomment-425818764, or mute the thread https://github.com/notifications/unsubscribe-auth/AMs34c_h64oAhODHCYBh0-eiwDWMOfKPks5ugcmfgaJpZM4XA4Fj .

PLCHome commented 5 years ago

ADS Symbols

This note loads a list of all symbols or types from the PLC when written to the input. If a string or string array is written, the output is filtered by name. Wildcards [?=char;*=chars] are possible.

This example makes an web ui for inspecting the PLC. The ADS Connection still needs to be set.

on the readme.md

PLCHome commented 5 years ago

Do you use >1.1.12:

1.1.12: Maintenance Release

Enhancements

Example for web ui with Node for get symbols and types from ADS.

Fixes

ADS Notification Note wont work
ghost commented 5 years ago

Im using 1.1.12 from the node-red palette/install menu.. i have to check later for the list.. cheerz

ghost commented 5 years ago

Strange thing is that there is no error at all. It just doesent return message. How to debug?

PLCHome commented 5 years ago

The debug call is: DEBUG=node-red-contrib-ads,node-ads node node_modules/node-red/red.js ....

The current debug issues do not help. I'll add a few more in the next few days. But you see no exceptions on the bash? And you get a few values ​​but not all?

ghost commented 5 years ago

Exactly, but i need to try bit more.

ghost commented 5 years ago

hi, i have tryed the example with the symbol list but it doesent work... node red just crashes... t 20:55:14 - [red] Uncaught Exception: 2 Oct 20:55:14 - ReferenceError: n is not defined at EventEmitter. (/root/.node-red/node_modules/node-red-contrib-ads/ads-connection.js:321:17) at Object.cb (/root/.node-red/node_modules/node-ads-api/lib/ads.js:629:12) at Object. (/root/.node-red/node_modules/node-ads-api/lib/ads.js:960:15) at ontimeout (timers.js:498:11) at tryOnTimeout (timers.js:323:5) at Timer.listOnTimeout (timers.js:290:5)

PLCHome commented 5 years ago

I think it's the connection. Did you put the connection on the node? If so, please set the ADS system node and a debug node on the flow. (Menue/Import/Clipboard and choose your connection) I think you have an problem with the ADS route and the ADSnetID in the PLC.

[{"id":"22de625.16e9e9e","type":"ADS System","z":"c26e486b.2f1238","name":"","datasource":"","x":550,"y":240,"wires":[["910fe95f.b47c18"]]},{"id":"910fe95f.b47c18","type":"debug","z":"c26e486b.2f1238","name":"","active":true,"tosidebar":true,"console":true,"tostatus":true,"complete":"payload","x":980,"y":240,"wires":[]},{"id":"b6f0c9aa.c1db58","type":"inject","z":"c26e486b.2f1238","name":"","topic":"1","payload":"true","payloadType":"bool","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":310,"y":240,"wires":[["22de625.16e9e9e"]]}]

I once removed your name and e-mail from the last post

PLCHome commented 5 years ago

Please check the Version 1.1.13.

PLCHome commented 5 years ago

Multiread is not necessary. There must be another problem here. But I am currently working on a solution for types and multiread.

ghost commented 5 years ago

Ok.. i havent tryed yet as the project changed.. i will see to check that soon as posdible..