Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Listen to Siemens PLC #21

Open
sn0opr opened this issue Dec 21, 2016 · 9 comments
Open

Listen to Siemens PLC #21

sn0opr opened this issue Dec 21, 2016 · 9 comments

Comments

@sn0opr
Copy link

sn0opr commented Dec 21, 2016

Is there a way to keep listening to Siemens PLC and trigger an event when data is received?

What I want is, instead of running a ReadArea function every 100ms, I want to keep listening to Siemens PLC and wait for data that he send.

@mathiask88
Copy link
Owner

I think what you are searching for is the Partner model, but this is not yet implemented in node-snap7.

@sn0opr
Copy link
Author

sn0opr commented Dec 22, 2016

@mathiask88 thank you, is there any plans to implement it, and when?

What we are doing now, is using the ReadArea every 100 milliseconds using the setTimeout() function recursively after every callback, and it works for what we need, but is there any risk to get bad results, like hight CPU/Memory usage in the SIMATIC S7-1500, because in the client side (nodejs program) I get 0.7% CPU usage, that's acceptable...

@mathiask88
Copy link
Owner

Yes there are plans to implement the partner but i can't tell you any date because this is a free time project. I recently added the server functionality but it is not yet released on npm.
There should be no risk to poll the PLC because u can set the communication ressources used by the PLC cpu in TIA. I got a project where I poll the PLC nonstop and there are no issues.

@sn0opr
Copy link
Author

sn0opr commented Dec 23, 2016

ok @mathiask88, thank you.

@teropes
Copy link

teropes commented Mar 16, 2017

Old thread already, but giving here my experiences with polling S7-400 and S7-1500 series. Latest project I have been working with we had 4 clients with node-snap7 connected to our S7-1500. One is "plc-poller" ticking with 500ms cycle time, reading some DB and parsing around 3500 signals out of it. Other three are running other tasks including reading and writing to plc with 1000ms cycle time.

So far I have seen no issues with the S7 CPU or our node processes lagging or failing reads / writes, it has been robust. The plc-poller process actually spends most of its cpu cycles parsing and handling the signals from the Buffer and doing other stuff with it.

@mathiask88
Copy link
Owner

Cool, I'm glad to hear that node-snap7 performs well for you. Being robust is very important for this type of software and I'm happy that it is.

I will try to implement the partner as well in the coming months. And the server needs some small fixes and testing. I also got a prebuild feature near completion so that windows, mac and linux will download prebuilt binaries instead of compiling.

@SherryHolmes
Copy link

Cool, I'm glad to hear that node-snap7 performs well for you. Being robust is very important for this type of software and I'm happy that it is.

I will try to implement the partner as well in the coming months. And the server needs some small fixes and testing. I also got a prebuild feature near completion so that windows, mac and linux will download prebuilt binaries instead of compiling.

Do you support reading and writing of DB blocks for s7-1200?Test finds read and write DB block failed
#36700160 - CLI : function refused by CPU (Unknown error)

@anthrogan
Copy link

@SherryHolmes do you have put/get enabled on the 1200?

@mathiask88
Copy link
Owner

Please have a look at the compatibility table mentioned in the About section

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants