first commit

This commit is contained in:
bmidf 2025-07-22 12:44:17 +04:00
commit 532e512b4c
43 changed files with 34262 additions and 0 deletions

53
.gitignore vendored Normal file
View File

@ -0,0 +1,53 @@
# Build artifacts
dist/
build/
*.spec
temp_folders.zip
folder_creator_embedded_final.py
# Python
__pycache__/
*.py[cod]
*$py.class
*.so
.Python
env/
venv/
ENV/
env.bak/
venv.bak/
# PyInstaller
*.manifest
*.spec
# IDE
.vscode/
.idea/
*.swp
*.swo
*~
# OS
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db
desktop.ini
# Temporary files
*.tmp
*.temp
*.log
# Output folders created by scripts
MCMs/
MCM/
OUTPUT/
# Backup files
*.bak
*.backup

View File

@ -0,0 +1,27 @@
import json
def main():
with open("view.json", "r") as f:
view = json.load(f)
dpm_device_idx = 1
dpm_label_idx = 1
for child in view["root"]["children"]:
# Update DPM device names (skip MCM, which is usually named 'MCM')
if child.get("type") == "ia.display.view" and child["meta"].get("name") != "MCM":
child["meta"]["name"] = f"DPM{dpm_device_idx}_DEVICE"
dpm_device_idx += 1
# Update DPM label names and text
elif child.get("type") == "ia.display.label":
child["meta"]["name"] = f"DPM{dpm_label_idx}_label"
child["props"]["text"] = f"DPM{dpm_label_idx}_TEXT"
dpm_label_idx += 1
with open("view.json", "w") as f:
json.dump(view, f, indent=2)
print("DPM device and label names/texts updated and saved to view_renamed.json")
if __name__ == "__main__":
main()

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,17 @@
MCM01
DPM1_UL1_4 11.200.1.2
UL2_4_DPM1 11.200.1.3
MCM02
UL2_4_DPM1 11.200.1.3
DPM3_UL4_4 11.200.1.4
DPM4_UL5_4 11.200.1.5
MCM03
UL2_4_DPM1 11.200.1.3
DPM3_UL4_4 11.200.1.4
DPM4_UL5_4 11.200.1.5
DPM5_UL7_4 11.200.1.6
MCM04
DPM1_UL1_4 11.200.1.2
UL2_4_DPM1 11.200.1.3
DPM3_UL4_4 11.200.1.4
DPM4_UL5_4 11.200.1.5

View File

