Code Monkey home page Code Monkey logo

node-red-contrib-s7's People

Contributors

barackohmama avatar carstenmaul avatar danielmichalichyn avatar gfcittolin avatar lichtjaeger avatar mscbpi avatar rpuskas0 avatar sergekatzmann avatar thermseekr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

node-red-contrib-s7's Issues

S7 node not show on Raspberry PI

I have Raspberry PI Model B, with node-red installed version 0.15.2.
And I have installed node-red-contrib-s7 using npm install.
The installation was successful, but I can not see the S7 node on the Node-Red.

I've check the Node-Red start-up console, and here the message:

/ui
/usr/lib/node_modules/node-red-contrib-s7/red/s7.js:198
Object.keys(data).forEach(key => sendMsg(data[key], key, null));
^
29 Nov 08:11:11 - [warn] ------------------------------------------------------
29 Nov 08:11:11 - [warn] [s7] SyntaxError: Unexpected token >
29 Nov 08:11:11 - [warn] ------------------------------------------------------

Strangely, I tried to install on the Ubuntu 16.04, and I can see the S7 node on the Node-red.

LOGO! and Node-RED communications

I get the following behavior:

I connect to a Siemens LOGO! and read some inputs without a problem.

When I disconnect the LOGO! from power and reconnect after a while, I get only "Failure (Bad values)".

capture1

The only way to go back to a working situation is to do a Full Deploy or restart my Node-RED instance.

Here is the flow:

