forked from bitpool/edge-modbus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bp-modbus-io-config.html
executable file
·79 lines (70 loc) · 3.19 KB
/
bp-modbus-io-config.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
67
68
69
70
71
72
73
74
75
76
77
78
79
<!--
Copyright (c) 2016,2017,2018,2019,2020,2021 Klaus Landsdorf (https://bianco-royal.space/)
All rights reserved.
node-red-contrib-modbus - The BSD 3-Clause License
node-red-contrib-modbusio - The BSD 3-Clause License
@author <a href="mailto:[email protected]">Klaus Landsdorf</a> (Bianco Royal)
-->
<script type="text/javascript">
RED.nodes.registerType('bp-modbus-io-config', {
category: 'config',
defaults: {
name: {value: ''},
path: {value: '', required: true},
format: {value: 'utf8'},
addressOffset: {value: 0}
},
color: "#00aeef",
icon: "bitpool.svg",
label: function () {
return this.name || 'IO:' + this.name + '@' + this.path
},
oneditprepare: function () {
},
oneditsave: function () {
}
})
</script>
<script type="text/html" data-template-name="bp-modbus-io-config">
<div class="form-row" style="min-width:640px">
<label for="node-config-input-name"><i class="icon-tag"></i> <span data-i18n="node-red:common.label.name"></span></label>
<input type="text" id="node-config-input-name">
</div>
<div class="form-row">
<label for="node-config-input-path"><i class="icon-file"></i> <span data-i18n="modbus-contrib.label.path"></span></label>
<input type="text" id="node-config-input-path">
</div>
<div class="form-row">
<label for="node-config-input-format"><i class="fa fa-file-code-o"></i> <span data-i18n="modbus-contrib.label.format"></span></label>
<select id="node-config-input-format">
<option value="utf8" data-i18n="modbus-contrib.label.utf8"></option>
<option value="ansi" data-i18n="modbus-contrib.label.ansi"></option>
<option value="" data-i18n="modbus-contrib.label.buffer"></option>
</select>
</div>
<div class="form-row">
<label for="node-config-input-addressOffset"><i class="icon-file"></i> <span data-i18n="modbus-contrib.label.addressOffset"></span></label>
<input type="text" id="node-config-input-addressOffset" placeholder="0">
</div>
</script>
<script type="text/html" data-help-name="bp-modbus-io-config">
<p>MODBUS I/O JSON for register and coil addresses.</p>
<p>Modbus Outputs – %QX / %QB / %QW / %QD</p>
<p>Modbus Inputs – %IX / %IB / %IW / %ID</p>
<div>
<h3>IO-File Format</h3>
<p>No matter what is your source, you have to build a JSON file with the</p>
<p>CODESYS CSV Export transformed to JSON-IO-File example:</p>
<pre>
{"name":"Modbus Holding Registers","valueAddress":"%IW0"}
{"name":"iCountDummyBorder","valueAddress":"%IW0"}
{"name":"bReset","valueAddress":"%IX8.0"}
{"name":"Modbus Input Registers","valueAddress":"%QW0"}
{"name":"iBooleanSetOne","valueAddress":"%QW4"}
{"name":"bOperationActive","valueAddress":"%QX8.0"}
</pre>
</div>
<div>
<a href="https://gist.github.com/biancode/46bfc4fe78cc059a379b383ea445d2d0" target="_blank">see Converter Flow</a>
</div>
</script>