BusDiagram GitHub Download

Examples

#Miscalibrated shutter

The actuator is configured for a 20-second travel time, but the real shutter needs 30 seconds. For a 50% target, the actuator drives the motor for 10 seconds and reports an estimated position of 50%; the real shutter has moved only about 33%. Select the actuator to compare both positions. Then try the correct 30-second setting.

<bus-diagram>
<script type="application/json">
{
  "formatVersion": 2,
  "title": "Shutter: estimated versus actual travel",
  "description": "The actuator is configured for 20 seconds, while the real shutter takes 30 seconds. Compare this with a 30-second setting.",
  "lines": [{ "address": "1.1", "name": "Example installation" }],
  "groupAddresses": [
    { "address": "2/1/1", "name": "Movement", "dpt": "1.008" },
    { "address": "2/1/2", "name": "Stop / step", "dpt": "1.007" },
    { "address": "2/1/3", "name": "Position setpoint", "dpt": "5.001" },
    { "address": "2/1/4", "name": "Estimated position", "dpt": "5.001" }
  ],
  "devices": [
    {
      "id": "pushButton",
      "name": "Three-key push-button",
      "address": "1.1.1",
      "kind": "pushButton",
      "behavior": "pushButton/v1",
      "objects": [
        {
          "id": "move",
          "name": "Movement",
          "ga": "2/1/1",
          "dpt": "1.008",
          "port": "input",
          "flags": { "W": false, "T": true }
        },
        {
          "id": "stop",
          "name": "Stop / slat step",
          "ga": "2/1/2",
          "dpt": "1.007",
          "port": "input",
          "flags": { "W": false, "T": true }
        },
        {
          "id": "target",
          "name": "Setpoint",
          "ga": "2/1/3",
          "dpt": "5.001",
          "port": "input",
          "flags": { "W": false, "T": true }
        },
        {
          "id": "feedback",
          "name": "Received estimated position",
          "ga": "2/1/4",
          "dpt": "5.001",
          "port": "display",
          "flags": { "W": true, "T": false }
        }
      ],
      "buttons": [
        {
          "id": "key1",
          "label": "Key 1 · Up",
          "icon": "up",
          "short": { "object": "stop", "value": 0 },
          "long": { "object": "move", "value": 0 }
        },
        {
          "id": "key2",
          "label": "Key 2 · Down",
          "icon": "down",
          "short": { "object": "stop", "value": 1 },
          "long": { "object": "move", "value": 1 }
        },
        { "id": "key3", "label": "Key 3 · 50 %", "press": { "object": "target", "value": 50 } }
      ],
      "inputs": [
        {
          "id": "position",
          "type": "number",
          "label": "Setpoint (%)",
          "object": "target",
          "min": 0,
          "max": 100,
          "step": 1
        }
      ]
    },
    {
      "id": "shutterActuator",
      "name": "Shutter actuator",
      "address": "1.1.3",
      "kind": "shutterActuator",
      "behavior": "shutterActuator/v1",
      "objects": [
        {
          "id": "move",
          "name": "Movement",
          "ga": "2/1/1",
          "dpt": "1.008",
          "port": "move",
          "channel": "s1",
          "flags": { "W": true, "T": false }
        },
        {
          "id": "stop",
          "name": "Stop / step",
          "ga": "2/1/2",
          "dpt": "1.007",
          "port": "stopStep",
          "channel": "s1",
          "flags": { "W": true, "T": false }
        },
        {
          "id": "target",
          "name": "Requested position",
          "ga": "2/1/3",
          "dpt": "5.001",
          "port": "positionCommand",
          "channel": "s1",
          "flags": { "W": true, "T": false }
        },
        {
          "id": "status",
          "name": "Estimated position",
          "ga": "2/1/4",
          "dpt": "5.001",
          "port": "positionStatus",
          "channel": "s1",
          "flags": { "W": false, "T": true }
        }
      ],
      "channels": [
        {
          "id": "s1",
          "label": "Shutter S1",
          "parameters": { "estimatedTravelTimeMs": 20000 },
          "equipment": { "type": "shutter", "parameters": { "actualTravelTimeMs": 30000 } }
        }
      ]
    }
  ],
  "options": { "speed": 1, "filterTables": false }
}
</script>
</bus-diagram>

