From ab43ed92fa1eefb797ef656610273edd460e7660 Mon Sep 17 00:00:00 2001 From: "gigi.mamaladze" Date: Thu, 19 Jun 2025 21:18:41 +0400 Subject: [PATCH] Updated FPE --- PLC/AOIs/AOI_FPE_AOI.L5X | 70 ++++-------- PLC/Simulations/FPE/OIP/FPE_Simulation.tscn | 48 +++----- PLC/Simulations/FPE/OIP/fpe.gd | 15 +-- PLC/Simulations/FPE/PLC/AOIs/AOI_FPE_AOI.L5X | 70 ++++-------- PLC/Simulations/FPE/PLC/FPE.L5X | 103 +++++++----------- .../FPE/PLC/UDTs/UDT_PE_DataType.L5X | 6 +- PLC/UDTs/FPE_DataTypes.L5X | 6 +- 7 files changed, 102 insertions(+), 216 deletions(-) diff --git a/PLC/AOIs/AOI_FPE_AOI.L5X b/PLC/AOIs/AOI_FPE_AOI.L5X index 9f84420..4c98436 100644 --- a/PLC/AOIs/AOI_FPE_AOI.L5X +++ b/PLC/AOIs/AOI_FPE_AOI.L5X @@ -1,9 +1,9 @@  - + - @@ -14,11 +14,11 @@ - + - + - + @@ -40,17 +40,9 @@ - + - - - - - - - - - + @@ -90,23 +82,18 @@ - - - - - - - - - + + + + @@ -126,50 +113,35 @@ - + - + - + - + - + - - - - - - - - - - - - - - - - + @@ -178,9 +150,9 @@ - + - + @@ -194,17 +166,17 @@ - + + - diff --git a/PLC/Simulations/FPE/OIP/FPE_Simulation.tscn b/PLC/Simulations/FPE/OIP/FPE_Simulation.tscn index 7bc6927..31aadfb 100644 --- a/PLC/Simulations/FPE/OIP/FPE_Simulation.tscn +++ b/PLC/Simulations/FPE/OIP/FPE_Simulation.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=13 format=3 uid="uid://dhguxwgsg2mew"] +[gd_scene load_steps=14 format=3 uid="uid://dhguxwgsg2mew"] [ext_resource type="PackedScene" uid="uid://dyhvoundu2kqc" path="res://parts/Building.tscn" id="1_pqjvq"] [ext_resource type="PackedScene" uid="uid://bqlkj4ar8q1ws" path="res://parts/assemblies/BeltConveyorAssembly.tscn" id="3_3xfn1"] @@ -6,9 +6,10 @@ [ext_resource type="PackedScene" uid="uid://c1mup2vown0ak" path="res://parts/BladeStop.tscn" id="6_gux8d"] [ext_resource type="PackedScene" uid="uid://co2mqmdwpn57w" path="res://parts/BoxSpawner.tscn" id="7_vamps"] [ext_resource type="PackedScene" uid="uid://gddgyvex6gdj" path="res://parts/PushButton.tscn" id="8_pqjvq"] -[ext_resource type="Script" uid="uid://b7gcalyqn1xyy" path="res://fpe.gd" id="8_r6n5s"] +[ext_resource type="Script" uid="uid://4rx6ds4gkct1" path="res://fpe.gd" id="8_r6n5s"] [ext_resource type="PackedScene" uid="uid://drle8i15nwr68" path="res://parts/StackLight.tscn" id="9_cb1ro"] [ext_resource type="Script" uid="uid://bl7o7avq4pi78" path="res://src/StackLight/stack_light_data.gd" id="10_2l86j"] +[ext_resource type="PackedScene" uid="uid://bl73u0rvt2orv" path="res://parts/Despawner.tscn" id="11_cb1ro"] [ext_resource type="Script" uid="uid://buet0tp11gjdl" path="res://src/StackLight/stack_segment_data.gd" id="11_gux8d"] [sub_resource type="Resource" id="Resource_3xfn1"] @@ -45,13 +46,14 @@ tag_name = "In_Clear_OIP" [node name="BladeStop" parent="." instance=ExtResource("6_gux8d")] transform = Transform3D(-0.999323, -0.0336398, 0.00665379, 0.0336435, -0.999434, 0, 0.0148438, 0.00049968, 0.447951, 0.891211, 1.3309, -1.28927) -active = true [node name="BoxSpawner" parent="." instance=ExtResource("7_vamps")] -transform = Transform3D(1, 2.30012e-09, -9.31322e-10, -2.30012e-09, 1, 8.84756e-09, 9.31322e-10, -8.84756e-09, 1, -9.44986, 0.501, -1.32867) +transform = Transform3D(1, 2.30012e-09, -9.31322e-10, -2.30012e-09, 1, 8.84756e-09, 9.31322e-10, -8.84756e-09, 1, -9.36164, 0.501, -1.32867) -[node name="fpe" type="Node" parent="."] +[node name="fpe" type="Node" parent="." node_paths=PackedStringArray("UL1_3", "box_spawner")] script = ExtResource("8_r6n5s") +UL1_3 = NodePath("../UL1_3") +box_spawner = NodePath("../BoxSpawner") [node name="MCM_Start" parent="." instance=ExtResource("8_pqjvq")] transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -8.95448, 0.102839, -0.460195) @@ -72,37 +74,15 @@ enable_comms = true tag_groups = null tag_name = "Beacon_Light_OIP" -[node name="UL1_4" parent="." instance=ExtResource("3_3xfn1")] -transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 4.90031, 0, -1.35781) -enable_comms = true -speed_tag_name = "UL1_4_OIP" -running_tag_name = "" -metadata/hijack_scale = true -size = Vector3(7.1935, 0.5, 1.524) -metadata/hijack_scale = true - -[node name="UL1_4_FPE1" parent="." instance=ExtResource("4_cb1ro")] -transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 7.70326, 0.0989852, -2.5893) -normally_closed = true -enable_comms = true -tag_name = "UL1_4_FPE_OIP" - -[node name="Run_UP" parent="." instance=ExtResource("8_pqjvq")] -transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -8.22809, 0.105224, -0.460195) -text = "RUN_UP" +[node name="PushButton2" parent="." instance=ExtResource("8_pqjvq")] +transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -8.52328, 0.106103, -0.460195) +text = "Maintenance_Mode_OIP" toggle = true -pressed = true -button_color = Color(0.297046, 0.494994, 1, 1) +button_color = Color(0.703868, 0.407683, 3.85046e-07, 1) enable_comms = true pushbutton_tag_group_name = "TagGroup0" -pushbutton_tag_name = "Can_Run_UP_OIP" +pushbutton_tag_name = "Maintenance_Mode_OIP" lamp_tag_group_name = "TagGroup0" -[node name="PushButton" parent="." instance=ExtResource("8_pqjvq")] -transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -8.9497, -0.302912, -0.460195) -text = "Conveyor_Interlock" -toggle = true -pressed = true -button_color = Color(0, 1, 0, 1) -pushbutton_tag_group_name = "TagGroup0" -lamp_tag_group_name = "TagGroup0" +[node name="Despawner" parent="." instance=ExtResource("11_cb1ro")] +transform = Transform3D(5.6966, 0, 0, 0, 1, 0, 0, 0, 2, 2.20264, -1.5, -1.28155) diff --git a/PLC/Simulations/FPE/OIP/fpe.gd b/PLC/Simulations/FPE/OIP/fpe.gd index edbb9cb..f20735e 100644 --- a/PLC/Simulations/FPE/OIP/fpe.gd +++ b/PLC/Simulations/FPE/OIP/fpe.gd @@ -1,12 +1,9 @@ @tool extends Node -const Utils = preload("res://utils.gd") var simulation_started -var tag_group = "TagGroup0" -@onready var UL1_3: BeltConveyorAssembly = $"../UL1_3" -@onready var box_spawner: BoxSpawner = $"../BoxSpawner" - +@export var UL1_3 : Node +@export var box_spawner: Node func _enter_tree() -> void: SimulationEvents.simulation_started.connect(_simulation_started) @@ -17,13 +14,6 @@ func _simulation_started(): print("Started !") simulation_started = true - OIPComms.register_tag(tag_group, "UL1_3_VFD1.CTRL.STS.Log.LEN", 1) - for i in range(82): - var data_tag = "UL1_3_VFD1.CTRL.STS.Log.DATA[" + str(i) + "]" - OIPComms.register_tag(tag_group, data_tag, 1) - pass - - func _simulation_ended(): simulation_started = false print("Stopped !") @@ -34,4 +24,3 @@ func _physics_process(delta: float) -> void: return box_spawner.disable = UL1_3.speed == 0 - print("Log String: ", Utils.read_string(tag_group, "UL1_3_VFD1.CTRL.STS.Log")) diff --git a/PLC/Simulations/FPE/PLC/AOIs/AOI_FPE_AOI.L5X b/PLC/Simulations/FPE/PLC/AOIs/AOI_FPE_AOI.L5X index 9f84420..5a15105 100644 --- a/PLC/Simulations/FPE/PLC/AOIs/AOI_FPE_AOI.L5X +++ b/PLC/Simulations/FPE/PLC/AOIs/AOI_FPE_AOI.L5X @@ -1,9 +1,9 @@  - + - @@ -14,11 +14,11 @@ - + - + - + @@ -40,17 +40,9 @@ - + - - - - - - - - - + @@ -90,23 +82,18 @@ - - - - - - - - - + + + + @@ -126,50 +113,35 @@ - + - + - + - + - + - - - - - - - - - - - - - - - - + @@ -178,9 +150,9 @@ - + - + @@ -194,17 +166,17 @@ - + + - diff --git a/PLC/Simulations/FPE/PLC/FPE.L5X b/PLC/Simulations/FPE/PLC/FPE.L5X index c751a72..4186f59 100644 --- a/PLC/Simulations/FPE/PLC/FPE.L5X +++ b/PLC/Simulations/FPE/PLC/FPE.L5X @@ -1,6 +1,6 @@  - - + @@ -723,12 +723,12 @@ Stopped by Station Stop PushButton]]> @@ -1860,7 +1860,7 @@ Pressed]]> - @@ -1871,11 +1871,11 @@ Pressed]]> - + - + - + @@ -1906,20 +1906,9 @@ Pressed]]> - + - - - - - - - - - - - - + @@ -1971,20 +1960,9 @@ Pressed]]> - - - - - - - - - - - - + @@ -1994,6 +1972,9 @@ Pressed]]> + + + @@ -2016,50 +1997,35 @@ Pressed]]> - + - + - + - + - + - - - - - - - - - - - - - - - - + @@ -2068,9 +2034,9 @@ Pressed]]> - + - + @@ -2084,7 +2050,7 @@ Pressed]]> - + @@ -3630,6 +3596,14 @@ NEEDS CLARIFICATION]]> + + + + + + + + - @@ -3839,10 +3813,9 @@ NEEDS CLARIFICATION]]> - + - @@ -4055,7 +4028,7 @@ NEEDS CLARIFICATION]]> - + @@ -4070,17 +4043,17 @@ NEEDS CLARIFICATION]]> - + - + - + @@ -4094,7 +4067,7 @@ NEEDS CLARIFICATION]]> - + diff --git a/PLC/Simulations/FPE/PLC/UDTs/UDT_PE_DataType.L5X b/PLC/Simulations/FPE/PLC/UDTs/UDT_PE_DataType.L5X index ae795f3..bd32574 100644 --- a/PLC/Simulations/FPE/PLC/UDTs/UDT_PE_DataType.L5X +++ b/PLC/Simulations/FPE/PLC/UDTs/UDT_PE_DataType.L5X @@ -1,5 +1,5 @@  - + @@ -78,12 +78,12 @@ diff --git a/PLC/UDTs/FPE_DataTypes.L5X b/PLC/UDTs/FPE_DataTypes.L5X index ae795f3..a36d4be 100644 --- a/PLC/UDTs/FPE_DataTypes.L5X +++ b/PLC/UDTs/FPE_DataTypes.L5X @@ -1,5 +1,5 @@  - + @@ -78,12 +78,12 @@