-
Notifications
You must be signed in to change notification settings - Fork 11
/
ads-symbols.html
66 lines (64 loc) · 2.56 KB
/
ads-symbols.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<script type="text/x-red" data-help-name="ADS Symbols">
<p>Node for providing the symbols state of Beckhoff TwinCAT ADS</p>
<p>The PLC symbols are provided. This happens when an object is transferred to the input. The entry data will be ignored.<p>
</script>
<script type="text/x-red" data-template-name="ADS Symbols">
<div class="form-row">
<label for="node-input-datasource"><i class="fa fa-random"></i> <span data-i18n="ads-symbols.label.datasource"></span></label>
<input type="text" id="node-input-datasource">
</div>
<div class="form-row">
<label for="node-input-data"><i class="fa fa-plane"></i> <span data-i18n="ads-symbols.label.data"></span></label>
<select id="node-input-data">
<option value="SYMBOLES" data-i18n="ads-symbols.data.SYMBOLES"></option>
<option value="TYPES" data-i18n="ads-symbols.data.TYPES"></option>
</select>
</div>
<div class="form-row">
<label> </label>
<input type="checkbox" id="node-input-force" style="display: inline-block; width: auto; vertical-align: top;">
<label for="node-input-force" style="width: 70%;"><span data-i18n="ads-symbols.label.force"></span></label>
</div>
<div class="form-row">
<label for="node-input-topic"><i class="fa fa-tasks"></i> <span data-i18n="ads-symbols.label.topic"></span></label>
<input type="text" id="node-input-topic" data-i18n="[placeholder]ads-symbols.placeholder.topic">
</div>
<div class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i> <span data-i18n="node-red:common.label.name"></span></label>
<input type="text" id="node-input-name" data-i18n="[placeholder]node-red:common.label.name">
</div>
</script>
<script type="text/javascript">
RED.nodes.registerType("ADS Symbols", {
category: "Beckhoff PLC",
color: "#00bb00",
defaults: {
name: {
name: ""
},
datasource: {
type: "ads-connection",
required: true
},
data: {
data: ""
},
force: {
data: false
},
topic: {
value: "",
required: false
}
},
inputs: 1,
outputs: 1,
icon: "tcat.png",
label: function () {
return this.name || this.data || "ADS Symbols";
},
labelStyle: function () {
return this.name ? "node_label_italic" : "";
}
});
</script>