docs/docs/Omron/MachineAnalytics_SCADA/sections/00-SCADAInterface_Structure.md

10 KiB
Raw Blame History

id sidebar_position sidebar_label pagination_prev hide_table_of_contents
MachineAnalytics_SCADA_SCADAInterface_Structure 0 Struttura SCADA Interface Cambio Ricetta & Aggiornamento Produzione Omron/MachineAnalytics_SCADA/MachineAnalytics_SCADA_Flowpack_MachineAnalytics_Documentation true

Struttura SCADA Interface Cambio Ricetta & Aggiornamento Produzione


1. 📋 Tabella Variabili di Scambio PLCSCADA

🟢 EGRESS (PLC → SCADA)

🏷️ Nome 🗃️ Tipo 🔀 Direzione 🪄 Icona 📝 Descrizione Operativa
▶️ IsRunning BOOL Output 🚦 Macchina in marcia
⏹️ IsStopped BOOL Output 🛑 Macchina ferma
🆘 IsInEmergency BOOL Output 🚨 Emergenza attiva
⬇️ IsWaitingDownstream BOOL Output Attesa segnale macchina a valle
⬆️ IsWaitingUpstream BOOL Output Attesa prodotto da macchina a monte
🛎️ IsAlarmActive BOOL Output 🛎️ Allarme attivo
🔁 RecipeChangeACK BOOL Output Ack cambio ricetta
🟢 RecipeChangeOK BOOL Output 🟩 Cambio ricetta OK
RecipeChangeReject BOOL Output Cambio ricetta rifiutato
⏸️ RecipeChangePostpone BOOL Output ⏸️ Cambio ricetta posticipato
🔁 ProductionChangeACK BOOL Output Ack cambio produzione
🟢 ProductionChangeOK BOOL Output 🟩 Produzione aggiornata OK
ProductionChangeReject BOOL Output Aggiornamento produzione rifiutato
⏸️ ProductionChangePostpone BOOL Output ⏸️ Aggiornamento produzione posticipato
📄 ActualRecipeIndex DINT Output #️⃣ Indice ricetta attiva
📄 ActualRecipeName STRING[38] Output 📝 Nome ricetta attiva
🏷️ ActualProductionInfo STRING[38] Output 🏷️ Lotto/ordine attivo
#️⃣ ActualProductionCode DINT Output #️⃣ Codice lotto/ordine attivo
📦 ActualProductionQuantity DINT Output 📦 Quantità lotto/ordine attiva
🚀 ActualSpeed REAL Output 🚀 Velocità attuale [Pacchi/min]
🎯 ReferenceSpeed REAL Output 🎯 Velocità di riferimento da ricetta

🔵 INGRESS (SCADA → PLC)

🏷️ Nome 🗃️ Tipo 🔀 Direzione 🪄 Icona 📝 Descrizione Operativa
🔄 RecipeChangeRequest BOOL Input 📥 Richiesta cambio ricetta
#️⃣ RecipeIndexRequest DINT Input #️⃣ Indice ricetta richiesta
🏷️ RecipeProductionInfoRequest STRING[38] Input 🏷️ Lotto/ordine richiesto per ricetta
#️⃣ RecipeProductionCodeRequest DINT Input #️⃣ Codice lotto/ordine richiesto per ricetta
📦 RecipeProductionQuantityRequest DINT Input 📦 Quantità lotto/ordine richiesta per ricetta
🔄 ProductionChangeRequest BOOL Input 📥 Richiesta cambio produzione
#️⃣ ProductionCodeRequest DINT Input #️⃣ Codice lotto/ordine richiesta
📦 ProductionQuantityRequest DINT Input 📦 Quantità lotto/ordine richiesta
🏷️ ProductionInfoRequest STRING[38] Input 🏷️ Lotto/ordine richiesto

2. 🌳 Tree Strutturale SCADA Egress/Ingress

ST_ScadaInterface
├── Egress
│   ├── RecipeChangeACK ✅
│   ├── RecipeChangeOK 🟩
│   ├── RecipeChangeReject ❌
│   ├── RecipeChangePostpone ⏸️
│   ├── ProductionChangeACK ✅
│   ├── ProductionChangeOK 🟩
│   ├── ProductionChangeReject ❌
│   ├── ProductionChangePostpone ⏸️
│   ├── ActualRecipeIndex #️⃣
│   ├── ActualRecipeName 📝
│   ├── ActualProductionInfo 🏷️
│   ├── ActualProductionCode #️⃣
│   ├── ActualProductionQuantity 📦
│   ├── ActualSpeed 🚀
│   ├── ReferenceSpeed 🎯
│   ├── ...altre variabili di status...
├── Ingress
│   ├── RecipeChangeRequest 📥
│   ├── RecipeIndexRequest #️⃣
│   ├── RecipeProductionInfoRequest 🏷️
│   ├── RecipeProductionCodeRequest #️⃣
│   ├── RecipeProductionQuantityRequest 📦
│   ├── ProductionChangeRequest 📥
│   ├── ProductionCodeRequest #️⃣
│   ├── ProductionQuantityRequest 📦
│   ├── ProductionInfoRequest 🏷️