@ -0,0 +1,85 @@
import json
import re
import sys
def read_mapping(mapping_file):
"""
Read device-to-IP mapping from a text file.
Format: <device_name> <IP_address>
Returns a dictionary with DPM{number}_DEVICE and DPM{number}_TEXT mappings.
"""
mapping = {}
try:
with open(mapping_file, 'r') as f:
for i, line in enumerate(f, 1):
line = line.strip()
if not line or line.startswith('#'):
continue
try:
device, ip = line.split()
mapping[f"DPM{i}_DEVICE"] = device
mapping[f"DPM{i}_TEXT"] = f"{device} {ip}"
except ValueError:
print(f"Warning: Skipping invalid line {i} in {mapping_file}: '{line}'")
return mapping
except FileNotFoundError:
print(f"Error: Mapping file {mapping_file} not found.")
sys.exit(1)
except Exception as e:
print(f"Error reading mapping file: {str(e)}")
sys.exit(1)
def replace_placeholders(data, mapping):
"""
Recursively replace placeholders in the data structure with values from mapping.
"""
if isinstance(data, dict):
return {k: replace_placeholders(v, mapping) for k, v in data.items()}
elif isinstance(data, list):
return [replace_placeholders(item, mapping) for item in data]
elif isinstance(data, str):
for placeholder, value in mapping.items():
data = re.sub(r'\b' + re.escape(placeholder) + r'\b', value, data)
return data
else:
return data
def process_view_json(input_file, output_file, mapping):
"""
Process view.json, replace placeholders, and save to output_file.
"""
try:
with open(input_file, 'r') as f:
data = json.load(f)
modified_data = replace_placeholders(data, mapping)
with open(output_file, 'w') as f:
json.dump(modified_data, f, indent=4)
print(f"Successfully processed {input_file} and saved to {output_file}")
except FileNotFoundError:
print(f"Error: The file {input_file} was not found.")
sys.exit(1)
except json.JSONDecodeError:
print(f"Error: The file {input_file} is not a valid JSON file.")
sys.exit(1)
except Exception as e:
print(f"An error occurred: {str(e)}")
sys.exit(1)
def main():
if len(sys.argv) != 3:
print("Usage: python replace_placeholders.py <mapping_file> <view_json_file>")
sys.exit(1)
mapping_file = sys.argv[1]
input_json_file = sys.argv[2]
output_json_file = "view.json"
mapping = read_mapping(mapping_file)
process_view_json(input_json_file, output_json_file, mapping)
if __name__ == "__main__":
main()

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,373 @@
import json
def get_dpm_positions(dpm_count):
"""
Return a list of position dictionaries for DPM_DEVICE and DPM_label entries.
Uses positions from fourth view.json for 1-4 DPMs, third view.json for 5-6 DPMs,
second view.json for 7-8 DPMs, first view.json (updated) for 9-11 DPMs, and
first view.json with DPM12 and placeholders for 12+. For 7 DPMs, skips the first
position and uses positions 2-8 from second view.json.
"""
# Positions from fourth view.json (for 1-4 DPMs)
device_positions_4 = [
{"x": 0.5, "y": 0.5, "width": 0.5, "height": 0.5}, # DPM1
{"x": 0.5, "y": 0, "width": 0.5, "height": 0.5}, # DPM2
{"x": 0, "y": 0, "width": 0.5, "height": 0.5}, # DPM3
{"x": 0, "y": 0.5, "width": 0.5, "height": 0.5} # DPM4
]
label_positions_4 = [
{"x": 0.5, "y": 0.6, "width": 0.0547, "height": 0.0358}, # DPM1_label
{"x": 0.5, "y": 0.1, "width": 0.0547, "height": 0.0358}, # DPM2_label
{"x": 0.01, "y": 0.1, "width": 0.0547, "height": 0.0358}, # DPM3_label
{"x": 0.01, "y": 0.6, "width": 0.0547, "height": 0.0358} # DPM4_label
]
# Positions from third view.json (for 5-6 DPMs)
device_positions_3 = [
{"x": 0.6666, "y": 0.5, "width": 0.3333, "height": 0.5}, # DPM1
{"x": 0.6666, "y": 0, "width": 0.3333, "height": 0.5}, # DPM2
{"x": 0.3333, "y": 0, "width": 0.3333, "height": 0.5}, # DPM3
{"x": 0, "y": 0, "width": 0.3333, "height": 0.5}, # DPM4
{"x": 0, "y": 0.5, "width": 0.3333, "height": 0.5}, # DPM5
{"x": 0.3333, "y": 0.5, "width": 0.3333, "height": 0.5} # DPM6
]
label_positions_3 = [
{"x": 0.65, "y": 0.6, "width": 0.0547, "height": 0.0358}, # DPM1_label
{"x": 0.65, "y": 0.1, "width": 0.0547, "height": 0.0358}, # DPM2_label
{"x": 0.32, "y": 0.1, "width": 0.0547, "height": 0.0358}, # DPM3_label
{"x": 0.005, "y": 0.1, "width": 0.0547, "height": 0.0358}, # DPM4_label
{"x": 0.005, "y": 0.6, "width": 0.0547, "height": 0.0358}, # DPM5_label
{"x": 0.32, "y": 0.6, "width": 0.0547, "height": 0.0358} # DPM6_label
]
# Positions from second view.json (for 7-8 DPMs)
device_positions_2 = [
{"x": 0.6666, "y": 0.3333, "width": 0.3333, "height": 0.3333}, # DPM1
{"x": 0.6666, "y": 0, "width": 0.3333, "height": 0.3333}, # DPM2
{"x": 0.3333, "y": 0, "width": 0.3333, "height": 0.3333}, # DPM3
{"x": 0, "y": 0, "width": 0.3333, "height": 0.3333}, # DPM4
{"x": 0, "y": 0.3333, "width": 0.3333, "height": 0.3333}, # DPM5
{"x": 0, "y": 0.6666, "width": 0.3333, "height": 0.3333}, # DPM6
{"x": 0.3333, "y": 0.6666, "width": 0.3333, "height": 0.3333}, # DPM7
{"x": 0.3333, "y": 0.3333, "width": 0.3333, "height": 0.3333} # DPM8
]
label_positions_2 = [
{"x": 0.65, "y": 0.4, "width": 0.0547, "height": 0.0358}, # DPM1_label
{"x": 0.65, "y": 0.07, "width": 0.0547, "height": 0.0358}, # DPM2_label
{"x": 0.32, "y": 0.07, "width": 0.0547, "height": 0.0358}, # DPM3_label
{"x": 0.065, "y": 0.3, "width": 0.0547, "height": 0.0358}, # DPM4_label
{"x": 0.005, "y": 0.4, "width": 0.0547, "height": 0.0358}, # DPM5_label
{"x": 0.005, "y": 0.75, "width": 0.0547, "height": 0.0358}, # DPM6_label
{"x": 0.32, "y": 0.75, "width": 0.0547, "height": 0.0358}, # DPM7_label
{"x": 0.32, "y": 0.4, "width": 0.0547, "height": 0.0358} # DPM8_label
]
# Positions from first view.json (for 9-11 DPMs, updated with new DPM10-DPM12)
device_positions_1 = [
{"x": 0.75, "y": 0.3333, "width": 0.25, "height": 0.3333}, # DPM1
{"x": 0.75, "y": 0, "width": 0.25, "height": 0.3333}, # DPM2
{"x": 0.5, "y": 0, "width": 0.25, "height": 0.3333}, # DPM3
{"x": 0.5, "y": 0.3333, "width": 0.25, "height": 0.3333}, # DPM4
{"x": 0.2503, "y": 0.3333, "width": 0.25, "height": 0.3333},# DPM5
{"x": 0.2503, "y": 0, "width": 0.25, "height": 0.3333}, # DPM6
{"x": 0, "y": 0, "width": 0.25, "height": 0.3333}, # DPM7
{"x": 0, "y": 0.3333, "width": 0.25, "height": 0.3333}, # DPM8
{"x": 0, "y": 0.6667, "width": 0.25, "height": 0.3333}, # DPM9
{"x": 0.2503, "y": 0.6667, "width": 0.25, "height": 0.3333},# DPM10
{"x": 0.5, "y": 0.6667, "width": 0.25, "height": 0.3333}, # DPM11
{"x": 0.75, "y": 0.6667, "width": 0.25, "height": 0.3333} # DPM12
]
label_positions_1 = [
{"x": 0.7302, "y": 0.4125, "width": 0.0547, "height": 0.0358}, # DPM1_label
{"x": 0.7302, "y": 0.0747, "width": 0.0547, "height": 0.0358}, # DPM2_label
{"x": 0.4755, "y": 0.0748, "width": 0.0547, "height": 0.0358}, # DPM3_label
{"x": 0.4726, "y": 0.4125, "width": 0.0547, "height": 0.0358}, # DPM4_label
{"x": 0.2281, "y": 0.4125, "width": 0.0547, "height": 0.0358}, # DPM5_label
{"x": 0.2284, "y": 0.0744, "width": 0.0547, "height": 0.0358}, # DPM6_label
{"x": 0.0484, "y": 0.278, "width": 0.0547, "height": 0.0358}, # DPM7_label
{"x": 0.0064, "y": 0.3772, "width": 0.0547, "height": 0.0358}, # DPM8_label
{"x": 0.0062, "y": 0.7079, "width": 0.0547, "height": 0.0358}, # DPM9_label
{"x": 0.2279, "y": 0.7437, "width": 0.0547, "height": 0.0358}, # DPM10_label
{"x": 0.4755, "y": 0.7438, "width": 0.0547, "height": 0.0358}, # DPM11_label
{"x": 0.7302, "y": 0.7438, "width": 0.0547, "height": 0.0358} # DPM12_label
]
# Positions from first view.json (for 9-11 DPMs, updated with new DPM12-DPM15)
device_positions_6 = [
{"x": 0.75, "y": 0.5, "width": 0.25, "height": 0.25}, # DPM1
{"x": 0.75, "y": 0.25, "width": 0.25, "height": 0.25}, # DPM2
{"x": 0.75, "y": 0, "width": 0.25, "height": 0.25}, # DPM3
{"x": 0.5, "y": 0, "width": 0.25, "height": 0.25}, # DPM4
{"x": 0.5, "y": 0.25, "width": 0.25, "height": 0.25},# DPM5
{"x": 0.25, "y": 0.25, "width": 0.25, "height": 0.25}, # DPM6
{"x": 0.25, "y": 0, "width": 0.25, "height": 0.25}, # DPM7
{"x": 0, "y": 0, "width": 0.25, "height": 0.25}, # DPM8
{"x": 0, "y": 0.25, "width": 0.25, "height": 0.25}, # DPM9
{"x": 0, "y": 0.5, "width": 0.25, "height": 0.25},# DPM10
{"x": 0, "y": 0.75, "width": 0.25, "height": 0.25}, # DPM11
{"x": 0.25, "y": 0.75, "width": 0.25, "height": 0.25}, # DPM12
{"x": 0.25, "y": 0.5, "width": 0.25, "height": 0.25},# DPM13
{"x": 0.5, "y": 0.5, "width": 0.25, "height": 0.25}, # DPM14
{"x": 0.5, "y": 0.75, "width": 0.25, "height": 0.25} # DPM15
]
label_positions_6 = [
{"x": 0.7302, "y": 0.5421, "width": 0.0547, "height": 0.0358}, # DPM1_label
{"x": 0.7302, "y": 0.3005, "width": 0.0547, "height": 0.0358}, # DPM2_label
{"x": 0.7302, "y": 0.0744, "width": 0.0547, "height": 0.0358}, # DPM3_label
{"x": 0.4755, "y": 0.0744, "width": 0.0547, "height": 0.0358}, # DPM4_label
{"x": 0.4755, "y": 0.3005, "width": 0.0547, "height": 0.0358}, # DPM5_label
{"x": 0.2284, "y": 0.3005, "width": 0.0547, "height": 0.0358}, # DPM6_label
{"x": 0.2284, "y": 0.0744, "width": 0.0547, "height": 0.0358}, # DPM7_label
{"x": 0.0442, "y": 0.2109, "width": 0.0547, "height": 0.0358}, # DPM8_label
{"x": 0.0054, "y": 0.2855, "width": 0.0547, "height": 0.0358}, # DPM9_label
{"x": 0.0054, "y": 0.5399, "width": 0.0547, "height": 0.0358}, # DPM10_label
{"x": 0.0054, "y": 0.7863, "width": 0.0547, "height": 0.0358}, # DPM11_label
{"x": 0.2284, "y": 0.7885, "width": 0.0547, "height": 0.0358}, # DPM12_label
{"x": 0.2284, "y": 0.5421, "width": 0.0547, "height": 0.0358}, # DPM13_label
{"x": 0.4755, "y": 0.5421, "width": 0.0547, "height": 0.0358}, # DPM14_label
{"x": 0.4755, "y": 0.7885, "width": 0.0547, "height": 0.0358}, # DPM15_label
]
# Select positions based on dpm_count
if dpm_count in [1, 2, 3, 4]:
device_positions = device_positions_4[:dpm_count]
label_positions = label_positions_4[:dpm_count]
elif dpm_count in [5, 6]:
device_positions = device_positions_3[:dpm_count]
label_positions = label_positions_3[:dpm_count]
elif dpm_count == 7:
# For 7 DPMs, use positions 2-8 from second view.json
device_positions = device_positions_2[1:8]
label_positions = label_positions_2[1:8]
elif dpm_count == 8:
# For 8 DPMs, use all positions from second view.json
device_positions = device_positions_2[:8]
label_positions = label_positions_2[:8]
elif dpm_count >= 13:
# For 13-15 DPMs + 1 MCM, use device_positions_6 and label_positions_6
# MCM is always at the last position
device_positions = device_positions_6[:dpm_count]
label_positions = label_positions_6[:dpm_count]
elif dpm_count == 13:
# For 12 DPMs + 1 MCM, use all 13 positions from device_positions_6
device_positions = device_positions_6[:13]
label_positions = label_positions_6[:13]
else:
# For 9-12, use first view.json (updated) up to DPM12, then placeholders
device_positions = device_positions_1[:min(dpm_count, 12)]
label_positions = label_positions_1[:min(dpm_count, 12)]
# Extend for DPM13+ with placeholders (should not be used now)
for i in range(12, dpm_count):
device_positions.append({"x": 0.1 * (i % 5), "y": 0.3333 * (i // 5), "width": 0.25, "height": 0.3333})
label_positions.append({"x": 0.1 * (i % 5), "y": 0.3333 * (i // 5) + 0.1, "width": 0.0547, "height": 0.0358})
return device_positions, label_positions
def make_binding(path):
return {"binding": {"config": {"path": path}, "type": "property"}}
def make_connection(view, name, tag_index):
view["custom"][name] = False
view["propConfig"][f"custom.{name}"] = {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
str(tag_index): f"{{view.params.tagProps[{tag_index}]}}",
"fc": "{session.custom.fc}",
},
"tagPath": f"[{{fc}}_SCADA_TAG_PROVIDER]{{{tag_index}}}/STATE"
},
"transforms": [
{"expression": "coalesce({value},{view.params.forceFaultStatus},1)", "type": "expression"},
{"fallback": False, "inputType": "scalar", "mappings": [{"input": 0, "output": True}, {"input": 1, "output": False}], "outputType": "scalar", "type": "map"}
],
"type": "tag"
},
"persistent": True
}
def generate_view_json(dpm_count, dpm_texts, dpm_device_names, mcm_name):
device_positions, label_positions = get_dpm_positions(dpm_count)
mcm_last = (dpm_count == 12)
view = {
"custom": {},
"params": {"tagProps": [f"DPM{i}_TAG" for i in range(dpm_count)]},
"propConfig": {},
"props": {"defaultSize": {"height": 894, "width": 1920}},
"root": {"children": [], "meta": {"name": "root"}, "position": {"x": 120, "y": -723}, "props": {"mode": "percent", "style": {"backgroundColor": "#ffffff"}}, "type": "ia.container.coord"}
}
# Connections
# mcm-dpm1
make_connection(view, "mcm-dpm1", 0)
# dpm1-dpm2, dpm2-dpm3, ..., dpm{max-1}-dpm{max}
for i in range(1, dpm_count - 1):
make_connection(view, f"dpm{i}-dpm{i+1}", i)
# dpm{max}-mcm
make_connection(view, f"dpm{dpm_count-1}-mcm", dpm_count-1)
view["propConfig"]["params.tagProps"] = {"paramDirection": "input", "persistent": True}
default_params = {
"InDown": False, "InLeft": False, "InUp": False,
"OutDown": False, "OutRight": False, "OutUp": False,
"Down1": False, "Down2": False, "Down3": False,
"DownLeft": False, "DownOn": False, "DownRight": False
}
# Devices
for i in range(dpm_count):
if mcm_last:
# MCM last: DPMs 0-10, MCM 11
if i == dpm_count - 1:
# MCM
device_name = "MCM"
label_text = "MCM"
entry = {
"events": {"dom": {"onClick": {"config": {"script": "\tself.session.custom.dpm_view_path = self.props.params.view\n\tself.session.custom.show_dpm_device_view = True"}, "scope": "G", "type": "script"}}},
"meta": {"name": device_name},
"position": device_positions[i],
"propConfig": {},
"props": {"params": {"InDown": False, "InLeft": False, "InOn": False, "InUp": False, "OutDown": False, "OutRight": False, "OutUp": False},
"path": "Windows/Tabs/Enternet Windows/Components/EN4TR"},
"type": "ia.display.view"
}
entry["propConfig"]["props.params.InOn"] = make_binding("view.custom.dpm11-mcm")
entry["propConfig"]["props.params.OutOn"] = make_binding("view.custom.mcm-dpm1")
else:
device_name = dpm_device_names[i]
label_text = dpm_texts[i]
params = default_params.copy()
params["view"] = f"Windows/Tabs/Enternet Windows/DPMs/DPM Devices/{mcm_name}/{device_name}"
entry = {
"events": {"dom": {"onClick": {"config": {"script": "\tself.session.custom.dpm_view_path = self.props.params.view\n\tself.session.custom.show_dpm_device_view = True"}, "scope": "G", "type": "script"}}},
"meta": {"name": device_name},
"position": device_positions[i],
"propConfig": {},
"props": {
"params": params,
"path": "Windows/Tabs/Enternet Windows/Components/DPM_BLOCK"
},
"type": "ia.display.view"
}
# DPM1
if i == 0:
entry["propConfig"]["props.params.InOn"] = make_binding("view.custom.dpm1-dpm2")
entry["propConfig"]["props.params.OutOn"] = make_binding("view.custom.mcm-dpm1")
# DPM2..DPM10
elif 1 <= i <= 9:
entry["propConfig"]["props.params.InOn"] = make_binding(f"view.custom.dpm{i+1}-dpm{i+2}")
entry["propConfig"]["props.params.OutOn"] = make_binding(f"view.custom.dpm{i}-dpm{i+1}")
# DPM11
elif i == 10:
entry["propConfig"]["props.params.InOn"] = make_binding("view.custom.dpm10-dpm11")
entry["propConfig"]["props.params.OutOn"] = make_binding("view.custom.dpm11-mcm")
view["root"]["children"].append(entry)
else:
# Default: MCM is first
is_mcm = (i == 0)
if is_mcm:
device_name = "MCM"
label_text = "MCM"
entry = {
"events": {"dom": {"onClick": {"config": {"script": "\tself.session.custom.dpm_view_path = self.props.params.view\n\tself.session.custom.show_dpm_device_view = True"}, "scope": "G", "type": "script"}}},
"meta": {"name": device_name},
"position": device_positions[i],
"propConfig": {},
"props": {"params": {"InDown": False, "InLeft": False, "InOn": False, "InUp": False, "OutDown": False, "OutRight": False, "OutUp": False},
"path": "Windows/Tabs/Enternet Windows/Components/EN4TR"},
"type": "ia.display.view"
}
entry["propConfig"]["props.params.InOn"] = make_binding(f"view.custom.dpm{dpm_count-1}-mcm")
entry["propConfig"]["props.params.OutOn"] = make_binding("view.custom.mcm-dpm1")
else:
device_name = dpm_device_names[i-1]
label_text = dpm_texts[i-1]
params = default_params.copy()
params["view"] = f"Windows/Tabs/Enternet Windows/DPMs/DPM Devices/{mcm_name}/{device_name}"
entry = {
"events": {"dom": {"onClick": {"config": {"script": "\tself.session.custom.dpm_view_path = self.props.params.view\n\tself.session.custom.show_dpm_device_view = True"}, "scope": "G", "type": "script"}}},
"meta": {"name": device_name},
"position": device_positions[i],
"propConfig": {},
"props": {
"params": params,
"path": "Windows/Tabs/Enternet Windows/Components/DPM_BLOCK"
},
"type": "ia.display.view"
}
# DPM1
if i == 1:
entry["propConfig"]["props.params.InOn"] = make_binding("view.custom.dpm1-dpm2")
entry["propConfig"]["props.params.OutOn"] = make_binding("view.custom.mcm-dpm1")
# Last DPM
elif i == dpm_count - 1:
entry["propConfig"]["props.params.InOn"] = make_binding(f"view.custom.dpm{dpm_count-2}-dpm{dpm_count-1}")
entry["propConfig"]["props.params.OutOn"] = make_binding(f"view.custom.dpm{dpm_count-1}-mcm")
# Middle DPMs
else:
entry["propConfig"]["props.params.InOn"] = make_binding(f"view.custom.dpm{i}-dpm{i+1}")
entry["propConfig"]["props.params.OutOn"] = make_binding(f"view.custom.dpm{i-1}-dpm{i}")
view["root"]["children"].append(entry)
# Labels
if mcm_last:
for i in range(dpm_count - 1): # 0 to 10 for 11 DPMs
view["root"]["children"].append({
"meta": {"name": f"DPM{i+1}_label"},
"position": label_positions[i],
"props": {"text": dpm_texts[i], "textStyle": {"fontSize": "1vmin"}},
"type": "ia.display.label"
})
else:
for i in range(1, dpm_count):
view["root"]["children"].append({
"meta": {"name": f"DPM{i}_label"},
"position": label_positions[i],
"props": {"text": dpm_texts[i-1], "textStyle": {"fontSize": "1vmin"}},
"type": "ia.display.label"
})
return view
def main():
try:
mcm_name = input("Enter MCM name [Ex. MCM01]: ").strip()
if not mcm_name:
print("Error: MCM name cannot be empty.")
return
print("Enter DPMs (one per line, format: <device_name> <device_ip>). Leave blank line to finish.")
lines = []
while True:
line = input()
if not line.strip():
break
lines.append(line.strip())
dpm_count = len(lines) + 1
if dpm_count < 2:
print("Error: You must enter at least one DPM.")
return
dpm_device_names, dpm_texts = [], []
for entry in lines:
if '\t' in entry:
device_name, _ = entry.split('\t', 1)
elif ' ' in entry:
device_name, _ = entry.split(' ', 1)
else:
print(f"Error: '{entry}' is missing a separator (tab or space) between device name and full text.")
return
dpm_device_names.append(device_name)
dpm_texts.append(entry)
view = generate_view_json(dpm_count, dpm_texts, dpm_device_names, mcm_name)
with open("view.json", "w") as f:
json.dump(view, f, indent=2)
print(f"Successfully generated view.json with {dpm_count-1} DPMs + 1 MCM")
except Exception as e:
print(f"An error occurred: {str(e)}")
if __name__ == "__main__":
main()

View File

@ -0,0 +1,156 @@
UL13_8_DPM1
UL13_1_VFD1 11.200.1.30
UL13_2_VFD1 11.200.1.31
UL13_3_VFD1 11.200.1.32
UL13_4_VFD1 11.200.1.33
UL13_5_VFD1 11.200.1.34
UL13_6_VFD1 11.200.1.35
UL13_7_VFD1 11.200.1.36
UL13_8A_VFD1 11.200.1.37
UL13_8B_VFD1 11.200.1.38
UL13_9_VFD1 11.200.1.39
UL13_10_VFD1 11.200.1.40
UL13_11_VFD1 11.200.1.41
UL14_1_EX1 11.200.1.42
UL14_3_VFD1 11.200.1.43
UL14_4_VFD1 11.200.1.44
UL14_5_VFD1 11.200.1.45
UL14_6_VFD1 11.200.1.46
UL14_7_VFD1 11.200.1.47
UL14_8_VFD1 11.200.1.48
UL14_9_VFD1 11.200.1.49
UL14_10_VFD1 11.200.1.50
UL13_1_FIO1 11.200.1.51
UL14_1_FIO1 11.200.1.52
UL15_4_DPM1
UL15_1_EX1 11.200.1.53
UL15_3_VFD1 11.200.1.54
UL15_4_VFD1 11.200.1.55
UL15_5_VFD1 11.200.1.56
UL15_6_VFD1 11.200.1.57
UL15_7_VFD1 11.200.1.58
UL15_8_VFD1 11.200.1.59
UL15_9_VFD1 11.200.1.60
UL15_10_VFD1 11.200.1.61
UL15_11_VFD1 11.200.1.62
UL15_1_FIO1 11.200.1.63
UL16_2_DPM1
UL16_1_VFD1 11.200.1.64
UL16_2_VFD1 11.200.1.65
UL16_4_VFD1 11.200.1.66
UL16_5_VFD1 11.200.1.67
UL16_6_VFD1 11.200.1.68
UL16_7_VFD1 11.200.1.69
UL16_8_VFD1 11.200.1.70
UL16_9_VFD1 11.200.1.71
UL17_1_EX1 11.200.1.72
UL17_3_VFD1 11.200.1.73
UL17_4_VFD1 11.200.1.74
UL17_5_VFD1 11.200.1.75
UL17_6_VFD1 11.200.1.76
UL17_7_VFD1 11.200.1.77
UL17_8_VFD1 11.200.1.78
UL17_9_VFD1 11.200.1.79
UL17_10_VFD1 11.200.1.80
UL16_1_FIO1 11.200.1.81
UL17_1_FIO1 11.200.1.82
UL18_4_DPM1
UL18_1_EX1 11.200.1.83
UL18_3_VFD1 11.200.1.84
UL18_4_VFD1 11.200.1.85
UL18_5_VFD1 11.200.1.86
UL18_6_VFD1 11.200.1.87
UL18_7_VFD1 11.200.1.88
UL18_8_VFD1 11.200.1.89
UL18_9_VFD1 11.200.1.90
UL18_10_VFD1 11.200.1.91
UL18_11_VFD1 11.200.1.92
UL18_12_VFD1 11.200.1.93
UL18_13A_VFD1 11.200.1.94
UL18_13B_VFD1 11.200.1.95
UL18_14_VFD1 11.200.1.96
UL18_15_VFD1 11.200.1.97
UL18_16_VFD1 11.200.1.98
UL18_1_FIO1 11.200.1.99
UL19_2_DPM1
UL19_1_VFD1 11.200.1.100
UL19_2_VFD1 11.200.1.101
UL19_3_VFD1 11.200.1.102
UL19_4_VFD1 11.200.1.103
UL19_5_VFD1 11.200.1.104
UL19_6_VFD1 11.200.1.105
UL19_7_VFD1 11.200.1.106
UL19_8_VFD1 11.200.1.107
UL19_9_VFD1 11.200.1.108
UL20_1_EX1 11.200.1.109
UL20_3_VFD1 11.200.1.110
UL20_4_VFD1 11.200.1.111
UL20_5_VFD1 11.200.1.112
UL20_6_VFD1 11.200.1.113
UL20_7_VFD1 11.200.1.114
UL20_8_VFD1 11.200.1.115
UL20_9_VFD1 11.200.1.116
UL19_1_FIO1 11.200.1.117
UL20_1_FIO1 11.200.1.118
UL21_11_DPM1
UL21_1_EX1 11.200.1.119
UL21_3_VFD1 11.200.1.120
UL21_4_VFD1 11.200.1.121
UL21_5_VFD1 11.200.1.122
UL21_6_VFD1 11.200.1.123
UL21_7_VFD1 11.200.1.124
UL21_8_VFD1 11.200.1.125
UL21_9_VFD1 11.200.1.126
UL21_10_VFD1 11.200.1.127
UL21_11_VFD1 11.200.1.128
UL21_12_VFD1 11.200.1.129
UL21_13_VFD1 11.200.1.130
UL21_14A_VFD1 11.200.1.131
UL21_14B_VFD1 11.200.1.132
UL21_15_VFD1 11.200.1.133
UL21_16_VFD1 11.200.1.134
UL21_17_VFD1 11.200.1.135
UL21_1_FIO1 11.200.1.136
PS5_7_DPM1
PS5_1_VFD1 11.200.1.137
PS5_2_VFD1 11.200.1.138
PS5_3_VFD1 11.200.1.139
PS5_4_VFD1 11.200.1.140
PS5_5_VFD1 11.200.1.141
PS5_6_VFD1 11.200.1.142
PS5_7_VFD1 11.200.1.143
PS5_8_VFD1 11.200.1.144
PS5_9_VFD1 11.200.1.145
PS5_10_VFD1 11.200.1.146
PS5_11_VFD1 11.200.1.147
PS5_12_VFD1 11.200.1.148
PS5_13_VFD1 11.200.1.149
PS6_7_DPM1
PS6_1_VFD1 11.200.1.150
PS6_2_VFD1 11.200.1.151
PS6_3_VFD1 11.200.1.152
PS6_4_VFD1 11.200.1.153
PS6_5_VFD1 11.200.1.154
PS6_6_VFD1 11.200.1.155
PS6_7_VFD1 11.200.1.156
PS6_8_VFD1 11.200.1.157
PS6_9_VFD1 11.200.1.158
PS6_10_VFD1 11.200.1.159
PS6_11_VFD1 11.200.1.160
PS6_12_VFD1 11.200.1.161
PS6_13_VFD1 11.200.1.162
PS7_7_DPM1
PS7_1_VFD1 11.200.1.163
PS7_2_VFD1 11.200.1.164
PS7_3_VFD1 11.200.1.165
PS7_4_VFD1 11.200.1.166
PS7_5_VFD1 11.200.1.167
PS7_6_VFD1 11.200.1.168
PS7_7_VFD1 11.200.1.169
PS7_8_VFD1 11.200.1.170
PS7_9_VFD1 11.200.1.171
PS7_10_VFD1 11.200.1.172
PS7_11_VFD1 11.200.1.173
PS7_12_VFD1 11.200.1.174
PS7_13_VFD1 11.200.1.175
PS7_14_VFD1 11.200.1.176

206
PLACE DPM DEVICES/main.py Normal file
View File

@ -0,0 +1,206 @@
"""
!!! CHANGE THE INPUT_FILE VARIABLE TO THE PATH OF THE TEXT FILE! LINE 17 !!!
IF YOU WANT TO RUN THIS SCRIPT, YOU NEED TO HAVE A TXT FILE WITH THE FOLLOWING FORMAT:
DPM_NAME
DEVICE_NAME1 DEVICE_IP1
DEVICE_NAME2 DEVICE_IP2
...
DEVICE_NAMEN DEVICE_IPN
DPM_NAMEN
...
"""
import json
import os
import shutil
# Get the directory where this script is located
script_dir = os.path.dirname(os.path.abspath(__file__))
input_file = os.path.join(script_dir, "device_mapping.txt")
mcm_folder_name = "MCM"
def generate_config(num_vfds, num_fios, device_list, dpm_label):
if num_vfds + num_fios > 24:
raise ValueError("Error: Total number of VFDs and FIOs/SIOs cannot exceed 24 slots.")
if len(device_list) != num_vfds + num_fios:
raise ValueError(f"Error: Expected {num_vfds + num_fios} device names, but got {len(device_list)}.")
# Predefined positions and labels for devices (up to 24)
positions = [
{"x": 0.0232, "y": 0.4991}, {"x": 0.0230, "y": 0.6677}, {"x": 0.0216, "y": 0.8333}, # 3
{"x": 0.0229, "y": 0.3333}, {"x": 0.0229, "y": 0.1667}, {"x": 0.0244, "y": 0.0000}, # 6
{"x": 0.5000, "y": 0.0000}, {"x": 0.6250, "y": 0.0000}, {"x": 0.7500, "y": 0.0000}, # 9
{"x": 0.3750, "y": 0.0000}, {"x": 0.2516, "y": 0.0019}, {"x": 0.1245, "y": 0.0000}, # 12
{"x": 0.8509, "y": 0.3332}, {"x": 0.8514, "y": 0.1667}, {"x": 0.8528, "y": 0.0000}, # 15
{"x": 0.8509, "y": 0.4988}, {"x": 0.8501, "y": 0.6639}, {"x": 0.8515, "y": 0.8329}, # 18
{"x": 0.3740, "y": 0.8324}, {"x": 0.2481, "y": 0.8324}, {"x": 0.1222, "y": 0.8333}, # 21
{"x": 0.5026, "y": 0.8314}, {"x": 0.6245, "y": 0.8314}, {"x": 0.7536, "y": 0.8351} # 24
]
label_positions = [
{"x": 0.0094, "y": 0.5394}, {"x": 0.0068, "y": 0.7315}, {"x": 0.0068, "y": 0.8981}, # 3
{"x": 0.0068, "y": 0.3986}, {"x": 0.0068, "y": 0.2324}, {"x": 0.0068, "y": 0.0653}, # 6
{"x": 0.5117, "y": 0.1662}, {"x": 0.6312, "y": 0.1664}, {"x": 0.7500, "y": 0.1664}, # 9
{"x": 0.3864, "y": 0.1664}, {"x": 0.3150, "y": 0.1682}, {"x": 0.2072, "y": 0.1646}, # 12
{"x": 0.9470, "y": 0.3943}, {"x": 0.9470, "y": 0.2276}, {"x": 0.9470, "y": 0.0619}, # 15
{"x": 0.9470, "y": 0.5610}, {"x": 0.9470, "y": 0.7257}, {"x": 0.9470, "y": 0.8927}, # 18
{"x": 0.4587, "y": 0.8896}, {"x": 0.3311, "y": 0.8887}, {"x": 0.2071, "y": 0.8886}, # 21
{"x": 0.5887, "y": 0.8886}, {"x": 0.7106, "y": 0.8886}, {"x": 0.8344, "y": 0.9247} # 24
]
total_devices = num_vfds + num_fios
tag_props = [f"TAG{i}" for i in range(total_devices)]
con_lines_visible = [True] * total_devices + [False] * (24 - total_devices)
# Generate propConfig for con_lines bindings
prop_config = {}
for i in range(total_devices):
prop_config[f"props.params.con_lines[{i}]"] = {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {"0": f"{{view.params.tagProps[{i}]}}", "fc": "{session.custom.fc}"},
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/Alarms/Communication_Faulted"
},
"transforms": [
{"expression": "coalesce({value},{view.params.forceFaultStatus},false)", "type": "expression"},
{"fallback": False, "inputType": "scalar", "mappings": [{"input": False, "output": True}], "outputType": "scalar", "type": "map"}
],
"type": "tag"
}
}
# Base configuration
config = {
"custom": {},
"params": {"tagProps": tag_props},
"props": {"defaultSize": {"height": 1080, "width": 1920}},
"root": {
"children": [],
"meta": {"name": "root"},
"position": {"x": 0.6348, "y": -0.1546},
"props": {"mode": "percent"},
"type": "ia.container.coord"
}
}
# Add DPM component
config["root"]["children"].append({
"meta": {"name": "DPM"},
"position": {"x": 0, "y": 0, "height": 1, "width": 1},
"propConfig": prop_config,
"props": {
"params": {"con_lines": [False] * 24, "con_lines_visible": con_lines_visible, "in": False, "out": False},
"path": "Windows/Tabs/Enternet Windows/Components/DPM_TO_HUB"
},
"type": "ia.display.view"
})
# Process all devices
for i, device_data in enumerate(device_list):
name, ip = device_data.split()
is_vfd = '_VFD' in name or '_EX' in name
component_name = name.replace("_VFD1", "").replace("_EX1", "") if is_vfd else name
# Adjust X position for FIO/SIO at positions 13-18
component_x = positions[i]["x"]
label_x = label_positions[i]["x"]
if not is_vfd and 12 <= i <= 17:
component_x -= 0.012
label_x -= 0.012
# Add device component
config["root"]["children"].append({
"meta": {"name": component_name},
"position": {"height": 0.1667, "width": 0.125, "x": component_x, "y": positions[i]["y"]},
"props": {"path": f"Windows/Tabs/Enternet Windows/Components/{'APF' if is_vfd else 'FIO_SIO'}"},
"type": "ia.display.view"
})
# Add device label
config["root"]["children"].append({
"meta": {"name": f"{component_name}_label"},
"position": {"height": 0.0358, "width": 0.0547 if is_vfd else 0.0427, "x": label_x, "y": label_positions[i]["y"]},
"props": {"text": f"{name} {ip}", "textStyle": {"fontSize": "1vmin", "key": "value"}},
"type": "ia.display.label"
})
# Add DPM label
config["root"]["children"].append({
"meta": {"name": "DPM_label"},
"position": {"height": 0.0694, "width": 0.101, "x": 0.5831, "y": 0.6342},
"props": {"text": dpm_label, "textStyle": {"fontSize": "2vmin"}},
"type": "ia.display.label"
})
return config
def parse_dpm_data(file_path):
dpms = {}
current_dpm = None
with open(file_path, 'r') as f:
for line in f:
line = line.strip()
if not line:
continue
if not ('\t' in line and len(line.split('\t')) == 2) and not (' ' in line and len(line.split(' ')) == 2):
current_dpm = line
dpms[current_dpm] = []
elif current_dpm:
parts = line.split('\t') if '\t' in line else line.split(' ')
dpms[current_dpm].append((parts[0].strip(), parts[1].strip()))
return dpms
def copy_files_to_dpm_folder(dpm_folder):
script_dir = os.path.dirname(os.path.abspath(__file__))
for file_name in ["resource.json", "thumbnail.png"]:
source = os.path.join(script_dir, file_name)
if os.path.exists(source):
shutil.copy2(source, os.path.join(dpm_folder, file_name))
def create_dpm_folders(dpms, mcm_folder):
os.makedirs(mcm_folder, exist_ok=True)
for dpm_name, devices in dpms.items():
print(f"Processing {dpm_name} with {len(devices)} devices...")
dpm_folder = os.path.join(mcm_folder, dpm_name)
os.makedirs(dpm_folder, exist_ok=True)
try:
# Count device types and create config
num_vfds = sum(1 for name, _ in devices if '_VFD' in name or '_EX' in name)
num_fios = len(devices) - num_vfds
device_list = [f"{name} {ip}" for name, ip in devices]
config = generate_config(num_vfds, num_fios, device_list, dpm_name)
# Save view.json and copy files
with open(os.path.join(dpm_folder, "view.json"), 'w') as f:
json.dump(config, f, indent=2)
copy_files_to_dpm_folder(dpm_folder)
except Exception as e:
print(f"Error processing {dpm_name}: {e}")
def main():
try:
if not input_file or not os.path.exists(input_file):
print(f"Error: File '{input_file}' not found.")
return
dpms = parse_dpm_data(input_file)
if not dpms:
print("No DPM data found in the input file.")
return
print(f"Found {len(dpms)} DPMs. Creating MCM folder '{mcm_folder_name}'...")
create_dpm_folders(dpms, mcm_folder_name)
print("Completed successfully, check the MCM folder!")
except Exception as e:
print(f"An error occurred: {str(e)}")
if __name__ == "__main__":
main()

View File

@ -0,0 +1,17 @@
{
"scope": "G",
"version": 1,
"restricted": false,
"overridable": true,
"files": [
"view.json",
"thumbnail.png"
],
"attributes": {
"lastModification": {
"actor": "admin",
"timestamp": "2025-07-17T07:45:56Z"
},
"lastModificationSignature": "39daee1537a141d2a6c70dab9fa8c4cc90b4e23e31420e0222122b62ee315c3a"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 144 KiB

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,418 @@
{
"custom": {
"dpm1-dpm2": true,
"dpm2-mcm": true,
"mcm-dpm1": true
},
"params": {
"tagProps": [
"DPM0_TAG",
"DPM1_TAG",
"DPM2_TAG"
]
},
"propConfig": {
"custom.dpm1-dpm2": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"1": "{view.params.tagProps[1]}",
"fc": "{session.custom.fc}"
},
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{1}/STATE"
},
"transforms": [
{
"expression": "coalesce({value},{view.params.forceFaultStatus},1)",
"type": "expression"
},
{
"fallback": false,
"inputType": "scalar",
"mappings": [
{
"input": 0,
"output": true
},
{
"input": 1,
"output": false
}
],
"outputType": "scalar",
"type": "map"
}
],
"type": "tag"
},
"persistent": true
},
"custom.dpm2-mcm": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"2": "{view.params.tagProps[2]}",
"fc": "{session.custom.fc}"
},
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{2}/STATE"
},
"transforms": [
{
"expression": "coalesce({value},{view.params.forceFaultStatus},1)",
"type": "expression"
},
{
"fallback": false,
"inputType": "scalar",
"mappings": [
{
"input": 0,
"output": true
},
{
"input": 1,
"output": false
}
],
"outputType": "scalar",
"type": "map"
}
],
"type": "tag"
},
"persistent": true
},
"custom.mcm-dpm1": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"0": "{view.params.tagProps[0]}",
"fc": "{session.custom.fc}"
},
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/STATE"
},
"transforms": [
{
"expression": "coalesce({value},{view.params.forceFaultStatus},1)",
"type": "expression"
},
{
"fallback": false,
"inputType": "scalar",
"mappings": [
{
"input": 0,
"output": true
},
{
"input": 1,
"output": false
}
],
"outputType": "scalar",
"type": "map"
}
],
"type": "tag"
},
"persistent": true
},
"params.tagProps": {
"paramDirection": "input",
"persistent": true
}
},
"props": {
"defaultSize": {
"height": 894,
"width": 1920
}
},
"root": {
"children": [
{
"events": {
"dom": {
"onClick": {
"config": {
"script": "\tself.session.custom.dpm_view_path \u003d self.props.params.view\n\tself.session.custom.show_dpm_device_view \u003d True"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "MCM"
},
"position": {
"height": 0.5,
"width": 0.5,
"x": 0.5,
"y": 0.5
},
"propConfig": {
"props.params.InOn": {
"binding": {
"config": {
"path": "view.custom.dpm2-mcm"
},
"type": "property"
}
},
"props.params.OutOn": {
"binding": {
"config": {
"path": "view.custom.mcm-dpm1"
},
"type": "property"
}
}
},
"props": {
"params": {
"InDown": false,
"InLeft": true,
"InUp": false,
"OutDown": false,
"OutRight": false,
"OutUp": true
},
"path": "Windows/Tabs/Enternet Windows/Components/EN4TR"
},
"type": "ia.display.view"
},
{
"events": {
"dom": {
"onClick": {
"config": {
"script": "\tself.session.custom.dpm_view_path \u003d self.props.params.view\n\tself.session.custom.show_dpm_device_view \u003d True"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "DPM1_DEVICE"
},
"position": {
"height": 0.5,
"width": 0.5,
"x": 0.5
},
"propConfig": {
"props.params.DownOn": {
"binding": {
"config": {
"path": "view.custom.mcm-dpm1"
},
"type": "property"
}
},
"props.params.InOn": {
"binding": {
"config": {
"path": "view.custom.dpm1-dpm2"
},
"type": "property"
}
},
"props.params.OutOn": {
"binding": {
"config": {
"path": "view.custom.mcm-dpm1"
},
"type": "property"
}
}
},
"props": {
"params": {
"Down1": false,
"Down2": false,
"Down3": true,
"DownLeft": false,
"DownRight": false,
"InDown": false,
"InLeft": true,
"InUp": false,
"OutDown": true,
"OutRight": false,
"OutUp": false,
"view": "Windows/Tabs/Enternet Windows/DPMs/DPM Devices/MCM01/DPM1_DEVICE"
},
"path": "Windows/Tabs/Enternet Windows/Components/DPM_BLOCK"
},
"type": "ia.display.view"
},
{
"events": {
"dom": {
"onClick": {
"config": {
"script": "\tself.session.custom.dpm_view_path \u003d self.props.params.view\n\tself.session.custom.show_dpm_device_view \u003d True"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "DPM2_DEVICE"
},
"position": {
"height": 0.5,
"width": 0.5
},
"propConfig": {
"props.params.DownOn": {
"binding": {
"config": {
"path": "view.custom.dpm2-mcm"
},
"type": "property"
}
},
"props.params.InOn": {
"binding": {
"config": {
"path": "view.custom.dpm2-mcm"
},
"type": "property"
}
},
"props.params.OutOn": {
"binding": {
"config": {
"path": "view.custom.dpm1-dpm2"
},
"type": "property"
}
}
},
"props": {
"params": {
"Down1": false,
"Down2": true,
"Down3": false,
"DownLeft": false,
"DownRight": false,
"InDown": true,
"InLeft": false,
"InUp": false,
"OutDown": false,
"OutRight": true,
"OutUp": false,
"view": "Windows/Tabs/Enternet Windows/DPMs/DPM Devices/MCM01/DPM2_DEVICE"
},
"path": "Windows/Tabs/Enternet Windows/Components/DPM_BLOCK"
},
"type": "ia.display.view"
},
{
"meta": {
"name": "DPM1_label"
},
"position": {
"height": 0.0358,
"width": 0.0547,
"x": 0.5,
"y": 0.1
},
"props": {
"text": "DPM1_TEXT",
"textStyle": {
"fontSize": "1vmin"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "DPM2_label"
},
"position": {
"height": 0.0358,
"width": 0.0547,
"x": 0.01,
"y": 0.1
},
"props": {
"text": "DPM2_TEXT",
"textStyle": {
"fontSize": "1vmin"
}
},
"type": "ia.display.label"
},
{
"events": {
"dom": {
"onClick": {
"config": {
"script": "\tself.session.custom.dpm_view_path \u003d self.props.params.view\n\tself.session.custom.show_dpm_device_view \u003d True"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "DPM2_DEVICE_0"
},
"position": {
"height": 0.5,
"width": 0.5,
"y": 0.5
},
"propConfig": {
"props.params.On": {
"binding": {
"config": {
"path": "view.custom.dpm2-mcm"
},
"type": "property"
}
}
},
"props": {
"params": {
"LD": false,
"LR": false,
"LRD": false,
"LRU": false,
"LU": false,
"RD": false,
"RLD": false,
"RLU": true,
"RU": false
},
"path": "Windows/Tabs/Enternet Windows/Components/CommLines"
},
"type": "ia.display.view"
}
],
"meta": {
"name": "root"
},
"position": {
"x": 120,
"y": -723
},
"props": {
"mode": "percent",
"style": {
"backgroundColor": "#ffffff"
}
},
"type": "ia.container.coord"
}
}

View File

@ -0,0 +1,487 @@
{
"custom": {
"dpm1-dpm2": false,
"dpm2-dpm3": false,
"dpm3-mcm": false,
"mcm-dpm1": false
},
"params": {
"tagProps": [
"DPM0_TAG",
"DPM1_TAG",
"DPM2_TAG",
"DPM3_TAG"
]
},
"propConfig": {
"custom.dpm1-dpm2": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"1": "{view.params.tagProps[1]}",
"fc": "{session.custom.fc}"
},
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{1}/STATE"
},
"transforms": [
{
"expression": "coalesce({value},{view.params.forceFaultStatus},1)",
"type": "expression"
},
{
"fallback": false,
"inputType": "scalar",
"mappings": [
{
"input": 0,
"output": true
},
{
"input": 1,
"output": false
}
],
"outputType": "scalar",
"type": "map"
}
],
"type": "tag"
},
"persistent": true
},
"custom.dpm2-dpm3": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"2": "{view.params.tagProps[2]}",
"fc": "{session.custom.fc}"
},
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{2}/STATE"
},
"transforms": [
{
"expression": "coalesce({value},{view.params.forceFaultStatus},1)",
"type": "expression"
},
{
"fallback": false,
"inputType": "scalar",
"mappings": [
{
"input": 0,
"output": true
},
{
"input": 1,
"output": false
}
],
"outputType": "scalar",
"type": "map"
}
],
"type": "tag"
},
"persistent": true
},
"custom.dpm3-mcm": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"3": "{view.params.tagProps[3]}",
"fc": "{session.custom.fc}"
},
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{3}/STATE"
},
"transforms": [
{
"expression": "coalesce({value},{view.params.forceFaultStatus},1)",
"type": "expression"
},
{
"fallback": false,
"inputType": "scalar",
"mappings": [
{
"input": 0,
"output": true
},
{
"input": 1,
"output": false
}
],
"outputType": "scalar",
"type": "map"
}
],
"type": "tag"
},
"persistent": true
},
"custom.mcm-dpm1": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"0": "{view.params.tagProps[0]}",
"fc": "{session.custom.fc}"
},
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/STATE"
},
"transforms": [
{
"expression": "coalesce({value},{view.params.forceFaultStatus},1)",
"type": "expression"
},
{
"fallback": false,
"inputType": "scalar",
"mappings": [
{
"input": 0,
"output": true
},
{
"input": 1,
"output": false
}
],
"outputType": "scalar",
"type": "map"
}
],
"type": "tag"
},
"persistent": true
},
"params.tagProps": {
"paramDirection": "input",
"persistent": true
}
},
"props": {
"defaultSize": {
"height": 894,
"width": 1920
}
},
"root": {
"children": [
{
"events": {
"dom": {
"onClick": {
"config": {
"script": "\tself.session.custom.dpm_view_path \u003d self.props.params.view\n\tself.session.custom.show_dpm_device_view \u003d True"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "MCM"
},
"position": {
"height": 0.5,
"width": 0.5,
"x": 0.5,
"y": 0.5
},
"propConfig": {
"props.params.InOn": {
"binding": {
"config": {
"path": "view.custom.dpm3-mcm"
},
"type": "property"
}
},
"props.params.OutOn": {
"binding": {
"config": {
"path": "view.custom.mcm-dpm1"
},
"type": "property"
}
}
},
"props": {
"params": {
"InDown": false,
"InLeft": true,
"InUp": false,
"OutDown": false,
"OutRight": false,
"OutUp": true
},
"path": "Windows/Tabs/Enternet Windows/Components/EN4TR"
},
"type": "ia.display.view"
},
{
"events": {
"dom": {
"onClick": {
"config": {
"script": "\tself.session.custom.dpm_view_path \u003d self.props.params.view\n\tself.session.custom.show_dpm_device_view \u003d True"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "DPM1_DEVICE"
},
"position": {
"height": 0.5,
"width": 0.5,
"x": 0.5
},
"propConfig": {
"props.params.DownOn": {
"binding": {
"config": {
"path": "view.custom.mcm-dpm1"
},
"type": "property"
}
},
"props.params.InOn": {
"binding": {
"config": {
"path": "view.custom.dpm1-dpm2"
},
"type": "property"
}
},
"props.params.OutOn": {
"binding": {
"config": {
"path": "view.custom.mcm-dpm1"
},
"type": "property"
}
}
},
"props": {
"params": {
"Down1": false,
"Down2": false,
"Down3": true,
"DownLeft": false,
"DownRight": false,
"InDown": false,
"InLeft": true,
"InUp": false,
"OutDown": true,
"OutRight": false,
"OutUp": false,
"view": "Windows/Tabs/Enternet Windows/DPMs/DPM Devices/MCM01/DPM1_DEVICE"
},
"path": "Windows/Tabs/Enternet Windows/Components/DPM_BLOCK"
},
"type": "ia.display.view"
},
{
"events": {
"dom": {
"onClick": {
"config": {
"script": "\tself.session.custom.dpm_view_path \u003d self.props.params.view\n\tself.session.custom.show_dpm_device_view \u003d True"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "DPM2_DEVICE"
},
"position": {
"height": 0.5,
"width": 0.5
},
"propConfig": {
"props.params.DownOn": {
"binding": {
"config": {
"path": "view.custom.dpm2-dpm3"
},
"type": "property"
}
},
"props.params.InOn": {
"binding": {
"config": {
"path": "view.custom.dpm2-dpm3"
},
"type": "property"
}
},
"props.params.OutOn": {
"binding": {
"config": {
"path": "view.custom.dpm1-dpm2"
},
"type": "property"
}
}
},
"props": {
"params": {
"Down1": false,
"Down2": true,
"Down3": false,
"DownLeft": false,
"DownRight": false,
"InDown": true,
"InLeft": false,
"InUp": false,
"OutDown": false,
"OutRight": true,
"OutUp": false,
"view": "Windows/Tabs/Enternet Windows/DPMs/DPM Devices/MCM01/DPM2_DEVICE"
},
"path": "Windows/Tabs/Enternet Windows/Components/DPM_BLOCK"
},
"type": "ia.display.view"
},
{
"events": {
"dom": {
"onClick": {
"config": {
"script": "\tself.session.custom.dpm_view_path \u003d self.props.params.view\n\tself.session.custom.show_dpm_device_view \u003d True"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "DPM3_DEVICE"
},
"position": {
"height": 0.5,
"width": 0.5,
"y": 0.5
},
"propConfig": {
"props.params.InOn": {
"binding": {
"config": {
"path": "view.custom.dpm2-dpm3"
},
"type": "property"
}
},
"props.params.OutOn": {
"binding": {
"config": {
"path": "view.custom.dpm3-mcm"
},
"type": "property"
}
}
},
"props": {
"params": {
"Down1": false,
"Down2": false,
"Down3": false,
"DownLeft": false,
"DownOn": false,
"DownRight": false,
"InDown": false,
"InLeft": false,
"InUp": true,
"OutDown": false,
"OutRight": true,
"OutUp": false,
"view": "Windows/Tabs/Enternet Windows/DPMs/DPM Devices/MCM01/DPM1_DEVICE"
},
"path": "Windows/Tabs/Enternet Windows/Components/DPM_BLOCK"
},
"type": "ia.display.view"
},
{
"meta": {
"name": "DPM1_label"
},
"position": {
"height": 0.0358,
"width": 0.0547,
"x": 0.5,
"y": 0.1
},
"props": {
"text": "DPM1_TEXT",
"textStyle": {
"fontSize": "1vmin"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "DPM2_label"
},
"position": {
"height": 0.0358,
"width": 0.0547,
"x": 0.01,
"y": 0.1
},
"props": {
"text": "DPM2_TEXT",
"textStyle": {
"fontSize": "1vmin"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "DPM3_label"
},
"position": {
"height": 0.0358,
"width": 0.0547,
"x": 0.01,
"y": 0.6
},
"props": {
"text": "DPM3_TEXT",
"textStyle": {
"fontSize": "1vmin"
}
},
"type": "ia.display.label"
}
],
"meta": {
"name": "root"
},
"position": {
"x": 120,
"y": -723
},
"props": {
"mode": "percent",
"style": {
"backgroundColor": "#ffffff"
}
},
"type": "ia.container.coord"
}
}

View File

@ -0,0 +1,640 @@
{
"custom": {
"dpm1-dpm2": false,
"dpm2-dpm3": false,
"dpm3-dpm4": false,
"dpm4-mcm": false,
"mcm-dpm1": false
},
"params": {
"tagProps": [
"DPM0_TAG",
"DPM1_TAG",
"DPM2_TAG",
"DPM3_TAG",
"DPM4_TAG"
]
},
"propConfig": {
"custom.dpm1-dpm2": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"1": "{view.params.tagProps[1]}",
"fc": "{session.custom.fc}"
},
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{1}/STATE"
},
"transforms": [
{
"expression": "coalesce({value},{view.params.forceFaultStatus},1)",
"type": "expression"
},
{
"fallback": false,
"inputType": "scalar",
"mappings": [
{
"input": 0,
"output": true
},
{
"input": 1,
"output": false
}
],
"outputType": "scalar",
"type": "map"
}
],
"type": "tag"
},
"persistent": true
},
"custom.dpm2-dpm3": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"2": "{view.params.tagProps[2]}",
"fc": "{session.custom.fc}"
},
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{2}/STATE"
},
"transforms": [
{
"expression": "coalesce({value},{view.params.forceFaultStatus},1)",
"type": "expression"
},
{
"fallback": false,
"inputType": "scalar",
"mappings": [
{
"input": 0,
"output": true
},
{
"input": 1,
"output": false
}
],
"outputType": "scalar",
"type": "map"
}
],
"type": "tag"
},
"persistent": true
},
"custom.dpm3-dpm4": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"3": "{view.params.tagProps[3]}",
"fc": "{session.custom.fc}"
},
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{3}/STATE"
},
"transforms": [
{
"expression": "coalesce({value},{view.params.forceFaultStatus},1)",
"type": "expression"
},
{
"fallback": false,
"inputType": "scalar",
"mappings": [
{
"input": 0,
"output": true
},
{
"input": 1,
"output": false
}
],
"outputType": "scalar",
"type": "map"
}
],
"type": "tag"
},
"persistent": true
},
"custom.dpm4-mcm": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"4": "{view.params.tagProps[4]}",
"fc": "{session.custom.fc}"
},
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{4}/STATE"
},
"transforms": [
{
"expression": "coalesce({value},{view.params.forceFaultStatus},1)",
"type": "expression"
},
{
"fallback": false,
"inputType": "scalar",
"mappings": [
{
"input": 0,
"output": true
},
{
"input": 1,
"output": false
}
],
"outputType": "scalar",
"type": "map"
}
],
"type": "tag"
},
"persistent": true
},
"custom.mcm-dpm1": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"0": "{view.params.tagProps[0]}",
"fc": "{session.custom.fc}"
},
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/STATE"
},
"transforms": [
{
"expression": "coalesce({value},{view.params.forceFaultStatus},1)",
"type": "expression"
},
{
"fallback": false,
"inputType": "scalar",
"mappings": [
{
"input": 0,
"output": true
},
{
"input": 1,
"output": false
}
],
"outputType": "scalar",
"type": "map"
}
],
"type": "tag"
},
"persistent": true
},
"params.tagProps": {
"paramDirection": "input",
"persistent": true
}
},
"props": {
"defaultSize": {
"height": 894,
"width": 1920
}
},
"root": {
"children": [
{
"events": {
"dom": {
"onClick": {
"config": {
"script": "\tself.session.custom.dpm_view_path \u003d self.props.params.view\n\tself.session.custom.show_dpm_device_view \u003d True"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "MCM"
},
"position": {
"height": 0.5,
"width": 0.3333,
"x": 0.6666,
"y": 0.5
},
"propConfig": {
"props.params.InOn": {
"binding": {
"config": {
"path": "view.custom.dpm4-mcm"
},
"type": "property"
}
},
"props.params.OutOn": {
"binding": {
"config": {
"path": "view.custom.mcm-dpm1"
},
"type": "property"
}
}
},
"props": {
"params": {
"InDown": false,
"InLeft": true,
"InUp": false,
"OutDown": false,
"OutRight": false,
"OutUp": true
},
"path": "Windows/Tabs/Enternet Windows/Components/EN4TR"
},
"type": "ia.display.view"
},
{
"events": {
"dom": {
"onClick": {
"config": {
"script": "\tself.session.custom.dpm_view_path \u003d self.props.params.view\n\tself.session.custom.show_dpm_device_view \u003d True"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "DPM1_DEVICE"
},
"position": {
"height": 0.5,
"width": 0.3333,
"x": 0.6666
},
"propConfig": {
"props.params.InOn": {
"binding": {
"config": {
"path": "view.custom.dpm1-dpm2"
},
"type": "property"
}
},
"props.params.OutOn": {
"binding": {
"config": {
"path": "view.custom.mcm-dpm1"
},
"type": "property"
}
}
},
"props": {
"params": {
"Down1": false,
"Down2": false,
"Down3": true,
"DownLeft": false,
"DownOn": false,
"DownRight": false,
"InDown": false,
"InLeft": true,
"InUp": false,
"OutDown": true,
"OutRight": false,
"OutUp": false,
"view": "Windows/Tabs/Enternet Windows/DPMs/DPM Devices/MCM01/DPM1_DEVICE"
},
"path": "Windows/Tabs/Enternet Windows/Components/DPM_BLOCK"
},
"type": "ia.display.view"
},
{
"events": {
"dom": {
"onClick": {
"config": {
"script": "\tself.session.custom.dpm_view_path \u003d self.props.params.view\n\tself.session.custom.show_dpm_device_view \u003d True"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "DPM2_DEVICE"
},
"position": {
"height": 0.5,
"width": 0.3333,
"x": 0.3333
},
"propConfig": {
"props.params.InOn": {
"binding": {
"config": {
"path": "view.custom.dpm2-dpm3"
},
"type": "property"
}
},
"props.params.OutOn": {
"binding": {
"config": {
"path": "view.custom.dpm1-dpm2"
},
"type": "property"
}
}
},
"props": {
"params": {
"Down1": false,
"Down2": false,
"Down3": false,
"DownLeft": false,
"DownOn": false,
"DownRight": false,
"InDown": false,
"InLeft": true,
"InUp": false,
"OutDown": false,
"OutRight": true,
"OutUp": false,
"view": "Windows/Tabs/Enternet Windows/DPMs/DPM Devices/MCM01/DPM2_DEVICE"
},
"path": "Windows/Tabs/Enternet Windows/Components/DPM_BLOCK"
},
"type": "ia.display.view"
},
{
"events": {
"dom": {
"onClick": {
"config": {
"script": "\tself.session.custom.dpm_view_path \u003d self.props.params.view\n\tself.session.custom.show_dpm_device_view \u003d True"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "DPM3_DEVICE"
},
"position": {
"height": 0.5,
"width": 0.3333
},
"propConfig": {
"props.params.DownOn": {
"binding": {
"config": {
"path": "view.custom.dpm3-dpm4"
},
"type": "property"
}
},
"props.params.InOn": {
"binding": {
"config": {
"path": "view.custom.dpm3-dpm4"
},
"type": "property"
}
},
"props.params.OutOn": {
"binding": {
"config": {
"path": "view.custom.dpm2-dpm3"
},
"type": "property"
}
}
},
"props": {
"params": {
"Down1": false,
"Down2": true,
"Down3": false,
"DownLeft": false,
"DownRight": false,
"InDown": true,
"InLeft": false,
"InUp": false,
"OutDown": false,
"OutRight": true,
"OutUp": false,
"view": "Windows/Tabs/Enternet Windows/DPMs/DPM Devices/MCM01/DPM3_DEVICE"
},
"path": "Windows/Tabs/Enternet Windows/Components/DPM_BLOCK"
},
"type": "ia.display.view"
},
{
"events": {
"dom": {
"onClick": {
"config": {
"script": "\tself.session.custom.dpm_view_path \u003d self.props.params.view\n\tself.session.custom.show_dpm_device_view \u003d True"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "DPM4_DEVICE"
},
"position": {
"height": 0.5,
"width": 0.3333,
"y": 0.5
},
"propConfig": {
"props.params.InOn": {
"binding": {
"config": {
"path": "view.custom.dpm3-dpm4"
},
"type": "property"
}
},
"props.params.OutOn": {
"binding": {
"config": {
"path": "view.custom.dpm4-mcm"
},
"type": "property"
}
}
},
"props": {
"params": {
"Down1": false,
"Down2": false,
"Down3": false,
"DownLeft": false,
"DownOn": false,
"DownRight": false,
"InDown": false,
"InLeft": false,
"InUp": true,
"OutDown": false,
"OutRight": true,
"OutUp": false,
"view": "Windows/Tabs/Enternet Windows/DPMs/DPM Devices/MCM01/DPM4_DEVICE"
},
"path": "Windows/Tabs/Enternet Windows/Components/DPM_BLOCK"
},
"type": "ia.display.view"
},
{
"meta": {
"name": "DPM1_label"
},
"position": {
"height": 0.0358,
"width": 0.0547,
"x": 0.65,
"y": 0.1
},
"props": {
"text": "DPM1_TEXT",
"textStyle": {
"fontSize": "1vmin"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "DPM2_label"
},
"position": {
"height": 0.0358,
"width": 0.0547,
"x": 0.32,
"y": 0.1
},
"props": {
"text": "DPM2_TEXT",
"textStyle": {
"fontSize": "1vmin"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "DPM3_label"
},
"position": {
"height": 0.0358,
"width": 0.0547,
"x": 0.005,
"y": 0.1
},
"props": {
"text": "DPM3_TEXT",
"textStyle": {
"fontSize": "1vmin"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "DPM4_label"
},
"position": {
"height": 0.0358,
"width": 0.0547,
"x": 0.005,
"y": 0.6
},
"props": {
"text": "DPM4_TEXT",
"textStyle": {
"fontSize": "1vmin"
}
},
"type": "ia.display.label"
},
{
"events": {
"dom": {
"onClick": {
"config": {
"script": "\tself.session.custom.dpm_view_path \u003d self.props.params.view\n\tself.session.custom.show_dpm_device_view \u003d True"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "DEVICE"
},
"position": {
"height": 0.5,
"width": 0.3333,
"x": 0.3333,
"y": 0.4999
},
"propConfig": {
"props.params.On": {
"binding": {
"config": {
"path": "view.custom.dpm4-mcm"
},
"type": "property"
}
}
},
"props": {
"params": {
"LR": true,
"LRU": false,
"LU": false,
"RD": false,
"RLD": false,
"RLU": false,
"RU": false
},
"path": "Windows/Tabs/Enternet Windows/Components/CommLines"
},
"type": "ia.display.view"
}
],
"meta": {
"name": "root"
},
"position": {
"x": 120,
"y": -723
},
"props": {
"mode": "percent",
"style": {
"backgroundColor": "#ffffff"
}
},
"type": "ia.container.coord"
}
}

View File

@ -0,0 +1,718 @@
{
"custom": {
"dpm1-dpm2": false,
"dpm2-dpm3": false,
"dpm3-dpm4": false,
"dpm4-dpm5": false,
"dpm5-mcm": false,
"mcm-dpm1": false
},
"params": {
"tagProps": [
"DPM0_TAG",
"DPM1_TAG",
"DPM2_TAG",
"DPM3_TAG",
"DPM4_TAG",
"DPM5_TAG"
]
},
"propConfig": {
"custom.dpm1-dpm2": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"1": "{view.params.tagProps[1]}",
"fc": "{session.custom.fc}"
},
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{1}/STATE"
},
"transforms": [
{
"expression": "coalesce({value},{view.params.forceFaultStatus},1)",
"type": "expression"
},
{
"fallback": false,
"inputType": "scalar",
"mappings": [
{
"input": 0,
"output": true
},
{
"input": 1,
"output": false
}
],
"outputType": "scalar",
"type": "map"
}
],
"type": "tag"
},
"persistent": true
},
"custom.dpm2-dpm3": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"2": "{view.params.tagProps[2]}",
"fc": "{session.custom.fc}"
},
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{2}/STATE"
},
"transforms": [
{
"expression": "coalesce({value},{view.params.forceFaultStatus},1)",
"type": "expression"
},
{
"fallback": false,
"inputType": "scalar",
"mappings": [
{
"input": 0,
"output": true
},
{
"input": 1,
"output": false
}
],
"outputType": "scalar",
"type": "map"
}
],
"type": "tag"
},
"persistent": true
},
"custom.dpm3-dpm4": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"3": "{view.params.tagProps[3]}",
"fc": "{session.custom.fc}"
},
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{3}/STATE"
},
"transforms": [
{
"expression": "coalesce({value},{view.params.forceFaultStatus},1)",
"type": "expression"
},
{
"fallback": false,
"inputType": "scalar",
"mappings": [
{
"input": 0,
"output": true
},
{
"input": 1,
"output": false
}
],
"outputType": "scalar",
"type": "map"
}
],
"type": "tag"
},
"persistent": true
},
"custom.dpm4-dpm5": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"4": "{view.params.tagProps[4]}",
"fc": "{session.custom.fc}"
},
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{4}/STATE"
},
"transforms": [
{
"expression": "coalesce({value},{view.params.forceFaultStatus},1)",
"type": "expression"
},
{
"fallback": false,
"inputType": "scalar",
"mappings": [
{
"input": 0,
"output": true
},
{
"input": 1,
"output": false
}
],
"outputType": "scalar",
"type": "map"
}
],
"type": "tag"
},
"persistent": true
},
"custom.dpm5-mcm": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"5": "{view.params.tagProps[5]}",
"fc": "{session.custom.fc}"
},
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{5}/STATE"
},
"transforms": [
{
"expression": "coalesce({value},{view.params.forceFaultStatus},1)",
"type": "expression"
},
{
"fallback": false,
"inputType": "scalar",
"mappings": [
{
"input": 0,
"output": true
},
{
"input": 1,
"output": false
}
],
"outputType": "scalar",
"type": "map"
}
],
"type": "tag"
},
"persistent": true
},
"custom.mcm-dpm1": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"0": "{view.params.tagProps[0]}",
"fc": "{session.custom.fc}"
},
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/STATE"
},
"transforms": [
{
"expression": "coalesce({value},{view.params.forceFaultStatus},1)",
"type": "expression"
},
{
"fallback": false,
"inputType": "scalar",
"mappings": [
{
"input": 0,
"output": true
},
{
"input": 1,
"output": false
}
],
"outputType": "scalar",
"type": "map"
}
],
"type": "tag"
},
"persistent": true
},
"params.tagProps": {
"paramDirection": "input",
"persistent": true
}
},
"props": {
"defaultSize": {
"height": 894,
"width": 1920
}
},
"root": {
"children": [
{
"events": {
"dom": {
"onClick": {
"config": {
"script": "\tself.session.custom.dpm_view_path \u003d self.props.params.view\n\tself.session.custom.show_dpm_device_view \u003d True"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "MCM"
},
"position": {
"height": 0.5,
"width": 0.3333,
"x": 0.6666,
"y": 0.5
},
"propConfig": {
"props.params.InOn": {
"binding": {
"config": {
"path": "view.custom.dpm5-mcm"
},
"type": "property"
}
},
"props.params.OutOn": {
"binding": {
"config": {
"path": "view.custom.mcm-dpm1"
},
"type": "property"
}
}
},
"props": {
"params": {
"InDown": false,
"InLeft": true,
"InUp": false,
"OutDown": false,
"OutRight": false,
"OutUp": true
},
"path": "Windows/Tabs/Enternet Windows/Components/EN4TR"
},
"type": "ia.display.view"
},
{
"events": {
"dom": {
"onClick": {
"config": {
"script": "\tself.session.custom.dpm_view_path \u003d self.props.params.view\n\tself.session.custom.show_dpm_device_view \u003d True"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "DPM1_DEVICE"
},
"position": {
"height": 0.5,
"width": 0.3333,
"x": 0.6666
},
"propConfig": {
"props.params.DownOn": {
"binding": {
"config": {
"path": "view.custom.mcm-dpm1"
},
"type": "property"
}
},
"props.params.InOn": {
"binding": {
"config": {
"path": "view.custom.dpm1-dpm2"
},
"type": "property"
}
},
"props.params.OutOn": {
"binding": {
"config": {
"path": "view.custom.mcm-dpm1"
},
"type": "property"
}
}
},
"props": {
"params": {
"Down1": false,
"Down2": false,
"Down3": true,
"DownLeft": false,
"DownRight": false,
"InDown": false,
"InLeft": true,
"InUp": false,
"OutDown": true,
"OutRight": false,
"OutUp": false,
"view": "Windows/Tabs/Enternet Windows/DPMs/DPM Devices/MCM01/DPM1_DEVICE"
},
"path": "Windows/Tabs/Enternet Windows/Components/DPM_BLOCK"
},
"type": "ia.display.view"
},
{
"events": {
"dom": {
"onClick": {
"config": {
"script": "\tself.session.custom.dpm_view_path \u003d self.props.params.view\n\tself.session.custom.show_dpm_device_view \u003d True"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "DPM2_DEVICE"
},
"position": {
"height": 0.5,
"width": 0.3333,
"x": 0.3333
},
"propConfig": {
"props.params.InOn": {
"binding": {
"config": {
"path": "view.custom.dpm2-dpm3"
},
"type": "property"
}
},
"props.params.OutOn": {
"binding": {
"config": {
"path": "view.custom.dpm1-dpm2"
},
"type": "property"
}
}
},
"props": {
"params": {
"Down1": false,
"Down2": false,
"Down3": false,
"DownLeft": false,
"DownOn": false,
"DownRight": false,
"InDown": false,
"InLeft": true,
"InUp": false,
"OutDown": false,
"OutRight": true,
"OutUp": false,
"view": "Windows/Tabs/Enternet Windows/DPMs/DPM Devices/MCM01/DPM2_DEVICE"
},
"path": "Windows/Tabs/Enternet Windows/Components/DPM_BLOCK"
},
"type": "ia.display.view"
},
{
"events": {
"dom": {
"onClick": {
"config": {
"script": "\tself.session.custom.dpm_view_path \u003d self.props.params.view\n\tself.session.custom.show_dpm_device_view \u003d True"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "DPM3_DEVICE"
},
"position": {
"height": 0.5,
"width": 0.3333
},
"propConfig": {
"props.params.DownOn": {
"binding": {
"config": {
"path": "view.custom.dpm3-dpm4"
},
"type": "property"
}
},
"props.params.InOn": {
"binding": {
"config": {
"path": "view.custom.dpm3-dpm4"
},
"type": "property"
}
},
"props.params.OutOn": {
"binding": {
"config": {
"path": "view.custom.dpm2-dpm3"
},
"type": "property"
}
}
},
"props": {
"params": {
"Down1": false,
"Down2": true,
"Down3": false,
"DownLeft": false,
"DownRight": false,
"InDown": true,
"InLeft": false,
"InUp": false,
"OutDown": false,
"OutRight": true,
"OutUp": false,
"view": "Windows/Tabs/Enternet Windows/DPMs/DPM Devices/MCM01/DPM3_DEVICE"
},
"path": "Windows/Tabs/Enternet Windows/Components/DPM_BLOCK"
},
"type": "ia.display.view"
},
{
"events": {
"dom": {
"onClick": {
"config": {
"script": "\tself.session.custom.dpm_view_path \u003d self.props.params.view\n\tself.session.custom.show_dpm_device_view \u003d True"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "DPM4_DEVICE"
},
"position": {
"height": 0.5,
"width": 0.3333,
"y": 0.5
},
"propConfig": {
"props.params.InOn": {
"binding": {
"config": {
"path": "view.custom.dpm3-dpm4"
},
"type": "property"
}
},
"props.params.OutOn": {
"binding": {
"config": {
"path": "view.custom.dpm4-dpm5"
},
"type": "property"
}
}
},
"props": {
"params": {
"Down1": false,
"Down2": false,
"Down3": false,
"DownLeft": false,
"DownOn": false,
"DownRight": false,
"InDown": false,
"InLeft": false,
"InUp": true,
"OutDown": false,
"OutRight": true,
"OutUp": false,
"view": "Windows/Tabs/Enternet Windows/DPMs/DPM Devices/MCM01/DPM4_DEVICE"
},
"path": "Windows/Tabs/Enternet Windows/Components/DPM_BLOCK"
},
"type": "ia.display.view"
},
{
"events": {
"dom": {
"onClick": {
"config": {
"script": "\tself.session.custom.dpm_view_path \u003d self.props.params.view\n\tself.session.custom.show_dpm_device_view \u003d True"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "DPM5_DEVICE"
},
"position": {
"height": 0.5,
"width": 0.3333,
"x": 0.3333,
"y": 0.5
},
"propConfig": {
"props.params.InOn": {
"binding": {
"config": {
"path": "view.custom.dpm4-dpm5"
},
"type": "property"
}
},
"props.params.OutOn": {
"binding": {
"config": {
"path": "view.custom.dpm5-mcm"
},
"type": "property"
}
}
},
"props": {
"params": {
"Down1": false,
"Down2": false,
"Down3": false,
"DownLeft": false,
"DownOn": false,
"DownRight": false,
"InDown": false,
"InLeft": true,
"InUp": false,
"OutDown": false,
"OutRight": true,
"OutUp": false,
"view": "Windows/Tabs/Enternet Windows/DPMs/DPM Devices/MCM01/DPM5_DEVICE"
},
"path": "Windows/Tabs/Enternet Windows/Components/DPM_BLOCK"
},
"type": "ia.display.view"
},
{
"meta": {
"name": "DPM1_label"
},
"position": {
"height": 0.0358,
"width": 0.0547,
"x": 0.65,
"y": 0.1
},
"props": {
"text": "DPM1_TEXT",
"textStyle": {
"fontSize": "1vmin"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "DPM2_label"
},
"position": {
"height": 0.0358,
"width": 0.0547,
"x": 0.32,
"y": 0.1
},
"props": {
"text": "DPM2_TEXT",
"textStyle": {
"fontSize": "1vmin"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "DPM3_label"
},
"position": {
"height": 0.0358,
"width": 0.0547,
"x": 0.005,
"y": 0.1
},
"props": {
"text": "DPM3_TEXT",
"textStyle": {
"fontSize": "1vmin"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "DPM4_label"
},
"position": {
"height": 0.0358,
"width": 0.0547,
"x": 0.005,
"y": 0.6
},
"props": {
"text": "DPM4_TEXT",
"textStyle": {
"fontSize": "1vmin"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "DPM5_label"
},
"position": {
"height": 0.0358,
"width": 0.0547,
"x": 0.32,
"y": 0.6
},
"props": {
"text": "DPM5_TEXT",
"textStyle": {
"fontSize": "1vmin"
}
},
"type": "ia.display.label"
}
],
"meta": {
"name": "root"
},
"position": {
"x": 120,
"y": -723
},
"props": {
"mode": "percent",
"style": {
"backgroundColor": "#ffffff"
}
},
"type": "ia.container.coord"
}
}

View File

@ -0,0 +1,887 @@
{
"custom": {
"dpm1-dpm2": false,
"dpm2-dpm3": false,
"dpm3-dpm4": false,
"dpm4-dpm5": false,
"dpm5-dpm6": false,
"dpm6-mcm": false,
"mcm-dpm1": false
},
"params": {
"tagProps": [
"DPM0_TAG",
"DPM1_TAG",
"DPM2_TAG",
"DPM3_TAG",
"DPM4_TAG",
"DPM5_TAG",
"DPM6_TAG"
]
},
"propConfig": {
"custom.dpm1-dpm2": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"1": "{view.params.tagProps[1]}",
"fc": "{session.custom.fc}"
},
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{1}/STATE"
},
"transforms": [
{
"expression": "coalesce({value},{view.params.forceFaultStatus},1)",
"type": "expression"
},
{
"fallback": false,
"inputType": "scalar",
"mappings": [
{
"input": 0,
"output": true
},
{
"input": 1,
"output": false
}
],
"outputType": "scalar",
"type": "map"
}
],
"type": "tag"
},
"persistent": true
},
"custom.dpm2-dpm3": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"2": "{view.params.tagProps[2]}",
"fc": "{session.custom.fc}"
},
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{2}/STATE"
},
"transforms": [
{
"expression": "coalesce({value},{view.params.forceFaultStatus},1)",
"type": "expression"
},
{
"fallback": false,
"inputType": "scalar",
"mappings": [
{
"input": 0,
"output": true
},
{
"input": 1,
"output": false
}
],
"outputType": "scalar",
"type": "map"
}
],
"type": "tag"
},
"persistent": true
},
"custom.dpm3-dpm4": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"3": "{view.params.tagProps[3]}",
"fc": "{session.custom.fc}"
},
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{3}/STATE"
},
"transforms": [
{
"expression": "coalesce({value},{view.params.forceFaultStatus},1)",
"type": "expression"
},
{
"fallback": false,
"inputType": "scalar",
"mappings": [
{
"input": 0,
"output": true
},
{
"input": 1,
"output": false
}
],
"outputType": "scalar",
"type": "map"
}
],
"type": "tag"
},
"persistent": true
},
"custom.dpm4-dpm5": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"4": "{view.params.tagProps[4]}",
"fc": "{session.custom.fc}"
},
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{4}/STATE"
},
"transforms": [
{
"expression": "coalesce({value},{view.params.forceFaultStatus},1)",
"type": "expression"
},
{
"fallback": false,
"inputType": "scalar",
"mappings": [
{
"input": 0,
"output": true
},
{
"input": 1,
"output": false
}
],
"outputType": "scalar",
"type": "map"
}
],
"type": "tag"
},
"persistent": true
},
"custom.dpm5-dpm6": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"5": "{view.params.tagProps[5]}",
"fc": "{session.custom.fc}"
},
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{5}/STATE"
},
"transforms": [
{
"expression": "coalesce({value},{view.params.forceFaultStatus},1)",
"type": "expression"
},
{
"fallback": false,
"inputType": "scalar",
"mappings": [
{
"input": 0,
"output": true
},
{
"input": 1,
"output": false
}
],
"outputType": "scalar",
"type": "map"
}
],
"type": "tag"
},
"persistent": true
},
"custom.dpm6-mcm": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"6": "{view.params.tagProps[6]}",
"fc": "{session.custom.fc}"
},
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{6}/STATE"
},
"transforms": [
{
"expression": "coalesce({value},{view.params.forceFaultStatus},1)",
"type": "expression"
},
{
"fallback": false,
"inputType": "scalar",
"mappings": [
{
"input": 0,
"output": true
},
{
"input": 1,
"output": false
}
],
"outputType": "scalar",
"type": "map"
}
],
"type": "tag"
},
"persistent": true
},
"custom.mcm-dpm1": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"0": "{view.params.tagProps[0]}",
"fc": "{session.custom.fc}"
},
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/STATE"
},
"transforms": [
{
"expression": "coalesce({value},{view.params.forceFaultStatus},1)",
"type": "expression"
},
{
"fallback": false,
"inputType": "scalar",
"mappings": [
{
"input": 0,
"output": true
},
{
"input": 1,
"output": false
}
],
"outputType": "scalar",
"type": "map"
}
],
"type": "tag"
},
"persistent": true
},
"params.tagProps": {
"paramDirection": "input",
"persistent": true
}
},
"props": {
"defaultSize": {
"height": 894,
"width": 1920
}
},
"root": {
"children": [
{
"events": {
"dom": {
"onClick": {
"config": {
"script": "\tself.session.custom.dpm_view_path \u003d self.props.params.view\n\tself.session.custom.show_dpm_device_view \u003d True"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "MCM"
},
"position": {
"height": 0.3333,
"width": 0.3333,
"x": 0.6666,
"y": 0.3333
},
"propConfig": {
"props.params.InOn": {
"binding": {
"config": {
"path": "view.custom.dpm6-mcm"
},
"type": "property"
}
},
"props.params.OutOn": {
"binding": {
"config": {
"path": "view.custom.mcm-dpm1"
},
"type": "property"
}
}
},
"props": {
"params": {
"InDown": false,
"InLeft": true,
"InUp": false,
"OutDown": false,
"OutRight": false,
"OutUp": true
},
"path": "Windows/Tabs/Enternet Windows/Components/EN4TR"
},
"type": "ia.display.view"
},
{
"events": {
"dom": {
"onClick": {
"config": {
"script": "\tself.session.custom.dpm_view_path \u003d self.props.params.view\n\tself.session.custom.show_dpm_device_view \u003d True"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "DPM1_DEVICE"
},
"position": {
"height": 0.3333,
"width": 0.3333,
"x": 0.3333
},
"propConfig": {
"props.params.InOn": {
"binding": {
"config": {
"path": "view.custom.dpm1-dpm2"
},
"type": "property"
}
},
"props.params.OutOn": {
"binding": {
"config": {
"path": "view.custom.mcm-dpm1"
},
"type": "property"
}
}
},
"props": {
"params": {
"Down1": false,
"Down2": false,
"Down3": false,
"DownLeft": false,
"DownOn": false,
"DownRight": false,
"InDown": false,
"InLeft": true,
"InUp": false,
"OutDown": false,
"OutRight": true,
"OutUp": false,
"view": "Windows/Tabs/Enternet Windows/DPMs/DPM Devices/MCM01/DPM1_DEVICE"
},
"path": "Windows/Tabs/Enternet Windows/Components/DPM_BLOCK"
},
"type": "ia.display.view"
},
{
"events": {
"dom": {
"onClick": {
"config": {
"script": "\tself.session.custom.dpm_view_path \u003d self.props.params.view\n\tself.session.custom.show_dpm_device_view \u003d True"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "DPM2_DEVICE"
},
"position": {
"height": 0.3333,
"width": 0.3333
},
"propConfig": {
"props.params.DownOn": {
"binding": {
"config": {
"path": "view.custom.dpm2-dpm3"
},
"type": "property"
}
},
"props.params.InOn": {
"binding": {
"config": {
"path": "view.custom.dpm2-dpm3"
},
"type": "property"
}
},
"props.params.OutOn": {
"binding": {
"config": {
"path": "view.custom.dpm1-dpm2"
},
"type": "property"
}
}
},
"props": {
"params": {
"Down1": true,
"Down2": false,
"Down3": true,
"DownLeft": false,
"DownRight": false,
"InDown": true,
"InLeft": false,
"InUp": false,
"OutDown": false,
"OutRight": true,
"OutUp": false,
"view": "Windows/Tabs/Enternet Windows/DPMs/DPM Devices/MCM01/DPM2_DEVICE"
},
"path": "Windows/Tabs/Enternet Windows/Components/DPM_BLOCK"
},
"type": "ia.display.view"
},
{
"events": {
"dom": {
"onClick": {
"config": {
"script": "\tself.session.custom.dpm_view_path \u003d self.props.params.view\n\tself.session.custom.show_dpm_device_view \u003d True"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "DPM3_DEVICE"
},
"position": {
"height": 0.3333,
"width": 0.3333,
"y": 0.3333
},
"propConfig": {
"props.params.DownOn": {
"binding": {
"config": {
"path": "view.custom.dpm3-dpm4"
},
"type": "property"
}
},
"props.params.InOn": {
"binding": {
"config": {
"path": "view.custom.dpm3-dpm4"
},
"type": "property"
}
},
"props.params.OutOn": {
"binding": {
"config": {
"path": "view.custom.dpm2-dpm3"
},
"type": "property"
}
}
},
"props": {
"params": {
"Down1": false,
"Down2": true,
"Down3": false,
"DownLeft": false,
"DownRight": false,
"InDown": true,
"InLeft": false,
"InUp": false,
"OutDown": false,
"OutRight": false,
"OutUp": true,
"view": "Windows/Tabs/Enternet Windows/DPMs/DPM Devices/MCM01/DPM3_DEVICE"
},
"path": "Windows/Tabs/Enternet Windows/Components/DPM_BLOCK"
},
"type": "ia.display.view"
},
{
"events": {
"dom": {
"onClick": {
"config": {
"script": "\tself.session.custom.dpm_view_path \u003d self.props.params.view\n\tself.session.custom.show_dpm_device_view \u003d True"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "DPM4_DEVICE"
},
"position": {
"height": 0.3333,
"width": 0.3333,
"y": 0.6666
},
"propConfig": {
"props.params.InOn": {
"binding": {
"config": {
"path": "view.custom.dpm3-dpm4"
},
"type": "property"
}
},
"props.params.OutOn": {
"binding": {
"config": {
"path": "view.custom.dpm4-dpm5"
},
"type": "property"
}
}
},
"props": {
"params": {
"Down1": false,
"Down2": false,
"Down3": false,
"DownLeft": false,
"DownOn": false,
"DownRight": false,
"InDown": false,
"InLeft": false,
"InUp": true,
"OutDown": false,
"OutRight": true,
"OutUp": false,
"view": "Windows/Tabs/Enternet Windows/DPMs/DPM Devices/MCM01/DPM4_DEVICE"
},
"path": "Windows/Tabs/Enternet Windows/Components/DPM_BLOCK"
},
"type": "ia.display.view"
},
{
"events": {
"dom": {
"onClick": {
"config": {
"script": "\tself.session.custom.dpm_view_path \u003d self.props.params.view\n\tself.session.custom.show_dpm_device_view \u003d True"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "DPM5_DEVICE"
},
"position": {
"height": 0.3333,
"width": 0.3333,
"x": 0.3333,
"y": 0.6666
},
"propConfig": {
"props.params.InOn": {
"binding": {
"config": {
"path": "view.custom.dpm4-dpm5"
},
"type": "property"
}
},
"props.params.OutOn": {
"binding": {
"config": {
"path": "view.custom.dpm5-dpm6"
},
"type": "property"
}
}
},
"props": {
"params": {
"Down1": false,
"Down2": false,
"Down3": false,
"DownLeft": false,
"DownOn": false,
"DownRight": false,
"InDown": false,
"InLeft": true,
"InUp": false,
"OutDown": false,
"OutRight": false,
"OutUp": true,
"view": "Windows/Tabs/Enternet Windows/DPMs/DPM Devices/MCM01/DPM5_DEVICE"
},
"path": "Windows/Tabs/Enternet Windows/Components/DPM_BLOCK"
},
"type": "ia.display.view"
},
{
"events": {
"dom": {
"onClick": {
"config": {
"script": "\tself.session.custom.dpm_view_path \u003d self.props.params.view\n\tself.session.custom.show_dpm_device_view \u003d True"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "DPM6_DEVICE"
},
"position": {
"height": 0.3333,
"width": 0.3333,
"x": 0.3333,
"y": 0.3333
},
"propConfig": {
"props.params.DownOn": {
"binding": {
"config": {
"path": "view.custom.dpm5-dpm6"
},
"type": "property"
}
},
"props.params.InOn": {
"binding": {
"config": {
"path": "view.custom.dpm5-dpm6"
},
"type": "property"
}
},
"props.params.OutOn": {
"binding": {
"config": {
"path": "view.custom.dpm6-mcm"
},
"type": "property"
}
}
},
"props": {
"params": {
"Down1": true,
"Down2": false,
"Down3": true,
"DownLeft": false,
"DownRight": false,
"InDown": true,
"InLeft": false,
"InUp": false,
"OutDown": false,
"OutRight": true,
"OutUp": false,
"view": "Windows/Tabs/Enternet Windows/DPMs/DPM Devices/MCM01/DPM6_DEVICE"
},
"path": "Windows/Tabs/Enternet Windows/Components/DPM_BLOCK"
},
"type": "ia.display.view"
},
{
"meta": {
"name": "DPM1_label"
},
"position": {
"height": 0.0358,
"width": 0.0547,
"x": 0.32,
"y": 0.07
},
"props": {
"text": "DPM1_TEXT",
"textStyle": {
"fontSize": "1vmin"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "DPM2_label"
},
"position": {
"height": 0.0358,
"width": 0.0547,
"x": 0.065,
"y": 0.3121
},
"props": {
"text": "DPM2_TEXT",
"textStyle": {
"fontSize": "1vmin"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "DPM3_label"
},
"position": {
"height": 0.0358,
"width": 0.0547,
"x": 0.005,
"y": 0.4
},
"props": {
"text": "DPM3_TEXT",
"textStyle": {
"fontSize": "1vmin"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "DPM4_label"
},
"position": {
"height": 0.0358,
"width": 0.0547,
"x": 0.005,
"y": 0.75
},
"props": {
"text": "DPM4_TEXT",
"textStyle": {
"fontSize": "1vmin"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "DPM5_label"
},
"position": {
"height": 0.0358,
"width": 0.0547,
"x": 0.32,
"y": 0.75
},
"props": {
"text": "DPM5_TEXT",
"textStyle": {
"fontSize": "1vmin"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "DPM6_label"
},
"position": {
"height": 0.0358,
"width": 0.0547,
"x": 0.32,
"y": 0.4
},
"props": {
"text": "DPM6_TEXT",
"textStyle": {
"fontSize": "1vmin"
}
},
"type": "ia.display.label"
},
{
"events": {
"dom": {
"onClick": {
"config": {
"script": "\tself.session.custom.dpm_view_path \u003d self.props.params.view\n\tself.session.custom.show_dpm_device_view \u003d True"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "DEVICE"
},
"position": {
"height": 0.3333,
"width": 0.3333,
"x": 0.6666
},
"propConfig": {
"props.params.On": {
"binding": {
"config": {
"path": "view.custom.mcm-dpm1"
},
"type": "property"
}
}
},
"props": {
"params": {
"LD": false,
"LR": false,
"LRD": true,
"LRU": false,
"LU": false,
"RD": false,
"RLD": false,
"RLU": false,
"RU": false
},
"path": "Windows/Tabs/Enternet Windows/Components/CommLines"
},
"type": "ia.display.view"
}
],
"meta": {
"name": "root"
},
"position": {
"x": 120,
"y": -723
},
"props": {
"mode": "percent",
"style": {
"backgroundColor": "#ffffff"
}
},
"type": "ia.container.coord"
}
}

View File

@ -0,0 +1,970 @@
{
"custom": {
"dpm1-dpm2": false,
"dpm2-dpm3": false,
"dpm3-dpm4": false,
"dpm4-dpm5": false,
"dpm5-dpm6": false,
"dpm6-dpm7": false,
"dpm7-mcm": false,
"mcm-dpm1": false
},
"params": {
"tagProps": [
"DPM0_TAG",
"DPM1_TAG",
"DPM2_TAG",
"DPM3_TAG",
"DPM4_TAG",
"DPM5_TAG",
"DPM6_TAG",
"DPM7_TAG"
]
},
"propConfig": {
"custom.dpm1-dpm2": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"1": "{view.params.tagProps[1]}",
"fc": "{session.custom.fc}"
},
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{1}/STATE"
},
"transforms": [
{
"expression": "coalesce({value},{view.params.forceFaultStatus},1)",
"type": "expression"
},
{
"fallback": false,
"inputType": "scalar",
"mappings": [
{
"input": 0,
"output": true
},
{
"input": 1,
"output": false
}
],
"outputType": "scalar",
"type": "map"
}
],
"type": "tag"
},
"persistent": true
},
"custom.dpm2-dpm3": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"2": "{view.params.tagProps[2]}",
"fc": "{session.custom.fc}"
},
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{2}/STATE"
},
"transforms": [
{
"expression": "coalesce({value},{view.params.forceFaultStatus},1)",
"type": "expression"
},
{
"fallback": false,
"inputType": "scalar",
"mappings": [
{
"input": 0,
"output": true
},
{
"input": 1,
"output": false
}
],
"outputType": "scalar",
"type": "map"
}
],
"type": "tag"
},
"persistent": true
},
"custom.dpm3-dpm4": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"3": "{view.params.tagProps[3]}",
"fc": "{session.custom.fc}"
},
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{3}/STATE"
},
"transforms": [
{
"expression": "coalesce({value},{view.params.forceFaultStatus},1)",
"type": "expression"
},
{
"fallback": false,
"inputType": "scalar",
"mappings": [
{
"input": 0,
"output": true
},
{
"input": 1,
"output": false
}
],
"outputType": "scalar",
"type": "map"
}
],
"type": "tag"
},
"persistent": true
},
"custom.dpm4-dpm5": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"4": "{view.params.tagProps[4]}",
"fc": "{session.custom.fc}"
},
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{4}/STATE"
},
"transforms": [
{
"expression": "coalesce({value},{view.params.forceFaultStatus},1)",
"type": "expression"
},
{
"fallback": false,
"inputType": "scalar",
"mappings": [
{
"input": 0,
"output": true
},
{
"input": 1,
"output": false
}
],
"outputType": "scalar",
"type": "map"
}
],
"type": "tag"
},
"persistent": true
},
"custom.dpm5-dpm6": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"5": "{view.params.tagProps[5]}",
"fc": "{session.custom.fc}"
},
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{5}/STATE"
},
"transforms": [
{
"expression": "coalesce({value},{view.params.forceFaultStatus},1)",
"type": "expression"
},
{
"fallback": false,
"inputType": "scalar",
"mappings": [
{
"input": 0,
"output": true
},
{
"input": 1,
"output": false
}
],
"outputType": "scalar",
"type": "map"
}
],
"type": "tag"
},
"persistent": true
},
"custom.dpm6-dpm7": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"6": "{view.params.tagProps[6]}",
"fc": "{session.custom.fc}"
},
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{6}/STATE"
},
"transforms": [
{
"expression": "coalesce({value},{view.params.forceFaultStatus},1)",
"type": "expression"
},
{
"fallback": false,
"inputType": "scalar",
"mappings": [
{
"input": 0,
"output": true
},
{
"input": 1,
"output": false
}
],
"outputType": "scalar",
"type": "map"
}
],
"type": "tag"
},
"persistent": true
},
"custom.dpm7-mcm": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"7": "{view.params.tagProps[7]}",
"fc": "{session.custom.fc}"
},
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{7}/STATE"
},
"transforms": [
{
"expression": "coalesce({value},{view.params.forceFaultStatus},1)",
"type": "expression"
},
{
"fallback": false,
"inputType": "scalar",
"mappings": [
{
"input": 0,
"output": true
},
{
"input": 1,
"output": false
}
],
"outputType": "scalar",
"type": "map"
}
],
"type": "tag"
},
"persistent": true
},
"custom.mcm-dpm1": {
"binding": {
"config": {
"fallbackDelay": 2.5,
"mode": "indirect",
"references": {
"0": "{view.params.tagProps[0]}",
"fc": "{session.custom.fc}"
},
"tagPath": "[{fc}_SCADA_TAG_PROVIDER]{0}/STATE"
},
"transforms": [
{
"expression": "coalesce({value},{view.params.forceFaultStatus},1)",
"type": "expression"
},
{
"fallback": false,
"inputType": "scalar",
"mappings": [
{
"input": 0,
"output": true
},
{
"input": 1,
"output": false
}
],
"outputType": "scalar",
"type": "map"
}
],
"type": "tag"
},
"persistent": true
},
"params.tagProps": {
"paramDirection": "input",
"persistent": true
}
},
"props": {
"defaultSize": {
"height": 894,
"width": 1920
}
},
"root": {
"children": [
{
"events": {
"dom": {
"onClick": {
"config": {
"script": "\tself.session.custom.dpm_view_path \u003d self.props.params.view\n\tself.session.custom.show_dpm_device_view \u003d True"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "MCM"
},
"position": {
"height": 0.3333,
"width": 0.3333,
"x": 0.6666,
"y": 0.3333
},
"propConfig": {
"props.params.InOn": {
"binding": {
"config": {
"path": "view.custom.dpm7-mcm"
},
"type": "property"
}
},
"props.params.OutOn": {
"binding": {
"config": {
"path": "view.custom.mcm-dpm1"
},
"type": "property"
}
}
},
"props": {
"params": {
"InDown": false,
"InLeft": true,
"InUp": false,
"OutDown": false,
"OutRight": false,
"OutUp": true
},
"path": "Windows/Tabs/Enternet Windows/Components/EN4TR"
},
"type": "ia.display.view"
},
{
"events": {
"dom": {
"onClick": {
"config": {
"script": "\tself.session.custom.dpm_view_path \u003d self.props.params.view\n\tself.session.custom.show_dpm_device_view \u003d True"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "DPM1_DEVICE"
},
"position": {
"height": 0.3333,
"width": 0.3333,
"x": 0.6666
},
"propConfig": {
"props.params.DownOn": {
"binding": {
"config": {
"path": "view.custom.mcm-dpm1"
},
"type": "property"
}
},
"props.params.InOn": {
"binding": {
"config": {
"path": "view.custom.dpm1-dpm2"
},
"type": "property"
}
},
"props.params.OutOn": {
"binding": {
"config": {
"path": "view.custom.mcm-dpm1"
},
"type": "property"
}
}
},
"props": {
"params": {
"Down1": false,
"Down2": false,
"Down3": true,
"DownLeft": false,
"DownRight": false,
"InDown": false,
"InLeft": true,
"InUp": false,
"OutDown": true,
"OutRight": false,
"OutUp": false,
"view": "Windows/Tabs/Enternet Windows/DPMs/DPM Devices/MCM01/DPM1_DEVICE"
},
"path": "Windows/Tabs/Enternet Windows/Components/DPM_BLOCK"
},
"type": "ia.display.view"
},
{
"events": {
"dom": {
"onClick": {
"config": {
"script": "\tself.session.custom.dpm_view_path \u003d self.props.params.view\n\tself.session.custom.show_dpm_device_view \u003d True"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "DPM2_DEVICE"
},
"position": {
"height": 0.3333,
"width": 0.3333,
"x": 0.3333
},
"propConfig": {
"props.params.InOn": {
"binding": {
"config": {
"path": "view.custom.dpm2-dpm3"
},
"type": "property"
}
},
"props.params.OutOn": {
"binding": {
"config": {
"path": "view.custom.dpm1-dpm2"
},
"type": "property"
}
}
},
"props": {
"params": {
"Down1": false,
"Down2": false,
"Down3": false,
"DownLeft": false,
"DownOn": false,
"DownRight": false,
"InDown": false,
"InLeft": true,
"InUp": false,
"OutDown": false,
"OutRight": true,
"OutUp": false,
"view": "Windows/Tabs/Enternet Windows/DPMs/DPM Devices/MCM01/DPM2_DEVICE"
},
"path": "Windows/Tabs/Enternet Windows/Components/DPM_BLOCK"
},
"type": "ia.display.view"
},
{
"events": {
"dom": {
"onClick": {
"config": {
"script": "\tself.session.custom.dpm_view_path \u003d self.props.params.view\n\tself.session.custom.show_dpm_device_view \u003d True"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "DPM3_DEVICE"
},
"position": {
"height": 0.3333,
"width": 0.3333
},
"propConfig": {
"props.params.DownOn": {
"binding": {
"config": {
"path": "view.custom.dpm3-dpm4"
},
"type": "property"
}
},
"props.params.InOn": {
"binding": {
"config": {
"path": "view.custom.dpm3-dpm4"
},
"type": "property"
}
},
"props.params.OutOn": {
"binding": {
"config": {
"path": "view.custom.dpm2-dpm3"
},
"type": "property"
}
}
},
"props": {
"params": {
"Down1": false,
"Down2": true,
"Down3": false,
"DownLeft": false,
"DownRight": false,
"InDown": true,
"InLeft": false,
"InUp": false,
"OutDown": false,
"OutRight": true,
"OutUp": false,
"view": "Windows/Tabs/Enternet Windows/DPMs/DPM Devices/MCM01/DPM3_DEVICE"
},
"path": "Windows/Tabs/Enternet Windows/Components/DPM_BLOCK"
},
"type": "ia.display.view"
},
{
"events": {
"dom": {
"onClick": {
"config": {
"script": "\tself.session.custom.dpm_view_path \u003d self.props.params.view\n\tself.session.custom.show_dpm_device_view \u003d True"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "DPM4_DEVICE"
},
"position": {
"height": 0.3333,
"width": 0.3333,
"y": 0.3333
},
"propConfig": {
"props.params.DownOn": {
"binding": {
"config": {
"path": "view.custom.dpm4-dpm5"
},
"type": "property"
}
},
"props.params.InOn": {
"binding": {
"config": {
"path": "view.custom.dpm3-dpm4"
},
"type": "property"
}
},
"props.params.OutOn": {
"binding": {
"config": {
"path": "view.custom.dpm4-dpm5"
},
"type": "property"
}
}
},
"props": {
"params": {
"Down1": true,
"Down2": true,
"Down3": false,
"DownLeft": false,
"DownRight": false,
"InDown": false,
"InLeft": false,
"InUp": true,
"OutDown": true,
"OutRight": false,
"OutUp": false,
"view": "Windows/Tabs/Enternet Windows/DPMs/DPM Devices/MCM01/DPM4_DEVICE"
},
"path": "Windows/Tabs/Enternet Windows/Components/DPM_BLOCK"
},
"type": "ia.display.view"
},
{
"events": {
"dom": {
"onClick": {
"config": {
"script": "\tself.session.custom.dpm_view_path \u003d self.props.params.view\n\tself.session.custom.show_dpm_device_view \u003d True"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "DPM5_DEVICE"
},
"position": {
"height": 0.3333,
"width": 0.3333,
"y": 0.6666
},
"propConfig": {
"props.params.DownOn": {
"binding": {
"config": {
"path": "view.custom.dpm4-dpm5"
},
"type": "property"
}
},
"props.params.InOn": {
"binding": {
"config": {
"path": "view.custom.dpm4-dpm5"
},
"type": "property"
}
},
"props.params.OutOn": {
"binding": {
"config": {
"path": "view.custom.dpm5-dpm6"
},
"type": "property"
}
}
},
"props": {
"params": {
"Down1": false,
"Down2": false,
"Down3": false,
"DownLeft": false,
"DownRight": false,
"InDown": false,
"InLeft": false,
"InUp": true,
"OutDown": false,
"OutRight": true,
"OutUp": false,
"view": "Windows/Tabs/Enternet Windows/DPMs/DPM Devices/MCM01/DPM5_DEVICE"
},
"path": "Windows/Tabs/Enternet Windows/Components/DPM_BLOCK"
},
"type": "ia.display.view"
},
{
"events": {
"dom": {
"onClick": {
"config": {
"script": "\tself.session.custom.dpm_view_path \u003d self.props.params.view\n\tself.session.custom.show_dpm_device_view \u003d True"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "DPM6_DEVICE"
},
"position": {
"height": 0.3333,
"width": 0.3333,
"x": 0.3333,
"y": 0.6666
},
"propConfig": {
"props.params.InOn": {
"binding": {
"config": {
"path": "view.custom.dpm5-dpm6"
},
"type": "property"
}
},
"props.params.OutOn": {
"binding": {
"config": {
"path": "view.custom.dpm6-dpm7"
},
"type": "property"
}
}
},
"props": {
"params": {
"Down1": false,
"Down2": false,
"Down3": false,
"DownLeft": false,
"DownOn": true,
"DownRight": false,
"InDown": false,
"InLeft": true,
"InUp": false,
"OutDown": false,
"OutRight": false,
"OutUp": true,
"view": "Windows/Tabs/Enternet Windows/DPMs/DPM Devices/MCM01/DPM6_DEVICE"
},
"path": "Windows/Tabs/Enternet Windows/Components/DPM_BLOCK"
},
"type": "ia.display.view"
},
{
"events": {
"dom": {
"onClick": {
"config": {
"script": "\tself.session.custom.dpm_view_path \u003d self.props.params.view\n\tself.session.custom.show_dpm_device_view \u003d True"
},
"scope": "G",
"type": "script"
}
}
},
"meta": {
"name": "DPM7_DEVICE"
},
"position": {
"height": 0.3333,
"width": 0.3333,
"x": 0.3333,
"y": 0.3333
},
"propConfig": {
"props.params.DownOn": {
"binding": {
"config": {
"path": "view.custom.dpm6-dpm7"
},
"type": "property"
}
},
"props.params.InOn": {
"binding": {
"config": {
"path": "view.custom.dpm6-dpm7"
},
"type": "property"
}
},
"props.params.OutOn": {
"binding": {
"config": {
"path": "view.custom.dpm7-mcm"
},
"type": "property"
}
}
},
"props": {
"params": {
"Down1": true,
"Down2": false,
"Down3": true,
"DownLeft": false,
"DownRight": false,
"InDown": true,
"InLeft": false,
"InUp": false,
"OutDown": false,
"OutRight": true,
"OutUp": false,
"view": "Windows/Tabs/Enternet Windows/DPMs/DPM Devices/MCM01/DPM7_DEVICE"
},
"path": "Windows/Tabs/Enternet Windows/Components/DPM_BLOCK"
},
"type": "ia.display.view"
},
{
"meta": {
"name": "DPM1_label"
},
"position": {
"height": 0.0358,
"width": 0.0547,
"x": 0.65,
"y": 0.07
},
"props": {
"text": "DPM1_DEVICE DPM1_TEXT",
"textStyle": {
"fontSize": "1vmin"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "DPM2_label"
},
"position": {
"height": 0.0358,
"width": 0.0547,
"x": 0.32,
"y": 0.07
},
"props": {
"text": "DPM2_DEVICE DPM2_TEXT",
"textStyle": {
"fontSize": "1vmin"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "DPM3_label"
},
"position": {
"height": 0.0358,
"width": 0.0547,
"x": 0.065,
"y": 0.3
},
"props": {
"text": "DPM3_DEVICE DPM3_TEXT",
"textStyle": {
"fontSize": "1vmin"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "DPM4_label"
},
"position": {
"height": 0.0358,
"width": 0.0547,
"x": 0.005,
"y": 0.4
},
"props": {
"text": "DPM4_DEVICE DPM4_TEXT",
"textStyle": {
"fontSize": "1vmin"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "DPM5_label"
},
"position": {
"height": 0.0358,
"width": 0.0547,
"x": 0.005,
"y": 0.75
},
"props": {
"text": "DPM5_DEVICE DPM5_TEXT",
"textStyle": {
"fontSize": "1vmin"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "DPM6_label"
},
"position": {
"height": 0.0358,
"width": 0.0547,
"x": 0.32,
"y": 0.75
},
"props": {
"text": "DPM6_DEVICE DPM6_TEXT",
"textStyle": {
"fontSize": "1vmin"
}
},
"type": "ia.display.label"
},
{
"meta": {
"name": "DPM7_label"
},
"position": {
"height": 0.0358,
"width": 0.0547,
"x": 0.32,
"y": 0.4
},
"props": {
"text": "DPM7_DEVICE DPM7_TEXT",
"textStyle": {
"fontSize": "1vmin"
}
},
"type": "ia.display.label"
}
],
"meta": {
"name": "root"
},
"position": {
"x": 120,
"y": -723
},
"props": {
"mode": "percent",
"style": {
"backgroundColor": "#ffffff"
}
},
"type": "ia.container.coord"
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,17 @@
{
"scope": "G",
"version": 1,
"restricted": false,
"overridable": true,
"files": [
"view.json",
"thumbnail.png"
],
"attributes": {
"lastModification": {
"actor": "admin",
"timestamp": "2025-07-16T14:02:50Z"
},
"lastModificationSignature": "3ddb396bfe7be0c169a0f2b1569aa7ad9ad60ffde0b89bad31f6492fe3a2734c"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

View File

@ -0,0 +1,33 @@
MCM01
DPM1_UL1_4 11.200.1.2
UL2_4_DPM1 11.200.1.3
MCM02
UL2_4_DPM1 11.200.1.3
DPM3_UL4_4 11.200.1.4
DPM4_UL5_4 11.200.1.5
MCM03
UL2_4_DPM1 11.200.1.3
DPM3_UL4_4 11.200.1.4
DPM4_UL5_4 11.200.1.5
DPM5_UL7_4 11.200.1.6
MCM04
DPM1_UL1_4 11.200.1.2
UL2_4_DPM1 11.200.1.3
DPM3_UL4_4 11.200.1.4
DPM4_UL5_4 11.200.1.5
DPM1_UL1_4 11.200.1.2
UL2_4_DPM1 11.200.1.3
DPM3_UL4_4 11.200.1.4
DPM4_UL5_4 11.200.1.5
DPM1_UL1_4 11.200.1.7
UL2_4_DPM1 11.200.1.6
DPM3_UL4_4 11.200.1.5
DPM4_UL5_4 11.200.1.12
MCM05
UL2_4_DPM1 11.200.1.3
DPM3_UL4_4 11.200.1.4
DPM4_UL5_4 11.200.1.5
DPM5_UL7_4 11.200.1.6
UL2_4_DPM1 11.200.1.6
DPM3_UL4_4 11.200.1.5
DPM4_UL5_4 11.200.1.12

118
PLACE DPMS/main.py Normal file
View File

@ -0,0 +1,118 @@
"""
!!! CHANGE THE INPUT_FILE VARIABLE TO THE PATH OF THE TEXT FILE! LINE 20 !!!
!!! ALSO EXAMPLES_DIR VARIABLE TO THE PATH OF THE EXAMPLES FOLDER! LINE 21 !!!
IF YOU WANT TO RUN THIS SCRIPT, YOU NEED TO HAVE A TXT FILE WITH THE FOLLOWING FORMAT:
MCM_NAME
DPM_NAME1 DPM_IP1
DPM_NAME2 DPM_IP2
...
DPM_NAMEN DPM_IPN
MCM_NAMEN
...
"""
import os
import shutil
import json
# Get the directory where this script is located
script_dir = os.path.dirname(os.path.abspath(__file__))
input_file = os.path.join(script_dir, "dpm_mapping.txt")
examples_dir = os.path.join(script_dir, "EXAMPLES")
rt_folder = os.path.join(examples_dir, "RT")
def parse_mcm_data(file_path):
"""Parse input file and return MCMs with their DPMs."""
mcms = {}
current_mcm = None
with open(file_path, 'r') as f:
for line in f:
line = line.strip()
if not line:
continue
if line.startswith('MCM'):
current_mcm = line
mcms[current_mcm] = []
elif current_mcm and (' ' in line or '\t' in line):
dpm_name, dpm_ip = line.split('\t' if '\t' in line else ' ', 1)
mcms[current_mcm].append((dpm_name.strip(), dpm_ip.strip()))
return mcms
def create_mcm_folders(mcms, output_dir="."):
"""Create MCM folders with view.json, resource.json, and thumbnail.png."""
for mcm_name, dpms in mcms.items():
print(f"Processing {mcm_name} with {len(dpms)} DPMs...")
# Create folder
mcm_folder = os.path.join(output_dir, mcm_name)
os.makedirs(mcm_folder, exist_ok=True)
# Get template and update view.json
template_file = os.path.join(examples_dir, f"DPM{len(dpms)}", "view.json")
if not os.path.exists(template_file):
print(f"Template for DPM{len(dpms)} not found")
continue
with open(template_file, 'r') as f:
view_data = json.load(f)
# Update DPM names in view data
if 'root' in view_data and 'children' in view_data['root']:
dpm_index = 0
for child in view_data['root']['children']:
if child.get('type') == 'ia.display.view' and dpm_index < len(dpms):
dpm_name, _ = dpms[dpm_index]
if 'params' in child.get('props', {}) and 'view' in child['props']['params']:
view_path = child['props']['params']['view']
path_parts = view_path.split('/')
if path_parts:
path_parts[-1] = dpm_name
child['props']['params']['view'] = '/'.join(path_parts)
child['meta']['name'] = dpm_name
dpm_index += 1
elif child.get('type') == 'ia.display.label':
label_index = dpm_index - 1
if 0 <= label_index < len(dpms):
dpm_name, dpm_ip = dpms[label_index]
child['props']['text'] = f"{dpm_name} {dpm_ip}"
# Write view.json
with open(os.path.join(mcm_folder, "view.json"), 'w') as f:
json.dump(view_data, f, indent=2)
# Copy RT files
for file_name in ["resource.json", "thumbnail.png"]:
source = os.path.join(rt_folder, file_name)
dest = os.path.join(mcm_folder, file_name)
if os.path.exists(source):
shutil.copy2(source, dest)
def main():
"""Main function to process input file and create MCM folders."""
if not os.path.exists(input_file):
print(f"Error: File '{input_file}' not found.")
return
mcms = parse_mcm_data(input_file)
if not mcms:
print("No MCM data found.")
return
# Create OUTPUT folder
output_folder = "MCMs"
os.makedirs(output_folder, exist_ok=True)
print(f"Created output folder: {os.path.abspath(output_folder)}")
print(f"Found {len(mcms)} MCMs")
create_mcm_folders(mcms, output_folder)
print("Completed successfully, check the MCMs folder!")
if __name__ == "__main__":
main()

66
README.md Normal file
View File

@ -0,0 +1,66 @@
# Folder Installer Tool (Embedded Version)
This tool creates an executable that **contains all your folders within itself**. When users run it, they can choose where to install all the folders.
## ✅ **Your executable is ready: `dist\ScriptsInstaller.exe`**
## How it works:
1. **All folders are embedded inside the exe** - The executable contains all your folders (PLACE DPMS, PLACE DPM DEVICES, OTHER SCRIPTS, RESET IGNITION, TAGS) as compressed data
2. **Users only need the exe file** - No other files needed
3. **Users run the exe anywhere** - They can place it on desktop, downloads, etc.
4. **Users select installation location** - A folder selection dialog opens
5. **Folders get extracted and installed** - All folders are extracted to their chosen location
## User Experience:
### What users get:
- **Single file**: `ScriptsInstaller.exe` (12MB)
- **No installation required**: Just run the exe
- **Choose any location**: Install folders wherever they want
### What happens when they run it:
1. User double-clicks `ScriptsInstaller.exe`
2. A folder selection dialog opens: "Select destination folder for installing folders"
3. User chooses where to install (e.g., `C:\Users\John\Desktop\`)
4. User sees confirmation: "Install all folders to: [selected path]"
5. User clicks "Yes" to proceed
6. A `SCRIPTS` folder gets created with all tools inside
7. Success message shows: "Successfully installed 1 folder to: [path]"
## What gets installed:
When users run the executable, a single `SCRIPTS` folder will be installed to their chosen location, containing:
- `SCRIPTS/PLACE DPMS/` (with all subfolders and files)
- `SCRIPTS/PLACE DPM DEVICES/` (with all subfolders and files)
- `SCRIPTS/OTHER SCRIPTS/` (with all subfolders and files)
- `SCRIPTS/RESET IGNITION/` (with all subfolders and files)
- `SCRIPTS/TAGS/` (with all subfolders and files)
## Distribution:
**You only need to give users the `ScriptsInstaller.exe` file.** That's it!
- ✅ No additional files needed
- ✅ No installation process
- ✅ Works on any Windows computer
- ✅ Users choose installation location
- ✅ Complete folder structure preserved
## Technical Details:
- **File size**: ~12MB (contains all your folders compressed)
- **Dependencies**: None (self-contained)
- **Requirements**: Windows 7 or later
- **Method**: Uses base64 encoding to embed zip data within the executable
## Example User Workflow:
1. User downloads `ScriptsInstaller.exe`
2. User places it on desktop
3. User double-clicks the exe
4. User selects: `C:\Users\John\Desktop\`
5. User confirms installation
6. Result: A `SCRIPTS` folder is created at `C:\Users\John\Desktop\SCRIPTS\` containing all tools
This is exactly what you wanted - users get a single exe file that installs all your folders wherever they choose!

63
RESET IGNITION/main.py Normal file
View File

@ -0,0 +1,63 @@
import time
import schedule
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.chrome.options import Options
from selenium.common.exceptions import NoSuchElementException, WebDriverException
class WebDriverIgnition:
def setup_method(self, method):
chrome_options = Options()
chrome_options.add_argument("--headless") # Run in headless mode
chrome_options.add_argument("--disable-gpu")
chrome_options.add_argument("--no-sandbox")
chrome_options.add_argument("--window-size=1920,1080")
self.driver = webdriver.Chrome(options=chrome_options)
self.vars = {}
def teardown_method(self, method):
try:
self.driver.quit()
except WebDriverException:
pass
def reset_trial(self, url, user, password):
try:
self.driver.get(url)
self.driver.implicitly_wait(10)
reset_anchor = self.driver.find_element(By.ID, "reset-trial-anchor")
if reset_anchor.is_displayed():
reset_anchor.click()
self.driver.find_element(By.NAME, "username").send_keys(user)
self.driver.find_element(By.CLASS_NAME, "button-message").click()
self.driver.find_element(By.NAME, "password").send_keys(password)
self.driver.find_element(By.CLASS_NAME, "button-message").click()
self.driver.find_element(By.ID, "reset-trial-anchor").click()
else:
print("Reset anchor not visible.")
except (NoSuchElementException, WebDriverException) as e:
print(f"Error occurred: {e}")
finally:
self.teardown_method(None)
# Configuration
sUrlIgniton = "http://localhost:8088/web/home?0"
sUser = "admin"
sPassword = "password"
def run_ignition_reset():
ignition = WebDriverIgnition()
ignition.setup_method(None)
ignition.reset_trial(sUrlIgniton, sUser, sPassword)
# Run immediately once
run_ignition_reset()
# Schedule to run every 1 minute
schedule.every(1).minutes.do(run_ignition_reset)
while True:
schedule.run_pending()
time.sleep(1)

1804
TAGS/MCM01.json Normal file

File diff suppressed because it is too large Load Diff

1570
TAGS/MCM02.json Normal file

File diff suppressed because it is too large Load Diff

675
TAGS/MCM03.json Normal file
View File

@ -0,0 +1,675 @@
{
"name": "MCM03",
"tagType": "Folder",
"tags": [
{
"name": "MCM03",
"typeId": "MCM",
"tagType": "UdtInstance",
"tags": []
},
{
"name": "IO_BLOCK",
"tagType": "Folder",
"tags": [
{
"name": "FIO",
"tagType": "Folder",
"tags": [
{
"folder": "IO_BLOCK/FIO",
"typeId": "IO_BLOCK",
"tagType": "UdtInstance",
"name": "NCP1_8_FIO1"
},
{
"folder": "IO_BLOCK/FIO",
"typeId": "IO_BLOCK",
"tagType": "UdtInstance",
"name": "PDP5_FIO1"
},
{
"folder": "IO_BLOCK/FIO",
"typeId": "IO_BLOCK",
"tagType": "UdtInstance",
"name": "NCP1_3_FIO1"
},
{
"folder": "IO_BLOCK/FIO",
"typeId": "IO_BLOCK",
"tagType": "UdtInstance",
"name": "NCP1_2_FIO1"
},
{
"folder": "IO_BLOCK/FIO",
"typeId": "IO_BLOCK",
"tagType": "UdtInstance",
"name": "NCP1_1_FIO1"
}
]
},
{
"name": "SIO",
"tagType": "Folder",
"tags": []
},
{
"name": "DPM",
"tagType": "Folder",
"tags": [
{
"folder": "IO_BLOCK/DPM",
"typeId": "IO_BLOCK",
"tagType": "UdtInstance",
"name": "NCP1_1_DPM1"
},
{
"folder": "IO_BLOCK/DPM",
"typeId": "IO_BLOCK",
"tagType": "UdtInstance",
"name": "NCP1_2_DPM1"
},
{
"folder": "IO_BLOCK/DPM",
"typeId": "IO_BLOCK",
"tagType": "UdtInstance",
"name": "NCP1_3_DPM1"
},
{
"folder": "IO_BLOCK/DPM",
"typeId": "IO_BLOCK",
"tagType": "UdtInstance",
"name": "NCP1_5_DPM1"
}
]
},
{
"name": "HUB",
"tagType": "Folder",
"tags": []
}
]
},
{
"name": "Station",
"tagType": "Folder",
"tags": [
{
"name": "JR",
"tagType": "Folder",
"tags": [
{
"folder": "Station/JR",
"typeId": "Station/JR",
"tagType": "UdtInstance",
"name": "NCP1_3_JR3"
},
{
"folder": "Station/JR",
"typeId": "Station/JR",
"tagType": "UdtInstance",
"name": "NCP1_3_JR2"
},
{
"folder": "Station/JR",
"typeId": "Station/JR",
"tagType": "UdtInstance",
"name": "NCP1_3_JR1"
},
{
"folder": "Station/JR",
"typeId": "Station/JR",
"tagType": "UdtInstance",
"name": "NCP1_2_JR1"
},
{
"folder": "Station/JR",
"typeId": "Station/JR",
"tagType": "UdtInstance",
"name": "NCP1_1_JR1"
}
]
},
{
"name": "Chute_JR",
"tagType": "Folder",
"tags": []
},
{
"name": "SS_PB",
"tagType": "Folder",
"tags": []
},
{
"name": "EPC",
"tagType": "Folder",
"tags": [
{
"folder": "Station/EPC",
"typeId": "Station/EPC",
"tagType": "UdtInstance",
"name": "NCP1_1_EPC2"
},
{
"folder": "Station/EPC",
"typeId": "Station/EPC",
"tagType": "UdtInstance",
"name": "NCP1_2_EPC2"
},
{
"folder": "Station/EPC",
"typeId": "Station/EPC",
"tagType": "UdtInstance",
"name": "NCP1_2_EPC1"
},
{
"folder": "Station/EPC",
"typeId": "Station/EPC",
"tagType": "UdtInstance",
"name": "NCP1_8_EPC2"
},
{
"folder": "Station/EPC",
"typeId": "Station/EPC",
"tagType": "UdtInstance",
"name": "NCP1_8_EPC1"
},
{
"folder": "Station/EPC",
"typeId": "Station/EPC",
"tagType": "UdtInstance",
"name": "UL1_14_EPC1"
},
{
"folder": "Station/EPC",
"typeId": "Station/EPC",
"tagType": "UdtInstance",
"name": "UL1_14_EPC2"
},
{
"folder": "Station/EPC",
"typeId": "Station/EPC",
"tagType": "UdtInstance",
"name": "UL4_14_EPC2"
},
{
"folder": "Station/EPC",
"typeId": "Station/EPC",
"tagType": "UdtInstance",
"name": "UL4_14_EPC1"
},
{
"folder": "Station/EPC",
"typeId": "Station/EPC",
"tagType": "UdtInstance",
"name": "UL7_14_EPC1"
},
{
"folder": "Station/EPC",
"typeId": "Station/EPC",
"tagType": "UdtInstance",
"name": "UL7_14_EPC2"
},
{
"folder": "Station/EPC",
"typeId": "Station/EPC",
"tagType": "UdtInstance",
"name": "UL11_14_EPC1"
},
{
"folder": "Station/EPC",
"typeId": "Station/EPC",
"tagType": "UdtInstance",
"name": "UL11_14_EPC2"
},
{
"folder": "Station/EPC",
"typeId": "Station/EPC",
"tagType": "UdtInstance",
"name": "UL13_13_EPC1"
},
{
"folder": "Station/EPC",
"typeId": "Station/EPC",
"tagType": "UdtInstance",
"name": "UL13_13_EPC2"
},
{
"folder": "Station/EPC",
"typeId": "Station/EPC",
"tagType": "UdtInstance",
"name": "UL18_17_EPC1"
},
{
"folder": "Station/EPC",
"typeId": "Station/EPC",
"tagType": "UdtInstance",
"name": "UL18_17_EPC2"
},
{
"folder": "Station/EPC",
"typeId": "Station/EPC",
"tagType": "UdtInstance",
"name": "UL21_18_EPC2"
},
{
"folder": "Station/EPC",
"typeId": "Station/EPC",
"tagType": "UdtInstance",
"name": "UL21_18_EPC1"
},
{
"folder": "Station/EPC",
"typeId": "Station/EPC",
"tagType": "UdtInstance",
"name": "NCP1_3_EPC2"
},
{
"folder": "Station/EPC",
"typeId": "Station/EPC",
"tagType": "UdtInstance",
"name": "NCP1_3_EPC1"
},
{
"folder": "Station/EPC",
"typeId": "Station/EPC",
"tagType": "UdtInstance",
"name": "NCP1_1_EPC1"
}
]
}
]
},
{
"name": "Chute",
"tagType": "Folder",
"tags": [
{
"name": "Chute",
"tagType": "Folder",
"tags": []
},
{
"name": "PalletBuild",
"tagType": "Folder",
"tags": []
},
{
"name": "D2C",
"tagType": "Folder",
"tags": []
},
{
"name": "FL_CHUTE",
"tagType": "Folder",
"tags": []
}
]
},
{
"name": "Conveyor",
"tagType": "Folder",
"tags": [
{
"name": "VFD",
"tagType": "Folder",
"tags": [
{
"folder": "Conveyor/VFD",
"typeId": "Conveyor/VFD",
"tagType": "UdtInstance",
"name": "NCP1_1_VFD1"
},
{
"folder": "Conveyor/VFD",
"typeId": "Conveyor/VFD",
"tagType": "UdtInstance",
"name": "NCP1_2_VFD1"
},
{
"folder": "Conveyor/VFD",
"typeId": "Conveyor/VFD",
"tagType": "UdtInstance",
"name": "NCP1_3_VFD1"
},
{
"folder": "Conveyor/VFD",
"typeId": "Conveyor/VFD",
"tagType": "UdtInstance",
"name": "NCP1_4_VFD1"
},
{
"folder": "Conveyor/VFD",
"typeId": "Conveyor/VFD",
"tagType": "UdtInstance",
"name": "NCP1_5_VFD1"
},
{
"folder": "Conveyor/VFD",
"typeId": "Conveyor/VFD",
"tagType": "UdtInstance",
"name": "NCP1_6_VFD1"
},
{
"folder": "Conveyor/VFD",
"typeId": "Conveyor/VFD",
"tagType": "UdtInstance",
"name": "NCP1_7_VFD1"
},
{
"folder": "Conveyor/VFD",
"typeId": "Conveyor/VFD",
"tagType": "UdtInstance",
"name": "NCP1_8_VFD1"
},
{
"folder": "Conveyor/VFD",
"typeId": "Conveyor/VFD",
"tagType": "UdtInstance",
"name": "UL1_19_VFD1"
},
{
"folder": "Conveyor/VFD",
"typeId": "Conveyor/VFD",
"tagType": "UdtInstance",
"name": "UL1_20_VFD1"
},
{
"folder": "Conveyor/VFD",
"typeId": "Conveyor/VFD",
"tagType": "UdtInstance",
"name": "UL1_18_VFD1"
},
{
"folder": "Conveyor/VFD",
"typeId": "Conveyor/VFD",
"tagType": "UdtInstance",
"name": "UL1_17_VFD1"
},
{
"folder": "Conveyor/VFD",
"typeId": "Conveyor/VFD",
"tagType": "UdtInstance",
"name": "UL1_16_VFD1"
},
{
"folder": "Conveyor/VFD",
"typeId": "Conveyor/VFD",
"tagType": "UdtInstance",
"name": "UL1_15_VFD1"
},
{
"folder": "Conveyor/VFD",
"typeId": "Conveyor/VFD",
"tagType": "UdtInstance",
"name": "UL1_14_VFD1"
},
{
"folder": "Conveyor/VFD",
"typeId": "Conveyor/VFD",
"tagType": "UdtInstance",
"name": "UL4_19_VFD1"
},
{
"folder": "Conveyor/VFD",
"typeId": "Conveyor/VFD",
"tagType": "UdtInstance",
"name": "UL4_20_VFD1"
},
{
"folder": "Conveyor/VFD",
"typeId": "Conveyor/VFD",
"tagType": "UdtInstance",
"name": "UL4_18_VFD1"
},
{
"folder": "Conveyor/VFD",
"typeId": "Conveyor/VFD",
"tagType": "UdtInstance",
"name": "UL4_17_VFD1"
},
{
"folder": "Conveyor/VFD",
"typeId": "Conveyor/VFD",
"tagType": "UdtInstance",
"name": "UL4_16_VFD1"
},
{
"folder": "Conveyor/VFD",
"typeId": "Conveyor/VFD",
"tagType": "UdtInstance",
"name": "UL4_15_VFD1"
},
{
"folder": "Conveyor/VFD",
"typeId": "Conveyor/VFD",
"tagType": "UdtInstance",
"name": "UL4_14_VFD1"
},
{
"folder": "Conveyor/VFD",
"typeId": "Conveyor/VFD",
"tagType": "UdtInstance",
"name": "UL7_19_VFD1"
},
{
"folder": "Conveyor/VFD",
"typeId": "Conveyor/VFD",
"tagType": "UdtInstance",
"name": "UL7_20_VFD1"
},
{
"folder": "Conveyor/VFD",
"typeId": "Conveyor/VFD",
"tagType": "UdtInstance",
"name": "UL7_18_VFD1"
},
{
"folder": "Conveyor/VFD",
"typeId": "Conveyor/VFD",
"tagType": "UdtInstance",
"name": "UL7_17_VFD1"
},
{
"folder": "Conveyor/VFD",
"typeId": "Conveyor/VFD",
"tagType": "UdtInstance",
"name": "UL7_16_VFD1"
},
{
"folder": "Conveyor/VFD",
"typeId": "Conveyor/VFD",
"tagType": "UdtInstance",
"name": "UL7_15_VFD1"
},
{
"folder": "Conveyor/VFD",
"typeId": "Conveyor/VFD",
"tagType": "UdtInstance",
"name": "UL7_14_VFD1"
},
{
"folder": "Conveyor/VFD",
"typeId": "Conveyor/VFD",
"tagType": "UdtInstance",
"name": "UL11_19_VFD1"
},
{
"folder": "Conveyor/VFD",
"typeId": "Conveyor/VFD",
"tagType": "UdtInstance",
"name": "UL11_20_VFD1"
},
{
"folder": "Conveyor/VFD",
"typeId": "Conveyor/VFD",
"tagType": "UdtInstance",
"name": "UL11_18_VFD1"
},
{
"folder": "Conveyor/VFD",
"typeId": "Conveyor/VFD",
"tagType": "UdtInstance",
"name": "UL11_17_VFD1"
},
{
"folder": "Conveyor/VFD",
"typeId": "Conveyor/VFD",
"tagType": "UdtInstance",
"name": "UL11_16_VFD1"
},
{
"folder": "Conveyor/VFD",
"typeId": "Conveyor/VFD",
"tagType": "UdtInstance",
"name": "UL11_15_VFD1"
},
{
"folder": "Conveyor/VFD",
"typeId": "Conveyor/VFD",
"tagType": "UdtInstance",
"name": "UL11_14_VFD1"
},
{
"folder": "Conveyor/VFD",
"typeId": "Conveyor/VFD",
"tagType": "UdtInstance",
"name": "UL13_18_VFD1"
},
{
"folder": "Conveyor/VFD",
"typeId": "Conveyor/VFD",
"tagType": "UdtInstance",
"name": "UL13_19_VFD1"
},
{
"folder": "Conveyor/VFD",
"typeId": "Conveyor/VFD",
"tagType": "UdtInstance",
"name": "UL13_17_VFD1"
},
{
"folder": "Conveyor/VFD",
"typeId": "Conveyor/VFD",
"tagType": "UdtInstance",
"name": "UL13_16_VFD1"
},
{
"folder": "Conveyor/VFD",
"typeId": "Conveyor/VFD",
"tagType": "UdtInstance",
"name": "UL13_15_VFD1"
},
{
"folder": "Conveyor/VFD",
"typeId": "Conveyor/VFD",
"tagType": "UdtInstance",
"name": "UL13_14_VFD1"
},
{
"folder": "Conveyor/VFD",
"typeId": "Conveyor/VFD",
"tagType": "UdtInstance",
"name": "UL13_13_VFD1"
},
{
"folder": "Conveyor/VFD",
"typeId": "Conveyor/VFD",
"tagType": "UdtInstance",
"name": "UL18_22_VFD1"
},
{
"folder": "Conveyor/VFD",
"typeId": "Conveyor/VFD",
"tagType": "UdtInstance",
"name": "UL18_23_VFD1"
},
{
"folder": "Conveyor/VFD",
"typeId": "Conveyor/VFD",
"tagType": "UdtInstance",
"name": "UL18_21_VFD1"
},
{
"folder": "Conveyor/VFD",
"typeId": "Conveyor/VFD",
"tagType": "UdtInstance",
"name": "UL18_20_VFD1"
},
{
"folder": "Conveyor/VFD",
"typeId": "Conveyor/VFD",
"tagType": "UdtInstance",
"name": "UL18_19_VFD1"
},
{
"folder": "Conveyor/VFD",
"typeId": "Conveyor/VFD",
"tagType": "UdtInstance",
"name": "UL18_18_VFD1"
},
{
"folder": "Conveyor/VFD",
"typeId": "Conveyor/VFD",
"tagType": "UdtInstance",
"name": "UL18_17_VFD1"
},
{
"folder": "Conveyor/VFD",
"typeId": "Conveyor/VFD",
"tagType": "UdtInstance",
"name": "UL21_23_VFD1"
},
{
"folder": "Conveyor/VFD",
"typeId": "Conveyor/VFD",
"tagType": "UdtInstance",
"name": "UL21_24_VFD1"
},
{
"folder": "Conveyor/VFD",
"typeId": "Conveyor/VFD",
"tagType": "UdtInstance",
"name": "UL21_22_VFD1"
},
{
"folder": "Conveyor/VFD",
"typeId": "Conveyor/VFD",
"tagType": "UdtInstance",
"name": "UL21_21_VFD1"
},
{
"folder": "Conveyor/VFD",
"typeId": "Conveyor/VFD",
"tagType": "UdtInstance",
"name": "UL21_20_VFD1"
},
{
"folder": "Conveyor/VFD",
"typeId": "Conveyor/VFD",
"tagType": "UdtInstance",
"name": "UL21_19_VFD1"
},
{
"folder": "Conveyor/VFD",
"typeId": "Conveyor/VFD",
"tagType": "UdtInstance",
"name": "UL21_18_VFD1"
},
{
"folder": "Conveyor/VFD",
"typeId": "Conveyor/VFD",
"tagType": "UdtInstance",
"name": "MCM03_VFD1"
}
]
},
{
"name": "APF",
"tagType": "Folder",
"tags": []
}
]
}
]
}

2434
TAGS/MCM04.json Normal file

File diff suppressed because it is too large Load Diff

2368
TAGS/MCM05.json Normal file

File diff suppressed because it is too large Load Diff

1247
TAGS/MCM06.json Normal file

File diff suppressed because it is too large Load Diff

1437
TAGS/MCM07.json Normal file

File diff suppressed because it is too large Load Diff

108
TAGS/apply-tags.py Normal file
View File

@ -0,0 +1,108 @@
import json
import os
import re
# Helper to check rules and determine folder and tagProps
def clean_line_end(name):
# Remove _Line, _Line_{number}, or _END from the end
return re.sub(r'(_Line(_\d+)?|_END)$', '', name)
def is_ioblock(name):
return any(kw in name for kw in ["DPM", "FIO", "SIO", "HUB"])
def is_station(name):
# _Line or _Line_{number}
if re.search(r'_Line(_?\d+)?$', name):
return True
# EPC{number} at end
if re.search(r'EPC\d+$', name):
return True
# _END
if name.endswith('_END'):
return True
# SS{number} at end
if re.search(r'SS\d+$', name):
return True
# _S{number} at end
if re.search(r'_S\d+$', name):
return True
# PR{number}, GS{number}, DIV{number} anywhere
if re.search(r'PR\d+', name):
return True
if re.search(r'GS\d+', name):
return True
if re.search(r'DIV\d+', name):
return True
# JR1, JR2, JR3, JR4 at end
if re.search(r'JR[1-4]$', name):
return True
return False
def main():
print("Enter path to view.json:")
view_path = input(" >>> ").strip()
# Get parent folder name and use first 5 characters as MCM
parent_folder = os.path.basename(os.path.dirname(view_path))
mcm = parent_folder[:5]
with open(view_path, encoding="utf-8") as f:
view = json.load(f)
children = view.get("root", {}).get("children", [])
for child in children:
meta = child.get("meta", {})
name = meta.get("name")
if not name:
continue
# Skip if name contains Button or Camera
if "Button" in name or "Camera" in name:
continue
props = child.setdefault("props", {})
params = props.setdefault("params", {})
tagProps = params.setdefault("tagProps", [])
# If name ends with _Line, _Line_{number}, or _END, clean it and assign to Station
if re.search(r'(_Line(_\d+)?|_END)$', name):
cleaned = clean_line_end(name)
folder = "Station"
tag_path = f"System/{mcm}/{folder}/{cleaned}"
elif is_ioblock(name):
folder = "IO_BLOCK"
tag_path = f"System/{mcm}/{folder}/{name}"
elif "ERSC" in name:
folder = "Conveyor"
tag_path = f"System/{mcm}/{folder}/{name}"
elif name.startswith("S01") and (re.search(r'GS\d+$', name) or re.search(r'PR\d+$', name)):
folder = "Station"
tag_path = f"System/{mcm}/{folder}/{name}"
elif "CH" in name:
if is_station(name):
folder = "Station"
tag_path = f"System/{mcm}/{folder}/{name}"
else:
folder = "Chute"
tag_path = f"System/{mcm}/{folder}/{name}"
elif name.startswith("S01"):
folder = "Chute"
tag_path = f"System/{mcm}/{folder}/{name}"
elif is_station(name):
folder = "Station"
tag_path = f"System/{mcm}/{folder}/{name}"
else:
folder = "Conveyor"
tag_path = f"System/{mcm}/{folder}/{name}_VFD1"
# Set tagProps at first place
if tagProps:
tagProps[0] = tag_path
else:
tagProps.append(tag_path)
# Save as view.json (overwrite)
out_path = os.path.join(os.path.dirname(view_path), "view.json")
with open(out_path, "w", encoding="utf-8") as f:
json.dump(view, f, indent=2)
print(f"Updated view saved to {out_path}")
if __name__ == "__main__":
main()

296
TAGS/generate-tags.py Normal file
View File

@ -0,0 +1,296 @@
"""
!!! YOU MUST DELETE THE EXISTING {MCM_NUMBER}.JSON FILES BEFORE RUNNING THE SCRIPT !!!
This script is used to generate tags.json files for each MCM folder in the Detailed-Views folder.
"""
import json
import os
import re
import copy
default_view_path = r"c:\Program Files\Inductive Automation\Ignition\data\projects\MTN6_SCADA\com.inductiveautomation.perspective\views\Detailed-Views"
def merge_tags(t1, t2):
"""
Merge two tag folder trees, deduplicating tags by name within each folder, preserving folder structure.
"""
if not (isinstance(t1, dict) and isinstance(t2, dict)):
return copy.deepcopy(t1) if t2 is None else copy.deepcopy(t2)
# If both are folders (tagType == 'Folder'), merge their children
if t1.get('tagType') == 'Folder' and t2.get('tagType') == 'Folder':
merged = {k: v for k, v in t1.items() if k != 'tags'}
merged['tags'] = []
tags1 = {tag['name']: tag for tag in t1.get('tags', [])}
tags2 = {tag['name']: tag for tag in t2.get('tags', [])}
all_names = set(tags1) | set(tags2)
for name in sorted(all_names):
tag1 = tags1.get(name)
tag2 = tags2.get(name)
if tag1 and tag2:
merged['tags'].append(merge_tags(tag1, tag2))
elif tag1:
merged['tags'].append(copy.deepcopy(tag1))
elif tag2:
merged['tags'].append(copy.deepcopy(tag2))
return merged
else:
# Not a folder, just pick one (they should be identical if both exist)
return copy.deepcopy(t1) if t2 is None else copy.deepcopy(t2)
# Filtering and classification rules
def classify_device(name):
skip_keywords = ["Line", "Image", "Button", "Camera", "END", "_S1", "_S2", "image", "PR", "GS", "ERSC", "DIV"]
# Always IO_BLOCK if ends with FIO{num}, SIO{num}, DPM{num}
if any(re.search(rf'{kw}\d+$', name) for kw in ["FIO", "SIO", "DPM"]):
for kw in ["FIO", "SIO", "DPM"]:
if re.search(rf'{kw}\d+$', name):
return {"folder": f"IO_BLOCK/{kw}", "typeId": "IO_BLOCK", "tagType": "UdtInstance", "name": name}
# Skip if PR is in name (unless above rule matched)
if "PR" in name:
return None
if any(kw in name for kw in skip_keywords):
return None
# EPC goes to Station/EPC
if "EPC" in name:
return {"folder": "Station/EPC", "typeId": "Station/EPC", "tagType": "UdtInstance", "name": name}
# SS1 and SS2 go to Station/SS_PB
if "SS1" in name or "SS2" in name:
return {"folder": "Station/SS_PB", "typeId": "Station/SS_PB", "tagType": "UdtInstance", "name": name}
# S01...JR is Station/Chute_JR
if name.startswith("S01") and "JR" in name:
return {"folder": "Station/Chute_JR", "typeId": "Station/Chute_JR", "tagType": "UdtInstance", "name": name}
# JR always goes to Station/JR
if "JR" in name:
return {"folder": "Station/JR", "typeId": "Station/JR", "tagType": "UdtInstance", "name": name}
# IO_BLOCK (priority over CH)
if any(kw in name for kw in ["DPM", "FIO", "SIO", "HUB"]):
for kw in ["DPM", "FIO", "SIO", "HUB"]:
if kw in name:
return {"folder": f"IO_BLOCK/{kw}", "typeId": "IO_BLOCK", "tagType": "UdtInstance", "name": name}
# New rules for Chute (only if not PR or JR)
if "FL" in name and "CH" in name:
return {"folder": "Chute/FL_CHUTE", "typeId": "Chute/FL_CHUTE", "tagType": "UdtInstance", "name": name}
if "CH" in name:
return {"folder": "Chute/Chute", "typeId": "Chute/Chute", "tagType": "UdtInstance", "name": name}
if name.startswith("S01") and name[-1].isdigit():
if int(name[-1]) % 2 == 0:
return {"folder": "Chute/PalletBuild", "typeId": "Chute/PalletBuild", "tagType": "UdtInstance", "name": name}
else:
return {"folder": "Chute/D2C", "typeId": "Chute/D2C", "tagType": "UdtInstance", "name": name}
# Conveyor rules - everything else is VFD
return {"folder": "Conveyor/VFD", "typeId": "Conveyor/VFD", "tagType": "UdtInstance", "name": name + "_VFD1"}
def main():
# Iterate through all subfolders in the default_view_path
if not os.path.isdir(default_view_path):
print(f"Directory not found: {default_view_path}")
return
for folder_name in os.listdir(default_view_path):
folder_path = os.path.join(default_view_path, folder_name)
if not os.path.isdir(folder_path):
continue
view_json_path = os.path.join(folder_path, "view.json")
if not os.path.isfile(view_json_path):
print(f"No view.json in {folder_path}, skipping.")
continue
# Read view.json
with open(view_json_path, encoding="utf-8") as f:
view = json.load(f)
# Extract device names from children
children = view.get("root", {}).get("children", [])
devices = []
mcm_device_name = None
seen_names = set() # Track seen names to avoid duplicates
for child in children:
meta = child.get("meta", {})
name = meta.get("name")
if name and name not in seen_names: # Only process if not seen before
seen_names.add(name)
if mcm_device_name is None and "MCM" in name:
mcm_device_name = name
classified = classify_device(name)
if classified:
devices.append(classified)
if not mcm_device_name:
mcm_device_name = folder_name # fallback to folder name if not found
# Initialize folder structure
folders = {
"IO_BLOCK": {
"FIO": [],
"SIO": [],
"DPM": [],
"HUB": []
},
"Station": {
"JR": [],
"Chute_JR": [],
"SS_PB": [],
"EPC": []
},
"Chute": {
"Chute": [],
"PalletBuild": [],
"D2C": [],
"FL_CHUTE": []
},
"Conveyor": {
"VFD": [],
"APF": []
}
}
# Organize devices into folders
for dev in devices:
folder_path = dev["folder"].split("/")
if folder_path[0] == "IO_BLOCK":
folders["IO_BLOCK"][folder_path[1]].append(dev)
elif folder_path[0] == "Station":
folders["Station"][folder_path[1]].append(dev)
elif folder_path[0] == "Chute":
folders["Chute"][folder_path[1]].append(dev)
elif folder_path[0] == "Conveyor":
folders["Conveyor"][folder_path[1]].append(dev)
else:
folders[folder_path[0]].append(dev)
# Build output structure
output = {
"name": mcm_device_name,
"tagType": "Folder",
"tags": [
{
"name": mcm_device_name,
"typeId": "MCM",
"tagType": "UdtInstance",
"tags": []
},
{
"name": "IO_BLOCK",
"tagType": "Folder",
"tags": [
{
"name": "FIO",
"tagType": "Folder",
"tags": folders["IO_BLOCK"]["FIO"]
},
{
"name": "SIO",
"tagType": "Folder",
"tags": folders["IO_BLOCK"]["SIO"]
},
{
"name": "DPM",
"tagType": "Folder",
"tags": folders["IO_BLOCK"]["DPM"]
},
{
"name": "HUB",
"tagType": "Folder",
"tags": folders["IO_BLOCK"]["HUB"]
}
]
},
{
"name": "Station",
"tagType": "Folder",
"tags": [
{
"name": "JR",
"tagType": "Folder",
"tags": folders["Station"]["JR"]
},
{
"name": "Chute_JR",
"tagType": "Folder",
"tags": folders["Station"]["Chute_JR"]
},
{
"name": "SS_PB",
"tagType": "Folder",
"tags": folders["Station"]["SS_PB"]
},
{
"name": "EPC",
"tagType": "Folder",
"tags": folders["Station"]["EPC"]
}
]
},
{
"name": "Chute",
"tagType": "Folder",
"tags": [
{
"name": "Chute",
"tagType": "Folder",
"tags": folders["Chute"]["Chute"]
},
{
"name": "PalletBuild",
"tagType": "Folder",
"tags": folders["Chute"]["PalletBuild"]
},
{
"name": "D2C",
"tagType": "Folder",
"tags": folders["Chute"]["D2C"]
},
{
"name": "FL_CHUTE",
"tagType": "Folder",
"tags": folders["Chute"]["FL_CHUTE"]
}
]
},
{
"name": "Conveyor",
"tagType": "Folder",
"tags": [
{
"name": "VFD",
"tagType": "Folder",
"tags": folders["Conveyor"]["VFD"]
},
{
"name": "APF",
"tagType": "Folder",
"tags": folders["Conveyor"]["APF"]
}
]
}
]
}
# Extract MCM number from folder name (e.g., "MCM04" from "MCM04 Chutes")
mcm_match = re.match(r'^(MCM\d+)', folder_name)
if mcm_match:
mcm_name = mcm_match.group(1)
else:
mcm_name = folder_name # fallback to full folder name if no MCM pattern found
# Write output for each MCM folder
output_json_path = os.path.join(os.path.dirname(__file__), f"{mcm_name}.json")
# Check if file already exists and merge if it does
if os.path.isfile(output_json_path):
print(f"Existing file found for {mcm_name}, merging data from folder '{folder_name}'...")
with open(output_json_path, "r", encoding="utf-8") as f:
existing_data = json.load(f)
merged_output = merge_tags(existing_data, output)
with open(output_json_path, "w", encoding="utf-8") as f:
json.dump(merged_output, f, indent=2)
print(f"Merged tags JSON updated at: {output_json_path}")
else:
with open(output_json_path, "w", encoding="utf-8") as f:
json.dump(output, f, indent=2)
print(f"New tags JSON generated for {mcm_name} from folder '{folder_name}' at: {output_json_path}")
if __name__ == "__main__":
main()

50
TAGS/keep-unique.py Normal file
View File

@ -0,0 +1,50 @@
import json
import copy
def merge_tags(t1, t2):
"""
Merge two tag folder trees, deduplicating tags by name within each folder, preserving folder structure.
"""
if not (isinstance(t1, dict) and isinstance(t2, dict)):
return copy.deepcopy(t1) if t2 is None else copy.deepcopy(t2)
# If both are folders (tagType == 'Folder'), merge their children
if t1.get('tagType') == 'Folder' and t2.get('tagType') == 'Folder':
merged = {k: v for k, v in t1.items() if k != 'tags'}
merged['tags'] = []
tags1 = {tag['name']: tag for tag in t1.get('tags', [])}
tags2 = {tag['name']: tag for tag in t2.get('tags', [])}
all_names = set(tags1) | set(tags2)
for name in sorted(all_names):
tag1 = tags1.get(name)
tag2 = tags2.get(name)
if tag1 and tag2:
merged['tags'].append(merge_tags(tag1, tag2))
elif tag1:
merged['tags'].append(copy.deepcopy(tag1))
elif tag2:
merged['tags'].append(copy.deepcopy(tag2))
return merged
else:
# Not a folder, just pick one (they should be identical if both exist)
return copy.deepcopy(t1) if t2 is None else copy.deepcopy(t2)
def main():
print("Enter path to first tags.json:")
path1 = input(" >>> ").strip()
print("Enter path to second tags.json:")
path2 = input(" >>> ").strip()
with open(path1, encoding="utf-8") as f:
data1 = json.load(f)
with open(path2, encoding="utf-8") as f:
data2 = json.load(f)
merged = merge_tags(data1, data2)
with open("unique-tags.json", "w", encoding="utf-8") as f:
json.dump(merged, f, indent=2)
print("Merged tags written to tags.json")
if __name__ == "__main__":
main()

271
build.py Normal file
View File

@ -0,0 +1,271 @@
import os
import zipfile
import base64
import subprocess
import tempfile
import shutil
def create_folders_zip():
"""Create a zip file containing all folders in a single SCRIPTS folder"""
# Folders to include
folders_to_include = [
"PLACE DPMS",
"PLACE DPM DEVICES",
"OTHER SCRIPTS",
"RESET IGNITION",
"TAGS"
]
# Create temporary zip file
temp_zip = "temp_folders.zip"
with zipfile.ZipFile(temp_zip, 'w', zipfile.ZIP_DEFLATED) as zipf:
for folder in folders_to_include:
if os.path.exists(folder):
print(f"Adding folder: {folder}")
# Walk through the folder and add all files with SCRIPTS prefix
for root, dirs, files in os.walk(folder):
for file in files:
file_path = os.path.join(root, file)
# Create arc_name with SCRIPTS prefix
arc_name = os.path.join("SCRIPTS", os.path.relpath(file_path, '.'))
zipf.write(file_path, arc_name)
print(f" - Added: {arc_name}")
else:
print(f"Warning: Folder '{folder}' not found, skipping...")
return temp_zip
def encode_zip_to_base64(zip_file):
"""Encode zip file to base64 string"""
with open(zip_file, 'rb') as f:
zip_data = f.read()
return base64.b64encode(zip_data).decode('utf-8')
def update_script_with_embedded_data(base64_data):
"""Update the script with embedded data"""
script_content = """import os
import shutil
import tkinter as tk
from tkinter import filedialog, messagebox
import sys
import tempfile
import zipfile
import base64
# Embedded folder data - this will be populated by the build script
EMBEDDED_FOLDERS_DATA = \"\"\"
{embedded_data}
\"\"\"
def extract_embedded_folders():
\"\"\"Extract embedded folders to a temporary location\"\"\"
try:
# Create temporary directory
temp_dir = tempfile.mkdtemp(prefix="folder_creator_")
# Decode the embedded data
if EMBEDDED_FOLDERS_DATA.strip() == "# This will be replaced with actual base64 encoded zip data during build":
messagebox.showerror("Error", "No embedded folders found in executable!")
return None
# Decode base64 data
zip_data = base64.b64decode(EMBEDDED_FOLDERS_DATA)
# Write to temporary zip file
temp_zip = os.path.join(temp_dir, "folders.zip")
with open(temp_zip, 'wb') as f:
f.write(zip_data)
# Extract zip file
with zipfile.ZipFile(temp_zip, 'r') as zip_ref:
zip_ref.extractall(temp_dir)
# Remove the zip file
os.remove(temp_zip)
return temp_dir
except Exception as e:
messagebox.showerror("Error", f"Failed to extract embedded folders:\\n{{str(e)}}")
return None
def select_destination_folder():
\"\"\"Open a dialog for user to select destination folder\"\"\"
root = tk.Tk()
root.withdraw() # Hide the main window
# Show folder selection dialog
destination = filedialog.askdirectory(
title="Select destination folder for installing folders"
)
return destination
def copy_folders_to_destination(source_path, destination_path):
\"\"\"Copy all folders from source to destination\"\"\"
try:
# Get all items in the source directory
items = os.listdir(source_path)
# Filter only directories
folders = [item for item in items if os.path.isdir(os.path.join(source_path, item))]
if not folders:
messagebox.showwarning("Warning", "No folders found in the embedded data!")
return False
# Create destination if it doesn't exist
if not os.path.exists(destination_path):
os.makedirs(destination_path)
copied_folders = []
# Copy each folder
for folder in folders:
source_folder = os.path.join(source_path, folder)
dest_folder = os.path.join(destination_path, folder)
# Copy the folder and its contents
shutil.copytree(source_folder, dest_folder)
copied_folders.append(folder)
print(f"Installed: {{folder}}")
# Show success message
messagebox.showinfo(
"Success",
f"Successfully installed {{len(copied_folders)}} folders to:\\n{{destination_path}}\\n\\nInstalled folders:\\n" +
"\\n".join(copied_folders)
)
return True
except Exception as e:
messagebox.showerror("Error", f"An error occurred while installing folders:\\n{{str(e)}}")
return False
def cleanup_temp_files(temp_dir):
\"\"\"Clean up temporary files\"\"\"
try:
if temp_dir and os.path.exists(temp_dir):
shutil.rmtree(temp_dir)
except:
pass # Ignore cleanup errors
def main():
\"\"\"Main function\"\"\"
print("Folder Installer Tool")
print("=" * 50)
temp_dir = None
try:
# Extract embedded folders
print("Extracting embedded folders...")
temp_dir = extract_embedded_folders()
if not temp_dir:
return
print(f"Extracted to temporary location: {{temp_dir}}")
# Select destination folder
destination = select_destination_folder()
if not destination:
print("No destination folder selected. Exiting...")
return
print(f"Destination directory: {{destination}}")
# Confirm with user
confirm = messagebox.askyesno(
"Confirm Installation",
f"Install all folders to:\\n{{destination}}\\n\\nProceed?"
)
if confirm:
# Copy the folders
success = copy_folders_to_destination(temp_dir, destination)
if success:
print("Installation completed successfully!")
else:
print("Installation failed!")
else:
print("Installation cancelled by user.")
finally:
# Clean up temporary files
cleanup_temp_files(temp_dir)
if __name__ == "__main__":
main()
""".format(embedded_data=base64_data)
with open("folder_creator_embedded_final.py", "w") as f:
f.write(script_content)
def build_executable():
"""Build the executable using PyInstaller"""
try:
print("Building executable with embedded folders...")
# PyInstaller command
cmd = [
"pyinstaller",
"--onefile", # Create a single executable file
"--windowed", # Don't show console window (optional)
"--name=ScriptsInstaller", # Name of the executable
"folder_creator_embedded_final.py"
]
# Run PyInstaller
result = subprocess.run(cmd, capture_output=True, text=True)
if result.returncode == 0:
print("✅ Executable built successfully!")
print(f"Executable location: {os.path.join('dist', 'ScriptsInstaller.exe')}")
else:
print("❌ Error building executable:")
print(result.stderr)
except FileNotFoundError:
print("❌ PyInstaller not found. Please install it first:")
print("pip install pyinstaller")
except Exception as e:
print(f"❌ Error: {str(e)}")
def main():
"""Main build process"""
print("Building Folder Installer with Embedded Folders")
print("=" * 60)
# Step 1: Create zip file with all folders
print("Step 1: Creating zip file with all folders...")
zip_file = create_folders_zip()
# Step 2: Encode zip to base64
print("Step 2: Encoding zip file to base64...")
base64_data = encode_zip_to_base64(zip_file)
print(f"Base64 data length: {len(base64_data)} characters")
# Step 3: Update script with embedded data
print("Step 3: Updating script with embedded data...")
update_script_with_embedded_data(base64_data)
# Step 4: Build executable
print("Step 4: Building executable...")
build_executable()
# Step 5: Cleanup
print("Step 5: Cleaning up temporary files...")
if os.path.exists(zip_file):
os.remove(zip_file)
if os.path.exists("folder_creator_embedded_final.py"):
os.remove("folder_creator_embedded_final.py")
print("✅ Build process completed!")
if __name__ == "__main__":
main()