Difference between revisions of "Wiring Editor"

From Open Source Controls Wiki
Jump to navigation Jump to search
Line 2,294: Line 2,294:
|
|
* Port value Map Inspector added, appears if ''mapUnits'' is not empty
* Port value Map Inspector added, appears if ''mapUnits'' is not empty
*Port sizes can be altered via Inspector
*Hidden wide ports can now be used to move other ports apart, or position to corners
|-
|-
|wiring18
|wiring18

Revision as of 16:17, 17 July 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:

  1. A port figure, which can be either an "Input", "Output" (shown by a direction arrow), or any other standard shape figure including "Rectangle", "Circle", "TriangleUp", etc. Inputs cannot be wired to outputs.
  2. An optional 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 #fffffe.
{"name":"Room Thermostat","color":"#dbf6cb","leftArray":[],"rightArray":[{"portId":"right0","portColor":"#000000"},{"portId":"right1","portColor":"#00ffff","signalTypes":["#00ffff","#fffffe"]}],"topArray":[],"bottomArray":[],"key":"roomstat","size":"78.78515625 47"}

Rststwire.png Rststwire2.png

Buttons

This power supply contains additional buttons for performing actions, such as opening a web page or PDF.

12vdcicons.png

{"name":"12VDC Power","buttonArray":[{"href":"https://hwwiki.ddns.net/","color":"#000000","fill":"#0000ff","figure":"ElectricalHazard"},{"text":"Open","href":"https://hwwiki.ddns.net/","color":"#000000","fill":"#0000ff"}],"fill":"#ebebeb","leftArray":[{"portId":"left0","portColor":"#e88600","figure":"Output"},{"portId":"left2","portColor":"#000002","figure":"Output"}],"rightArray":[],"topArray":[],"bottomArray":[],"key":"12VDC22","size":"67 76","loc":"709.4688121714489 -308.66453398276076","figure":"Procedure","color":"#000000","thickness":1,"notes":"","textColor":"#484848"}

The buttons are created by adding a buttonArray (shown below). Buttons have either text or an icon (figure). The array below has one of each.

"buttonArray":[{"href":"https://hwwiki.ddns.net/","color":"#000000","fill":"#0000ff","figure":"ElectricalHazard"},{"text":"Open","href":"https://hwwiki.ddns.net/","color":"#000000","fill":"#0000ff"}]

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
wiring19
  • Port value Map Inspector added, appears if mapUnits is not empty
  • Port sizes can be altered via Inspector
  • Hidden wide ports can now be used to move other ports apart, or position to corners
wiring18
  • Port context menu altered to assign signalType
  • Port Inspector
wiring17
  • Connection processing with export for controller
wiring16
  • PDF Download
wiring15
  • Nodes can be rotated
  • Groups given dotted surround
  • Converted SVG images replaced with data URLs
  • General layout alterations
wiring14
  • Button to save to IPFS
  • Loads from IPFS CID
wiring13
  • Node icons refined to allow both figures and text
  • Node icons arranged vertically
wiring12
  • Node icons changed to buttons with option for text
  • Icon buttons open web pages in a target window
wiring11
  • Port directions (figures) added, so inputs and outputs can share the same identity colour
  • Autowiring updated to account for compatible directions
  • Node icons added
wiring10
  • Node shapes added to context menu
wiring9
  • Port selection added to port context menu
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)