UNPKG

@kenke7/node-red-contrib-modbus

Version:

The all in one Modbus TCP and Serial contribution package for Node-RED.

370 lines (285 loc) 16.7 kB
<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width"> <title>Documentation Index</title> <!--[if lt IE 9]> <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script> <![endif]--> <link type="text/css" rel="stylesheet" href="styles/sunlight.default.css"> <link type="text/css" rel="stylesheet" href="styles/site.cerulean.css"> </head> <body> <div class="navbar navbar-default navbar-fixed-top "> <div class="container"> <div class="navbar-header"> <a class="navbar-brand" href="index.html">Documentation</a> <button class="navbar-toggle" type="button" data-toggle="collapse" data-target="#topNavigation"> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> </div> <div class="navbar-collapse collapse" id="topNavigation"> <ul class="nav navbar-nav"> <li class="dropdown"> <a href="modules.list.html" class="dropdown-toggle" data-toggle="dropdown">Modules<b class="caret"></b></a> <ul class="dropdown-menu "> <li><a href="module-NodeRedModbusBasics.html">NodeRedModbusBasics</a></li><li><a href="module-NodeRedModbusClient.html">NodeRedModbusClient</a></li><li><a href="module-NodeRedModbusFlexFc.html">NodeRedModbusFlexFc</a></li><li><a href="module-NodeRedModbusFlexGetter.html">NodeRedModbusFlexGetter</a></li><li><a href="module-NodeRedModbusFlexSequencer.html">NodeRedModbusFlexSequencer</a></li><li><a href="module-NodeRedModbusFlexWrite.html">NodeRedModbusFlexWrite</a></li><li><a href="module-NodeRedModbusGetter.html">NodeRedModbusGetter</a></li><li><a href="module-NodeRedModbusRead.html">NodeRedModbusRead</a></li><li><a href="module-NodeRedModbusResponse.html">NodeRedModbusResponse</a></li><li><a href="module-NodeRedModbusServer.html">NodeRedModbusServer</a></li><li><a href="module-NodeRedModbusWrite.html">NodeRedModbusWrite</a></li> </ul> </li> </ul> <div class="col-sm-3 col-md-3"> <form class="navbar-form" role="search"> <div class="input-group"> <input type="text" class="form-control" placeholder="Search" name="q" id="search-input"> <div class="input-group-btn"> <button class="btn btn-default" id="search-submit"><i class="glyphicon glyphicon-search"></i></button> </div> </div> </form> </div> </div> </div> </div> <div class="container" id="toc-content"> <div class="row"> <div class="col-md-8"> <div id="main"> <section class="readme-section"> <article><p><img src="http://b.repl.ca/v1/Platform-Node--RED-red.png" alt="Platform Node-RED"> <img src="http://b.repl.ca/v1/Contribution-Modbus-orange.png" alt="Contribution Modbus"> <a href="https://opencollective.com/node-red-contrib-modbus"><img src="https://opencollective.com/node-red-contrib-modbus/all/badge.svg?label=financial+contributors" alt="Financial Contributors on Open Collective"></a> <a href="https://www.npmjs.com/package/node-red-contrib-modbus"><img src="https://badge.fury.io/js/node-red-contrib-modbus.png" alt="NPM version"></a> <img src="http://b.repl.ca/v1/JS_Source-ES2019-yellow.png" alt="ES_Sourdce_Version"> <img src="http://b.repl.ca/v1/JS_Deploy-ES2015-yellow.png" alt="ES_Deploy_Version"> <img src="http://b.repl.ca/v1/NodeJS-LTS-green.png" alt="NodeJS_Version"> <a href="http://standardjs.com/"><img src="https://img.shields.io/badge/code%20style-standard-brightgreen.svg" alt="Standard - JavaScript Style Guide"></a> <a href="https://npm-stat.com/charts.html?package=node-red-contrib-modbus"><img src="https://img.shields.io/npm/dm/node-red-contrib-modbus.svg" alt="NPM download"></a> <a href="https://github.com/BiancoRoyal/node-red-contrib-modbus/actions/workflows/build.yml"><img src="https://github.com/BiancoRoyal/node-red-contrib-modbus/actions/workflows/build.yml/badge.svg" alt="Build and publish"></a> <a href="https://www.codacy.com/gh/BiancoRoyal/node-red-contrib-modbus?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=BiancoRoyal/node-red-contrib-modbus&amp;utm_campaign=Badge_Grade"><img src="https://api.codacy.com/project/badge/Grade/6cbeb40ab5604b3ab99e6badc9469e8a" alt="Codacy Badge"></a> <a href="https://gitpod.io/#https://github.com/BiancoRoyal/node-red-contrib-modbus"><img src="https://img.shields.io/badge/Gitpod-ready--to--code-blue?logo=gitpod" alt="Gitpod Ready-to-Code"></a></p> <h1>node-red-contrib-modbus</h1> <h3>The all-in-one Modbus TCP and Serial contribution package for Node-RED</h3> <p><a href="https://www.npmjs.com/package/node-red-contrib-modbus"><img src="images/modbus-icon64.png" alt="nodemodbus64"></a></p> <h2>International IIoT Website for Node-RED</h2> <p>For an international area, <a href="https://iniationware.com/">Iniationware</a> has provided the <a href="https://www.noderedplus.de/">PLUS for Node-RED International</a> website.</p> <h2>IIoT Webseite Deutschland für Node-RED</h2> <p>Für einen deutschsprachigen Bereich hat <a href="https://iniationware.com/">Iniationware</a> die Webseite <a href="https://www.noderedplus.de/de/">PLUS for Node-RED Germany</a> bereitgestellt.</p> <h2>Contribution Information</h2> <p><a href="https://nodered.org">Node-RED</a> contribution package for <a href="http://www.modbus.org/">Modbus</a> version overview:</p> <p>Based on <a href="https://www.npmjs.com/package/modbus-serial">modbus-serial</a> with TCP, C701, Telnet, Serial, RTU buffered, and ASCII</p> <ul> <li>stress tested with Node-RED v1.0.4 and Node.js LTS</li> <li>works with queueing per unit and round robin scheduling</li> </ul> <p>Node-RED v3.x versions:</p> <ul> <li>Node.JS 18.x will be supported with v5.22+</li> <li>Node.JS 16.x will be supported with v5.22+</li> </ul> <p>Node-RED v2.x versions:</p> <ul> <li>Node.JS 18.x will be supported with v5.22+</li> <li>Node.JS 16.x will be supported with v5.20+</li> <li>Node.JS 14.x is supported with v5.14+</li> <li>Node.JS 12.x is supported with v5.x</li> </ul> <p>Node-RED v1.x versions:</p> <ul> <li>Node.JS 14.x is supported with v5.14.+</li> <li>Node.JS 12.x is supported with v5.x</li> <li>Node.JS 10.x is supported with v5.x</li> </ul> <p>Node-RED v0.x versions:</p> <ul> <li>Node.JS 10.x is supported with v4.x</li> <li>Node.JS 8.x is supported with v3.x</li> <li>Node.JS 6.x is supported with v2.x</li> <li>Node.JS 4.x is supported with v1.x</li> </ul> <p>If you like that contributor's package for Modbus, then please <strong>give us your star at <a href="https://github.com/BiancoRoyal/node-red-contrib-modbus">GitHub</a></strong> !</p> <h2>Install</h2> <p>Run the following command in the root directory of your Node-RED install</p> <pre><code>npm install node-red-contrib-modbus </code></pre> <p>Run the following command for global install</p> <pre><code>npm install -g node-red-contrib-modbus </code></pre> <p>try these options on npm install to build, if you have problems to install</p> <pre><code>--unsafe-perm --build-from-source </code></pre> <h3>modbus-serial, serialport and jsmodbus</h3> <p>The <a href="https://www.npmjs.com/package/serialport">serialport</a> optional dependency is just to list all ports on your system in the client configuration. It is not the <a href="https://www.npmjs.com/package/serialport">serialport</a> version to work with Modbus at runtime. For that check the <a href="https://www.npmjs.com/package/modbus-serial">modbus-serial</a> or <a href="https://www.npmjs.com/package/jsmodbus">jsmodbus</a> package.json, please! The <a href="https://www.npmjs.com/package/modbus-serial">modbus-serial</a> supports and works for TCP connections in that package, too. The <a href="https://www.npmjs.com/package/jsmodbus">jsmodbus</a> package is just to provide a simple Modbus Server node. All Modbus commands running on <a href="https://www.npmjs.com/package/modbus-serial">modbus-serial</a>.</p> <h3>TCP or Serial testing</h3> <p>If you get in trouble <em>with TCP</em> connections, then check and test with just <a href="https://www.npmjs.com/package/modbus-serial">modbus-serial</a> first, please!</p> <p>If you get in trouble <em>with Serial</em> connections, then check with just <a href="https://www.npmjs.com/package/serialport">serialport</a> first, please!</p> <h2>Update/Upgrade/Downgrade</h2> <p>To update the dependencies or the whole package, you have just to install again.</p> <pre><code>npm show node-red-contrib-modbus@* version </code></pre> <p>To get a special version please set the version with @M.M.F:</p> <pre><code>npm install node-red-contrib-modbus@3.6.1 </code></pre> <p>or global by</p> <pre><code>npm install -g node-red-contrib-modbus@3.6.1 </code></pre> <h2>How to use</h2> <ul> <li>see <a href="https://github.com/BiancoRoyal/node-red-contrib-modbus/wiki/DEBUG">Wiki</a> pages</li> <li>use the <a href="https://flows.nodered.org/flow/bf06a87e84395e4bce276714c6f5f884">Flow example</a> to see how it works ...</li> <li>see <a href="http://bit.ly/2jzwjqP">YouTube Playlist</a></li> </ul> <p><img src="images/Screenshot01V210.png" alt="Flow Example"></p> <h2>Errors</h2> <p>Since v5.22+ the package will catch network and other errors of the client and server node. That means, you have to handle the error status of the node and Node-RED should not crash in the handled cases.</p> <h2>Debug</h2> <p>Debug will be activated by starting Node-RED with debug mode:</p> <pre><code>DEBUG=contribModbus*,modbus-serial node-red -v or DEBUG=contribModbus:{option},contribModbus:{option},... </code></pre> <p>see <a href="https://github.com/BiancoRoyal/node-red-contrib-modbus/wiki/DEBUG">Wiki</a> pages to get more options in detail</p> <h2>Contributing</h2> <p>Let's work together! Contributors are welcome. Please, fork the repo and send your pull requests from your repo to our develop branch or open issues while you're testing!</p> <h2>For Developers</h2> <p>See the scripts of the package and the additional Shell scripts to clean, update, or upgrade this NPM package.</p> <ul> <li>dev-link (local testing with Node-RED)</li> <li>testing (unit, integration)</li> <li>coverage</li> <li>docs generation</li> <li>standard-version alpha, beta, release</li> <li>git-flow</li> </ul> <h2>For Testers</h2> <p>Report issues, share your experiences, record tutorials, write Wiki articles and Blogs to share more about this package, please!</p> <h2>Authors</h2> <p>since April 2016 by <a href="https://github.com/biancode">Klaus Landsdorf</a> and Community Driven</p> <h3>History</h3> <ul> <li>contribution since 2016 by <a href="https://github.com/BiancoRoyal/node-red-contrib-modbus/graphs/contributors">Contributors</a></li> <li>license changed in 2016 by <a href="https://github.com/jayharper">Jason D. Harper</a></li> <li>started in early 2015 by <a href="https://github.com/mikakaraila">Mika Karaila</a></li> </ul> <h2>Contributors</h2> <h3>Code Contributors</h3> <p>This project exists thanks to all the people who contribute. [<a href="CONTRIBUTING.md">Contribute</a>]. <a href="https://github.com/BiancoRoyal/node-red-contrib-modbus/graphs/contributors"><img src="https://opencollective.com/node-red-contrib-modbus/contributors.svg?width=890&button=false" /></a></p> <h3>Financial Contributors</h3> <p>Become a financial contributor and help us sustain our community. [<a href="https://opencollective.com/node-red-contrib-modbus/contribute">Contribute</a>]</p> <h4>Individuals</h4> <p><a href="https://opencollective.com/node-red-contrib-modbus"><img src="https://opencollective.com/node-red-contrib-modbus/individuals.svg?width=890"></a></p> <h4>Organizations</h4> <p>Support this project with your organization. Your logo will show up here with a link to your website. [<a href="https://opencollective.com/node-red-contrib-modbus/contribute">Contribute</a>]</p> <p><a href="https://opencollective.com/node-red-contrib-modbus/organization/0/website"><img src="https://opencollective.com/node-red-contrib-modbus/organization/0/avatar.svg"></a> <a href="https://opencollective.com/node-red-contrib-modbus/organization/1/website"><img src="https://opencollective.com/node-red-contrib-modbus/organization/1/avatar.svg"></a> <a href="https://opencollective.com/node-red-contrib-modbus/organization/2/website"><img src="https://opencollective.com/node-red-contrib-modbus/organization/2/avatar.svg"></a> <a href="https://opencollective.com/node-red-contrib-modbus/organization/3/website"><img src="https://opencollective.com/node-red-contrib-modbus/organization/3/avatar.svg"></a> <a href="https://opencollective.com/node-red-contrib-modbus/organization/4/website"><img src="https://opencollective.com/node-red-contrib-modbus/organization/4/avatar.svg"></a> <a href="https://opencollective.com/node-red-contrib-modbus/organization/5/website"><img src="https://opencollective.com/node-red-contrib-modbus/organization/5/avatar.svg"></a> <a href="https://opencollective.com/node-red-contrib-modbus/organization/6/website"><img src="https://opencollective.com/node-red-contrib-modbus/organization/6/avatar.svg"></a> <a href="https://opencollective.com/node-red-contrib-modbus/organization/7/website"><img src="https://opencollective.com/node-red-contrib-modbus/organization/7/avatar.svg"></a> <a href="https://opencollective.com/node-red-contrib-modbus/organization/8/website"><img src="https://opencollective.com/node-red-contrib-modbus/organization/8/avatar.svg"></a> <a href="https://opencollective.com/node-red-contrib-modbus/organization/9/website"><img src="https://opencollective.com/node-red-contrib-modbus/organization/9/avatar.svg"></a></p></article> </section> </div> </div> <div class="clearfix"></div> <div class="col-md-3"> <div id="toc" class="col-md-3 hidden-xs hidden-sm hidden-md"></div> </div> </div> </div> <div class="modal fade" id="searchResults"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button> <h4 class="modal-title">Search results</h4> </div> <div class="modal-body"></div> <div class="modal-footer"> <button type="button" class="btn btn-default" data-dismiss="modal">Close</button> </div> </div><!-- /.modal-content --> </div><!-- /.modal-dialog --> </div> <footer> <span class="jsdoc-message"> Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.11</a> on December 20th 2023, 11:03:56 pm using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>. </span> </footer> <script src="scripts/docstrap.lib.js"></script> <script src="scripts/toc.js"></script> <script type="text/javascript" src="scripts/fulltext-search-ui.js"></script> <script> $( function () { $( "[id*='$']" ).each( function () { var $this = $( this ); $this.attr( "id", $this.attr( "id" ).replace( "$", "__" ) ); } ); $( ".tutorial-section pre, .readme-section pre, pre.prettyprint.source" ).each( function () { var $this = $( this ); var example = $this.find( "code" ); exampleText = example.html(); var lang = /{@lang (.*?)}/.exec( exampleText ); if ( lang && lang[1] ) { exampleText = exampleText.replace( lang[0], "" ); example.html( exampleText ); lang = lang[1]; } else { var langClassMatch = example.parent()[0].className.match(/lang\-(\S+)/); lang = langClassMatch ? langClassMatch[1] : "javascript"; } if ( lang ) { $this .addClass( "sunlight-highlight-" + lang ) .addClass( "linenums" ) .html( example.html() ); } } ); Sunlight.highlightAll( { lineNumbers : true, showMenu : true, enableDoclinks : true } ); $.catchAnchorLinks( { navbarOffset: 10 } ); $( "#toc" ).toc( { anchorName : function ( i, heading, prefix ) { return $( heading ).attr( "id" ) || ( prefix + i ); }, selectors : "#toc-content h1,#toc-content h2,#toc-content h3,#toc-content h4", showAndHide : false, smoothScrolling: true } ); $( "#main span[id^='toc']" ).addClass( "toc-shim" ); $( '.dropdown-toggle' ).dropdown(); $( "table" ).each( function () { var $this = $( this ); $this.addClass('table'); } ); } ); </script> <!--Navigation and Symbol Display--> <!--Google Analytics--> <script type="text/javascript"> $(document).ready(function() { SearcherDisplay.init(); }); </script> </body> </html>