3. 🚦 Diagramma Stato Cambio Ricetta Mermaid

flowchart TD
    style WaitIdle fill:#bef5cb,stroke:#34c759,color:#000
    style RequestReceived fill:#fff7aa,stroke:#ffd60a,color:#000
    style AckSent fill:#e3eeff,stroke:#007aff,color:#000
    style WaitingForHMI fill:#ffdde2,stroke:#ff375f,color:#000
    style ProcessingAccepted fill:#e3ffe3,stroke:#30db5b,color:#000
    style ProcessingRejected fill:#ffd6d6,stroke:#ff3b30,color:#000
    style Postponed fill:#e6ddff,stroke:#5856d6,color:#000

    WaitIdle["🟢 Idle<br><sub>(Attesa richiesta)</sub>"]
    RequestReceived["📥 RequestReceived<br><sub>Richiesta SCADA, <b>RecipeChangeRequest</b> / <b>RecipeIndexRequest</b></sub>"]
    AckSent["✅ AckSent<br><sub>ACK inviato a SCADA</sub>"]
    WaitingForHMI["🧑‍🔧 WaitingForHMI<br><sub>Popup HMI operatore</sub>"]
    ProcessingAccepted["🟩 Accepted<br><sub>RecipeChangeOK (reset dopo 2s)</sub>"]
    ProcessingRejected["❌ Rejected<br><sub>RecipeChangeReject (reset dopo 2s)</sub>"]
    Postponed["⏸️ Postponed<br><sub>RecipeChangePostpone (reset dopo 30s)</sub>"]

    WaitIdle -->|📥 RecipeChangeRequest| RequestReceived
    RequestReceived -->|✅ RecipeChangeACK| AckSent
    AckSent -->|🧑‍🔧 Handshake HMI| WaitingForHMI
    WaitingForHMI -->|🟩 Operatore ACCETTA| ProcessingAccepted
    WaitingForHMI -->|❌ Operatore RIFIUTA| ProcessingRejected
    WaitingForHMI -->|⏸️ Operatore POSTICIPA| Postponed
    ProcessingAccepted -->|⏱️ Reset 2s| WaitIdle
    ProcessingRejected -->|⏱️ Reset 2s| WaitIdle
    Postponed -->|⏱️ Reset 30s| AckSent

4. 🚦 Diagramma Stato Aggiornamento Produzione Mermaid

flowchart TD
    style WaitIdle fill:#bef5cb,stroke:#34c759,color:#000
    style RequestReceived fill:#fff7aa,stroke:#ffd60a,color:#000
    style AckSent fill:#e3eeff,stroke:#007aff,color:#000
    style WaitingForHMI fill:#ffdde2,stroke:#ff375f,color:#000
    style ProcessingAccepted fill:#e3ffe3,stroke:#30db5b,color:#000
    style ProcessingRejected fill:#ffd6d6,stroke:#ff3b30,color:#000
    style Postponed fill:#e6ddff,stroke:#5856d6,color:#000

    WaitIdle["🟢 Idle<br><sub>(Attesa richiesta)</sub>"]
    RequestReceived["📥 RequestReceived<br><sub>Richiesta SCADA, <b>ProductionChangeRequest</b> / <b>ProductionCodeRequest</b></sub>"]
    AckSent["✅ AckSent<br><sub>ACK inviato a SCADA</sub>"]
    WaitingForHMI["🧑‍🔧 WaitingForHMI<br><sub>Popup HMI operatore</sub>"]
    ProcessingAccepted["🟩 Accepted<br><sub>ProductionChangeOK (reset dopo 2s)</sub>"]
    ProcessingRejected["❌ Rejected<br><sub>ProductionChangeReject (reset dopo 2s)</sub>"]
    Postponed["⏸️ Postponed<br><sub>ProductionChangePostpone (reset dopo 30s)</sub>"]

    WaitIdle -->|📥 ProductionChangeRequest| RequestReceived
    RequestReceived -->|✅ ProductionChangeACK| AckSent
    AckSent -->|🧑‍🔧 Handshake HMI| WaitingForHMI
    WaitingForHMI -->|🟩 Operatore ACCETTA| ProcessingAccepted
    WaitingForHMI -->|❌ Operatore RIFIUTA| ProcessingRejected
    WaitingForHMI -->|⏸️ Operatore POSTICIPA| Postponed
    ProcessingAccepted -->|⏱️ Reset 2s| WaitIdle
    ProcessingRejected -->|⏱️ Reset 2s| WaitIdle
    Postponed -->|⏱️ Reset 30s| AckSent

5. 🗒️ Note Avanzate & Best Practice

  • Tutte le variabili sono pronte per mapping OPC-UA con UAexpert.
  • Il protocollo di handshake per cambio ricetta e produzione garantisce sicurezza operativa e audit trail.
  • Le state machine (diagrammi sopra) sono progettate per evitare race condition e garantire la conferma operatore su azioni critiche.
  • Logging centralizzato sugli eventi di stato per tracciabilità (audit, troubleshooting).
  • Struttura pronta per estensioni future (aggiunta KPI, OEE, manutenzione predittiva).


Documento pronto per validazioni, pubblicazione tecnica e onboarding team SCADA/MES.