prisme-flow
Version:
prisme platform flow engine
87 lines (71 loc) • 2.49 kB
HTML
<!--
Created by prisme.io on 09/06/2017.
@author <a href="mailto:hello@prisme.io">savane vamara</a> (prisme.io)
-->
<script type="text/javascript">
RED.nodes.registerType('OpcUa-Server',{
category: 'plc',
color:"#3FADB5",
defaults: {
port: {value: "53880", required: true},
name: {value:""},
endpoint: {value: ""}
},
inputs:1,
outputs:1,
align: "right",
icon: "opcualogo.png",
label: function() {
return this.name || "OPC UA server";
},
labelStyle: function() {
return this.name?"node_label_italic":"";
}
});
</script>
<script type="text/x-red" data-template-name="OpcUa-Server">
<div class="form-row">
<label for="node-input-port"><i class="icon-tasks"></i> Port</label>
<!-- dynamic Ports from 49152 to 65535 (c000hex bis FFFFhex) -->
<input type="text" id="node-input-port" placeholder="Ports 49152 bis 65535 (c000hex bis FFFFhex)">
</div>
<div class="form-row">
<label for="node-input-name"><i class="icon-tasks"></i> Name</label>
<input type="text" id="node-input-name" placeholder="">
</div>
<div class="form-row">
<label for="node-input-endpoint"><i class="icon-tasks"></i> Endpoint</label>
<input type="text" id="node-input-endpoint" placeholder="UA/SimpleNodeRedServer">
</div>
</script>
<script type="text/x-red" data-help-name="OpcUa-Server">
<p>Creates OPC UA server with own variables, object structures and methods to endpoint: opc.tcp://hostname.local:53880/</p>
<p>
OPC UA server commands:
<ul>
<li>restartOPCUAServer</li>
<li>addEquipment</li>
<li>addPhysicalAsset</li>
<li>deleteNode</li>
</ul>
Examples JSON Injects: <br />
<pre>
{ "opcuaCommand":
"restartOPCUAServer" }
{ "opcuaCommand": "addEquipment",
"nodeName": "Machine" }
{ "opcuaCommand": "addPhysicalAsset",
"nodeName": "PhysicalAsset" }
{ "opcuaCommand": "deleteNode",
"nodeId": "ns=4;s=PhysicalAsset2" }
</pre>
</p>
<p>
OPC UA message type to set variable Counter by JSON Inject
<pre>
{ payload : { "messageType" : "Variable",
"variableName": "Counter",
"variableValue": msg.payload }};
</pre>
</p>
</script>