Compare commits
42 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 6f46e5a9a5 | |||
| 1c0f161640 | |||
| 7a66c3d63d | |||
| 8e3f3ec5e0 | |||
| cf96c67a3c | |||
| ae8f931372 | |||
| 20d9bf716d | |||
| 2f6f308f19 | |||
| 7fd2b6ca30 | |||
| aff9643216 | |||
| 465b09c176 | |||
| 1efde033b2 | |||
| 4a609bc35b | |||
| 88aa48a3d8 | |||
| b280dca20f | |||
| a6d6041b06 | |||
| 46b7b02da9 | |||
| 98d3798824 | |||
| dd7e9b9e19 | |||
| 550b448dc2 | |||
| afaa8f3576 | |||
| 328d2ed176 | |||
| 9bd1faf083 | |||
| 6526a20d5c | |||
| 9f4adce366 | |||
| 7d29511fdb | |||
| e28b736ebf | |||
| 383b5417d4 | |||
| 3f9b2a8c8e | |||
| 382d961761 | |||
| ae3294ca46 | |||
| 1f75da9bef | |||
| ed8400619c | |||
| 67fcba0053 | |||
| a7548a6e78 | |||
| 90fe35fc1c | |||
| 4737d22a2f | |||
| 7a9dca8807 | |||
| 2dfc9e293f | |||
| 3cca07422c | |||
| af4870d99d | |||
| 7b6ee330bb |
@@ -1,79 +1,86 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
||||
|
||||
<xs:element name="inputsOperator">
|
||||
<xs:complexType>
|
||||
<xs:choice maxOccurs="unbounded">
|
||||
<xs:element name="realValueModal" type="valuesType" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xs:element name="showValModal" type="showValType" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xs:element name="buttonsListModal" type="buttonsType" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xs:choice>
|
||||
<xs:element name="inputsOperator">
|
||||
<xs:complexType>
|
||||
<xs:choice maxOccurs="unbounded">
|
||||
<xs:element name="realValueModal" type="valuesType" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xs:element name="showValModal" type="showValType" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xs:element name="buttonsListModal" type="buttonsType" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xs:element name="simpleModal" type="modalType" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xs:choice>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
<xs:complexType name="valuesType">
|
||||
<xs:all>
|
||||
<xs:element name="id" minOccurs='1' maxOccurs='1'/>
|
||||
<xs:element name="title" type="translatedText" minOccurs='1' maxOccurs='1'/>
|
||||
</xs:all>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
<xs:complexType name="valuesType">
|
||||
<xs:all>
|
||||
<xs:element name="id" minOccurs='1' maxOccurs='1'/>
|
||||
<xs:element name="title" type="translatedText" minOccurs='1' maxOccurs='1'/>
|
||||
</xs:all>
|
||||
</xs:complexType>
|
||||
|
||||
<xs:complexType name="showValType">
|
||||
<xs:all>
|
||||
<xs:element name="id" minOccurs='1' maxOccurs='1'/>
|
||||
<xs:element name="title" type="translatedText" minOccurs='1' maxOccurs='1'/>
|
||||
<xs:element name="buttons">
|
||||
<xs:complexType>
|
||||
<xs:sequence minOccurs="1" maxOccurs="unbounded">
|
||||
<xs:element name="button">
|
||||
<xs:complexType>
|
||||
<xs:all>
|
||||
<xs:element name="value" minOccurs="1" maxOccurs="1" type="xs:int"></xs:element>
|
||||
<xs:element name="title" type="translatedText" minOccurs='1' maxOccurs='1'/>
|
||||
</xs:all>
|
||||
</xs:complexType>
|
||||
<xs:complexType name="showValType">
|
||||
<xs:all>
|
||||
<xs:element name="id" minOccurs='1' maxOccurs='1'/>
|
||||
<xs:element name="title" type="translatedText" minOccurs='1' maxOccurs='1'/>
|
||||
<xs:element name="buttons">
|
||||
<xs:complexType>
|
||||
<xs:sequence minOccurs="1" maxOccurs="unbounded">
|
||||
<xs:element name="button">
|
||||
<xs:complexType>
|
||||
<xs:all>
|
||||
<xs:element name="value" minOccurs="1" maxOccurs="1" type="xs:int"></xs:element>
|
||||
<xs:element name="title" type="translatedText" minOccurs='1' maxOccurs='1'/>
|
||||
</xs:all>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:all>
|
||||
</xs:complexType>
|
||||
</xs:all>
|
||||
</xs:complexType>
|
||||
|
||||
<xs:complexType name="buttonsType">
|
||||
<xs:all>
|
||||
<xs:element name="id" minOccurs='1' maxOccurs='1'/>
|
||||
<xs:element name="title" type="translatedText" minOccurs='1' maxOccurs='1'/>
|
||||
<xs:element name="buttons">
|
||||
<xs:complexType>
|
||||
<xs:sequence minOccurs="1" maxOccurs="unbounded">
|
||||
<xs:element name="button">
|
||||
<xs:complexType>
|
||||
<xs:all>
|
||||
<xs:element name="value" minOccurs="1" maxOccurs="1" type="xs:int"></xs:element>
|
||||
<xs:element name="title" type="translatedText" minOccurs='1' maxOccurs='1'/>
|
||||
</xs:all>
|
||||
</xs:complexType>
|
||||
<xs:complexType name="buttonsType">
|
||||
<xs:all>
|
||||
<xs:element name="id" minOccurs='1' maxOccurs='1'/>
|
||||
<xs:element name="title" type="translatedText" minOccurs='1' maxOccurs='1'/>
|
||||
<xs:element name="buttons">
|
||||
<xs:complexType>
|
||||
<xs:sequence minOccurs="1" maxOccurs="unbounded">
|
||||
<xs:element name="button">
|
||||
<xs:complexType>
|
||||
<xs:all>
|
||||
<xs:element name="value" minOccurs="1" maxOccurs="1" type="xs:int"></xs:element>
|
||||
<xs:element name="title" type="translatedText" minOccurs='1' maxOccurs='1'/>
|
||||
</xs:all>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:all>
|
||||
</xs:complexType>
|
||||
</xs:all>
|
||||
</xs:complexType>
|
||||
<xs:complexType name="modalType">
|
||||
<xs:all>
|
||||
<xs:element name="id" minOccurs='1' maxOccurs='1'/>
|
||||
<xs:element name="title" type="translatedText" minOccurs='1' maxOccurs='1'/>
|
||||
</xs:all>
|
||||
</xs:complexType>
|
||||
|
||||
<!-- Translations field Type -->
|
||||
<xs:complexType name="translatedText">
|
||||
<xs:sequence>
|
||||
<xs:element name="lang" type="langType" minOccurs="0" maxOccurs="unbounded">
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
<!-- Translations field Type -->
|
||||
<xs:complexType name="translatedText">
|
||||
<xs:sequence>
|
||||
<xs:element name="lang" type="langType" minOccurs="0" maxOccurs="unbounded">
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
|
||||
<!-- lang field -->
|
||||
<xs:complexType name="langType">
|
||||
<xs:simpleContent>
|
||||
<xs:extension base="xs:string">
|
||||
<xs:attribute name="langKey" use="required" type="xs:string" />
|
||||
</xs:extension>
|
||||
</xs:simpleContent>
|
||||
</xs:complexType>
|
||||
<!-- lang field -->
|
||||
<xs:complexType name="langType">
|
||||
<xs:simpleContent>
|
||||
<xs:extension base="xs:string">
|
||||
<xs:attribute name="langKey" use="required" type="xs:string" />
|
||||
</xs:extension>
|
||||
</xs:simpleContent>
|
||||
</xs:complexType>
|
||||
</xs:schema>
|
||||
@@ -1,63 +1,70 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<inputsOperator>
|
||||
<buttonsListModal>
|
||||
<id>1</id>
|
||||
<title>
|
||||
<lang langKey="it">Hai rimosso manualmente anche il pezzo lavorato ?</lang>
|
||||
<lang langKey="en">Have you also manually removed the workpiece ?</lang>
|
||||
</title>
|
||||
<buttons>
|
||||
<button>
|
||||
<value>0</value>
|
||||
<buttonsListModal>
|
||||
<id>1</id>
|
||||
<title>
|
||||
<lang langKey="it">No</lang>
|
||||
<lang langKey="en">No</lang>
|
||||
<lang langKey="it">Hai rimosso manualmente anche il pezzo lavorato ?</lang>
|
||||
<lang langKey="en">Have you also manually removed the workpiece ?</lang>
|
||||
</title>
|
||||
</button>
|
||||
<button>
|
||||
<value>1</value>
|
||||
<buttons>
|
||||
<button>
|
||||
<value>0</value>
|
||||
<title>
|
||||
<lang langKey="it">No</lang>
|
||||
<lang langKey="en">No</lang>
|
||||
</title>
|
||||
</button>
|
||||
<button>
|
||||
<value>1</value>
|
||||
<title>
|
||||
<lang langKey="it">Si</lang>
|
||||
<lang langKey="en">Yes</lang>
|
||||
</title>
|
||||
</button>
|
||||
</buttons>
|
||||
</buttonsListModal>
|
||||
<simpleModal>
|
||||
<id>2</id>
|
||||
<title>
|
||||
<lang langKey="it">Si</lang>
|
||||
<lang langKey="en">Yes</lang>
|
||||
<lang langKey="it">DUE Hai rimosso manualmente anche il pezzo lavorato ?</lang>
|
||||
<lang langKey="en">DUE Have you also manually removed the workpiece ?</lang>
|
||||
</title>
|
||||
</button>
|
||||
</buttons>
|
||||
</buttonsListModal>
|
||||
<realValueModal>
|
||||
<id>10</id>
|
||||
<title>
|
||||
<lang langKey="en">External water</lang>
|
||||
<lang langKey="it">Acqua esterna</lang>
|
||||
</title>
|
||||
</realValueModal>
|
||||
<realValueModal>
|
||||
<id>11</id>
|
||||
<title>
|
||||
<lang langKey="en">External water</lang>
|
||||
<lang langKey="it">Acqua esterna</lang>
|
||||
</title>
|
||||
</realValueModal>
|
||||
<buttonsListModal>
|
||||
<id>6</id>
|
||||
<title>
|
||||
<lang langKey="en">External water</lang>
|
||||
<lang langKey="it">Acqua esterna</lang>
|
||||
</title>
|
||||
<buttons>
|
||||
<button>
|
||||
<value>3</value>
|
||||
</simpleModal>
|
||||
<realValueModal>
|
||||
<id>10</id>
|
||||
<title>
|
||||
<lang langKey="en">External water</lang>
|
||||
<lang langKey="it">Acqua esterna</lang>
|
||||
<lang langKey="en">External water</lang>
|
||||
<lang langKey="it">Acqua esterna</lang>
|
||||
</title>
|
||||
</button>
|
||||
<button>
|
||||
<value>4</value>
|
||||
</realValueModal>
|
||||
<realValueModal>
|
||||
<id>11</id>
|
||||
<title>
|
||||
<lang langKey="en">External water</lang>
|
||||
<lang langKey="it">Acqua esterna</lang>
|
||||
<lang langKey="en">External water</lang>
|
||||
<lang langKey="it">Acqua esterna</lang>
|
||||
</title>
|
||||
</button>
|
||||
</buttons>
|
||||
</buttonsListModal>
|
||||
</realValueModal>
|
||||
<buttonsListModal>
|
||||
<id>6</id>
|
||||
<title>
|
||||
<lang langKey="en">External water</lang>
|
||||
<lang langKey="it">Acqua esterna</lang>
|
||||
</title>
|
||||
<buttons>
|
||||
<button>
|
||||
<value>3</value>
|
||||
<title>
|
||||
<lang langKey="en">External water</lang>
|
||||
<lang langKey="it">Acqua esterna</lang>
|
||||
</title>
|
||||
</button>
|
||||
<button>
|
||||
<value>4</value>
|
||||
<title>
|
||||
<lang langKey="en">External water</lang>
|
||||
<lang langKey="it">Acqua esterna</lang>
|
||||
</title>
|
||||
</button>
|
||||
</buttons>
|
||||
</buttonsListModal>
|
||||
</inputsOperator>
|
||||
@@ -1,9 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
||||
|
||||
<xs:element name="recipe">
|
||||
<!-- Heads -->
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<!-- Heads -->
|
||||
<xs:element name="parameter" minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:complexType>
|
||||
<xs:all>
|
||||
|
||||
@@ -1,64 +1,98 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<serverConfig>
|
||||
<ncConfig>
|
||||
<ncVendor>S7NET</ncVendor> <!-- NO_NC/DEMO/FANUC/SIEMENS/OSAI/S7NET -->
|
||||
<showNcHMI>false</showNcHMI>
|
||||
<ncIpAddress>192.168.0.102</ncIpAddress>
|
||||
<ncPort>102</ncPort>
|
||||
<machineModel>Thermo 2020</machineModel>
|
||||
<sharedPath>C:\CMS\Recipes\</sharedPath>
|
||||
<sharedName>//PARTPRG:/</sharedName>
|
||||
<installationDate>01/06/2020</installationDate>
|
||||
<mgiOption>false</mgiOption>
|
||||
<siemensKeyboardOption>false</siemensKeyboardOption>
|
||||
<machineNumberHasLetters>false</machineNumberHasLetters>
|
||||
</ncConfig>
|
||||
<softwareProdConfig>
|
||||
<enabled>false</enabled>
|
||||
<path>C:\Program Files\Notepad++\notepad++.exe</path>
|
||||
</softwareProdConfig>
|
||||
<serverConfig>
|
||||
<serverPort>9000</serverPort>
|
||||
<serverAddress>*</serverAddress>
|
||||
<language>en</language>
|
||||
<enableDirectoryBrowsing>true</enableDirectoryBrowsing>
|
||||
<databaseAddress>localhost</databaseAddress>
|
||||
<autoOpenCmsClient>false</autoOpenCmsClient>
|
||||
<textEditorPath>C:\Windows\System32\notepad.exe</textEditorPath>
|
||||
<MTCFolderPath>C:\CMS\MTC\ADAPTER\</MTCFolderPath>
|
||||
<MTCApplicationName>SCMA</MTCApplicationName>
|
||||
<CMSConnectReady>false</CMSConnectReady>
|
||||
<maxAlarmsRows>50000</maxAlarmsRows>
|
||||
<alarmToDelete>5000</alarmToDelete>
|
||||
</serverConfig>
|
||||
<extSoftwares>
|
||||
<software>
|
||||
<longName>Calculator</longName>
|
||||
<shortName>CAL</shortName>
|
||||
<path>C:\Windows\System32\calc.exe</path>
|
||||
<arguments></arguments>
|
||||
<inMainMenuBar>true</inMainMenuBar>
|
||||
</software>
|
||||
<software>
|
||||
<longName>NotePad</longName>
|
||||
<shortName>NP</shortName>
|
||||
<path>C:\Windows\System32\notepad.exe</path>
|
||||
<arguments></arguments>
|
||||
<inMainMenuBar>true</inMainMenuBar>
|
||||
</software>
|
||||
<software>
|
||||
<longName>MsPaint</longName>
|
||||
<shortName>PA</shortName>
|
||||
<path>C:\Windows\System32\mspaint.exe</path>
|
||||
<arguments></arguments>
|
||||
<inMainMenuBar>false</inMainMenuBar>
|
||||
</software>
|
||||
<software>
|
||||
<longName>NotePad2</longName>
|
||||
<shortName>NP2</shortName>
|
||||
<path>C:\Windows\System32\notepad.exe</path>
|
||||
<arguments></arguments>
|
||||
<inMainMenuBar>false</inMainMenuBar>
|
||||
</software>
|
||||
<ncConfig>
|
||||
<ncVendor>S7NET</ncVendor>
|
||||
<!-- NO_NC/DEMO/FANUC/SIEMENS/OSAI/S7NET -->
|
||||
<showNcHMI>false</showNcHMI>
|
||||
<ncIpAddress>192.168.0.102</ncIpAddress>
|
||||
<ncPort>102</ncPort>
|
||||
<machineModel>Thermo 2020</machineModel>
|
||||
<sharedPath>C:\CMS\Recipes\</sharedPath>
|
||||
<sharedName>//PARTPRG:/</sharedName>
|
||||
<installationDate>01/06/2020</installationDate>
|
||||
<mgiOption>false</mgiOption>
|
||||
<siemensKeyboardOption>false</siemensKeyboardOption>
|
||||
<machineNumberHasLetters>false</machineNumberHasLetters>
|
||||
</ncConfig>
|
||||
<softwareProdConfig>
|
||||
<enabled>false</enabled>
|
||||
<path>C:\Program Files\Notepad++\notepad++.exe</path>
|
||||
</softwareProdConfig>
|
||||
<serverConfig>
|
||||
<serverPort>9000</serverPort>
|
||||
<serverAddress>*</serverAddress>
|
||||
<language>en</language>
|
||||
<enableDirectoryBrowsing>true</enableDirectoryBrowsing>
|
||||
<databaseAddress>localhost</databaseAddress>
|
||||
<autoOpenCmsClient>false</autoOpenCmsClient>
|
||||
<textEditorPath>C:\Windows\System32\notepad.exe</textEditorPath>
|
||||
<MTCFolderPath>C:\CMS\MTC\ADAPTER\</MTCFolderPath>
|
||||
<MTCApplicationName>SCMA</MTCApplicationName>
|
||||
<CMSConnectReady>false</CMSConnectReady>
|
||||
<maxAlarmsRows>50000</maxAlarmsRows>
|
||||
<alarmToDelete>5000</alarmToDelete>
|
||||
</serverConfig>
|
||||
<extSoftwares>
|
||||
<software>
|
||||
<longName>Calculator</longName>
|
||||
<shortName>CAL</shortName>
|
||||
<path>C:\Windows\System32\calc.exe</path>
|
||||
<arguments></arguments>
|
||||
<inMainMenuBar>true</inMainMenuBar>
|
||||
</software>
|
||||
<software>
|
||||
<longName>NotePad</longName>
|
||||
<shortName>NP</shortName>
|
||||
<path>C:\Windows\System32\notepad.exe</path>
|
||||
<arguments></arguments>
|
||||
<inMainMenuBar>true</inMainMenuBar>
|
||||
</software>
|
||||
<software>
|
||||
<longName>MsPaint</longName>
|
||||
<shortName>PA</shortName>
|
||||
<path>C:\Windows\System32\mspaint.exe</path>
|
||||
<arguments></arguments>
|
||||
<inMainMenuBar>false</inMainMenuBar>
|
||||
</software>
|
||||
<software>
|
||||
<longName>NotePad2</longName>
|
||||
<shortName>NP2</shortName>
|
||||
<path>C:\Windows\System32\notepad.exe</path>
|
||||
<arguments></arguments>
|
||||
<inMainMenuBar>false</inMainMenuBar>
|
||||
</software>
|
||||
</extSoftwares>
|
||||
<additionalParameters>
|
||||
<entry>
|
||||
<key>warmerPlanSizeX</key>
|
||||
<value>1500</value>
|
||||
</entry>
|
||||
<entry>
|
||||
<key>warmerPlanSizeY</key>
|
||||
<value>1200</value>
|
||||
</entry>
|
||||
<entry>
|
||||
<key>resistSizeX</key>
|
||||
<value>200</value>
|
||||
</entry>
|
||||
<entry>
|
||||
<key>resistSizeY</key>
|
||||
<value>100</value>
|
||||
</entry>
|
||||
<entry>
|
||||
<key>warmerAutocompStartValue</key>
|
||||
<value>30</value>
|
||||
</entry>
|
||||
<entry>
|
||||
<key>warmerAutocompStep</key>
|
||||
<value>5</value>
|
||||
</entry>
|
||||
</additionalParameters>
|
||||
<unitOfMeasures>
|
||||
<unitOfMeasure id="0" value="" />
|
||||
<unitOfMeasure id="1" value="m" />
|
||||
<unitOfMeasure id="2" value="l" />
|
||||
<unitOfMeasure id="3" value="°c" />
|
||||
<unitOfMeasure id="4" value="m/s" />
|
||||
</unitOfMeasures>
|
||||
</serverConfig>
|
||||
@@ -63,10 +63,42 @@
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="additionalParameters" >
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="entry" minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:complexType>
|
||||
<xs:all>
|
||||
<xs:element name="key" type="xs:string" />
|
||||
<xs:element name="value" type="xs:string" />
|
||||
</xs:all>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="unitOfMeasures">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="unitOfMeasure" minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:complexType>
|
||||
<xs:complexContent>
|
||||
<xs:extension base="umType"/>
|
||||
</xs:complexContent>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:all>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
<xs:complexType name="umType">
|
||||
<xs:attribute name="id" type="xs:integer" use="required">
|
||||
</xs:attribute>
|
||||
<xs:attribute name="value" type="xs:string" use="required">
|
||||
</xs:attribute>
|
||||
</xs:complexType>
|
||||
<xs:simpleType name="ncType" final="restriction" >
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:enumeration value="DEMO" />
|
||||
|
||||
@@ -11,6 +11,8 @@ namespace Thermo.Active.Config
|
||||
public static ServerConfigModel ServerStartupConfig;
|
||||
public static NcConfigModel NcConfig;
|
||||
public static List<ExtSoftwareModel> ExtSoftwaresConfig;
|
||||
public static Dictionary<string, string> AdditionalParametersConfig;
|
||||
public static Dictionary<int, string> UnitMeasuresConfig;
|
||||
public static SoftwareProdConfigModel SoftwareProdConfig;
|
||||
public static MachineModel MachineConfig;
|
||||
public static List<MaintenanceConfigModel> MaintenancesConfig;
|
||||
|
||||
@@ -292,6 +292,8 @@ namespace Thermo.Active.Config
|
||||
return "MULTIPLE_BUTTONS";
|
||||
case "showValModal":
|
||||
return "SHOW_VAL";
|
||||
case "simpleModal":
|
||||
return "MODAL";
|
||||
default:
|
||||
return "REAL";
|
||||
}
|
||||
@@ -368,6 +370,20 @@ namespace Thermo.Active.Config
|
||||
InMainMenuBar = Convert.ToBoolean(x.Element("inMainMenuBar").Value),
|
||||
Id = softwareId++.ToString()
|
||||
}).ToList();
|
||||
|
||||
// carico additionals parameters
|
||||
AdditionalParametersConfig = xmlConfigFile
|
||||
.Descendants("additionalParameters")
|
||||
.Elements("entry")
|
||||
.Select(x => new KeyValuePair<string,string>(x.Element("key").Value,x.Element("value").Value))
|
||||
.ToDictionary(x => x.Key, x => x.Value);
|
||||
|
||||
// carico unità di misura...
|
||||
UnitMeasuresConfig = xmlConfigFile
|
||||
.Descendants("unitOfMeasures")
|
||||
.Elements("unitOfMeasure")
|
||||
.Select(x => new KeyValuePair<int, string>(Convert.ToInt32(x.Attribute("id").Value), x.Attribute("value").Value))
|
||||
.ToDictionary(x => x.Key, x => x.Value);
|
||||
}
|
||||
|
||||
private static void ReadAreaConfig()
|
||||
|
||||
@@ -687,7 +687,7 @@ public static class ThreadsFunctions
|
||||
//Update thread timer
|
||||
UpdateStat(MethodBase.GetCurrentMethod().Name, sw.ElapsedMilliseconds);
|
||||
// Wait 500 ms
|
||||
Thread.Sleep(CalcSleepTime(500, (int)sw.ElapsedMilliseconds));
|
||||
Thread.Sleep(CalcSleepTime(250, (int)sw.ElapsedMilliseconds));
|
||||
}
|
||||
}
|
||||
catch (ThreadAbortException)
|
||||
@@ -729,7 +729,7 @@ public static class ThreadsFunctions
|
||||
//Update thread timer
|
||||
UpdateStat(MethodBase.GetCurrentMethod().Name, sw.ElapsedMilliseconds);
|
||||
// Wait
|
||||
Thread.Sleep(CalcSleepTime(500, (int)sw.ElapsedMilliseconds));
|
||||
Thread.Sleep(CalcSleepTime(250, (int)sw.ElapsedMilliseconds));
|
||||
}
|
||||
}
|
||||
catch (ThreadAbortException)
|
||||
@@ -771,7 +771,7 @@ public static class ThreadsFunctions
|
||||
//Update thread timer
|
||||
UpdateStat(MethodBase.GetCurrentMethod().Name, sw.ElapsedMilliseconds);
|
||||
// Wait
|
||||
Thread.Sleep(CalcSleepTime(500, (int)sw.ElapsedMilliseconds));
|
||||
Thread.Sleep(CalcSleepTime(250, (int)sw.ElapsedMilliseconds));
|
||||
}
|
||||
}
|
||||
catch (ThreadAbortException)
|
||||
|
||||
@@ -20,6 +20,7 @@ namespace Thermo.Active.Model.DTOModels
|
||||
public bool SiemensKeyboardOption { get; set; }
|
||||
|
||||
public List<ExtSoftwareModel> ExtSoftwares { get; set; }
|
||||
public Dictionary<string, string> AdditionalParameters { get; set; }
|
||||
|
||||
public CultureInfo DefaultLanguage
|
||||
{
|
||||
|
||||
@@ -1284,9 +1284,9 @@ namespace Thermo.Active.NC
|
||||
{
|
||||
var inp = InputsOperatorConfig.Where(x => m156Message.Id == x.Id).FirstOrDefault();
|
||||
|
||||
var buttons = inp.Buttons?.ToDictionary(x => x.Key, x => x.Key.ToString());
|
||||
if (inp != null)
|
||||
{
|
||||
var buttons = inp.Buttons?.ToDictionary(x => x.Key, x => x.Key.ToString());
|
||||
data.Add(new DTOM156InputModel()
|
||||
{
|
||||
Id = inp.Id,
|
||||
@@ -1505,7 +1505,7 @@ namespace Thermo.Active.NC
|
||||
// stima durata da pz fatti...
|
||||
//currentProdPanel.StimaDurata = Math.Round((currentProdPanel.NumTarget - currentProdPanel.NumDone) * currentProdPanel.LastTCiclo, 2);
|
||||
// 2020.09.03 uso dati da ricetta corrente... stimata con EWMA, in SECONDI!
|
||||
currentProdPanel.StimaDurata = Math.Round((currentProdPanel.NumTarget - currentProdPanel.NumDone) * lastCycle, 2) ;
|
||||
currentProdPanel.StimaDurata = Math.Round((currentProdPanel.NumTarget - currentProdPanel.NumDone) * lastCycle, 2);
|
||||
// se stima negativa (+ pezzi di quanti richiesti...) --> ZERO!
|
||||
currentProdPanel.StimaDurata = currentProdPanel.StimaDurata < 0 ? 0 : currentProdPanel.StimaDurata;
|
||||
}
|
||||
@@ -1836,7 +1836,7 @@ namespace Thermo.Active.NC
|
||||
Id = item.Id,
|
||||
Range = currRange,
|
||||
Status = currStatus,
|
||||
UnitMeasure = "",
|
||||
UnitMeasure = getUM(paramPLC.UnitMeasure),
|
||||
ValueAct = paramPLC.ValueAct / item.ScaleFactor,
|
||||
SetpointHMI = paramPLC.SetpointHMI / item.ScaleFactor,
|
||||
SetpointPLC = paramPLC.SetpointPLC / item.ScaleFactor,
|
||||
@@ -1884,6 +1884,19 @@ namespace Thermo.Active.NC
|
||||
|
||||
return NO_ERROR;
|
||||
}
|
||||
|
||||
protected string getUM(int um)
|
||||
{
|
||||
// default: no translation...
|
||||
string answ = $"{um}";
|
||||
// cerco in dictionary...
|
||||
if (UnitMeasuresConfig.ContainsKey(um))
|
||||
{
|
||||
answ = UnitMeasuresConfig[um];
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Recipe Parameters write to PLC (only SetpointHMI)
|
||||
/// </summary>
|
||||
@@ -2394,9 +2407,9 @@ namespace Thermo.Active.NC
|
||||
{
|
||||
CmsError libraryError = NO_ERROR;
|
||||
// inizio dal count
|
||||
isEqual = dictSource.Count==dictDest.Count;
|
||||
isEqual = dictSource.Count == dictDest.Count;
|
||||
// se uguale conteggio procedo...
|
||||
if(isEqual)
|
||||
if (isEqual)
|
||||
{
|
||||
foreach (var pair in dictSource)
|
||||
{
|
||||
|
||||
@@ -45,6 +45,7 @@ namespace Thermo.Active.Controllers.WebApi
|
||||
ProdEnabled = SoftwareProdConfig.Enabled,
|
||||
ProdPath = SoftwareProdConfig.Path,
|
||||
ExtSoftwares = ExtSoftwaresConfig,
|
||||
AdditionalParameters = AdditionalParametersConfig,
|
||||
Autorun = ServerStartupConfig.AutoOpenCmsClient,
|
||||
EditorPath = ServerStartupConfig.TextEditorPath,
|
||||
MgiOption = NcConfig.MgiOption,
|
||||
|
||||
@@ -30,4 +30,4 @@ using System.Runtime.InteropServices;
|
||||
//
|
||||
// You can specify all the values or you can default the Revision and Build Numbers
|
||||
// by using the '*' as shown below:
|
||||
[assembly: AssemblyVersion("0.14.80")]
|
||||
[assembly: AssemblyVersion("0.15.85")]
|
||||
|
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 4.2 KiB After Width: | Height: | Size: 3.2 KiB |
|
Before Width: | Height: | Size: 6.6 KiB After Width: | Height: | Size: 5.5 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 4.2 KiB |
|
After Width: | Height: | Size: 7.2 KiB |
@@ -378,8 +378,9 @@ fieldset[disabled] .form-group.is-focused .togglebutton label {
|
||||
margin-left: 5px;
|
||||
|
||||
&.error {
|
||||
background-color: rgba(255, 0, 0, .7);
|
||||
background-color: rgba(255, 0, 0, .7) !important;
|
||||
color: #222;
|
||||
background-image: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -176,6 +176,7 @@
|
||||
font-size: 120px;
|
||||
font-weight: 300;
|
||||
z-index: 1;
|
||||
max-height: 140px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -26,6 +26,9 @@ footer {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-evenly;
|
||||
img {
|
||||
margin: 0px 5px;
|
||||
}
|
||||
}
|
||||
|
||||
.container {
|
||||
|
||||
@@ -139,6 +139,25 @@ select:focus {
|
||||
|
||||
}
|
||||
|
||||
.input-select{
|
||||
font-size: 18px;
|
||||
font-weight: 500;
|
||||
color: #6d6d6d;
|
||||
min-width: 200px;
|
||||
width: fit-content;
|
||||
height: 48px;
|
||||
border-radius: 2px;
|
||||
box-shadow: inset 0 1px 3px 0 rgba(0, 0, 0, 0.5);
|
||||
border: none;
|
||||
display: flex;
|
||||
flex-flow: row nowrap;
|
||||
padding: 0 10px;
|
||||
align-items: center;
|
||||
justify-content: stretch;
|
||||
padding-right: 25px;
|
||||
position: relative;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.input-area {
|
||||
width: 100%;
|
||||
|
||||
@@ -216,6 +216,17 @@
|
||||
margin-left: auto;
|
||||
}
|
||||
}
|
||||
.content-modal-showval {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
span {
|
||||
word-wrap: break-word;
|
||||
max-width: 700px;
|
||||
font-size: 30px
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.content-btn {
|
||||
width: 592px;
|
||||
@@ -1159,7 +1170,7 @@
|
||||
justify-content: center;
|
||||
|
||||
&.nc {
|
||||
z-index: 700;
|
||||
z-index: 1002;
|
||||
}
|
||||
|
||||
&.internal {
|
||||
|
||||
@@ -548,6 +548,15 @@ article .box .body {
|
||||
.modal.m155 .content-real-showval input {
|
||||
margin-left: auto;
|
||||
}
|
||||
.modal.m155 .content-modal-showval {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.modal.m155 .content-modal-showval span {
|
||||
word-wrap: break-word;
|
||||
max-width: 700px;
|
||||
font-size: 30px;
|
||||
}
|
||||
.modal.m155 .content-btn {
|
||||
width: 592px;
|
||||
box-shadow: 0 0px 3px 0 rgba(0, 0, 0, 0.4);
|
||||
@@ -1356,7 +1365,7 @@ article .box .body {
|
||||
justify-content: center;
|
||||
}
|
||||
.backdrop.nc {
|
||||
z-index: 700;
|
||||
z-index: 1002;
|
||||
}
|
||||
.backdrop.internal {
|
||||
height: calc(100vh - 80px);
|
||||
@@ -4301,6 +4310,7 @@ article .box .body {
|
||||
font-size: 120px;
|
||||
font-weight: 300;
|
||||
z-index: 1;
|
||||
max-height: 140px;
|
||||
}
|
||||
.dashboard .first_col .timing-area .start::before {
|
||||
background-image: url(/assets/svg/dashboard-top-left.svg);
|
||||
@@ -5064,9 +5074,7 @@ article .box .body {
|
||||
border: none;
|
||||
border-radius: 2px;
|
||||
background-image: linear-gradient(to bottom, #f1f1f1 0%, #bbbcbc 98%);
|
||||
display: grid;
|
||||
grid-template-columns: 48px 101px;
|
||||
grid-template-rows: 48px;
|
||||
height: 48px;
|
||||
}
|
||||
.modal.processo-info header .tab-header button span {
|
||||
margin: auto;
|
||||
@@ -5518,6 +5526,25 @@ select:focus {
|
||||
color: #002680;
|
||||
flex: 1;
|
||||
}
|
||||
.input-select {
|
||||
font-size: 18px;
|
||||
font-weight: 500;
|
||||
color: #6d6d6d;
|
||||
min-width: 200px;
|
||||
width: fit-content;
|
||||
height: 48px;
|
||||
border-radius: 2px;
|
||||
box-shadow: inset 0 1px 3px 0 rgba(0, 0, 0, 0.5);
|
||||
border: none;
|
||||
display: flex;
|
||||
flex-flow: row nowrap;
|
||||
padding: 0 10px;
|
||||
align-items: center;
|
||||
justify-content: stretch;
|
||||
padding-right: 25px;
|
||||
position: relative;
|
||||
cursor: pointer;
|
||||
}
|
||||
.input-area {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
@@ -5981,8 +6008,9 @@ fieldset[disabled] .form-group.is-focused .togglebutton label {
|
||||
margin-left: 5px;
|
||||
}
|
||||
.togglebutton label .toggle.error {
|
||||
background-color: rgba(255, 0, 0, 0.7);
|
||||
background-color: rgba(255, 0, 0, 0.7) !important;
|
||||
color: #222;
|
||||
background-image: none !important;
|
||||
}
|
||||
.togglebutton label .toggle,
|
||||
.togglebutton label input[type=checkbox][disabled] + .toggle {
|
||||
@@ -6603,6 +6631,9 @@ footer .machine-area {
|
||||
align-items: center;
|
||||
justify-content: space-evenly;
|
||||
}
|
||||
footer .machine-area img {
|
||||
margin: 0px 5px;
|
||||
}
|
||||
footer .container {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
|
||||
@@ -38,6 +38,8 @@ declare module signalr_process {
|
||||
type: string;
|
||||
toDelete: boolean;
|
||||
toDisplay: boolean;
|
||||
isM156: boolean;
|
||||
id: number;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -58,7 +58,8 @@ export default class app extends Vue {
|
||||
loadingOperations = 0;
|
||||
HMIsrc = null;
|
||||
hub: Hub = null;
|
||||
prioritizeWindowsButtons = false;
|
||||
prioritizeWindowsButtons1 = false;
|
||||
prioritizeWindowsButtons2 = false;
|
||||
|
||||
beforeMount() {
|
||||
moment.locale((window.navigator as any).userLanguage || window.navigator.language);
|
||||
@@ -82,12 +83,12 @@ export default class app extends Vue {
|
||||
|
||||
ms.subscribeToChannel("show-modal-login", args => {
|
||||
this.applyBlur = true;
|
||||
this.prioritizeWindowsButtons = true;
|
||||
this.prioritizeWindowsButtons1 = true;
|
||||
});
|
||||
|
||||
ms.subscribeToChannel("hide-modal-login", args => {
|
||||
this.applyBlur = false;
|
||||
this.prioritizeWindowsButtons = false;
|
||||
this.prioritizeWindowsButtons1 = false;
|
||||
});
|
||||
|
||||
ms.subscribeToChannel("hide-modal", args => {
|
||||
@@ -96,10 +97,12 @@ export default class app extends Vue {
|
||||
|
||||
ms.subscribeToChannel("show-modal-nc-called", args => {
|
||||
this.applyBlurNc = true;
|
||||
this.prioritizeWindowsButtons2 = true;
|
||||
});
|
||||
|
||||
ms.subscribeToChannel("hide-modal-nc-called", args => {
|
||||
this.applyBlurNc = false;
|
||||
this.prioritizeWindowsButtons2 = false;
|
||||
});
|
||||
|
||||
ms.subscribeToChannel("show-modal-internal", args => {
|
||||
@@ -178,8 +181,13 @@ export default class app extends Vue {
|
||||
return this.$store.state.isShowPreDashboard;
|
||||
}
|
||||
|
||||
get prioritizeWindowsButtons() {
|
||||
return this.prioritizeWindowsButtons1 || this.prioritizeWindowsButtons2;
|
||||
}
|
||||
|
||||
onmousedown() {
|
||||
KeyboardHelper.hideKeyboard();
|
||||
messageService.publishToChannel('hideall');
|
||||
}
|
||||
|
||||
@Watch("isMainViewLiftedUp")
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<template>
|
||||
<div class="container" @mousedown="onmousedown">
|
||||
<div id="app">
|
||||
<app-header :class="{'blur':applyBlur}"></app-header>
|
||||
<app-header :class="{'blur':applyBlur || applyBlurNc}"></app-header>
|
||||
<dashboard v-if="statusDashboard"></dashboard>
|
||||
<predashboard v-if="statusPreDashboard"></predashboard>
|
||||
<alarm-list :applyBlur="applyBlur"></alarm-list>
|
||||
<alarm-list :applyBlur="applyBlur || applyBlurNc"></alarm-list>
|
||||
|
||||
<div
|
||||
id="main-view"
|
||||
@@ -23,7 +23,7 @@
|
||||
<modal-container containerName="modal-login" name="modal-login"></modal-container>
|
||||
<keyboard></keyboard>
|
||||
|
||||
<div class="window-buttons" :class="{prioritize: prioritizeWindowsButtons}">
|
||||
<div class="window-buttons" :class="{prioritize: prioritizeWindowsButtons, 'blur':(applyBlurNc && !prioritizeWindowsButtons)}">
|
||||
<button
|
||||
class="gray square close"
|
||||
@click="sendMessage('hide')"
|
||||
@@ -35,7 +35,8 @@
|
||||
:title="'header_tooltip_btn_close' | localize('Close the application')"
|
||||
>×</button>
|
||||
</div>
|
||||
<modal-container name="modal"></modal-container>
|
||||
<modal-container name="modal" :class="{'blur':applyBlurNc}"></modal-container>
|
||||
<modal-nc-container name="modal-nc"></modal-nc-container>
|
||||
</div>
|
||||
</template>
|
||||
<script src="./App.ts" lang="ts"></script>
|
||||
|
||||
@@ -39,7 +39,7 @@ messageService.subscribeToChannel("show-contact-info", () => { ModalHelper.ShowM
|
||||
|
||||
// messageService.subscribeToChannel("show-axes-calibration", () => { ModalHelper.ShowNcModal(AxesCalibration); });
|
||||
// messageService.subscribeToChannel("hide-axes-calibration", () => { ModalHelper.HideNcModal(AxesCalibration); });
|
||||
// messageService.subscribeToChannel("show-m155-questions", () => { ModalHelper.ShowNextM155Modal(); });
|
||||
messageService.subscribeToChannel("show-m155-questions", () => { ModalHelper.ShowNextM155Modal(); });
|
||||
// messageService.subscribeToChannel("show-nochange-page", () => {
|
||||
// ModalHelper.ShowMessage(
|
||||
// Vue.filter('localize')("modal_nochangepage_title", "Operazione non possibile"),
|
||||
|
||||
@@ -0,0 +1,95 @@
|
||||
import { AppModel } from "src/store";
|
||||
import { Modal, ModalHelper } from "src/components/modals";
|
||||
import Component from "vue-class-component";
|
||||
import Vue from "vue";
|
||||
import { Hub } from "src/services";
|
||||
import { Factory, messageService } from "src/_base";
|
||||
import { Watch } from "vue-property-decorator";
|
||||
|
||||
@Component({ components: { modal: Modal } })
|
||||
export default class M155Dialog extends Vue{
|
||||
|
||||
data = null;
|
||||
value = 0;
|
||||
|
||||
MULTIPLE_BUTTONS = "MULTIPLE_BUTTONS";
|
||||
REAL = "REAL";
|
||||
SHOW_VAL = "SHOW_VAL"
|
||||
MODAL = "MODAL"
|
||||
|
||||
mounted(){
|
||||
this.data = ModalHelper.M155ModalData.data;
|
||||
this.value = -1;
|
||||
|
||||
// Populate translations
|
||||
if(this.data.isM156) {
|
||||
this.data.message = this.$options.filters.localize("m156_title_" + this.data.id, "Title");
|
||||
|
||||
for(const key in this.data.buttons){
|
||||
this.data.buttons[key] = this.$options.filters.localize("m156_" + this.data.id + "_button_" + this.data.buttons[key], "Title");
|
||||
}
|
||||
|
||||
if(this.data.buttons)
|
||||
Object.keys(this.data.buttons).forEach(btn => {
|
||||
btn = this.$options.filters.localize("m156_title_" + this.data.id, "Title");
|
||||
});
|
||||
}
|
||||
|
||||
messageService.subscribeToChannel("show-modal-nc", args => {
|
||||
this.data = ModalHelper.M155ModalData.data;
|
||||
});
|
||||
}
|
||||
|
||||
get process(){
|
||||
if(this.data)
|
||||
return this.data.process;
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Watch("data")
|
||||
dataChanged(){
|
||||
this.value = -1;
|
||||
}
|
||||
|
||||
ischecked(k){
|
||||
return k == this.value;
|
||||
}
|
||||
|
||||
check(k){
|
||||
return this.value = k;
|
||||
}
|
||||
|
||||
canSendAnswer(){
|
||||
if(this.getType == this.MODAL)
|
||||
return false
|
||||
else if(this.getType == this.REAL)
|
||||
return this.value != null && this.value != undefined;
|
||||
else
|
||||
return this.value && this.value != -1;
|
||||
}
|
||||
|
||||
answerVisible(){
|
||||
if(this.getType == this.MODAL)
|
||||
return false
|
||||
return true;
|
||||
}
|
||||
|
||||
get getType(){
|
||||
if(this.data)
|
||||
return this.data.type
|
||||
|
||||
return ""
|
||||
}
|
||||
|
||||
hide() {
|
||||
ModalHelper.M155ModalData.data.toDisplay = false;
|
||||
ModalHelper.HideThisM155Modal(ModalHelper.M155ModalData.data.processId);
|
||||
}
|
||||
|
||||
answer(){
|
||||
if(!this.data.isM156)
|
||||
Hub.Current.WriteM155Response(this.data.process,this.value);
|
||||
else
|
||||
Hub.Current.WriteM156Response(this.data.process,this.value);
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,37 @@
|
||||
<template>
|
||||
<modal :title="'modal_m155_standard' | localize('Message from the machine')" class="m155" :class="{'multiple': getType != REAL}" name="modal" >
|
||||
<div v-if="data">
|
||||
<h2 v-if="getType != SHOW_VAL && getType != MODAL">{{data.message}}</h2>
|
||||
<div class="content-real" v-if="getType == REAL">
|
||||
<span>{{'modal_m155_value' | localize("Value: ")}}</span>
|
||||
<input type="number" min="0" max="4294967295" v-model="value">
|
||||
</div>
|
||||
|
||||
<div class="content-real-showval" v-if="getType == SHOW_VAL">
|
||||
<span>{{data.message}}</span>
|
||||
<input type="number" min="0" max="4294967295" v-model="data.value" disabled="disabled">
|
||||
</div>
|
||||
|
||||
<div class="content-modal-showval" v-if="getType == MODAL" >
|
||||
<span>{{data.message}}</span>
|
||||
</div>
|
||||
|
||||
<div v-if="getType == MULTIPLE_BUTTONS" >
|
||||
<div class="content-btn" v-for="(t,k) in data.buttons" :key="'m155_'+k" @click="check(k)">
|
||||
<input type="radio" name="radio-group" :checked="ischecked(k)" >
|
||||
<label for="datefixed">{{t}}</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<footer >
|
||||
<div class="pull-left">
|
||||
<button class="btn" @click="hide()">{{'modal_m155_hide_window' | localize("Hide")}}</button>
|
||||
</div>
|
||||
<div class="pull-right" v-if="answerVisible()" >
|
||||
<button class="btn btn-success" @click="answer()" :disabled="!canSendAnswer()">{{'confirm_request_confirm' | localize("Confirm")}}</button>
|
||||
</div>
|
||||
</footer>
|
||||
</modal>
|
||||
</template>
|
||||
<script src="./m155-dialog.ts" lang="ts"></script>
|
||||
|
||||
@@ -13,5 +13,6 @@ export {
|
||||
ContactInfoDialog,
|
||||
UserInfoDialog,
|
||||
UserInfo,
|
||||
CmsconnectInfoDialog
|
||||
CmsconnectInfoDialog,
|
||||
M155Questions
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ import Component from "vue-class-component";
|
||||
import Vue from "vue";
|
||||
import { Prop } from "vue-property-decorator";
|
||||
import lottie from "lottie-web";
|
||||
import { messageService } from "@/_base";
|
||||
|
||||
@Component({})
|
||||
export default class Combo extends Vue {
|
||||
@@ -42,7 +43,7 @@ export default class Combo extends Vue {
|
||||
}
|
||||
|
||||
mounted() {
|
||||
|
||||
messageService.subscribeToChannel('hideall', () => this.hideList());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -9,7 +9,7 @@
|
||||
<i v-if="opened" class="fa fa-chevron-up" />
|
||||
<i v-else class="fa fa-chevron-down" />
|
||||
</div>
|
||||
<div class="droplist" v-if="opened">
|
||||
<div class="droplist" v-if="opened" @mousedown.prevent.stop>
|
||||
<div
|
||||
class="droplist-item"
|
||||
v-for="opt in options"
|
||||
|
||||
@@ -24,9 +24,14 @@ export default class Keyboard extends Vue {
|
||||
|
||||
set Value(v: number) {
|
||||
try {
|
||||
let scale = Math.pow(10, this.actualValue.numDec);
|
||||
this.actualValue.setpointHMI = Math.round(v * scale) / scale;
|
||||
} catch{
|
||||
let scale = Math.pow(10, this.actualValue.numDec ?? 0);
|
||||
let result = Math.round(v * scale) / scale;
|
||||
|
||||
if (!Number.isNaN(result) && Number.isFinite(result))
|
||||
this.actualValue.setpointHMI = result;
|
||||
else
|
||||
this.actualValue.setpointHMI = v;
|
||||
} catch {
|
||||
this.actualValue.setpointHMI = v;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,9 +34,14 @@ export default class Numeric extends Vue {
|
||||
}
|
||||
|
||||
set Value(v: number) {
|
||||
debugger
|
||||
try {
|
||||
let scale = Math.pow(10, this.value.numDec);
|
||||
this.value.setpointHMI = Math.round(v * scale) / scale;
|
||||
let scale = Math.pow(10, this.value.numDec ?? 0);
|
||||
let result = Math.round(v * scale) / scale;
|
||||
if (!Number.isNaN(result) && Number.isFinite(result))
|
||||
this.value.setpointHMI = result;
|
||||
else
|
||||
this.value.setpointHMI = v;
|
||||
} catch {
|
||||
this.value.setpointHMI = v;
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
:id="id"
|
||||
:disabled="value.status && !value.status.enabled"
|
||||
/>
|
||||
<span v-if="value.unitMeasure">{{unitMeasure}}</span>
|
||||
<span v-if="value && value.unitMeasure">{{value.unitMeasure}}</span>
|
||||
</div>
|
||||
</template>
|
||||
<script src="./numeric.ts" lang="ts"></script>
|
||||
@@ -6,6 +6,7 @@ import { store, MachineStatusModel } from "@/store";
|
||||
import { SoftKeysConfigurationModel, machineInfoStore } from "@/store/machineInfo.store";
|
||||
import { Hub, machineService } from "@/services";
|
||||
import { Watch } from "vue-property-decorator";
|
||||
import { messageService } from "@/_base";
|
||||
|
||||
@Component({
|
||||
components: { softKey }
|
||||
@@ -60,6 +61,7 @@ export default class Paddle extends Vue {
|
||||
|
||||
async mounted() {
|
||||
this.loadData();
|
||||
messageService.subscribeToChannel('hideall', () => { this.isOpen = false; this.openFull = false; })
|
||||
}
|
||||
|
||||
@Watch("isOpen")
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
<template>
|
||||
<div class="paddle" :class="{'open-half': isOpen && !openFull, 'open-full': isOpen && openFull}">
|
||||
<div
|
||||
class="paddle"
|
||||
:class="{'open-half': isOpen && !openFull, 'open-full': isOpen && openFull}"
|
||||
@mousedown.prevent.stop
|
||||
>
|
||||
<nav class="paddleButton" @click="isOpen = !isOpen; openFull = false;sendKeyCancel()">
|
||||
<div class="circles">
|
||||
<div></div>
|
||||
|
||||
@@ -1,15 +1,13 @@
|
||||
<template>
|
||||
<div class="slider-container">
|
||||
<div class="slider">
|
||||
<button
|
||||
<button class="btn btn-info square"
|
||||
@mousedown="startDecrement()"
|
||||
v-on:touchstart="startDecrement()"
|
||||
v-on:touchend="confirm()"
|
||||
@mouseup="confirm()"
|
||||
@mouseout="confirm()"
|
||||
>
|
||||
<img src="assets/icons/png/min.png" />
|
||||
</button>
|
||||
><i class="fa fa-minus" ></i></button>
|
||||
<div class="control">
|
||||
<input
|
||||
:disabled="!this.value.status.enabled"
|
||||
@@ -27,15 +25,13 @@
|
||||
<small>{{`${this.value.range.max} ${this.value.unitMeasure}`}}</small>
|
||||
</div>
|
||||
</div>
|
||||
<button
|
||||
<button class="btn btn-info square"
|
||||
@mousedown="startIncrement()"
|
||||
v-on:touchstart="startIncrement()"
|
||||
v-on:touchend="confirm()"
|
||||
@mouseup="confirm()"
|
||||
@mouseout="confirm()"
|
||||
>
|
||||
<img src="assets/icons/png/max.png" />
|
||||
</button>
|
||||
><i class="fa fa-plus" ></i></button>
|
||||
</div>
|
||||
<button
|
||||
class="submit"
|
||||
|
||||
@@ -114,17 +114,17 @@ export default class GanttComponent extends Vue {
|
||||
|
||||
showModalStep(step: number, subcategory: string): Promise<number> {
|
||||
switch (step) {
|
||||
case 0: return ModalHelper.ShowModalAsync(ShowFormatoInfo, { subcategory });
|
||||
case 1: return ModalHelper.ShowModalAsync(ShowQuoteVelocitaInfo, { subcategory });
|
||||
case 2: return ModalHelper.ShowModalAsync(ShowCicloInfo, { subcategory });
|
||||
case 3: return ModalHelper.ShowModalAsync(ShowRiscaldamentoInfo, { subcategory });
|
||||
case 4: return ModalHelper.ShowModalAsync(ShowPirometroInfo, { subcategory });
|
||||
case 5: return ModalHelper.ShowModalAsync(ShowImbutituraInfo, { subcategory });
|
||||
case 6: return ModalHelper.ShowModalAsync(ShowControstampoInfo, { subcategory });
|
||||
case 7: return ModalHelper.ShowModalAsync(ShowRaffreddamentoInfo, { subcategory });
|
||||
case 8: return ModalHelper.ShowModalAsync(ShowVuotoInfo, { subcategory });
|
||||
case 9: return ModalHelper.ShowModalAsync(ShowEstrazioneInfo, { subcategory });
|
||||
case 10: return ModalHelper.ShowModalAsync(ShowOpzioniInfo, { subcategory });
|
||||
case 0: return ModalHelper.ShowModalAsync(ShowFormatoInfo, subcategory?.toLowerCase());
|
||||
case 1: return ModalHelper.ShowModalAsync(ShowQuoteVelocitaInfo, subcategory?.toLowerCase());
|
||||
case 2: return ModalHelper.ShowModalAsync(ShowCicloInfo, subcategory?.toLowerCase());
|
||||
case 3: return ModalHelper.ShowModalAsync(ShowRiscaldamentoInfo, subcategory?.toLowerCase());
|
||||
case 4: return ModalHelper.ShowModalAsync(ShowPirometroInfo, subcategory?.toLowerCase());
|
||||
case 5: return ModalHelper.ShowModalAsync(ShowImbutituraInfo, subcategory?.toLowerCase());
|
||||
case 6: return ModalHelper.ShowModalAsync(ShowControstampoInfo, subcategory?.toLowerCase());
|
||||
case 7: return ModalHelper.ShowModalAsync(ShowRaffreddamentoInfo, subcategory?.toLowerCase());
|
||||
case 8: return ModalHelper.ShowModalAsync(ShowVuotoInfo, subcategory?.toLowerCase());
|
||||
case 9: return ModalHelper.ShowModalAsync(ShowEstrazioneInfo, subcategory?.toLowerCase());
|
||||
case 10: return ModalHelper.ShowModalAsync(ShowOpzioniInfo, subcategory?.toLowerCase());
|
||||
// case 11: return ModalHelper.ShowModalAsync(AvvioProduzione);
|
||||
}
|
||||
|
||||
|
||||
@@ -107,10 +107,22 @@ export default class Gantt extends Vue {
|
||||
}
|
||||
|
||||
get PadY() {
|
||||
if (this.follow) {
|
||||
try {
|
||||
let result = Math.min(...this.blocks.filter(b => !b.terminated).map(i => i.section));
|
||||
switch (result) {
|
||||
case 1: return 0; break;
|
||||
case 2: return (this.$refs.section1 as any).rowHeight; break;
|
||||
case 3: return (this.$refs.section1 as any).rowHeight + (this.$refs.section2 as any).rowHeight; break;
|
||||
}
|
||||
} catch { }
|
||||
|
||||
}
|
||||
return this.padY;
|
||||
}
|
||||
set PadY(value: number) {
|
||||
this.padY = value;
|
||||
if (!this.follow)
|
||||
this.padY = value;
|
||||
}
|
||||
|
||||
follow: boolean = false;
|
||||
@@ -169,14 +181,15 @@ export default class Gantt extends Vue {
|
||||
doPan(event: MouseEvent | TouchEvent) {
|
||||
if (this.lastPosition)
|
||||
if (event.type == "touchmove" || (event.type == "mousemove" && (event as MouseEvent).buttons)) {
|
||||
this.follow = false;
|
||||
|
||||
let p = this.getSvgCoords(event)
|
||||
|
||||
this.PadX = Math.min(this.PadX + p.x - this.lastPosition.x, 0);
|
||||
this.PadY = Math.max(Math.min(this.PadY + p.y - this.lastPosition.y, 0), -this.maxPaddingY);
|
||||
|
||||
|
||||
|
||||
this.lastPosition = p;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -16,12 +16,10 @@ export default class RiscaldiInferiori extends Vue {
|
||||
|
||||
|
||||
selectedChannelIds: number[] = [];
|
||||
_uniformChannelValue = 0;
|
||||
uniformChannelValue = 0;
|
||||
|
||||
get uniformChannelValue() { return this._uniformChannelValue; }
|
||||
set uniformChannelValue(v) {
|
||||
this._uniformChannelValue = v;
|
||||
for (const c of this.selectedChannels) c.setpointHMI = v;
|
||||
beforeMount(){
|
||||
this.uniformChannelValue = -1;
|
||||
}
|
||||
|
||||
get selectedChannels(): Warmers.IChannel[] {
|
||||
@@ -30,6 +28,10 @@ export default class RiscaldiInferiori extends Vue {
|
||||
|
||||
selectionMethod = "none";
|
||||
|
||||
changedSelectValue(v){
|
||||
if(this.uniformChannelValue>=0)
|
||||
for (const c of this.selectedChannels) c.setpointHMI = this.uniformChannelValue;
|
||||
}
|
||||
|
||||
zoomIn() {
|
||||
(this.$refs.warmers as any).zoomIn();
|
||||
@@ -48,9 +50,17 @@ export default class RiscaldiInferiori extends Vue {
|
||||
for (const c of this.selectedChannels) c.setpointHMI = Math.min(Math.max(parseFloat(c.setpointHMI.toString()) - 5, 0), 100);
|
||||
}
|
||||
|
||||
add1() {
|
||||
for (const c of this.selectedChannels) c.setpointHMI = Math.min(Math.max(parseFloat(c.setpointHMI.toString()) + 1, 0), 100);
|
||||
}
|
||||
|
||||
remove1() {
|
||||
for (const c of this.selectedChannels) c.setpointHMI = Math.min(Math.max(parseFloat(c.setpointHMI.toString()) - 1, 0), 100);
|
||||
}
|
||||
|
||||
selectionChanged(selected: number[]) {
|
||||
this.selectedChannelIds = []
|
||||
this.uniformChannelValue = 0;
|
||||
this.uniformChannelValue = -1;
|
||||
this.selectedChannelIds = selected;
|
||||
}
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<div class="divider"></div>
|
||||
|
||||
<div class="input-area">
|
||||
<label>Selezione</label>
|
||||
<label>{{'warmers_selection' | localize('Selezione')}}</label>
|
||||
</div>
|
||||
<div class="input-area left grid grid-5">
|
||||
<button
|
||||
@@ -49,25 +49,24 @@
|
||||
</div>
|
||||
<div class="divider"></div>
|
||||
<div class="input-area">
|
||||
<label>Gestione potenza</label>
|
||||
<label>{{'warmers_power' | localize('Gestione Potenza')}}</label>
|
||||
</div>
|
||||
<div class="input-area left grid grid-5">
|
||||
<button class="btn btn-info square" @click="remove5()">
|
||||
<img src="assets/icons/png/meno5.png" />
|
||||
</button>
|
||||
<button class="btn btn-info square" @click="add5()">
|
||||
<img src="assets/icons/png/piu5.png" />
|
||||
</button>
|
||||
<combo v-model="uniformChannelValue">
|
||||
<option :value="0">0%</option>
|
||||
<option :value="25">25%</option>
|
||||
<option :value="50">50%</option>
|
||||
<option :value="100">100%</option>
|
||||
</combo>
|
||||
<button class="btn btn-info square" @click="remove5()">-5%</button>
|
||||
<button class="btn btn-info square" @click="remove1()">-1%</button>
|
||||
<button class="btn btn-info square" @click="add1()">+1%</button>
|
||||
<button class="btn btn-info square" @click="add5()">+5%</button>
|
||||
<select class="input-select" v-model="uniformChannelValue" @change="changedSelectValue">
|
||||
<option value="-1">{{'warmers_select_power' | localize('Seleziona...')}}</option>
|
||||
<option v-for="index in 11" :key="index" :value="((index-1)*10)">{{(index-1)*10}}%</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="input-area grid left">
|
||||
<button class="btn btn-success">Autocomposizione</button>
|
||||
<button
|
||||
class="btn btn-success"
|
||||
@click="$refs.warmers.automate()"
|
||||
>{{'warmers_autocomposition' | localize('Autocomposizione')}}</button>
|
||||
</div>
|
||||
<div class="divider"></div>
|
||||
<!-- <div class="input-area grid left"> -->
|
||||
@@ -98,6 +97,7 @@
|
||||
<article class="warmers">
|
||||
<warmers
|
||||
ref="warmers"
|
||||
:recipe="recipe"
|
||||
:id-reflector="1"
|
||||
@select="selectionChanged"
|
||||
@methodChanged="m => selectionMethod = m"
|
||||
|
||||
@@ -16,12 +16,10 @@ export default class RiscaldiSuperiori extends Vue {
|
||||
recipe: Recipe.IRecipe;
|
||||
|
||||
selectedChannelIds: number[] = [];
|
||||
_uniformChannelValue = 0;
|
||||
uniformChannelValue: number = -1;
|
||||
|
||||
get uniformChannelValue() { return this._uniformChannelValue; }
|
||||
set uniformChannelValue(v) {
|
||||
this._uniformChannelValue = v;
|
||||
for (const c of this.selectedChannels) c.setpointHMI = v;
|
||||
beforeMount(){
|
||||
this.uniformChannelValue = -1;
|
||||
}
|
||||
|
||||
get selectedChannels(): Warmers.IChannel[] {
|
||||
@@ -30,6 +28,11 @@ export default class RiscaldiSuperiori extends Vue {
|
||||
|
||||
selectionMethod = "none"
|
||||
|
||||
changedSelectValue(v){
|
||||
console.log(this.uniformChannelValue);
|
||||
if(this.uniformChannelValue>=0)
|
||||
for (const c of this.selectedChannels) c.setpointHMI = this.uniformChannelValue;
|
||||
}
|
||||
|
||||
zoomIn() {
|
||||
(this.$refs.warmers as any).zoomIn();
|
||||
@@ -47,9 +50,17 @@ export default class RiscaldiSuperiori extends Vue {
|
||||
for (const c of this.selectedChannels) c.setpointHMI = Math.min(Math.max(parseFloat(c.setpointHMI.toString()) - 5, 0), 100);
|
||||
}
|
||||
|
||||
add1() {
|
||||
for (const c of this.selectedChannels) c.setpointHMI = Math.min(Math.max(parseFloat(c.setpointHMI.toString()) + 1, 0), 100);
|
||||
}
|
||||
|
||||
remove1() {
|
||||
for (const c of this.selectedChannels) c.setpointHMI = Math.min(Math.max(parseFloat(c.setpointHMI.toString()) - 1, 0), 100);
|
||||
}
|
||||
|
||||
selectionChanged(selected: number[]) {
|
||||
this.selectedChannelIds = []
|
||||
this.uniformChannelValue = 0;
|
||||
this.uniformChannelValue = -1;
|
||||
this.selectedChannelIds = selected;
|
||||
}
|
||||
}
|
||||
@@ -22,7 +22,7 @@
|
||||
<div class="divider"></div>
|
||||
|
||||
<div class="input-area">
|
||||
<label>Selezione</label>
|
||||
<label>{{'warmers_selection' | localize('Selezione')}}</label>
|
||||
</div>
|
||||
<div class="input-area left grid grid-5">
|
||||
<button
|
||||
@@ -49,25 +49,24 @@
|
||||
</div>
|
||||
<div class="divider"></div>
|
||||
<div class="input-area">
|
||||
<label>Gestione potenza</label>
|
||||
<label>{{'warmers_power' | localize('Gestione Potenza')}}</label>
|
||||
</div>
|
||||
<div class="input-area left grid grid-5">
|
||||
<button class="btn btn-info square" @click="remove5()">
|
||||
<img src="assets/icons/png/meno5.png" />
|
||||
</button>
|
||||
<button class="btn btn-info square" @click="add5()">
|
||||
<img src="assets/icons/png/piu5.png" />
|
||||
</button>
|
||||
<combo v-model="uniformChannelValue">
|
||||
<option :value="0">0%</option>
|
||||
<option :value="25">25%</option>
|
||||
<option :value="50">50%</option>
|
||||
<option :value="100">100%</option>
|
||||
</combo>
|
||||
<button class="btn btn-info square" @click="remove5()">-5%</button>
|
||||
<button class="btn btn-info square" @click="remove1()">-1%</button>
|
||||
<button class="btn btn-info square" @click="add1()">+1%</button>
|
||||
<button class="btn btn-info square" @click="add5()">+5%</button>
|
||||
<select class="input-select" v-model="uniformChannelValue" @change="changedSelectValue">
|
||||
<option value="-1">{{'warmers_select_power' | localize('Seleziona...')}}</option>
|
||||
<option v-for="index in 11" :key="index" :value="((index-1)*10)">{{(index-1)*10}}%</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="input-area grid left">
|
||||
<button class="btn btn-success">Autocomposizione</button>
|
||||
<button
|
||||
class="btn btn-success"
|
||||
@click="$refs.warmers.automate()"
|
||||
>{{'warmers_autocomposition' | localize('Autocomposizione')}}</button>
|
||||
</div>
|
||||
<div class="divider"></div>
|
||||
<!-- <div class="input-area grid left"> -->
|
||||
@@ -95,7 +94,12 @@
|
||||
</aside>
|
||||
<hr />
|
||||
<article class="warmers">
|
||||
<warmers ref="warmers" @select="selectionChanged" @methodChanged="m => selectionMethod = m"></warmers>
|
||||
<warmers
|
||||
ref="warmers"
|
||||
@select="selectionChanged"
|
||||
@methodChanged="m => selectionMethod = m"
|
||||
:recipe="recipe"
|
||||
></warmers>
|
||||
|
||||
<div class="absolute bottom right">
|
||||
<button class="btn btn-info square" @click="zoomIn()">
|
||||
|
||||
@@ -16,6 +16,9 @@ export default class Warmers extends Vue {
|
||||
width = 180;
|
||||
height = 48;
|
||||
|
||||
@Prop()
|
||||
recipe: Recipe.IRecipe;
|
||||
|
||||
@Prop({ default: 0 })
|
||||
idReflector: number;
|
||||
|
||||
@@ -153,16 +156,14 @@ export default class Warmers extends Vue {
|
||||
|
||||
stopSelection() {
|
||||
if (this.selectionMethod != SelectionMethod.none) {
|
||||
this.captureItems();
|
||||
this.captureItems(this.$refs.lazo as SVGGeometryElement);
|
||||
this.toggleSelection(this.selectionMethod);
|
||||
}
|
||||
}
|
||||
|
||||
captureItems() {
|
||||
captureItems(lazo: SVGGeometryElement) {
|
||||
let captured = new Set<number>();
|
||||
|
||||
let lazo = this.$refs.lazo as SVGGeometryElement;
|
||||
|
||||
let point1 = (this.$refs.warmer as SVGSVGElement)?.createSVGPoint();
|
||||
let point2 = (this.$refs.warmer as SVGSVGElement)?.createSVGPoint();
|
||||
let point3 = (this.$refs.warmer as SVGSVGElement)?.createSVGPoint();
|
||||
@@ -171,14 +172,7 @@ export default class Warmers extends Vue {
|
||||
if (lazo && point1 && point2)
|
||||
for (const row of this.rows) {
|
||||
for (const cell of this.resistancesPerRow(row)) {
|
||||
point1.x = this.resistanceXPosition(row, cell.column) * this.width;
|
||||
point1.y = row * this.height;
|
||||
point2.x = point1.x + this.width * cell.dimension;
|
||||
point2.y = point1.y + this.height;
|
||||
point3.x = point1.x;
|
||||
point3.y = point2.y;
|
||||
point4.x = point2.x;
|
||||
point4.y = point1.y;
|
||||
this.resistancePosition(row, cell, point1, point2, point3, point4);
|
||||
|
||||
if (lazo.isPointInFill(point1) || lazo.isPointInFill(point2) || lazo.isPointInFill(point3) || lazo.isPointInFill(point4)) {
|
||||
captured.add(cell.idChannel);
|
||||
@@ -190,6 +184,82 @@ export default class Warmers extends Vue {
|
||||
this.$emit('select', Array.from(captured.values()));
|
||||
}
|
||||
|
||||
private resistancePosition(row: number, cell: Warmers.IResistance, point1: DOMPoint, point2: DOMPoint, point3?: DOMPoint, point4?: DOMPoint) {
|
||||
point1.x = this.resistanceXPosition(row, cell.column) * this.width;
|
||||
point1.y = row * this.height;
|
||||
point2.x = point1.x + this.width * cell.dimension;
|
||||
point2.y = point1.y + this.height;
|
||||
if (point3) {
|
||||
point3.x = point1.x;
|
||||
point3.y = point2.y;
|
||||
}
|
||||
if (point4) {
|
||||
point4.x = point2.x;
|
||||
point4.y = point1.y;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
automate(max: number = 100, min: number = 20) {
|
||||
|
||||
let lazo = this.$refs.piastra as SVGRectElement;
|
||||
let point1 = (this.$refs.warmer as SVGSVGElement)?.createSVGPoint();
|
||||
let point2 = (this.$refs.warmer as SVGSVGElement)?.createSVGPoint();
|
||||
let point3 = (this.$refs.warmer as SVGSVGElement)?.createSVGPoint();
|
||||
let point4 = (this.$refs.warmer as SVGSVGElement)?.createSVGPoint();
|
||||
|
||||
let result = new Map<number, Warmers.IResistance[]>();
|
||||
|
||||
for (const row of this.rows) {
|
||||
for (const cell of this.resistancesPerRow(row)) {
|
||||
this.resistancePosition(row, cell, point1, point2, point3, point4);
|
||||
if (lazo.isPointInFill(point1) || lazo.isPointInFill(point2) || lazo.isPointInFill(point3) || lazo.isPointInFill(point4)) {
|
||||
let distance = this.resistanceDistance(lazo, point1, point2, point3, point4);
|
||||
if (!result.has(distance))
|
||||
result.set(distance, []);
|
||||
result.get(distance).push(cell);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
let mink = Math.min(...Array.from(result.keys()));
|
||||
let maxk = Math.max(...Array.from(result.keys()));
|
||||
|
||||
let dk = maxk - mink;
|
||||
let dv = max - min;
|
||||
|
||||
for (const i of Array.from(result.keys())) {
|
||||
let rv = max - (((i - mink) * dv) / dk);
|
||||
|
||||
for (const res of result.get(i)) {
|
||||
let channel = this.channels.find(c => c.idChannel == res.idChannel);
|
||||
channel.setpointHMI = Math.round(rv);
|
||||
}
|
||||
}
|
||||
|
||||
// console.log('automate', result);
|
||||
|
||||
|
||||
}
|
||||
|
||||
resistanceDistance(lazo: SVGRectElement, ...points: DOMPoint[]): number {
|
||||
// se i punti non sono tutti nel lazo la distanza è 0
|
||||
if (points.reduce((p, c) => { p += lazo.isPointInFill(c) ? 1 : 0; return p; }, 0) < 4) return 0;
|
||||
|
||||
let x = lazo.x.baseVal.value;
|
||||
let y = lazo.y.baseVal.value;
|
||||
let w = lazo.width.baseVal.value;
|
||||
let h = lazo.height.baseVal.value;
|
||||
|
||||
return Math.min(...points.reduce((p, c) => {
|
||||
p.push(Math.abs(c.x - x));
|
||||
p.push(Math.abs(c.x - (x + w)));
|
||||
p.push(Math.abs(c.y - y));
|
||||
p.push(Math.abs(c.y - (y + h)));
|
||||
return p;
|
||||
}, [] as number[]));
|
||||
}
|
||||
|
||||
trailing = false;
|
||||
moveSelection(event: MouseEvent) {
|
||||
if (this.selectionPoints.length) {
|
||||
|
||||
@@ -29,6 +29,21 @@
|
||||
/>
|
||||
</foreignObject>
|
||||
</g>
|
||||
<g>
|
||||
<rect
|
||||
ref="piastra"
|
||||
:x="10"
|
||||
:y="10"
|
||||
:width="recipe.general_sizes_sheet_dim_x.setpointHMI"
|
||||
:height="recipe.general_sizes_sheet_dim_y.setpointHMI"
|
||||
stroke="rgba(0,0,0,.3)"
|
||||
stroke-width="6"
|
||||
rx="3"
|
||||
ry="3"
|
||||
fill="rgba(0,0,0,0.1)"
|
||||
/>
|
||||
</g>
|
||||
|
||||
<g v-if="selectionMethod == 'rect' && selectionPoints.length>1">
|
||||
<rect
|
||||
ref="lazo"
|
||||
|
||||
@@ -2,7 +2,9 @@
|
||||
import { Factory, messageService } from "@/_base";
|
||||
import ConfirmModal from "./modal-confirm.vue";
|
||||
import { Deferred } from "@/services/Deferred";
|
||||
import { M155Questions } from "src/app_modules/machine";
|
||||
import { processStore, processModelActions } from "@/store/runningProcess.store";
|
||||
|
||||
import { store } from "@/store";
|
||||
declare let $: any;
|
||||
|
||||
@@ -57,12 +59,34 @@ export class ModalHelper {
|
||||
isMessage: false
|
||||
};
|
||||
|
||||
public static M155ModalData = {
|
||||
data: null
|
||||
};
|
||||
|
||||
public static MaintenancePasswordData = {
|
||||
maintenance: null,
|
||||
value: ""
|
||||
};
|
||||
|
||||
public static ShowNextM155Modal() {
|
||||
ModalHelper.M155ModalData.data = null;
|
||||
for(let i = 0; i< processStore.state.m155messages.length; i++){
|
||||
if(processStore.state.m155messages[i].toDisplay){
|
||||
ModalHelper.M155ModalData.data = processStore.state.m155messages[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(ModalHelper.M155ModalData.data){
|
||||
messageService.publishToChannel("show-modal-nc", M155Questions);
|
||||
}
|
||||
else{
|
||||
messageService.publishToChannel("hide-modal-nc", M155Questions);
|
||||
}
|
||||
}
|
||||
public static HideThisM155Modal(processId) {
|
||||
processModelActions.hideM155Messsage(store,processId);
|
||||
}
|
||||
|
||||
public static GetModalData() {
|
||||
return ModalHelper._modalData;
|
||||
};
|
||||
@@ -101,6 +125,17 @@ export class ModalHelper {
|
||||
return deferred.promise;
|
||||
}
|
||||
|
||||
|
||||
public static ShowM155ModaloOfProcess(proc: number) {
|
||||
if (!ModalHelper.M155ModalData.data) {
|
||||
let find = processStore.state.m155messages.find(X => X.process == proc)
|
||||
if (find) {
|
||||
ModalHelper.M155ModalData.data = find;
|
||||
messageService.publishToChannel("show-modal-nc", M155Questions);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static HideModal(modalname: string = "modal") {
|
||||
messageService.publishToChannel("hide-" + modalname);
|
||||
}
|
||||
|
||||
@@ -90,12 +90,12 @@
|
||||
class="under"
|
||||
:class="{'pressed':state.machineStatus.cycleProd.mode==1}"
|
||||
@click="runManual()"
|
||||
>{{'run_manual' | localize("Manuale")}}</button>
|
||||
><img src="assets/icons/png/manual.png" />{{'run_manual' | localize("Manuale")}}</button>
|
||||
<button
|
||||
class="under"
|
||||
:class="{'pressed':state.machineStatus.cycleProd.mode==2}"
|
||||
@click="runAuto()"
|
||||
>{{'run_auto' | localize("Auto")}}</button>
|
||||
><img src="assets/icons/png/auto.png" />{{'run_auto' | localize("Auto")}}</button>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ export default class ProcessInfo extends Vue {
|
||||
counter: number;
|
||||
@Prop({ default: 16 })
|
||||
status: number;
|
||||
@Prop({ default: 0 })
|
||||
@Prop({ default: 1 })
|
||||
id: number;
|
||||
@Prop({ default: true })
|
||||
showProcessName: boolean
|
||||
@@ -38,4 +38,8 @@ export default class ProcessInfo extends Vue {
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
showmessage(){
|
||||
ModalHelper.ShowM155ModaloOfProcess(this.id);
|
||||
}
|
||||
};
|
||||
@@ -90,6 +90,7 @@ export class Hub {
|
||||
// this._hub.client.processesData = Hub.processDataChanged;
|
||||
this._hub.client.axesNames = Hub.axesNamesDataChanged;
|
||||
this._hub.client.axesPositions = Hub.axesPositionsDataChanged;
|
||||
this._hub.client.m156Data = Hub.m156Data;
|
||||
|
||||
this._hub.client.cmsConnectGatewayRebbot = Hub.cmsConnectGatewayRebbot;
|
||||
|
||||
@@ -138,6 +139,10 @@ export class Hub {
|
||||
|
||||
}
|
||||
|
||||
private static m156Data(data) {
|
||||
processModelActions.setM155Messsages(store, data, true);
|
||||
}
|
||||
|
||||
public static prodCycleData(data) {
|
||||
machineStatusActions.setCycleProd(store, data);
|
||||
}
|
||||
@@ -511,6 +516,12 @@ export class Hub {
|
||||
});
|
||||
}
|
||||
|
||||
public WriteM156Response(process: number, value: number) {
|
||||
this._hub.server.writeM156Response(process, value)
|
||||
.catch((err) => {
|
||||
this.ManageError(err)
|
||||
});
|
||||
}
|
||||
|
||||
public async ManageError(err) {
|
||||
if ((err as TypeError).message.indexOf("not authorized") >= 0) {
|
||||
|
||||
@@ -33,7 +33,7 @@ export interface ProcessModelActionsInterface {
|
||||
setCurrentProgramName(context, name);
|
||||
setQueueStatus(context, status);
|
||||
setStartStopQueueEnabled(context, queueEnabled);
|
||||
setM155Messsages(context, data: Array<signalr_process.M155Messages>);
|
||||
setM155Messsages(context, data: Array<signalr_process.M155Messages>, isM156: boolean);
|
||||
hideM155Messsage(context, Id: number);
|
||||
setCurrentOrigin(context, Id: number);
|
||||
setFeedOverride(context, feed);
|
||||
@@ -153,23 +153,30 @@ export const processStore = {
|
||||
}
|
||||
store.m155messages = Array.from(store._m155messages.values());
|
||||
},
|
||||
setM155Messsages(store, data: Array<signalr_process.M155Messages>){
|
||||
setM155Messsages(store, {m155Data, isM156}){
|
||||
|
||||
var iterator = store._m155messages.values();
|
||||
let value = iterator.next().value;
|
||||
// Remove only m155
|
||||
while(value){
|
||||
value.toDelete = true;
|
||||
value = iterator.next().value;
|
||||
if(isM156 && value.isM156)
|
||||
value.toDelete = true;
|
||||
|
||||
if(!isM156 && !value.isM156)
|
||||
value.toDelete = true;
|
||||
|
||||
value = iterator.next().value;
|
||||
}
|
||||
|
||||
for (let index = 0; index < data.length; index++) {
|
||||
let element = data[index];
|
||||
// Set m155 data
|
||||
for (let index = 0; index < m155Data.length; index++) {
|
||||
let element = m155Data[index];
|
||||
element.toDelete = false;
|
||||
element.toDisplay = true;
|
||||
store._m155messages.set(element.process, element);
|
||||
}
|
||||
|
||||
//Delete what i have to delete
|
||||
// Delete what i have to delete
|
||||
iterator = store._m155messages.values();
|
||||
value = iterator.next().value;
|
||||
while(value){
|
||||
@@ -209,8 +216,8 @@ export const processStore = {
|
||||
setProcessMessage(context, message){
|
||||
context.commit("SetProcessMessage", message);
|
||||
},
|
||||
setM155Messsages(context, data){
|
||||
context.commit("setM155Messsages", data);
|
||||
setM155Messsages(context, data, isM156){
|
||||
context.commit("setM155Messsages", {m155Data: data, isM156: isM156});
|
||||
},
|
||||
setStartStopQueueEnabled(context, queueEnabled){
|
||||
context.commit("SetStartStopQueueEnabled", queueEnabled);
|
||||
|
||||