1.0.0 • Published 10 months ago

smithtek-node-red-tools v1.0.0

Weekly downloads
4
License
GPL-3.0+
Repository
-
Last release
10 months ago

Smithtek-node-red-tools

Install • Using node red palate manager, search for “smithtek-node-red-tools” • Using cmd line, type npm install smithtek-node-red-tools

Usage These tools are intended to be used with Smithtek products or any hardware devices that have inputs and outputs. The nodes provide some simple logic to control the flow of commands. If using a Modbus device then it is recommended to use the “node-red-contrib-modbus nodes.” The main design scope for these nodes was to interface with the Smithtek MAKO V1 PlC. Contents • Analog input • Digital input • FlipFlop • Thermocouple input • Splitter

  1. Analog input Reading an analog input from the mako using “node-red-contrib-modbus” the payload value will be in an array. For users who cannot code, this node will convert the value to a number. ##inputs Connect the output of a modbus read node or Modbus Getter node to the input of the Mako analog node. The modbus settings must look similar to the following example. Step 1 FC 4 : Read Input Registers Step 2 FC 4 : Address between 0 - 65535 Step 3 FC 4 : Quantity = 1 Step 4 FC 4 : Poll time

##outputs The payload is numeric value received from the Mako PLC. There are 4 x Analog inputs on the Mako.You can create as many virtual analog addresses in the Mako programming software, V Builder. Example To read input 1 you would use settings Step 1 FC 4 : Read Input Registers Step 2 FC 4 : Address 0 Step 3 FC 4 : Quantity = 1 Step 4 FC 4 : Poll time

Best practice to use the "Modbus Getter node" Using the Modbus Getter can give you control on how often you want to read the channel by injecting the input pin with any message. You can also use the analog input node to read any modbus "Input register" or "Holding register" created in the Mako. This is good for reading setpoints, timers, counters,.

  1. Digital input Reading a digital input from the mako using “node-red-contrib-modbus” the payload value will be in an 8bit buffer array, “true” or “False” reading digital input 1 from the Mako will return the buffer array with 6 elements. Use the digital input node to split the buffer and output each element to an output pin. The payload will be “True” or “False”

##inputs Connect the output of a modbus read node or Modbus Getter node to the input of the Mako Multi-Digital-input node. The modbus settings must look similar to the following example. Step 1 FC 4 : Read Input Registers Step 2 FC 4 : Address between 0 - 65535 Step 3 FC 4 : Quantity = 0 - 6 Step 4 FC 4 : Poll time

##outputs The output payload will be a 1 or 0 for the triggered input channel. 1 = true input on and 0 = false input off

There are 6 physical digital inputs on the mako. You can create as many virtual digital Input addresses in the Mako programming software, V Builder as required. When you deploy the Digital input node it will automatically configure the 6 output pins. This by default means it is ready to read all 6 digital inputs on the Mako. You can select less output pins by changing "Number of Channels" in the node properties. To read 6 channels you must configure the Modbus Getter Module.

Its best to use the "Modbus Getter node" Using the Modbus Getter will give you control on how often you want to read the channel by injecting the input pin. You can also use the Multi-Digital-Input node to read any digital modbus "Input status" created in the Mako. this is good for reading setpoints, timers, counters,

  1. FlipFlop. The flip flop node pulses a "on" "off" signal to nodes wired direct to the output pin. An example use case would be to activate a physical pulse relay, trigger a roller door, pulse the direction of a motor or pump, activate pilot lamps on switchboards. When the node receives any payload it sends a Bool True then a Bool False

##inputs The input pin can receive any message to activate the pulse output.

##Outputs The output pin will first send a Bool True followed by a Bool False

##Settings There are two setting properties. Time on Time Off Time delay for pulse on and time delay for pulse off. The time setting property is in ms. Example : Time on = 2000 and time off = 4000. When the node receives a payload it will wait 2 seconds then send true, then another 2 seconds and send false. The time on and time off are both independent of each other. So you can reverse this by making time on longer than time off.

  1. Thermocouple input. Reading a thermocouple input from the mako using “node-red-contrib-modbus” the payload value will be automatically converted from a double int to a floating-point number. This is useful for users who cannot code.

##inputs Connect the output of a modbus node to the input of the Mako ThermoCouple node. The modbus settings must look similar to the following example Step 1 FC 4 : Read Input Registers Step 2 FC 4 : Address between 0 - 65535 Step 3 FC 4 : Quantity = 2 Step 4 FC 4 : Poll time

##Outputs The payload is numeric value received from the Mako PLC. The value will be a floating point number.

  1. Splitter This node is to be used with the smithtek-node-red nodes. AKA The smthtek cloud MQTT nodes.

The smithtek MQTT nodes now allow multiple messages to be received through one input node. To assist users who cannot code, this node will split the messages and output them to 10 output pins. It reduces the size of the flow and allows the user to keep things organized.

##inputs The input pin connects to the output pin of the "Smithtek in node". It will process the incoming Mqtt messages and split them according to the variable name. the top pin is variable 1 and the bottom variable 10.

##Outputs There are 10 x output pins. Enter the variable label for each pin. For example: variable-1 will output to pin 1. The returned payload will be a number.

License

Copyright © 2020 www.smithtek.com.au Licenced under the terms of the GPLv3

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL DAMIEN CLARK BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Acknowledgements

We would like to thank the following people for their hard word, time and effort. For without them this node would not be possible � Nick O’Leary and Dave Conway-Jones for creating Node-Red

1.0.0

10 months ago

0.3.0

4 years ago

0.2.1

4 years ago

0.2.0

4 years ago

0.1.0

4 years ago