smithtek-node-red-tools
Version:
Set of tools for the Mako PLC, or any PLC
95 lines (84 loc) • 3.63 kB
HTML
<script type="text/html" data-template-name="splitter">
<div class="form-row">
<label for="node-input-name"><i class="icon-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name">
</div>
<p>Enter the variable label in each output field box.
Try to match the order used in the Smithtek input node.
.</p>
<div class="form-row">
<label for="node-input-var1"><i class="icon-tag"></i> Output1</label>
<input type="text" id="node-input-var1" placeholder="variable-1">
</div>
<div class="form-row">
<label for="node-input-var2"><i class="icon-tag"></i> Output2</label>
<input type="text" id="node-input-var2" placeholder="variable-2">
</div>
<div class="form-row">
<label for="node-input-var3"><i class="icon-tag"></i> Output3</label>
<input type="text" id="node-input-var3" placeholder="variable-3">
</div>
<div class="form-row">
<label for="node-input-var4"><i class="icon-tag"></i> Output4</label>
<input type="text" id="node-input-var4" placeholder="variable-4">
</div>
<div class="form-row">
<label for="node-input-var5"><i class="icon-tag"></i> Output5</label>
<input type="text" id="node-input-var5" placeholder="variable-5">
</div>
<div class="form-row">
<label for="node-input-var6"><i class="icon-tag"></i> Output6</label>
<input type="text" id="node-input-var6" placeholder="variable-6">
</div>
<div class="form-row">
<label for="node-input-var7"><i class="icon-tag"></i> Output7</label>
<input type="text" id="node-input-var7" placeholder="variable-7">
</div>
<div class="form-row">
<label for="node-input-var8"><i class="icon-tag"></i> Output8</label>
<input type="text" id="node-input-var8" placeholder="variable-9">
</div>
<div class="form-row">
<label for="node-input-var9"><i class="icon-tag"></i> Output9</label>
<input type="text" id="node-input-var9" placeholder="variable-9">
</div>
<div class="form-row">
<label for="node-input-var10"><i class="icon-tag"></i> Output10</label>
<input type="text" id="node-input-var10" placeholder="variable-10">
</div>
</script>
<script type="text/html" data-help-name="splitter">
<p>The splitter node connects to the Smithtek input node and can split 10 x device varibles.
Each variable will port to a output pin. This node is useful as it reduces the need to have multiple input nodes</p>
<h3>Inputs</h3>
<p>The input pin connects to the output pin of the "Smithtek in node". It will process the incomming Mqtt messages
and split them according to the variable name.</p>
<h3>Outputs</h3>
<p>There is 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</p>
</script>
<script type="text/javascript">
RED.nodes.registerType('splitter',{
category: 'SMITHTEK',
color: '#B9B6B8',
defaults: {
name: {value:""},
var1: {value:""},
var2: {value:""},
var3: {value:""},
var4: {value:""},
var5: {value:""},
var6: {value:""},
var7: {value:""},
var8: {value:""},
var9: {value:""},
var10: {value:""},
},
inputs:1,
outputs:10,
icon: "icon.png",
label: function() {
return this.name||"splitter";
}
});
</script>