node-red-contrib-plcs
Version:
Mentor Monitor Project Plcs Modbus Controllers
79 lines (71 loc) • 3.25 kB
HTML
<script type="text/javascript">
RED.nodes.registerType('Legacy Input',{
category: 'Mentor Plcs',
color: '#EBEDEC',
defaults: {
device: {value: ""},
unitid: {value: 1},
name: {value:""},
devicetype: {value: ''},
initialdefer: {value: 0},
defer: {value: 5000},
retries: {value: 5},
},
inputs:1,
outputs:2,
inputLabels: "timestamp from interval timer",
outputLabels: ["stdout to Modbus TCP flexible input","stdout to Mentor SaveDB timeout"],
icon: "iconDI.png",
label() {
if (this.name && this.name !== "")
return this.name;
else if (!this.devicetype || this.devicetype == "")
return this.device || 'Legacy In';
else
return (this.device !== "" ? this.device : 'Legacy In') + " ("+ this.devicetype + ")";
}
});
</script>
<script type="text/x-red" data-template-name="Legacy Input">
<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>
<div class="form-row">
<label for="node-input-device"><i class="fa fa-arrow-down"></i>Device Name</label>
<input type="text" id="node-input-device" placeholder="Device Name" >
</div>
<div class="form-row">
<label for="node-input-devicetype"><i class="icon-tag"></i> Device Type</label>
<select id="node-input-devicetype">
<!--<option value="universal">Universal</option>-->
<!--<option value="m221">M221</option>
<option value="M251">M251</option>-->
<option value="PM850">PM850</option>
<option value="PM700">PM700</option>
<option value="PM5100">PM5100</option>
<option value="CVMC10">CVMC10</option>
</select>
</div>
<div class="form-row">
<label for="node-input-unitid"><i class="fa fa-arrow-down"></i>Unit ID</label>
<input type="number" id="node-input-unitid" placeholder="Unit ID" style="width: 150px;">
</div>
<div class="form-row">
<label for="node-input-initialdefer" style="width:40%;"><i class="fa fa-history"></i> Initial Defer (msecs)</label>
<input type="number" id="node-input-initialdefer" style="display: inline-block; width: auto; vertical-align: top;">
</div>
<div class="form-row">
<label for="node-input-defer" style="width:40%;"><i class="fa fa-history"></i> Retry Defer (msecs)</label>
<input type="number" id="node-input-defer" style="display: inline-block; width: auto; vertical-align: top;">
</div>
<div class="form-row">
<label for="node-input-retries" style="width:40%;"><i class="fa fa-history"></i> Retries</label>
<input type="number" id="node-input-retries" style="display: inline-block; width: auto; vertical-align: top;">
</div>
</script>
<script type="text/x-red" data-help-name="Legacy Input">
<p>
A node that parses modbus data to individual digital output pins.<br/>
</p>
</script>