{
  "custom": {
    "alarm_message": null,
    "baseTagValue": {},
    "bind": "value",
    "color": "#C2C2C2",
    "priority": "No Active Alarms",
    "state": "Not Running"
  },
  "params": {
    "tagProps": [
      "System/SMC/Induction/Induction_24",
      "value",
      "value",
      "value",
      "value",
      "value",
      "value",
      "value",
      "value",
      "value"
    ]
  },
  "propConfig": {
    "custom.baseTagValue": {
      "persistent": true
    },
    "custom.baseTagValue.Blocked": {
      "binding": {
        "config": {
          "fallbackDelay": 2.5,
          "mode": "indirect",
          "references": {
            "0": "{view.params.tagProps[0]}",
            "fc": "{session.custom.fc}"
          },
          "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Blocked/"
        },
        "type": "tag"
      }
    },
    "custom.baseTagValue.Common_Error": {
      "binding": {
        "config": {
          "fallbackDelay": 2.5,
          "mode": "indirect",
          "references": {
            "0": "{view.params.tagProps[0]}",
            "fc": "{session.custom.fc}"
          },
          "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Common_Error/"
        },
        "type": "tag"
      }
    },
    "custom.baseTagValue.Disabled": {
      "binding": {
        "config": {
          "fallbackDelay": 2.5,
          "mode": "indirect",
          "references": {
            "0": "{view.params.tagProps[0]}",
            "fc": "{session.custom.fc}"
          },
          "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Disabled/"
        },
        "type": "tag"
      }
    },
    "custom.baseTagValue.Energy_Saving": {
      "binding": {
        "config": {
          "fallbackDelay": 2.5,
          "mode": "indirect",
          "references": {
            "0": "{view.params.tagProps[0]}",
            "fc": "{session.custom.fc}"
          },
          "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Energy_Saving/"
        },
        "type": "tag"
      }
    },
    "custom.baseTagValue.Jammed": {
      "binding": {
        "config": {
          "fallbackDelay": 2.5,
          "mode": "indirect",
          "references": {
            "0": "{view.params.tagProps[0]}",
            "fc": "{session.custom.fc}"
          },
          "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Jammed/"
        },
        "type": "tag"
      }
    },
    "custom.baseTagValue.Running": {
      "binding": {
        "config": {
          "fallbackDelay": 2.5,
          "mode": "indirect",
          "references": {
            "0": "{view.params.tagProps[0]}",
            "fc": "{session.custom.fc}"
          },
          "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Running/"
        },
        "type": "tag"
      }
    },
    "custom.baseTagValue.Starting": {
      "binding": {
        "config": {
          "fallbackDelay": 2.5,
          "mode": "indirect",
          "references": {
            "0": "{view.params.tagProps[0]}",
            "fc": "{session.custom.fc}"
          },
          "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Starting/"
        },
        "type": "tag"
      }
    },
    "custom.baseTagValue.Stopped": {
      "binding": {
        "config": {
          "fallbackDelay": 2.5,
          "mode": "indirect",
          "references": {
            "0": "{view.params.tagProps[0]}",
            "fc": "{session.custom.fc}"
          },
          "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Stopped/"
        },
        "type": "tag"
      }
    },
    "custom.baseTagValue.Stopping": {
      "binding": {
        "config": {
          "fallbackDelay": 2.5,
          "mode": "indirect",
          "references": {
            "0": "{view.params.tagProps[0]}",
            "fc": "{session.custom.fc}"
          },
          "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Stopping/"
        },
        "type": "tag"
      }
    },
    "custom.baseTagValue.Test_Mode": {
      "binding": {
        "config": {
          "fallbackDelay": 2.5,
          "mode": "indirect",
          "references": {
            "0": "{view.params.tagProps[0]}",
            "fc": "{session.custom.fc}"
          },
          "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/In_Test_Mode/"
        },
        "type": "tag"
      }
    },
    "custom.baseTagValue.awInduction": {
      "binding": {
        "config": {
          "fallbackDelay": 2.5,
          "mode": "indirect",
          "references": {
            "0": "{view.params.tagProps[0]}",
            "fc": "{session.custom.fc}"
          },
          "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/awInduction/"
        },
        "type": "tag"
      }
    },
    "custom.bind": {
      "persistent": true
    },
    "custom.color": {
      "binding": {
        "config": {
          "fallbackDelay": 2.5,
          "mode": "indirect",
          "references": {
            "0": "{view.params.tagProps[0]}",
            "fc": "{session.custom.fc}"
          },
          "tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}"
        },
        "transforms": [
          {
            "code": "\tdata \u003d dict(self.view.custom.baseTagValue) if self.view.custom.baseTagValue else {}\n\t\n\tif data.get(\u0027awInduction\u0027, 1) \u003d\u003d 0:\n\t    return \u0027#C2C2C2\u0027\n\telif data.get(\u0027Common_Error\u0027):\n\t    return \u0027#FF0000\u0027\n\telif data.get(\u0027Jammed\u0027):\n\t    return \u0027#FF8C00\u0027\n\telif data.get(\u0027Test_Mode\u0027):\n\t    return \u0027#AC5F00\u0027\n\telif data.get(\u0027Energy_Saving\u0027):\n\t    return \u0027#87CEFA\u0027\n\telif data.get(\u0027Running\u0027):\n\t    return \u0027#00FF00\u0027\n\telif data.get(\u0027Starting\u0027):\n\t    return \u0027#CCFFCC\u0027\n\telif data.get(\u0027Stopping\u0027):\n\t    return \u0027#CCFFCC\u0027\n\telif data.get(\u0027Stopped\u0027):\n\t    return \u0027#C2C2C2\u0027\n\telif data.get(\u0027Disabled\u0027) \u003d\u003d False:\n\t    return \u0027#00FF00\u0027\n\telif data.get(\u0027Blocked\u0027):\n\t    return \u0027#C2C2C2\u0027\n\telse:\n\t    return \u0027#000000\u0027",
            "type": "script"
          }
        ],
        "type": "tag"
      },
      "persistent": true
    },
    "custom.priority": {
      "binding": {
        "config": {
          "path": "view.custom.bind"
        },
        "transforms": [
          {
            "code": "\tdata \u003d dict(self.view.custom.baseTagValue) if self.view.custom.baseTagValue else {}\n\t\n\tif data.get(\u0027Common_Error\u0027) or data.get(\u0027Jammed\u0027) :\n\t    return \"High\"\n\telif data.get(\u0027Blocked\u0027):\n\t    return \"High\"\n\telif data.get(\u0027Test_Mode\u0027):\n\t    return \"Medium\"\n\telif data.get(\u0027Disabled\u0027):\n\t    return \"Low\"\n\telif data.get(\u0027Starting\u0027) or data.get(\u0027Stopping\u0027) or data.get(\u0027Running\u0027) or data.get(\u0027Energy_Saving\u0027) or data.get(\u0027Stopped\u0027) or data.get(\u0027Disabled\u0027) \u003d\u003d False:\n\t    return \"No Active Alarms\"\n\treturn \"No Active Alarms\"\n",
            "type": "script"
          }
        ],
        "type": "property"
      },
      "persistent": true
    },
    "custom.state": {
      "binding": {
        "config": {
          "path": "view.custom.bind"
        },
        "transforms": [
          {
            "code": "\tdata \u003d dict(self.view.custom.baseTagValue) if self.view.custom.baseTagValue else {}\n\t\n\t\n\tif data.get(\u0027awInduction\u0027, 1) \u003d\u003d 0:\n\t    return \u0027Not Running\u0027\n\telif data.get(\u0027Common_Error\u0027):\n\t    return \u0027Common Error\u0027\n\telif data.get(\u0027Jammed\u0027):\n    \t return \u0027Jammed\u0027\n\telif data.get(\u0027Test_Mode\u0027):\n\t    return \u0027In Test Mode\u0027\n\telif data.get(\u0027Energy_Saving\u0027):\n\t    return \u0027Energy Saving\u0027\n\telif data.get(\u0027Running\u0027):\n\t    return \u0027Running\u0027\n\telif data.get(\u0027Starting\u0027):\n\t    return \u0027Starting\u0027\n\telif data.get(\u0027Stopping\u0027):\n\t    return \u0027Stopping\u0027\n\telif data.get(\u0027Stopped\u0027):\n\t    return \u0027Stopped\u0027\n\telif data.get(\u0027Disabled\u0027) \u003d\u003d False:\n\t    return \u0027Enabled\u0027\n\telif data.get(\u0027Blocked\u0027):\n\t    return \u0027Blocked\u0027\n\telse:\n\t    return \u0027Not Running\u0027",
            "type": "script"
          }
        ],
        "type": "property"
      },
      "persistent": true
    },
    "params.tagProps": {
      "paramDirection": "inout",
      "persistent": true
    }
  },
  "props": {
    "defaultSize": {
      "height": 30,
      "width": 80
    }
  },
  "root": {
    "children": [
      {
        "meta": {
          "defaultSize": {
            "height": 30,
            "width": 80
          },
          "name": "Induction Motor"
        },
        "position": {
          "height": 1,
          "width": 1
        },
        "propConfig": {
          "props.elements[0].elements[0].fill.paint": {
            "binding": {
              "config": {
                "path": "view.custom.color"
              },
              "type": "property"
            }
          }
        },
        "props": {
          "elements": [
            {
              "elements": [
                {
                  "fill": {},
                  "height": 20,
                  "name": "rect",
                  "rx": 2,
                  "stroke": {
                    "paint": "#333333",
                    "width": 2
                  },
                  "type": "rect",
                  "width": 70,
                  "x": 5,
                  "y": 5
                },
                {
                  "elements": [
                    {
                      "name": "line",
                      "stroke": {
                        "paint": "#999999",
                        "width": 1.5
                      },
                      "type": "line",
                      "x1": 15,
                      "x2": 15,
                      "y1": 5,
                      "y2": 25
                    },
                    {
                      "name": "line",
                      "stroke": {
                        "paint": "#999999",
                        "width": 1.5
                      },
                      "type": "line",
                      "x1": 25,
                      "x2": 25,
                      "y1": 5,
                      "y2": 25
                    },
                    {
                      "name": "line",
                      "stroke": {
                        "paint": "#999999",
                        "width": 1.5
                      },
                      "type": "line",
                      "x1": 35,
                      "x2": 35,
                      "y1": 5,
                      "y2": 25
                    },
                    {
                      "name": "line",
                      "stroke": {
                        "paint": "#999999",
                        "width": 1.5
                      },
                      "type": "line",
                      "x1": 45,
                      "x2": 45,
                      "y1": 5,
                      "y2": 25
                    },
                    {
                      "name": "line",
                      "stroke": {
                        "paint": "#999999",
                        "width": 1.5
                      },
                      "type": "line",
                      "x1": 55,
                      "x2": 55,
                      "y1": 5,
                      "y2": 25
                    },
                    {
                      "name": "line",
                      "stroke": {
                        "paint": "#999999",
                        "width": 1.5
                      },
                      "type": "line",
                      "x1": 65,
                      "x2": 65,
                      "y1": 5,
                      "y2": 25
                    }
                  ],
                  "name": "group",
                  "type": "group"
                }
              ],
              "name": "group",
              "type": "group"
            }
          ],
          "preserveAspectRatio": "none",
          "viewBox": "0 0 80 30"
        },
        "type": "ia.shapes.svg"
      }
    ],
    "events": {
      "dom": {
        "onClick": {
          "config": {
            "script": "\tsystem.perspective.openDock(\u0027Docked-East\u0027,params\u003d{\u0027tagProps\u0027:self.view.params.tagProps})"
          },
          "scope": "G",
          "type": "script"
        }
      }
    },
    "meta": {
      "name": "root",
      "tooltip": {
        "enabled": true,
        "location": "top-left",
        "style": {}
      }
    },
    "propConfig": {
      "meta.tooltip.style.classes": {
        "binding": {
          "config": {
            "expression": "{view.custom.priority}"
          },
          "transforms": [
            {
              "fallback": "Alarms-Styles/NoAlarm",
              "inputType": "scalar",
              "mappings": [
                {
                  "input": "High",
                  "output": "Alarms-Styles/High"
                },
                {
                  "input": "Medium",
                  "output": "Alarms-Styles/Medium"
                },
                {
                  "input": "Low",
                  "output": "Alarms-Styles/Low"
                },
                {
                  "input": "Diagnostic",
                  "output": "Alarms-Styles/Diagnostic"
                }
              ],
              "outputType": "style-list",
              "type": "map"
            }
          ],
          "type": "expr"
        }
      },
      "meta.tooltip.text": {
        "binding": {
          "config": {
            "expression": "if(\n    {view.custom.state} !\u003d \"Not Running\",\n    \"Source Id: \" + {view.params.tagProps[0]} + \", Priority: \" + {view.custom.priority} + \", State: \" + {view.custom.state},\n    \"Device Disconnected\"\n)\n"
          },
          "type": "expr"
        }
      },
      "meta.visible": {
        "binding": {
          "config": {
            "path": "session.custom.alarm_filter.show_inductions"
          },
          "type": "property"
        }
      }
    },
    "props": {
      "mode": "percent",
      "style": {
        "cursor": "pointer"
      }
    },
    "type": "ia.container.coord"
  }
}