Closed timo-plc closed 6 years ago
The problem with browserify is there are a lot of things that will run on node.js that can't be run in a browser due to limitations of the browser in general, and this is one of them. NodeS7 creates a TCP connection to the PLC using the node.js net module, and this can't be done in the browser at all as the API does not exist for it.
To connect a website with a PLC using nodeS7 (or any other package I am aware of) you still need to write a basic server application in node.js, and then pass PLC data using socket.io or some other type of polling, unless you just want the value to update every time the page loads.
I would suggest starting from a simple example like https://socket.io/get-started/chat/ and modifying to include nodeS7 and to send data.
Thanks for your Help and your tips
hey, I'm still a beginner in programming but have become accustomed to it
I would like to use nodes7 to connect a website with a plc.
If someone has a better Idea I am happy about every suggestion.
what I've done so far: Installation of node, browserify and the modules create a file with browserify and integrate it into my website