node-snap7-micro-client
Current node-snap7 version: 1.0.3
Current snap7 version: 1.4.2
About
This is a node.js wrapper for snap7. Snap7 is an open source, 32/64 bit, multi-platform Ethernet communication suite for interfacing natively with Siemens S7 PLCs (See compatibility).
Installation
Install with:
npm install node-snap7
node-snap7 uses prebuild
and prebuild-install
for handling prebuilt binaries. See this list of supported prebuilt platform binaries. When installing node-snap7 prebuild-install
will install prebuilt binaries from GitHub if they exist and fallback to a compile step if they don't.
If you don't want to use the prebuild
for the platform you are installing on, specify the --build-from-source
flag when you install.
For building from source you need the following requirements:
- Windows:
- Linux:
- C++11 toolchain
- Python 2.7
Special thanks to
- Davide Nardella for creating snap7
How to use
API
Client Example
var snap7 = ; var s7client = ;s7client;
Server Example
var snap7 = ; var s7server = ; // Set up event listeners7server; // Create a new Buffer and register it to the server as DB1var db1 = 100;s7server; // Start the servers7server; // Close the server after 20s in this example;
Have a look at the resourceless server example here.
License & copyright
Copyright (c) 2019, Mathias Küsel
node-snap7 is licensed under the MIT license. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE file for more details.
node-snap7 builds on the excellent work of the snap7 framework from Davide Nardella. Snap7 is issued under the GPL/LGPLv3 (see ./deps/snap7/gpl.txt ./deps/snap7/lgpl-3.0.txt
).