Difference between revisions of "Wiring Editor"

From Open Source Controls Wiki
Jump to navigation Jump to search
Tag: Manual revert
Line 186: Line 186:
]}
]}
</pre>
</pre>
<pre class="wikidiagram" id="DHW_HIU_with_unvented_cylinder_and_direct_heating" style="display:none">
{ "class": "GraphLinksModel",
  "copiesArrays": true,
  "copiesArrayObjects": true,
  "linkFromPortIdProperty": "fromPort",
  "linkToPortIdProperty": "toPort",
  "nodeDataArray": [
{"name":"12v Power","color":"#dbf6cb","leftArray":[{"portId":"left0","portColor":"#e88600"},{"portId":"left2","portColor":"#000002"}],"rightArray":[],"topArray":[],"bottomArray":[],"key":"12VDC","size":"90 50","loc":"396.15625 -258.375"},
{"key":"node","name":"BEMS Hat","color":"palegreen","lineColor":"#000000","image":"/images/c/c1/C2a.svg","leftArray":[{"portId":"left0","portColor":"#000000"},{"portId":"left1","portColor":"#00ff00"},{"portId":"left2","portColor":"#000000"},{"portId":"left3","portColor":"#00ff00"},{"portId":"left4","portColor":"#000000"},{"portId":"left5","portColor":"#00ff00"},{"portId":"left6","portColor":"#000000"},{"portId":"left7","portColor":"#00ff00"},{"portId":"left8","portColor":"#000000"},{"portId":"left9","portColor":"#ffff00"},{"portId":"left10","portColor":"#000000"},{"portId":"left11","portColor":"#ffff00"},{"portId":"left12","portColor":"#000000"},{"portId":"left13","portColor":"#ffff00"},{"portId":"left14","portColor":"#000000"},{"portId":"left15","portColor":"#ffff00"},{"portId":"left16","portColor":"#000000"},{"portId":"left17","portColor":"#00ff00"},{"portId":"left18","portColor":"#000000"},{"portId":"left19","portColor":"#00ff00"},{"portId":"left20","portColor":"#000000"},{"portId":"left21","portColor":"#00ff00"},{"portId":"left22","portColor":"#000000"},{"portId":"left23","portColor":"#00ff00"}],"topArray":[{"portColor":"#ffc900","portId":"top01"},{"portColor":"#ffc900","portId":"top02"},{"portColor":"#ffc900","portId":"top03"},{"portId":"top1","portColor":"#000000"},{"portId":"top2","portColor":"#e88600"},{"portId":"top3","portColor":"#000002"},{"portColor":"#ffffff","portId":"top4"},{"portColor":"#ffffff","portId":"top5"}],"bottomArray":[{"portColor":"#000000","portId":"bottom0"},{"portId":"bottom1","portColor":"#00ffff"},{"portId":"bottom2","portColor":"#000000"},{"portId":"bottom3","portColor":"#00ffff"},{"portId":"bottom4","portColor":"#000000"},{"portId":"bottom5","portColor":"#00ffff"},{"portId":"bottom6","portColor":"#000000"},{"portId":"bottom7","portColor":"#00ffff"},{"portId":"bottom8","portColor":"#000000"},{"portId":"bottom9","portColor":"#40aceb"},{"portId":"bottom10","portColor":"#000000"},{"portId":"bottom11","portColor":"#40aceb"},{"portId":"bottom12","portColor":"#000001"},{"portId":"bottom13","portColor":"#40aceb"},{"portId":"bottom14","portColor":"#000001"},{"portId":"bottom15","portColor":"#40aceb"},{"portId":"bottom16","portColor":"#bf6ae3"},{"portId":"bottom17","portColor":"#bf6ae3"},{"portId":"bottom18","portColor":"#bf6ae3"},{"portId":"bottom19","portColor":"#bf6ae3"},{"portId":"bottom20","portColor":"#bf6ae3"},{"portId":"bottom21","portColor":"#bf6ae3"}],"rightArray":[{"portColor":"#000000","portId":"right0"},{"portColor":"#888891","portId":"right1"},{"portId":"right2","portColor":"#888890"},{"portId":"right3","portColor":"#000000"},{"portId":"right4","portColor":"#888889"},{"portId":"right5","portColor":"#888888"},{"portId":"right6","portColor":"#ddddba"},{"portId":"right7","portColor":"#ddddbb"},{"portId":"right8","portColor":"#8827e7"},{"portId":"right9","portColor":"#000000"},{"portId":"right10","portColor":"#8827e7"},{"portId":"right11","portColor":"#000001"},{"portId":"right12","portColor":"#8827e7"},{"portId":"right13","portColor":"#000001"},{"portId":"right14","portColor":"#8827e7"},{"portId":"right15","portColor":"#000000"},{"portId":"right16","portColor":"#0000ff"},{"portId":"right17","portColor":"#ff0000"},{"portId":"right18","portColor":"#0000ff"},{"portId":"right19","portColor":"#ff0000"},{"portId":"right20","portColor":"#0000ff"},{"portId":"right21","portColor":"#ff0000"},{"portId":"right22","portColor":"#0000ff"},{"portId":"right23","portColor":"#ff0000"}],"loc":"-7.6875 -35.75"},
{"name":"Pump (PWM)","fill":"#cfe4f7","leftArray":[],"rightArray":[],"topArray":[{"portId":"top2","portColor":"#000000"},{"portId":"top1","portColor":"#0000ff","signalTypes":["#40aceb"]},{"portId":"top0","portColor":"#40aceb","signalTypes":["#0000ff"]}],"bottomArray":[],"key":"pump","size":"66 60","loc":"224.6894843749999 362.51232812500007","color":"blue","thickness":1},
{"name":"NTC10K","fill":"#dbf6cb","leftArray":[],"rightArray":[{"portId":"right0","portColor":"#000000"},{"portId":"right1","portColor":"#00ff00","signalTypes":["#00ff00","#ffff00"]}],"topArray":[],"bottomArray":[],"key":"ntc","size":"58 40","loc":"-490.71245301768823 -166.60968750000012"},
{"name":"NTC10K","fill":"#dbf6cb","leftArray":[],"rightArray":[{"portId":"right0","portColor":"#000000"},{"portId":"right1","portColor":"#00ff00","signalTypes":["#00ff00","#ffff00"]}],"topArray":[],"bottomArray":[],"key":"ntc2","size":"58 40","loc":"-492.6452343750002 -85.85718749999998"},
{"name":"NTC10K","fill":"#dbf6cb","leftArray":[],"rightArray":[{"portId":"right0","portColor":"#000000"},{"portId":"right1","portColor":"#00ff00","signalTypes":["#00ff00","#ffff00"]}],"topArray":[],"bottomArray":[],"key":"ntc3","size":"58 40","loc":"-492.9174530176882 -1.2346875000000637"},
{"name":"NTC10K","fill":"#dbf6cb","leftArray":[],"rightArray":[{"portId":"right0","portColor":"#000000"},{"portId":"right1","portColor":"#00ff00","signalTypes":["#00ff00","#ffff00"]}],"topArray":[],"bottomArray":[],"key":"ntc4","size":"58 40","loc":"-491.5427343750001 93.85031250000003"},
{"name":"Control Valve (0-10V)","fill":"aliceblue","color":"blue","leftArray":[],"rightArray":[],"topArray":[{"portId":"top1","portColor":"#e988e3","signalTypes":["#8827e7"]},{"portId":"top2","portColor":"#ff0000"},{"portId":"top3","portColor":"#000000"}],"bottomArray":[],"key":"valve2","size":"96 59","loc":"350.7672656250003 361.7578125000002","thickness":1},
{"name":"Control Valve (0-10V)","fill":"aliceblue","color":"blue","leftArray":[],"rightArray":[],"topArray":[{"portId":"top1","portColor":"#e988e3","signalTypes":["#8827e7"]},{"portId":"top2","portColor":"#ff0000"},{"portId":"top3","portColor":"#000000"}],"bottomArray":[],"key":"valve1","size":"96 59","loc":"479.75976562500057 362.8603125000002","thickness":1},
{"name":"NTC10K","fill":"#dbf6cb","leftArray":[],"rightArray":[{"portId":"right0","portColor":"#000000"},{"portId":"right1","portColor":"#00ff00","signalTypes":["#00ff00","#ffff00"]}],"topArray":[],"bottomArray":[],"key":"ntc5","size":"58 40","loc":"-491.5427343750001 174.33281250000005"},
{"name":"NTC10K","fill":"#dbf6cb","leftArray":[],"rightArray":[{"portId":"right0","portColor":"#000000"},{"portId":"right1","portColor":"#00ff00","signalTypes":["#00ff00","#ffff00"]}],"topArray":[],"bottomArray":[],"key":"ntc6","size":"58 40","loc":"-488.2352343750001 255.91781250000008"},
{"name":"NTC10K","fill":"#dbf6cb","leftArray":[],"rightArray":[{"portId":"right0","portColor":"#000000"},{"portId":"right1","portColor":"#00ff00","signalTypes":["#00ff00","#ffff00"]}],"topArray":[],"bottomArray":[],"key":"ntc7","size":"58 40","loc":"-487.13273437500015 316.5553125"},
{"name":"Relay\nHeating\nElement","fill":"#dbf6cb","leftArray":[{"portId":"left0","portColor":"#f6beb6"},{"portId":"left1","portColor":"#f6beb6"}],"rightArray":[{"portId":"right0","portColor":"#000000"},{"portId":"right1","portColor":"#e88600","signalTypes":["#00ff00","#ffff00"]}],"topArray":[],"bottomArray":[],"key":"relay","size":"77 73","loc":"-65.0214528125 413.81991468750005"},
{"name":"Heat Meter","fill":"#dbf6cb","leftArray":[{"portId":"left0","portColor":"#ddddba"},{"portId":"left1","portColor":"#ddddbb"}],"rightArray":[],"topArray":[],"bottomArray":[],"key":"meter","size":"67 54","loc":"400.9518296191404 -119.81093167968754"}
],
  "linkDataArray": [
{"from":"12VDC","to":"node","fromPort":"left0","toPort":"top2","points":[342.40625,-263.375,324.40625,-263.375,-2.6875,-263.375,-2.6875,-230.5625,-2.6875,-197.75,-2.6875,-163.75]},
{"from":"12VDC","to":"node","fromPort":"left2","toPort":"top3","points":[342.40625,-253.375,332.40625,-253.375,7.3125,-253.375,7.3125,-221.5625,7.3125,-189.75,7.3125,-163.75]},
{"from":"pump","to":"node","fromPort":"top0","toPort":"right20","points":[234.6894843749999,324.01232812500007,234.6894843749999,294.01232812500007,234.6894843749999,49.25,189.50099218749995,49.25,144.3125,49.25,110.3125,49.25]},
{"from":"pump","to":"node","fromPort":"top1","toPort":"bottom11","points":[224.6894843749999,324.01232812500007,224.6894843749999,302.01232812500007,224.6894843749999,276.13116406250003,-2.6875,276.13116406250003,-2.6875,182.25,-2.6875,92.25]},
{"from":"pump","to":"node","fromPort":"top2","toPort":"bottom10","points":[214.6894843749999,324.01232812500007,214.6894843749999,310.01232812500007,214.6894843749999,292.13116406250003,-12.6875,292.13116406250003,-12.6875,190.25,-12.6875,92.25]},
{"from":"ntc","to":"node","fromPort":"right1","toPort":"left1","points":[-452.96245301768795,-161.60968750000012,-442.96245301768795,-161.60968750000012,-279.324976508844,-161.60968750000012,-279.324976508844,-140.75,-147.6875,-140.75,-125.6875,-140.75]},
{"from":"ntc","to":"node","fromPort":"right0","toPort":"left0","points":[-452.96245301768795,-171.60968750000012,-434.96245301768795,-171.60968750000012,-271.324976508844,-171.60968750000012,-271.324976508844,-150.75,-139.6875,-150.75,-125.6875,-150.75]},
{"from":"ntc2","to":"node","fromPort":"right1","toPort":"left3","points":[-454.8952343750002,-80.85718749999998,-432.8952343750002,-80.85718749999998,-348.2913671875001,-80.85718749999998,-348.2913671875001,-120.75,-295.6875,-120.75,-125.6875,-120.75]},
{"from":"ntc2","to":"node","fromPort":"right0","toPort":"left2","points":[-454.8952343750002,-90.85718749999998,-440.8952343750002,-90.85718749999998,-356.2913671875001,-90.85718749999998,-356.2913671875001,-130.75,-303.6875,-130.75,-125.6875,-130.75]},
{"from":"ntc3","to":"node","fromPort":"right1","toPort":"left5","points":[-455.1674530176882,3.7653124999999363,-433.1674530176882,3.7653124999999363,-299.70773437500003,3.7653124999999363,-299.70773437500003,-100.75,-279.6875,-100.75,-125.6875,-100.75]},
{"from":"ntc3","to":"node","fromPort":"right0","toPort":"left4","points":[-455.1674530176882,-6.234687500000064,-441.1674530176882,-6.234687500000064,-309.63023437500004,-6.234687500000064,-309.63023437500004,-110.75,-287.6875,-110.75,-125.6875,-110.75]},
{"from":"ntc4","to":"node","fromPort":"right1","toPort":"left7","points":[-453.7927343750001,98.85031250000003,-431.7927343750001,98.85031250000003,-267.73523437500006,98.85031250000003,-267.73523437500006,-80.75,-263.6875,-80.75,-125.6875,-80.75]},
{"from":"ntc4","to":"node","fromPort":"right0","toPort":"left6","points":[-453.7927343750001,88.85031250000003,-439.7927343750001,88.85031250000003,-278.76023437500004,88.85031250000003,-278.76023437500004,-90.75,-271.6875,-90.75,-125.6875,-90.75]},
{"from":"valve2","to":"node","fromPort":"top1","toPort":"right14","points":[340.7672656250003,323.7578125000002,340.7672656250003,309.7578125000002,340.7672656250003,-10.75,266.53988281250014,-10.75,192.3125,-10.75,110.3125,-10.75]},
{"from":"valve2","to":"node","fromPort":"top3","toPort":"right15","points":[360.7672656250003,323.7578125000002,360.7672656250003,293.7578125000002,360.7672656250003,-0.75,272.53988281250014,-0.75,184.3125,-0.75,110.3125,-0.75]},
{"from":"valve2","to":"node","fromPort":"top2","toPort":"right23","points":[350.7672656250003,323.7578125000002,350.7672656250003,301.7578125000002,350.7672656250003,79.25,235.53988281250014,79.25,120.3125,79.25,110.3125,79.25]},
{"from":"valve1","to":"node","fromPort":"top1","toPort":"right12","points":[469.75976562500057,324.8603125000002,469.75976562500057,310.8603125000002,469.75976562500057,-30.75,339.0361328125003,-30.75,208.3125,-30.75,110.3125,-30.75]},
{"from":"valve1","to":"node","fromPort":"top3","toPort":"left8","points":[489.75976562500057,324.8603125000002,489.75976562500057,294.8603125000002,489.75976562500057,213.5551562500001,-255.6875,213.5551562500001,-255.6875,-70.75,-125.6875,-70.75]},
{"from":"valve1","to":"node","fromPort":"top2","toPort":"right21","points":[479.75976562500057,324.8603125000002,479.75976562500057,302.8603125000002,479.75976562500057,59.25,308.0361328125003,59.25,136.3125,59.25,110.3125,59.25]},
{"from":"ntc5","to":"node","fromPort":"right1","toPort":"left17","points":[-453.7927343750001,179.33281250000005,-431.7927343750001,179.33281250000005,-204.8927343750001,179.33281250000005,-204.8927343750001,19.25,-183.6875,19.25,-125.6875,19.25]},
{"from":"ntc5","to":"node","fromPort":"right0","toPort":"left16","points":[-453.7927343750001,169.33281250000005,-439.7927343750001,169.33281250000005,-214.81523437500005,169.33281250000005,-214.81523437500005,9.25,-191.6875,9.25,-125.6875,9.25]},
{"from":"ntc6","to":"node","fromPort":"right1","toPort":"left19","points":[-450.4852343750001,260.9178125000001,-428.4852343750001,260.9178125000001,-174.02273437500003,260.9178125000001,-174.02273437500003,39.25,-167.6875,39.25,-125.6875,39.25]},
{"from":"ntc6","to":"node","fromPort":"right0","toPort":"left18","points":[-450.4852343750001,250.91781250000008,-436.4852343750001,250.91781250000008,-183.94523437500004,250.91781250000008,-183.94523437500004,29.25,-175.6875,29.25,-125.6875,29.25]},
{"from":"ntc7","to":"node","fromPort":"right0","toPort":"left20","points":[-449.38273437500015,311.5553125,-435.38273437500015,311.5553125,-149.76773437500003,311.5553125,-149.76773437500003,49.25,-159.6875,49.25,-125.6875,49.25]},
{"from":"node","to":"ntc7","fromPort":"left21","toPort":"right1","points":[-125.6875,59.25,-151.6875,59.25,-139.84523437500002,59.25,-139.84523437500002,321.5553125,-427.38273437500015,321.5553125,-449.38273437500015,321.5553125]},
{"from":"12VDC","to":"node","fromPort":"left0","toPort":"bottom21","points":[342.40625,-263.375,324.40625,-263.375,178.77726562499993,-263.375,178.77726562499993,102.25,97.3125,102.25,97.3125,92.25]},
{"from":"12VDC","to":"node","fromPort":"left0","toPort":"bottom18","points":[342.40625,-263.375,324.40625,-263.375,188.69976562500005,-263.375,188.69976562500005,126.25,67.3125,126.25,67.3125,92.25]},
{"from":"relay","to":"node","fromPort":"right0","toPort":"bottom14","points":[-17.7714528125,408.81991468750005,-3.7714528125000015,408.81991468750005,27.3125,408.81991468750005,27.3125,313.53495734375,27.3125,218.25,27.3125,92.25]},
{"from":"relay","to":"node","fromPort":"right1","toPort":"bottom17","points":[-17.7714528125,418.81991468750005,4.2285471874999985,418.81991468750005,57.3125,418.81991468750005,57.3125,330.53495734375,57.3125,242.25,57.3125,92.25]},
{"from":"meter","to":"node","fromPort":"left0","toPort":"right6","points":[358.7018296191404,-124.81093167968754,340.7018296191404,-124.81093167968754,234.5071648095702,-124.81093167968754,234.5071648095702,-90.75,172.3125,-90.75,110.3125,-90.75]},
{"from":"meter","to":"node","fromPort":"left1","toPort":"right7","points":[358.7018296191404,-114.81093167968754,348.7018296191404,-114.81093167968754,243.96919743164062,-114.81093167968754,243.96919743164062,-80.75,180.3125,-80.75,110.3125,-80.75]}
]}
</pre>


