Node-red-contrib-s7 node not working in simatic IOT2040

I am trying to establish a connection between node red and s7 1200. The node red is running on Simatic IOT 2040 the image version/OS version I am using for the IOT 2040 is 2.6.1.
I have changed the ethernet port setting to enable internet and connection with S7-1200.
eth0: dhcp
eth1: 192.168.200.5 (to communicate with S7 1200)
Next I started the node red service and installed node-red-contrib-s7 node. The installation was successful.
After the installation I configured the S7 in node to get data from the PLC (S7-1200) and while deploying the node red server crashed.
I checked the log file and I got the below error.

2 Dec 05:59:40 - [red] Uncaught Exception:
2 Dec 05:59:40 - TypeError: stream.off is not a function
at ISOOnTCPClient.isoOnTcp.createConnection (/usr/lib/node_modules/node-red-contrib-s7/node_modules/@st-one-io/nodes7/src/s7endpoint.js:207:24)
at Object.onceWrapper (events.js:313:30)
at emitNone (events.js:106:13)
at ISOOnTCPClient.emit (events.js:208:7)
at process.nextTick (/usr/lib/node_modules/node-red-contrib-s7/node_modules/iso-on-tcp/src/client.js:193:45)
at _combinedTickCallback (internal/process/next_tick.js:132:7)
at process._tickCallback (internal/process/next_tick.js:181:9)

Welcome to the forum.

Can you post the full startup log up to the failure please.

7 Dec 06:20:31 - [info] Starting flows
7 Dec 06:20:32 - [info] Started flows
7 Dec 06:20:32 - [red] Uncaught Exception:
7 Dec 06:20:32 - TypeError: stream.off is not a function
at ISOOnTCPClient.isoOnTcp.createConnection (/home/root/.node-red/node_modules/@st-one-io/nodes7/src/s7endpoint.js:207:24)
at Object.onceWrapper (events.js:313:30)
at emitNone (events.js:106:13)
at ISOOnTCPClient.emit (events.js:208:7)
at process.nextTick (/home/root/.node-red/node_modules/iso-on-tcp/src/client.js:193:45)
at _combinedTickCallback (internal/process/next_tick.js:132:7)
at process._tickCallback (internal/process/next_tick.js:181:9)

You should make it a habit of checking the node's GitHub page for issues (both open and closed). If you had, you would have found this: https://github.com/st-one-io/node-red-contrib-s7/issues/82

@SukantaBagani you did not post full start up log as requested by @Colin - the point was to see what nodejs version, what node-red version etc.

To add to what @zenofmud is saying, you probably have nodejs < V10. The latest update to the s7 node REQUIRES nodejs V10 (or greater) as mentioned by the author in the last response on link he posted.

And as you have the IOT2040 box, this is not going to be easy. I am fairly certain there are a few unhappy owners of that product as it looks like (on last read up) siemens are not updating their FW image above nodejs v8 due to architectural choice issues.

Your options include purchasing a cheap Raspberry PI and removing the shackles that box imposes. If you need industrialised product, there are many off the shelf industrialised Raspberry PI based products.

As it stands, Node v8 is EOL and you now have an obsolescence issue.

References:

IOT2040 are discontinued next time.

Useful info - thanks.

Is there a direct replacement the OP can purchase?

Any idea on cost or functionality VS an (industrialised) Raspberry PI?

What do you mean by next time?

Search in IOT2040 siemens forum for IOT2040 -> End of Life.
Intel has discontinued the Quark cpu.
There is a new model IOT2050 aviable, but much more expensive.
Kunbus has a new product Revpi compact. Its an industrial raspberry pi.

1 Like

Hello @SukantaBagani
I work with a IOT2040 and the OS 2.6.1 from Siemens
Node-Red version : v0.20.7
Nodejs version : v8.16.0

I connect Node-Red to a Siemens S7-1500.
See my configuration if that can help you :

The current version of the S7 node is no longer supported by IoT 2040, specially because of the NodeJS version.
You may try an older version of the S7 Node, or you can also go with an ST-One (which is the official hardware developed to run the S7 node).

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.