Closed rnaus closed 9 years ago
You know that this is a package for https://nodejs.org/ runtime and not a browser library?
I install nodejs. But I don't know where I can try your example.
Ok, put the example in the folder where you ran npm install node-snap7
and then execute the example with node example.js
in the command line. Remeber to change the IP address to the one from your PLC.
ok, script is working. But connection is fault. I tried ping - it si ok. Message is Connection failed Code #665420 - ISO: An error occured during recv TCP: Connection timeout.
I think that I made wrong number slot. Now is answer <Buffer 00>.
answer is "Buffer 00"
Look at https://github.com/mathiask88/node-snap7#connect-to and make sure rack
and slot
is correct.
Edit: Ah I see, you found it :)
ok, thank you for our answers.
your - :-)
Can you please tell everybody what you have changed in order to get it to work properly?
Hello, I'm beginner in Javascript. I found library Node-snap7 to connect to PLC Siemens S7 and I want to use it in my simple programm in Javascript. I made instalation throught npm install node-snap7 with this result :
I'm not sure that installation is correct. I tried to use example (I made file.js and I tried Open)
but in line
var snap7 = require ('node-snap7');.....
I have error message Microsoft JScript runtime error code 800A138F, object expected. Can you help me ?Radek