[{"id":"dceccca6.e4c29","type":"tab","label":"S7-LOGO8","disabled":false,"info":"First Step to adapt S7-node to logo-node\n\nLogoComfort side:\n\nTools-->Ethernet connections\nEnter:\n-LOGO IP adress\n-Subnet Mask\n-Default Gateway\n\nRight Click on Ethernet connections\nAdd Server connection --> S7 Connection\nDouble click on connection1\n\nTick Connect with an Operator Panel (OP)\nIt will change TSAP to 02.00\n\nTick Accept all connection requests (Or you know what you do)\n\nRemote Properties (Client) TSAP: 01.00\n\nRed Node Side:\nMenu (Upper Right)-->Import-->Clipboard\nPaste flow\nImport\n\nIn S7-LOGO8 Flow\nDouble click on LOGO8\nPLC properties (little pencil)\nChange for your Red Node IP adress\n\nDeploy\nNow you could already read all I/O of Logo\n"},{"id":"14e4c23a.cca3ee","type":"s7 in","z":"dceccca6.e4c29","endpoint":"7a40424c.fd2d5c","mode":"single","variable":"I01 AI03","diff":true,"name":"LOGO8 I1","x":120,"y":40,"wires":[["a924a0e8.3f8a3"]]},{"id":"5083fbb4.8ce664","type":"s7 in","z":"dceccca6.e4c29","endpoint":"7a40424c.fd2d5c","mode":"single","variable":"I02 AI04","diff":true,"name":"LOGO8 I2","x":120,"y":100,"wires":[["afec231c.166fd"]]},{"id":"5696677b.25aba8","type":"s7 in","z":"dceccca6.e4c29","endpoint":"7a40424c.fd2d5c","mode":"single","variable":"I03 High Freq","diff":true,"name":"LOGO8 I3","x":120,"y":160,"wires":[["4d88bfd7.616db"]]},{"id":"63ce8ec9.fb9a4","type":"s7 in","z":"dceccca6.e4c29","endpoint":"7a40424c.fd2d5c","mode":"single","variable":"I04 High Freq","diff":true,"name":"LOGO8 I4","x":120,"y":220,"wires":[["7375958c.ee97fc"]]},{"id":"37357f81.c71a1","type":"s7 in","z":"dceccca6.e4c29","endpoint":"7a40424c.fd2d5c","mode":"single","variable":"I05 High Freq","diff":true,"name":"LOGO8 I5","x":120,"y":280,"wires":[["c43162c3.6c6d8"]]},{"id":"d37c85c7.e78558","type":"s7 in","z":"dceccca6.e4c29","endpoint":"7a40424c.fd2d5c","mode":"single","variable":"I06 High Freq","diff":true,"name":"LOGO8 I6","x":120,"y":340,"wires":[["b920f6d6.ea8ae8"]]},{"id":"ad4ba9ca.cfe948","type":"s7 in","z":"dceccca6.e4c29","endpoint":"7a40424c.fd2d5c","mode":"single","variable":"I07 AI01","diff":true,"name":"LOGO8 I7","x":120,"y":400,"wires":[["a5a96891.a05988"]]},{"id":"2699a98d.1f0a66","type":"change","z":"dceccca6.e4c29","name":"","rules":[{"t":"change","p":"payload","pt":"msg","from":"true","fromt":"bool","to":"1","tot":"str"},{"t":"change","p":"payload","pt":"msg","from":"false","fromt":"bool","to":"0","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":540,"y":40,"wires":[["a80acc0.95afd38","4ce79648.3e4278"]]},{"id":"afec231c.166fd","type":"change","z":"dceccca6.e4c29","name":"","rules":[{"t":"set","p":"topic","pt":"msg","to":"2","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":290,"y":100,"wires":[["2699a98d.1f0a66"]]},{"id":"4d88bfd7.616db","type":"change","z":"dceccca6.e4c29","name":"","rules":[{"t":"set","p":"topic","pt":"msg","to":"3","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":290,"y":160,"wires":[["2699a98d.1f0a66"]]},{"id":"7375958c.ee97fc","type":"change","z":"dceccca6.e4c29","name":"","rules":[{"t":"set","p":"topic","pt":"msg","to":"4","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":290,"y":220,"wires":[["2699a98d.1f0a66"]]},{"id":"c43162c3.6c6d8","type":"change","z":"dceccca6.e4c29","name":"","rules":[{"t":"set","p":"topic","pt":"msg","to":"5","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":290,"y":280,"wires":[["2699a98d.1f0a66"]]},{"id":"b920f6d6.ea8ae8","type":"change","z":"dceccca6.e4c29","name":"","rules":[{"t":"set","p":"topic","pt":"msg","to":"6","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":290,"y":340,"wires":[["2699a98d.1f0a66"]]},{"id":"a5a96891.a05988","type":"change","z":"dceccca6.e4c29","name":"","rules":[{"t":"set","p":"topic","pt":"msg","to":"7","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":290,"y":400,"wires":[["2699a98d.1f0a66"]]},{"id":"a80acc0.95afd38","type":"function","z":"dceccca6.e4c29","name":"format arguments","func":"msg.payload = String(msg.topic) + \" \" + String(msg.payload)\nreturn msg;","outputs":1,"noerr":0,"x":630,"y":120,"wires":[["6bec640.c14fa9c","4ce79648.3e4278"]]},{"id":"6bec640.c14fa9c","type":"exec","z":"dceccca6.e4c29","command":"cd  ~/maintnode/ && pipenv run python maintnode/logo/iomeasure.py","addpay":true,"append":"","useSpawn":"false","timer":"","oldrc":false,"name":"commit measurement","x":760,"y":200,"wires":[["d1bb3e2b.9176a"],[],["d1bb3e2b.9176a"]]},{"id":"a924a0e8.3f8a3","type":"change","z":"dceccca6.e4c29","name":"","rules":[{"t":"set","p":"topic","pt":"msg","to":"1","tot":"num"}],"action":"","property":"","from":"","to":"","reg":false,"x":290,"y":40,"wires":[["2699a98d.1f0a66"]]},{"id":"d1bb3e2b.9176a","type":"debug","z":"dceccca6.e4c29","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":870,"y":280,"wires":[]},{"id":"4ce79648.3e4278","type":"debug","z":"dceccca6.e4c29","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":810,"y":40,"wires":[]},{"id":"bfad1c08.5174b","type":"s7 out","z":"dceccca6.e4c29","endpoint":"7a40424c.fd2d5c","variable":"M03","name":"Unlock","x":630,"y":520,"wires":[]},{"id":"bb76c64a.2f7cc8","type":"inject","z":"dceccca6.e4c29","name":"","topic":"","payload":"true","payloadType":"bool","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":150,"y":520,"wires":[["bfad1c08.5174b","db928faa.7f1fa"]]},{"id":"5fc82588.a341ac","type":"s7 in","z":"dceccca6.e4c29","endpoint":"7a40424c.fd2d5c","mode":"single","variable":"M03","diff":true,"name":"LOGO8 M3","x":130,"y":460,"wires":[["80d59433.659b48"]]},{"id":"80d59433.659b48","type":"debug","z":"dceccca6.e4c29","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":370,"y":460,"wires":[]},{"id":"db928faa.7f1fa","type":"delay","z":"dceccca6.e4c29","name":"","pauseType":"delay","timeout":"1","timeoutUnits":"seconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"1","randomLast":"5","randomUnits":"seconds","drop":false,"x":300,"y":580,"wires":[["2621c6b5.34718a"]]},{"id":"2621c6b5.34718a","type":"change","z":"dceccca6.e4c29","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"false","tot":"bool"}],"action":"","property":"","from":"","to":"","reg":false,"x":460,"y":580,"wires":[["bfad1c08.5174b"]]},{"id":"7a40424c.fd2d5c","type":"s7 endpoint","z":"","address":"192.168.1.122","port":"102","rack":"0","slot":"2","localtsaphi":"01","localtsaplo":"00","remotetsaphi":"02","remotetsaplo":"00","connmode":"tsap","cycletime":"500","timeout":"1500","verbose":"off","name":"S7-LOGO8","vartable":[{"addr":"DB1,X1064.0","name":"Q01"},{"addr":"DB1,X1064.1","name":"Q02"},{"addr":"DB1,X1064.2","name":"Q03"},{"addr":"DB1,X1064.3","name":"Q04"},{"addr":"DB1,X1064.4","name":"Q05"},{"addr":"DB1,X1064.5","name":"Q06"},{"addr":"DB1,X1064.6","name":"Q07"},{"addr":"DB1,X1064.7","name":"Q08"},{"addr":"DB1,X1065.0","name":"Q09"},{"addr":"DB1,X1065.1","name":"Q10"},{"addr":"DB1,X1065.2","name":"Q11"},{"addr":"DB1,X1065.3","name":"Q12"},{"addr":"DB1,X1065.4","name":"Q13"},{"addr":"DB1,X1065.5","name":"Q14"},{"addr":"DB1,X1065.6","name":"Q15"},{"addr":"DB1,X1065.7","name":"Q16"},{"addr":"DB1,X1066.0","name":"Q17"},{"addr":"DB1,X1066.1","name":"Q18"},{"addr":"DB1,X1066.2","name":"Q19"},{"addr":"DB1,X1066.3","name":"Q20"},{"addr":"DB1,X1024.0","name":"I01 AI03"},{"addr":"DB1,X1024.1","name":"I02 AI04"},{"addr":"DB1,X1024.2","name":"I03 High Freq"},{"addr":"DB1,X1024.3","name":"I04 High Freq"},{"addr":"DB1,X1024.4","name":"I05 High Freq"},{"addr":"DB1,X1024.5","name":"I06 High Freq"},{"addr":"DB1,X1024.6","name":"I07 AI01"},{"addr":"DB1,X1024.7","name":"I08 AI02"},{"addr":"DB1,X1025.0","name":"I09"},{"addr":"DB1,X1025.1","name":"I10"},{"addr":"DB1,X1025.2","name":"I11"},{"addr":"DB1,X1025.3","name":"I12"},{"addr":"DB1,X1025.4","name":"I13"},{"addr":"DB1,X1025.5","name":"I14"},{"addr":"DB1,X1025.6","name":"I15"},{"addr":"DB1,X1025.7","name":"I16"},{"addr":"DB1,X1026.0","name":"I17"},{"addr":"DB1,X1026.1","name":"I18"},{"addr":"DB1,X1026.2","name":"I19"},{"addr":"DB1,X1026.3","name":"I20"},{"addr":"DB1,X1026.4","name":"I21"},{"addr":"DB1,X1026.5","name":"I22"},{"addr":"DB1,X1026.6","name":"I23"},{"addr":"DB1,X1026.7","name":"I24"},{"addr":"DB1,INT1032","name":"AI01"},{"addr":"DB1,INT1034","name":"AI02"},{"addr":"DB1,INT1036","name":"AI03"},{"addr":"DB1,INT1038","name":"AI04"},{"addr":"DB1,INT1040","name":"AI06"},{"addr":"DB1,INT1042","name":"AI07"},{"addr":"DB1,INT1044","name":"AI08"},{"addr":"DB1,INT1046","name":"AI09"},{"addr":"DB1,INT1072","name":"AQ01"},{"addr":"DB1,INT1074","name":"AQ02"},{"addr":"DB1,INT1076","name":"AQ03"},{"addr":"DB1,INT1078","name":"AQ04"},{"addr":"DB1,INT1080","name":"AQ05"},{"addr":"DB1,INT1082","name":"AQ06"},{"addr":"DB1,INT1084","name":"AQ07"},{"addr":"DB1,INT1086","name":"AQ08"},{"addr":"DB1,INT1088","name":"AQ09"},{"addr":"DB1,X1104.0","name":"M01"},{"addr":"DB1,X1104.1","name":"M02"},{"addr":"DB1,X1104.2","name":"M03"},{"addr":"DB1,X1104.3","name":"M04"},{"addr":"DB1,X1104.4","name":"M05"},{"addr":"DB1,X1104.5","name":"M06"},{"addr":"DB1,X1104.6","name":"M07"},{"addr":"DB1,X1104.7","name":"M08 Start"},{"addr":"DB1,X1105.0","name":"M09"},{"addr":"DB1,X1105.1","name":"M10"},{"addr":"DB1,X1105.2","name":"M11"},{"addr":"DB1,X1105.3","name":"M12"},{"addr":"DB1,X1105.4","name":"M13"},{"addr":"DB1,X1105.5","name":"M14"},{"addr":"DB1,X1105.6","name":"M15"},{"addr":"DB1,X1105.7","name":"M16"},{"addr":"DB1,X1105.0","name":"M17"},{"addr":"DB1,X1105.1","name":"M18"},{"addr":"DB1,X1105.2","name":"M19"},{"addr":"DB1,X1105.3","name":"M20"},{"addr":"DB1,X1105.4","name":"M21"},{"addr":"DB1,X1105.5","name":"M22"},{"addr":"DB1,X1105.6","name":"M23"},{"addr":"DB1,X1105.7","name":"M24"},{"addr":"DB1,X1106.0","name":"M25 LOGO Screen White"},{"addr":"DB1,X1106.1","name":"M26 TDE Screen White"},{"addr":"DB1,X1106.2","name":"M27 CharSet"},{"addr":"DB1,X1106.3","name":"M28 LOGO Screen Orange"},{"addr":"DB1,X1106.4","name":"M29 LOGO Screen Red"},{"addr":"DB1,X1106.5","name":"M30 TDE Screen Orange"},{"addr":"DB1,X1106.6","name":"M31 TDE Screen Red"},{"addr":"DB1,X1106.7","name":"M32"},{"addr":"DB1,X1106.0","name":"M33...64"},{"addr":"DB1,INT1118","name":"AM1"},{"addr":"DB1,INT1120","name":"AM2"},{"addr":"DB1,INT1122","name":"AM3"},{"addr":"DB1,INT1124","name":"AM4"},{"addr":"DB1,INT1126","name":"AM5...64"},{"addr":"DB1,X1246.0","name":"NI1"},{"addr":"DB1,X1246.1","name":"NI1..64"},{"addr":"DB1,X1390.0","name":"NQ1"},{"addr":"DB1,X1390.1","name":"NQ1..64"},{"addr":"DB1,INT1262","name":"NAI1"},{"addr":"DB1,INT1264","name":"NAI1...64"},{"addr":"DB1,INT1406","name":"NAQ1"},{"addr":"DB1,INT1408","name":"NAQ2...64"}]}]

Any ideas on how to get a stable connection?

Node connection

The node does not disconnect after we deactivate the flow that has a configuration node.
When this happens the log gets filled by it because the configuration node try to connect again when the timeout parameter reaches out

Error: read ECONNRESET

hello,
i am currently using/testing the S7 node which by the ways i found it very usefull and well done for this. Lately, i run into uncaught exception, more specifically
i get the following somehow randomly, and if it keeps on

[error] [s7 endpoint:ITK_104] Failure (Bad values)
i finally get

[red] Uncaught Exception:
7 Mar 13:58:54 - Error: read ECONNRESET
at exports._errnoException (util.js:870:11)
at TCP.onread (net.js:544:26)

and node-red crashes..
do you have any ideas on how i could track and solve this?
running on
npm -v 4.3.0
Node-RED version: v0.16.2
Node.js version: v4.2.4
Linux 4.4.13-yocto-standard ia32 LE
Dashboard version 2.1.0 started at /ui

thanks in advance, any help would me more than welcome.

Uncaught Exception writing to an unknown variable

It is possible to drop an output node without selecting the assigned variable to be written
image

This sometimes crashes Node-RED

> ago 06 10:19:04.030074 st-one node-red[2411]: 6 Aug 10:19:04 - [red] Uncaught Exception:
> ago 06 10:19:04.035885 st-one node-red[2411]: 6 Aug 10:19:04 - TypeError: Cannot read property 'split' of undefined
> ago 06 10:19:04.035885 st-one node-red[2411]:     at stringToS7Addr (/home/node-red/node_modules/nodes7/nodeS7.js:2043:21)
> ago 06 10:19:04.035885 st-one node-red[2411]:     at NodeS7.writeItems (/home/node-red/node_modules/nodes7/nodeS7.js:433:35)
> ago 06 10:19:04.035885 st-one node-red[2411]:     at writeNext (/home/node-red/node_modules/node-red-contrib-s7/red/s7.js:239:28)
> ago 06 10:19:04.035885 st-one node-red[2411]:     at NodeS7.onWritten [as writeDoneCallback] (/home/node-red/node_modules/node-red-contrib-s7/red/s7.js:223:13)
> ago 06 10:19:04.035885 st-one node-red[2411]:     at NodeS7.writeResponse (/home/node-red/node_modules/nodes7/nodeS7.js:1285:8)
> ago 06 10:19:04.035885 st-one node-red[2411]:     at NodeS7.onResponse (/home/node-red/node_modules/nodes7/nodeS7.js:1195:10)
> ago 06 10:19:04.035885 st-one node-red[2411]:     at Socket.<anonymous> (/home/node-red/node_modules/nodes7/nodeS7.js:390:20)
> ago 06 10:19:04.035885 st-one node-red[2411]:     at Socket.emit (events.js:189:13)
> ago 06 10:19:04.035885 st-one node-red[2411]:     at addChunk (_stream_readable.js:284:12)
> ago 06 10:19:04.035885 st-one node-red[2411]:     at readableAddChunk (_stream_readable.js:265:11

"Error connecting to PLC: Error: read ECONNRESET"

I have communicate between S7-1200/S7-1500 and Node-RED on IOT2040 many times in the past.

Yesterday, I installed a brand new image V2.1.3 on a IOT2040, change IP address to my needs, auto-start Node-red, installed S7 node and finally reboot before doing my flow.

I usually use the "Rack/slot" mode (not TSAP) for the "s7 endpoint node" and access inputs/outputs and variables in DB without any issue.

Here is the current configuration to communicate with a S7-1200:

1
2

Here is the DB:
3

Yes, I check the checkbox "Permit access with PUT/GET communication from remote partner".
4

I can see my data is receive by the S7 node, but my debug window is fill with the error "Error connecting to PLC: Error: read ECONNRESET".
5

I never had this error in the past.

I receive my data, that's not the end of the world, but it is annoying to have a filled debug window.

I tried to add a S7 connection with an "Unknown partner" with IP address of the IOT2040 and use the TSAP mode, but get the same result.

Do you have an idea what's wrong?

It must be related to the latest version of S7 node 1.3/1.4 because I never got this error in the past and I am doing the same thing.

Read on trigger also possible?

I don't know how is it possible to read PLC variables with trigger input also?
It would be great because in case of GPRS connection where the cycle time may have 5 minutes or more (for reduction of data traffic) and you make some writing, you want to see directly the changes from PLC side and not waiting the next cycle update

Regards
paskalare

Error: "Error connecting to PLC: Error: read ECONNRESET" with version 1.5.1

Hello Ladies and Gentleman
I get the error "Error connecting to PLC: Error: read ECONNRESET" after I updated my node from 1.4.1 to version 1.5.1.
I get the error sometimes two times in one hour, and after certain period of time Node-Red restarts or crashes.

I tested the new version on my windows PC and Node-Red, there i have no problems. Is it possible, that there is still a problem with the version on Ubuntu Core ?

I´m using Ubuntu Core 16-2.32.6 on a Dell 3001 IoT - Gateway und a Node red version 0.17.5.

My questions:

  1. Has anyone still the same problems with the version of 1.5.1?
  2. Is it possible to install the old Version 1.4.1, and how can I install an older version?

Thank you for your answer
Best regards Daniel

works on PLCSIM but only get "bad values" on a real S7-1200

Well, i will need a hand on this one,

every thing works o.k in simulation with PLCSIM, so i changed the ethernet adress, complied, uploaded program in a s7-1200, started everything, tested o.k with TIA portal, can see values changing in my watch table and yes, put/get is enable, block optimisation disable and no protection is checked.

I'm running Node-Red locally in the same laptop as TIA.
put the plc's ethernet address in the node. Without any variable the node is connected and no errors are reported. but with a variable i get "bad data" in the debug tab and "Error S7 endpoint : xxx Error connecting to PLC [object object]" in node-red debug window.
i can ping the plc.
Nothing is changed, only ethernet address, same flow used for simulation.
Node-red V.0..19.6
S7 node V.1.5.4

Even tried with a raspberry pi, same flow, same results, and i can ping the plc from the pi too.

any idea what can cause this?

Thanks.
capture

s7-200 Error: read ECONNRESET

I connected S7 200 PLC, suggesting Error connecting to PLC: Error: read ECONNRESET。
Who can help me?
windows10
"node-red": "^0.20.7",
"node-red-contrib-s7": "^1.6.3"

Control node: trigger read doesn't work

Hi, why if the input node is on "Emit only when change" mode, and if I want read the input "manually" with the control node the trigger doesn't work?

Thank you

Warning on start

When I start the node-red I got the following message:

(node) warning: possible EventEmitter memory leak detected. 11 __STATUS__ listeners added. Use emitter.setMaxListeners() to increase limit. Trace at S7Endpoint.addListener (events.js:239:17) at S7Endpoint.Node.on (/usr/lib/node_modules/node-red/red/runtime/nodes/Node.js:80:14) at new S7In (/usr/lib/node_modules/node-red-contrib-s7/red/s7.js:261:23) at createNode (/usr/lib/node_modules/node-red/red/runtime/nodes/flows/Flow.js:276:18) at Flow.start (/usr/lib/node_modules/node-red/red/runtime/nodes/flows/Flow.js:87:35) at start (/usr/lib/node_modules/node-red/red/runtime/nodes/flows/index.js:284:29) at /usr/lib/node_modules/node-red/red/runtime/nodes/flows/index.js:138:21 at tryCatchReject (/usr/lib/node_modules/node-red/node_modules/when/lib/makePromise.js:845:30) at runContinuation1 (/usr/lib/node_modules/node-red/node_modules/when/lib/makePromise.js:804:4) at Fulfilled.when (/usr/lib/node_modules/node-red/node_modules/when/lib/makePromise.js:592:4) at Pending.run (/usr/lib/node_modules/node-red/node_modules/when/lib/makePromise.js:483:13) at Scheduler._drain (/usr/lib/node_modules/node-red/node_modules/when/lib/Scheduler.js:62:19) at Scheduler.drain (/usr/lib/node_modules/node-red/node_modules/when/lib/Scheduler.js:27:9) at doNTCallback0 (node.js:419:9) at process._tickCallback (node.js:348:13) (node) warning: possible EventEmitter memory leak detected. 11 __ALL__ listeners added. Use emitter.setMaxListeners() to increase limit. Trace at S7Endpoint.addListener (events.js:239:17) at S7Endpoint.Node.on (/usr/lib/node_modules/node-red/red/runtime/nodes/Node.js:80:14) at new S7In (/usr/lib/node_modules/node-red-contrib-s7/red/s7.js:281:35) at createNode (/usr/lib/node_modules/node-red/red/runtime/nodes/flows/Flow.js:276:18) at Flow.start (/usr/lib/node_modules/node-red/red/runtime/nodes/flows/Flow.js:87:35) at start (/usr/lib/node_modules/node-red/red/runtime/nodes/flows/index.js:284:29) at /usr/lib/node_modules/node-red/red/runtime/nodes/flows/index.js:138:21 at tryCatchReject (/usr/lib/node_modules/node-red/node_modules/when/lib/makePromise.js:845:30) at runContinuation1 (/usr/lib/node_modules/node-red/node_modules/when/lib/makePromise.js:804:4) at Fulfilled.when (/usr/lib/node_modules/node-red/node_modules/when/lib/makePromise.js:592:4) at Pending.run (/usr/lib/node_modules/node-red/node_modules/when/lib/makePromise.js:483:13) at Scheduler._drain (/usr/lib/node_modules/node-red/node_modules/when/lib/Scheduler.js:62:19) at Scheduler.drain (/usr/lib/node_modules/node-red/node_modules/when/lib/Scheduler.js:27:9) at doNTCallback0 (node.js:419:9) at process._tickCallback (node.js:348:13) 26 Jun 17:23:12 - [info] Started flows 26 Jun 17:23:12 - [error] [MySQLdatabase:47e21f82.2f7e2] Error: connect ETIMEDOUT 26 Jun 17:23:32 - [error] [mysql:Mysql] Database not connected 26 Jun 17:26:56 - [info] Stopping flows 26 Jun 17:26:58 - [info] Stopped flows 26 Jun 17:26:58 - [info] Starting flows (node) warning: possible EventEmitter memory leak detected. 11 __STATUS__ listeners added. Use emitter.setMaxListeners() to increase limit. Trace at S7Endpoint.addListener (events.js:239:17) at S7Endpoint.Node.on (/usr/lib/node_modules/node-red/red/runtime/nodes/Node.js:80:14) at new S7In (/usr/lib/node_modules/node-red-contrib-s7/red/s7.js:261:23) at createNode (/usr/lib/node_modules/node-red/red/runtime/nodes/flows/Flow.js:276:18) at Flow.start (/usr/lib/node_modules/node-red/red/runtime/nodes/flows/Flow.js:87:35) at start (/usr/lib/node_modules/node-red/red/runtime/nodes/flows/index.js:284:29) at /usr/lib/node_modules/node-red/red/runtime/nodes/flows/index.js:138:21 at tryCatchReject (/usr/lib/node_modules/node-red/node_modules/when/lib/makePromise.js:845:30) at runContinuation1 (/usr/lib/node_modules/node-red/node_modules/when/lib/makePromise.js:804:4) at Fulfilled.when (/usr/lib/node_modules/node-red/node_modules/when/lib/makePromise.js:592:4) at Pending.run (/usr/lib/node_modules/node-red/node_modules/when/lib/makePromise.js:483:13) at Scheduler._drain (/usr/lib/node_modules/node-red/node_modules/when/lib/Scheduler.js:62:19) at Scheduler.drain (/usr/lib/node_modules/node-red/node_modules/when/lib/Scheduler.js:27:9) at doNTCallback0 (node.js:419:9) at process._tickCallback (node.js:348:13) (node) warning: possible EventEmitter memory leak detected. 11 __ALL__ listeners added. Use emitter.setMaxListeners() to increase limit. Trace at S7Endpoint.addListener (events.js:239:17) at S7Endpoint.Node.on (/usr/lib/node_modules/node-red/red/runtime/nodes/Node.js:80:14) at new S7In (/usr/lib/node_modules/node-red-contrib-s7/red/s7.js:281:35) at createNode (/usr/lib/node_modules/node-red/red/runtime/nodes/flows/Flow.js:276:18) at Flow.start (/usr/lib/node_modules/node-red/red/runtime/nodes/flows/Flow.js:87:35) at start (/usr/lib/node_modules/node-red/red/runtime/nodes/flows/index.js:284:29) at /usr/lib/node_modules/node-red/red/runtime/nodes/flows/index.js:138:21 at tryCatchReject (/usr/lib/node_modules/node-red/node_modules/when/lib/makePromise.js:845:30) at runContinuation1 (/usr/lib/node_modules/node-red/node_modules/when/lib/makePromise.js:804:4) at Fulfilled.when (/usr/lib/node_modules/node-red/node_modules/when/lib/makePromise.js:592:4) at Pending.run (/usr/lib/node_modules/node-red/node_modules/when/lib/makePromise.js:483:13) at Scheduler._drain (/usr/lib/node_modules/node-red/node_modules/when/lib/Scheduler.js:62:19) at Scheduler.drain (/usr/lib/node_modules/node-red/node_modules/when/lib/Scheduler.js:27:9) at doNTCallback0 (node.js:419:9) at process._tickCallback (node.js:348:13)
Please what is this ?

Crashing on writing to variable

Ever since upgrade to v2.0.2 the node crashes Node-red when I write a value to the PLC.
I have an S7-315 with ethernet card (343-1)

Here is a snippet of the code that causes the crash.

[{"id":"54fcea12.a18494","type":"s7 out","z":"5ab44d6c.a3a794","endpoint":"6ed0dd77.8cc744","variable":"BackdoorLight_Cmd","name":"","x":730,"y":640,"wires":[]},{"id":"b578f24a.7e53b","type":"function","z":"5ab44d6c.a3a794","name":"On","func":"//Bit0\nvar status = 0;\nvar mask = 1;\nvar value;\nif (msg.payload === true)\n{\n    value = status | mask;\n}\nelse\n{\n    value = status & ~mask;\n}\nmsg.payload = value;\nreturn msg;","outputs":1,"noerr":0,"x":510,"y":640,"wires":[["54fcea12.a18494"]]},{"id":"245dea6.aeff316","type":"function","z":"5ab44d6c.a3a794","name":"Off","func":"//Bit1\nvar status = 0;\nvar mask = 2;\nvar value;\n\nif (msg.payload === true)\n{\n    value = status | mask;\n}\nelse\n{\n    value = status & ~mask;\n}\nmsg.payload = value;\nreturn msg;","outputs":1,"noerr":0,"x":510,"y":660,"wires":[["54fcea12.a18494"]]},{"id":"bf315410.591568","type":"function","z":"5ab44d6c.a3a794","name":"Manual","func":"//Bit3\nvar status = 0;\nvar mask = 8;\nvar value;\n\nif (msg.payload === true)\n{\n    value = status | mask;\n}\nelse\n{\n    value = status & ~mask;\n}\nmsg.payload = value;\nreturn msg;","outputs":1,"noerr":0,"x":520,"y":700,"wires":[["54fcea12.a18494"]]},{"id":"181a374b.c5ac99","type":"function","z":"5ab44d6c.a3a794","name":"Auto","func":"//Bit2\nvar status = 0;\nvar mask = 4;\nvar value;\n\nif (msg.payload === true)\n{\n    value = status | mask;\n}\nelse\n{\n    value = status & ~mask;\n}\nmsg.payload = value;\nreturn msg;","outputs":1,"noerr":0,"x":510,"y":680,"wires":[["54fcea12.a18494"]]},{"id":"1aa33712.dee4a9","type":"inject","z":"5ab44d6c.a3a794","name":"","topic":"","payload":"","payloadType":"bool","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":250,"y":640,"wires":[["b578f24a.7e53b"]]},{"id":"7d30387d.e1f9f8","type":"inject","z":"5ab44d6c.a3a794","name":"","topic":"","payload":"","payloadType":"bool","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":250,"y":660,"wires":[["245dea6.aeff316"]]},{"id":"95bf2645.96c868","type":"inject","z":"5ab44d6c.a3a794","name":"","topic":"","payload":"","payloadType":"bool","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":250,"y":680,"wires":[["181a374b.c5ac99"]]},{"id":"1d6f321f.354f3e","type":"inject","z":"5ab44d6c.a3a794","name":"","topic":"","payload":"","payloadType":"bool","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":250,"y":700,"wires":[["bf315410.591568"]]},{"id":"6ed0dd77.8cc744","type":"s7 endpoint","z":"","transport":"iso-on-tcp","address":"192.168.1.246","port":"102","rack":"0","slot":"2","localtsaphi":"01","localtsaplo":"00","remotetsaphi":"01","remotetsaplo":"00","connmode":"rack-slot","adapterauto":true,"adapterport":"","busaddr":"2","adapteraddr":"0","cycletime":"500","timeout":"1500","verbose":"default","name":"","vartable":[{"addr":"DB105,WORD24","name":"Sensors"},{"addr":"DB105,WORD2","name":"PoolPump_Status"},{"addr":"DB105,WORD8","name":"SecurityLight_Status"},{"addr":"DB105,WORD10","name":"BackdoorSolar_Status"},{"addr":"DB105,REAL12","name":"Poolpump_Current"},{"addr":"DB105,REAL16","name":"SolarVoltage"},{"addr":"DB26,BYTE50","name":"PoolPump_Command"},{"addr":"DB22,BYTE148","name":"SecLight_Command"},{"addr":"DB22,BYTE216","name":"BackSolar_Command"},{"addr":"DB22,BYTE420","name":"FairyLight_Command"}]}]

Can you help with this please?
Was working perfectly for the last year.

"extended" version of the S7 Protocol

Hi!
Is there a way to implement the "extended" version of the S7 Protocol in this code?
I'm asking that because I'm recieving data from an s7-1500 from the internet and I can't make it works.
The problem is that I don't have access to the PLC that's sending me the data i need so i can't and don't want to reduce the security of the packet, for obvious reasons.
Thanks for your time

s7-Out, send a Boolean command

Hello,
I'm trying to send the value true or false to my variable test in the PLC, using the node S7, but it doesn't work when I put the adress : DB3,X42.0 or even DB3,BOOL42.0.

imagen

debug output is continuing after deletion of a deployed node-red-contib-s7

I permanently experience a strange behavior of node-red-contrib-s7 after deleting both(!) the deployed node and the connection in Node-RED. It continues with the debug output as “ghost-node”. After restarting Node-RED, there is no debug output anymore (as expected).

Do you know about this issue? Is it related to node-red-contrib-s7 itself or maybe to the underlying library? Where should I post my observations (screenshots, debug output) to find a solution?

Set variable list dynamically

Hi all,

I would like to read a dynamic list of variables from the plc (the variable list could change over time).
Would it be possible to implement such a feature on the "s7 control" node?

My use case is as follows:
I would like to read a list of parameters (name and address) from a database, read them from the plc and write them back to the database.

Uncaught Exception at writeAfterEnd

Hi thanks for this great plugin. During a test with a PLC connected via an LTE modem, our node-red constantly crashes due to the following exception:

3 Jun 14:10:18 - [red] Uncaught Exception:
3 Jun 14:10:18 - Error [ERR_STREAM_WRITE_AFTER_END]: write after end
at writeAfterEnd (_stream_writable.js:237:12)
at Socket.Writable.write (_stream_writable.js:288:5)
at Socket.write (net.js:710:40)
at NodeS7.onISOConnectReply (/home/user/.node-red/node_modules/nodes7/nodeS7.js:335:17)
at Socket. (/home/user/.node-red/node_modules/nodes7/nodeS7.js:291:26)
at Socket.emit (events.js:159:13)
at addChunk (_stream_readable.js:265:12)
at readableAddChunk (_stream_readable.js:252:11)
at Socket.Readable.push (_stream_readable.js:209:10)
at TCP.onread (net.js:598:20)

To be honest, the LTE connection was very bad during the test. With a good and stable connection the problem doesn't occur.

7-node: 1.6.0
Node-RED: 0.20.5
Node.js: 9.2.0

Emit only when value changes not working with array of bits

Hi,

I think this is a new issue.

I found out how to read an array of bits from a PLC.
This is actually working. I get the correct values.

I use the following address to read the array of bits: DB60,X0.0.100

I checked the node property 'Emit only when value changes (diff)'.

This has no effect. The node ignores this setting.
The values are readed cyclic.

When i just ask for a specific bit. The setting is working.
See the screenshot of the debug output.

See the other screenshots for more details.

Node configuration
image

Flow
image

Debug output
image

LOGO/S7-200 - Write value to Digital Output (Q...)

Hi,

Not sure if this applies to all S7 versions but I have a Logo 8.2 (0BA8).

Is it possible to write a boolean to the Q1 (DB1,X1064.0) address? I have been successful on writing booleans to flag addresses e.g. M01 (DB1,X1104.0) but I can't seem to flip the switch on Digital Outputs.

The thing is, I can read it perfectly but no matter what I write like boolans, numbers or strings I don't get any errors or any results.

Logs:

Preparing to WRITE Q01 to value true
DB1,X1064.0 write completed with quality OK
Address DB1,X1064.0 has value false and quality OK

Flow:

[{"id":"3136edb4.c805d2","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"738f6c54.dd8ec4","type":"s7 out","z":"3136edb4.c805d2","endpoint":"45a3399b.7baad8","variable":"Q01","name":"","x":670,"y":300,"wires":[]},{"id":"cb1f06b4.bd5868","type":"s7 out","z":"3136edb4.c805d2","endpoint":"45a3399b.7baad8","variable":"M01","name":"","x":670,"y":380,"wires":[]},{"id":"8c5f6766.768df8","type":"inject","z":"3136edb4.c805d2","name":"","topic":"","payload":"true","payloadType":"bool","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":330,"y":320,"wires":[["738f6c54.dd8ec4"]]},{"id":"24bc865d.e0da2a","type":"inject","z":"3136edb4.c805d2","name":"","topic":"","payload":"false","payloadType":"bool","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":330,"y":380,"wires":[["738f6c54.dd8ec4"]]},{"id":"45a3399b.7baad8","type":"s7 endpoint","z":"","address":"192.168.100.50","port":"102","rack":"0","slot":"2","localtsaphi":"01","localtsaplo":"00","remotetsaphi":"02","remotetsaplo":"00","connmode":"tsap","cycletime":"500","timeout":"1500","verbose":"on","name":"LOGO","vartable":[{"addr":"DB1,X1064.0","name":"Q01"},{"addr":"DB1,X1064.1","name":"Q02"},{"addr":"DB1,X1064.2","name":"Q03"},{"addr":"DB1,X1064.3","name":"Q04"},{"addr":"DB1,X1064.4","name":"Q05"},{"addr":"DB1,X1064.5","name":"Q06"},{"addr":"DB1,X1064.6","name":"Q07"},{"addr":"DB1,X1064.7","name":"Q08"},{"addr":"DB1,X1065.0","name":"Q09"},{"addr":"DB1,X1065.1","name":"Q10"},{"addr":"DB1,X1065.2","name":"Q11"},{"addr":"DB1,X1065.3","name":"Q12"},{"addr":"DB1,X1065.4","name":"Q13"},{"addr":"DB1,X1065.5","name":"Q14"},{"addr":"DB1,X1065.6","name":"Q15"},{"addr":"DB1,X1065.7","name":"Q16"},{"addr":"DB1,X1066.0","name":"Q17"},{"addr":"DB1,X1066.1","name":"Q18"},{"addr":"DB1,X1066.2","name":"Q19"},{"addr":"DB1,X1066.3","name":"Q20"},{"addr":"DB1,X1024.0","name":"I01 AI03"},{"addr":"DB1,X1024.1","name":"I02 AI04"},{"addr":"DB1,X1024.2","name":"I03 High Freq"},{"addr":"DB1,X1024.3","name":"I04 High Freq"},{"addr":"DB1,X1024.4","name":"I05 High Freq"},{"addr":"DB1,X1024.5","name":"I06 High Freq"},{"addr":"DB1,X1024.6","name":"I07 AI01"},{"addr":"DB1,X1024.7","name":"I08 AI02"},{"addr":"DB1,X1025.0","name":"I09"},{"addr":"DB1,X1025.1","name":"I10"},{"addr":"DB1,X1025.2","name":"I11"},{"addr":"DB1,X1025.3","name":"I12"},{"addr":"DB1,X1025.4","name":"I13"},{"addr":"DB1,X1025.5","name":"I14"},{"addr":"DB1,X1025.6","name":"I15"},{"addr":"DB1,X1025.7","name":"I16"},{"addr":"DB1,X1026.0","name":"I17"},{"addr":"DB1,X1026.1","name":"I18"},{"addr":"DB1,X1026.2","name":"I19"},{"addr":"DB1,X1026.3","name":"I20"},{"addr":"DB1,X1026.4","name":"I21"},{"addr":"DB1,X1026.5","name":"I22"},{"addr":"DB1,X1026.6","name":"I23"},{"addr":"DB1,X1026.7","name":"I24"},{"addr":"DB1,INT1032","name":"AI01"},{"addr":"DB1,INT1034","name":"AI02"},{"addr":"DB1,INT1036","name":"AI03"},{"addr":"DB1,INT1038","name":"AI04"},{"addr":"DB1,INT1040","name":"AI06"},{"addr":"DB1,INT1042","name":"AI07"},{"addr":"DB1,INT1044","name":"AI08"},{"addr":"DB1,INT1046","name":"AI09"},{"addr":"DB1,INT1072","name":"AQ01"},{"addr":"DB1,INT1074","name":"AQ02"},{"addr":"DB1,INT1076","name":"AQ03"},{"addr":"DB1,INT1078","name":"AQ04"},{"addr":"DB1,INT1080","name":"AQ05"},{"addr":"DB1,INT1082","name":"AQ06"},{"addr":"DB1,INT1084","name":"AQ07"},{"addr":"DB1,INT1086","name":"AQ08"},{"addr":"DB1,INT1088","name":"AQ09"},{"addr":"DB1,X1104.0","name":"M01"},{"addr":"DB1,X1104.1","name":"M02"},{"addr":"DB1,X1104.2","name":"M03"},{"addr":"DB1,X1104.3","name":"M04"},{"addr":"DB1,X1104.4","name":"M05"},{"addr":"DB1,X1104.5","name":"M06"},{"addr":"DB1,X1104.6","name":"M07"},{"addr":"DB1,X1104.7","name":"M08 Start"},{"addr":"DB1,X1105.0","name":"M09"},{"addr":"DB1,X1105.1","name":"M10"},{"addr":"DB1,X1105.2","name":"M11"},{"addr":"DB1,X1105.3","name":"M12"},{"addr":"DB1,X1105.4","name":"M13"},{"addr":"DB1,X1105.5","name":"M14"},{"addr":"DB1,X1105.6","name":"M15"},{"addr":"DB1,X1105.7","name":"M16"},{"addr":"DB1,X1105.0","name":"M17"},{"addr":"DB1,X1105.1","name":"M18"},{"addr":"DB1,X1105.2","name":"M19"},{"addr":"DB1,X1105.3","name":"M20"},{"addr":"DB1,X1105.4","name":"M21"},{"addr":"DB1,X1105.5","name":"M22"},{"addr":"DB1,X1105.6","name":"M23"},{"addr":"DB1,X1105.7","name":"M24"},{"addr":"DB1,X1106.0","name":"M25 LOGO Screen White"},{"addr":"DB1,X1106.1","name":"M26 TDE Screen White"},{"addr":"DB1,X1106.2","name":"M27 CharSet"},{"addr":"DB1,X1106.3","name":"M28 LOGO Screen Orange"},{"addr":"DB1,X1106.4","name":"M29 LOGO Screen Red"},{"addr":"DB1,X1106.5","name":"M30 TDE Screen Orange"},{"addr":"DB1,X1106.6","name":"M31 TDE Screen Red"},{"addr":"DB1,X1106.7","name":"M32"},{"addr":"DB1,X1106.0","name":"M33...64"},{"addr":"DB1,INT1118","name":"AM1"},{"addr":"DB1,INT1120","name":"AM2"},{"addr":"DB1,INT1122","name":"AM3"},{"addr":"DB1,INT1124","name":"AM4"},{"addr":"DB1,INT1126","name":"AM5...64"},{"addr":"DB1,X1246.0","name":"NI1"},{"addr":"DB1,X1246.1","name":"NI1..64"},{"addr":"DB1,X1390.0","name":"NQ1"},{"addr":"DB1,X1390.1","name":"NQ1..64"},{"addr":"DB1,INT1262","name":"NAI1"},{"addr":"DB1,INT1264","name":"NAI1...64"},{"addr":"DB1,INT1406","name":"NAQ1"},{"addr":"DB1,INT1408","name":"NAQ2...64"}]}]

Edit: Can anyone perhaps confirm that using Network Inputs is the correct way to go? I tried writing to NI1 but it failed too. This might be because of a wrong setting in LOGO but would definitely appreciate a push in the right direction.

Thanks you.

No connection with S7-1512 st

We have a total of 7 plcs running with the excelent node-red-contrib-s7 package,
This one is however different:

TIA portal:
DB optimization setting is off.
Access setting on full access
PUT end Get enabled.

Settings node Red:
Rack /slot:= 0/1 (which is the setting in Tia).

It looks like we cannot find the db??

LOG:

[222039,529908519] ConnectionReset is happening
25 Aug 10:43:50 - [info] [s7 endpoint:96a52d88.76ca5] Initiating connection to PLC
[222039,532011826] Initiate Called - Connecting to PLC with address and parameters:
[222039,533918788] { host: '50.50.50.1', port: '102', rack: '0', slot: '1' }
[222039,534969651] Connection cleanup is happening
[222039,537882834 50.50.50.1 S1] Clearing read PacketTimeouts
[222039,539727771 50.50.50.1 S1] Clearing write PacketTimeouts
[222039,540636807 50.50.50.1 S1] <initiating a new connection Sun Aug 25 2019 10:43:50 GMT+0200 (W. Europe Daylight Time)>
[222039,541507917 50.50.50.1 S1] Attempting to connect to host...
[222039,544455076 50.50.50.1 S1] TCP Connection Established to 50.50.50.1 on port 102
[222039,545251124 50.50.50.1 S1] Will attempt ISO-on-TCP connection
[222039,545978037 50.50.50.1 S1] Using rack [0] and slot [1]
[222039,546876407 50.50.50.1 S1] ISO-on-TCP Connection Confirm Packet Received
[222039,551317687 50.50.50.1 S1] Received PDU Response - Proceeding with PDU 960 and 3 max parallel connections.
[222039,552963118] Translation OK
[222040,58285781 50.50.50.1 S1] Reading All Items (readAllItems was called)
[222040,60015755 50.50.50.1 S1] Adding or Removing { arg: [ 'testval' ], action: 'add' }
[222040,60651013 50.50.50.1 S1] Adding testval
[222040,62747999] Failed to find a match for DB44
[222040,63738418 50.50.50.1 S1] Dropping an undefined request item.
[222040,63943850 50.50.50.1 S1] Calling SRP from RAI
[222040,64536047 50.50.50.1 S1] SendReadPacket called
[222041,32880961] ResetNOW is happening

Possible to use with other Siemens PLC devices?

Is it possible to use this node with an Siemens Logo 8! PLC?
I'm looking to buy a Siemens Logo 8! but want to connect it to node-red. Can you help me? I think lots of people woulld be happy if this woulld be possible.

Connection with Siemens MPI Adapter Error

Hello @ALL

My system:
Linux Mint 19 x64
SIMATIC PC Adapter USB A2 (6GK1 571-0BA00-0AA0)

I have a problem with the connection with MPI.
I installed the mpi-s7 package and also the udev rule.

The system has found the adapter and can be found in /dev

root@lm19c-vm:~# ls -l /dev/mpi*
lrwxrwxrwx 1 root root 15 Okt  8 13:24 /dev/mpiusb -> bus/usb/001/003
lrwxrwxrwx 1 root root 15 Okt  8 13:24 /dev/mpiusb2 -> bus/usb/001/003
root@lm19c-vm:~#

But when i start the S7 Node i get an error message

Error connecting to PLC: Error: Could not find any MPI-USB adater, check if the device has been correctly installed

The user is also in group "dialout".

Error connecting to PLC: Error: read ECONNRESET when connecting to LOGO! 0BA7

I'm trying to connect nodered to a Siemens LOGO! 0BA7 device with node-red-contrib-s7 library.
I already connected it with some LOGO! 0BA8 without any problem.
I'm simply trying to read first 16 bits of output (QW0), but it doesn't work and on the log file I read
Error connecting to PLC: Error: read ECONNRESET (no more info even setting console level to debug)
If I change the IP address of the configuration to that one of a 0BA8 device everything works seamlessly.
I can connect with the 0BA7 device with other libraries (such as snap7).
I'm using node-red V0.17.3 and node-red-contrib-s7 V1.3.0.

Can someone help me?

Selecting Debug for one Endpoint changes settings for other / all

So...there is a "Debug" selection (Default/On/Off) that can be selected in the Endpoint config node.
Ok, thing is that I have multiple config endpoints (multiple PLCs) and I just want to debug communication with one that is giving me problems. But....as soon as I select "On" for this config node, I get a lot of messages in the terminal...but not (or at least not only) for the selected config node, but for other ones too.

This doesn't seem to be the intended functionality, since each config node has its own setting.

Furthermore...is there any plan on supporting the node-red's "catch" node for issuing errors and messages ? At least for me it seems the errors are issued in the terminal only.

These two are maybe two separate issues but both deal with the same thing - debugging.

Behavior difference generating a loss of feature in 2.0.1

Hello !

We have been using 1.6.3 until now and there was a nice feature : it was possible to write multiple variables at once with this kind of code.
msg.variable=["id","desc","start","end"];
msg.payload=[ obj.id, obj.desc , obj.start ,obj.end];

The issue is that in new version, this code :
if (!writeObj.name) return;
has been replaced with this :
if (!node.endpoint.vars[writeObj.name]) {
node.error(RED.
("s7.error.varunknown", { var: writeObj.name }));
node.status(generateStatus('badvalues', statusVal));
return;
}

This is fine to check if one variable is correct but how can we send multiple variables at once now?
Would it be possible to handle writeObj.name being a string or an array of strings ?

Best regards.

s7-1200 with raspberry pi 2

Hello guys,

is this package working with raspberry pi? I installed this node and tried to communicate with s7-1200 but, ı couldn't send any data. connected LED which below of node is green during connected ethernet cable. But when I try send or receieve data, there is no action.

Could you help me please?

1.6.0 @ node-red v0.20.5 in docker container: extensive writing to log file

If I add just one variable to be read from the S7 an extensive logging to file starts with more than 20 lines per second such as
{"log":"[1542040,726948427 172.23.156.112 S2] SendReadPacket called\n","stream":"stdout","time":"2019-04-16T14:27:08.550057364Z"}
{"log":"[1542040,727169084 172.23.156.112 S2] Sending Read Packet\n","stream":"stdout","time":"2019-04-16T14:27:08.550175097Z"}

see file attached.
node-red-contrib-s7_1.6.0_logging.txt
=> Disk full and system blocked soon. Can you help?

Word Timer

Hello, I can not configure the days of the week (in the Timer) through WORD in my plc logo, I do not know which variable address to point.

Lot of Variables

Hi,

I tried to import Variables and their address in CSV file. there are approximativly 20 000 variables. it is possible with your node. because When I tried, your node Collect the data of 4 or 5 variables and there was not the correct result.
My question : what is the correct way to collect a large number of variable? I make a wireshark capture to see the packet and data send to plc for collecting.

Logging Issue

Hi,

nodeS7 library creates a lot of logs when using this node. I get 76 message a seconds and it's not going through nodered logging mecanism, I can't even filter out by critical or not.

Thanks

MArtin

Reading from Analog Network Ouputs

Firstly, thanks for making this! It has been a great help.

However, I can't seem to get any values from an analog network output. I can read digital just fine, and the node creates an object key for the analog variable but the values are always zero. Is this a limitation of this library or does the S7 protocol not support analog values?

periodic Bad Values

Hi
I have this project were we are using Node-Red to pull the Values out of a s7-300 plc.
Our variable list is:
db10,x0.0.300;VF5.Area100.Alarms
db10,x38.0.300;VF5.Area200.Alarms
db10,x190.0.300;VF5.Handeler.Alarms
db20,s0.13;VF5.OrderNumber
db50,x0.0;VF5.Area100.Started
db50,x0.1;VF5.Area100.SafeNotOk
db50,x0.2;VF5.Area100.AlarmActive
db50,x0.3;VF5.Area100.Delivered_Ok
db50,x0.4;VF5.Area100.Delivered_NotOk
db50,x46.0;VF5.Area200.Started
db50,x46.1;VF5.Area200.SafeNotOk
db50,x46.2;VF5.Area200.AlarmActive
db50,x46.3;VF5.Area200.Delivered_Ok

We then use these values to trigger a TCP message to a SQL Database.

But some times we have an error telling us that it has received bad values..

What could be the cause of this error.

Compatible with Logo 0ba8?

Hi,

is this node also compatible with the Siemens Logo 0ba8?
If so, what changes are necessary? How do I control virtual inputs of the logo?

Are there any instructions?

Many thanks for your help!

Problems accesing Sinamics parameter indexes simultaneously

I am reading Sinamics parameter values, but I am facing problems when trying to read at the same time the value of different indexes of a parameter. For example:

Parameter r2114 (System runtime total, type floating point 32) of the CU has two subindexes:

-0: Milliseconds

-1: Days

In this case, DB2114,DWORD1024 reads the milliseconds, and DB2114,DWORD1025 read the days.

If in the S7 node I configure one of them, does not matter which, it reads perfectly, but when I configure both of them it says ("Failure: Bad values").

I have been able to read different parameters simultaneously, the problem comes when I try to read the subindexes of the same parameter.

If I create two s7 endpoint connections, both with the same configuration, this is, only one physical connection and two s7-in nodes, one with CON1 (IP 169.254.11.22) and CON2 (IP 169.254.11.22), and configure DB2114,DWORD1024 in one, and DB2114,DWORD1025 in the other, I can read both. The problem is that some of the Sinamics parameters has 19 indexes, so, creating 19 different connection it is not a viable solution

No response from PLC with S7-1500

Hello

Problem
I have the problem that the node won't communicate with my PLC. It was working great on the S7-300 but on the S7-1500 I'm only getting the following error:

"No response from PLC, restarting communication"

The connection is working but it can't communicate with the PLC → No output or variables change.

Hardware/Software

  • S7-1500
  • SIMATIC IOT2000
  • NODE-RED v0.16.2
  • node-red-contrib-s7 v1.5.1

Thank you for your help!

connect to two S7-300 one is fine but the other show Error: read ECONNRESET

Hi All,

I need to connect with two S7-300.(IP Address is 192.168.0.100, and 192.168.0.200) in my device.
The strange thing is I can get data successfully from 192.169.0.200, but 192.168.0.100 showed "Error connecting to PLC: Error: read ECONNRESET".
All the setting are the same.
The only different thing is there is only one PC used WinCC Explorer connect with 192.168.0.200, but two PC used WinCC Explorer connect with 192.168.0.100.
I don't know is it anything related with connection resource or not.
Please kindly gibe me some suggestion.
Thank you very much for your help

"Error connecting to PLC: Error: connect EHOSTUNREACH"

Hello,

I've disconnected my LOGO8 from the network after some test but now my debug window is flooded with:
"Error connecting to PLC: Error: connect EHOSTUNREACH 192.168.1.101:102"

The debug option is set to off and i've disabled the flow.
I'm running version 1.5.1 and node-red v0.19.3

Please let me know if I have to provide more details.
Best regards Niklas

PS.
This is my first post :ba

Problem addressing bit in DataBlock

Hello there!

I am exploring this module in node-red and I am experiencing issues when I try to write a bit of a DataBlock (DB). I have my DB, which is DB5. There I have 2 Structs 'CONTROL' and 'SEÑALIZACION'. What I am trying to do is to change the value from B0, B1 and B2 within Control structure. I have tried all kinds of combination to create my variable in the PLC object in node-red. The best I got is to change the first bit when I set up my variable as DB5,B0. But I haven't been able to access another bits. I have tried DB5,B0.1, DB5,B0.X1, DB5,B0.%X1 and so on,
Images.zip
but I dont get to write where I want. Is there any suggestion, please?

Thank you in advance. Please find attached some printscreens to clarify my configuration.

Run flow_witeTest.json Error

Return follow Error after deploy flow_writeTest.json

TypeError: this is not a typed array.
at Function.from (native)
at NodeS7.onTCPConnect (/home/hh/.node-red/node_modules/nodes7/nodeS7.js:247:19)
at Socket. (/home/hh/.node-red/node_modules/nodes7/nodeS7.js:163:21)
at Socket.g (events.js:260:16)
at emitNone (events.js:67:13)
at Socket.emit (events.js:166:7)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1050:10)

node -v ==>v4.2.6
npm -v==>3.5.2
uname==>4.4.0-43-Microsoft

"Error connecting to PLC" disturbing on Node-RED debug window if too many

In my application, many PLC connections are deployed.
A large number of PLCs is regularly switched off => connection "offline". In this case, the large number of messages "Error connecting to PLC" floods the Node-RED debug window, however, which is not dependent on the flow but on the connections. Thus, messages from debug nodes cannot be read anymore by the user.

How about a debug option "Off and no connection errors" at the connection properties ?
(The info "online/connecting/offline" ist still visible as green/yellow/red indicator at the node.)

Connection keeps dropping when no variables are configured

When an endpoint is configured without any variables (e.g. when you want to validate if your connection settings are right), The connection is established, but the logs show that the connection keeps dropping:

29 Oct 11:50:44 - [info] Starting flows
29 Oct 11:50:44 - [info] Started flows
29 Oct 11:50:44 - [info] [s7 endpoint:4d6b761f.86ba18] Initiating connection to PLC
[11781,217660357] Initiate Called - Connecting to PLC with address and parameters:
[11781,217715100] { host: '192.168.15.211', port: '102', rack: '0', slot: '1' }
[11781,218881427] Connection cleanup is happening
[11781,218991828 192.168.15.211 S1] Clearing read PacketTimeouts
[11781,219063620 192.168.15.211 S1] Clearing write PacketTimeouts
[11781,219501763 192.168.15.211 S1] <initiating a new connection Mon Oct 29 2018 11:50:44 GMT-0300 (-03)>
[11781,219541389 192.168.15.211 S1] Attempting to connect to host...
[11781,224300581 192.168.15.211 S1] TCP Connection Established to 192.168.15.211 on port 102
[11781,224368516 192.168.15.211 S1] Will attempt ISO-on-TCP connection
[11781,224725072 192.168.15.211 S1] Using rack [0] and slot [1]
[11781,232378453 192.168.15.211 S1] ISO-on-TCP Connection Confirm Packet Received
[11781,288332707 192.168.15.211 S1] Received PDU Response - Proceeding with PDU 240 and 3 max parallel connections.
[11781,288871241] Translation OK
[11781,790707556 192.168.15.211 S1] Reading All Items (readAllItems was called)
[11781,791677224 192.168.15.211 S1] Adding or Removing { arg: [], action: 'add' }
[11781,792208897 192.168.15.211 S1] Adding 
[11781,793870781 192.168.15.211 S1] Calling SRP from RAI
[11781,794658986 192.168.15.211 S1] SendReadPacket called
29 Oct 11:50:51 - [warn] [s7 endpoint:4d6b761f.86ba18] No response from PLC, restarting communication
29 Oct 11:50:51 - [info] [s7 endpoint:4d6b761f.86ba18] Closing connection to PLC
[11787,307025893] We Caught a read/write error ECONNRESET - will DISCONNECT and attempt to reconnect.
[11787,307597669] ConnectionReset is happening
[11787,308262371] ConnectionReset is happening
29 Oct 11:50:51 - [info] [s7 endpoint:4d6b761f.86ba18] Initiating connection to PLC
[11787,309263433] Initiate Called - Connecting to PLC with address and parameters:
[11787,309359224] { host: '192.168.15.211', port: '102', rack: '0', slot: '1' }
[11787,309582364] Connection cleanup is happening
[11787,309682397 192.168.15.211 S1] Clearing read PacketTimeouts
[11787,309770658 192.168.15.211 S1] Clearing write PacketTimeouts
[11787,310069378 192.168.15.211 S1] <initiating a new connection Mon Oct 29 2018 11:50:51 GMT-0300 (-03)>
[11787,310145058 192.168.15.211 S1] Attempting to connect to host...

This is probably happening because we're calling readAllItems() without any configured variables. Maybe we can check if there are configured variables before performing the cyclic read process, so we can evict this kind of error.

Improvement: Ethernet devices

Hi,

I have a suggestion to improve the node configuration.
I need to include the select of ethernet device because there SBC with two or more interfaces!

Thanks a lot!

Uncaught Exception

hello,
i am currently using the S7 node. Lately, i run into uncaught exception, more specifically
i get the following somehow randomly

[red] Uncaught Exception:
TypeError: Cannot read property '0' of undefined
at bufferizeS7Item (/usr/lib/node_modules/node-red-contrib-s7/node_modules/nodes7/nodeS7.js:1921:55)
at NodeS7.prepareWritePacket (/usr/lib/node_modules/node-red-contrib-s7/node_modules/nodes7/nodeS7.js:665:3)
at NodeS7.writeItems (/usr/lib/node_modules/node-red-contrib-s7/node_modules/nodes7/nodeS7.js:455:7)
at writeNext (/usr/lib/node_modules/node-red-contrib-s7/red/s7.js:239:28)
at NodeS7.onWritten [as writeDoneCallback] (/usr/lib/node_modules/node-red-contrib-s7/red/s7.js:223:13)
at NodeS7.writeResponse (/usr/lib/node_modules/node-red-contrib-s7/node_modules/nodes7/nodeS7.js:1276:8)
at NodeS7.onResponse (/usr/lib/node_modules/node-red-contrib-s7/node_modules/nodes7/nodeS7.js:1186:10)
at Socket. (/usr/lib/node_modules/node-red-contrib-s7/node_modules/nodes7/nodeS7.js:390:20)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)

and node-red crashes..
do you have any ideas on how solve this?

s7-node: v 1.6.0
Node-RED version: v0.20.3
Node.js version: v6.9.2

Sending string

I'm trying to send a string from Node Red to my S-1200 CPU.
I have a DB configured with both real, bool and strings defined. Real and bool works og but strings give me an error.
21.1.2019, 13:29:38node: PLC
msg : error
"TypeError: "value" argument is out of bounds"

PLC node config:
image

My plc config:
image

My inject node for test:
image

What can be the issue here?

(node) warning: possible EventEmitter memory leak detected. 11 __ALL__ listeners added. Use emitter.setMaxListeners() to increase limit. Trace

Testing with 30 or more tags, this warning has been appeared to me:

(node) warning: possible EventEmitter memory leak detected. 11 __ALL__ listeners added. Use emitter.setMaxListeners() to increase limit.
Trace
    at S7Endpoint.addListener (events.js:239:17)
    at S7Endpoint.Node.on (/usr/lib/node_modules/node-red/red/runtime/nodes/Node.js:80:14)
    at new S7In (/usr/lib/node_modules/node-red-contrib-s7/red/s7.js:281:35)
    at createNode (/usr/lib/node_modules/node-red/red/runtime/nodes/flows/Flow.js:302:18)
    at Flow.start (/usr/lib/node_modules/node-red/red/runtime/nodes/flows/Flow.js:87:35)
    at start (/usr/lib/node_modules/node-red/red/runtime/nodes/flows/index.js:264:29)
    at /usr/lib/node_modules/node-red/red/runtime/nodes/flows/index.js:121:25
    at tryCatchReject (/usr/lib/node_modules/node-red/node_modules/when/lib/makePromise.js:845:30)
    at runContinuation1 (/usr/lib/node_modules/node-red/node_modules/when/lib/makePromise.js:804:4)
    at Fulfilled.when (/usr/lib/node_modules/node-red/node_modules/when/lib/makePromise.js:592:4)
    at Pending.run (/usr/lib/node_modules/node-red/node_modules/when/lib/makePromise.js:483:13)
    at Scheduler._drain (/usr/lib/node_modules/node-red/node_modules/when/lib/Scheduler.js:62:19)
    at Scheduler.drain (/usr/lib/node_modules/node-red/node_modules/when/lib/Scheduler.js:27:9)
    at doNTCallback0 (node.js:419:9)
    at process._tickCallback (node.js:348:13)

Anyone have an idea about this ?

Large number of variables

Hi all,

We are having issues with NodeRed grinding to a halt when querying a large number of variables from the PLC. The variables are imported from a CSV. Is there a 'correct' method for handling large numbers of variables?

Thanks.

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.