vault backup: 2025-06-02 16:22:40

This commit is contained in:
Miguel 2025-06-02 16:22:40 +02:00
parent 3a5e34f95e
commit 0e76cb0e71
28 changed files with 2893 additions and 402 deletions

View File

@ -1,10 +1,6 @@
{ {
"version": "2.0", "version": "2.0",
"layout": [ "layout": [
null,
null,
null,
null,
null, null,
null, null,
null, null,

View File

@ -1,44 +1,136 @@
{ {
"recentFiles": [ "recentFiles": [
{
"basename": "FB2120 - MasseliTCP Read - v1.8",
"path": "04-SIDEL/09 - SAE452 - Diet as Regular - San Giovanni in Bosco/FB2120 - MasseliTCP/FB2120 - MasseliTCP Read - v1.8.md"
},
{
"basename": "FB2120 - MasseliTCP Read - Descrizzione Software - v1.8",
"path": "04-SIDEL/09 - SAE452 - Diet as Regular - San Giovanni in Bosco/FB2120 - MasseliTCP/FB2120 - MasseliTCP Read - Descrizzione Software - v1.8.md"
},
{
"basename": "Hardware used for 485-TCP",
"path": "04-SIDEL/09 - SAE452 - Diet as Regular - San Giovanni in Bosco/FB2120 - MasseliTCP/Hardware used for 485-TCP.md"
},
{
"basename": "Versiones",
"path": "04-SIDEL/09 - SAE452 - Diet as Regular - San Giovanni in Bosco/FB2120 - MasseliTCP/Versiones.md"
},
{
"basename": "S7-300 - TCON - TRCV",
"path": "01-Documentation/Siemens/PLC Siemens/S7-300 - TCON - TRCV.md"
},
{ {
"basename": "Maselli - ADAM - Protocol", "basename": "Maselli - ADAM - Protocol",
"path": "01-Documentation/Dispositivos - Manuales/Maselli/Maselli - ADAM - Protocol.md" "path": "01-Documentation/Dispositivos - Manuales/Maselli/Maselli - ADAM - Protocol.md"
}, },
{ {
"basename": "Maselli Proprietary Serial-Socket Protocol", "basename": "Progetto 98050 Fiera - Tavolo di accumulo",
"path": "01-Documentation/Dispositivos - Manuales/Maselli/Maselli - Utility/Maselli Proprietary Serial-Socket Protocol.md" "path": "03-VM/44 - 98050 - Fiera/Progetto 98050 Fiera - Tavolo di accumulo.md"
}, },
{ {
"basename": "Masselli (UR62 & UR29)", "basename": "Install Docker on Ubuntu",
"path": "04-SIDEL/09 - SAE452 - Diet as Regular - San Giovanni in Bosco/Masselli (UR62 & UR29).md" "path": "01-Documentation/Dockers/Install Docker on Ubuntu.md"
}, },
{ {
"basename": "Maselli - Protocol - Gateway - 485 - Ethernet", "basename": "FB Scan Time - FB1",
"path": "01-Documentation/Dispositivos - Manuales/Maselli/Maselli - Protocol - Gateway - 485 - Ethernet.md" "path": "03-VM/9..... MASTER Transport/Standard Transport/FB Scan Time - FB1.md"
}, },
{ {
"basename": "CableMAX - Converter 485 - Serial Adaptor RS232 - CM-RSDB9-PRO", "basename": "5.007382-EXMU01UF - RVU008 - EQPT24731 - Initial Data",
"path": "01-Documentation/Dispositivos - Manuales/CableMAX - Converter 485 - Serial Adaptor RS232 - CM-RSDB9-PRO.md" "path": "04-SIDEL/03 - 5.007382-EXMU01UF - RVU008 - EQPT24731/5.007382-EXMU01UF - RVU008 - EQPT24731 - Initial Data.md"
}, },
{ {
"basename": "Untitled", "basename": "OB30 Calculation",
"path": "04-SIDEL/09 - SAE452 - Diet as Regular - San Giovanni in Bosco/Untitled.md" "path": "03-VM/9..... MASTER Transport/Standard Transport/OB30 Calculation.md"
},
{
"basename": "FB Scan Time OB1 - FB4",
"path": "03-VM/9..... MASTER Transport/Standard Transport/FB Scan Time OB1 - FB4.md"
},
{
"basename": "Docker Basics - Essential Commands and Usage Guide",
"path": "01-Documentation/Dockers/Docker Basics - Essential Commands and Usage Guide.md"
},
{
"basename": "Waveshare RS232-485 Ethernet - Wifi - ADAM 4021 - Using Serial200",
"path": "01-Documentation/Dispositivos - Manuales/Waveshare RS232-485 Ethernet - Wifi/Waveshare RS232-485 Ethernet - Wifi - ADAM 4021 - Using Serial200.md"
}, },
{ {
"basename": "DAR Description - DIET AS REGULAR - SAE452 San Giorgio in Bosco", "basename": "DAR Description - DIET AS REGULAR - SAE452 San Giorgio in Bosco",
"path": "04-SIDEL/09 - SAE452 - Diet as Regular - San Giovanni in Bosco/DAR Description - DIET AS REGULAR - SAE452 San Giorgio in Bosco.md" "path": "04-SIDEL/09 - SAE452 - Diet as Regular - San Giovanni in Bosco/DAR Description - DIET AS REGULAR - SAE452 San Giorgio in Bosco.md"
}, },
{
"basename": "Test - Fatto su Maselli - 06-05-2025",
"path": "04-SIDEL/09 - SAE452 - Diet as Regular - San Giovanni in Bosco/Documentation/Test - Fatto su Maselli - 06-05-2025.md"
},
{
"basename": "GIT commands HELP",
"path": "01-Documentation/GIT - GitHub/GIT commands HELP.md"
},
{
"basename": "Notes - Git - Gitea",
"path": "01-Documentation/GIT - GitHub/Notes - Git - Gitea.md"
},
{
"basename": "Git - Start New Repository with Visual Studio Code - VS Code",
"path": "01-Documentation/GIT - GitHub/Git - Start New Repository with Visual Studio Code - VS Code.md"
},
{
"basename": "GitHub Privacy",
"path": "01-Documentation/GIT - GitHub/GitHub Privacy.md"
},
{
"basename": "Visit to Maselli 06-05-2025",
"path": "04-SIDEL/09 - SAE452 - Diet as Regular - San Giovanni in Bosco/Documentation/Visit to Maselli 06-05-2025.md"
},
{ {
"basename": "Waveshare RS232-485 Ethernet - Wifi - ADAM 4021 - Using com0com - MaselliSimulatorApp Python", "basename": "Waveshare RS232-485 Ethernet - Wifi - ADAM 4021 - Using com0com - MaselliSimulatorApp Python",
"path": "01-Documentation/Dispositivos - Manuales/Waveshare RS232-485 Ethernet - Wifi/Waveshare RS232-485 Ethernet - Wifi - ADAM 4021 - Using com0com - MaselliSimulatorApp Python.md" "path": "01-Documentation/Dispositivos - Manuales/Waveshare RS232-485 Ethernet - Wifi/Waveshare RS232-485 Ethernet - Wifi - ADAM 4021 - Using com0com - MaselliSimulatorApp Python.md"
}, },
{ {
"basename": "com0com Setup Only version 2.2 - version 3 NOT WORKING with Windows 11", "basename": "CableMAX - Converter 485 - Serial Adaptor RS232 - CM-RSDB9-PRO",
"path": "01-Documentation/Dispositivos - Manuales/COM - Virtual COM com0com/com0com Setup Only version 2.2 - version 3 NOT WORKING with Windows 11.md" "path": "01-Documentation/Dispositivos - Manuales/CableMAX - Converter 485 - Serial Adaptor RS232 - CM-RSDB9-PRO.md"
}, },
{ {
"basename": "Waveshare RS232-485 Ethernet - Wifi - ADAM 4021 - Using Serial200", "basename": "ADAM 4021 - 485 to 4..20ma - Commissioning & Firmware update",
"path": "01-Documentation/Dispositivos - Manuales/Waveshare RS232-485 Ethernet - Wifi/Waveshare RS232-485 Ethernet - Wifi - ADAM 4021 - Using Serial200.md" "path": "01-Documentation/Dispositivos - Manuales/ADAM/ADAM 4021 - 485 to 4..20ma - Commissioning & Firmware update.md"
},
{
"basename": "Maselli Sensor to Siemens PLC Communication Implementation",
"path": "01-Documentation/Dispositivos - Manuales/ADAM/Maselli Sensor to Siemens PLC Communication Implementation.md"
},
{
"basename": "Masselli (UR62 & UR29)",
"path": "04-SIDEL/09 - SAE452 - Diet as Regular - San Giovanni in Bosco/Masselli (UR62 & UR29).md"
},
{
"basename": "ADAM -",
"path": "04-SIDEL/09 - SAE452 - Diet as Regular - San Giovanni in Bosco/ADAM -.md"
},
{
"basename": "Untitled",
"path": "04-SIDEL/06 - E5.007363 - Modifica O&U - SAE196 (cip integrato)/Untitled.md"
},
{
"basename": "Communication TSEND_C - TRCV_C",
"path": "01-Documentation/Siemens/PLC Siemens/Communication TSEND_C - TRCV_C.md"
},
{
"basename": "Maselli Proprietary Serial-Socket Protocol",
"path": "01-Documentation/Dispositivos - Manuales/Maselli/Maselli - Utility/Maselli Proprietary Serial-Socket Protocol.md"
},
{
"basename": "Maselli - Protocol - Gateway - 485 - Ethernet",
"path": "01-Documentation/Dispositivos - Manuales/Maselli/Maselli - Protocol - Gateway - 485 - Ethernet.md"
},
{
"basename": "Untitled",
"path": "04-SIDEL/09 - SAE452 - Diet as Regular - San Giovanni in Bosco/Untitled.md"
},
{
"basename": "com0com Setup Only version 2.2 - version 3 NOT WORKING with Windows 11",
"path": "01-Documentation/Dispositivos - Manuales/COM - Virtual COM com0com/com0com Setup Only version 2.2 - version 3 NOT WORKING with Windows 11.md"
}, },
{ {
"basename": "LAD Descriptions from XDA files from Tia Portal", "basename": "LAD Descriptions from XDA files from Tia Portal",
@ -88,14 +180,6 @@
"basename": "SAE346 - IO from Electrical Diagram", "basename": "SAE346 - IO from Electrical Diagram",
"path": "04-SIDEL/05 - E5.007161 - Modifica O&U - SAE346/SAE346 - IO from Electrical Diagram.md" "path": "04-SIDEL/05 - E5.007161 - Modifica O&U - SAE346/SAE346 - IO from Electrical Diagram.md"
}, },
{
"basename": "ADAM 4021 - 485 to 4..20ma - Commissioning & Firmware update",
"path": "01-Documentation/Dispositivos - Manuales/ADAM/ADAM 4021 - 485 to 4..20ma - Commissioning & Firmware update.md"
},
{
"basename": "Maselli Sensor to Siemens PLC Communication Implementation",
"path": "01-Documentation/Dispositivos - Manuales/ADAM/Maselli Sensor to Siemens PLC Communication Implementation.md"
},
{ {
"basename": "Openness Python Library - siemens_tia_scripting", "basename": "Openness Python Library - siemens_tia_scripting",
"path": "01-Documentation/Siemens/Openness/Openness Python Library - siemens_tia_scripting.md" "path": "01-Documentation/Siemens/Openness/Openness Python Library - siemens_tia_scripting.md"
@ -107,98 +191,6 @@
{ {
"basename": "Notas para crear nuevas aplicaciones", "basename": "Notas para crear nuevas aplicaciones",
"path": "07 - Desarrolo de Proyectos - Scripts - Visual Studio/Proyectos Visual Studio/Notas para crear nuevas aplicaciones.md" "path": "07 - Desarrolo de Proyectos - Scripts - Visual Studio/Proyectos Visual Studio/Notas para crear nuevas aplicaciones.md"
},
{
"basename": "Visual Studio Notes",
"path": "07 - Desarrolo de Proyectos - Scripts - Visual Studio/Visual Studio Notes.md"
},
{
"basename": "Conversión LAD a SCL Siemens",
"path": "01-Documentation/Python/Scripts Python/XML to SCL Siemens/Conversión LAD a SCL Siemens.md"
},
{
"basename": "Untitled",
"path": "04-SIDEL/06 - E5.007363 - Modifica O&U - SAE196 (cip integrato)/Untitled.md"
},
{
"basename": "E5.007600 - SAE469 - FDM",
"path": "04-SIDEL/07 - E5.007600 - SAE469/E5.007600 - SAE469 - FDM.md"
},
{
"basename": "Openness Python Library - siemens_tia_scripting - Parsing TIA Portal `_XRef.xml` Files for Call Tree Generation",
"path": "01-Documentation/Siemens/Openness/Openness Python Library - siemens_tia_scripting - Parsing TIA Portal `_XRef.xml` Files for Call Tree Generation.md"
},
{
"basename": "SIDEL - Passwords",
"path": "01-Documentation/SIDEL/SIDEL - Passwords.md"
},
{
"basename": "x2 Comparación Excel",
"path": "01-Documentation/AI - IA - LLM - Artificial Intelligence/Prompts/Scripts/Update S7 DB without names/x2 Comparación Excel.md"
},
{
"basename": "SysInternals Tools - WinInternals",
"path": "01-Documentation/Windows/SysInternals Tools - WinInternals.md"
},
{
"basename": "Software differences - After compilation",
"path": "04-SIDEL/09 - SAE452 - Diet as Regular - San Giovanni in Bosco/Software problems/Software differences - After compilation.md"
},
{
"basename": "AWL - STL Types - Parámetros Típicos",
"path": "01-Documentation/Python/Scripts Python/XML to SCL Siemens/AWL - STL Types - Parámetros Típicos.md"
},
{
"basename": "AWL - STL Types",
"path": "01-Documentation/Python/Scripts Python/XML to SCL Siemens/AWL - STL Types.md"
},
{
"basename": "Estructura XML Detallada para Topología de Red en Exportaciones AML de TIA Portal",
"path": "01-Documentation/CAx AutomationML/Estructura XML Detallada para Topología de Red en Exportaciones AML de TIA Portal.md"
},
{
"basename": "Especificación Formal del Formato CAx (AML)",
"path": "01-Documentation/CAx AutomationML/Especificación Formal del Formato CAx (AML).md"
},
{
"basename": "Recipes names to File",
"path": "01-Documentation/Siemens/Comfort Panels & WinCC/VB Scripts/Recipes names to File.md"
},
{
"basename": "cSharp Decompiler",
"path": "01-Documentation/Decompiler/cSharp Decompiler.md"
},
{
"basename": "Report Javier Vargas - SAE052",
"path": "04-SIDEL/12 - SAE052 - Syrup Update & GSD Update/Report Javier Vargas - SAE052.md"
},
{
"basename": "Visit to Maselli 06-05-2025",
"path": "04-SIDEL/09 - SAE452 - Diet as Regular - San Giovanni in Bosco/Documentation/Visit to Maselli 06-05-2025.md"
},
{
"basename": "Test - Fatto su Maselli - 06-05-2025",
"path": "04-SIDEL/09 - SAE452 - Diet as Regular - San Giovanni in Bosco/Documentation/Test - Fatto su Maselli - 06-05-2025.md"
},
{
"basename": "Differences",
"path": "04-SIDEL/10 - E5.007095 - Modifica O&U - SAE463/Differences.md"
},
{
"basename": "Change old Promass on Siemens S7-300 for new version - 63 - 300",
"path": "04-SIDEL/00 - MASTER/MIXER/Procedimientos/Change old Promass on Siemens S7-300 for new version - 63 - 300.md"
},
{
"basename": "Emails",
"path": "04-SIDEL/10 - E5.007095 - Modifica O&U - SAE463/Emails.md"
},
{
"basename": "SIDEL - Upgrades - Promemoria",
"path": "04-SIDEL/SIDEL - Upgrades - Promemoria.md"
},
{
"basename": "SIDEL - Master - IPs",
"path": "04-SIDEL/00 - MASTER/SIDEL - Master - IPs.md"
} }
], ],
"omittedPaths": [], "omittedPaths": [],

View File

@ -4,131 +4,71 @@
"type": "split", "type": "split",
"children": [ "children": [
{ {
"id": "3b4a7d5d0b5c2e8e", "id": "06a172e6fdedfbf5",
"type": "tabs", "type": "tabs",
"children": [ "children": [
{ {
"id": "b0de106fff7d02eb", "id": "46cbecdfd83b10e4",
"type": "leaf", "type": "leaf",
"state": { "state": {
"type": "markdown", "type": "markdown",
"state": { "state": {
"file": "04-SIDEL/06 - E5.007363 - Modifica O&U - SAE196 (cip integrato)/Untitled.md", "file": "04-SIDEL/09 - SAE452 - Diet as Regular - San Giovanni in Bosco/Documentation/Test - Fatto su Maselli - 06-05-2025.md",
"mode": "source", "mode": "source",
"source": false, "source": false,
"backlinks": false "backlinks": false
}, },
"icon": "lucide-file", "icon": "lucide-file",
"title": "Untitled" "title": "Test - Fatto su Maselli - 06-05-2025"
} }
}, },
{ {
"id": "a38d3289675378b0", "id": "5964c169ed489ae8",
"type": "leaf", "type": "leaf",
"state": { "state": {
"type": "markdown", "type": "markdown",
"state": { "state": {
"file": "01-Documentation/Dispositivos - Manuales/Maselli/Maselli - ADAM - Protocol.md", "file": "04-SIDEL/09 - SAE452 - Diet as Regular - San Giovanni in Bosco/FB2120 - MasseliTCP/Hardware used for 485-TCP.md",
"mode": "source", "mode": "source",
"source": false, "source": false,
"backlinks": false "backlinks": false
}, },
"icon": "lucide-file", "icon": "lucide-file",
"title": "Maselli - ADAM - Protocol" "title": "Hardware used for 485-TCP"
} }
}, },
{ {
"id": "f8c6a0d348e1d9c6", "id": "e1a87a8e25c39351",
"type": "leaf", "type": "leaf",
"state": { "state": {
"type": "markdown", "type": "markdown",
"state": { "state": {
"file": "01-Documentation/Python/Scripts Python/XML to SCL Siemens/LAD Descriptions from XDA files from Tia Portal.md", "file": "04-SIDEL/09 - SAE452 - Diet as Regular - San Giovanni in Bosco/FB2120 - MasseliTCP/FB2120 - MasseliTCP Read - v1.8.md",
"mode": "source", "mode": "source",
"source": false, "source": false,
"backlinks": false "backlinks": false
}, },
"icon": "lucide-file", "icon": "lucide-file",
"title": "LAD Descriptions from XDA files from Tia Portal" "title": "FB2120 - MasseliTCP Read - v1.8"
} }
}, },
{ {
"id": "9ed1cde3f8b68dde", "id": "2bc2280b9c18e51a",
"type": "leaf", "type": "leaf",
"state": { "state": {
"type": "markdown", "type": "markdown",
"state": { "state": {
"file": "01-Documentation/AI - IA - LLM - Artificial Intelligence/AI Prompts useful.md", "file": "04-SIDEL/09 - SAE452 - Diet as Regular - San Giovanni in Bosco/FB2120 - MasseliTCP/FB2120 - MasseliTCP Read - v1.8.md",
"mode": "source", "mode": "source",
"source": false, "source": false,
"backlinks": false "backlinks": false
}, },
"icon": "lucide-file", "icon": "lucide-file",
"title": "AI Prompts useful" "title": "FB2120 - MasseliTCP Read - v1.8"
}
},
{
"id": "699ef801ac43a3c8",
"type": "leaf",
"state": {
"type": "markdown",
"state": {
"file": "01-Documentation/Siemens/Openness/Guía de Exportación a Formato SIMATIC SD con TIA Portal Openness y Csharp.md",
"mode": "source",
"source": false,
"backlinks": false
},
"icon": "lucide-file",
"title": "Guía de Exportación a Formato SIMATIC SD con TIA Portal Openness y Csharp"
}
},
{
"id": "670831659031a736",
"type": "leaf",
"state": {
"type": "markdown",
"state": {
"file": "04-SIDEL/Projects Description.md",
"mode": "source",
"source": false,
"backlinks": false
},
"icon": "lucide-file",
"title": "Projects Description"
}
},
{
"id": "4f5651d4f649293a",
"type": "leaf",
"state": {
"type": "markdown",
"state": {
"file": "01-Documentation/Dispositivos - Manuales/COM - Virtual COM com0com/com0com Setup Only version 2.2 - version 3 NOT WORKING with Windows 11.md",
"mode": "source",
"source": false,
"backlinks": false
},
"icon": "lucide-file",
"title": "com0com Setup Only version 2.2 - version 3 NOT WORKING with Windows 11"
}
},
{
"id": "f93c4cd77a711e5b",
"type": "leaf",
"state": {
"type": "markdown",
"state": {
"file": "01-Documentation/Dispositivos - Manuales/Maselli/Maselli - Protocol - Gateway - 485 - Ethernet.md",
"mode": "source",
"source": false,
"backlinks": false
},
"icon": "lucide-file",
"title": "Maselli - Protocol - Gateway - 485 - Ethernet"
} }
} }
], ],
"currentTab": 1 "currentTab": 2
} }
], ],
"direction": "vertical" "direction": "vertical"
@ -148,7 +88,7 @@
"type": "file-explorer", "type": "file-explorer",
"state": { "state": {
"sortOrder": "alphabetical", "sortOrder": "alphabetical",
"autoReveal": false "autoReveal": true
}, },
"icon": "lucide-folder-closed", "icon": "lucide-folder-closed",
"title": "Files" "title": "Files"
@ -211,7 +151,7 @@
"state": { "state": {
"type": "backlink", "type": "backlink",
"state": { "state": {
"file": "04-SIDEL/09 - SAE452 - Diet as Regular - San Giovanni in Bosco/DAR Description - DIET AS REGULAR.md", "file": "04-SIDEL/09 - SAE452 - Diet as Regular - San Giovanni in Bosco/FB2120 - MasseliTCP/FB2120 - MasseliTCP Read - v1.8.md",
"collapseAll": false, "collapseAll": false,
"extraContext": false, "extraContext": false,
"sortOrder": "alphabetical", "sortOrder": "alphabetical",
@ -221,7 +161,7 @@
"unlinkedCollapsed": true "unlinkedCollapsed": true
}, },
"icon": "links-coming-in", "icon": "links-coming-in",
"title": "Backlinks for DAR Description - DIET AS REGULAR" "title": "Backlinks for FB2120 - MasseliTCP Read - v1.8"
} }
}, },
{ {
@ -322,54 +262,54 @@
"obsidian-importer:Open Importer": false "obsidian-importer:Open Importer": false
} }
}, },
"active": "a38d3289675378b0", "active": "e1a87a8e25c39351",
"lastOpenFiles": [ "lastOpenFiles": [
"01-Documentation/Dispositivos - Manuales/Maselli/Maselli - Utility/Maselli Proprietary Serial-Socket Protocol.md", "04-SIDEL/09 - SAE452 - Diet as Regular - San Giovanni in Bosco/FB2120 - MasseliTCP/FB2120 - MasseliTCP Read - Descrizzione Software - v1.8.md",
"04-SIDEL/09 - SAE452 - Diet as Regular - San Giovanni in Bosco/Masselli (UR62 & UR29).md", "04-SIDEL/09 - SAE452 - Diet as Regular - San Giovanni in Bosco/FB2120 - MasseliTCP/Hardware used for 485-TCP.md",
"01-Documentation/Dispositivos - Manuales/Maselli/Maselli - Protocol - Gateway - 485 - Ethernet.md", "04-SIDEL/09 - SAE452 - Diet as Regular - San Giovanni in Bosco/FB2120 - MasseliTCP/FB2120 - MasseliTCP Read - v1.8.md",
"04-SIDEL/09 - SAE452 - Diet as Regular - San Giovanni in Bosco/FB2120 - MasseliTCP/Untitled/Untitled.md",
"04-SIDEL/09 - SAE452 - Diet as Regular - San Giovanni in Bosco/FB2120 - MasseliTCP/Untitled/doc1.3.md",
"04-SIDEL/09 - SAE452 - Diet as Regular - San Giovanni in Bosco/FB2120 - MasseliTCP/Untitled",
"04-SIDEL/09 - SAE452 - Diet as Regular - San Giovanni in Bosco/FB2120 - MasseliTCP/adjuntos/Pasted image 20250530095111.png",
"04-SIDEL/09 - SAE452 - Diet as Regular - San Giovanni in Bosco/FB2120 - MasseliTCP/adjuntos/Pasted image 20250530095053.png",
"04-SIDEL/09 - SAE452 - Diet as Regular - San Giovanni in Bosco/FB2120 - MasseliTCP/Versiones.md",
"04-SIDEL/09 - SAE452 - Diet as Regular - San Giovanni in Bosco/FB2120 - MasseliTCP/Untitled 1.md",
"04-SIDEL/09 - SAE452 - Diet as Regular - San Giovanni in Bosco/FB2120 - MasseliTCP/Untitled.md",
"01-Documentation/Siemens/PLC Siemens/S7-300 - TCON - TRCV.md",
"04-SIDEL/09 - SAE452 - Diet as Regular - San Giovanni in Bosco/FB2120 - MasseliTCP/adjuntos/Pasted image 20250529221344.png",
"04-SIDEL/09 - SAE452 - Diet as Regular - San Giovanni in Bosco/FB2120 - MasseliTCP/adjuntos/Pasted image 20250529221334.png",
"01-Documentation/Dispositivos - Manuales/Maselli/Maselli - ADAM - Protocol.md", "01-Documentation/Dispositivos - Manuales/Maselli/Maselli - ADAM - Protocol.md",
"01-Documentation/Dispositivos - Manuales/CableMAX - Converter 485 - Serial Adaptor RS232 - CM-RSDB9-PRO.md", "03-VM/44 - 98050 - Fiera/Progetto 98050 Fiera - Tavolo di accumulo.md",
"04-SIDEL/09 - SAE452 - Diet as Regular - San Giovanni in Bosco/Untitled.md", "03-VM/44 - 98050 - Fiera/Untitled.md",
"01-Documentation/Dockers/Install Docker on Ubuntu.md",
"03-VM/9..... MASTER Transport/Standard Transport/FB Scan Time - FB1.md",
"04-SIDEL/03 - 5.007382-EXMU01UF - RVU008 - EQPT24731/5.007382-EXMU01UF - RVU008 - EQPT24731 - Initial Data.md",
"03-VM/9..... MASTER Transport/Standard Transport/OB30 Calculation.md",
"03-VM/9..... MASTER Transport/Standard Transport/FB Scan Time OB1 - FB4.md",
"01-Documentation/Dockers/Docker Basics - Essential Commands and Usage Guide.md",
"01-Documentation/Dispositivos - Manuales/Waveshare RS232-485 Ethernet - Wifi/Waveshare RS232-485 Ethernet - Wifi - ADAM 4021 - Using Serial200.md",
"04-SIDEL/09 - SAE452 - Diet as Regular - San Giovanni in Bosco/DAR Description - DIET AS REGULAR - SAE452 San Giorgio in Bosco.md", "04-SIDEL/09 - SAE452 - Diet as Regular - San Giovanni in Bosco/DAR Description - DIET AS REGULAR - SAE452 San Giorgio in Bosco.md",
"01-Documentation/Dispositivos - Manuales/Waveshare RS232-485 Ethernet - Wifi/Waveshare RS232-485 Ethernet - Wifi - ADAM 4021 - Using com0com - MaselliSimulatorApp Python.md", "04-SIDEL/09 - SAE452 - Diet as Regular - San Giovanni in Bosco/Documentation/Test - Fatto su Maselli - 06-05-2025.md",
"01-Documentation/GIT - GitHub/GIT commands HELP.md",
"01-Documentation/GIT - GitHub/Notes - Git - Gitea.md",
"01-Documentation/GIT - GitHub/Git - Start New Repository with Visual Studio Code - VS Code.md",
"01-Documentation/GIT - GitHub/GitHub Privacy.md",
"04-SIDEL/09 - SAE452 - Diet as Regular - San Giovanni in Bosco/Documentation/Visit to Maselli 06-05-2025.md",
"04-SIDEL/09 - SAE452 - Diet as Regular - San Giovanni in Bosco/FB2120 - MasseliTCP/adjuntos/Pasted image 20250526165501.png",
"04-SIDEL/09 - SAE452 - Diet as Regular - San Giovanni in Bosco/FB2120 - MasseliTCP/adjuntos",
"04-SIDEL/09 - SAE452 - Diet as Regular - San Giovanni in Bosco/FB2120 - MasseliTCP",
"01-Documentation/Dispositivos - Manuales/Waveshare RS232-485 Ethernet - Wifi/adjuntos/Pasted image 20250523122653.png", "01-Documentation/Dispositivos - Manuales/Waveshare RS232-485 Ethernet - Wifi/adjuntos/Pasted image 20250523122653.png",
"01-Documentation/Dispositivos - Manuales/Waveshare RS232-485 Ethernet - Wifi/adjuntos/Pasted image 20250523122629.png", "01-Documentation/Dispositivos - Manuales/Waveshare RS232-485 Ethernet - Wifi/adjuntos/Pasted image 20250523122629.png",
"01-Documentation/Dispositivos - Manuales/COM - Virtual COM com0com/com0com Setup Only version 2.2 - version 3 NOT WORKING with Windows 11.md",
"01-Documentation/Dispositivos - Manuales/Waveshare RS232-485 Ethernet - Wifi/adjuntos/Pasted image 20250523122530.png", "01-Documentation/Dispositivos - Manuales/Waveshare RS232-485 Ethernet - Wifi/adjuntos/Pasted image 20250523122530.png",
"01-Documentation/Dispositivos - Manuales/Waveshare RS232-485 Ethernet - Wifi/adjuntos", "01-Documentation/Dispositivos - Manuales/Waveshare RS232-485 Ethernet - Wifi/adjuntos",
"01-Documentation/Dispositivos - Manuales/Waveshare RS232-485 Ethernet - Wifi/Waveshare RS232-485 Ethernet - Wifi - ADAM 4021 - Using Serial200.md",
"01-Documentation/Dispositivos - Manuales/Waveshare RS232-485 Ethernet - Wifi", "01-Documentation/Dispositivos - Manuales/Waveshare RS232-485 Ethernet - Wifi",
"01-Documentation/Python/Scripts Python/XML to SCL Siemens/LAD Descriptions from XDA files from Tia Portal.md",
"01-Documentation/AI - IA - LLM - Artificial Intelligence/AI Prompts useful.md",
"01-Documentation/Siemens/Openness/Guía de Exportación a Formato SIMATIC SD con TIA Portal Openness y Csharp.md",
"04-SIDEL/Projects Description.md",
"01-Documentation/Dispositivos - Manuales/COM - Virtual COM com0com/adjuntos/Pasted image 20250523122236.png", "01-Documentation/Dispositivos - Manuales/COM - Virtual COM com0com/adjuntos/Pasted image 20250523122236.png",
"04-SIDEL/05 - E5.007161 - Modifica O&U - SAE346/SAE346 - HMI - Machine Configuration.md",
"04-SIDEL/05 - E5.007161 - Modifica O&U - SAE346/COMM - FILLER - MIXER/Comm - Mixer - Filler.md",
"04-SIDEL/05 - E5.007161 - Modifica O&U - SAE346/SAE346 - Software adaptation from Master - Notes.md",
"04-SIDEL/05 - E5.007161 - Modifica O&U - SAE346/SAE346 P&ID.md",
"04-SIDEL/05 - E5.007161 - Modifica O&U - SAE346/SAE346 - Signals - CIP - Filler - Syrop.md",
"04-SIDEL/05 - E5.007161 - Modifica O&U - SAE346/SAE346 - Process diagram.md",
"04-SIDEL/05 - E5.007161 - Modifica O&U - SAE346/SAE346 - Master adaptation to compile.md",
"04-SIDEL/05 - E5.007161 - Modifica O&U - SAE346/SAE346 - IO from Electrical Diagram.md",
"01-Documentation/Dispositivos - Manuales/ADAM/ADAM 4021 - 485 to 4..20ma - Commissioning & Firmware update.md",
"01-Documentation/Dispositivos - Manuales/ADAM/Maselli Sensor to Siemens PLC Communication Implementation.md",
"01-Documentation/Dispositivos - Manuales/adjuntos/Pasted image 20250522183148.png", "01-Documentation/Dispositivos - Manuales/adjuntos/Pasted image 20250522183148.png",
"01-Documentation/Dispositivos - Manuales/COM - Virtual COM com0com/adjuntos/Pasted image 20250522171402.png",
"01-Documentation/Dispositivos - Manuales/COM - Virtual COM com0com/adjuntos/Pasted image 20250522170556.png",
"01-Documentation/Dispositivos - Manuales/COM - Virtual COM com0com/adjuntos", "01-Documentation/Dispositivos - Manuales/COM - Virtual COM com0com/adjuntos",
"01-Documentation/Dispositivos - Manuales/COM - Virtual COM com0com/Untitled", "01-Documentation/Dispositivos - Manuales/COM - Virtual COM com0com/Untitled",
"01-Documentation/Dispositivos - Manuales/COM - Virtual COM com0com", "01-Documentation/Dispositivos - Manuales/COM - Virtual COM com0com",
"01-Documentation/Siemens/Openness/Openness Python Library - siemens_tia_scripting.md",
"04-SIDEL/13 - E5.007560 - Modifica O&U - SAE235/Untitled.md",
"01-Documentation/Dispositivos - Manuales/adjuntos/Pasted image 20250521100106.png",
"01-Documentation/Dispositivos - Manuales/adjuntos/Pasted image 20250521100002.png",
"01-Documentation/Dispositivos - Manuales/adjuntos/Pasted image 20250521095735.png",
"01-Documentation/Python/Scripts Python/XML to SCL Siemens", "01-Documentation/Python/Scripts Python/XML to SCL Siemens",
"04-SIDEL/13 - E5.007560 - Modifica O&U - SAE235", "04-SIDEL/13 - E5.007560 - Modifica O&U - SAE235",
"04-SIDEL/00 - MASTER/MIXER/Procedimientos/adjuntos",
"04-SIDEL/00 - MASTER/MIXER/Procedimientos",
"HTML import/Attachments",
"03-Revised/93789 Sipa Italia - Tinny - HSCounters - Piattaforma/Divider/Untitled.canvas", "03-Revised/93789 Sipa Italia - Tinny - HSCounters - Piattaforma/Divider/Untitled.canvas",
"04-InLavoro/9..... MASTER Transport/Standard Transport/FB500 Logic.canvas", "04-InLavoro/9..... MASTER Transport/Standard Transport/FB500 Logic.canvas",
"04-InLavoro/HENKEL/93040 - HENKEL - BowlingGreen/TL22-L25/Synoptic Change/Q3.canvas", "04-InLavoro/HENKEL/93040 - HENKEL - BowlingGreen/TL22-L25/Synoptic Change/Q3.canvas",

View File

@ -0,0 +1,66 @@
[Ubuntu \| Docker Docs](https://docs.docker.com/engine/install/ubuntu/)
### [Install using the `apt` repository](https://docs.docker.com/engine/install/ubuntu/#install-using-the-repository)
Before you install Docker Engine for the first time on a new host machine, you need to set up the Docker `apt` repository. Afterward, you can install and update Docker from the repository.
1. Set up Docker's `apt` repository.
```bash
# Add Docker's official GPG key:
sudo apt-get update
sudo apt-get install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc
# Add the repository to Apt sources:
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
$(. /etc/os-release && echo "${UBUNTU_CODENAME:-$VERSION_CODENAME}") stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
```
2. Install the Docker packages.
Latest Specific version
---
To install the latest version, run:
```console
$ sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
```
---
3. Verify that the installation is successful by running the `hello-world` image:
```console
$ sudo docker run hello-world
```
This command downloads a test image and runs it in a container. When the container runs, it prints a confirmation message and exits.
You have now successfully installed and started Docker Engine.
> **Tip**
>
> Receiving errors when trying to run without root?
>
> The `docker` user group exists but contains no users, which is why youre required to use `sudo` to run Docker commands. Continue to [Linux postinstall](https://docs.docker.com/engine/install/linux-postinstall) to allow non-privileged users to run Docker commands and for other optional configuration steps.
#### [Upgrade Docker Engine](https://docs.docker.com/engine/install/ubuntu/#upgrade-docker-engine)
To upgrade Docker Engine, follow step 2 of the [installation instructions](https://docs.docker.com/engine/install/ubuntu/#install-using-the-repository), choosing the new version you want to install.
### Install Portainer
[Install Portainer CE with Docker on Linux \| Portainer Documentation](https://docs.portainer.io/start/install-ce/server/docker/linux)

View File

@ -0,0 +1,252 @@
***
### Comandos Basicos
***
```bash
git add . // Agregar todos los cambios al proximo commit
git commit -m "Mensaje"
git push // Enviar el o los commit al server Remoto
git pull // Descargar las modificaciones desde el server remoto
```
#### Staging Changes (`git add`)
Before you can commit your changes, you need to tell Git which specific changes you want to include in the next commit. This is called "staging."
- **`git add <file_name>`**
- Stages a specific file. For example: `git add index.html`
- **`git add .`**
- Stages all changes in the current directory and its subdirectories. This is a very common command to stage all modified and new files.
- **`git add -u`**
- Stages all modified and deleted files, but _not_ new files. Useful if you've only made changes to existing tracked files.
- **`git add -A`**
- Stages all changes (modified, new, and deleted files) in the entire repository. This is equivalent to `git add .` if you are in the root of the repository.
**To check what's staged/unstaged:**
- **`git status`**
- Shows the current state of your working directory and the staging area. It tells you which files are staged, unstaged, and untracked.
---
#### 2. Committing Changes (`git commit`)
Once your changes are staged, you can record them as a new snapshot in the repository's history using a commit. Each commit should represent a logical unit of work.
- **`git commit -m "Your descriptive commit message"`**
- Creates a new commit with the staged changes. The `-m` flag allows you to provide a short, descriptive message directly in the command line.
- **Good commit messages are crucial!** They explain _what_ changes were made and _why_.
- Example: `git commit -m "Add user authentication feature"`
- **`git commit`**
- Opens your default text editor (like Vim or Nano) to allow you to write a more detailed commit message. This is useful for longer explanations or when following a specific commit message convention.
---
#### 3. Pushing Changes (`git push`)
After committing your changes locally, you'll often want to share them with a remote repository (e.g., GitHub, GitLab, Bitbucket). This is done using `git push`.
- **`git push <remote_name> <branch_name>`**
- Pushes your committed changes from your local branch to a specific remote branch.
- **Common usage:** `git push origin main` (where `origin` is the default name for your remote and `main` is the primary development branch).
- **`git push -u <remote_name> <branch_name>`** (or `git push --set-upstream`)
- This is typically used the _first time_ you push a new local branch to a remote. It sets up the "upstream" tracking relationship, meaning Git will remember that your local branch is connected to that remote branch. After this, you can often just use `git push`.
- Example: `git push -u origin feature/new-design`
- **`git push`**
- If your local branch is already tracking a remote branch (i.e., you've used `-u` before or cloned a repository), simply running `git push` will push your changes to the tracked remote branch.
---
#### 4. Pulling Changes (`git pull`)
When working with others, or even on different machines, you'll need to get the latest changes from the remote repository to your local machine. This is done using `git pull`.
- **`git pull <remote_name> <branch_name>`**
- Fetches changes from the specified remote branch and then automatically merges them into your current local branch.
- **Common usage:** `git pull origin main`
- **`git pull`**
- If your current local branch is tracking a remote branch, simply running `git pull` will fetch and merge changes from its tracked upstream branch.
**Note:** `git pull` is essentially a shortcut for two other commands:
1. **`git fetch <remote_name>`**: Downloads commits, files, and refs from a remote repository into your local repository, but _doesn't_ automatically merge them.
2. **`git merge <remote_name>/<branch_name>`**: Merges the fetched changes into your current branch.
---
### Basic Workflow Summary:
1. **Modify files.**
2. **`git status`**: Check what you've changed.
3. **`git add .`**: Stage your changes.
4. **`git commit -m "Your descriptive message"`**: Commit your staged changes.
5. **`git pull origin main`**: Get the latest changes from the remote (to avoid merge conflicts later).
6. **`git push origin main`**: Share your committed changes with the remote.
# Essential Git Commands for Common Problems
This guide covers basic Git commands to help you handle common challenges like merge conflicts, overwriting changes, and navigating commit history.
## Basic Commands
```bash
# Check status of your repository
git status
# Check commit history
git log
git log --oneline --graph --decorate # More visual representation
# View changes before committing
git diff
git diff --staged # View staged changes
```
## Handling Merge Conflicts
When your branch falls behind and you encounter conflicts:
```bash
# Update your local repository with remote changes
git fetch origin
# Merge changes from origin/main to your current branch
git merge origin/main
# If conflicts occur, Git will tell you which files are in conflict
# Edit the files manually to resolve conflicts, then:
git add <conflicted-files>
git commit -m "Resolve merge conflicts"
# Alternative: abort the merge if needed
git merge --abort
```
## Force Your Version as the Latest
When you want your version to override others:
```bash
# Force push your changes (use with caution!)
git push --force origin <branch-name>
# A safer alternative: force-with-lease checks if remote has new changes
git push --force-with-lease origin <branch-name>
# Overwrite local changes with remote changes
git reset --hard origin/<branch-name>
# Overwrite a single file with the version from another branch
git checkout <branch-name> -- <file-path>
```
## Going Back to a Specific Commit
```bash
# Move back to a specific commit without changing files (detached HEAD)
git checkout <commit-hash>
# Reset your branch to a specific commit (will lose later commits)
git reset --hard <commit-hash>
# Create a new commit that undoes changes from a previous commit
git revert <commit-hash>
```
## Branch Management
```bash
# Create and switch to a new branch
git checkout -b <new-branch-name>
# Switch to an existing branch
git checkout <branch-name>
# List all branches
git branch # Local branches
git branch -r # Remote branches
git branch -a # All branches
# Delete a branch
git branch -d <branch-name> # Safe delete (prevents deleting unmerged changes)
git branch -D <branch-name> # Force delete
```
## Stashing Changes
Useful when you need to switch branches but aren't ready to commit:
```bash
# Save changes to the stash
git stash save "Your stash message"
# List stashes
git stash list
# Apply the most recent stash without removing it
git stash apply
# Apply a specific stash
git stash apply stash@{n}
# Apply and remove the most recent stash
git stash pop
# Remove a stash
git stash drop stash@{n}
# Clear all stashes
git stash clear
```
## Fixing Mistakes
```bash
# Amend the last commit message
git commit --amend -m "New commit message"
# Add forgotten files to the last commit
git add <forgotten-files>
git commit --amend --no-edit
# Undo staging of files
git reset <file>
# Discard changes in working directory
git checkout -- <file>
git restore <file> # In newer Git versions
```
## Advanced Techniques
```bash
# Interactive rebase to edit, squash, or reorder commits
git rebase -i HEAD~n # Where n is the number of commits to go back
# Cherry-pick specific commits from another branch
git cherry-pick <commit-hash>
# Cleanup unnecessary files
git clean -n # Dry run - shows what would be deleted
git clean -f # Actually delete the files
# Temporarily save changes from a dirty working directory
git worktree add <path> <branch>
```
## Safety Tips
1. **Always create backups** before performing destructive operations
2. **Use `--dry-run`** when available to preview command effects
3. **Avoid force push** on shared branches (especially main/master)
4. Set up **aliases** for complex commands you use frequently
5. Configure Git to **require confirmation** for potentially harmful actions
Remember that Git preserves history in the `.git` directory, so most "destructive" commands can be undone, but it's better to be cautious.

View File

@ -0,0 +1,71 @@
***
[About repositories - GitHub Docs](https://docs.github.com/en/repositories/creating-and-managing-repositories/about-repositories)
## [About repositories](https://docs.github.com/en/repositories/creating-and-managing-repositories/about-repositories#about-repositories)
A repository is the most basic element of GitHub. It's a place where you can store your code, your files, and each file's revision history. Repositories can have multiple collaborators and can be either public or private.
To create a new repository, go to [https://github.com/new](https://github.com/new). For instructions, see [Quickstart for repositories](https://docs.github.com/en/repositories/creating-and-managing-repositories/quickstart-for-repositories).
## [Repository terminology](https://docs.github.com/en/repositories/creating-and-managing-repositories/about-repositories#repository-terminology)
Before getting started with repositories, learn these important terms.
|Term|Definition|
|---|---|
|Branch|A parallel version of your code that is contained within the repository, but does not affect the primary or main branch.|
|Clone|To download a full copy of a repository's data from GitHub.com, including all versions of every file and folder.|
|Fork|A new repository that shares code and visibility settings with the original "upstream" repository.|
|Merge|To take the changes from one branch and apply them to another.|
|Pull request|A request to merge changes from one branch into another.|
|Remote|A repository stored on GitHub, not on your computer.|
|Upstream|The branch on an original repository that has been forked or cloned. The corresponding branch on the cloned or forked repository is called the "downstream."|
## [About repository ownership](https://docs.github.com/en/repositories/creating-and-managing-repositories/about-repositories#about-repository-ownership)
You can own repositories individually, or you can share ownership of repositories with other people in an organization.
In either case, access to repositories is managed by permissions. For more information, see [Permission levels for a personal account repository](https://docs.github.com/en/account-and-profile/setting-up-and-managing-your-personal-account-on-github/managing-personal-account-settings/permission-levels-for-a-personal-account-repository) and [Repository roles for an organization](https://docs.github.com/en/organizations/managing-user-access-to-your-organizations-repositories/managing-repository-roles/repository-roles-for-an-organization).
## [About collaboration](https://docs.github.com/en/repositories/creating-and-managing-repositories/about-repositories#about-collaboration)
You can use repositories to manage your work and collaborate with others.
- You can use issues to collect user feedback, report software bugs, and organize tasks you'd like to accomplish. For more information, see [About issues](https://docs.github.com/en/issues/tracking-your-work-with-issues/about-issues).
- You can use GitHub Discussions to ask and answer questions, share information, make announcements, and conduct or participate in conversations about a project. For more information, see [About discussions](https://docs.github.com/en/discussions/collaborating-with-your-community-using-discussions/about-discussions).
- You can use pull requests to propose changes to a repository. For more information, see [About pull requests](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests).
- You can use Projects to organize and prioritize your issues and pull requests. For more information, see [About Projects](https://docs.github.com/en/issues/planning-and-tracking-with-projects/learning-about-projects/about-projects).
With GitHub Free for personal accounts and organizations, you can work with unlimited collaborators on unlimited public repositories with a full feature set, or unlimited private repositories with a limited feature set. To get advanced tooling for private repositories, you can upgrade to GitHub Pro, GitHub Team, or GitHub Enterprise Cloud. For more information, see [GitHubs plans](https://docs.github.com/en/get-started/learning-about-github/githubs-plans).
## [About repository visibility](https://docs.github.com/en/repositories/creating-and-managing-repositories/about-repositories#about-repository-visibility)
You can restrict who has access to a repository by choosing a repository's visibility: public or private.
When you create a repository, you can choose to make the repository public or private. Repositories in organizations that use GitHub Enterprise Cloud and are owned by an enterprise account can also be created with internal visibility. For more information, see [the GitHub Enterprise Cloud documentation](https://docs.github.com/en/enterprise-cloud@latest/repositories/creating-and-managing-repositories/about-repositories).
- Public repositories are accessible to everyone on the internet.
- Private repositories are only accessible to you, people you explicitly share access with, and, for organization repositories, certain organization members.
### [Security considerations for repository visibility](https://docs.github.com/en/repositories/creating-and-managing-repositories/about-repositories#security-considerations-for-repository-visibility)
Public repositories expose your codebase to everyone, increasing the risk that attackers might exploit vulnerabilities or access sensitive information. You can mitigate these risks by enabling GitHub security features such as Dependabot, secret scanning, push protection, and code scanning for the repository. Additionally, you should add a security policy (a `SECURITY.md` file) to your repository, that outlines how vulnerabilities should be reported, to ensure that potential threats are addressed efficiently.
Although private repositories restrict access to authorized users, it's still essential to implement strong access controls, multi-factor authentication, and regular audits to mitigate risks.
For more information, see [Quickstart for securing your repository](https://docs.github.com/en/code-security/getting-started/quickstart-for-securing-your-repository).
Organization owners always have access to every repository created in an organization. For more information, see [Repository roles for an organization](https://docs.github.com/en/organizations/managing-user-access-to-your-organizations-repositories/managing-repository-roles/repository-roles-for-an-organization).
People with admin permissions for a repository can change an existing repository's visibility. For more information, see [Setting repository visibility](https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/setting-repository-visibility).
## [Next steps](https://docs.github.com/en/repositories/creating-and-managing-repositories/about-repositories#next-steps)
Here are some helpful resources for taking your next steps with repositories.
- [Best practices for repositories](https://docs.github.com/en/repositories/creating-and-managing-repositories/best-practices-for-repositories): Learn how to use repositories most effectively.
- [Creating a new repository](https://docs.github.com/en/repositories/creating-and-managing-repositories/creating-a-new-repository): Create a new repository.
- [Creating and deleting branches within your repository](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-and-deleting-branches-within-your-repository): Learn how to create and delete branches within your repository.
- [Creating a pull request](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request): Create a pull request to propose and collaborate on changes to a repository.

View File

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 30 KiB

View File

Before

Width:  |  Height:  |  Size: 9.6 KiB

After

Width:  |  Height:  |  Size: 9.6 KiB

View File

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

View File

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 33 KiB

View File

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

View File

@ -1,161 +0,0 @@
# Essential Git Commands for Common Problems
This guide covers basic Git commands to help you handle common challenges like merge conflicts, overwriting changes, and navigating commit history.
## Basic Commands
```bash
# Check status of your repository
git status
# Check commit history
git log
git log --oneline --graph --decorate # More visual representation
# View changes before committing
git diff
git diff --staged # View staged changes
```
## Handling Merge Conflicts
When your branch falls behind and you encounter conflicts:
```bash
# Update your local repository with remote changes
git fetch origin
# Merge changes from origin/main to your current branch
git merge origin/main
# If conflicts occur, Git will tell you which files are in conflict
# Edit the files manually to resolve conflicts, then:
git add <conflicted-files>
git commit -m "Resolve merge conflicts"
# Alternative: abort the merge if needed
git merge --abort
```
## Force Your Version as the Latest
When you want your version to override others:
```bash
# Force push your changes (use with caution!)
git push --force origin <branch-name>
# A safer alternative: force-with-lease checks if remote has new changes
git push --force-with-lease origin <branch-name>
# Overwrite local changes with remote changes
git reset --hard origin/<branch-name>
# Overwrite a single file with the version from another branch
git checkout <branch-name> -- <file-path>
```
## Going Back to a Specific Commit
```bash
# Move back to a specific commit without changing files (detached HEAD)
git checkout <commit-hash>
# Reset your branch to a specific commit (will lose later commits)
git reset --hard <commit-hash>
# Create a new commit that undoes changes from a previous commit
git revert <commit-hash>
```
## Branch Management
```bash
# Create and switch to a new branch
git checkout -b <new-branch-name>
# Switch to an existing branch
git checkout <branch-name>
# List all branches
git branch # Local branches
git branch -r # Remote branches
git branch -a # All branches
# Delete a branch
git branch -d <branch-name> # Safe delete (prevents deleting unmerged changes)
git branch -D <branch-name> # Force delete
```
## Stashing Changes
Useful when you need to switch branches but aren't ready to commit:
```bash
# Save changes to the stash
git stash save "Your stash message"
# List stashes
git stash list
# Apply the most recent stash without removing it
git stash apply
# Apply a specific stash
git stash apply stash@{n}
# Apply and remove the most recent stash
git stash pop
# Remove a stash
git stash drop stash@{n}
# Clear all stashes
git stash clear
```
## Fixing Mistakes
```bash
# Amend the last commit message
git commit --amend -m "New commit message"
# Add forgotten files to the last commit
git add <forgotten-files>
git commit --amend --no-edit
# Undo staging of files
git reset <file>
# Discard changes in working directory
git checkout -- <file>
git restore <file> # In newer Git versions
```
## Advanced Techniques
```bash
# Interactive rebase to edit, squash, or reorder commits
git rebase -i HEAD~n # Where n is the number of commits to go back
# Cherry-pick specific commits from another branch
git cherry-pick <commit-hash>
# Cleanup unnecessary files
git clean -n # Dry run - shows what would be deleted
git clean -f # Actually delete the files
# Temporarily save changes from a dirty working directory
git worktree add <path> <branch>
```
## Safety Tips
1. **Always create backups** before performing destructive operations
2. **Use `--dry-run`** when available to preview command effects
3. **Avoid force push** on shared branches (especially main/master)
4. Set up **aliases** for complex commands you use frequently
5. Configure Git to **require confirmation** for potentially harmful actions
Remember that Git preserves history in the `.git` directory, so most "destructive" commands can be undone, but it's better to be cautious.

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,57 @@
***
Il progetto coinvolge un trasporto di bottiglie ad anello con i seguenti elementi:
* divider ad alta velocità
* combiner per unificare i canali all'uscita del divider
* trasporto con guide motorizzate per cambio di formato
* tavolo di accumulo che permette di immagazzinare il formato non utilizzato.
* Il tavolo di accumulo conta con 4 file a destra e 4 a sinistra oltre alla fila centrale usata solo come bypass.
* Il tavolo può immagazzinare 2 formati, uno a destra e l'altro a sinistra. Quando si richiede un cambio di formato si carica il formato in corso e si scarica il nuovo formato. Una volta scaricato il formato in corso si attiva la modalità bypass.
* Per effettuare il cambio di formato, il tavolo ha 2 motori di cambio formato delle guide che aprono o chiudono le sponde e i dosatori.
* Per selezionare il canale di carico o scarico si utilizzano 2 motori minimotori, uno all'ingresso e l'altro all'uscita che permettono di modificare l'angolo delle sponde. Questo angolo deve essere caricato come parametro e ci sono 9 canali possibili.
### Tavolo di accumulo
***
L'obiettivo del tavolo di accumulo è di immagazzinare il formato che non si sta usando.
Il lavoro avrà i seguenti obiettivi:
- Logica del tavolo di carico, scarico e bypass: gestione del cambio formato per il minimotor. Per semplicità, il tavolo è diviso in destra/sinistra e i formati possono essere solo su un lato.
- Logica dei motori ad anello e logica standard VM.
- L'HMI non sarà sviluppato in questa fase mi hai detto che se fa separatamente, ma verrà creato un simulatore per noi.
- Gestione delle ricette sull'HMI: inizialmente, si seguirà il piano concordato. Verranno create righe nel ricettario per ogni motore ad anello e per i dati del tavolo. Il cambio formato del tavolo inizierà solo dopo aver verificato che non ci siano più bottiglie sull'anello e che il modo carico sia attivo, con il divider e l'anello in automatico.
- Velocità:
- Velocità di bypass: dipende dal divider e dall'anello, non limitata dal tavolo.
- Velocità di carico/scarico: deve essere lenta per chiudere i buchi tra i cambi di canale del tavolo. Durante il carico, lo scarico è fermo e viceversa.
Per ora, prevedo al tavolo como un Device con i seguenti segnali in/out:
#### Segnali di Ingresso (Input)
***
| Segnale | Descrizione | Funzione |
| ------- | ----------------------------------------------- | ---------------------------------------------------------- |
| i1 | Uscita anello richiesta prodotto | Uscita libera |
| i2 | Richiesta da carico | Per cambio formato |
| i3 | Anello vuoto + divider in auto + anello in auto | Per generare consenso a cambio formato |
| i4 | Velocità motore bypass richiesta | Velocità desiderata per bypass |
| i5 | Cambio formato eseguito dall'HMI | Comando di esecuzione |
| i6 | Abilitazione scarico | Inibisce scarico automatico una volta completato il carico |
#### Segnali di Uscita (Output)
***
| Segnale | Descrizione | Funzione |
| ------- | -------------------------- | ---------------------------------------------------- |
| o1 | Ingresso richiede prodotto | Tavolo pronto e in marcia |
| o2 | Cambio formato consentito | Finito il carico e anello vuoto |
| o3 | Velocità motore uscita | Per interfacciare 1 motore uscita tavolo sull'anello |
| o4 | Tavolo in Bypass | Stato bypass attivo |
Cambio di stati sul tavolo:
- Il carico inizia su richiesta esterna i2 ( da operatore o timer ).
- Lo scarico avviene automaticamente dopo un cambio formato (i5). Il tavolo si scarica completamente prima di iniziare il modo bypass.
- Una volta scaricato, si attiva il modo bypass. (o4)

View File

@ -24,4 +24,71 @@ Then on the DB the FB will calculate this:
The Reset bit on the DB resets all memory's. Also there is a auto reset the first 10 seconds the CPU goes from STOP to START. The Reset bit on the DB resets all memory's. Also there is a auto reset the first 10 seconds the CPU goes from STOP to START.
```pascal
//FB Scan Time
//*************
//Calculate the execution time for the PLC of the code between the two call to this function. Normally this Function is used on a OB30 like this:
//
// Example: OB32 - Intterrupt of 5.0 ms
// -----------------------------------------
// "FB Scan Time_DBx"(CalculateRuntime := false,
// CycleTime := 5.0);
// ...
// PROGRAM .....
// ...
// "FB Scan Time_DBx"(CalculateRuntime:=true,CycleTime:=5.0);
//Max / Min / Average : of the runtime
//CallLost% : When the cycletime input > 0, CallLost% calculates the percentage OF cycles lost every second. This is useful for timing and monitoring Interrupt OB3x and to commision the right time for the interrupt.
//
//Reset: when TRUE resets all values. There is an autoreset also the first 10s of the PLC startup.
CALL RUNTIME
Ret_Val :=#ElapsedRuntime_s
MEM :=#Internal.TimeRecorded
IF NOT #CalculateRuntime THEN
RETURN;
ELSE
#CalculateRuntime := FALSE;
END_IF;
#ElapsedRuntime_ms := LREAL_TO_REAL(#ElapsedRuntime_s * 1000.0);
#TimeFromRUN := TIME_TO_DINT(TIME_TCK());
IF (#TimeFromRUN / 1000) < 10 THEN
#First10sCycle := true;
END_IF;
IF #Internal.CyclesForAverageCalc < 2 THEN
#Internal.CyclesForAverageCalc := 2;
END_IF;
IF #ElapsedRuntime_ms > #Max THEN
#Max := #ElapsedRuntime_ms;
END_IF;
IF #ElapsedRuntime_ms < #Min OR #Reset OR #First10sCycle THEN
#Min := #ElapsedRuntime_ms;
END_IF;
#Average := (#Average * (#Internal.CyclesForAverageCalc - 1) + (#ElapsedRuntime_ms)) / #Internal.CyclesForAverageCalc ;
#Internal.CounterOfCallsEachSecond := #Internal.CounterOfCallsEachSecond + 1;
IF (#TimeFromRUN / 1000) <> #Internal.LastCycleSeconds THEN
#Internal.CallCountLastSecond := #Internal.CounterOfCallsEachSecond;
#Internal.CounterOfCallsEachSecond := 0;
END_IF;
#Internal.LastCycleSeconds := (#TimeFromRUN / 1000);
IF #CycleTime > 0.5 THEN
#"CallLost%" := (((1000.0 / #CycleTime) - #Internal.CallCountLastSecond) / (1000.0 / #CycleTime)) * 100.0;
END_IF;
IF NOT #First10sCycle AND #Internal.CalculatedCycleStartTime = 0 OR #Reset THEN
#Internal.CalculatedCycleStartTime := #TimeFromRUN;
#Internal.CyclesForAverageCalc := 0.0;
END_IF;
IF (#TimeFromRUN - #Internal.CalculatedCycleStartTime) < #AverageTimeForCalc THEN
#Internal.CyclesForAverageCalc := #Internal.CyclesForAverageCalc + 1;
END_IF;
IF #RESET .. reset all counters
```

View File

@ -72,16 +72,16 @@ knick --> plc : "4-20mA"
# Comparative Table: UR62 vs UR24 Refractometers by Maselli # Comparative Table: UR62 vs UR24 Refractometers by Maselli
|Feature|UR62|UR24| | Feature | UR62 | UR24 |
|---|---|---| | --------------------------------- | ----------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- |
|**Classification**|Basic (THE BASIC)|Advanced (THE ULTIMATE)| | **Classification** | Basic (THE BASIC) | Advanced (THE ULTIMATE) |
|**Measurement range**|1.3229 … 1.505 nD (0…85 Bx)|1.3163 … 1.5318 nD (0…95 Bx)| | **Measurement range** | 1.3229 … 1.505 nD (0…85 Bx) | 1.3163 … 1.5318 nD (0…95 Bx) |
|**Accuracy**|• +/- 0.0004 nD (+/-0.2 Bx) alone<br>• +/- 0.0002 nD (+/-0.1 Bx) with RC24|• +/- 0.00003 nD (+/-0.02 Bx) SA version<br>• +/- 0.00007 nD (+/-0.05 Bx) HA version<br>• +/- 0.0002 nD (+/-0.15 Bx) STD version| | **Accuracy** | • +/- 0.0004 nD (+/-0.2 Bx) alone<br>• +/- 0.0002 nD (+/-0.1 Bx) with RC24 | • +/- 0.00003 nD (+/-0.02 Bx) SA version<br>• +/- 0.00007 nD (+/-0.05 Bx) HA version<br>• +/- 0.0002 nD (+/-0.15 Bx) STD version |
|**Repeatability**|• +/- 0.2 alone<br>• +/- 0.03 with RC24|Not specified| | **Repeatability** | • +/- 0.2 alone<br>• +/- 0.03 with RC24 | Not specified |
|**Product temperature**|-25…+90°C (-13…194°F)|• -5…+105°C (23…221°F)<br>• -5…+140°C (23…284°F) for LP version| | **Product temperature** | -25…+90°C (-13…194°F) | • -5…+105°C (23…221°F)<br>• -5…+140°C (23…284°F) for LP version |
|**Max sterilization temperature**|Hot water at 95°C x 30 min<br>Steam (0.5 bar) at 110°C x 30 min|• 125°C x 30 min<br>• 145°C x 30 min for LP version| | **Max sterilization temperature** | Hot water at 95°C x 30 min<br>Steam (0.5 bar) at 110°C x 30 min | • 125°C x 30 min<br>• 145°C x 30 min for LP version |
|**Line pressure**|• Max. 10 bar at 20°C<br>• Max. 8 bar at 90°C|• Max. 10 bar at 20°C<br>• Max. 8 bar at 100°C<br>• Special version up to 40 bar at 20°C| | **Line pressure** | • Max. 10 bar at 20°C<br>• Max. 8 bar at 90°C | • Max. 10 bar at 20°C<br>• Max. 8 bar at 100°C<br>• Special version up to 40 bar at 20°C |
|**Power supply**|• AC 24V ±10%, 50-60Hz, 80mA<br>• DC 24V ±10%, 80mA|• AC 24V ±10%, 50-60Hz, 0.6A<br>• DC 24V ±10%, 0.6A<br>• AC 115/230V ±10%, 50-60Hz, 25VA (with transformer)| | **Power supply** | • AC 24V ±10%, 50-60Hz, 80mA<br>• DC 24V ±10%, 80mA | • AC 24V ±10%, 50-60Hz, 0.6A<br>• DC 24V ±10%, 0.6A<br>• AC 115/230V ±10%, 50-60Hz, 25VA (with transformer) |
|**Interfaces**|Analog, Analog/Digital, PROFIBUS DP, Ethernet/IP|Analog, Analog/Digital, PROFIBUS DP, Ethernet/IP, PROFINET, Modbus/TCP| | **Interfaces** | Analog, Analog/Digital, PROFIBUS DP, Ethernet/IP | Analog, Analog/Digital, PROFIBUS DP, Ethernet/IP, PROFINET, Modbus/TCP |
|**Protection**|IP67 to EN60529|IP67 to EN60529| | **Protection** | IP67 to EN60529 | IP67 to EN60529 |
|**Main benefits**|• Optical Technology<br>• Basic accuracy<br>• 100% in-line installation<br>• No need of adjustments<br>• No maintenance|• Optical Technology<br>• High accuracy<br>• 100% in-line installation<br>• No need of adjustments<br>• No maintenance| | **Main benefits** | • Optical Technology<br>• Basic accuracy<br>• 100% in-line installation<br>• No need of adjustments<br>• No maintenance | • Optical Technology<br>• High accuracy<br>• 100% in-line installation<br>• No need of adjustments<br>• No maintenance |

View File

@ -0,0 +1,810 @@
***
## Panoramica del Sistema
Il Function Block **FB2120 MaselliTCP** è stato sviluppato per leggere direttamente i valori inviati dai sensori Maselli UR62 o UR29 utilizzando il protocollo ADAM tramite un gateway 485-Ethernet. Il sistema utilizza TCP per migliorare la resilienza dei dati, sfruttando la gestione automatica delle ritrasmissioni e il mantenimento dell'ordine dei frame.
### Vantaggi del Sistema
- **Comunicazione digitale diretta**: Evita la doppia conversione DAC-ADC, mantenendo la piena risoluzione
- **Resilienza TCP**: Gestione automatica delle ritrasmissioni e mantenimento dell'ordine dei dati
- **Sistema di riconnessione intelligente**: Gestisce diversi timeout per ristabilire la connessione
- **Monitoraggio avanzato**: Contatori per diversi tipi di errori e metriche di affidabilità
- **Compatibilità parallela**: Può funzionare in parallelo al sistema ADAM esistente
## Architettura del Sistema
```plantuml
@startuml
!define RECTANGLE class
!theme plain
package "Sensore Maselli" #E8F4F8 {
[UR62/UR29] as sensor #4A90A4
}
package "Gateway 485-Ethernet" #E8F5E8 {
[Waveshare RS485-TCP] as gateway #2E7D32
}
package "PLC Siemens S7-300" #E3F2FD {
[FB2120 MaselliTCP] as fb #1565C0
[TCON] as tcon #42A5F5
[TRCV] as trcv #42A5F5
[TDISCON] as tdiscon #42A5F5
}
package "Rete Ethernet" #FFF3E0 {
[TCP Connection] as tcp #FF8F00
}
sensor -right-> gateway : RS485\nProtocollo ADAM
gateway -right-> tcp : TCP Trasparente
tcp -right-> fb : Frame #XX12.345CKCR
fb -down-> tcon : Connessione
fb -down-> trcv : Ricezione
fb -down-> tdiscon : Disconnessione
note right of gateway #E8F5E8
**Gateway trasparente 485-Ethernet**
• Converte RS485 in TCP
• Server TCP sulla porta 8899
• Comunicazione bidirezionale
end note
note right of fb #E3F2FD
**FB2120 gestisce:**
• State machine TCP
• Buffer circolare ottimizzato
• Parsing frame ADAM
• Calcolo Brix digitale
• Gestione errori avanzata
end note
@enduml
```
```plantuml
@startuml
skinparam cloud {
BackgroundColor Gold
BorderColor Orange
}
' Definición de los componentes con colores
component "🔌 UR29" as Meter <<meter>> #LightBlue {
[RS485] as MeterRS485 #SkyBlue
}
component "🌐 Gateway RS485-Ethernet" as Gateway <<gateway>> #LightGreen {
[RS485] as GatewayRS485 #SkyBlue
[Ethernet] as GatewayEth #LightYellow
}
component "🖥️ PLC 315F 2PN/DP" as PLC <<plc>> #LightBlue {
[PN] as PLCEth #LightYellow
[FB2120] as FB2120 #LightPink
[DB2120] as DB2120 #LightPink
}
' Fuente de alimentación con estilo
cloud "⚡ Alimentatore\n24V DC" as PowerSupply #Gold
' Conexiones de datos con colores y etiquetas mejoradas
MeterRS485 -[#Blue,thickness=3]-> GatewayRS485 : "📡 RS485\nADAM Protocol"
GatewayEth -[#Green,thickness=3]-> PLCEth : "🌐 Ethernet\nTCP Trasparente"
' Conexión interna del PLC
PLCEth -[#Purple,thickness=2]-> FB2120 : "Comm TCP"
FB2120 -[#Purple,thickness=2]-> DB2120 : "Dati"
' Conexiones de alimentación
PowerSupply -[#Red,dashed,thickness=2]-> Meter : "24V DC"
PowerSupply -[#Red,dashed,thickness=2]-> Gateway : "24V DC"
PowerSupply -[#Red,dashed,thickness=2]-> PLC : "24V DC"
' Notas explicativas con colores
note right of Meter #LightBlue
**Reflectometer**
• Protocollo: Transparent TCP
• Interfaccia: RS485
• Velocità: 115200 bps
end note
note top of Gateway #LightGreen
**Gateway di Comunicazione**
• Conversione RS485 ↔ Ethernet
• Protocollo: TCP Trasparente
• IP: 10.1.33.18
end note
note left of PLC #LightBlue
**PLC Siemens 315**
• CPU 315-2DP
• Interfaccia Ethernet
• FB2120: Function Block comunicazione
• DB2120: Data Block instanza
• IP: 10.1.33.11
end note
' Título del diagrama
title **Sistema di Comunicazione Industriale**\n//Contatore → Gateway → PLC//
@enduml
```
```plantuml
@startuml
!theme toy
' Layout horizontal para enfatizar flujo de datos
left to right direction
skinparam cloud {
BackgroundColor Gold
BorderColor Orange
}
' Definición de los componentes con colores
component "🔌 UR29" as Meter <<meter>> #LightBlue {
[RS485] as MeterRS485 #SkyBlue
}
component "🌐 Gateway RS485-Ethernet" as Gateway <<gateway>> #LightGreen {
[RS485] as GatewayRS485 #SkyBlue
[Ethernet] as GatewayEth #LightYellow
}
component "🖥️ PLC 315F 2PN/DP" as PLC <<plc>> #LightBlue {
[PN] as PLCEth #LightYellow
[FB2120] as FB2120 #LightPink
[DB2120] as DB2120 #LightPink
}
' Alimentación minimalista en la parte superior
note top #Gold : **⚡ Alimentazione 24V DC**\n//Tutti i componenti//
' CONEXIONES DE DATOS PRINCIPALES - MUY VISIBLES
MeterRS485 -[#Blue,thickness=5]-> GatewayRS485 : "📡 **RS485**\n//ADAM Protocol//\n**115200 bps**"
GatewayEth -[#Green,thickness=5]-> PLCEth : "🌐 **ETHERNET**\n//TCP Trasparente//\n**10.1.33.18 → 10.1.33.11**"
' Conexiones internas del PLC con flujo claro
PLCEth -[#Purple,thickness=4]-> FB2120 : "**TCP Data**"
FB2120 -[#Purple,thickness=4]-> DB2120 : "**Memory**"
' Indicadores de dirección de flujo
note bottom of Meter #LightCyan : **📤 TX Data**
note bottom of PLC #LightCyan : **📥 RX Data**
' Notas técnicas compactas
note right of Gateway #LightGreen
**Gateway Configuration**
• RS485 ↔ Ethernet Bridge
• Transparent TCP Protocol
• IP: 10.1.33.18
• Port: Configurable
end note
' Título enfocado en comunicación
title **🔗 Flusso Dati di Comunicazione Industriale**\n//UR29 Reflectometer → TCP Gateway → Siemens PLC//
@enduml
```
## State Machine Principale
Il FB2120 utilizza una state machine principale per gestire la connessione TCP:
```plantuml
@startuml
!theme plain
[*] --> IDLE : Sistema avviato
IDLE : Entry: xConnected = FALSE
IDLE : Do: Retry delay attivo
IDLE --> CONNECT : xEnable = TRUE AND tonRetryDelay.Q
CONNECT : Entry: Preparazione connessione
CONNECT : Do: iCyclesToWait + 1
CONNECT --> WAIT_CONNECT : iCyclesToWait >= 2
WAIT_CONNECT : Entry: xTconReq = TRUE
WAIT_CONNECT : Do: TCON attivo, tonConnTimeout attivo
WAIT_CONNECT --> READING : TCON.DONE
WAIT_CONNECT --> DISCONNECT : TCON.ERROR OR tonConnTimeout.Q
WAIT_CONNECT --> DISCONNECT : NOT xEnable
READING : Entry: xConnected = TRUE
READING : Do: TRCV attivo, lettura frame
READING : Do: Reading state machine attiva
READING --> DISCONNECT : TRCV.ERROR OR tonNoDataTimeout.Q
READING --> DISCONNECT : NOT xEnable
DISCONNECT : Entry: xTdisconReq = TRUE
DISCONNECT : Do: TDISCON attivo
DISCONNECT --> IDLE : TDISCON.DONE OR TDISCON.ERROR
note right of READING
Stato più complesso con
sub-state machine per
la gestione della lettura
end note
@enduml
```
## Reading State Machine
Durante lo stato READING, una sub-state machine gestisce la lettura ottimizzata dei frame:
```plantuml
@startuml
!theme plain
[*] --> ACTIVE_READING : Ingresso in READING
state "Fase Inizializzazione" as INIT {
ACTIVE_READING : Entry: xTrcvTimeToCall = TRUE
ACTIVE_READING : Do: Lettura intensiva ogni ciclo
ACTIVE_READING : Do: Accumulo diAccumCycleMs
ACTIVE_READING --> COMPLETED : Frame valido ricevuto
COMPLETED : Entry: xTrcvTimeToCall = FALSE
COMPLETED : Do: Calcolo intervallo frame
COMPLETED : Do: Reset diAccumCycleMs = 0
COMPLETED --> ACTIVE_READING : xInitPhaseFinish = FALSE
}
state "Fase Normale" as NORMAL {
ACTIVE_READING2 : Entry: xTrcvTimeToCall = TRUE
ACTIVE_READING2 : Do: Lettura intensiva
ACTIVE_READING2 --> PAUSED : Troppo tempo al prossimo frame
ACTIVE_READING2 --> COMPLETED2 : Frame valido ricevuto
PAUSED : Entry: xTrcvTimeToCall = FALSE
PAUSED : Do: Attesa finestra frame
PAUSED --> ACTIVE_READING2 : Vicino al prossimo frame
COMPLETED2 : Entry: Elaborazione frame
COMPLETED2 : Do: Aggiornamento statistiche
COMPLETED2 --> PAUSED : Completato
}
INIT --> NORMAL : xInitPhaseFinish = TRUE
note right of INIT
Durante l'inizializzazione
legge continuamente per
sincronizzarsi con il flusso
end note
note right of NORMAL
In funzionamento normale
ottimizza la lettura con
finestre temporali
end note
@enduml
```
## Formato Frame ADAM
Il protocollo ADAM utilizza frame di 12 byte fissi:
```plantuml
@startuml
!theme plain
package "Frame ADAM - 12 Bytes" {
rectangle "Byte 0\n#" as b0
rectangle "Byte 1-2\nAdam ID" as b12
rectangle "Byte 3-4\nXX" as b34
rectangle "Byte 5\n." as b5
rectangle "Byte 6-8\nYYY" as b678
rectangle "Byte 9-10\nChecksum" as b910
rectangle "Byte 11\nCR" as b11
}
b0 -right-> b12
b12 -right-> b34
b34 -right-> b5
b5 -right-> b678
b678 -right-> b910
b910 -right-> b11
note bottom of b0
Start marker '#'
(0x23)
end note
note bottom of b12
Device ID
"01" = Dispositivo 1
"02" = Dispositivo 2
end note
note bottom of b34
Parte intera
corrente mA
"02" = 2mA
end note
note bottom of b5
Separatore decimale
'.' (0x2E)
end note
note bottom of b678
Parte decimale
corrente mA
"145" = 0.145mA
end note
note bottom of b910
Checksum esadecimale
Somma bytes 0-8
modulo 256
end note
note bottom of b11
Carriage Return
(0x0D)
end note
@enduml
```
**Esempio Frame**: `#0102.145CkCr`
- `#`: Start marker
- `01`: Device ID = 1
- `02.145`: Corrente = 2.145 mA
- `Ck`: Checksum calcolato
- `Cr`: Carriage return
## Sequenza di Comunicazione TCP
```plantuml
@startuml
!theme plain
participant "FB2120" as fb
participant "TCON" as tcon
participant "Gateway" as gw
participant "TRCV" as trcv
participant "Sensore" as sensor
== Fase Connessione ==
fb -> tcon : REQ=TRUE, ID=W#16#10
tcon -> gw : TCP SYN a IP:porta
gw -> tcon : TCP SYN-ACK
tcon -> fb : DONE=TRUE
== Fase Lettura ==
loop Lettura Continua
sensor -> gw : Frame ADAM via RS485
gw -> fb : Frame TCP trasparente
fb -> trcv : EN_R=TRUE (se xTrcvTimeToCall)
trcv -> fb : NDR=TRUE + dati
fb -> fb : Parsing frame, validazione
fb -> fb : Calcolo Brix, aggiornamento FIFO
end
== Gestione Errori ==
alt Errore di comunicazione
trcv -> fb : ERROR=TRUE
fb -> fb : Analisi errore, riconnessione
end
== Disconnessione ==
fb -> tdiscon : REQ=TRUE
tdiscon -> gw : TCP FIN
gw -> tdiscon : TCP FIN-ACK
tdiscon -> fb : DONE=TRUE
@enduml
```
## Gestione Buffer Circolare
Il sistema utilizza un buffer circolare per gestire efficacemente i frame ricevuti:
```plantuml
@startuml
!theme plain
package "Buffer Circolare - 256 Bytes" {
rectangle "Circular Buffer\naCircBuffer[0..255]" as buffer
rectangle "Write Pointer\niWritePtr" as wptr
rectangle "Read Pointer\niReadPtr" as rptr
rectangle "Data Count\niDataInBuffer" as count
}
package "Frame Processing" {
rectangle "Ricerca '#'" as search
rectangle "Validazione Formato" as validate
rectangle "Parsing Dati" as parse
rectangle "Calcolo Checksum" as checksum
}
buffer -down-> search : Scan per start marker
search -right-> validate : Frame trovato
validate -right-> parse : Formato OK
parse -right-> checksum : Dati estratti
checksum -up-> buffer : Frame processato, avanzamento puntatori
note right of buffer
Buffer di 256 byte per gestire
ricezione asincrona e parsing
efficiente dei frame
end note
note bottom of search
Ricerca sequenziale del
carattere '#' per inizio frame
end note
@enduml
```
## Codici di Errore
Il sistema utilizza codici di errore gerarchici (priorità crescente):
|Codice|Priorità|Descrizione|
|---|---|---|
|0|-|Nessun errore|
|1|Bassa|Errore checksum|
|2|Bassa|Formato frame non valido|
|3|Bassa|Caratteri non numerici|
|4|Media|Dati fuori range (4-20mA)|
|5|Media|Frame consecutivi errati|
|6|Media|Frame persi rilevati|
|7|Alta|Buffer TRCV troppo piccolo|
|8|Alta|Errore comunicazione TRCV|
|9|Critica|Timeout ricezione dati|
|10|Critica|Timeout connessione|
|11|Critica|Connessione TCP fallita|
|12|Critica|Connessione TCP terminata|
## Parametri di Configurazione
### Input Parameters
- **xEnable**: Abilitazione comunicazione
- **aRemoteIP**: IP del gateway [10,1,33,100]
- **iRemotePort**: Porta TCP (default: 8899)
- **rBrixMax**: Valore Brix massimo a 20mA (default: 80.0)
- **wConnectionID**: ID connessione TCP
- **xEnableChecksum**: Abilitazione validazione checksum
- **rFramesPerSecond**: Frame attesi per secondo (default: 3.0)
- **iDeviceID**: ID dispositivo da validare (0=disabilitato)
### Output Parameters
- **xConnected**: Stato connessione
- **xDataValid**: Pulse per nuovo dato valido
- **xError**: Errore attivo
- **iErrorCode**: Codice errore strutturato
- **rCurrentMA**: Valore corrente in mA
- **rBrixValue**: Valore Brix calcolato
- **diTimeBetweenFramesMs**: Tempo tra frame consecutivi
## Calcolo Brix
La conversione dalla corrente 4-20mA al valore Brix segue la formula:
```
rBrixValue = (rCurrentMA - 4.0) * rBrixMax / 16.0
```
**Esempio**:
- Corrente ricevuta: 12.0 mA
- Brix Max configurato: 80.0
- Calcolo: (12.0 - 4.0) * 80.0 / 16.0 = 40.0 Brix
## Sistema FIFO (Debug Mode)
Quando `xEnableFifoDebug = TRUE`, il sistema mantiene le ultime 10 letture:
- **arBrixHistory[0..9]**: Valori Brix (newest → oldest)
- **auiTimeHistory[0..9]**: Timestamp (newest → oldest)
I dati vengono spostati ad ogni nuovo valore valido, con il più recente sempre in posizione [0].
## Vantaggi Implementativi
### Ottimizzazioni v1.8
- **Buffer ottimizzato**: Ridotto da 128 a 23 byte
- **State machine migliorata**: Fase di inizializzazione separata
- **Lettura adattiva**: Finestre temporali ottimizzate
- **Gestione errori avanzata**: Codici gerarchici strutturati
- **Sincronizzazione migliorata**: Flag xInitPhaseFinish
### Resilienza del Sistema
- **Riconnessione automatica**: Gestione intelligente dei timeout
- **Buffer circolare**: Gestione efficace dei dati asincroni
- **Validazione multipla**: Formato, checksum, range dati
- **Statistiche dettagliate**: Monitoraggio prestazioni e affidabilità
## Configurazione Hardware Richiesta
### Gateway Suggerito
- **Waveshare Industrial Grade Serial Server RS232/485 to WiFi And Ethernet**
- Configurazione: Server TCP trasparente
- Porta: 8899 (configurabile)
- Modalità: Trasparente RS485 → TCP
### PLC Requirements
- **Siemens S7-300** con supporto TCP/IP
- **Function Blocks**: TCON, TRCV, TDISCON (standard Siemens)
- **Memoria**: ~2KB per istanza FB
- **Nessuna configurazione NetPro richiesta**
## Utilizzo Pratico
1. **Istanziare FB2120** con parametri specifici del sensore
2. **Configurare IP/Porta** del gateway nel codice
3. **Impostare xEnable = TRUE** per avviare la comunicazione
4. **Monitorare xDataValid** per nuovi dati
5. **Verificare iErrorCode** per diagnostica
6. **Leggere rBrixValue** e rCurrentMA** per i valori processati
Il sistema è progettato per funzionare in parallelo ai sistemi ADAM esistenti, offrendo una soluzione digitale più precisa e affidabile per la lettura dei sensori Maselli.
## Reading State Machine e Burst-Reading
Durante lo stato READING, una sub-state machine gestisce la lettura ottimizzata dei frame con la tecnica del **burst-reading** per ottimizzare le risorse del PLC:
```plantuml
@startuml
!theme plain
[*] --> ACTIVE_READING : Ingresso in READING
state "Fase Inizializzazione" as INIT {
ACTIVE_READING : Entry: xTrcvTimeToCall = TRUE
ACTIVE_READING : Do: Lettura intensiva ogni ciclo
ACTIVE_READING : Do: Accumulo diAccumCycleMs
ACTIVE_READING : Do: Ricerca sincronizzazione frame
ACTIVE_READING --> COMPLETED : Frame valido ricevuto
COMPLETED : Entry: xTrcvTimeToCall = FALSE
COMPLETED : Do: Calcolo intervallo frame iniziale
COMPLETED : Do: Aggiornamento stTiming.diEstFrameMs
COMPLETED : Do: Reset diAccumCycleMs = 0
COMPLETED --> ACTIVE_READING : xInitPhaseFinish = FALSE
COMPLETED --> INIT_COMPLETE : Buffer sincronizzato E tempo > 2*intervallo
INIT_COMPLETE : Entry: xInitPhaseFinish = TRUE
INIT_COMPLETE : Do: Transizione a funzionamento normale
}
state "Fase Funzionamento Normale" as NORMAL {
ACTIVE_READING_BURST : Entry: xTrcvTimeToCall = TRUE
ACTIVE_READING_BURST : Do: Lettura burst intensiva
ACTIVE_READING_BURST : Do: diReadingStartMs = diAccumCycleMs
ACTIVE_READING_BURST --> PAUSED : (diNextFrameMs - diAccumCycleMs) > iMaxActiveReadingMs
ACTIVE_READING_BURST --> COMPLETED_NORMAL : Frame valido ricevuto
PAUSED : Entry: xTrcvTimeToCall = FALSE
PAUSED : Do: Risparmio risorse CPU
PAUSED : Do: Attesa finestra frame calcolata
PAUSED --> ACTIVE_READING_BURST : (diNextFrameMs - diAccumCycleMs) <= iPreReadOffsetMs
COMPLETED_NORMAL : Entry: xTrcvTimeToCall = FALSE
COMPLETED_NORMAL : Do: Elaborazione frame completa
COMPLETED_NORMAL : Do: Aggiornamento statistiche avanzate
COMPLETED_NORMAL : Do: Smoothing diEstFrameMs
COMPLETED_NORMAL : Do: Rilevamento frame persi
COMPLETED_NORMAL --> PAUSED : Sempre
}
INIT --> NORMAL : xInitPhaseFinish = TRUE
note right of INIT
**Fase Inizializzazione:**
- Lettura continua per sincronizzazione
- Apprendimento timing frame
- Pulizia buffer da dati residui
- Stima intervallo frame iniziale
end note
note right of NORMAL
**Burst-Reading Ottimizzato:**
- Lettura intensiva solo quando necessario
- Pausa durante attese lunghe
- Risparmio risorse CPU del 60-80%
- Finestre temporali adattive
end note
note bottom of PAUSED
**Ottimizzazione Risorse:**
- TRCV non chiamato
- CPU dedicata ad altri task
- Calcolo dinamico finestra lettura
end note
@enduml
```
## Sequenza Dettagliata Burst-Reading
```plantuml
@startuml
!theme plain
title Sequenza Burst-Reading - Ottimizzazione Risorse PLC
actor "Ciclo PLC" as plc
participant "iReadingState\nMachine" as rsm
participant "TRCV" as trcv
participant "Buffer\nCircolare" as buffer
participant "Gateway\nTCP" as gateway
participant "Sensore\nMaselli" as sensor
== Fase Inizializzazione (xInitPhaseFinish = FALSE) ==
loop Sincronizzazione Iniziale
plc -> rsm : Ciclo PLC (ogni 10-50ms)
rsm -> rsm : iReadingState = 0 (ACTIVE_READING)
rsm -> rsm : xTrcvTimeToCall = TRUE
rsm -> trcv : TRCV(EN_R=TRUE) - **Lettura Intensiva**
alt Frame disponibile
sensor -> gateway : Frame ADAM #01XX.YYYCKHR
gateway -> trcv : TCP Data
trcv -> rsm : NDR=TRUE + 12 bytes
rsm -> buffer : Copia in buffer circolare
rsm -> rsm : Parsing e validazione frame
alt Frame valido
rsm -> rsm : iReadingState = 1 (COMPLETED)
rsm -> rsm : Calcolo primo intervallo
rsm -> rsm : diAccumCycleMs = 0 (reset timer)
rsm -> rsm : iConsecutiveGoodFrames++
alt Sincronizzazione completa
rsm -> rsm : xInitPhaseFinish = TRUE
rsm -> rsm : **Transizione a Burst-Reading**
end
end
else Nessun frame
rsm -> rsm : Continua accumulo diAccumCycleMs
end
end
== Fase Funzionamento Normale (Burst-Reading) ==
loop Ciclo Ottimizzato
plc -> rsm : Ciclo PLC
rsm -> rsm : Calcolo finestra frame
alt Finestra Attiva (vicino al frame atteso)
rsm -> rsm : iReadingState = 0 (ACTIVE_READING_BURST)
rsm -> rsm : xTrcvTimeToCall = TRUE
rsm -> trcv : **TRCV(EN_R=TRUE) - Burst Intensivo**
note right : **Lettura Burst:**\nTRCV chiamato ogni ciclo\nper massima reattività
alt Frame ricevuto
trcv -> rsm : NDR=TRUE + frame data
rsm -> rsm : iReadingState = 1 (COMPLETED_NORMAL)
rsm -> rsm : Elaborazione completa frame
rsm -> rsm : Aggiornamento statistiche
rsm -> rsm : Smoothing diEstFrameMs
rsm -> rsm : diNextFrameMs = nuovo calcolo
rsm -> rsm : iReadingState = 2 (PAUSED)
else Timeout burst
rsm -> rsm : iReadingState = 2 (PAUSED)
note right : Evita lettura continua\neccessiva
end
else Finestra Inattiva (troppo presto per il prossimo frame)
rsm -> rsm : iReadingState = 2 (PAUSED)
rsm -> rsm : xTrcvTimeToCall = FALSE
rsm -> trcv : **TRCV(EN_R=FALSE) - Risparmio CPU**
note right : **Modalità Pausa:**\nTRCV non chiamato\nCPU disponibile per altri task\nRisparmio energetico
rsm -> rsm : Calcolo: (diNextFrameMs - diAccumCycleMs)
rsm -> rsm : Se <= iPreReadOffsetMs → Attiva burst
end
end
note over plc, sensor
**Vantaggi Burst-Reading:**
• Risparmio CPU: 60-80% in modalità PAUSED
• Reattività massima durante burst
• Sincronizzazione automatica con sensore
• Adattamento dinamico agli intervalli frame
• Riduzione interferenze con altri task PLC
end note
@enduml
```
## Fase di Inizializzazione Dettagliata
La fase di inizializzazione è critica per sincronizzare il PLC con il flusso dati del sensore Maselli:
```plantuml
@startuml
!theme plain
title Sequenza Fase di Inizializzazione - Sincronizzazione con Sensore
participant "FB2120" as fb
participant "Buffer\nCircolare" as buffer
participant "Frame\nParser" as parser
participant "Timing\nEngine" as timing
participant "Statistiche" as stats
== Avvio Inizializzazione ==
fb -> fb : xInitPhaseFinish = FALSE
fb -> fb : iReadingState = 0 (ACTIVE_READING)
fb -> fb : diAccumCycleMs = 0
fb -> fb : iConsecutiveGoodFrames = 0
fb -> timing : diInitPhaseStartMs = diAccumCycleMs
== Raccolta Dati Iniziale ==
loop Lettura Continua (xTrcvTimeToCall = TRUE)
fb -> buffer : Ricezione dati TCP asincroni
buffer -> buffer : Accumulo bytes in buffer circolare
buffer -> parser : Ricerca pattern #XX.YYY
alt Buffer contiene dati residui/parziali
parser -> buffer : Pulizia dati non validi
parser -> buffer : Allineamento a boundary frame
note right : Rimozione garbage data\nda precedenti connessioni
end
alt Frame completo trovato
parser -> parser : Validazione formato
alt Frame strutturalmente valido
parser -> fb : Frame OK + dati estratti
fb -> fb : iConsecutiveGoodFrames++
fb -> fb : Calcolo intervallo grezzo
fb -> timing : Aggiornamento diEstFrameMs iniziale
fb -> stats : Incremento contatori successo
alt Prima sincronizzazione (frames >= 2)
fb -> timing : diEstFrameMs = intervallo_misurato
fb -> timing : Calcolo finestre ottimizzate
note right : **Parametri Calcolati:**\ndiFrameIntervalMs = 1000/rFramesPerSecond\niPreReadOffsetMs = intervallo/6\niMaxActiveReadingMs = intervallo/3
end
else Frame non valido
parser -> stats : Incremento errori formato
parser -> buffer : Scarta frame e continua
end
end
alt Condizioni per completamento inizializzazione
fb -> fb : Verifica: diAccumCycleMs > (diFrameIntervalMs * 2)
fb -> fb : Verifica: stBuffer.iRxLength = 12 (buffer pulito)
fb -> fb : Verifica: iConsecutiveGoodFrames >= 2
alt Tutte le condizioni soddisfatte
fb -> fb : **xInitPhaseFinish = TRUE**
fb -> timing : Finalizzazione parametri timing
fb -> fb : Transizione a funzionamento normale
note over fb : **Inizializzazione Completata:**\n• Buffer sincronizzato con frame\n• Timing affidabile stabilito\n• Sistema pronto per burst-reading
end
end
end
== Parametri Calcolati Automaticamente ==
timing -> timing : diFrameIntervalMs = 1000.0 / rFramesPerSecond
timing -> timing : iPreReadOffsetMs = MAX(20, diFrameIntervalMs/6)
timing -> timing : iMaxActiveReadingMs = MAX(50, diFrameIntervalMs/3)
timing -> timing : diNextFrameMs = diEstFrameMs
note over timing
**Calcoli Adattivi:**
• Intervallo teorico da configurazione
• Intervallo reale da misurazione
• Finestre dinamiche per ottimizzazione
• Sicurezza con valori minimi
end note
@enduml
```

View File

@ -0,0 +1,12 @@
### Gateways:
***
* Phoenix: [FL COMSERVER UNI 232/422/485 - Interface converters - 2313452 \| Phoenix Contact](https://www.phoenixcontact.com/en-pc/products/interface-converters-fl-comserver-uni-232-422-485-2313452)
* Waveshare: [Waveshare 4-Ch RS485 to RJ45 Ethernet Serial Server, 4 Channels RS485 Independent Operation, Rail-Mount Industrial Isolated Serial Module, Modbus Gateway, PoE Ethernet Port : Amazon.it: Informatica](https://www.amazon.it/Waveshare-Independent-Operation-Rail-Mount-Industrial/dp/B0CQYGDMDK/ref=sr_1_9?__mk_it_IT=%C3%85M%C3%85%C5%BD%C3%95%C3%91&crid=2XU08FRZO930E&dib=eyJ2IjoiMSJ9.lZgZ_MD-K6Zaz6mtlp9b5bUbCBRkGA0GE4U4zHPabq6YKvG_WrwkzwIiUpUOYrHCb4jZetzrol1ZPaPPx1JzaT31o6kyr9wVZgIStLHTld2jvutCFal_gAXLT8oO3DxChmyCC5WLLi23Km1jf_E26TPjmR0R1Bn0-kBDhsexPWVs2CTxtAdjq-PFtdh0RarBaPfgrdDnyH4WxbnOh_xZ00Ur1v1HJ7ewmwO7xpTwDoc.6bYrjn09M8M-tMlbvo0Nt6HRykvnWILBmoJl_F3eKfs&dib_tag=se&keywords=485+ethernet&qid=1748331701&sprefix=485+ethernet%2Cspecialty-aps%2C91&sr=8-9&srs=19998714031)
* MOXA: [NPort 5230A Moxa](https://it.wiautomation.com/moxa/comunicazione-industriale/comunicazione-industriale/nport5230a?utm_source=google&utm_medium=cpc&utm_campaign=IT_pmax_new_insert_3&gad_source=1&gad_campaignid=17337730689&gclid=Cj0KCQjwxdXBBhDEARIsAAUkP6hF-BZL17vGTrIQF4l8JuAAtxR-JJX3OxC5akIyDTQDlPZjL0wtNZsaArO8EALw_wcB)
[[Waveshare RS232-485 Ethernet - Wifi - ADAM 4021 - Using Serial200]]

View File

@ -0,0 +1,38 @@
***
### Ver 1.7 a 1.8:
```pascal
Quisiera implementar los siguientes cambios:
# Datos:
1) Mejora de los datos estaticos, no los in o out o temp, usando struct para poder leer mejor desde la DB. Los struct se pueden dividir por conceptos
2) Dejar en la parte inferior de la DB las instancias de otras FB o datos internos del script
3) Crear y gestionar una nueva tabla FIFO con los ultimas 10 lecturas en Brix y otra tabla con el tiempo diAccumCycleMs en cada lectura
# Logica:
1) Optimización del Buffer
Cambiar tamaño del buffer de recepción:
aRxBuffer : ARRAY[0..22] OF BYTE; // De 128 a 23 bytes
Esto descarta automáticamente tramas antiguas manteniendo solo la más reciente
2) iReadingState
0: // ACTIVE_READING - Receiving data burst, read intensively
1: // COMPLETED - Finished reading a valid frame, return to paused
2: // PAUSED - Not reading, waiting for next frame window
Cuando se comienza una secuencia de lectura luego de iState n a 3 el flag xInitPhaseFinish es False y se resetan los calculos de tiempo de ciclo a dafault
Mientras este flag esta en false iReadingState salta el estado 2 de Paused. Esto permite limpiar el buffer y sincronizar las lecturas con la velocidad de lectura del server
Duración: (diFrameIntervalMs*2) después de conectar. Timer independiente
Luego de terminado el timer y se cumplen las condiciones de xDataValid = TRUE y iRxLength = 12 significa que estamos sincronizados y sin buffer. Se hace xInitPhaseFinish := True y el iReadingState = 2 comienza a funcionar.
Durante la fase de xInitPhaseFinish = false cada ciclo de iReadingState = 1 ( completed ) fue calculando los tiempos como en el script actual
3) diAccumCycleMs solo se incrementa con el iState = 3. Al hacer reset de los calculos de tiempo en iState = 2 se pone a 0 diAccumCycleMs, esto deberia limitar diAccumCycleMs a iDataTimeoutSec ya que si no hay datos por mas de iDataTimeoutSec se pasa a iState := 4
```