== See Also ==
== See Also ==

Revision as of 19:06, 24 June 2022

Concons1.png

Data

Contains invisible JSON data driving this page.



See Also

Ports and Colours

Diagrams are based around nodes (devices) with ports for making connections.

To enable automatic wiring, port types are required as well as rules about how they can be connected.

Colours tend to be the most commonly used identifier for types of connections, with in computer language is a hex value representing red, green and blue. #000000 is black, #ff0000 is red, #00ff00 is green, #ffffff is white, and so on.

However we require another level of distinction as we may desire to wire to a particular GND for example, or to give communications a plus and minus. This is achieved by using the last digit of the colour as a variation, providing 1,048,576 colours (or signal levels), each with 16 variations.

Taking GND (black) for example. #000000 is the default black and used for ground connections. We may however use #00000f for a power supply ground, or #000001 for a less popular ground that can be used if needed in preference to a popular ground.

Compareblk.png

One can take this to an extreme and give every signal level a unique colour value. This may well feature in future live wiring systems.

By default, ports connect to ports of the same colour. However, a 0-10V OUT cannot connect to another 0-10V OUT so we specify compatible ports with a list of compatible colours called signalTypes, in order of preference. If a preferred port type is free it will be used, if not then the next in the list will be tried, and so on. You can see this in use in the following data for a room thermostat, where it is used to allow connection to both a dry contact #00ffffff and a universal input #ffff00.

{"name":"Room Thermostat","color":"#dbf6cb","leftArray":[],"rightArray":[{"portId":"right0","portColor":"#000000"},{"portId":"right1","portColor":"#00ffff","signalTypes":["#00ffff","#ffff00"]}],"topArray":[],"bottomArray":[],"key":"roomstat","size":"78.78515625 47"}

Rststwire.png Rststwire2.png

How to Use in Articles

The following two elements have been given an id (view in the source) that can then be passed to a diagram using an iframe tag.

The second element has also been hidden from view.

This way it is possible to create a design on this page and then include it into articles using pure JSON.

Versions

Version
wiring8
  • Context menus for links
  • Context menus for changing node and link line type, colour, and thickness
  • Grouping on nodes using Ctrl+G with group context menus
wiring7
  • Port labels shown on hover
wiring6
  • Palette reduced in width
  • Download PNG
wiringFrame basic view with download SVG button

Improvements

  • Number terminals
  • Fix widths with top/bottom terminals
  • Hover text over terminals
  • Change colour of blocks
  • Position terminals (drag along sides)
  • Menu to change line thickness, type, colour, arrows.
  • Optional wire labels = controller number + terminal number (e.g. 101)