Comments (4)
My only concern with the second method is the situations where it might not auto-reconnect. For example, when connecting to an IBH or Hemholz netlink, a connection error connecting to a certain slot may mean the PLC at that MPI address (since the slot can map to MPI addresses) and we rely on nodeS7 to auto-reconnect in those situations without pushing that connection monitoring work to the application that uses it. Same with the IP address - it's hard to know whether the IP address is wrong or if the PLC just isn't reachable at the time, but we rely on it auto-connecting either way. How would your code work in these situations, and how would that work with your module?
from nodes7.
Same with the IP address - it's hard to know whether the IP address is wrong or if the PLC just isn't reachable at the time
As far as I can test here, currently it won't reconnect if the IP address is not reachable, and that's why I thought the second option would be more in sync to the current behavior. But maybe it's the case we have to change this too, then, and implement the first fix for it. Right now I handle this case on my implementation (by trying to reconnect when the callback returns with an error)
In any case, I can handle both, as far as the behavior is always consistent.
from nodes7.
After some loong time, I could finally come back to this. I've created a PR (#73) implementing the first solution, as it's safer in the way we have much less chance of breaking somebody's code by changing behavior.
@plcpeople if you're ok with that, you can merge the PR and publish it :)
from nodes7.
@plcpeople could you publish it on npm, please? You're the one with powers for that :)
from nodes7.
Related Issues (20)
- Question: How to check the connection status?
- force output to activate a relay HOT 1
- Not working with nuxt HOT 1
- Need help for tags / address associations G120C drive HOT 12
- [Question] Read boolean value from DB HOT 1
- boolen write problem ??? HOT 11
- Read single item HOT 3
- Address conversion HOT 1
- TCP ECCONRESET HOT 11
- ECONNRESET Nodered HOT 1
- Reading big offsets
- readAllItems and writeItems stopped when is waiting HOT 1
- support for 64 bit data type
- Server functionality
- ISOonTCP RFC 1006 telergrams
- Reading NC Variables from Sinumerik 840d
- Optimized block access HOT 1
- I want to know how to use the 'values' to vue component's data HOT 1
- Tries to connect to a PLC with wrong IP address, never returns error, always tries to reconnect
- Question: MPI over Serial HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nodes7.