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

List of possible Errors! #65

Closed
flacohenao opened this issue Apr 28, 2020 · 2 comments
Closed

List of possible Errors! #65

flacohenao opened this issue Apr 28, 2020 · 2 comments

Comments

@flacohenao
Copy link

I understand that all the errors that the client/server emits, are being reported and we can log them out.

I.E. Connection failed. Code #665420 - ISO : An error occurred during recv TCP : Connection timed out

But... for being more user friendly with those errors, can you provide a list of the posible codes that we can find and what do they mean?

@mathiask88
Copy link
Owner

You can have a look into the Snap7 documentation, because this is a wrapper for that library. There you will find this description
image

ISO error codes
https://github.com/mathiask88/node-snap7/blob/master/src/snap7.h#L181-L195
S7Client error codes
https://github.com/mathiask88/node-snap7/blob/master/src/snap7.h#L234-L271
S7Server error codes
https://github.com/mathiask88/node-snap7/blob/master/src/snap7.h#L546-L553

These codes are also populated on a client/server instance

const snap7 = require('node-snap7');

const s7client = new snap7.S7Client();
console.log(s7client.errCliInvalidPlcAnswer)

The ErrorText() function demasks this error code composition and returns a textual representation of each field (S7/ISO/TCP)

@flacohenao
Copy link
Author

Thank you!!!

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

No branches or pull requests

2 participants