47 lines
2.2 KiB
Plaintext
47 lines
2.2 KiB
Plaintext
Voglio uno scenario OT che simula una linea di imbottigliamento con due sezioni fisiche separate e due HIL dedicati.
|
|
|
|
ARCHITETTURA RICHIESTA:
|
|
- 2 PLC (plc1 per serbatoio, plc2 per riempitrice)
|
|
- 2 HIL (water_hil per fisica serbatoio, filler_hil per fisica bottiglia/nastro)
|
|
- 1 HMI per supervisione
|
|
|
|
SEZIONE 1 - SERBATOIO ACQUA (PLC1 + water_hil):
|
|
- water_hil simula la fisica del serbatoio (livello 0-1000)
|
|
- physical_values HIL: water_tank_level (output), tank_input_valve (input), tank_output_valve (input)
|
|
- PLC1 legge water_tank_level dal sensore e controlla le due valvole
|
|
- Logica PLC1: mantieni livello tra 200 (low) e 800 (high) con isteresi
|
|
- Se livello <= 200: apri tank_input_valve, chiudi tank_output_valve
|
|
- Se livello >= 800: chiudi tank_input_valve, apri tank_output_valve
|
|
- Sensore: water_tank_level_sensor (legge da water_hil, espone a PLC1)
|
|
- Attuatori: tank_input_valve_actuator, tank_output_valve_actuator
|
|
|
|
SEZIONE 2 - RIEMPITRICE (PLC2 + filler_hil):
|
|
- filler_hil simula la fisica della bottiglia e del nastro
|
|
- physical_values HIL: bottle_fill_level (output), bottle_at_filler (output), bottle_distance (internal), conveyor_cmd (input), fill_valve (input)
|
|
- PLC2 legge bottle_fill_level e bottle_at_filler, controlla conveyor e fill_valve
|
|
- Logica PLC2:
|
|
- Se bottle_at_filler=0: accendi conveyor (porta bottiglia sotto filler)
|
|
- Se bottle_at_filler=1 e bottle_fill_level < 180: apri fill_valve
|
|
- Se bottle_fill_level >= 180: chiudi fill_valve, accendi conveyor (porta via bottiglia piena)
|
|
- Sensori: bottle_fill_level_sensor, bottle_at_filler_sensor
|
|
- Attuatori: conveyor_actuator, fill_valve_actuator
|
|
|
|
RETE:
|
|
- Tutti i componenti sulla stessa subnet 192.168.100.0/24
|
|
- PLC1: 192.168.100.21
|
|
- PLC2: 192.168.100.22
|
|
- water_hil: 192.168.100.31
|
|
- filler_hil: 192.168.100.32
|
|
- HMI: 192.168.100.10
|
|
- Sensori e attuatori su IP successivi (192.168.100.41+)
|
|
- Comunicazione Modbus TCP porta 502
|
|
|
|
HMI:
|
|
- Monitora: water_tank_level, bottle_fill_level, bottle_at_filler
|
|
- Controllo: start_stop_line (booleano per enable/disable linea)
|
|
|
|
NOTE IMPORTANTI:
|
|
- I nomi HIL devono essere esattamente "water_hil" e "filler_hil"
|
|
- I file logic devono essere "water_hil.py" e "filler_hil.py"
|
|
- I physical_values dei due HIL devono corrispondere a quelli nel control_plan
|