#Correct setting

<bus-diagram>
<script type="application/json">
{
  "formatVersion": 2,
  "title": "Shutter with correct actuator settings",
  "description": "The same installation with the actuator travel time set to 30 seconds, matching the real shutter. Estimated and actual positions now agree.",
  "lines": [{ "address": "1.1", "name": "Example installation" }],
  "groupAddresses": [
    { "address": "2/1/1", "name": "Movement", "dpt": "1.008" },
    { "address": "2/1/2", "name": "Stop / step", "dpt": "1.007" },
    { "address": "2/1/3", "name": "Position setpoint", "dpt": "5.001" },
    { "address": "2/1/4", "name": "Estimated position", "dpt": "5.001" }
  ],
  "devices": [
    {
      "id": "pushButton",
      "name": "Three-key push-button",
      "address": "1.1.1",
      "kind": "pushButton",
      "behavior": "pushButton/v1",
      "objects": [
        {
          "id": "move",
          "name": "Movement",
          "ga": "2/1/1",
          "dpt": "1.008",
          "port": "input",
          "flags": { "W": false, "T": true }
        },
        {
          "id": "stop",
          "name": "Stop / slat step",
          "ga": "2/1/2",
          "dpt": "1.007",
          "port": "input",
          "flags": { "W": false, "T": true }
        },
        {
          "id": "target",
          "name": "Setpoint",
          "ga": "2/1/3",
          "dpt": "5.001",
          "port": "input",
          "flags": { "W": false, "T": true }
        },
        {
          "id": "feedback",
          "name": "Received estimated position",
          "ga": "2/1/4",
          "dpt": "5.001",
          "port": "display",
          "flags": { "W": true, "T": false }
        }
      ],
      "buttons": [
        {
          "id": "key1",
          "label": "Key 1 · Up",
          "icon": "up",
          "short": { "object": "stop", "value": 0 },
          "long": { "object": "move", "value": 0 }
        },
        {
          "id": "key2",
          "label": "Key 2 · Down",
          "icon": "down",
          "short": { "object": "stop", "value": 1 },
          "long": { "object": "move", "value": 1 }
        },
        { "id": "key3", "label": "Key 3 · 50 %", "press": { "object": "target", "value": 50 } }
      ],
      "inputs": [
        {
          "id": "position",
          "type": "number",
          "label": "Setpoint (%)",
          "object": "target",
          "min": 0,
          "max": 100,
          "step": 1
        }
      ]
    },
    {
      "id": "shutterActuator",
      "name": "Shutter actuator",
      "address": "1.1.3",
      "kind": "shutterActuator",
      "behavior": "shutterActuator/v1",
      "objects": [
        {
          "id": "move",
          "name": "Movement",
          "ga": "2/1/1",
          "dpt": "1.008",
          "port": "move",
          "channel": "s1",
          "flags": { "W": true, "T": false }
        },
        {
          "id": "stop",
          "name": "Stop / step",
          "ga": "2/1/2",
          "dpt": "1.007",
          "port": "stopStep",
          "channel": "s1",
          "flags": { "W": true, "T": false }
        },
        {
          "id": "target",
          "name": "Requested position",
          "ga": "2/1/3",
          "dpt": "5.001",
          "port": "positionCommand",
          "channel": "s1",
          "flags": { "W": true, "T": false }
        },
        {
          "id": "status",
          "name": "Estimated position",
          "ga": "2/1/4",
          "dpt": "5.001",
          "port": "positionStatus",
          "channel": "s1",
          "flags": { "W": false, "T": true }
        }
      ],
      "channels": [
        {
          "id": "s1",
          "label": "Shutter S1",
          "parameters": { "estimatedTravelTimeMs": 30000 },
          "equipment": { "type": "shutter", "parameters": { "actualTravelTimeMs": 30000 } }
        }
      ]
    }
  ],
  "options": { "speed": 1, "filterTables": false }
}
</script>
</bus-diagram>