Difference between revisions of "Wiring Editor"

From Open Source Controls Wiki
Jump to navigation Jump to search
Tag: Reverted
Tag: Manual revert
Line 185: Line 185:
{"from":"valve42","to":"node","fromPort":"top3","toPort":"right21","points":[338.15625,204.375,338.15625,166.375,338.15625,59.25,237.234375,59.25,136.3125,59.25,110.3125,59.25]}
{"from":"valve42","to":"node","fromPort":"top3","toPort":"right21","points":[338.15625,204.375,338.15625,166.375,338.15625,59.25,237.234375,59.25,136.3125,59.25,110.3125,59.25]}
]}
]}
</pre>
<pre class="wikidiagram" id="jason1" style="display:none">
{ "class": "GraphLinksModel",
  "copiesArrays": true,
  "copiesArrayObjects": true,
  "linkFromPortIdProperty": "fromPort",
  "linkToPortIdProperty": "toPort",
  "nodeDataArray": [
{"name":"DP + Temp Sensor","range":"300 kPa","fill":"#dbf6cb","leftArray":[],"rightArray":[{"portId":"right1","portColor":"#ffc900"},{"portId":"right2","portColor":"#000000"},{"portId":"right0","portColor":"#8827e7","signalTypes":["#ffff00"]},{"portId":"right3","portColor":"#8827e7","signalTypes":["#ffff00"]}],"topArray":[],"bottomArray":[],"key":"DPS","size":"88 55","loc":"-282.84375 -94.875"},
{"name":"Flow + Temp Sensor","range":"4-30 lpm","fill":"#dbf6cb","leftArray":[],"rightArray":[{"portId":"right1","portColor":"#ffc900"},{"portId":"right2","portColor":"#000000"},{"portId":"right0","portColor":"#8827e7","signalTypes":["#ffff00"]},{"portId":"right3","portColor":"#8827e7","signalTypes":["#ffff00"]}],"topArray":[],"bottomArray":[],"key":"VFS","size":"88 55","loc":"58.15625 66.125"}
],
  "linkDataArray": []}
</pre>
</pre>



Revision as of 14:12, 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)