Compare commits
103 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b51c9f897c | |||
| a9c16963b1 | |||
| 42be145f0e | |||
| 6b34c5f590 | |||
| d9512f73cc | |||
| d8f523c497 | |||
| acdf473fe4 | |||
| 811e0b0bd1 | |||
| 536112ef48 | |||
| 9f167377df | |||
| 2d3869ddae | |||
| 2261bec8da | |||
| 920d4fcdb2 | |||
| 4c7f12466d | |||
| 76d0593f4d | |||
| e25e861224 | |||
| 6b420387e3 | |||
| 459ba7875c | |||
| 5290c9e208 | |||
| f1e52ed3c6 | |||
| cd6d0b9e38 | |||
| 992b7b8df2 | |||
| b150f5bcfe | |||
| a0d4e0e2e1 | |||
| cc9f87d079 | |||
| 4f6f5ab867 | |||
| d272ff5e02 | |||
| 8c48b2c714 | |||
| ee924dce19 | |||
| 79874f92c1 | |||
| 846ae78de7 | |||
| bc51324ed0 | |||
| d92d0e8b3e | |||
| a98de74f19 | |||
| df0532dbed | |||
| d7fc81b460 | |||
| 65543fc44d | |||
| e77f4f2900 | |||
| 1b0432babe | |||
| 8579511e95 | |||
| 9a4bb57ddb | |||
| 9e08721ebc | |||
| a48c986086 | |||
| c820e98403 | |||
| 8c9c2614ff | |||
| 8798a2a00f | |||
| f5d9ef2dd9 | |||
| 3c29a47fc9 | |||
| 488add201e | |||
| a552ab5cae | |||
| fad81cfb47 | |||
| ce150ed3c7 | |||
| 5831936b24 | |||
| 1b31f05fb2 | |||
| e2b07ff9ca | |||
| 6066c7155b | |||
| 07719b3fde | |||
| 59051dc908 | |||
| a3b73742c2 | |||
| b732d1d024 | |||
| 71955744f6 | |||
| 807e225de8 | |||
| 26000cffd1 | |||
| 99a6af2491 | |||
| 251795ad19 | |||
| 002310dcb4 | |||
| 8db88e9ca6 | |||
| 956b9ad191 | |||
| 02cf47426c | |||
| e2e190cf8f | |||
| 23f2299de2 | |||
| e3f376bf51 | |||
| 06e3345d2b | |||
| cf6fdeaa79 | |||
| 3b823cec89 | |||
| b0684fa03f | |||
| b48c18ac12 | |||
| d452e69a52 | |||
| f9c354acf5 | |||
| d0ee6d33d1 | |||
| 91df9b99d4 | |||
| 6cd224d6ce | |||
| 192722d10e | |||
| 6095f02b2a | |||
| eae5ecdf31 | |||
| ceccfca48a | |||
| 2dc5ca8ebe | |||
| f71c03186e | |||
| 9f7b60234a | |||
| 5a209dc1ff | |||
| 0a47e22987 | |||
| 6811c29f01 | |||
| f168f6a9d0 | |||
| 4343386cce | |||
| 1a97ad094f | |||
| e550a386ec | |||
| 66865d8e98 | |||
| 245844a243 | |||
| de48382f3d | |||
| bc75c29f80 | |||
| e7e2601a8d | |||
| 4ea2cebfeb | |||
| 1dd83f4e17 |
@@ -20,3 +20,4 @@ Output/
|
||||
*.ntvs*
|
||||
*.njsproj
|
||||
/ConsoleApp1
|
||||
/WindowsFormsApp1
|
||||
|
||||
@@ -2,184 +2,363 @@
|
||||
<modules>
|
||||
<block>
|
||||
<id>1</id>
|
||||
<localizedLabels>
|
||||
<lang langKey="en">DiscesaCZ ENG</lang>
|
||||
<lang langKey="it">DiscesaCZ ITA</lang>
|
||||
</localizedLabels>
|
||||
<label>MB_DiscesaCZ</label>
|
||||
<type>MOVEMENT</type>
|
||||
<section>HEATING</section>
|
||||
<idParam>-1</idParam>
|
||||
<showDelay>false</showDelay>
|
||||
<showStatus>false</showStatus>
|
||||
<priority>1</priority>
|
||||
</block>
|
||||
<block>
|
||||
<id>2</id>
|
||||
<localizedLabels>
|
||||
<lang langKey="en">MembDiscesaZ ENG</lang>
|
||||
<lang langKey="it">MembDiscesaZ ITA</lang>
|
||||
</localizedLabels>
|
||||
<label>MB_MembDiscesaZ</label>
|
||||
<type>MOVEMENT</type>
|
||||
<section>HEATING</section>
|
||||
<idParam>-1</idParam>
|
||||
<showDelay>false</showDelay>
|
||||
<showStatus>false</showStatus>
|
||||
<priority>1</priority>
|
||||
</block>
|
||||
<block>
|
||||
<id>3</id>
|
||||
<localizedLabels>
|
||||
<lang langKey="en">MembZ ENG</lang>
|
||||
<lang langKey="it">MembZ ITA</lang>
|
||||
</localizedLabels>
|
||||
<label>MB_MembZ</label>
|
||||
<type>MOVEMENT</type>
|
||||
<section>HEATING</section>
|
||||
<idParam>-1</idParam>
|
||||
<showDelay>false</showDelay>
|
||||
<showStatus>false</showStatus>
|
||||
<priority>1</priority>
|
||||
</block>
|
||||
<block>
|
||||
<id>4</id>
|
||||
<localizedLabels>
|
||||
<lang langKey="en">Mod_MembSalitaZ ENG</lang>
|
||||
<lang langKey="it">Mod_MembSalitaZ ITA</lang>
|
||||
</localizedLabels>
|
||||
<label>MB_Mod_MembSalitaZ</label>
|
||||
<type>MOVEMENT</type>
|
||||
<section>HEATING</section>
|
||||
<idParam>-1</idParam>
|
||||
<showDelay>false</showDelay>
|
||||
<priority>1</priority>
|
||||
</block>
|
||||
<block>
|
||||
<id>5</id>
|
||||
<label>MB_Mod_AppoggioDiscesaW</label>
|
||||
<type>MOVEMENT</type>
|
||||
<section>HEATING</section>
|
||||
<idParam>-1</idParam>
|
||||
<showDelay>false</showDelay>
|
||||
<showStatus>false</showStatus>
|
||||
<priority>1</priority>
|
||||
</block>
|
||||
<block>
|
||||
<id>6</id>
|
||||
<localizedLabels>
|
||||
<lang langKey="en">Mod_RiscaldoInf ENG</lang>
|
||||
<lang langKey="it">Mod_RiscaldoInf ITA</lang>
|
||||
</localizedLabels>
|
||||
<label>MB_Mod_RiscaldoInf</label>
|
||||
<type>HEATING</type>
|
||||
<section>HEATING</section>
|
||||
<idParam>-1</idParam>
|
||||
<showDelay>false</showDelay>
|
||||
<showStatus>false</showStatus>
|
||||
<priority>1</priority>
|
||||
</block>
|
||||
<block>
|
||||
<id>7</id>
|
||||
<localizedLabels>
|
||||
<lang langKey="en">Mod_RiscaldoSup ENG</lang>
|
||||
<lang langKey="it">Mod_RiscaldoSup ITA</lang>
|
||||
</localizedLabels>
|
||||
<label>MB_Mod_RiscaldoSup</label>
|
||||
<type>HEATING</type>
|
||||
<section>HEATING</section>
|
||||
<idParam>0</idParam>
|
||||
<showDelay>false</showDelay>
|
||||
<showStatus>false</showStatus>
|
||||
<priority>2</priority>
|
||||
</block>
|
||||
<block>
|
||||
<id>8</id>
|
||||
<localizedLabels>
|
||||
<lang langKey="en">Mod_PirometroRisc ENG</lang>
|
||||
<lang langKey="it">Mod_PirometroRisc ITA</lang>
|
||||
</localizedLabels>
|
||||
<label>MB_Mod_PirometroRisc</label>
|
||||
<type>HEATING</type>
|
||||
<section>HEATING</section>
|
||||
<idParam>80</idParam>
|
||||
<showDelay>true</showDelay>
|
||||
<showStatus>true</showStatus>
|
||||
<priority>3</priority>
|
||||
</block>
|
||||
<block>
|
||||
<id>9</id>
|
||||
<label>MB_Mod_DecompSustain</label>
|
||||
<type>HEATING</type>
|
||||
<section>HEATING</section>
|
||||
<idParam>-1</idParam>
|
||||
<showDelay>false</showDelay>
|
||||
<priority>4</priority>
|
||||
</block>
|
||||
<block>
|
||||
<id>10</id>
|
||||
<label>MB_Mod_Acrilico</label>
|
||||
<type>HEATING</type>
|
||||
<section>HEATING</section>
|
||||
<idParam>-1</idParam>
|
||||
<showDelay>false</showDelay>
|
||||
<priority>5</priority>
|
||||
</block>
|
||||
<block>
|
||||
<id>11</id>
|
||||
<label>MB_Mod_RiscaldiIndietro</label>
|
||||
<type>MOVEMENT</type>
|
||||
<section>HEATING</section>
|
||||
<idParam>-1</idParam>
|
||||
<showDelay>false</showDelay>
|
||||
<priority>1</priority>
|
||||
</block>
|
||||
<block>
|
||||
<id>12</id>
|
||||
<label>MB_Mod_ExtraR</label>
|
||||
<type>HEATING</type>
|
||||
<section>FORMING</section>
|
||||
<idParam>-1</idParam>
|
||||
<showDelay>false</showDelay>
|
||||
<priority>1</priority>
|
||||
</block>
|
||||
<block>
|
||||
<id>13</id>
|
||||
<localizedLabels>
|
||||
<lang langKey="en">Mod_Imbutitura ENG</lang>
|
||||
<lang langKey="it">Mod_Imbutitura ITA</lang>
|
||||
</localizedLabels>
|
||||
<label>MB_Mod_Imbutitura</label>
|
||||
<type>DRAWING</type>
|
||||
<section>FORMING</section>
|
||||
<idParam>99</idParam>
|
||||
<showDelay>true</showDelay>
|
||||
<showStatus>true</showStatus>
|
||||
<priority>2</priority>
|
||||
</block>
|
||||
<block>
|
||||
<id>14</id>
|
||||
<label>MB_Mod_SalitaW</label>
|
||||
<type>MOVEMENT</type>
|
||||
<section>FORMING</section>
|
||||
<idParam>-1</idParam>
|
||||
<showDelay>true</showDelay>
|
||||
<priority>1</priority>
|
||||
</block>
|
||||
<block>
|
||||
<id>15</id>
|
||||
<label>MB_Mod_AttesaStampo</label>
|
||||
<type>MOVEMENT</type>
|
||||
<section>FORMING</section>
|
||||
<idParam>-1</idParam>
|
||||
<showDelay>false</showDelay>
|
||||
<priority>3</priority>
|
||||
</block>
|
||||
<block>
|
||||
<id>16</id>
|
||||
<localizedLabels>
|
||||
<lang langKey="en">Mod_Raffreddamento ENG</lang>
|
||||
<lang langKey="it">Mod_Raffreddamento ITA</lang>
|
||||
</localizedLabels>
|
||||
<label>MB_Mod_Raffreddamento</label>
|
||||
<type>COOLING</type>
|
||||
<section>FORMING</section>
|
||||
<idParam>-1</idParam>
|
||||
<showDelay>true</showDelay>
|
||||
<showStatus>false</showStatus>
|
||||
<priority>2</priority>
|
||||
<priority>3</priority>
|
||||
</block>
|
||||
<block>
|
||||
<id>17</id>
|
||||
<localizedLabels>
|
||||
<lang langKey="en">Mod_PirometroRaffr ENG</lang>
|
||||
<lang langKey="it">Mod_PirometroRaffr ITA</lang>
|
||||
</localizedLabels>
|
||||
<label>MB_Mod_PirometroRaffr</label>
|
||||
<type>COOLING</type>
|
||||
<section>FORMING</section>
|
||||
<idParam>139</idParam>
|
||||
<showDelay>true</showDelay>
|
||||
<showStatus>true</showStatus>
|
||||
<priority>3</priority>
|
||||
</block>
|
||||
<block>
|
||||
<id>19</id>
|
||||
<localizedLabels>
|
||||
<lang langKey="en">Mod_Vuoto ENG</lang>
|
||||
<lang langKey="it">Mod_Vuoto ITA</lang>
|
||||
</localizedLabels>
|
||||
<type>VACUUM</type>
|
||||
<section>FORMING</section>
|
||||
<idParam>-1</idParam>
|
||||
<showDelay>true</showDelay>
|
||||
<showStatus>false</showStatus>
|
||||
<priority>4</priority>
|
||||
</block>
|
||||
<block>
|
||||
<id>21</id>
|
||||
<localizedLabels>
|
||||
<lang langKey="en">Mod_VuotoDiretto ENG</lang>
|
||||
<lang langKey="it">Mod_VuotoDiretto ITA</lang>
|
||||
</localizedLabels>
|
||||
<id>19</id>
|
||||
<label>MB_Mod_Vuoto</label>
|
||||
<type>VACUUM</type>
|
||||
<section>FORMING</section>
|
||||
<idParam>-1</idParam>
|
||||
<showDelay>true</showDelay>
|
||||
<showStatus>false</showStatus>
|
||||
<priority>5</priority>
|
||||
</block>
|
||||
<block>
|
||||
<id>21</id>
|
||||
<label>MB_Mod_VuotoDiretto</label>
|
||||
<type>VACUUM</type>
|
||||
<section>FORMING</section>
|
||||
<idParam>-1</idParam>
|
||||
<showDelay>true</showDelay>
|
||||
<priority>6</priority>
|
||||
</block>
|
||||
<block>
|
||||
<id>23</id>
|
||||
<label>MB_Mod_VuotoAux</label>
|
||||
<type>VACUUM</type>
|
||||
<section>FORMING</section>
|
||||
<idParam>-1</idParam>
|
||||
<showDelay>true</showDelay>
|
||||
|
||||
<priority>7</priority>
|
||||
</block>
|
||||
<block>
|
||||
<id>25</id>
|
||||
<label>MB_Mod_Nebulizz</label>
|
||||
<type>COOLING</type>
|
||||
<section>FORMING</section>
|
||||
<idParam>-1</idParam>
|
||||
<showDelay>true</showDelay>
|
||||
<priority>8</priority>
|
||||
</block>
|
||||
<block>
|
||||
<id>26</id>
|
||||
<label>MB_Mod_AttesaPartenzaZ</label>
|
||||
<type>MOVEMENT</type>
|
||||
<section>FORMING</section>
|
||||
<idParam>-1</idParam>
|
||||
<showDelay>false</showDelay>
|
||||
<priority>9</priority>
|
||||
</block>
|
||||
<block>
|
||||
<id>28</id>
|
||||
<label>MB_Mod_DiscesaZ</label>
|
||||
<type>MOVEMENT</type>
|
||||
<section>FORMING</section>
|
||||
<idParam>-1</idParam>
|
||||
<showDelay>true</showDelay>
|
||||
<priority>9</priority>
|
||||
</block>
|
||||
<block>
|
||||
<id>29</id>
|
||||
<label>MB_Mod_Z</label>
|
||||
<type>MOVEMENT</type>
|
||||
<section>FORMING</section>
|
||||
<idParam>-1</idParam>
|
||||
<showDelay>false</showDelay>
|
||||
<priority>9</priority>
|
||||
</block>
|
||||
<block>
|
||||
<id>30</id>
|
||||
<label>MB_Mod_SalitaZ</label>
|
||||
<type>MOVEMENT</type>
|
||||
<section>FORMING</section>
|
||||
<idParam>-1</idParam>
|
||||
<showDelay>false</showDelay>
|
||||
<priority>9</priority>
|
||||
</block>
|
||||
<block>
|
||||
<id>31</id>
|
||||
<label>MB_Mod_AriaZ</label>
|
||||
<type>VACUUM</type>
|
||||
<section>FORMING</section>
|
||||
<idParam>-1</idParam>
|
||||
<showDelay>true</showDelay>
|
||||
<priority>10</priority>
|
||||
</block>
|
||||
<block>
|
||||
<id>33</id>
|
||||
<label>MB_Mod_VuotoZ</label>
|
||||
<type>VACUUM</type>
|
||||
<section>FORMING</section>
|
||||
<idParam>-1</idParam>
|
||||
<showDelay>true</showDelay>
|
||||
<priority>11</priority>
|
||||
</block>
|
||||
<block>
|
||||
<id>34</id>
|
||||
<label>MB_Mod_ScaricoVuotoZ</label>
|
||||
<type>VACUUM</type>
|
||||
<section>EXTRACTION</section>
|
||||
<idParam>-1</idParam>
|
||||
<showDelay>false</showDelay>
|
||||
<priority>9</priority>
|
||||
</block>
|
||||
<block>
|
||||
<id>35</id>
|
||||
<label>MB_Mod_ScaricoVuoto</label>
|
||||
<type>VACUUM</type>
|
||||
<section>EXTRACTION</section>
|
||||
<idParam>-1</idParam>
|
||||
<showDelay>false</showDelay>
|
||||
<priority>9</priority>
|
||||
</block>
|
||||
<block>
|
||||
<id>36</id>
|
||||
<localizedLabels>
|
||||
<lang langKey="en">Mod_EstrazioneZ ENG</lang>
|
||||
<lang langKey="it">Mod_EstrazioneZ ITA</lang>
|
||||
</localizedLabels>
|
||||
<label>MB_Mod_EstrazioneZ</label>
|
||||
<type>EXTRACTION</type>
|
||||
<section>EXTRACTION</section>
|
||||
<idParam>-1</idParam>
|
||||
<showDelay>true</showDelay>
|
||||
<showStatus>false</showStatus>
|
||||
<priority>2</priority>
|
||||
<priority>10</priority>
|
||||
</block>
|
||||
<block>
|
||||
<id>42</id>
|
||||
<localizedLabels>
|
||||
<lang langKey="en">Mod_SalitaCZ ENG</lang>
|
||||
<lang langKey="it">Mod_SalitaCZ ITA</lang>
|
||||
</localizedLabels>
|
||||
<id>38</id>
|
||||
<label>MB_Mod_DiscesaAssistZ</label>
|
||||
<type>MOVEMENT</type>
|
||||
<section>EXTRACTION</section>
|
||||
<idParam>-1</idParam>
|
||||
<showDelay>false</showDelay>
|
||||
<showStatus>false</showStatus>
|
||||
<priority>4</priority>
|
||||
</block>
|
||||
<block>
|
||||
<id>39</id>
|
||||
<label>MB_Mod_Estrazione</label>
|
||||
<type>EXTRACTION</type>
|
||||
<section>EXTRACTION</section>
|
||||
<idParam>-1</idParam>
|
||||
<showDelay>true</showDelay>
|
||||
<priority>2</priority>
|
||||
</block>
|
||||
<block>
|
||||
<id>40</id>
|
||||
<label>MB_Mod_DiscesaW</label>
|
||||
<type>MOVEMENT</type>
|
||||
<section>EXTRACTION</section>
|
||||
<idParam>-1</idParam>
|
||||
<showDelay>true</showDelay>
|
||||
<priority>1</priority>
|
||||
</block>
|
||||
<block>
|
||||
<id>41</id>
|
||||
<label>MB_Mod_RiscaldiIndietro2</label>
|
||||
<type>MOVEMENT</type>
|
||||
<section>EXTRACTION</section>
|
||||
<idParam>-1</idParam>
|
||||
<showDelay>false</showDelay>
|
||||
<priority>1</priority>
|
||||
</block>
|
||||
<block>
|
||||
<id>42</id>
|
||||
<label>MB_Mod_SalitaCZ</label>
|
||||
<type>MOVEMENT</type>
|
||||
<section>EXTRACTION</section>
|
||||
<idParam>-1</idParam>
|
||||
<showDelay>false</showDelay>
|
||||
<priority>1</priority>
|
||||
</block>
|
||||
<block>
|
||||
<id>43</id>
|
||||
<label>MB_Mod_Riscaldi2</label>
|
||||
<type>HEATING</type>
|
||||
<section>EXTRACTION</section>
|
||||
<idParam>-1</idParam>
|
||||
<showDelay>false</showDelay>
|
||||
<priority>1</priority>
|
||||
</block>
|
||||
<block>
|
||||
<id>44</id>
|
||||
<label>MB_Mod_Estrazione_Aux_W</label>
|
||||
<type>EXTRACTION</type>
|
||||
<section>EXTRACTION</section>
|
||||
<idParam>-1</idParam>
|
||||
<showDelay>true</showDelay>
|
||||
<priority>3</priority>
|
||||
</block>
|
||||
<block>
|
||||
<id>45</id>
|
||||
<label>MB_Mod_Attesa_Pirometro</label>
|
||||
<type>COOLING</type>
|
||||
<section>FORMING</section>
|
||||
<idParam>-1</idParam>
|
||||
<showDelay>false</showDelay>
|
||||
<priority>4</priority>
|
||||
</block>
|
||||
<block>
|
||||
<id>46</id>
|
||||
<label>MB_Mod_Prevuoto</label>
|
||||
<type>VACUUM</type>
|
||||
<section>HEATING</section>
|
||||
<idParam>-1</idParam>
|
||||
<showDelay>true</showDelay>
|
||||
<priority>6</priority>
|
||||
</block>
|
||||
<block>
|
||||
<id>47</id>
|
||||
<label>MB_Mod_SalitaAssistZ</label>
|
||||
<type>MOVEMENT</type>
|
||||
<section>EXTRACTION</section>
|
||||
<idParam>-1</idParam>
|
||||
<showDelay>false</showDelay>
|
||||
<priority>4</priority>
|
||||
</block>
|
||||
</modules>
|
||||
@@ -8,19 +8,11 @@
|
||||
<xs:complexType>
|
||||
<xs:all>
|
||||
<xs:element name="id" type="xs:int"/>
|
||||
<xs:element name="localizedLabels">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="lang" type="langType" minOccurs="0" maxOccurs="unbounded">
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
<xs:element name="label" type="xs:string" />
|
||||
<xs:element name="type" type="mblockType" />
|
||||
<xs:element name="section" type="mblockSection" />
|
||||
<xs:element name="idParam" type="xs:int" />
|
||||
<xs:element name="showDelay" type="xs:boolean" />
|
||||
<xs:element name="showStatus" type="xs:boolean" />
|
||||
<xs:element name="priority" type="xs:int" />
|
||||
</xs:all>
|
||||
</xs:complexType>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -15,6 +15,22 @@
|
||||
<xs:element name="description" type="xs:string" />
|
||||
<xs:element name="format" type="xs:string" />
|
||||
<xs:element name="scaleFactor" type="xs:int" default="1"/>
|
||||
<xs:element name="numDec" type="xs:int" default="0"/>
|
||||
<xs:element name="enumList" minOccurs="0">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="enumVal" minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:complexType>
|
||||
<xs:all>
|
||||
<xs:element name="label" type="xs:string" />
|
||||
<xs:element name="value" type="xs:string" />
|
||||
<xs:element name="anim" type="xs:string" minOccurs="0" />
|
||||
</xs:all>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:all>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
@@ -38,4 +54,5 @@
|
||||
<xs:enumeration value="Options"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
|
||||
</xs:schema>
|
||||
@@ -5,10 +5,10 @@
|
||||
<showNcHMI>false</showNcHMI>
|
||||
<ncIpAddress>192.168.0.102</ncIpAddress>
|
||||
<ncPort>102</ncPort>
|
||||
<machineModel>Ares 37 OF</machineModel>
|
||||
<machineModel>Thermo 2020</machineModel>
|
||||
<sharedPath>C:\PartPrg\</sharedPath>
|
||||
<sharedName>//PARTPRG:/</sharedName>
|
||||
<installationDate>01/01/2019</installationDate>
|
||||
<installationDate>01/06/2020</installationDate>
|
||||
<mgiOption>false</mgiOption>
|
||||
<siemensKeyboardOption>false</siemensKeyboardOption>
|
||||
<machineNumberHasLetters>false</machineNumberHasLetters>
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<gauges>
|
||||
<parameter>
|
||||
<category>LIVE</category>
|
||||
<name>timeAdv</name>
|
||||
<label>live_timeAdv</label>
|
||||
<um>s</um>
|
||||
<scaleFactor>1000</scaleFactor>
|
||||
<numDec>1</numDec>
|
||||
<minVal>0</minVal>
|
||||
<maxVal>3600000</maxVal>
|
||||
</parameter>
|
||||
<parameter>
|
||||
<category>GAUGE</category>
|
||||
<name>power</name>
|
||||
<label>gauge_potenza</label>
|
||||
<um>kWatt</um>
|
||||
<scaleFactor>1000</scaleFactor>
|
||||
<numDec>1</numDec>
|
||||
<minVal>0</minVal>
|
||||
<maxVal>2000000</maxVal>
|
||||
</parameter>
|
||||
<parameter>
|
||||
<category>GAUGE</category>
|
||||
<name>vacuum</name>
|
||||
<label>gauge_vuoto</label>
|
||||
<um>Bar</um>
|
||||
<scaleFactor>1000</scaleFactor>
|
||||
<numDec>2</numDec>
|
||||
<minVal>-1000</minVal>
|
||||
<maxVal>0</maxVal>
|
||||
</parameter>
|
||||
<parameter>
|
||||
<category>GAUGE</category>
|
||||
<name>air</name>
|
||||
<label>gauge_aria</label>
|
||||
<um>Bar</um>
|
||||
<scaleFactor>1000</scaleFactor>
|
||||
<numDec>2</numDec>
|
||||
<minVal>0</minVal>
|
||||
<maxVal>10000</maxVal>
|
||||
</parameter>
|
||||
</gauges>
|
||||
@@ -0,0 +1,33 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
||||
<xs:element name="gauges">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<!-- Heads -->
|
||||
<xs:element name="parameter" minOccurs="0" maxOccurs="unbounded">
|
||||
<xs:complexType>
|
||||
<xs:all>
|
||||
<xs:element name="category" type="param_type" />
|
||||
<xs:element name="name" type="xs:string" />
|
||||
<xs:element name="label" type="xs:string" />
|
||||
<xs:element name="um" type="xs:string" />
|
||||
<xs:element name="scaleFactor" type="xs:int" default="1"/>
|
||||
<xs:element name="numDec" type="xs:int" default="0"/>
|
||||
<xs:element name="minVal" type="xs:int" default="0"/>
|
||||
<xs:element name="maxVal" type="xs:int" default="1000"/>
|
||||
</xs:all>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
<!-- Head Type -->
|
||||
<xs:simpleType name="param_type" final="restriction">
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:enumeration value="GAUGE" />
|
||||
<xs:enumeration value="LIVE" />
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
|
||||
</xs:schema>
|
||||
@@ -56,13 +56,13 @@ namespace Thermo.Active.Config
|
||||
|
||||
|
||||
// Thermo
|
||||
public static List<ThermoProdConfigModel> ThermoProdConfig;
|
||||
public static List<RecipeConfigModel> RecipeConfig;
|
||||
public static List<ModBlockConfigModel> ModBlockConfig;
|
||||
public static List<RiskResistModel> RiskResistConfig;
|
||||
public static List<RiskChannelModel> RiskChannelConfig;
|
||||
public static List<RiskBoardModel> RiskBoardConfig;
|
||||
|
||||
public static LiveData RecipeLiveData = new LiveData();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -34,6 +34,7 @@ namespace Thermo.Active.Config
|
||||
ReadUserSoftKeysConfig();
|
||||
ReadAlarmsConfig();
|
||||
ReadHeadsConfig();
|
||||
ReadThermoProdConfig();
|
||||
ReadRecipeConfig();
|
||||
ReadModBlockConfig();
|
||||
ReadRiskConfig();
|
||||
@@ -57,28 +58,6 @@ namespace Thermo.Active.Config
|
||||
ExceptionManager.ManageError(ERROR_LEVEL.FATAL, message, true);
|
||||
}
|
||||
}
|
||||
public static void ReadLastRecipe()
|
||||
{
|
||||
try
|
||||
{
|
||||
ReadLiveData();
|
||||
}
|
||||
catch (XmlException ex)
|
||||
{
|
||||
ExceptionManager.ManageError(ERROR_LEVEL.FATAL,
|
||||
"Error while reading file: " + ex.SourceUri +
|
||||
"\n Error: " + ex.Message,
|
||||
true
|
||||
);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
var message = ex.Message;
|
||||
if (ex.InnerException != null)
|
||||
message += "\n" + ex.InnerException.Message;
|
||||
ExceptionManager.ManageError(ERROR_LEVEL.FATAL, message, true);
|
||||
}
|
||||
}
|
||||
|
||||
private static XDocument GetXmlHandlerWithValidator(string configSchemaFilePath, string configFilePath, bool isFullPath = false)
|
||||
{
|
||||
@@ -615,7 +594,38 @@ namespace Thermo.Active.Config
|
||||
Name = x.Element("name").Value,
|
||||
Description = x.Element("description").Value,
|
||||
Format = x.Element("format").Value,
|
||||
ScaleFactor = Convert.ToInt16(x.Element("scaleFactor").Value)
|
||||
ScaleFactor = Convert.ToInt16(x.Element("scaleFactor").Value),
|
||||
NumDec = Convert.ToInt16(x.Element("numDec").Value),
|
||||
//EnumVal = new Dictionary<string, string>()
|
||||
EnumVal = x.Element("enumList") != null ? x.Element("enumList").Elements().ToDictionary(
|
||||
y => y.Element("value").Value,
|
||||
y => new EnumDetail(y.Element("label").Value, y.Element("anim") != null ? y.Element("anim").Value : "")
|
||||
) : new Dictionary<string, EnumDetail>()
|
||||
})
|
||||
.ToList();
|
||||
}
|
||||
/// <summary>
|
||||
/// ThermoProd setup from file
|
||||
/// </summary>
|
||||
private static void ReadThermoProdConfig()
|
||||
{
|
||||
XDocument xmlConfigFile = GetXmlHandlerWithValidator(THERMO_PROD_SCHEMA_PATH, THERMO_PROD_PATH);
|
||||
|
||||
// Read Recipe config from XML file
|
||||
ThermoProdConfig = xmlConfigFile
|
||||
.Root
|
||||
.Elements()
|
||||
.Select(x => new ThermoProdConfigModel()
|
||||
{
|
||||
Category = GetTActProdCategory(x.Element("category").Value),
|
||||
Name = x.Element("name").Value,
|
||||
Label = x.Element("label").Value,
|
||||
UM = x.Element("um").Value,
|
||||
ScaleFactor = Convert.ToInt32(x.Element("scaleFactor").Value),
|
||||
NumDec = Convert.ToInt32(x.Element("numDec").Value),
|
||||
MinVal = Convert.ToInt32(x.Element("minVal").Value),
|
||||
MaxVal = Convert.ToInt32(x.Element("maxVal").Value),
|
||||
|
||||
})
|
||||
.ToList();
|
||||
}
|
||||
@@ -633,9 +643,10 @@ namespace Thermo.Active.Config
|
||||
.Select(x => new ModBlockConfigModel()
|
||||
{
|
||||
Id = Convert.ToInt16(x.Element("id").Value),
|
||||
LocalizedLabels = x.Element("localizedLabels").Elements().ToDictionary(
|
||||
y => y.Attribute("langKey").Value, y => y.Value
|
||||
),
|
||||
Label = x.Element("label").Value,
|
||||
//LocalizedLabels = x.Element("localizedLabels").Elements().ToDictionary(
|
||||
// y => y.Attribute("langKey").Value, y => y.Value
|
||||
// ),
|
||||
Type = GetTActMB_Type(x.Element("type").Value),
|
||||
Section = GetTActMB_Section(x.Element("section").Value),
|
||||
IdParam = Convert.ToInt16(x.Element("idParam").Value),
|
||||
@@ -846,180 +857,6 @@ namespace Thermo.Active.Config
|
||||
.Select(x => x.Value)
|
||||
.ToList();
|
||||
}
|
||||
/// <summary>
|
||||
/// Try to load live data from json persistence file
|
||||
/// </summary>
|
||||
public static bool ReadLiveData()
|
||||
{
|
||||
bool answ = false;
|
||||
if (File.Exists(LIVE_RECIPE_PATH))
|
||||
{
|
||||
// load all text data
|
||||
var rawData = File.ReadAllText(LIVE_RECIPE_PATH);
|
||||
try
|
||||
{
|
||||
// deserialize to object
|
||||
RecipeLiveData = JsonConvert.DeserializeObject<LiveData>(rawData);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
answ = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
// reload from template...
|
||||
var rawData = File.ReadAllText(RECIPE_TEMPLATE_PATH);
|
||||
try
|
||||
{
|
||||
// deserialize to object
|
||||
RecipeLiveData = JsonConvert.DeserializeObject<LiveData>(rawData);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
// salva current
|
||||
SaveRecipeCurrent();
|
||||
answ = true;
|
||||
}
|
||||
// rendo se fatto
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// Try to load selected recipe to live data (memory and json persistence file)
|
||||
/// </summary>
|
||||
public static bool LoadRecipe(string filePath)
|
||||
{
|
||||
bool answ = false;
|
||||
|
||||
// check file extension
|
||||
string fileName = Path.GetFileName(filePath);
|
||||
if (!fileName.EndsWith(".json"))
|
||||
{
|
||||
fileName += ".json";
|
||||
filePath += ".json";
|
||||
}
|
||||
|
||||
// check filePath...
|
||||
if (!filePath.Contains(RECIPE_DIRECTORY) && filePath != RECIPE_TEMPLATE_PATH)
|
||||
{
|
||||
// aggiungo base path!
|
||||
filePath = RECIPE_DIRECTORY + filePath;
|
||||
}
|
||||
if (File.Exists(filePath))
|
||||
{
|
||||
answ = true;
|
||||
|
||||
// load all text data
|
||||
var rawData = File.ReadAllText(filePath);
|
||||
try
|
||||
{
|
||||
// deserialize to object
|
||||
RecipeLiveData = JsonConvert.DeserializeObject<LiveData>(rawData);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
// update current live data!
|
||||
SaveRecipeCurrent();
|
||||
}
|
||||
// rendo se fatto
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// Try to load template recipe
|
||||
/// </summary>
|
||||
public static bool LoadTemplate()
|
||||
{
|
||||
bool answ = false;
|
||||
// check filePath...
|
||||
if (File.Exists(RECIPE_TEMPLATE_PATH))
|
||||
{
|
||||
answ = true;
|
||||
|
||||
// load all text data
|
||||
var rawData = File.ReadAllText(RECIPE_TEMPLATE_PATH);
|
||||
try
|
||||
{
|
||||
// deserialize to object
|
||||
RecipeLiveData = JsonConvert.DeserializeObject<LiveData>(rawData);
|
||||
// update NAME
|
||||
RecipeLiveData.RecipeName = $"{DateTime.Now:yyyyMMss_HHmmss}.json";
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
// update current live data!
|
||||
SaveRecipeCurrent();
|
||||
}
|
||||
// rendo se fatto
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// Try to write live data to json persistence file
|
||||
/// </summary>
|
||||
public static bool SaveRecipeCurrent()
|
||||
{
|
||||
bool answ = false;
|
||||
try
|
||||
{
|
||||
answ = true;
|
||||
// serialize
|
||||
string rawData = JsonConvert.SerializeObject(RecipeLiveData);
|
||||
// save live!
|
||||
var dir = Path.GetDirectoryName(LIVE_RECIPE_PATH);
|
||||
if (!Directory.Exists(dir))
|
||||
{
|
||||
Directory.CreateDirectory(dir);
|
||||
}
|
||||
File.WriteAllText(LIVE_RECIPE_PATH, rawData);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
// rendo se fatto
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// Try to save live recipe as NEW template
|
||||
/// </summary>
|
||||
public static bool SaveRecipeTemplate()
|
||||
{
|
||||
|
||||
RecipeLiveData.RecipeName = "template.json";
|
||||
return SaveRecipe(RECIPE_TEMPLATE_PATH);
|
||||
}
|
||||
/// <summary>
|
||||
/// Try to save live recipe to selected filePath
|
||||
/// </summary>
|
||||
public static bool SaveRecipe(string filePath)
|
||||
{
|
||||
bool answ = false;
|
||||
try
|
||||
{
|
||||
answ = true;
|
||||
string fileName = Path.GetFileName(filePath);
|
||||
if (!fileName.EndsWith(".json"))
|
||||
{
|
||||
fileName += ".json";
|
||||
filePath += ".json";
|
||||
}
|
||||
// fix name!
|
||||
RecipeLiveData.RecipeName = fileName;
|
||||
// serialize
|
||||
string rawData = JsonConvert.SerializeObject(RecipeLiveData);
|
||||
// save live!
|
||||
File.WriteAllText(LIVE_RECIPE_PATH, rawData);
|
||||
// check filePath...
|
||||
if (!filePath.Contains(RECIPE_DIRECTORY) && filePath != RECIPE_TEMPLATE_PATH)
|
||||
{
|
||||
// aggiungo base path!
|
||||
filePath = RECIPE_DIRECTORY + filePath;
|
||||
}
|
||||
// save!
|
||||
File.WriteAllText(filePath, rawData);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
// rendo se fatto
|
||||
return answ;
|
||||
}
|
||||
|
||||
public static string CalculateHash(string filename)
|
||||
{
|
||||
using (var sha = SHA1.Create())
|
||||
|
||||
@@ -55,10 +55,12 @@
|
||||
<SubType>Designer</SubType>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Compile Include="LiveData.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="ServerConfig.cs" />
|
||||
<Compile Include="ServerConfigController.cs" />
|
||||
<Content Include="Config\thermoProdConfig.xml">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Recipes\.placeholder.txt">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
@@ -91,6 +93,7 @@
|
||||
</Content>
|
||||
<EmbeddedResource Include="Config\userSoftKeyConfigValidator.xsd">
|
||||
<SubType>Designer</SubType>
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</EmbeddedResource>
|
||||
<Content Include="Config\areasConfig.xml">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
@@ -101,9 +104,11 @@
|
||||
</Content>
|
||||
<EmbeddedResource Include="Config\recipeConfigValidator.xsd">
|
||||
<SubType>Designer</SubType>
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Config\maintenancesConfigValidator.xsd">
|
||||
<SubType>Designer</SubType>
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</EmbeddedResource>
|
||||
<Content Include="Config\alarmsConfig.xml">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
@@ -118,12 +123,15 @@
|
||||
</Content>
|
||||
<EmbeddedResource Include="Config\serverConfigValidator.xsd">
|
||||
<SubType>Designer</SubType>
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Config\alarmsConfigValidator.xsd">
|
||||
<SubType>Designer</SubType>
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Config\ncSoftKeyConfigValidator.xsd">
|
||||
<SubType>Designer</SubType>
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
@@ -145,41 +153,49 @@
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Config\areasConfigValidator.xsd">
|
||||
<SubType>Designer</SubType>
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Config\macrosConfigValidator.xsd">
|
||||
<SubType>Designer</SubType>
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Config\scadaValidator.xsd">
|
||||
<SubType>Designer</SubType>
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Config\cmsConnectConfigValidator.xsd">
|
||||
<SubType>Designer</SubType>
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Config\customerContactConfigValidator.xsd">
|
||||
<SubType>Designer</SubType>
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Config\headsConfigValidator.xsd">
|
||||
<SubType>Designer</SubType>
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Config\moduleBlockConfigValidator.xsd">
|
||||
<SubType>Designer</SubType>
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Config\risk2007Validator.xsd">
|
||||
<SubType>Designer</SubType>
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
@@ -187,6 +203,10 @@
|
||||
<Content Include="Config\Recipes\template.json">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<EmbeddedResource Include="Config\thermoProdConfigValidator.xsd">
|
||||
<SubType>Designer</SubType>
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</EmbeddedResource>
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
|
||||
@@ -16,6 +16,7 @@ using Thermo.Active.Model.DTOModels;
|
||||
using Thermo.Active.Model.DTOModels.AlarmModels;
|
||||
using Thermo.Active.Model.DTOModels.Scada;
|
||||
using Thermo.Active.Model.DTOModels.ThModules;
|
||||
using Thermo.Active.Model.DTOModels.ThProd;
|
||||
using Thermo.Active.Model.DTOModels.ThRecipe;
|
||||
using Thermo.Active.Model.DTOModels.ThWarmers;
|
||||
using Thermo.Active.NC;
|
||||
@@ -656,11 +657,11 @@ public static class ThreadsFunctions
|
||||
{
|
||||
|
||||
// Get new data from PLC
|
||||
libraryError = ncAdapter.ReadGaugeData(out ThermoModels.GaugeModel gaugeData);
|
||||
libraryError = ncAdapter.ReadGaugeData(out Dictionary<string, DTOThermoProd> currentLiveProd);
|
||||
if (libraryError.IsError())
|
||||
ManageLibraryError(libraryError);
|
||||
|
||||
MessageServices.Current.Publish(SEND_THERMO_GAUGE_DATA, null, gaugeData);
|
||||
MessageServices.Current.Publish(SEND_THERMO_GAUGE_DATA, null, currentLiveProd);
|
||||
}
|
||||
else
|
||||
RestoreConnection();
|
||||
@@ -792,6 +793,16 @@ public static class ThreadsFunctions
|
||||
ManageLibraryError(libraryError);
|
||||
|
||||
MessageServices.Current.Publish(SEND_THERMO_RECIPE_FULL, null, currRecipe);
|
||||
|
||||
// FIXME TODO verificare come ridurre chiamate
|
||||
|
||||
// ora gestisco la overview!
|
||||
libraryError = ncAdapter.GetRecipeOverview(out Dictionary<RecipeSection, RecipeCatStatus> currOverview);
|
||||
if (libraryError.IsError())
|
||||
ManageLibraryError(libraryError);
|
||||
|
||||
MessageServices.Current.Publish(SEND_THERMO_RECIPE_OVERWIEW, null, currOverview);
|
||||
|
||||
}
|
||||
else
|
||||
RestoreConnection();
|
||||
|
||||
@@ -6,7 +6,7 @@ namespace Thermo.Active.Model.ConfigModels
|
||||
public class ModBlockConfigModel
|
||||
{
|
||||
public int Id;
|
||||
public Dictionary<string, string> LocalizedLabels { get; set; }
|
||||
public string Label { get; set; }
|
||||
public TACT_MBLOCK_TYPE Type { get; set; }
|
||||
public TACT_MBLOCK_SECTION Section { get; set; }
|
||||
public int IdParam { get; set; }
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using static Thermo.Active.Model.Constants;
|
||||
using System.Collections.Generic;
|
||||
using static Thermo.Active.Model.Constants;
|
||||
|
||||
namespace Thermo.Active.Model.ConfigModels
|
||||
{
|
||||
@@ -12,5 +13,38 @@ namespace Thermo.Active.Model.ConfigModels
|
||||
public string Description { get; set; }
|
||||
public string Format { get; set; }
|
||||
public int ScaleFactor { get; set; }
|
||||
public int NumDec { get; set; }
|
||||
public Dictionary<string, EnumDetail> EnumVal { get; set; }
|
||||
public string Anim { get; set; }
|
||||
}
|
||||
|
||||
public class EnumDetail
|
||||
{
|
||||
public string text { get; set; } = "";
|
||||
public string anim { get; set; } = "";
|
||||
|
||||
public EnumDetail(string text, string anim)
|
||||
{
|
||||
this.text = text;
|
||||
this.anim = anim;
|
||||
}
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
if (!(obj is EnumDetail item))
|
||||
return false;
|
||||
|
||||
if (text != item.text)
|
||||
return false;
|
||||
if (anim != item.anim)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return base.GetHashCode();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
using System.Collections.Generic;
|
||||
using static Thermo.Active.Model.Constants;
|
||||
|
||||
namespace Thermo.Active.Model.ConfigModels
|
||||
{
|
||||
public class ThermoProdConfigModel
|
||||
{
|
||||
public TACT_PROD_CATEGORY Category { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string Label { get; set; }
|
||||
public string UM { get; set; }
|
||||
public int ScaleFactor { get; set; }
|
||||
public int NumDec { get; set; }
|
||||
public int MinVal { get; set; }
|
||||
public int MaxVal { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,6 @@
|
||||
using System.IO;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
|
||||
namespace Thermo.Active.Model
|
||||
@@ -101,6 +103,13 @@ namespace Thermo.Active.Model
|
||||
EXTRACTION
|
||||
}
|
||||
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public enum TACT_PROD_CATEGORY
|
||||
{
|
||||
ND = 0,
|
||||
GAUGE
|
||||
}
|
||||
|
||||
public enum TACT_MBLOCK_SECTION
|
||||
{
|
||||
ND = 0,
|
||||
@@ -236,6 +245,11 @@ namespace Thermo.Active.Model
|
||||
public const string HEADS_CONFIG_SCHEMA_PATH = RESOURCE_DIRECTORY + "headsConfigValidator.xsd";
|
||||
public const string HEADS_CONFIG_PATH = CONFIG_DIRECTORY + "headsConfig.xml";
|
||||
|
||||
// THERMO SPEC
|
||||
|
||||
public const string THERMO_PROD_SCHEMA_PATH = RESOURCE_DIRECTORY + "thermoProdConfigValidator.xsd";
|
||||
public const string THERMO_PROD_PATH = CONFIG_DIRECTORY + "thermoProdConfig.xml";
|
||||
|
||||
public const string RECIPE_CONFIG_SCHEMA_PATH = RESOURCE_DIRECTORY + "recipeConfigValidator.xsd";
|
||||
public const string RECIPE_CONFIG_PATH = CONFIG_DIRECTORY + "recipeConfig.xml";
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
namespace Thermo.Active.Model.DTOModels
|
||||
{
|
||||
public class DTOGaugeDataModel : GaugeModel
|
||||
public class DTOGaugeDataModel : LiveProdDataModel
|
||||
{
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
public string Label;
|
||||
public BlockType Type;
|
||||
public BlockSection Section;
|
||||
public int IdMainParam = -1; // -1 = non visibile
|
||||
public int IdMainParam = -1; // -1 = non visibile la parte a DX
|
||||
public bool DelayVisible;
|
||||
public int VisualPriority;
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace Thermo.Active.Model.DTOModels.ThModules
|
||||
public class DTOModulesBlock
|
||||
{
|
||||
public int Id { get; set; } = 0;
|
||||
public string LocalizedLabel { get; set; } = "";
|
||||
public string Label { get; set; } = "";
|
||||
public TACT_MBLOCK_TYPE Type { get; set; } = TACT_MBLOCK_TYPE.ND;
|
||||
public TACT_MBLOCK_SECTION Section { get; set; } = TACT_MBLOCK_SECTION.ND;
|
||||
public int IdParam { get; set; } = 0;
|
||||
@@ -30,7 +30,7 @@ namespace Thermo.Active.Model.DTOModels.ThModules
|
||||
|
||||
if (Id != item.Id)
|
||||
return false;
|
||||
if (LocalizedLabel != item.LocalizedLabel)
|
||||
if (Label != item.Label)
|
||||
return false;
|
||||
if (Type != item.Type)
|
||||
return false;
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
namespace Thermo.Active.Model.DTOModels.ThProd
|
||||
using System;
|
||||
|
||||
namespace Thermo.Active.Model.DTOModels.ThProd
|
||||
{
|
||||
|
||||
public enum Status
|
||||
@@ -29,4 +31,5 @@
|
||||
public class DTOProdCycle
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
using System;
|
||||
using static Thermo.Active.Model.Constants;
|
||||
|
||||
namespace Thermo.Active.Model.DTOModels.ThProd
|
||||
{
|
||||
public class DTOThermoProd
|
||||
{
|
||||
public TACT_PROD_CATEGORY Category { get; set; } = TACT_PROD_CATEGORY.ND;
|
||||
public double Value { get; set; } = 0;
|
||||
public string Name { get; set; } = "";
|
||||
public string Label { get; set; } = "";
|
||||
public string UM { get; set; } = "";
|
||||
public int ScaleFactor { get; set; } = 1;
|
||||
public int NumDec { get; set; } = 0;
|
||||
public int MinVal { get; set; } = 0;
|
||||
public int MaxVal { get; set; } = 100;
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
if (!(obj is DTOThermoProd item))
|
||||
return false;
|
||||
|
||||
if (!Category.Equals(item.Category))
|
||||
return false;
|
||||
if (Value != item.Value)
|
||||
return false;
|
||||
if (Name != item.Name)
|
||||
return false;
|
||||
if (Label != item.Label)
|
||||
return false;
|
||||
if (!UM.Equals(item.UM))
|
||||
return false;
|
||||
if (ScaleFactor != item.ScaleFactor)
|
||||
return false;
|
||||
if (NumDec != item.NumDec)
|
||||
return false;
|
||||
if (MinVal != item.MinVal)
|
||||
return false;
|
||||
if (MaxVal != item.MaxVal)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return base.GetHashCode();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,4 +1,7 @@
|
||||
namespace Thermo.Active.Model.DTOModels.ThRecipe
|
||||
using System.Collections.Generic;
|
||||
using Thermo.Active.Model.ConfigModels;
|
||||
|
||||
namespace Thermo.Active.Model.DTOModels.ThRecipe
|
||||
{
|
||||
public class DTORecipeConfigModel
|
||||
{
|
||||
@@ -11,5 +14,7 @@
|
||||
public string Format;
|
||||
public string Label;
|
||||
public int ScaleFactor;
|
||||
public int NumDec;
|
||||
public Dictionary<string, EnumDetail> EnumVal { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -11,4 +11,20 @@ namespace Thermo.Active.Model.DTOModels.ThRecipe
|
||||
ChangedOk,
|
||||
HasError
|
||||
}
|
||||
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public enum RecipeSection
|
||||
{
|
||||
General = 1,
|
||||
Positions,
|
||||
Cycle,
|
||||
Heats,
|
||||
Pyrometer,
|
||||
Drawing,
|
||||
UpperPlate,
|
||||
Cooling,
|
||||
Vacuum,
|
||||
Extraction,
|
||||
Options
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
namespace Thermo.Active.Model.DTOModels.ThRecipe
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Thermo.Active.Model.ConfigModels;
|
||||
|
||||
namespace Thermo.Active.Model.DTOModels.ThRecipe
|
||||
{
|
||||
public class DTORecipeParam
|
||||
{
|
||||
@@ -10,6 +14,8 @@
|
||||
public string UnitMeasure { get; set; }
|
||||
public double ValueAct { get; set; }
|
||||
public int ScaleFactor { get; set; }
|
||||
public int NumDec { get; set; }
|
||||
public Dictionary<string, EnumDetail> EnumVal { get; set; }
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
@@ -32,6 +38,10 @@
|
||||
return false;
|
||||
if (ScaleFactor != item.ScaleFactor)
|
||||
return false;
|
||||
if (NumDec != item.NumDec)
|
||||
return false;
|
||||
if (!EnumVal.SequenceEqual(item.EnumVal))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
+7
-2
@@ -1,6 +1,6 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Thermo.Active.Config
|
||||
namespace Thermo.Active.Model.DTOModels.ThRecipe
|
||||
{
|
||||
/// <summary>
|
||||
/// Live data for Thermo Active
|
||||
@@ -19,6 +19,11 @@ namespace Thermo.Active.Config
|
||||
/// Dictionary of all channels and relative setpoints
|
||||
/// </summary>
|
||||
public Dictionary<int, int> ChannelSetpoints;
|
||||
|
||||
/// <summary>
|
||||
/// Recipe Overview
|
||||
/// </summary>
|
||||
public Dictionary<RecipeSection, RecipeCatStatus> RecipeOverview;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -63,6 +63,7 @@
|
||||
<Compile Include="ConfigModels\AlarmsConfigModel.cs" />
|
||||
<Compile Include="ConfigModels\CmsConnectConfigModel.cs" />
|
||||
<Compile Include="ConfigModels\ExtSoftwareModel.cs" />
|
||||
<Compile Include="ConfigModels\ThermoProdConfigModel.cs" />
|
||||
<Compile Include="ConfigModels\ModBlockConfigModel.cs" />
|
||||
<Compile Include="ConfigModels\RiskConfigModel.cs" />
|
||||
<Compile Include="ConfigModels\RecipeConfigModel.cs" />
|
||||
@@ -108,6 +109,8 @@
|
||||
<Compile Include="DTOModels\ThModules\DTOModule.cs" />
|
||||
<Compile Include="DTOModels\ThModules\DTOModuleConfigModel.cs" />
|
||||
<Compile Include="DTOModels\ThModules\DTOModulesBlock.cs" />
|
||||
<Compile Include="DTOModels\ThProd\DTOThermoProd.cs" />
|
||||
<Compile Include="DTOModels\ThRecipe\LiveData.cs" />
|
||||
<Compile Include="DTOModels\ThWarmers\DTOWarmers.cs" />
|
||||
<Compile Include="DTOModels\ThRecipe\DTORecipeParam.cs" />
|
||||
<Compile Include="DTOModels\ThRecipe\DTORecipeConfigModel .cs" />
|
||||
|
||||
+227
-60
@@ -12,6 +12,7 @@ using Thermo.Active.Model.DTOModels.AlarmModels;
|
||||
using Thermo.Active.Model.DTOModels.MaintenanceModels;
|
||||
using Thermo.Active.Model.DTOModels.Scada;
|
||||
using Thermo.Active.Model.DTOModels.ThModules;
|
||||
using Thermo.Active.Model.DTOModels.ThProd;
|
||||
using Thermo.Active.Model.DTOModels.ThRecipe;
|
||||
using Thermo.Active.Model.DTOModels.ThWarmers;
|
||||
using Thermo.Active.Utils;
|
||||
@@ -23,12 +24,30 @@ namespace Thermo.Active.NC
|
||||
{
|
||||
public class NcAdapter : IDisposable
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// NC object
|
||||
/// </summary>
|
||||
public NcThermo numericalControl;
|
||||
/// <summary>
|
||||
/// Lock per connessione PLC
|
||||
/// Lock semaphore for PLC connection step
|
||||
/// </summary>
|
||||
private readonly static object connectLock = new object();
|
||||
/// <summary>
|
||||
/// Avvio prod lotto
|
||||
/// </summary>
|
||||
public DateTime lottoStart;
|
||||
/// <summary>
|
||||
/// Ultimo avvio prod pz
|
||||
/// </summary>
|
||||
protected DateTime lastProdStart;
|
||||
/// <summary>
|
||||
/// Ultima fine prod pz
|
||||
/// </summary>
|
||||
protected DateTime lastProdEnd;
|
||||
/// <summary>
|
||||
/// Ultimo ciclo registrato(secondi)
|
||||
/// </summary>
|
||||
protected double lastCycle = 9999;
|
||||
|
||||
public NcAdapter() =>
|
||||
// Choose NC
|
||||
@@ -147,6 +166,48 @@ namespace Thermo.Active.NC
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
private static bool ThermoProdStartStr
|
||||
{
|
||||
get
|
||||
{
|
||||
bool answ = false;
|
||||
if (statusCmd != null)
|
||||
{
|
||||
if (statusCmd.Count > 0)
|
||||
{
|
||||
try
|
||||
{
|
||||
answ = checkBitOnWord(statusCmd[0], 10);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
}
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
private static bool ThermoProdEndStr
|
||||
{
|
||||
get
|
||||
{
|
||||
bool answ = false;
|
||||
if (statusCmd != null)
|
||||
{
|
||||
if (statusCmd.Count > 0)
|
||||
{
|
||||
try
|
||||
{
|
||||
answ = checkBitOnWord(statusCmd[0], 11);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
}
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -279,12 +340,12 @@ namespace Thermo.Active.NC
|
||||
public CmsError ManageConfRequest()
|
||||
{
|
||||
CmsError libraryError = NO_ERROR;
|
||||
if (RecipeLiveData != null)
|
||||
if (NcFileAdapter.RecipeLiveData != null)
|
||||
{
|
||||
// controllo SE HO richieste di configurazione
|
||||
if (ThermoReqConfWarmerStr)
|
||||
{
|
||||
if (RecipeLiveData.ChannelSetpoints != null)
|
||||
if (NcFileAdapter.RecipeLiveData.ChannelSetpoints != null)
|
||||
{
|
||||
// se si in questo caso scrivo configurazione...
|
||||
WriteRecipeWarmConfig();
|
||||
@@ -294,7 +355,7 @@ namespace Thermo.Active.NC
|
||||
}
|
||||
if (ThermoReqConfRecipeStr)
|
||||
{
|
||||
if (RecipeLiveData.RecipeParameters != null)
|
||||
if (NcFileAdapter.RecipeLiveData.RecipeParameters != null)
|
||||
{
|
||||
// copy data to PLC
|
||||
libraryError = ReadFullRecipe(out Dictionary<string, DTORecipeParam> prevRecipe);
|
||||
@@ -302,7 +363,7 @@ namespace Thermo.Active.NC
|
||||
return libraryError;
|
||||
// save parameters to PLC!!!
|
||||
Dictionary<string, DTORecipeParam> updtRecipe = new Dictionary<string, DTORecipeParam>();
|
||||
foreach (var item in RecipeLiveData.RecipeParameters)
|
||||
foreach (var item in NcFileAdapter.RecipeLiveData.RecipeParameters)
|
||||
{
|
||||
if (prevRecipe.ContainsKey(item.Key))
|
||||
{
|
||||
@@ -321,6 +382,13 @@ namespace Thermo.Active.NC
|
||||
WriteRecipeParams(updtRecipe);
|
||||
// Ack !
|
||||
libraryError = numericalControl.PLC_WAckConfRecipeRequest();
|
||||
if (libraryError.IsError())
|
||||
return libraryError;
|
||||
|
||||
// do conferma come se avessi appena approvata ricetta...
|
||||
libraryError = ConfirmRecipeData(true);
|
||||
if (libraryError.IsError())
|
||||
return libraryError;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1143,10 +1211,70 @@ namespace Thermo.Active.NC
|
||||
return NO_ERROR;
|
||||
}
|
||||
|
||||
public CmsError ReadGaugeData(out ThermoModels.GaugeModel gaugeData)
|
||||
public CmsError ReadGaugeData(out Dictionary<string, DTOThermoProd> currentLiveProd)
|
||||
{
|
||||
gaugeData = new ThermoModels.GaugeModel();
|
||||
CmsError libraryError = numericalControl.PLC_RGaugeData(ref gaugeData);
|
||||
// preparo oggetti OUT
|
||||
ThermoModels.LiveProdDataModel gaugeData = new ThermoModels.LiveProdDataModel();
|
||||
currentLiveProd = new Dictionary<string, DTOThermoProd>();
|
||||
DTOThermoProd currProdData = new DTOThermoProd();
|
||||
double valore = 0;
|
||||
CmsError libraryError = NO_ERROR;
|
||||
|
||||
if (NcConfig.NcVendor == NC_VENDOR.S7NET)
|
||||
{
|
||||
// leggo dal PLC
|
||||
libraryError = numericalControl.PLC_RGaugeData(ref gaugeData);
|
||||
if (libraryError.IsError())
|
||||
return libraryError;
|
||||
|
||||
// dictionary da config...
|
||||
foreach (var item in ThermoProdConfig)
|
||||
{
|
||||
// a secondo del valore cerco uno di quelli rilevati dal PLC...
|
||||
switch (item.Name)
|
||||
{
|
||||
case "air":
|
||||
valore = gaugeData.Air;
|
||||
break;
|
||||
case "vacuum":
|
||||
valore = gaugeData.Vacuum;
|
||||
break;
|
||||
case "power":
|
||||
valore = gaugeData.Power;
|
||||
break;
|
||||
case "timeAdv":
|
||||
valore = gaugeData.TimeAdv;
|
||||
break;
|
||||
default:
|
||||
valore = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
// creo obj contenuto
|
||||
currProdData = new DTOThermoProd()
|
||||
{
|
||||
Category = item.Category,
|
||||
Name = item.Name,
|
||||
Label = item.Label,
|
||||
UM = item.UM,
|
||||
Value = valore / item.ScaleFactor,
|
||||
ScaleFactor = item.ScaleFactor,
|
||||
NumDec = item.NumDec,
|
||||
MinVal = item.MinVal / item.ScaleFactor,
|
||||
MaxVal = item.MaxVal / item.ScaleFactor
|
||||
};
|
||||
// aggiungo a dictionary!
|
||||
if (currentLiveProd.ContainsKey(item.Name))
|
||||
{
|
||||
currentLiveProd[item.Name] = currProdData;
|
||||
}
|
||||
else
|
||||
{
|
||||
currentLiveProd.Add(item.Name, currProdData);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return libraryError;
|
||||
}
|
||||
@@ -1177,6 +1305,8 @@ namespace Thermo.Active.NC
|
||||
|
||||
// manage strobe/ack!
|
||||
libraryError = numericalControl.PLC_WAckProdUpdate();
|
||||
if (libraryError.IsError())
|
||||
return libraryError;
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -1184,6 +1314,37 @@ namespace Thermo.Active.NC
|
||||
prodInfoData = lastProdInfoData;
|
||||
}
|
||||
|
||||
// ora controllo inizio/fine produzione
|
||||
if (ThermoProdStartStr)
|
||||
{
|
||||
lastProdStart = DateTime.Now;
|
||||
// manage strobe/ack!
|
||||
libraryError = numericalControl.PLC_WAckPzProdStart();
|
||||
if (libraryError.IsError())
|
||||
return libraryError;
|
||||
}
|
||||
else if (ThermoProdEndStr)
|
||||
{
|
||||
lastProdEnd = DateTime.Now;
|
||||
// calcolo ultimo ciclo...
|
||||
var lastDuration = lastProdEnd.Subtract(lastProdStart).TotalSeconds;
|
||||
// se il prec è > 3 cicli uso SOLO ultimo
|
||||
if (lastCycle > 3 * lastDuration)
|
||||
{
|
||||
lastCycle = lastDuration;
|
||||
}
|
||||
// altrimenti ewma 50%
|
||||
else
|
||||
{
|
||||
lastCycle = 0.5 * lastCycle + 0.5 * lastDuration;
|
||||
}
|
||||
|
||||
// manage strobe/ack!
|
||||
libraryError = numericalControl.PLC_WAckPzProdEnd();
|
||||
if (libraryError.IsError())
|
||||
return libraryError;
|
||||
}
|
||||
|
||||
return libraryError;
|
||||
}
|
||||
/// <summary>
|
||||
@@ -1266,15 +1427,20 @@ namespace Thermo.Active.NC
|
||||
/// <returns></returns>
|
||||
public CmsError ReadRecipeData(bool refreshOnlyRT, bool useLastRead, out Dictionary<string, DTORecipeParam> currentRecipe)
|
||||
{
|
||||
// per sicurezza: SE NON HO una last recipe -_> leggo cmq tutto!
|
||||
if (lastRecipe == null || lastRecipe.Count == 0)
|
||||
{
|
||||
refreshOnlyRT = false;
|
||||
}
|
||||
// init obj
|
||||
currentRecipe = new Dictionary<string, DTORecipeParam>();
|
||||
RPRange currRange = new RPRange();
|
||||
RPStatus currStatus = new RPStatus();
|
||||
CmsError libraryError = NO_ERROR;
|
||||
// solo x S7...
|
||||
if (NcConfig.NcVendor == NC_VENDOR.S7NET)
|
||||
{
|
||||
Dictionary<int, ThermoModels.RecipeParam> currPlcRecipe = new Dictionary<int, ThermoModels.RecipeParam>();
|
||||
CmsError libraryError = NO_ERROR;
|
||||
if (useLastRead && lastRecipe.Count > 0)
|
||||
{
|
||||
currentRecipe = lastRecipe;
|
||||
@@ -1287,8 +1453,6 @@ namespace Thermo.Active.NC
|
||||
return libraryError;
|
||||
}
|
||||
|
||||
if (libraryError.IsError())
|
||||
return libraryError;
|
||||
|
||||
DTORecipeParam currParam = new DTORecipeParam();
|
||||
// leggo l'intero array delle DB... QUI FAKE sulle DB configurate...
|
||||
@@ -1296,13 +1460,15 @@ namespace Thermo.Active.NC
|
||||
{
|
||||
Id = x.Id,
|
||||
ScaleFactor = x.ScaleFactor,
|
||||
NumDec = x.NumDec,
|
||||
Category = x.Category.ToString(),
|
||||
SubCategory_1 = x.SubCategory_1,
|
||||
SubCategory_2 = x.SubCategory_2,
|
||||
Name = x.Name,
|
||||
Description = x.Description,
|
||||
Format = x.Format,
|
||||
Label = $"{x.Category}_{x.SubCategory_1}_{x.SubCategory_2}_{x.Name}".Replace("__", "_").Replace("__", "_").ToLower()
|
||||
Label = $"{x.Category}_{x.SubCategory_1}_{x.SubCategory_2}_{x.Name}".Replace("__", "_").Replace("__", "_").ToLower(),
|
||||
EnumVal = x.EnumVal
|
||||
}).ToList();
|
||||
|
||||
foreach (var item in recipeConfig)
|
||||
@@ -1316,24 +1482,12 @@ namespace Thermo.Active.NC
|
||||
Min = paramPLC.ValMin / item.ScaleFactor,
|
||||
Max = paramPLC.ValMax / item.ScaleFactor
|
||||
};
|
||||
|
||||
// FIXME TODO impostato a true x testing
|
||||
#if true
|
||||
currStatus = new RPStatus()
|
||||
{
|
||||
Visible = true,
|
||||
Enabled = true,
|
||||
HasError = false
|
||||
};
|
||||
|
||||
#else
|
||||
currStatus = new RPStatus()
|
||||
{
|
||||
Visible = paramPLC.Visible,
|
||||
Enabled = paramPLC.Enabled,
|
||||
HasError = paramPLC.HasError
|
||||
};
|
||||
#endif
|
||||
// calcolo intero oggetto
|
||||
currParam = new DTORecipeParam()
|
||||
{
|
||||
@@ -1344,7 +1498,9 @@ namespace Thermo.Active.NC
|
||||
ValueAct = paramPLC.ValueAct / item.ScaleFactor,
|
||||
SetpointHMI = paramPLC.SetpointHMI / item.ScaleFactor,
|
||||
SetpointPLC = paramPLC.SetpointPLC / item.ScaleFactor,
|
||||
ScaleFactor = item.ScaleFactor
|
||||
ScaleFactor = item.ScaleFactor,
|
||||
NumDec = item.NumDec,
|
||||
EnumVal = item.EnumVal
|
||||
};
|
||||
}
|
||||
else
|
||||
@@ -1356,8 +1512,8 @@ namespace Thermo.Active.NC
|
||||
};
|
||||
currStatus = new RPStatus()
|
||||
{
|
||||
Visible = false,
|
||||
Enabled = false,
|
||||
Visible = true,
|
||||
Enabled = true,
|
||||
HasError = false
|
||||
};
|
||||
// calcolo intero oggetto
|
||||
@@ -1368,7 +1524,9 @@ namespace Thermo.Active.NC
|
||||
Status = currStatus,
|
||||
UnitMeasure = "",
|
||||
ValueAct = 0,
|
||||
ScaleFactor = 1
|
||||
ScaleFactor = 1,
|
||||
NumDec = 0,
|
||||
EnumVal = new Dictionary<string, Model.ConfigModels.EnumDetail>()
|
||||
};
|
||||
}
|
||||
currentRecipe.Add(item.Label, currParam);
|
||||
@@ -1886,12 +2044,13 @@ namespace Thermo.Active.NC
|
||||
/// </summary>
|
||||
/// <param name="currOverview">Oggetto overview ricetta corrente HMI</param>
|
||||
/// <returns></returns>
|
||||
public CmsError GetRecipeOverview(out Dictionary<string, RecipeCatStatus> currOverview)
|
||||
public CmsError GetRecipeOverview(out Dictionary<RecipeSection, RecipeCatStatus> currOverview)
|
||||
{
|
||||
CmsError libraryError = NO_ERROR;
|
||||
currOverview = new Dictionary<string, RecipeCatStatus>();
|
||||
// overview di base: ultima salvata...
|
||||
currOverview = new Dictionary<RecipeSection, RecipeCatStatus>();
|
||||
|
||||
// leggo la ricetta!
|
||||
// leggo la ricetta dal PLC!
|
||||
var currRecipe = new Dictionary<string, DTORecipeParam>();
|
||||
libraryError = ReadFullRecipe(out currRecipe);
|
||||
if (libraryError.IsError())
|
||||
@@ -1902,26 +2061,44 @@ namespace Thermo.Active.NC
|
||||
{
|
||||
Id = x.Id,
|
||||
ScaleFactor = x.ScaleFactor,
|
||||
NumDec = x.NumDec,
|
||||
Category = x.Category.ToString(),
|
||||
SubCategory_1 = x.SubCategory_1,
|
||||
SubCategory_2 = x.SubCategory_2,
|
||||
Name = x.Name,
|
||||
Description = x.Description,
|
||||
Format = x.Format,
|
||||
Label = $"{x.Category}_{x.SubCategory_1}_{x.SubCategory_2}_{x.Name}".Replace("__", "_").Replace("__", "_").ToLower()
|
||||
Label = $"{x.Category}_{x.SubCategory_1}_{x.SubCategory_2}_{x.Name}".Replace("__", "_").Replace("__", "_").ToLower(),
|
||||
EnumVal = x.EnumVal
|
||||
}).ToList();
|
||||
|
||||
RecipeCatStatus currStatus = RecipeCatStatus.Unchanged;
|
||||
|
||||
// percorro conf ricetta...
|
||||
// da conf ricetta --> se ci sono li leggo da li...
|
||||
if (NcFileAdapter.RecipeLiveData.RecipeOverview != null)
|
||||
{
|
||||
currOverview = NcFileAdapter.RecipeLiveData.RecipeOverview;
|
||||
}
|
||||
|
||||
bool changed = false;
|
||||
foreach (var item in recipeConfig)
|
||||
{
|
||||
currStatus = RecipeCatStatus.Unchanged;
|
||||
// cerco SE ci sia già uno status...
|
||||
if (currOverview.ContainsKey(item.Category))
|
||||
if (!currOverview.ContainsKey(getRecipeSection(item.Category)))
|
||||
{
|
||||
currStatus = currOverview[item.Category];
|
||||
currOverview.Add(getRecipeSection(item.Category), RecipeCatStatus.Unchanged);
|
||||
changed = true;
|
||||
}
|
||||
}
|
||||
// se cambiato --> salvo in live data...
|
||||
if (changed)
|
||||
{
|
||||
NcFileAdapter.RecipeLiveData.RecipeOverview = currOverview;
|
||||
}
|
||||
|
||||
// ORA percorro conf ricetta x cercare eventuali ERRORI......
|
||||
foreach (var item in recipeConfig)
|
||||
{
|
||||
currStatus = currOverview[getRecipeSection(item.Category)];
|
||||
|
||||
// se lo stato è errore --> esco...
|
||||
if (currStatus == RecipeCatStatus.HasError)
|
||||
@@ -1934,35 +2111,25 @@ namespace Thermo.Active.NC
|
||||
// se in errore --> registro...
|
||||
if (currRecipe[item.Label].Status.HasError)
|
||||
{
|
||||
currStatus = RecipeCatStatus.HasError;
|
||||
currOverview[getRecipeSection(item.Category)] = RecipeCatStatus.HasError;
|
||||
}
|
||||
// FARE verificare il significato di questo changed (se è da file o da HMI/PLC)
|
||||
else if (currRecipe[item.Label].SetpointHMI != currRecipe[item.Label].SetpointPLC)
|
||||
{
|
||||
currStatus = RecipeCatStatus.ChangedOk;
|
||||
}
|
||||
else
|
||||
{
|
||||
currStatus = RecipeCatStatus.Unchanged;
|
||||
}
|
||||
}
|
||||
|
||||
// ora verifico overview finale: se non c'è aggiungo
|
||||
if (!currOverview.ContainsKey(item.Category))
|
||||
{
|
||||
currOverview.Add(item.Category, currStatus);
|
||||
}
|
||||
else
|
||||
{
|
||||
// se il valore è maggiore --> aggiorno
|
||||
currOverview[item.Category] = (int)currStatus > (int)currOverview[item.Category] ? currStatus : currOverview[item.Category];
|
||||
}
|
||||
}
|
||||
|
||||
// restituisco cod errore se trovato
|
||||
return libraryError;
|
||||
}
|
||||
/// <summary>
|
||||
/// Conversione stringa --> enum
|
||||
/// </summary>
|
||||
/// <param name="strVal"></param>
|
||||
/// <returns></returns>
|
||||
protected RecipeSection getRecipeSection(string strVal)
|
||||
{
|
||||
RecipeSection answ = (RecipeSection)Enum.Parse(typeof(RecipeSection), strVal, true);
|
||||
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// Legge tutti i parametri della ricetta
|
||||
/// </summary>
|
||||
@@ -2003,7 +2170,7 @@ namespace Thermo.Active.NC
|
||||
currVal = new DTOModulesBlock()
|
||||
{
|
||||
Id = item.Id,
|
||||
LocalizedLabel = item.LocalizedLabels["it"], // FIXME TODO check come gestire traduzione!!!
|
||||
Label = item.Label,
|
||||
Type = item.Type,
|
||||
Section = item.Section,
|
||||
IdParam = item.IdParam,
|
||||
|
||||
@@ -11,11 +11,20 @@ using static CMS_CORE_Library.Models.DataStructures;
|
||||
using static Thermo.Active.Config.ServerConfig;
|
||||
using static Thermo.Active.Database.Controllers.QueueController;
|
||||
using static Thermo.Active.Model.Constants;
|
||||
using Newtonsoft.Json;
|
||||
using System.Xml;
|
||||
using Thermo.Active.Model.DTOModels.ThRecipe;
|
||||
|
||||
namespace Thermo.Active.NC
|
||||
{
|
||||
public class NcFileAdapter : NcAdapter
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Recipe Live data
|
||||
/// </summary>
|
||||
public static LiveData RecipeLiveData = new LiveData();
|
||||
|
||||
/// <summary>
|
||||
/// Read file from local devices ad give back string content
|
||||
/// </summary>
|
||||
@@ -582,5 +591,240 @@ namespace Thermo.Active.NC
|
||||
return numericalControl.FILES_WCleanUploadFolder();
|
||||
}
|
||||
|
||||
|
||||
#region recipe file persistence
|
||||
|
||||
/// <summary>
|
||||
/// Upsert recipe overview status
|
||||
/// </summary>
|
||||
/// <param name="section"></param>
|
||||
/// <param name="status"></param>
|
||||
public static void upsRecipeOverview(RecipeSection section, RecipeCatStatus status)
|
||||
{
|
||||
if (RecipeLiveData.RecipeOverview.ContainsKey(section))
|
||||
{
|
||||
RecipeLiveData.RecipeOverview[section] = status;
|
||||
}
|
||||
else
|
||||
{
|
||||
RecipeLiveData.RecipeOverview.Add(section, status);
|
||||
}
|
||||
}
|
||||
|
||||
public static void ReadLastRecipe()
|
||||
{
|
||||
try
|
||||
{
|
||||
ReadLiveData();
|
||||
}
|
||||
catch (XmlException ex)
|
||||
{
|
||||
ExceptionManager.ManageError(ERROR_LEVEL.FATAL,
|
||||
"Error while reading file: " + ex.SourceUri +
|
||||
"\n Error: " + ex.Message,
|
||||
true
|
||||
);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
var message = ex.Message;
|
||||
if (ex.InnerException != null)
|
||||
message += "\n" + ex.InnerException.Message;
|
||||
ExceptionManager.ManageError(ERROR_LEVEL.FATAL, message, true);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Try to load live data from json persistence file
|
||||
/// </summary>
|
||||
public static bool ReadLiveData()
|
||||
{
|
||||
bool answ = false;
|
||||
if (File.Exists(LIVE_RECIPE_PATH))
|
||||
{
|
||||
// load all text data
|
||||
var rawData = File.ReadAllText(LIVE_RECIPE_PATH);
|
||||
try
|
||||
{
|
||||
// deserialize to object
|
||||
RecipeLiveData = JsonConvert.DeserializeObject<LiveData>(rawData);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
answ = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
// reload from template...
|
||||
var rawData = File.ReadAllText(RECIPE_TEMPLATE_PATH);
|
||||
try
|
||||
{
|
||||
// deserialize to object
|
||||
RecipeLiveData = JsonConvert.DeserializeObject<LiveData>(rawData);
|
||||
// from template --> reset (if present) overview data...
|
||||
foreach (var item in RecipeLiveData.RecipeOverview)
|
||||
{
|
||||
RecipeLiveData.RecipeOverview[item.Key] = RecipeCatStatus.Unchanged;
|
||||
}
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
// salva current
|
||||
SaveRecipeCurrent();
|
||||
answ = true;
|
||||
}
|
||||
// rendo se fatto
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// Try to load selected recipe to live data (memory and json persistence file)
|
||||
/// </summary>
|
||||
public static bool LoadRecipe(string filePath)
|
||||
{
|
||||
bool answ = false;
|
||||
|
||||
// check file extension
|
||||
string fileName = Path.GetFileName(filePath);
|
||||
if (!fileName.EndsWith(".json"))
|
||||
{
|
||||
fileName += ".json";
|
||||
filePath += ".json";
|
||||
}
|
||||
|
||||
// check filePath...
|
||||
if (!filePath.Contains(RECIPE_DIRECTORY) && filePath != RECIPE_TEMPLATE_PATH)
|
||||
{
|
||||
// aggiungo base path!
|
||||
filePath = RECIPE_DIRECTORY + filePath;
|
||||
}
|
||||
if (File.Exists(filePath))
|
||||
{
|
||||
answ = true;
|
||||
|
||||
// load all text data
|
||||
var rawData = File.ReadAllText(filePath);
|
||||
try
|
||||
{
|
||||
// deserialize to object
|
||||
RecipeLiveData = JsonConvert.DeserializeObject<LiveData>(rawData);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
// update current live data!
|
||||
SaveRecipeCurrent();
|
||||
}
|
||||
// rendo se fatto
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// Try to load template recipe
|
||||
/// </summary>
|
||||
public static bool LoadTemplate()
|
||||
{
|
||||
bool answ = false;
|
||||
// check filePath...
|
||||
if (File.Exists(RECIPE_TEMPLATE_PATH))
|
||||
{
|
||||
answ = true;
|
||||
|
||||
// load all text data
|
||||
var rawData = File.ReadAllText(RECIPE_TEMPLATE_PATH);
|
||||
try
|
||||
{
|
||||
// deserialize to object
|
||||
RecipeLiveData = JsonConvert.DeserializeObject<LiveData>(rawData);
|
||||
// from template --> reset (if present) overview data...
|
||||
if (RecipeLiveData.RecipeOverview != null)
|
||||
{
|
||||
foreach (var item in RecipeLiveData.RecipeOverview)
|
||||
{
|
||||
RecipeLiveData.RecipeOverview[item.Key] = RecipeCatStatus.Unchanged;
|
||||
}
|
||||
}
|
||||
// update NAME
|
||||
RecipeLiveData.RecipeName = $"{DateTime.Now:yyyyMMss_HHmmss}.json";
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
// update current live data!
|
||||
SaveRecipeCurrent();
|
||||
}
|
||||
// rendo se fatto
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// Try to write live data to json persistence file
|
||||
/// </summary>
|
||||
public static bool SaveRecipeCurrent()
|
||||
{
|
||||
bool answ = false;
|
||||
try
|
||||
{
|
||||
answ = true;
|
||||
// serialize
|
||||
string rawData = JsonConvert.SerializeObject(RecipeLiveData);
|
||||
// save live!
|
||||
var dir = Path.GetDirectoryName(LIVE_RECIPE_PATH);
|
||||
if (!Directory.Exists(dir))
|
||||
{
|
||||
Directory.CreateDirectory(dir);
|
||||
}
|
||||
File.WriteAllText(LIVE_RECIPE_PATH, rawData);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
// rendo se fatto
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// Try to save live recipe as NEW template
|
||||
/// </summary>
|
||||
public static bool SaveRecipeTemplate()
|
||||
{
|
||||
// duplicate data...
|
||||
LiveData data2save = RecipeLiveData;
|
||||
// template --> reset overview data...
|
||||
data2save.RecipeOverview = new Dictionary<RecipeSection, RecipeCatStatus>();
|
||||
return SaveRecipe(RECIPE_TEMPLATE_PATH, data2save);
|
||||
}
|
||||
/// <summary>
|
||||
/// Try to save live recipe to selected filePath
|
||||
/// </summary>
|
||||
public static bool SaveRecipe(string filePath, LiveData currRecipe)
|
||||
{
|
||||
bool answ = false;
|
||||
try
|
||||
{
|
||||
answ = true;
|
||||
string fileName = Path.GetFileName(filePath);
|
||||
if (!fileName.EndsWith(".json"))
|
||||
{
|
||||
fileName += ".json";
|
||||
filePath += ".json";
|
||||
}
|
||||
// fix name!
|
||||
currRecipe.RecipeName = fileName;
|
||||
// serialize
|
||||
string rawData = JsonConvert.SerializeObject(currRecipe);
|
||||
// save live!
|
||||
File.WriteAllText(LIVE_RECIPE_PATH, rawData);
|
||||
// check filePath...
|
||||
if (!filePath.Contains(RECIPE_DIRECTORY) && filePath != RECIPE_TEMPLATE_PATH)
|
||||
{
|
||||
// aggiungo base path!
|
||||
filePath = RECIPE_DIRECTORY + filePath;
|
||||
}
|
||||
// save!
|
||||
File.WriteAllText(filePath, rawData);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
// rendo se fatto
|
||||
return answ;
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,6 +33,9 @@
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
@@ -64,6 +67,7 @@
|
||||
<None Include="Language\ERR_Spanish.INI">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\cms_core_library\CMS_CORE_Library\CMS_CORE_Library.csproj">
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Newtonsoft.Json" version="12.0.3" targetFramework="net462" />
|
||||
</packages>
|
||||
@@ -55,6 +55,21 @@ namespace Thermo.Active.Utils
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// Conversion string --> TACT_PROD_CATEGORY
|
||||
/// </summary>
|
||||
/// <param name="strValue"></param>
|
||||
/// <returns></returns>
|
||||
public static TACT_PROD_CATEGORY GetTActProdCategory(string strValue)
|
||||
{
|
||||
TACT_PROD_CATEGORY answ = TACT_PROD_CATEGORY.ND;
|
||||
try
|
||||
{
|
||||
answ = (TACT_PROD_CATEGORY)Enum.Parse(typeof(TACT_PROD_CATEGORY), strValue);
|
||||
}
|
||||
catch { }
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// Conversion string --> TACT_MBLOCK_TYPE
|
||||
/// </summary>
|
||||
/// <param name="strValue"></param>
|
||||
|
||||
+108
-106
@@ -23,136 +23,138 @@ using static Thermo.Active.Model.Constants;
|
||||
|
||||
namespace Thermo.Active.App_Start
|
||||
{
|
||||
public class Startup
|
||||
{
|
||||
public static OAuthAuthorizationServerOptions OAuthOptions;
|
||||
public class Startup
|
||||
{
|
||||
public static OAuthAuthorizationServerOptions OAuthOptions;
|
||||
|
||||
public void Configuration(IAppBuilder app)
|
||||
{
|
||||
if (NcConfig.NcVendor.ToUpper() == NC_VENDOR.SIEMENS && NcConfig.ShowNcHMI)
|
||||
ThreadSiemensHmi.InitWindow();
|
||||
public void Configuration(IAppBuilder app)
|
||||
{
|
||||
if (NcConfig.NcVendor.ToUpper() == NC_VENDOR.SIEMENS && NcConfig.ShowNcHMI)
|
||||
ThreadSiemensHmi.InitWindow();
|
||||
|
||||
// aggiunto x CORSe accesso remote al progetto
|
||||
app.UseCors(Microsoft.Owin.Cors.CorsOptions.AllowAll);
|
||||
// aggiunto x CORSe accesso remote al progetto
|
||||
app.UseCors(Microsoft.Owin.Cors.CorsOptions.AllowAll);
|
||||
|
||||
// Configure HTTP
|
||||
HttpConfiguration config = new HttpConfiguration();
|
||||
// Configure HTTP
|
||||
HttpConfiguration config = new HttpConfiguration();
|
||||
|
||||
// Register Web API config
|
||||
WebApiConfig.Register(config);
|
||||
// Register Web API config
|
||||
WebApiConfig.Register(config);
|
||||
|
||||
// Register Swagger config
|
||||
SwaggerConfig.Register(config);
|
||||
// Register Swagger config
|
||||
SwaggerConfig.Register(config);
|
||||
|
||||
// Configure api authentication
|
||||
ConfigureWebApiOAuth(app);
|
||||
// Configure api authentication
|
||||
ConfigureWebApiOAuth(app);
|
||||
|
||||
app.UseWebApi(config);
|
||||
app.UseWebApi(config);
|
||||
|
||||
// SignalR config & startup
|
||||
SignalRConfig(app);
|
||||
// SignalR config & startup
|
||||
SignalRConfig(app);
|
||||
|
||||
var directoryBrowsing = ConfigurationManager.AppSettings["enableDirectoryBrowsing"] == "true";
|
||||
var directoryBrowsing = ConfigurationManager.AppSettings["enableDirectoryBrowsing"] == "true";
|
||||
|
||||
// Check if web site directory exists
|
||||
if (!Directory.Exists(WEBSITE_DIRECTORY))
|
||||
ExceptionManager.ManageError(ERROR_LEVEL.FATAL, "Main window directory not found!");
|
||||
// Check if web site directory exists
|
||||
if (!Directory.Exists(WEBSITE_DIRECTORY))
|
||||
ExceptionManager.ManageError(ERROR_LEVEL.FATAL, "Main window directory not found!");
|
||||
|
||||
var options = new FileServerOptions()
|
||||
{
|
||||
EnableDefaultFiles = !directoryBrowsing,
|
||||
EnableDirectoryBrowsing = directoryBrowsing,
|
||||
RequestPath = PathString.Empty,
|
||||
FileSystem = new PhysicalFileSystem(WEBSITE_DIRECTORY),
|
||||
|
||||
};
|
||||
var options = new FileServerOptions()
|
||||
{
|
||||
EnableDefaultFiles = !directoryBrowsing,
|
||||
EnableDirectoryBrowsing = directoryBrowsing,
|
||||
RequestPath = PathString.Empty,
|
||||
FileSystem = new PhysicalFileSystem(WEBSITE_DIRECTORY),
|
||||
|
||||
options.StaticFileOptions.ServeUnknownFileTypes = true;
|
||||
options.StaticFileOptions.ContentTypeProvider = new FileExtensionContentTypeProvider();
|
||||
((FileExtensionContentTypeProvider)options.StaticFileOptions.ContentTypeProvider).Mappings.Add("json", "application/json");
|
||||
((FileExtensionContentTypeProvider)options.StaticFileOptions.ContentTypeProvider).Mappings.Add("ttf", "font/truetype");
|
||||
};
|
||||
|
||||
options.StaticFileOptions.ServeUnknownFileTypes = true;
|
||||
options.StaticFileOptions.ContentTypeProvider = new FileExtensionContentTypeProvider();
|
||||
((FileExtensionContentTypeProvider)options.StaticFileOptions.ContentTypeProvider).Mappings.Remove(".json");
|
||||
((FileExtensionContentTypeProvider)options.StaticFileOptions.ContentTypeProvider).Mappings.Add("json", "application/json");
|
||||
((FileExtensionContentTypeProvider)options.StaticFileOptions.ContentTypeProvider).Mappings.Remove(".ttf");
|
||||
((FileExtensionContentTypeProvider)options.StaticFileOptions.ContentTypeProvider).Mappings.Add(".ttf", "font/ttf");
|
||||
|
||||
|
||||
//// Setup configuration sources.
|
||||
//Configuration = new Configuration().AddJsonFile("config.json").AddEnvironmentVariables();
|
||||
//contentProvider.Mappings.Add(".woff2", "application/font-woff2");
|
||||
//// Setup configuration sources.
|
||||
//Configuration = new Configuration().AddJsonFile("config.json").AddEnvironmentVariables();
|
||||
//contentProvider.Mappings.Add(".woff2", "application/font-woff2");
|
||||
|
||||
app.UseFileServer(options);
|
||||
if (!ServerPortIsAvailable(ServerStartupConfig.ServerPort))
|
||||
{
|
||||
ExceptionManager.ManageError(ERROR_LEVEL.FATAL, "Server port is already in use by another process");
|
||||
}
|
||||
}
|
||||
app.UseFileServer(options);
|
||||
if (!ServerPortIsAvailable(ServerStartupConfig.ServerPort))
|
||||
{
|
||||
ExceptionManager.ManageError(ERROR_LEVEL.FATAL, "Server port is already in use by another process");
|
||||
}
|
||||
}
|
||||
|
||||
private void ConfigureWebApiOAuth(IAppBuilder app)
|
||||
{
|
||||
// Create new authorization options
|
||||
OAuthOptions = new OAuthAuthorizationServerOptions
|
||||
{
|
||||
// Login and Token generation end point
|
||||
TokenEndpointPath = new PathString("/Token"),
|
||||
Provider = new ApplicationOAuthProvider(),
|
||||
// Bearer token expiration time
|
||||
AccessTokenExpireTimeSpan = TimeSpan.FromDays(365),
|
||||
//TODO: In modalit� di produzione impostare AllowInsecureHttp = false
|
||||
AllowInsecureHttp = true
|
||||
};
|
||||
// Set authorization options
|
||||
app.UseOAuthAuthorizationServer(OAuthOptions);
|
||||
// Set bearer oAuth as authentication method
|
||||
app.UseOAuthBearerAuthentication(new OAuthBearerAuthenticationOptions() { AuthenticationType = AUTHENTICATION_TYPE });
|
||||
}
|
||||
private void ConfigureWebApiOAuth(IAppBuilder app)
|
||||
{
|
||||
// Create new authorization options
|
||||
OAuthOptions = new OAuthAuthorizationServerOptions
|
||||
{
|
||||
// Login and Token generation end point
|
||||
TokenEndpointPath = new PathString("/Token"),
|
||||
Provider = new ApplicationOAuthProvider(),
|
||||
// Bearer token expiration time
|
||||
AccessTokenExpireTimeSpan = TimeSpan.FromDays(365),
|
||||
//TODO: In modalit� di produzione impostare AllowInsecureHttp = false
|
||||
AllowInsecureHttp = true
|
||||
};
|
||||
// Set authorization options
|
||||
app.UseOAuthAuthorizationServer(OAuthOptions);
|
||||
// Set bearer oAuth as authentication method
|
||||
app.UseOAuthBearerAuthentication(new OAuthBearerAuthenticationOptions() { AuthenticationType = AUTHENTICATION_TYPE });
|
||||
}
|
||||
|
||||
public void SignalRConfig(IAppBuilder app)
|
||||
{
|
||||
// Set CamelCase json configuration
|
||||
var settings = new JsonSerializerSettings
|
||||
{
|
||||
ContractResolver = new SignalRContractResolver()
|
||||
};
|
||||
public void SignalRConfig(IAppBuilder app)
|
||||
{
|
||||
// Set CamelCase json configuration
|
||||
var settings = new JsonSerializerSettings
|
||||
{
|
||||
ContractResolver = new SignalRContractResolver()
|
||||
};
|
||||
|
||||
var serializer = JsonSerializer.Create(settings);
|
||||
GlobalHost.DependencyResolver.Register(typeof(JsonSerializer), () => serializer);
|
||||
var serializer = JsonSerializer.Create(settings);
|
||||
GlobalHost.DependencyResolver.Register(typeof(JsonSerializer), () => serializer);
|
||||
|
||||
// Set up signalR config
|
||||
app.Map("/signalr", map =>
|
||||
{
|
||||
map.UseCors(CorsOptions.AllowAll);
|
||||
// Set up signalR config
|
||||
app.Map("/signalr", map =>
|
||||
{
|
||||
map.UseCors(CorsOptions.AllowAll);
|
||||
|
||||
map.UseOAuthBearerAuthentication(new OAuthBearerAuthenticationOptions()
|
||||
{
|
||||
Provider = new SignalROAuthBearerProvider(),
|
||||
AuthenticationType = AUTHENTICATION_TYPE
|
||||
});
|
||||
var hubConfiguration = new HubConfiguration
|
||||
{
|
||||
Resolver = GlobalHost.DependencyResolver,
|
||||
EnableDetailedErrors = true
|
||||
};
|
||||
map.RunSignalR(hubConfiguration);
|
||||
});
|
||||
//app.MapSignalR();
|
||||
}
|
||||
map.UseOAuthBearerAuthentication(new OAuthBearerAuthenticationOptions()
|
||||
{
|
||||
Provider = new SignalROAuthBearerProvider(),
|
||||
AuthenticationType = AUTHENTICATION_TYPE
|
||||
});
|
||||
var hubConfiguration = new HubConfiguration
|
||||
{
|
||||
Resolver = GlobalHost.DependencyResolver,
|
||||
EnableDetailedErrors = true
|
||||
};
|
||||
map.RunSignalR(hubConfiguration);
|
||||
});
|
||||
//app.MapSignalR();
|
||||
}
|
||||
|
||||
private bool ServerPortIsAvailable(int port)
|
||||
{
|
||||
bool isAvailable = true;
|
||||
private bool ServerPortIsAvailable(int port)
|
||||
{
|
||||
bool isAvailable = true;
|
||||
|
||||
IPGlobalProperties ipProperties = IPGlobalProperties.GetIPGlobalProperties();
|
||||
IPEndPoint[] ipEndPoints = ipProperties.GetActiveTcpListeners();
|
||||
IPGlobalProperties ipProperties = IPGlobalProperties.GetIPGlobalProperties();
|
||||
IPEndPoint[] ipEndPoints = ipProperties.GetActiveTcpListeners();
|
||||
|
||||
foreach (IPEndPoint endPoint in ipEndPoints)
|
||||
{
|
||||
if (endPoint.Port == port)
|
||||
{
|
||||
isAvailable = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
foreach (IPEndPoint endPoint in ipEndPoints)
|
||||
{
|
||||
if (endPoint.Port == port)
|
||||
{
|
||||
isAvailable = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return isAvailable;
|
||||
}
|
||||
}
|
||||
return isAvailable;
|
||||
}
|
||||
}
|
||||
}
|
||||
//app.Map("/signalr", map =>
|
||||
//{
|
||||
|
||||
@@ -24,6 +24,11 @@ namespace Thermo.Active.Controllers.WebApi
|
||||
[RoutePrefix("api/maintenance_manager")]
|
||||
public class ApiMaintenanceController : ApiController
|
||||
{
|
||||
/// <summary>
|
||||
/// Oggetto adapter condiviso da WebAPI
|
||||
/// </summary>
|
||||
protected static NcAdapter ncAdapter = new NcAdapter();
|
||||
|
||||
[Route("maintenances"), HttpGet]
|
||||
[WebApiAuthorize(FunctionAccess = FUNCTIONALITY_NAMES.MAINTENANCE, Action = ACTIONS.READ)]
|
||||
public IHttpActionResult GetMaintenances()
|
||||
@@ -32,16 +37,13 @@ namespace Thermo.Active.Controllers.WebApi
|
||||
// Find user id from the bearer token
|
||||
var userId = identity.Claims.FirstOrDefault(c => c.Type == USER_ID_KEY);
|
||||
|
||||
using (NcAdapter ncAdapter = new NcAdapter())
|
||||
{
|
||||
ncAdapter.Connect();
|
||||
// Get list of maintenances with user's permission
|
||||
CmsError libraryError = ncAdapter.GetMaintenancesWithPermissions(out List<DTOMaintenanceModel> maintenances, Convert.ToInt32(userId.Value));
|
||||
if (libraryError.IsError())
|
||||
return BadRequest(libraryError.localizationKey);
|
||||
ncAdapter.Connect();
|
||||
// Get list of maintenances with user's permission
|
||||
CmsError libraryError = ncAdapter.GetMaintenancesWithPermissions(out List<DTOMaintenanceModel> maintenances, Convert.ToInt32(userId.Value));
|
||||
if (libraryError.IsError())
|
||||
return BadRequest(libraryError.localizationKey);
|
||||
|
||||
return Ok(maintenances);
|
||||
}
|
||||
return Ok(maintenances);
|
||||
}
|
||||
|
||||
[Route("maintenance"), HttpPost]
|
||||
@@ -62,43 +64,35 @@ namespace Thermo.Active.Controllers.WebApi
|
||||
if (dbMaint.Type == MAINTENANCE_TYPE.MACHINE_INTERVAL)
|
||||
{
|
||||
|
||||
// Update data
|
||||
using (NcAdapter ncAdapter = new NcAdapter())
|
||||
ncAdapter.Connect();
|
||||
CmsError libraryError = ncAdapter.GetMaintenanceDataById(dbMaint.MaintenanceId, Convert.ToInt32(userId.Value), out DTOMaintenanceModel maintenance);
|
||||
if (libraryError.IsError())
|
||||
{
|
||||
ncAdapter.Connect();
|
||||
CmsError libraryError = ncAdapter.GetMaintenanceDataById(dbMaint.MaintenanceId, Convert.ToInt32(userId.Value), out DTOMaintenanceModel maintenance);
|
||||
if (libraryError.IsError())
|
||||
{
|
||||
maintenancesController.Delete(dbMaint);
|
||||
return BadRequest(libraryError.localizationKey);
|
||||
}
|
||||
|
||||
PerformedMaintenanceModel performed = maintenancesController.PerformeMaintenance(maintenance.OriginalPlcCounter / 60, dbMaint.MaintenanceId, Convert.ToInt32(userId.Value), -2);
|
||||
if (performed == null)
|
||||
{
|
||||
maintenancesController.Delete(dbMaint);
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
libraryError = ncAdapter.GetMaintenanceDataById(dbMaint.MaintenanceId, Convert.ToInt32(userId.Value), out DTOMaintenanceModel endMaintenance);
|
||||
if (libraryError.IsError())
|
||||
return BadRequest(libraryError.localizationKey);
|
||||
|
||||
return Ok(endMaintenance);
|
||||
|
||||
maintenancesController.Delete(dbMaint);
|
||||
return BadRequest(libraryError.localizationKey);
|
||||
}
|
||||
|
||||
PerformedMaintenanceModel performed = maintenancesController.PerformeMaintenance(maintenance.OriginalPlcCounter / 60, dbMaint.MaintenanceId, Convert.ToInt32(userId.Value), -2);
|
||||
if (performed == null)
|
||||
{
|
||||
maintenancesController.Delete(dbMaint);
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
libraryError = ncAdapter.GetMaintenanceDataById(dbMaint.MaintenanceId, Convert.ToInt32(userId.Value), out DTOMaintenanceModel endMaintenance);
|
||||
if (libraryError.IsError())
|
||||
return BadRequest(libraryError.localizationKey);
|
||||
|
||||
return Ok(endMaintenance);
|
||||
}
|
||||
else
|
||||
{
|
||||
using (NcAdapter ncAdapter = new NcAdapter())
|
||||
{
|
||||
ncAdapter.Connect();
|
||||
CmsError libraryError = ncAdapter.GetMaintenanceDataById(dbMaint.MaintenanceId, Convert.ToInt32(userId.Value), out DTOMaintenanceModel maintenance);
|
||||
if (libraryError.IsError())
|
||||
return BadRequest(libraryError.localizationKey);
|
||||
ncAdapter.Connect();
|
||||
CmsError libraryError = ncAdapter.GetMaintenanceDataById(dbMaint.MaintenanceId, Convert.ToInt32(userId.Value), out DTOMaintenanceModel maintenance);
|
||||
if (libraryError.IsError())
|
||||
return BadRequest(libraryError.localizationKey);
|
||||
|
||||
return Ok(maintenance);
|
||||
}
|
||||
return Ok(maintenance);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -135,15 +129,13 @@ namespace Thermo.Active.Controllers.WebApi
|
||||
|
||||
// Update data
|
||||
dbMaint = maintenancesController.Update(maintenanceId, newMaint);
|
||||
using (NcAdapter ncAdapter = new NcAdapter())
|
||||
{
|
||||
ncAdapter.Connect();
|
||||
CmsError libraryError = ncAdapter.GetMaintenanceDataById(dbMaint.MaintenanceId, Convert.ToInt32(userId.Value), out DTOMaintenanceModel maintenance);
|
||||
if (libraryError.IsError())
|
||||
return BadRequest(libraryError.localizationKey);
|
||||
|
||||
return Ok(maintenance);
|
||||
}
|
||||
ncAdapter.Connect();
|
||||
CmsError libraryError = ncAdapter.GetMaintenanceDataById(dbMaint.MaintenanceId, Convert.ToInt32(userId.Value), out DTOMaintenanceModel maintenance);
|
||||
if (libraryError.IsError())
|
||||
return BadRequest(libraryError.localizationKey);
|
||||
|
||||
return Ok(maintenance);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -194,42 +186,39 @@ namespace Thermo.Active.Controllers.WebApi
|
||||
var userId = identity.Claims.FirstOrDefault(c => c.Type == USER_ID_KEY);
|
||||
|
||||
// Update data
|
||||
using (NcAdapter ncAdapter = new NcAdapter())
|
||||
ncAdapter.Connect();
|
||||
CmsError libraryError = ncAdapter.GetMaintenanceDataById(maintenanceId, Convert.ToInt32(userId.Value), out DTOMaintenanceModel maintData);
|
||||
if (libraryError.IsError())
|
||||
return BadRequest(libraryError.localizationKey);
|
||||
|
||||
if (!maintData.CanPerform)
|
||||
return Unauthorized();
|
||||
|
||||
using (MaintenancesController maintenancesController = new MaintenancesController())
|
||||
{
|
||||
ncAdapter.Connect();
|
||||
CmsError libraryError = ncAdapter.GetMaintenanceDataById(maintenanceId, Convert.ToInt32(userId.Value), out DTOMaintenanceModel maintData);
|
||||
libraryError = ncAdapter.GetNcGenericData(out DTONcGenericDataModel data);
|
||||
if (libraryError.IsError())
|
||||
return BadRequest(libraryError.localizationKey);
|
||||
|
||||
if (!maintData.CanPerform)
|
||||
return Unauthorized();
|
||||
|
||||
using (MaintenancesController maintenancesController = new MaintenancesController())
|
||||
int controlWord = -1;
|
||||
if (maintData.CreatedByCms)
|
||||
{
|
||||
libraryError = ncAdapter.GetNcGenericData(out DTONcGenericDataModel data);
|
||||
if (libraryError.IsError())
|
||||
return BadRequest(libraryError.localizationKey);
|
||||
|
||||
int controlWord = -1;
|
||||
if (maintData.CreatedByCms)
|
||||
{
|
||||
bool passwordIsValid = maintenancesController.CheckPassword(password.Password, data.CmsMachineIdNumber, maintData.OriginalPlcCounter, out controlWord);
|
||||
if (!passwordIsValid)
|
||||
return BadRequest(API_ERROR_KEYS.PASSWORD_IS_INVALID);
|
||||
}
|
||||
|
||||
|
||||
// Check if maintenance id
|
||||
PerformedMaintenanceModel performed = maintenancesController.PerformeMaintenance(maintData.OriginalPlcCounter / 60, maintenanceId, Convert.ToInt32(userId.Value), controlWord);
|
||||
if (performed == null)
|
||||
return NotFound();
|
||||
|
||||
libraryError = ncAdapter.GetMaintenanceDataById(maintenanceId, Convert.ToInt32(userId.Value), out maintData);
|
||||
if (libraryError.IsError())
|
||||
return BadRequest(libraryError.localizationKey);
|
||||
|
||||
return Ok(maintData);
|
||||
bool passwordIsValid = maintenancesController.CheckPassword(password.Password, data.CmsMachineIdNumber, maintData.OriginalPlcCounter, out controlWord);
|
||||
if (!passwordIsValid)
|
||||
return BadRequest(API_ERROR_KEYS.PASSWORD_IS_INVALID);
|
||||
}
|
||||
|
||||
|
||||
// Check if maintenance id
|
||||
PerformedMaintenanceModel performed = maintenancesController.PerformeMaintenance(maintData.OriginalPlcCounter / 60, maintenanceId, Convert.ToInt32(userId.Value), controlWord);
|
||||
if (performed == null)
|
||||
return NotFound();
|
||||
|
||||
libraryError = ncAdapter.GetMaintenanceDataById(maintenanceId, Convert.ToInt32(userId.Value), out maintData);
|
||||
if (libraryError.IsError())
|
||||
return BadRequest(libraryError.localizationKey);
|
||||
|
||||
return Ok(maintData);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -5,6 +5,7 @@ using Thermo.Active.Database.Controllers;
|
||||
using Thermo.Active.Model.ConfigModels;
|
||||
using Thermo.Active.Model.DTOModels;
|
||||
using Thermo.Active.Model.DTOModels.AlarmModels;
|
||||
using Thermo.Active.Model.DTOModels.ThProd;
|
||||
using Thermo.Active.Model.DTOModels.ThRecipe;
|
||||
using static Thermo.Active.Config.ServerConfig;
|
||||
|
||||
@@ -108,18 +109,39 @@ namespace Thermo.Active.Controllers.WebApi
|
||||
{
|
||||
Id = x.Id,
|
||||
ScaleFactor = x.ScaleFactor,
|
||||
NumDec = x.NumDec,
|
||||
Category = x.Category.ToString(),
|
||||
SubCategory_1 = x.SubCategory_1,
|
||||
SubCategory_2 = x.SubCategory_2,
|
||||
Name = x.Name,
|
||||
Description = x.Description,
|
||||
Format = x.Format,
|
||||
Label = $"{x.Category}_{x.SubCategory_1}_{x.SubCategory_2}_{x.Name}".Replace("__", "_").Replace("__", "_").ToLower()
|
||||
Label = $"{x.Category}_{x.SubCategory_1}_{x.SubCategory_2}_{x.Name}".Replace("__", "_").Replace("__", "_").ToLower(),
|
||||
EnumVal = x.EnumVal
|
||||
}).ToList();
|
||||
|
||||
return Ok(recipeConfig);
|
||||
}
|
||||
|
||||
[Route("thermoProd"), HttpGet]
|
||||
public IHttpActionResult GetThermoProdConfig()
|
||||
{
|
||||
// FIXME TODO
|
||||
List<DTOThermoProd> thermoProdConfig = ThermoProdConfig.Select(x => new DTOThermoProd()
|
||||
{
|
||||
Category = x.Category,
|
||||
Name = x.Name,
|
||||
Label = x.Label,
|
||||
UM= x.UM,
|
||||
ScaleFactor = x.ScaleFactor,
|
||||
NumDec = x.NumDec,
|
||||
MinVal = x.MinVal,
|
||||
MaxVal = x.MaxVal,
|
||||
}).ToList();
|
||||
|
||||
return Ok(thermoProdConfig);
|
||||
}
|
||||
|
||||
[Route("alarms"), HttpGet]
|
||||
public IHttpActionResult GetAlarmsConfig()
|
||||
{
|
||||
|
||||
@@ -14,6 +14,11 @@ namespace Thermo.Active.Controllers.WebApi
|
||||
[RoutePrefix("api/language")]
|
||||
public class LanguageController : ApiController
|
||||
{
|
||||
/// <summary>
|
||||
/// Oggetto adapter condiviso da WebAPI
|
||||
/// </summary>
|
||||
protected static NcAdapter ncAdapter = new NcAdapter();
|
||||
|
||||
[Route("languages"), HttpGet]
|
||||
public IHttpActionResult GetLanguageList()
|
||||
{
|
||||
@@ -21,17 +26,14 @@ namespace Thermo.Active.Controllers.WebApi
|
||||
if (availableLanguages == null)
|
||||
return NotFound();
|
||||
|
||||
using (NcAdapter ncAdapter = new NcAdapter())
|
||||
{
|
||||
ICollection<CultureInfo> cultureInfos = new List<CultureInfo>();
|
||||
ICollection<CultureInfo> cultureInfos = new List<CultureInfo>();
|
||||
|
||||
// Get nc available language
|
||||
CmsError libraryError = ncAdapter.numericalControl.NC_GetAvailableLanguages(ref cultureInfos);
|
||||
if (libraryError.IsError())
|
||||
return BadRequest(libraryError.localizationKey);
|
||||
// Filter available language with
|
||||
availableLanguages = availableLanguages.Where(x => cultureInfos.Any(y => y.TwoLetterISOLanguageName == x.IsoId)).ToList();
|
||||
}
|
||||
// Get nc available language
|
||||
CmsError libraryError = ncAdapter.numericalControl.NC_GetAvailableLanguages(ref cultureInfos);
|
||||
if (libraryError.IsError())
|
||||
return BadRequest(libraryError.localizationKey);
|
||||
// Filter available language with
|
||||
availableLanguages = availableLanguages.Where(x => cultureInfos.Any(y => y.TwoLetterISOLanguageName == x.IsoId)).ToList();
|
||||
|
||||
return Ok(availableLanguages);
|
||||
}
|
||||
@@ -53,9 +55,13 @@ namespace Thermo.Active.Controllers.WebApi
|
||||
Dictionary<string, string> alarmsNames = GetPlcAlarmsTranslations(language);
|
||||
Dictionary<string, string> headsNames = GetLocalizedHeadsNames(language);
|
||||
|
||||
|
||||
// scada
|
||||
Dictionary<string, string> scadaTranslations = GetScadaTranslations(language);
|
||||
|
||||
// THermo (modules and recipe enums) translations
|
||||
Dictionary<string, string> thermoTranslations = GetThermoTranslations(language);
|
||||
|
||||
|
||||
// Concat maintenances dictionary with translations dictionary
|
||||
translations = translations.Concat(maintenanceNames).ToDictionary(x => x.Key, x => x.Value);
|
||||
// Softkeys
|
||||
@@ -66,6 +72,8 @@ namespace Thermo.Active.Controllers.WebApi
|
||||
translations = translations.Concat(headsNames).ToDictionary(x => x.Key, x => x.Value);
|
||||
// Scada
|
||||
translations = translations.Concat(scadaTranslations).ToDictionary(x => x.Key, x => x.Value);
|
||||
// Scada
|
||||
translations = translations.Concat(thermoTranslations).ToDictionary(x => x.Key, x => x.Value);
|
||||
|
||||
if (translations == null)
|
||||
return InternalServerError();
|
||||
@@ -127,37 +135,44 @@ namespace Thermo.Active.Controllers.WebApi
|
||||
|
||||
public static Dictionary<string, string> GetPlcAlarmsTranslations(string language)
|
||||
{
|
||||
using (NcAdapter ncAdapter = new NcAdapter())
|
||||
Dictionary<string, string> returnValue = new Dictionary<string, string>();
|
||||
|
||||
Dictionary<int, string> messages = new Dictionary<int, string>();
|
||||
// Read data from CN
|
||||
ncAdapter.numericalControl.NC_GetTranslatedPlcMessages(language, ref messages); // Avoid checking error because in the worst case "messages" is empty
|
||||
|
||||
// Id start from 1
|
||||
for (int i = 1; i <= 1024; i++)
|
||||
{
|
||||
Dictionary<string, string> returnValue = new Dictionary<string, string>();
|
||||
|
||||
Dictionary<int, string> messages = new Dictionary<int, string>();
|
||||
// Read data from CN
|
||||
ncAdapter.numericalControl.NC_GetTranslatedPlcMessages(language, ref messages); // Avoid checking error because in the worst case "messages" is empty
|
||||
|
||||
// Id start from 1
|
||||
for (int i = 1; i <= 1024; i++)
|
||||
// Get configurated alarms
|
||||
var tmpAlarmConfig = InitialAlarmsConfig.Where(x => x.PlcId == i).FirstOrDefault();
|
||||
// Default string
|
||||
string message = string.Format(NOT_CONFIGURATED_ALARM_MESSAGE, i);
|
||||
// If is configurated
|
||||
if (tmpAlarmConfig != null)
|
||||
{
|
||||
// Get configurated alarms
|
||||
var tmpAlarmConfig = InitialAlarmsConfig.Where(x => x.PlcId == i).FirstOrDefault();
|
||||
// Default string
|
||||
string message = string.Format(NOT_CONFIGURATED_ALARM_MESSAGE, i);
|
||||
// If is configurated
|
||||
if (tmpAlarmConfig != null)
|
||||
{
|
||||
// Find translated string
|
||||
message = messages.Where(x => x.Key == tmpAlarmConfig.AlarmId).FirstOrDefault().Value;
|
||||
if (message == null)
|
||||
message = string.Format(NOT_FOUND_ALARM_MESSAGE, i);
|
||||
}
|
||||
// Add to dictionary
|
||||
returnValue.Add(
|
||||
ALARM_PREFIX + i,
|
||||
message
|
||||
);
|
||||
// Find translated string
|
||||
message = messages.Where(x => x.Key == tmpAlarmConfig.AlarmId).FirstOrDefault().Value;
|
||||
if (message == null)
|
||||
message = string.Format(NOT_FOUND_ALARM_MESSAGE, i);
|
||||
}
|
||||
return returnValue;
|
||||
// Add to dictionary
|
||||
returnValue.Add(
|
||||
ALARM_PREFIX + i,
|
||||
message
|
||||
);
|
||||
}
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
public static Dictionary<string, string> GetThermoTranslations(string language)
|
||||
{
|
||||
Dictionary<string, string> returnValue = new Dictionary<string, string>();
|
||||
|
||||
// Read data from CN
|
||||
ncAdapter.numericalControl.NC_GetTranslatedThermoLabels(language, ref returnValue);
|
||||
|
||||
return returnValue;
|
||||
}
|
||||
|
||||
private static Dictionary<string, string> GetScadaTranslations(string language)
|
||||
|
||||
@@ -10,28 +10,30 @@ namespace Thermo.Active.Controllers.WebApi
|
||||
[RoutePrefix("api/ModBlock")]
|
||||
public class ModulesController : ApiController
|
||||
{
|
||||
/// <summary>
|
||||
/// Oggetto adapter condiviso da WebAPI
|
||||
/// </summary>
|
||||
protected static NcAdapter ncAdapter = new NcAdapter();
|
||||
|
||||
[Route("current"), HttpGet]
|
||||
public IHttpActionResult GetCurrentModules()
|
||||
{
|
||||
using (NcAdapter ncAdapter = new NcAdapter())
|
||||
// Try connection
|
||||
CmsError libraryError = ncAdapter.Connect();
|
||||
if (libraryError.errorCode != 0)
|
||||
{
|
||||
// Try connection
|
||||
CmsError libraryError = ncAdapter.Connect();
|
||||
if (libraryError.errorCode != 0)
|
||||
{
|
||||
ThermoActiveLogger.LogError($"NC Not connected! | GetCurrentModules | {libraryError.exception}");
|
||||
return InternalServerError();
|
||||
}
|
||||
|
||||
libraryError = ncAdapter.ReadModulesBlock(out Dictionary<int, DTOModulesBlock> currModules);
|
||||
if (libraryError.IsError())
|
||||
{
|
||||
ThermoActiveLogger.LogError($"GetRecipeOverview error | {libraryError.exception}");
|
||||
return BadRequest(libraryError.localizationKey);
|
||||
}
|
||||
|
||||
return Ok(currModules);
|
||||
ThermoActiveLogger.LogError($"NC Not connected! | GetCurrentModules | {libraryError.exception}");
|
||||
return InternalServerError();
|
||||
}
|
||||
|
||||
libraryError = ncAdapter.ReadModulesBlock(out Dictionary<int, DTOModulesBlock> currModules);
|
||||
if (libraryError.IsError())
|
||||
{
|
||||
ThermoActiveLogger.LogError($"GetRecipeOverview error | {libraryError.exception}");
|
||||
return BadRequest(libraryError.localizationKey);
|
||||
}
|
||||
|
||||
return Ok(currModules);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -10,69 +10,62 @@ namespace Thermo.Active.Controllers.WebApi
|
||||
[RoutePrefix("api/nc")]
|
||||
public class NcApiController : ApiController
|
||||
{
|
||||
/// <summary>
|
||||
/// Oggetto adapter condiviso da WebAPI
|
||||
/// </summary>
|
||||
protected static NcAdapter ncAdapter = new NcAdapter();
|
||||
|
||||
[Route("generic_data"), HttpGet]
|
||||
[WebApiAuthorize(FunctionAccess = FUNCTIONALITY_NAMES.NC_DATA, Action = ACTIONS.READ)]
|
||||
public IHttpActionResult GetNcGenericData()
|
||||
{
|
||||
using (NcAdapter ncAdapter = new NcAdapter())
|
||||
{
|
||||
ncAdapter.Connect();
|
||||
CmsError libraryError = ncAdapter.GetNcGenericData(out DTONcGenericDataModel genericData);
|
||||
if (libraryError.IsError())
|
||||
if (libraryError.errorCode == CMS_ERROR_CODES.NOT_CONNECTED)
|
||||
return Ok(genericData);
|
||||
else
|
||||
return BadRequest(libraryError.localizationKey);
|
||||
ncAdapter.Connect();
|
||||
CmsError libraryError = ncAdapter.GetNcGenericData(out DTONcGenericDataModel genericData);
|
||||
if (libraryError.IsError())
|
||||
if (libraryError.errorCode == CMS_ERROR_CODES.NOT_CONNECTED)
|
||||
return Ok(genericData);
|
||||
else
|
||||
return BadRequest(libraryError.localizationKey);
|
||||
|
||||
return Ok(genericData);
|
||||
}
|
||||
return Ok(genericData);
|
||||
}
|
||||
|
||||
[Route("active_language/{language}"), HttpPut]
|
||||
[WebApiAuthorize(FunctionAccess = FUNCTIONALITY_NAMES.USER_FUNCTIONS, Action = ACTIONS.WRITE)]
|
||||
public IHttpActionResult SetActiveLanguage(string language)
|
||||
{
|
||||
using (NcAdapter ncAdapter = new NcAdapter())
|
||||
{
|
||||
ncAdapter.Connect();
|
||||
CmsError libraryError = ncAdapter.SetActiveLanguage(CultureInfo.CreateSpecificCulture(language));
|
||||
ncAdapter.Connect();
|
||||
CmsError libraryError = ncAdapter.SetActiveLanguage(CultureInfo.CreateSpecificCulture(language));
|
||||
|
||||
if (libraryError.errorCode != CMS_ERROR_CODES.NOT_CONNECTED && libraryError.errorCode != CMS_ERROR_CODES.OK)
|
||||
return BadRequest();
|
||||
else
|
||||
return Ok();
|
||||
}
|
||||
if (libraryError.errorCode != CMS_ERROR_CODES.NOT_CONNECTED && libraryError.errorCode != CMS_ERROR_CODES.OK)
|
||||
return BadRequest();
|
||||
else
|
||||
return Ok();
|
||||
}
|
||||
|
||||
[Route("active_screen/{screen:int}"), HttpPut]
|
||||
//[WebApiAuthorize(FunctionAccess = FUNCTIONALITY_NAMES.USER_FUNCTIONS, Action = ACTIONS.WRITE)]
|
||||
public IHttpActionResult SetActiveScreen(int screen)
|
||||
{
|
||||
using (NcAdapter ncAdapter = new NcAdapter())
|
||||
{
|
||||
ncAdapter.Connect();
|
||||
CmsError libraryError = ncAdapter.SetActiveScreen((short)screen);
|
||||
ncAdapter.Connect();
|
||||
CmsError libraryError = ncAdapter.SetActiveScreen((short)screen);
|
||||
|
||||
if (libraryError.errorCode == CMS_ERROR_CODES.NOT_CONNECTED)
|
||||
return BadRequest();
|
||||
else
|
||||
return Ok();
|
||||
}
|
||||
if (libraryError.errorCode == CMS_ERROR_CODES.NOT_CONNECTED)
|
||||
return BadRequest();
|
||||
else
|
||||
return Ok();
|
||||
}
|
||||
|
||||
[Route("active_client"), HttpGet]
|
||||
public IHttpActionResult GetActiveClient()
|
||||
{
|
||||
using (NcAdapter ncAdapter = new NcAdapter())
|
||||
{
|
||||
ncAdapter.Connect();
|
||||
CmsError libraryError = ncAdapter.GetActiveClient(out int selectedClientId);
|
||||
if (libraryError.IsError())
|
||||
return BadRequest();
|
||||
ncAdapter.Connect();
|
||||
CmsError libraryError = ncAdapter.GetActiveClient(out int selectedClientId);
|
||||
if (libraryError.IsError())
|
||||
return BadRequest();
|
||||
|
||||
|
||||
return Ok(new { selectedClientId });
|
||||
}
|
||||
return Ok(new { selectedClientId });
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -18,79 +18,69 @@ namespace Thermo.Active.Controllers.WebApi
|
||||
[RoutePrefix("api/file_manager")]
|
||||
public class NcFileController : ApiController
|
||||
{
|
||||
/// <summary>
|
||||
/// Oggetto adapter condiviso da WebAPI
|
||||
/// </summary>
|
||||
protected static NcFileAdapter ncAdapter = new NcFileAdapter();
|
||||
|
||||
[Route("files"), HttpGet]
|
||||
public IHttpActionResult GetFileList(string filePath = "")
|
||||
{
|
||||
using (NcFileAdapter ncAdapter = new NcFileAdapter())
|
||||
{
|
||||
ncAdapter.Connect();
|
||||
ncAdapter.Connect();
|
||||
|
||||
CmsError libraryError = ncAdapter.GetFileList(filePath, out List<PreviewFileModel> fileList);
|
||||
if (libraryError.IsError())
|
||||
return BadRequest(libraryError.localizationKey);
|
||||
CmsError libraryError = ncAdapter.GetFileList(filePath, out List<PreviewFileModel> fileList);
|
||||
if (libraryError.IsError())
|
||||
return BadRequest(libraryError.localizationKey);
|
||||
|
||||
return Ok(fileList);
|
||||
}
|
||||
return Ok(fileList);
|
||||
}
|
||||
|
||||
[Route("file/info"), HttpGet]
|
||||
public IHttpActionResult GetFileInfo([FromUri]string filePath)
|
||||
{
|
||||
using (NcFileAdapter ncAdapter = new NcFileAdapter())
|
||||
{
|
||||
ncAdapter.Connect();
|
||||
ncAdapter.Connect();
|
||||
|
||||
CmsError libraryError = ncAdapter.GetFileInfo(filePath, out InfoFile fileInfo);
|
||||
if (libraryError.IsError())
|
||||
return BadRequest(libraryError.localizationKey);
|
||||
CmsError libraryError = ncAdapter.GetFileInfo(filePath, out InfoFile fileInfo);
|
||||
if (libraryError.IsError())
|
||||
return BadRequest(libraryError.localizationKey);
|
||||
|
||||
return Ok(fileInfo);
|
||||
}
|
||||
return Ok(fileInfo);
|
||||
}
|
||||
|
||||
[Route("file/active/info"), HttpGet]
|
||||
public IHttpActionResult GetActiveFileInfo([FromUri]string filePath)
|
||||
{
|
||||
using (NcFileAdapter ncAdapter = new NcFileAdapter())
|
||||
{
|
||||
ncAdapter.Connect();
|
||||
ncAdapter.Connect();
|
||||
|
||||
CmsError libraryError = ncAdapter.GetActiveFileInfo(filePath, out DTOActiveImageAndNameDataModel fileInfo);
|
||||
if (libraryError.IsError())
|
||||
return BadRequest(libraryError.localizationKey);
|
||||
CmsError libraryError = ncAdapter.GetActiveFileInfo(filePath, out DTOActiveImageAndNameDataModel fileInfo);
|
||||
if (libraryError.IsError())
|
||||
return BadRequest(libraryError.localizationKey);
|
||||
|
||||
return Ok(fileInfo);
|
||||
}
|
||||
return Ok(fileInfo);
|
||||
}
|
||||
|
||||
[Route("file/active"), HttpPut]
|
||||
public IHttpActionResult SetActiveProgram([FromUri]string filePath)
|
||||
{
|
||||
using (NcFileAdapter ncAdapter = new NcFileAdapter())
|
||||
{
|
||||
ncAdapter.Connect();
|
||||
ncAdapter.Connect();
|
||||
|
||||
CmsError libraryError = ncAdapter.SetActiveProgramInfo(filePath, out DTOActiveProgramDataModel fileInfo);
|
||||
if (libraryError.IsError())
|
||||
return BadRequest(libraryError.localizationKey);
|
||||
CmsError libraryError = ncAdapter.SetActiveProgramInfo(filePath, out DTOActiveProgramDataModel fileInfo);
|
||||
if (libraryError.IsError())
|
||||
return BadRequest(libraryError.localizationKey);
|
||||
|
||||
return Ok(fileInfo);
|
||||
}
|
||||
return Ok(fileInfo);
|
||||
}
|
||||
|
||||
[Route("file/deactivate"), HttpPut]
|
||||
public IHttpActionResult DeactivateProgram()
|
||||
{
|
||||
using (NcFileAdapter ncAdapter = new NcFileAdapter())
|
||||
{
|
||||
ncAdapter.Connect();
|
||||
ncAdapter.Connect();
|
||||
|
||||
CmsError libraryError = ncAdapter.DeactivateProgram(out DTOActiveProgramDataModel fileInfo);
|
||||
if (libraryError.IsError())
|
||||
return BadRequest(libraryError.localizationKey);
|
||||
CmsError libraryError = ncAdapter.DeactivateProgram(out DTOActiveProgramDataModel fileInfo);
|
||||
if (libraryError.IsError())
|
||||
return BadRequest(libraryError.localizationKey);
|
||||
|
||||
return Ok(fileInfo);
|
||||
}
|
||||
return Ok(fileInfo);
|
||||
}
|
||||
|
||||
[Route("upload"), HttpPost]
|
||||
@@ -367,14 +357,11 @@ namespace Thermo.Active.Controllers.WebApi
|
||||
[Route("queue/{processId:int}/remove/{itemId:int}"), HttpDelete]
|
||||
public IHttpActionResult RemoveFromQueue(int processId, int itemId)
|
||||
{
|
||||
using (NcFileAdapter ncAdapter = new NcFileAdapter())
|
||||
{
|
||||
ncAdapter.Connect();
|
||||
ncAdapter.Connect();
|
||||
|
||||
CmsError libraryError = ncAdapter.RemoveFromQueue(processId, itemId);
|
||||
if (libraryError.IsError())
|
||||
return BadRequest(libraryError.localizationKey);
|
||||
}
|
||||
CmsError libraryError = ncAdapter.RemoveFromQueue(processId, itemId);
|
||||
if (libraryError.IsError())
|
||||
return BadRequest(libraryError.localizationKey);
|
||||
|
||||
return Ok();
|
||||
}
|
||||
@@ -382,73 +369,58 @@ namespace Thermo.Active.Controllers.WebApi
|
||||
[Route("queue/{processId:int}/move"), HttpPut]
|
||||
public IHttpActionResult MoveQueueItems(int processId, MoveItems itemsPositions)
|
||||
{
|
||||
using (NcFileAdapter ncAdapter = new NcFileAdapter())
|
||||
{
|
||||
CmsError libraryError = ncAdapter.MoveQueueItems(processId, itemsPositions.ObjectId, itemsPositions.NewPosition, out List<DTOQueueModel> queue);
|
||||
if (libraryError.IsError())
|
||||
return BadRequest(libraryError.localizationKey);
|
||||
CmsError libraryError = ncAdapter.MoveQueueItems(processId, itemsPositions.ObjectId, itemsPositions.NewPosition, out List<DTOQueueModel> queue);
|
||||
if (libraryError.IsError())
|
||||
return BadRequest(libraryError.localizationKey);
|
||||
|
||||
return Ok(queue);
|
||||
}
|
||||
return Ok(queue);
|
||||
}
|
||||
|
||||
[Route("queue/{processId:int}/edit/{itemId:int}"), HttpPut]
|
||||
public IHttpActionResult EditQueueItem(int processId, int itemId, RepsModel reps)
|
||||
{
|
||||
using (NcFileAdapter ncAdapter = new NcFileAdapter())
|
||||
{
|
||||
if (reps.Reps < 1)
|
||||
return BadRequest(INCORRECT_PARAMETERS_ERROR.localizationKey);
|
||||
if (reps.Reps < 1)
|
||||
return BadRequest(INCORRECT_PARAMETERS_ERROR.localizationKey);
|
||||
|
||||
CmsError libraryError = ncAdapter.EditQueueItemReps(processId, itemId, reps.Reps, out DTOQueueModel queueItem);
|
||||
if (libraryError.IsError())
|
||||
return BadRequest(libraryError.localizationKey);
|
||||
CmsError libraryError = ncAdapter.EditQueueItemReps(processId, itemId, reps.Reps, out DTOQueueModel queueItem);
|
||||
if (libraryError.IsError())
|
||||
return BadRequest(libraryError.localizationKey);
|
||||
|
||||
return Ok(queueItem);
|
||||
}
|
||||
return Ok(queueItem);
|
||||
}
|
||||
|
||||
[Route("queue/{processId:int}/empty"), HttpDelete]
|
||||
public IHttpActionResult EmptyQueue(int processId)
|
||||
{
|
||||
using (NcFileAdapter ncAdapter = new NcFileAdapter())
|
||||
{
|
||||
CmsError libraryError = ncAdapter.EmptyQueue(processId);
|
||||
if (libraryError.IsError())
|
||||
return BadRequest(libraryError.localizationKey);
|
||||
CmsError libraryError = ncAdapter.EmptyQueue(processId);
|
||||
if (libraryError.IsError())
|
||||
return BadRequest(libraryError.localizationKey);
|
||||
|
||||
return Ok();
|
||||
}
|
||||
return Ok();
|
||||
}
|
||||
|
||||
[Route("queue/start")]
|
||||
public IHttpActionResult StartWorkingQueue(int processId)
|
||||
{
|
||||
using (NcFileAdapter ncAdapter = new NcFileAdapter())
|
||||
{
|
||||
ncAdapter.Connect();
|
||||
ncAdapter.Connect();
|
||||
|
||||
CmsError libraryError = ncAdapter.StartWorkingQueue(processId);
|
||||
if (libraryError.IsError())
|
||||
return BadRequest(libraryError.localizationKey);
|
||||
CmsError libraryError = ncAdapter.StartWorkingQueue(processId);
|
||||
if (libraryError.IsError())
|
||||
return BadRequest(libraryError.localizationKey);
|
||||
|
||||
return Ok();
|
||||
}
|
||||
return Ok();
|
||||
}
|
||||
|
||||
[Route("queue/stop")]
|
||||
public IHttpActionResult StopWorkingQueue(int processId)
|
||||
{
|
||||
using (NcFileAdapter ncAdapter = new NcFileAdapter())
|
||||
{
|
||||
ncAdapter.Connect();
|
||||
ncAdapter.Connect();
|
||||
|
||||
CmsError libraryError = ncAdapter.StopWorkingQueue(processId);
|
||||
if (libraryError.IsError())
|
||||
return BadRequest(libraryError.localizationKey);
|
||||
CmsError libraryError = ncAdapter.StopWorkingQueue(processId);
|
||||
if (libraryError.IsError())
|
||||
return BadRequest(libraryError.localizationKey);
|
||||
|
||||
return Ok();
|
||||
}
|
||||
return Ok();
|
||||
}
|
||||
|
||||
[Route("macros")]
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
using CMS_CORE_Library.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Web.Http;
|
||||
using Thermo.Active.Model.DTOModels.ThProd;
|
||||
using Thermo.Active.NC;
|
||||
using Thermo.Active.Utils;
|
||||
|
||||
@@ -116,6 +118,11 @@ namespace Thermo.Active.Controllers.WebApi
|
||||
ThermoActiveLogger.LogError($"StartProd error | {libraryError.exception}");
|
||||
return BadRequest(libraryError.localizationKey);
|
||||
}
|
||||
// se new workorder --> registro nuova data lorro!
|
||||
if (newWorkOrder)
|
||||
{
|
||||
ncAdapter.lottoStart = DateTime.Now;
|
||||
}
|
||||
|
||||
// ritorno solo fatto!
|
||||
return Ok();
|
||||
@@ -131,7 +138,7 @@ namespace Thermo.Active.Controllers.WebApi
|
||||
CmsError libraryError = ncAdapter.Connect();
|
||||
if (libraryError.IsError())
|
||||
{
|
||||
ThermoActiveLogger.LogError($"NC Not connected! | StartProd | {libraryError.exception}");
|
||||
ThermoActiveLogger.LogError($"NC Not connected! | GetProd | {libraryError.exception}");
|
||||
return BadRequest(libraryError.localizationKey);
|
||||
}
|
||||
|
||||
@@ -147,6 +154,32 @@ namespace Thermo.Active.Controllers.WebApi
|
||||
return Ok(prodInfoDat);
|
||||
}
|
||||
/// <summary>
|
||||
/// Request gauges current data
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[Route("gauges"), HttpPut]
|
||||
public IHttpActionResult GetGauges()
|
||||
{
|
||||
// Try connection
|
||||
CmsError libraryError = ncAdapter.Connect();
|
||||
if (libraryError.IsError())
|
||||
{
|
||||
ThermoActiveLogger.LogError($"NC Not connected! | GetGauges | {libraryError.exception}");
|
||||
return BadRequest(libraryError.localizationKey);
|
||||
}
|
||||
|
||||
// scrivo sul PLC il comando strobe richiesta AUTO!
|
||||
libraryError = ncAdapter.ReadGaugeData(out Dictionary<string, DTOThermoProd> currentLiveProd);
|
||||
if (libraryError.IsError())
|
||||
{
|
||||
ThermoActiveLogger.LogError($"GetGauges error | {libraryError.exception}");
|
||||
return BadRequest(libraryError.localizationKey);
|
||||
}
|
||||
|
||||
// ritorno solo fatto!
|
||||
return Ok(currentLiveProd);
|
||||
}
|
||||
/// <summary>
|
||||
/// Request production data from indexStart record for numRecord items (DESCENDING)
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
@@ -157,7 +190,7 @@ namespace Thermo.Active.Controllers.WebApi
|
||||
CmsError libraryError = ncAdapter.Connect();
|
||||
if (libraryError.IsError())
|
||||
{
|
||||
ThermoActiveLogger.LogError($"NC Not connected! | StartProd | {libraryError.exception}");
|
||||
ThermoActiveLogger.LogError($"NC Not connected! | GetHistory | {libraryError.exception}");
|
||||
return BadRequest(libraryError.localizationKey);
|
||||
}
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ namespace Thermo.Active.Controllers.WebApi
|
||||
ThermoActiveLogger.LogError($"ncAdapter Not connected! | GetOverview | {libraryError.exception}");
|
||||
}
|
||||
|
||||
libraryError = ncAdapter.GetRecipeOverview(out Dictionary<string, RecipeCatStatus> currOverview);
|
||||
libraryError = ncAdapter.GetRecipeOverview(out Dictionary<RecipeSection, RecipeCatStatus> currOverview);
|
||||
if (libraryError.IsError())
|
||||
{
|
||||
ThermoActiveLogger.LogError($"GetRecipeOverview error | {libraryError.exception}");
|
||||
@@ -65,7 +65,7 @@ namespace Thermo.Active.Controllers.WebApi
|
||||
{
|
||||
if (parametersList != null)
|
||||
{
|
||||
if (RecipeLiveData != null)
|
||||
if (NcFileAdapter.RecipeLiveData != null)
|
||||
{
|
||||
// Try connection
|
||||
CmsError libraryError = ncAdapter.Connect();
|
||||
@@ -123,11 +123,12 @@ namespace Thermo.Active.Controllers.WebApi
|
||||
/// <summary>
|
||||
/// Confirm recipe modification (parameters: HMI --> PLC)
|
||||
/// </summary>
|
||||
/// <param name="section">section confirmed (string as in overview)</param>
|
||||
/// <returns></returns>
|
||||
[Route("confirm"), HttpPut]
|
||||
public IHttpActionResult ConfirmEdit()
|
||||
public IHttpActionResult ConfirmEdit(RecipeSection section)
|
||||
{
|
||||
if (RecipeLiveData != null)
|
||||
if (NcFileAdapter.RecipeLiveData != null)
|
||||
{
|
||||
// Try connection
|
||||
CmsError libraryError = ncAdapter.Connect();
|
||||
@@ -145,6 +146,19 @@ namespace Thermo.Active.Controllers.WebApi
|
||||
return BadRequest(libraryError.localizationKey);
|
||||
}
|
||||
|
||||
// SE HO una section != null/empty --> salvo come modificata...
|
||||
if (section != null)
|
||||
{
|
||||
try
|
||||
{
|
||||
NcFileAdapter.upsRecipeOverview(section, RecipeCatStatus.ChangedOk);
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
ThermoActiveLogger.LogError($"Error on set recipe overview | section: {section}{Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
|
||||
// recupero i dati LIVE dei parametri HMI della ricetta...
|
||||
libraryError = ncAdapter.ReadFullRecipe(out Dictionary<string, DTORecipeParam> currRecipe);
|
||||
if (libraryError.IsError())
|
||||
@@ -179,7 +193,7 @@ namespace Thermo.Active.Controllers.WebApi
|
||||
[Route("cancel"), HttpPut]
|
||||
public IHttpActionResult CancelEdit()
|
||||
{
|
||||
if (RecipeLiveData != null)
|
||||
if (NcFileAdapter.RecipeLiveData != null)
|
||||
{
|
||||
// Try connection
|
||||
CmsError libraryError = ncAdapter.Connect();
|
||||
@@ -234,7 +248,7 @@ namespace Thermo.Active.Controllers.WebApi
|
||||
{
|
||||
|
||||
// chiamo metodo di lettura...
|
||||
bool fatto = ServerConfigController.LoadRecipe(newName);
|
||||
bool fatto = NcFileAdapter.LoadRecipe(newName);
|
||||
if (!fatto)
|
||||
{
|
||||
ThermoActiveLogger.LogError($"LoadRecipe error");
|
||||
@@ -260,7 +274,7 @@ namespace Thermo.Active.Controllers.WebApi
|
||||
public IHttpActionResult NewRecipe()
|
||||
{
|
||||
// chiamo metodo di lettura...
|
||||
bool fatto = ServerConfigController.LoadTemplate();
|
||||
bool fatto = NcFileAdapter.LoadTemplate();
|
||||
|
||||
if (!fatto)
|
||||
{
|
||||
@@ -324,9 +338,9 @@ namespace Thermo.Active.Controllers.WebApi
|
||||
}
|
||||
|
||||
// ora salvo ANCHE i dati live...
|
||||
RecipeLiveData.RecipeParameters = currParams;
|
||||
NcFileAdapter.RecipeLiveData.RecipeParameters = currParams;
|
||||
// e salvo su disco
|
||||
ServerConfigController.SaveRecipe(newName);
|
||||
NcFileAdapter.SaveRecipe(newName, NcFileAdapter.RecipeLiveData);
|
||||
|
||||
// ritorno solo fatto!
|
||||
return Ok();
|
||||
@@ -363,7 +377,7 @@ namespace Thermo.Active.Controllers.WebApi
|
||||
}
|
||||
|
||||
// ora salvo nei dati live...
|
||||
RecipeLiveData.RecipeParameters = currParams;
|
||||
NcFileAdapter.RecipeLiveData.RecipeParameters = currParams;
|
||||
|
||||
// carico i dati dei riscaldi...
|
||||
var currChSet = new Dictionary<int, int>();
|
||||
@@ -371,11 +385,11 @@ namespace Thermo.Active.Controllers.WebApi
|
||||
{
|
||||
currChSet.Add(item.Key, item.Value.SetpointHMI);
|
||||
}
|
||||
RecipeLiveData.ChannelSetpoints = currChSet;
|
||||
NcFileAdapter.RecipeLiveData.ChannelSetpoints = currChSet;
|
||||
|
||||
|
||||
// e salvo su disco
|
||||
ServerConfigController.SaveRecipeTemplate();
|
||||
NcFileAdapter.SaveRecipeTemplate();
|
||||
|
||||
// ritorno solo fatto!
|
||||
return Ok();
|
||||
@@ -391,16 +405,19 @@ namespace Thermo.Active.Controllers.WebApi
|
||||
try
|
||||
{
|
||||
// ora salvo ANCHE i dati live...
|
||||
RecipeLiveData.RecipeParameters = currParams;
|
||||
NcFileAdapter.RecipeLiveData.RecipeParameters = currParams;
|
||||
// e salvo su disco
|
||||
ServerConfigController.SaveRecipeCurrent();
|
||||
NcFileAdapter.SaveRecipeCurrent();
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
ThermoActiveLogger.LogError($"Recipe | SaveCurrentRecipeParams exception | {exc}");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// write current recipe to PLC
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static CmsError WriteCurrentRecipeToPlc()
|
||||
{
|
||||
CmsError checkError = NO_ERROR;
|
||||
@@ -424,7 +441,7 @@ namespace Thermo.Active.Controllers.WebApi
|
||||
|
||||
// save parameters to PLC!!!
|
||||
Dictionary<string, DTORecipeParam> updtRecipe = new Dictionary<string, DTORecipeParam>();
|
||||
foreach (var item in RecipeLiveData.RecipeParameters)
|
||||
foreach (var item in NcFileAdapter.RecipeLiveData.RecipeParameters)
|
||||
{
|
||||
if (prevRecipe.ContainsKey(item.Key))
|
||||
{
|
||||
@@ -452,7 +469,7 @@ namespace Thermo.Active.Controllers.WebApi
|
||||
|
||||
// process ch load setup...
|
||||
Dictionary<int, int> newRisk = new Dictionary<int, int>();
|
||||
foreach (var item in RecipeLiveData.ChannelSetpoints)
|
||||
foreach (var item in NcFileAdapter.RecipeLiveData.ChannelSetpoints)
|
||||
{
|
||||
newRisk.Add(item.Key, item.Value);
|
||||
}
|
||||
|
||||
@@ -11,9 +11,15 @@ using static Thermo.Active.Model.Constants;
|
||||
|
||||
namespace Thermo.Active.Controllers.WebApi
|
||||
{
|
||||
|
||||
[RoutePrefix("api/scada")]
|
||||
public class ScadaController : ApiController
|
||||
{
|
||||
/// <summary>
|
||||
/// Oggetto adapter condiviso da WebAPI
|
||||
/// </summary>
|
||||
protected static NcAdapter ncAdapter = new NcAdapter();
|
||||
|
||||
[Route("list"), HttpGet]
|
||||
public IHttpActionResult GetScadaList()
|
||||
{
|
||||
@@ -34,59 +40,50 @@ namespace Thermo.Active.Controllers.WebApi
|
||||
if (selectedScadaSchema == null)
|
||||
return BadRequest();
|
||||
|
||||
using (NcAdapter ncAdapter = new NcAdapter())
|
||||
{
|
||||
ncAdapter.Connect();
|
||||
// Read the selected scada data
|
||||
CmsError libraryError = ncAdapter.ReadScadaData(selectedScadaSchema, out DTOScadaModel values);
|
||||
if (libraryError.IsError())
|
||||
return BadRequest(libraryError.localizationKey);
|
||||
ncAdapter.Connect();
|
||||
// Read the selected scada data
|
||||
CmsError libraryError = ncAdapter.ReadScadaData(selectedScadaSchema, out DTOScadaModel values);
|
||||
if (libraryError.IsError())
|
||||
return BadRequest(libraryError.localizationKey);
|
||||
|
||||
// Add to the subscriber list
|
||||
SubscribedScada.Add(selectedScadaSchema);
|
||||
// Add to the subscriber list
|
||||
SubscribedScada.Add(selectedScadaSchema);
|
||||
|
||||
return Ok(values);
|
||||
}
|
||||
return Ok(values);
|
||||
}
|
||||
|
||||
[Route("unsubscribe/{scadaId:int}"), HttpGet]
|
||||
public IHttpActionResult UnsubscribeScada(int scadaId)
|
||||
{
|
||||
using (NcAdapter ncAdapter = new NcAdapter())
|
||||
{
|
||||
// Find scada by id
|
||||
ScadaSchemaModel scadaToRemove = SubscribedScada
|
||||
.Where(x => x.Id == scadaId)
|
||||
.FirstOrDefault();
|
||||
// Find scada by id
|
||||
ScadaSchemaModel scadaToRemove = SubscribedScada
|
||||
.Where(x => x.Id == scadaId)
|
||||
.FirstOrDefault();
|
||||
|
||||
if (scadaToRemove == null)
|
||||
return BadRequest();
|
||||
// Remove from the subiscriber list
|
||||
SubscribedScada.Remove(scadaToRemove);
|
||||
if (scadaToRemove == null)
|
||||
return BadRequest();
|
||||
// Remove from the subiscriber list
|
||||
SubscribedScada.Remove(scadaToRemove);
|
||||
|
||||
return Ok();
|
||||
}
|
||||
return Ok();
|
||||
}
|
||||
|
||||
[Route("production"), HttpGet]
|
||||
public IHttpActionResult GetProductionPageList()
|
||||
{
|
||||
using (NcAdapter ncAdapter = new NcAdapter())
|
||||
ncAdapter.Connect();
|
||||
CmsError libraryError = ncAdapter.ReadScadasData(ProductionScadaSchema, out List<DTOScadaModel> values);
|
||||
if (libraryError.IsError())
|
||||
return BadRequest(libraryError.localizationKey);
|
||||
|
||||
|
||||
ScadaDataAndSchema data = new ScadaDataAndSchema()
|
||||
{
|
||||
ncAdapter.Connect();
|
||||
CmsError libraryError = ncAdapter.ReadScadasData(ProductionScadaSchema, out List<DTOScadaModel> values);
|
||||
if (libraryError.IsError())
|
||||
return BadRequest(libraryError.localizationKey);
|
||||
schemes = ProductionScadaSchema,
|
||||
values = values
|
||||
};
|
||||
|
||||
|
||||
ScadaDataAndSchema data = new ScadaDataAndSchema()
|
||||
{
|
||||
schemes = ProductionScadaSchema,
|
||||
values = values
|
||||
};
|
||||
|
||||
return Ok(data);
|
||||
}
|
||||
return Ok(data);
|
||||
}
|
||||
|
||||
[Route("write"), HttpPost]
|
||||
@@ -141,16 +138,13 @@ namespace Thermo.Active.Controllers.WebApi
|
||||
}
|
||||
}
|
||||
|
||||
using (NcAdapter ncAdapter = new NcAdapter())
|
||||
{
|
||||
ncAdapter.Connect();
|
||||
if (memIndex == "")
|
||||
return BadRequest(INCORRECT_PARAMETERS_ERROR.localizationKey);
|
||||
ncAdapter.Connect();
|
||||
if (memIndex == "")
|
||||
return BadRequest(INCORRECT_PARAMETERS_ERROR.localizationKey);
|
||||
|
||||
CmsError libraryError = ncAdapter.WriteScada(memIndex, memType, value);
|
||||
if (libraryError.IsError())
|
||||
return BadRequest(libraryError.localizationKey);
|
||||
}
|
||||
CmsError libraryError = ncAdapter.WriteScada(memIndex, memType, value);
|
||||
if (libraryError.IsError())
|
||||
return BadRequest(libraryError.localizationKey);
|
||||
|
||||
return Ok();
|
||||
}
|
||||
|
||||
@@ -233,9 +233,9 @@ namespace Thermo.Active.Controllers.WebApi
|
||||
try
|
||||
{
|
||||
// ora salvo ANCHE i dati live...
|
||||
RecipeLiveData.ChannelSetpoints = chSetpoints;
|
||||
NcFileAdapter.RecipeLiveData.ChannelSetpoints = chSetpoints;
|
||||
// e salvo su disco
|
||||
ServerConfigController.SaveRecipeCurrent();
|
||||
NcFileAdapter.SaveRecipeCurrent();
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
general_sizes_sheet_material_RE_01,Materiale UNO
|
||||
general_sizes_sheet_material_RE_02,Materiale DUE
|
||||
general_sizes_sheet_material_RE_03,Materiale TRE
|
||||
@@ -0,0 +1,349 @@
|
||||
mb_DiscesaCZ,CZ↓
|
||||
mb_MembDiscesaZ,Z↓
|
||||
mb_MembZ,Controstampo
|
||||
mb_Mod_MembSalitaZ,Z↑
|
||||
mb_Mod_AppoggioDiscesaW,W↓
|
||||
mb_Mod_RiscaldoInf,Riscaldo inferiore
|
||||
mb_Mod_RiscaldoSup,Riscaldo superiore
|
||||
mb_Mod_PirometroRisc,Pirometro riscaldo
|
||||
mb_Mod_DecompSustain,Decompressione/Sostentamento
|
||||
mb_Mod_Acrilico,Acrilico
|
||||
mb_Mod_RiscaldiIndietro,RS←
|
||||
mb_Mod_ExtraR,Riscaldo superiore aggiuntivo
|
||||
mb_Mod_Imbutitura,Imbutitura
|
||||
mb_Mod_SalitaW,W↑
|
||||
mb_Mod_AttesaStampo,Attesa stampo
|
||||
mb_Mod_Raffreddamento,Raffreddamento
|
||||
mb_Mod_PirometroRaffr,Pirometro raffreddamento
|
||||
mb_Mod_Vuoto,Vuoto
|
||||
mb_Mod_VuotoDiretto,Vuoto diretto
|
||||
mb_Mod_VuotoAux,Vuoto ausiliario
|
||||
mb_Mod_Nebulizz,Nebulizzatori
|
||||
mb_Mod_AttesaPartenzaZ,Attesa partenza Z
|
||||
mb_Mod_DiscesaZ,Z↓
|
||||
mb_Mod_Z,Controstampo basso
|
||||
mb_Mod_SalitaZ,Z↑
|
||||
mb_Mod_AriaZ,Aria controstampo
|
||||
mb_Mod_VuotoZ,Vuoto controstampo
|
||||
mb_Mod_ScaricoVuotoZ,Scarico vuoto controstampo
|
||||
mb_Mod_ScaricoVuoto,Scarico vuoto
|
||||
mb_Mod_EstrazioneZ,Estrazione controstampo
|
||||
mb_Mod_DiscesaAssistZ,Z↓
|
||||
mb_Mod_Estrazione,Estrazione
|
||||
mb_Mod_DiscesaW,W↓
|
||||
mb_Mod_RiscaldiIndietro2,RS←
|
||||
mb_Mod_SalitaCZ,CZ↑
|
||||
mb_Mod_Riscaldi2,Secondo riscaldo
|
||||
mb_Mod_Estrazione_Aux_W,Estrazione ausiliaria
|
||||
mb_Mod_Attesa_Pirometro,Attesa pirometro
|
||||
mb_Mod_Prevuoto,Prevuoto
|
||||
mb_Mod_SalitaAssistZ,Z↑
|
||||
general_sizes_mould_dim_x,Larghezza stampo
|
||||
general_sizes_mould_dim_y,Profondità stampo
|
||||
general_sizes_mould_max_height,Altezza massima stampo
|
||||
general_sizes_mould_min_height,Altezza minima stampo
|
||||
general_sizes_mould_base_height,Altezza base stampo
|
||||
general_sizes_sheet_material,Materiale
|
||||
general_sizes_sheet_dim_x,Larghezza lastra
|
||||
general_sizes_sheet_dim_y,Profondità lastra
|
||||
general_sizes_sheet_thickness,Spessore lastra
|
||||
general_sizes_plate_type,Piastrafinestra
|
||||
general_sizes_plate_dim_x,Larghezza piastrafinestra
|
||||
general_sizes_plate_dim_y,Profondità piastrafinestra
|
||||
general_sizes_frame_traverses,Traversino
|
||||
general_sizes_frame_dim_x,Larghezza cornice
|
||||
general_sizes_frame_dim_y,Profondità cornice
|
||||
general_sizes_upperplate_max_height,Altezza controstampo
|
||||
general_area_working_dxsx,Zona di lavoro
|
||||
positions_mould_lower_position,Quota stampo basso
|
||||
positions_mould_lower_speed,Velocità discesa
|
||||
positions_mould_intermediate_position,Quota stampo intermedio
|
||||
positions_mould_upper_position,Quota stampo alto
|
||||
positions_mould_upper_speed,Velocità salita
|
||||
positions_mould_upperdeceleration_position,Quota rallentamento salita
|
||||
positions_mould_upperdeceleration_speed,Velocità rallentamento salita
|
||||
positions_mould_lowerdeceleration_position,Quota rallentamento discesa
|
||||
positions_mould_lowerdeceleration_speed,Velocità rallentamento discesa
|
||||
positions_frame_lower_position,Quota cornice bassa
|
||||
positions_frame_lower_speed,Velocità discesa
|
||||
positions_frame_upper_position,Quota cornice alta
|
||||
positions_frame_upper_speed,Velocità salita
|
||||
positions_frame_intermediate_position,Quota cornice intermedia
|
||||
positions_frame_intermediate_speed,Velocità per quota intermedia
|
||||
positions_frame_unload_position,Quota cornice scarico
|
||||
positions_upperplate_lower_position,Quota controstampo basso
|
||||
positions_upperplate_lower_speed,Velocità discesa stampo
|
||||
positions_upperplate_upper_position,Quota controstampo alto
|
||||
positions_upperplate_upper_speed,Velocità salita controstampo
|
||||
positions_upperplate_upperdeceleration_position,Quota rallentamento salita controstampo
|
||||
positions_upperplate_upperdeceleration_speed,Velocità rallentamento salita controstampo
|
||||
positions_upperplate_lowerdeceleration_position,Quota rallentamento discesa controstampo
|
||||
positions_upperplate_lowerdeceleration_speed,Velocità rallentamento diescesa controstampo
|
||||
cycle_forming_type,Tipo ciclo
|
||||
cycle_forming_pause_cycle,Pausa ciclo
|
||||
cycle_forming_cooling_enabled,Raffreddamento a fine ciclo
|
||||
cycle_forming_blowingbox_enabled,Ventilazione cassone a fine ciclo
|
||||
cycle_acrylicframe_enabled,Acrilico
|
||||
cycle_acrylicframe_time,Durata acrilico
|
||||
cycle_upperoverheating_enabled,Abilitazione riscaldo superiore supplementare
|
||||
cycle_upperoverheating_time,Durata riscaldo superiore supplementare
|
||||
cycle_crystallisation_type,Secondo riscaldo
|
||||
cycle_crystallisation_time,Durata secondo riscaldo
|
||||
cycle_loader_enable,Caricatore
|
||||
cycle_loader_lifter_lowerposition_delay,Ritardo discesa sollevatore
|
||||
cycle_loader_lifter_upperposition_delay,Ritardo salita sollevatore
|
||||
cycle_loader_split_sheet_time,Ritardo distacco lastra
|
||||
cycle_loader_ejector_position,Quota espulsione
|
||||
cycle_loader_pallet_height,Altezza bancale
|
||||
cycle_loader_center_x,Centratura X
|
||||
cycle_loader_center_y,Centratura Y
|
||||
cycle_loader_checktichness_enabled,Controllo spessore
|
||||
cycle_loader_suckers_vacuum,Abilitazione vuoto ventose
|
||||
cycle_loader_ionizer_enabled,Abilitazione ionizzatore
|
||||
cycle_loader_manualunloading_enabled,Scarico manuale
|
||||
heats_lowerheaters_max_time,Durata massima riscaldo inferiore
|
||||
heats_lowerheaters_movement_enabled,Movimento riscaldo inferiore
|
||||
heats_lowerheaters_enabled,Accensione riscaldo inferiore
|
||||
heats_lowerheaters_oscillation,Oscillazione riscaldo inferiore
|
||||
heats_upperheaters_max_time,Durata massima riscaldo superiore
|
||||
heats_upperheaters_movement_enabled,Movimento riscaldo superiore
|
||||
heats_upperheaters_enabled,Accensione riscaldo superiore
|
||||
heats_upperheaters_oscillation,Oscillazione riscaldo superiore
|
||||
heats_decomsustain_type,Tipo decompressione/sostentamento
|
||||
heats_decomsustain_decompression_flow,Portata sostentamento
|
||||
heats_decomsustain_min_blowing_time,Durata minimo soffio
|
||||
heats_decomsustain_sustain_delay,Ritardo sostentamento
|
||||
heats_decomsustain_decompression_delay,Ritardo decompressione
|
||||
heats_decomsustain_decompression_duration,Durata decompressione
|
||||
heats_decomsustain_smoke_function_enabled,Funzione fumo
|
||||
pyrometer_pyrometer_enabled,Abilitazione pirometro
|
||||
pyrometer_pyrometer_setpoint,Setpoint pirometro
|
||||
pyrometer_pyrometer_delay,Ritardo pirometro
|
||||
pyrometer_upperthermoregulator_start_adjustment,Inizio termoregolazione
|
||||
pyrometer_upperthermoregulator_end_adjustment,Fine termoregolazione
|
||||
pyrometer_upperthermoregulator_min_percentage,Percentuale minima
|
||||
pyrometer_upperthermoregulator_max_percentage,Percentuale massima
|
||||
pyrometer_upperthermoregulator_sleep_enabled,Abilitazione riposo
|
||||
pyrometer_upperthermoregulator_sleep_percentage,Percentuale riposo
|
||||
pyrometer_lowerthermoregulator_start_adjustment,Inizio termoregolazione
|
||||
pyrometer_lowerthermoregulator_end_adjustment,Fine termoregolazione
|
||||
pyrometer_lowerthermoregulator_min_percentage,Percentuale minima
|
||||
pyrometer_lowerthermoregulator_max_percentage,Percentuale massima
|
||||
pyrometer_lowerthermoregulator_sleep_enabled,Abilitazione riposo
|
||||
pyrometer_lowerthermoregulator_sleep_percentage,Percentuale riposo
|
||||
pyrometer_upperthermoregulator_sleep_temperature,Temperatura riposo
|
||||
pyrometer_upperthermoregulator_working_temperature,Temperatura lavoro
|
||||
pyrometer_lowerthermoregulator_sleep_temperature,Temperatura riposo
|
||||
pyrometer_lowerthermoregulator_working_temperature,Temperatura lavoro
|
||||
drawing_type,Tipo imbutitura
|
||||
drawing_height,Altezza bolla
|
||||
drawing_delay,Ritardo imbutitura
|
||||
drawing_1_chart_setpointx,Durata
|
||||
drawing_1_chart_setpointy,Portata
|
||||
drawing_photocell,Scelta fotocellula
|
||||
drawing_mantaining_flow,Portata mantenimento
|
||||
drawing_manual,Portata manuale
|
||||
drawing_mould_up_delay,Ritardo salita stampo
|
||||
upperplate_cycle_type,Tipo ciclo controstampo
|
||||
upperplate_cycle_delay,Ritardo ciclo controstampo
|
||||
upperplate_cycle_time,Durata ciclo controstampo
|
||||
upperplate_air_enable,Abilitazione
|
||||
upperplate_air_delay,Ritardo
|
||||
upperplate_air_max_time,Durata massima
|
||||
upperplate_air_1_chart_setpointx,Durata 1
|
||||
upperplate_air_1_chart_setpointy,Portata 1
|
||||
upperplate_air_2_chart_setpointx,Durata 2
|
||||
upperplate_air_2_chart_setpointy,Portata 2
|
||||
upperplate_air_3_chart_setpointx,Durata 3
|
||||
upperplate_air_3_chart_setpointy,Portata 3
|
||||
upperplate_air_manual,Portata manuale
|
||||
upperplate_vacuum_enable,Abilitazione
|
||||
upperplate_vacuum_delay,Ritardo
|
||||
upperplate_vacuum_max_time,Durata massima
|
||||
upperplate_vacuum_1_chart_setpointx,Durata 1
|
||||
upperplate_vacuum_1_chart_setpointy,Portata 1
|
||||
upperplate_vacuum_2_chart_setpointx,Durata 2
|
||||
upperplate_vacuum_2_chart_setpointy,Portata 2
|
||||
upperplate_vacuum_3_chart_setpointx,Durata 3
|
||||
upperplate_vacuum_3_chart_setpointy,Portata 3
|
||||
upperplate_vacuum_manual,Portata manuale
|
||||
upperplate_extraction_enable,Abilitazione
|
||||
upperplate_extraction_delay,Ritardo
|
||||
upperplate_extraction_1_chart_setpointx,Durata
|
||||
upperplate_extraction_1_chart_setpointy,Portata
|
||||
upperplate_extraction_manual,Portata manuale
|
||||
cooling_blowing_type,Ventilatori
|
||||
cooling_blowing_delay,Ritardo
|
||||
cooling_blowing_time,Durata
|
||||
cooling_pyrometer_enabled,Abilitazione
|
||||
cooling_pyrometer_setpoint,Setpoint
|
||||
cooling_pyrometer_delay,Ritardo
|
||||
cooling_nebulizer_type,Nebulizzatori
|
||||
cooling_nebulizer_delay,Ritardo
|
||||
cooling_nebulizer_time,Durata
|
||||
cooling_telescopic_enable,Abilitazione telescopici
|
||||
cooling_telescopic_position,Posizione telescopici
|
||||
cooling_telescopic_swing_enable,Oscillazione telescopici
|
||||
cooling_telescopic_swing_stroke,Corsa oscillazione
|
||||
cooling_shutter_1_opening_perc,Apertura 1
|
||||
cooling_shutter_2_opening_perc,Apertura 2
|
||||
cooling_shutter_3_opening_perc,Apertura 3
|
||||
cooling_shutter_4_opening_perc,Apertura 4
|
||||
cooling_shutter_5_opening_perc,Apertura 5
|
||||
cooling_shutter_6_opening_perc,Apertura 6
|
||||
cooling_shutter_7_opening_perc,Apertura 7
|
||||
cooling_shutter_8_opening_perc,Apertura 8
|
||||
cooling_shutter_9_opening_perc,Apertura 9
|
||||
cooling_shutter_10_opening_perc,Apertura 10
|
||||
cooling_shutter_11_opening_perc,Apertura 11
|
||||
cooling_shutter_12_opening_perc,Apertura 12
|
||||
cooling_shutter_13_opening_perc,Apertura 13
|
||||
cooling_shutter_14_opening_perc,Apertura 14
|
||||
cooling_shutter_15_opening_perc,Apertura 15
|
||||
cooling_shutter_16_opening_perc,Apertura 16
|
||||
vacuum_main_start,Partenza vuoto
|
||||
vacuum_main_delay,Ritardo vuoto
|
||||
vacuum_main_max_time,Durata massima
|
||||
vacuum_main_1_chart_setpointx,Durata 1
|
||||
vacuum_main_1_chart_setpointy,Portata 1
|
||||
vacuum_main_2_chart_setpointx,Durata 2
|
||||
vacuum_main_2_chart_setpointy,Portata 2
|
||||
vacuum_main_3_chart_setpointx,Durata 3
|
||||
vacuum_main_3_chart_setpointy,Portata 3
|
||||
vacuum_main_manual,Portata manuale
|
||||
vacuum_direct_enabled,Abilitazione
|
||||
vacuum_direct_delay,Ritardo
|
||||
vacuum_direct_time,Durata
|
||||
vacuum_aux_enabled,Abilitazione
|
||||
vacuum_aux_delay,Ritardo
|
||||
vacuum_aux_max_time,Durata massima
|
||||
vacuum_aux_1_chart_setpointx,Durata 1
|
||||
vacuum_aux_1_chart_setpointy,Portata 1
|
||||
vacuum_aux_2_chart_setpointx,Durata 2
|
||||
vacuum_aux_2_chart_setpointy,Portata 2
|
||||
vacuum_aux_3_chart_setpointx,Durata 3
|
||||
vacuum_aux_3_chart_setpointy,Portata 3
|
||||
vacuum_aux_manual,Portata manuale
|
||||
vacuum_pre_enabled,Abilitazione
|
||||
vacuum_pre_delay,Ritardo
|
||||
vacuum_pre_max_time,Durata massima
|
||||
vacuum_pre_1_chart_setpointx,Durata 1
|
||||
vacuum_pre_1_chart_setpointy,Portata 1
|
||||
vacuum_pre_2_chart_setpointx,Durata 2
|
||||
vacuum_pre_2_chart_setpointy,Portata 2
|
||||
vacuum_pre_3_chart_setpointx,Durata 3
|
||||
vacuum_pre_3_chart_setpointy,Durata 3
|
||||
extraction_main_type,Tipo estrazione
|
||||
extraction_main_mould_dw_delay,Ritardo discesa stampo
|
||||
extraction_main_delay,Ritardo
|
||||
extraction_main_1_chart_setpointx,Durata
|
||||
extraction_main_1_chart_setpointy,Portata
|
||||
extraction_main_manual,Portata manuale
|
||||
extraction_aux_enabled,Abilitazione
|
||||
extraction_aux_delay,Ritardo
|
||||
extraction_aux_1_chart_setpointx,Durata
|
||||
extraction_aux_1_chart_setpointy,Portata
|
||||
extraction_aux_manual,Portata manuale
|
||||
options_undercutmould_1_mode,Modalità
|
||||
options_undercutmould_1_position,Quota
|
||||
options_undercutmould_1_delay_acti,Ritardo attivazione
|
||||
options_undercutmould_1_delay_dis,Ritardo disattivazione
|
||||
options_undercutmould_2_mode,Modalità
|
||||
options_undercutmould_2_position,Quota
|
||||
options_undercutmould_2_delay_acti,Ritardo attivazione
|
||||
options_undercutmould_2_delay_dis,Ritardo disattivazione
|
||||
options_undercutmould_3_mode,Modalità
|
||||
options_undercutmould_3_position,Quota
|
||||
options_undercutmould_3_delay_acti,Ritardo attivazione
|
||||
options_undercutmould_3_delay_dis,Ritardo disattivazione
|
||||
options_undercutmould_4_mode,Modalità
|
||||
options_undercutmould_4_position,Quota
|
||||
options_undercutmould_4_delay_acti,Ritardo attivazione
|
||||
options_undercutmould_4_delay_dis,Ritardo disattivazione
|
||||
options_undercutmould_5_mode,Modalità
|
||||
options_undercutmould_5_position,Quota
|
||||
options_undercutmould_5_delay_acti,Ritardo attivazione
|
||||
options_undercutmould_5_delay_dis,Ritardo disattivazione
|
||||
options_undercutmould_6_mode,Modalità
|
||||
options_undercutmould_6_position,Quota
|
||||
options_undercutmould_6_delay_acti,Ritardo attivazione
|
||||
options_undercutmould_6_delay_dis,Ritardo disattivazione
|
||||
options_undercutmould_7_mode,Modalità
|
||||
options_undercutmould_7_position,Quota
|
||||
options_undercutmould_7_delay_acti,Ritardo attivazione
|
||||
options_undercutmould_7_delay_dis,Ritardo disattivazione
|
||||
options_undercutmould_8_mode,Modalità
|
||||
options_undercutmould_8_position,Quota
|
||||
options_undercutmould_8_delay_acti,Ritardo attivazione
|
||||
options_undercutmould_8_delay_dis,Ritardo disattivazione
|
||||
options_undercutmould_9_mode,Modalità
|
||||
options_undercutmould_9_position,Quota
|
||||
options_undercutmould_9_delay_acti,Ritardo attivazione
|
||||
options_undercutmould_9_delay_dis,Ritardo disattivazione
|
||||
options_undercutmould_10_mode,Modalità
|
||||
options_undercutmould_10_position,Quota
|
||||
options_undercutmould_10_delay_acti,Ritardo attivazione
|
||||
options_undercutmould_10_delay_dis,Ritardo disattivazione
|
||||
options_undercutupperplate_1_mode,Modalità
|
||||
options_undercutupperplate_1_position,Quota
|
||||
options_undercutupperplate_1_delay_acti,Ritardo attivazione
|
||||
options_undercutupperplate_1_delay_dis,Ritardo disattivazione
|
||||
options_undercutupperplate_2_mode,Modalità
|
||||
options_undercutupperplate_2_position,Quota
|
||||
options_undercutupperplate_2_delay_acti,Ritardo attivazione
|
||||
options_undercutupperplate_2_delay_dis,Ritardo disattivazione
|
||||
options_undercutupperplate_3_mode,Modalità
|
||||
options_undercutupperplate_3_position,Quota
|
||||
options_undercutupperplate_3_delay_acti,Ritardo attivazione
|
||||
options_undercutupperplate_3_delay_dis,Ritardo disattivazione
|
||||
options_undercutupperplate_4_mode,Modalità
|
||||
options_undercutupperplate_4_position,Quota
|
||||
options_undercutupperplate_4_delay_acti,Ritardo attivazione
|
||||
options_undercutupperplate_4_delay_dis,Ritardo disattivazione
|
||||
options_undercutupperplate_5_mode,Modalità
|
||||
options_undercutupperplate_5_position,Quota
|
||||
options_undercutupperplate_5_delay_acti,Ritardo attivazione
|
||||
options_undercutupperplate_5_delay_dis,Ritardo disattivazione
|
||||
options_undercutupperplate_6_mode,Modalità
|
||||
options_undercutupperplate_6_position,Quota
|
||||
options_undercutupperplate_6_delay_acti,Ritardo attivazione
|
||||
options_undercutupperplate_6_delay_dis,Ritardo disattivazione
|
||||
options_undercutupperplate_7_mode,Modalità
|
||||
options_undercutupperplate_7_position,Quota
|
||||
options_undercutupperplate_7_delay_acti,Ritardo attivazione
|
||||
options_undercutupperplate_7_delay_dis,Ritardo disattivazione
|
||||
options_undercutupperplate_8_mode,Modalità
|
||||
options_undercutupperplate_8_position,Quota
|
||||
options_undercutupperplate_8_delay_acti,Ritardo attivazione
|
||||
options_undercutupperplate_8_delay_dis,Ritardo disattivazione
|
||||
options_undercutupperplate_9_mode,Modalità
|
||||
options_undercutupperplate_9_position,Quota
|
||||
options_undercutupperplate_9_delay_acti,Ritardo attivazione
|
||||
options_undercutupperplate_9_delay_dis,Ritardo disattivazione
|
||||
options_undercutupperplate_10_mode,Modalità
|
||||
options_undercutupperplate_10_position,Quota
|
||||
options_undercutupperplate_10_delay_acti,Ritardo attivazione
|
||||
options_undercutupperplate_10_delay_dis,Ritardo disattivazione
|
||||
options_thermoregulator_1_enabled,Abilitazione
|
||||
options_thermoregulator_1_setpoint,Setpoint
|
||||
options_thermoregulator_2_enabled,Abilitazione
|
||||
options_thermoregulator_2_setpoint,Setpoint
|
||||
options_thermoregulator_3_enabled,Abilitazione
|
||||
options_thermoregulator_3_setpoint,Setpoint
|
||||
options_thermoregulator_4_enabled,Abilitazione
|
||||
options_thermoregulator_4_setpoint,Setpoint
|
||||
options_thermoregulator_5_enabled,Abilitazione
|
||||
options_thermoregulator_5_setpoint,Setpoint
|
||||
options_thermoregulator_6_enabled,Abilitazione
|
||||
options_thermoregulator_6_setpoint,Setpoint
|
||||
options_thermoregulator_7_enabled,Abilitazione
|
||||
options_thermoregulator_7_setpoint,Setpoint
|
||||
options_thermoregulator_8_enabled,Abilitazione
|
||||
options_thermoregulator_8_setpoint,Setpoint
|
||||
options_thermoregulator_9_enabled,Abilitazione
|
||||
options_thermoregulator_9_setpoint,Setpoint
|
||||
options_thermoregulator_10_enabled,Abilitazione
|
||||
options_thermoregulator_10_setpoint,Setpoint
|
||||
gauge_potenza,potenza
|
||||
gauge_vuoto,vuoto
|
||||
gauge_aria,aria
|
||||
@@ -0,0 +1,650 @@
|
||||
001, ALLARME ASSE ID W1
|
||||
002, ALLARME ASSE ID W2
|
||||
003, ALLARME ASSE ID W3
|
||||
004, ALLARME ASSE ID W4
|
||||
005, ALLARME ASSE ID Z1
|
||||
006, ALLARME ASSE ID Z2
|
||||
007, ALLARME ASSE ID Z3
|
||||
008, ALLARME ASSE ID Z4
|
||||
009, ALLARME ASSE ID R1
|
||||
010, ALLARME ASSE ID R2
|
||||
011, ALLARME ASSE ID S1
|
||||
012, ALLARME ASSE ID S2
|
||||
013, ALLARME ASSE ID CZ1
|
||||
014, ALLARME ASSE ID CZ2
|
||||
015, ALLARME ASSE ID CZ3
|
||||
016, ALLARME ASSE ID CZ4
|
||||
017, ALLARME ASSE ID U1
|
||||
018, ALLARME ASSE ID U2
|
||||
019, ALLARME ASSE ID P
|
||||
020, ALLARME ASSE ID X
|
||||
021, ALLARME ASSE ID CX1
|
||||
022, ALLARME ASSE ID CX2
|
||||
023, ALLARME ASSE ID CY1
|
||||
024, ALLARME ASSE ID CY2
|
||||
025, ALLARME ASSE ID F1
|
||||
026, ALLARME ASSE ID F2
|
||||
027, ALLARME ASSE ID F3
|
||||
028, ALLARME ASSE ID F4
|
||||
029, ALLARME ASSE ID F11
|
||||
030, ALLARME ASSE ID F12
|
||||
031, ALLARME ASSE ID F13
|
||||
032, ALLARME ASSE ID F14
|
||||
033, ALLARME ASSE ID E
|
||||
034, ALLARME ASSE ID M
|
||||
035, ALLARME ASSE ID 35
|
||||
036, ALLARME ASSE ID 36
|
||||
037, ALLARME ASSE ID 37
|
||||
038, ALLARME ASSE ID 38
|
||||
039, ALLARME ASSE ID 39
|
||||
040, ALLARME ASSE ID 40
|
||||
041, ALLARME ASSE ID 41
|
||||
042, ALLARME ASSE ID 42
|
||||
043, ALLARME ASSE ID 43
|
||||
044, ALLARME ASSE ID 44
|
||||
045, ALLARME ASSE ID 45
|
||||
046, ALLARME ASSE ID 46
|
||||
047, ALLARME ASSE ID 47
|
||||
048, ALLARME ASSE ID 48
|
||||
049, ALLARME ASSE ID 49
|
||||
050, ALLARME ASSE ID 50
|
||||
051, ALLARME ASSE ID 51
|
||||
052, ALLARME ASSE ID 52
|
||||
053, ALLARME ASSE ID 53
|
||||
054, ALLARME ASSE ID 54
|
||||
055, ALLARME ASSE ID 55
|
||||
056, ALLARME ASSE ID 56
|
||||
057, ALLARME ASSE ID 57
|
||||
058, ALLARME ASSE ID 58
|
||||
059, ALLARME ASSE ID 59
|
||||
060, ALLARME ASSE ID 60
|
||||
061, ALLARME ASSE ID 61
|
||||
062, ALLARME ASSE ID 62
|
||||
063, ALLARME ASSE ID 63
|
||||
064, ALLARME ASSE ID 64
|
||||
065, UNO O PIU' ASSI NON RIFERITI
|
||||
066, UNO O PIU' GANTRY DISALLINEATI
|
||||
067, UNO O PIU' GANTRY IN ERRORE
|
||||
068, TEST FRENO FALLITO - CONTATTARE CMS
|
||||
069, Message Not found N.69
|
||||
070, Message Not found N.70
|
||||
071, Message Not found N.71
|
||||
072, Message Not found N.72
|
||||
073, Message Not found N.73
|
||||
074, Message Not found N.74
|
||||
075, Message Not found N.75
|
||||
076, Message Not found N.76
|
||||
077, Message Not found N.77
|
||||
078, Message Not found N.78
|
||||
079, Message Not found N.79
|
||||
080, Message Not found N.80
|
||||
081, Message Not found N.81
|
||||
082, Message Not found N.82
|
||||
083, Message Not found N.83
|
||||
084, Message Not found N.84
|
||||
085, Message Not found N.85
|
||||
086, Message Not found N.86
|
||||
087, Message Not found N.87
|
||||
088, Message Not found N.88
|
||||
089, Message Not found N.89
|
||||
090, Message Not found N.90
|
||||
091, Message Not found N.91
|
||||
092, Message Not found N.92
|
||||
093, Message Not found N.93
|
||||
094, Message Not found N.94
|
||||
095, Message Not found N.95
|
||||
096, Message Not found N.96
|
||||
097, Message Not found N.97
|
||||
098, Message Not found N.98
|
||||
099, Message Not found N.99
|
||||
100, Message Not found N.100
|
||||
101, Message Not found N.101
|
||||
102, Message Not found N.102
|
||||
103, Message Not found N.103
|
||||
104, Message Not found N.104
|
||||
105, Message Not found N.105
|
||||
106, Message Not found N.106
|
||||
107, Message Not found N.107
|
||||
108, Message Not found N.108
|
||||
109, Message Not found N.109
|
||||
110, Message Not found N.110
|
||||
111, Message Not found N.111
|
||||
112, Message Not found N.112
|
||||
113, Message Not found N.113
|
||||
114, Message Not found N.114
|
||||
115, Message Not found N.115
|
||||
116, Message Not found N.116
|
||||
117, Message Not found N.117
|
||||
118, Message Not found N.118
|
||||
119, Message Not found N.119
|
||||
120, Message Not found N.120
|
||||
121, Message Not found N.121
|
||||
122, Message Not found N.122
|
||||
123, Message Not found N.123
|
||||
124, Message Not found N.124
|
||||
125, Message Not found N.125
|
||||
126, Message Not found N.126
|
||||
127, Message Not found N.127
|
||||
128, Message Not found N.128
|
||||
129, Message Not found N.129
|
||||
130, Message Not found N.130
|
||||
131, Message Not found N.131
|
||||
132, Message Not found N.132
|
||||
133, Message Not found N.133
|
||||
134, Message Not found N.134
|
||||
135, Message Not found N.135
|
||||
136, Message Not found N.136
|
||||
137, Message Not found N.137
|
||||
138, Message Not found N.138
|
||||
139, Message Not found N.139
|
||||
140, Message Not found N.140
|
||||
141, Message Not found N.141
|
||||
142, Message Not found N.142
|
||||
143, Message Not found N.143
|
||||
144, Message Not found N.144
|
||||
145, Message Not found N.145
|
||||
146, Message Not found N.146
|
||||
147, Message Not found N.147
|
||||
148, Message Not found N.148
|
||||
149, Message Not found N.149
|
||||
150, Message Not found N.150
|
||||
151, Message Not found N.151
|
||||
152, Message Not found N.152
|
||||
153, Message Not found N.153
|
||||
154, Message Not found N.154
|
||||
155, Message Not found N.155
|
||||
156, Message Not found N.156
|
||||
157, Message Not found N.157
|
||||
158, Message Not found N.158
|
||||
159, Message Not found N.159
|
||||
160, Message Not found N.160
|
||||
161, Message Not found N.161
|
||||
162, Message Not found N.162
|
||||
163, Message Not found N.163
|
||||
164, Message Not found N.164
|
||||
165, Message Not found N.165
|
||||
166, Message Not found N.166
|
||||
167, Message Not found N.167
|
||||
168, Message Not found N.168
|
||||
169, Message Not found N.169
|
||||
170, Message Not found N.170
|
||||
171, Message Not found N.171
|
||||
172, Message Not found N.172
|
||||
173, Message Not found N.173
|
||||
174, Message Not found N.174
|
||||
175, Message Not found N.175
|
||||
176, Message Not found N.176
|
||||
177, Message Not found N.177
|
||||
178, Message Not found N.178
|
||||
179, Message Not found N.179
|
||||
180, Message Not found N.180
|
||||
181, Message Not found N.181
|
||||
182, Message Not found N.182
|
||||
183, Message Not found N.183
|
||||
184, Message Not found N.184
|
||||
185, Message Not found N.185
|
||||
186, Message Not found N.186
|
||||
187, Message Not found N.187
|
||||
188, Message Not found N.188
|
||||
189, Message Not found N.189
|
||||
190, Message Not found N.190
|
||||
191, Message Not found N.191
|
||||
192, Message Not found N.192
|
||||
193, Message Not found N.193
|
||||
194, Message Not found N.194
|
||||
195, Message Not found N.195
|
||||
196, Message Not found N.196
|
||||
197, Message Not found N.197
|
||||
198, Message Not found N.198
|
||||
199, Message Not found N.199
|
||||
200, PARAMETRI NON INIZIALIZZATI
|
||||
201, ERRORE COMUNICAZIONE PLC
|
||||
202, ERRORE DI COMUNICAZIONE PROFINET
|
||||
203, ERRORE DI COMUNICAZIONE TERMOREGOLATORI
|
||||
204, ERRORE DI COMUNICAZIONE TASTIERA
|
||||
205, ERRORE DI COMUNICAZIONE RIFLETTORI
|
||||
206, Message Not found N.206
|
||||
207, Message Not found N.207
|
||||
208, Message Not found N.208
|
||||
209, Message Not found N.209
|
||||
210, Message Not found N.210
|
||||
211, Message Not found N.211
|
||||
212, Message Not found N.212
|
||||
213, Message Not found N.213
|
||||
214, Message Not found N.214
|
||||
215, Message Not found N.215
|
||||
216, Message Not found N.216
|
||||
217, Message Not found N.217
|
||||
218, Message Not found N.218
|
||||
219, Message Not found N.219
|
||||
220, Message Not found N.220
|
||||
221, Message Not found N.221
|
||||
222, Message Not found N.222
|
||||
223, Message Not found N.223
|
||||
224, Message Not found N.224
|
||||
225, Message Not found N.225
|
||||
226, Message Not found N.226
|
||||
227, Message Not found N.227
|
||||
228, Message Not found N.228
|
||||
229, Message Not found N.229
|
||||
230, Message Not found N.230
|
||||
231, Message Not found N.231
|
||||
232, Message Not found N.232
|
||||
233, Message Not found N.233
|
||||
234, Message Not found N.234
|
||||
235, Message Not found N.235
|
||||
236, Message Not found N.236
|
||||
237, Message Not found N.237
|
||||
238, Message Not found N.238
|
||||
239, Message Not found N.239
|
||||
240, Message Not found N.240
|
||||
241, Message Not found N.241
|
||||
242, Message Not found N.242
|
||||
243, Message Not found N.243
|
||||
244, Message Not found N.244
|
||||
245, Message Not found N.245
|
||||
246, Message Not found N.246
|
||||
247, Message Not found N.247
|
||||
248, Message Not found N.248
|
||||
249, Message Not found N.249
|
||||
250, Message Not found N.250
|
||||
251, Message Not found N.251
|
||||
252, Message Not found N.252
|
||||
253, Message Not found N.253
|
||||
254, Message Not found N.254
|
||||
255, Message Not found N.255
|
||||
256, Message Not found N.256
|
||||
257, Message Not found N.257
|
||||
258, Message Not found N.258
|
||||
259, Message Not found N.259
|
||||
260, Message Not found N.260
|
||||
261, Message Not found N.261
|
||||
262, Message Not found N.262
|
||||
263, Message Not found N.263
|
||||
264, Message Not found N.264
|
||||
265, Message Not found N.265
|
||||
266, Message Not found N.266
|
||||
267, Message Not found N.267
|
||||
268, Message Not found N.268
|
||||
269, Message Not found N.269
|
||||
270, Message Not found N.270
|
||||
271, Message Not found N.271
|
||||
272, Message Not found N.272
|
||||
273, Message Not found N.273
|
||||
274, Message Not found N.274
|
||||
275, Message Not found N.275
|
||||
276, Message Not found N.276
|
||||
277, Message Not found N.277
|
||||
278, Message Not found N.278
|
||||
279, Message Not found N.279
|
||||
280, Message Not found N.280
|
||||
281, Message Not found N.281
|
||||
282, Message Not found N.282
|
||||
283, Message Not found N.283
|
||||
284, Message Not found N.284
|
||||
285, Message Not found N.285
|
||||
286, Message Not found N.286
|
||||
287, Message Not found N.287
|
||||
288, Message Not found N.288
|
||||
289, Message Not found N.289
|
||||
290, Message Not found N.290
|
||||
291, Message Not found N.291
|
||||
292, Message Not found N.292
|
||||
293, Message Not found N.293
|
||||
294, Message Not found N.294
|
||||
295, Message Not found N.295
|
||||
296, Message Not found N.296
|
||||
297, Message Not found N.297
|
||||
298, Message Not found N.298
|
||||
299, Message Not found N.299
|
||||
300, FOTOCELLULA RISCALDO SUPERIORE
|
||||
301, FOTOCELLULA RISCALDO INFERIORE
|
||||
302, ALLARME SICUREZZA MOVIMENTO CARRELLO
|
||||
303, POSIZIONAMENTO LASTRA NON POSSIBILE
|
||||
304, MALFUNZIONAMENTO VENTILATORE IMBUTITURA/SOSTENTAMENTO
|
||||
305, MALFUNZIONAMENTO VENTILATORE CENTRALIZZATO
|
||||
306, ARRETRAMENTO RISCALDI FALLITO
|
||||
307, ERRORE BLOCCAGGIO TELAIO VENTOSE
|
||||
308, RISCALDO INFERIORE NON IN POSIZIONE
|
||||
309, RISCALDO SUPERIORE NON IN POSIZIONE
|
||||
310, PRESSIONE ARIA INSUFFICIENTE
|
||||
311, CICLO DI RESET MACCHINA RICHIESTO
|
||||
312, Message Not found N.312
|
||||
313, Message Not found N.313
|
||||
314, Message Not found N.314
|
||||
315, Message Not found N.315
|
||||
316, Message Not found N.316
|
||||
317, Message Not found N.317
|
||||
318, Message Not found N.318
|
||||
319, Message Not found N.319
|
||||
320, Message Not found N.320
|
||||
321, Message Not found N.321
|
||||
322, Message Not found N.322
|
||||
323, Message Not found N.323
|
||||
324, Message Not found N.324
|
||||
325, Message Not found N.325
|
||||
326, Message Not found N.326
|
||||
327, Message Not found N.327
|
||||
328, Message Not found N.328
|
||||
329, Message Not found N.329
|
||||
330, Message Not found N.330
|
||||
331, Message Not found N.331
|
||||
332, Message Not found N.332
|
||||
333, Message Not found N.333
|
||||
334, Message Not found N.334
|
||||
335, Message Not found N.335
|
||||
336, Message Not found N.336
|
||||
337, Message Not found N.337
|
||||
338, Message Not found N.338
|
||||
339, Message Not found N.339
|
||||
340, Message Not found N.340
|
||||
341, Message Not found N.341
|
||||
342, Message Not found N.342
|
||||
343, Message Not found N.343
|
||||
344, Message Not found N.344
|
||||
345, Message Not found N.345
|
||||
346, Message Not found N.346
|
||||
347, Message Not found N.347
|
||||
348, Message Not found N.348
|
||||
349, Message Not found N.349
|
||||
350, PRESENZA STAMPATA SU SCARICO
|
||||
351, PRESENZA STAMPATA SU CARRELLO
|
||||
352, ATTESA VUOTO CENTRATORE
|
||||
353, ATTESA VUOTO TELAIO
|
||||
354, LASTRA NON TROVATA
|
||||
355, CICLO AUTOMATICO CON RIFLETTORI SPENTI
|
||||
356, ATTESA PROXY TELAIO ALTO
|
||||
357, PERICOLO COLLISIONE STAMPO/RISCALDO INFERIORE
|
||||
358, PERICOLO COLLISIONE CONTROSTAMPO/RISCALDO SUPERIORE
|
||||
359, PERICOLO COLLISIONE CARRELLO/CORNICE
|
||||
360, PERICOLO COLLISIONE STAMPO/RISCALDO INFERIORE (WENGLOR)
|
||||
361, Message Not found N.361
|
||||
362, Message Not found N.362
|
||||
363, Message Not found N.363
|
||||
364, Message Not found N.364
|
||||
365, Message Not found N.365
|
||||
366, Message Not found N.366
|
||||
367, Message Not found N.367
|
||||
368, Message Not found N.368
|
||||
369, Message Not found N.369
|
||||
370, Message Not found N.370
|
||||
371, Message Not found N.371
|
||||
372, Message Not found N.372
|
||||
373, Message Not found N.373
|
||||
374, Message Not found N.374
|
||||
375, Message Not found N.375
|
||||
376, Message Not found N.376
|
||||
377, Message Not found N.377
|
||||
378, Message Not found N.378
|
||||
379, Message Not found N.379
|
||||
380, Message Not found N.380
|
||||
381, Message Not found N.381
|
||||
382, Message Not found N.382
|
||||
383, Message Not found N.383
|
||||
384, Message Not found N.384
|
||||
385, Message Not found N.385
|
||||
386, Message Not found N.386
|
||||
387, Message Not found N.387
|
||||
388, Message Not found N.388
|
||||
389, Message Not found N.389
|
||||
390, Message Not found N.390
|
||||
391, Message Not found N.391
|
||||
392, Message Not found N.392
|
||||
393, Message Not found N.393
|
||||
394, Message Not found N.394
|
||||
395, Message Not found N.395
|
||||
396, Message Not found N.396
|
||||
397, Message Not found N.397
|
||||
398, Message Not found N.398
|
||||
399, Message Not found N.399
|
||||
400, ALLARME ALIMENTAZIONE POMPA VUOTO 1
|
||||
401, ALLARME ALIMENTAZIONE POMPA VUOTO 2
|
||||
402, ALLARME ALIMENTAZIONE POMPA VUOTO 3
|
||||
403, ALLARME TEMPERATURA 1 ARMADIO
|
||||
404, ALLARME TEMPERATURA 2 ARMADIO
|
||||
405, ALLARME ALIMENTAZIONE VENTILATORI 1
|
||||
406, ALLARME ALIMENTAZIONE VENTILATORI 2
|
||||
407, ALLARME ALIMENTAZIONE VENTILATORI 3
|
||||
408, ALLARME ALIMENTAZIONE VENTILATORI 4
|
||||
409, Message Not found N.409
|
||||
410, ALLARME ALIMENTAZIONE VENTILATORE 1 CASSONE
|
||||
411, ALLARME ALIMENTAZIONE VENTILATORE 2 CASSONE
|
||||
412, Message Not found N.412
|
||||
413, Message Not found N.413
|
||||
414, Message Not found N.414
|
||||
415, ALLARME ALIMENTAZIONE IONIZZATORE
|
||||
416, ERRORE APERTURA PINZE
|
||||
417, ERRORE APERTURA GANCIO CORNICE
|
||||
418, CENTRATORE NON AVANTI
|
||||
419, CENTRATORE NON INDIETRO
|
||||
420, LIVELLO OLIO POMPA VUOTO 1
|
||||
421, LIVELLO OLIO POMPA VUOTO 2
|
||||
422, LIVELLO OLIO POMPA VUOTO 3
|
||||
423, LIVELLO GRASSO INSUFFICIENTE W
|
||||
424, ANOMALIA PRESSIONE GRASSO W
|
||||
425, LIVELLO GRASSO INSUFFICIENTE Z
|
||||
426, ANOMALIA PRESSIONE GRASSO Z
|
||||
427, ALLARME TERMOREGOLATORI
|
||||
428, GRUPPO UPS NON PRONTO
|
||||
429, ANOMALIA PROPORZIONALE VUOTO
|
||||
430, ANOMALIA PROPORZIONALE ESTRAZIONE
|
||||
431, ANOMALIA PIROMETRO RISCALDO
|
||||
432, ANOMALIA PIROMETRO RAFFREDDAMENTO
|
||||
433, ANOMALIA FOTOCELLULA IMBUTITURA
|
||||
434, Message Not found N.434
|
||||
435, RIFLETTORI NON OK
|
||||
436, ERRORE SBLOCCAGGIO TELAIO
|
||||
437, ERRORE BLOCCAGGIO TELAIO
|
||||
438, Message Not found N.438
|
||||
439, Message Not found N.439
|
||||
440, Message Not found N.440
|
||||
441, Message Not found N.441
|
||||
442, Message Not found N.442
|
||||
443, Message Not found N.443
|
||||
444, Message Not found N.444
|
||||
445, Message Not found N.445
|
||||
446, Message Not found N.446
|
||||
447, Message Not found N.447
|
||||
448, Message Not found N.448
|
||||
449, Message Not found N.449
|
||||
450, Message Not found N.450
|
||||
451, Message Not found N.451
|
||||
452, Message Not found N.452
|
||||
453, Message Not found N.453
|
||||
454, Message Not found N.454
|
||||
455, Message Not found N.455
|
||||
456, Message Not found N.456
|
||||
457, Message Not found N.457
|
||||
458, Message Not found N.458
|
||||
459, Message Not found N.459
|
||||
460, Message Not found N.460
|
||||
461, Message Not found N.461
|
||||
462, Message Not found N.462
|
||||
463, Message Not found N.463
|
||||
464, Message Not found N.464
|
||||
465, Message Not found N.465
|
||||
466, Message Not found N.466
|
||||
467, Message Not found N.467
|
||||
468, Message Not found N.468
|
||||
469, Message Not found N.469
|
||||
470, Message Not found N.470
|
||||
471, Message Not found N.471
|
||||
472, Message Not found N.472
|
||||
473, Message Not found N.473
|
||||
474, Message Not found N.474
|
||||
475, Message Not found N.475
|
||||
476, Message Not found N.476
|
||||
477, Message Not found N.477
|
||||
478, Message Not found N.478
|
||||
479, Message Not found N.479
|
||||
480, Message Not found N.480
|
||||
481, Message Not found N.481
|
||||
482, Message Not found N.482
|
||||
483, Message Not found N.483
|
||||
484, Message Not found N.484
|
||||
485, Message Not found N.485
|
||||
486, Message Not found N.486
|
||||
487, Message Not found N.487
|
||||
488, Message Not found N.488
|
||||
489, Message Not found N.489
|
||||
490, Message Not found N.490
|
||||
491, Message Not found N.491
|
||||
492, Message Not found N.492
|
||||
493, Message Not found N.493
|
||||
494, Message Not found N.494
|
||||
495, Message Not found N.495
|
||||
496, Message Not found N.496
|
||||
497, Message Not found N.497
|
||||
498, Message Not found N.498
|
||||
499, Message Not found N.499
|
||||
500, EFFETTUARE MANUTENZIONE POMPA VUOTO 1
|
||||
501, EFFETTUARE MANUTENZIONE POMPA VUOTO 2
|
||||
502, EFFETTUARE MANUTENZIONE POMPA VUOTO 3
|
||||
503, Message Not found N.503
|
||||
504, Message Not found N.504
|
||||
505, Message Not found N.505
|
||||
506, Message Not found N.506
|
||||
507, Message Not found N.507
|
||||
508, Message Not found N.508
|
||||
509, Message Not found N.509
|
||||
510, Message Not found N.510
|
||||
511, Message Not found N.511
|
||||
512, Message Not found N.512
|
||||
513, Message Not found N.513
|
||||
514, Message Not found N.514
|
||||
515, Message Not found N.515
|
||||
516, Message Not found N.516
|
||||
517, Message Not found N.517
|
||||
518, Message Not found N.518
|
||||
519, Message Not found N.519
|
||||
520, Message Not found N.520
|
||||
521, Message Not found N.521
|
||||
522, Message Not found N.522
|
||||
523, Message Not found N.523
|
||||
524, Message Not found N.524
|
||||
525, Message Not found N.525
|
||||
526, Message Not found N.526
|
||||
527, Message Not found N.527
|
||||
528, Message Not found N.528
|
||||
529, Message Not found N.529
|
||||
530, Message Not found N.530
|
||||
531, Message Not found N.531
|
||||
532, Message Not found N.532
|
||||
533, Message Not found N.533
|
||||
534, Message Not found N.534
|
||||
535, Message Not found N.535
|
||||
536, Message Not found N.536
|
||||
537, Message Not found N.537
|
||||
538, Message Not found N.538
|
||||
539, Message Not found N.539
|
||||
540, Message Not found N.540
|
||||
541, Message Not found N.541
|
||||
542, Message Not found N.542
|
||||
543, Message Not found N.543
|
||||
544, Message Not found N.544
|
||||
545, Message Not found N.545
|
||||
546, Message Not found N.546
|
||||
547, Message Not found N.547
|
||||
548, Message Not found N.548
|
||||
549, Message Not found N.549
|
||||
550, Message Not found N.550
|
||||
551, PULSANTE EMERGENZA
|
||||
552, ERRORE ATTR. CONTROSTAMPO
|
||||
553, ERRORE BLOCCO CONTROSTAMPO
|
||||
554, ERRORE SBLOCCO CONTROSTAMPO
|
||||
555, DISPOSITIVO DI SICUREZZA NON OK
|
||||
556, SEGNALI SAFE NON OK
|
||||
557, ASPIRAZIONE FUMI NON ATTIVA
|
||||
558, Message Not found N.558
|
||||
559, Message Not found N.559
|
||||
560, Message Not found N.560
|
||||
561, Message Not found N.561
|
||||
562, Message Not found N.562
|
||||
563, Message Not found N.563
|
||||
564, Message Not found N.564
|
||||
565, Message Not found N.565
|
||||
566, Message Not found N.566
|
||||
567, Message Not found N.567
|
||||
568, Message Not found N.568
|
||||
569, Message Not found N.569
|
||||
570, Message Not found N.570
|
||||
571, Message Not found N.571
|
||||
572, Message Not found N.572
|
||||
573, Message Not found N.573
|
||||
574, Message Not found N.574
|
||||
575, Message Not found N.575
|
||||
576, Message Not found N.576
|
||||
577, Message Not found N.577
|
||||
578, Message Not found N.578
|
||||
579, Message Not found N.579
|
||||
580, Message Not found N.580
|
||||
581, Message Not found N.581
|
||||
582, Message Not found N.582
|
||||
583, Message Not found N.583
|
||||
584, Message Not found N.584
|
||||
585, Message Not found N.585
|
||||
586, Message Not found N.586
|
||||
587, Message Not found N.587
|
||||
588, Message Not found N.588
|
||||
589, Message Not found N.589
|
||||
590, Message Not found N.590
|
||||
591, Message Not found N.591
|
||||
592, Message Not found N.592
|
||||
593, Message Not found N.593
|
||||
594, Message Not found N.594
|
||||
595, Message Not found N.595
|
||||
596, Message Not found N.596
|
||||
597, Message Not found N.597
|
||||
598, Message Not found N.598
|
||||
599, Message Not found N.599
|
||||
600, Message Not found N.600
|
||||
601, Message Not found N.601
|
||||
602, Message Not found N.602
|
||||
603, Message Not found N.603
|
||||
604, Message Not found N.604
|
||||
605, Message Not found N.605
|
||||
606, Message Not found N.606
|
||||
607, Message Not found N.607
|
||||
608, Message Not found N.608
|
||||
609, Message Not found N.609
|
||||
610, Message Not found N.610
|
||||
611, Message Not found N.611
|
||||
612, Message Not found N.612
|
||||
613, Message Not found N.613
|
||||
614, Message Not found N.614
|
||||
615, Message Not found N.615
|
||||
616, Message Not found N.616
|
||||
617, Message Not found N.617
|
||||
618, Message Not found N.618
|
||||
619, Message Not found N.619
|
||||
620, Message Not found N.620
|
||||
621, Message Not found N.621
|
||||
622, Message Not found N.622
|
||||
623, Message Not found N.623
|
||||
624, Message Not found N.624
|
||||
625, Message Not found N.625
|
||||
626, Message Not found N.626
|
||||
627, Message Not found N.627
|
||||
628, Message Not found N.628
|
||||
629, Message Not found N.629
|
||||
630, Message Not found N.630
|
||||
631, Message Not found N.631
|
||||
632, Message Not found N.632
|
||||
633, Message Not found N.633
|
||||
634, Message Not found N.634
|
||||
635, Message Not found N.635
|
||||
636, Message Not found N.636
|
||||
637, Message Not found N.637
|
||||
638, Message Not found N.638
|
||||
639, Message Not found N.639
|
||||
640, Message Not found N.640
|
||||
641, Message Not found N.641
|
||||
642, Message Not found N.642
|
||||
643, Message Not found N.643
|
||||
644, Message Not found N.644
|
||||
645, Message Not found N.645
|
||||
646, Message Not found N.646
|
||||
647, Message Not found N.647
|
||||
648, Message Not found N.648
|
||||
649, Message Not found N.649
|
||||
650, Message Not found N.650
|
||||
@@ -114,7 +114,7 @@ namespace Thermo.Active.Listeners
|
||||
}));
|
||||
infos.Add(MessageServices.Current.Subscribe(SEND_THERMO_GAUGE_DATA, (a, b) =>
|
||||
{
|
||||
SignalRListener.SendThermoGaugeData(a);
|
||||
SignalRListener.sendThermoGaugeData(a);
|
||||
}));
|
||||
infos.Add(MessageServices.Current.Subscribe(SEND_THERMO_PROD_INFO_DATA, (a, b) =>
|
||||
{
|
||||
|
||||
@@ -10,6 +10,7 @@ using Thermo.Active.Model.DTOModels;
|
||||
using Thermo.Active.Model.DTOModels.AlarmModels;
|
||||
using Thermo.Active.Model.DTOModels.Scada;
|
||||
using Thermo.Active.Model.DTOModels.ThModules;
|
||||
using Thermo.Active.Model.DTOModels.ThProd;
|
||||
using Thermo.Active.Model.DTOModels.ThRecipe;
|
||||
using Thermo.Active.Model.DTOModels.ThWarmers;
|
||||
using Thermo.Active.Utils;
|
||||
@@ -266,7 +267,6 @@ namespace Thermo.Active.Listeners.SignalR
|
||||
// comparazione
|
||||
if (!item.Value.Equals(LastRecipeFullData[item.Key]))
|
||||
{
|
||||
//diffData[item.Key] = item.Value;
|
||||
diffData.Add(item.Key, item.Value);
|
||||
}
|
||||
}
|
||||
@@ -283,11 +283,30 @@ namespace Thermo.Active.Listeners.SignalR
|
||||
}
|
||||
public static void SendThermoRecipeOverviewData(object recipeOver)
|
||||
{
|
||||
Dictionary<string, RecipeCatStatus> currRecipeOver = recipeOver as Dictionary<string, RecipeCatStatus>;
|
||||
Dictionary<RecipeSection, RecipeCatStatus> currRecipeOver = recipeOver as Dictionary<RecipeSection, RecipeCatStatus>;
|
||||
Dictionary<RecipeSection, RecipeCatStatus> diffData = new Dictionary<RecipeSection, RecipeCatStatus>();
|
||||
|
||||
if (!LastRecipeOverData.SequenceEqual(currRecipeOver))
|
||||
|
||||
foreach (var item in currRecipeOver)
|
||||
{
|
||||
LastRecipeOverData = currRecipeOver;
|
||||
if (!LastRecipeOverData.ContainsKey(item.Key))
|
||||
{
|
||||
diffData.Add(item.Key, item.Value);
|
||||
}
|
||||
else
|
||||
{
|
||||
// comparazione
|
||||
if (!item.Value.Equals(LastRecipeOverData[item.Key]))
|
||||
{
|
||||
diffData.Add(item.Key, item.Value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (diffData.Count > 0)
|
||||
{
|
||||
// salvo update
|
||||
LastRecipeOverData = new Dictionary<RecipeSection, RecipeCatStatus>(currRecipeOver);
|
||||
|
||||
var context = GlobalHost.ConnectionManager.GetHubContext<NcHub>();
|
||||
context.Clients.Group("ncData").recipeOverData(currRecipeOver);
|
||||
@@ -385,16 +404,16 @@ namespace Thermo.Active.Listeners.SignalR
|
||||
}
|
||||
}
|
||||
|
||||
public static void SendThermoGaugeData(object gaugeData)
|
||||
public static void sendThermoGaugeData(object currentLiveProd)
|
||||
{
|
||||
GaugeModel currGauge = gaugeData as GaugeModel;
|
||||
Dictionary<string, DTOThermoProd> currLiveProd = currentLiveProd as Dictionary<string, DTOThermoProd>;
|
||||
|
||||
if (!LastGaugeData.Equals(currGauge))
|
||||
if (!LastLiveProdData.Equals(currLiveProd))
|
||||
{
|
||||
LastGaugeData = currGauge;
|
||||
LastLiveProdData = currLiveProd;
|
||||
|
||||
var context = GlobalHost.ConnectionManager.GetHubContext<NcHub>();
|
||||
context.Clients.Group("ncData").gaugeData(currGauge);
|
||||
context.Clients.Group("ncData").gaugeData(currLiveProd);
|
||||
}
|
||||
}
|
||||
public static void SendThermoProdInfoData(object prodInfoData)
|
||||
@@ -495,7 +514,7 @@ namespace Thermo.Active.Listeners.SignalR
|
||||
group.warmersData(LastWarmersData);
|
||||
group.areaData(LastAreaData);
|
||||
// THERMO Gauges
|
||||
group.gaugeData(LastGaugeData);
|
||||
group.gaugeData(LastLiveProdData);
|
||||
// THERMO prod info data
|
||||
group.prodInfoData(LastProdInfoData);
|
||||
// THERMO prod cycle data
|
||||
|
||||
@@ -4,6 +4,7 @@ using Thermo.Active.Model.DTOModels;
|
||||
using Thermo.Active.Model.DTOModels.AlarmModels;
|
||||
using Thermo.Active.Model.DTOModels.Scada;
|
||||
using Thermo.Active.Model.DTOModels.ThModules;
|
||||
using Thermo.Active.Model.DTOModels.ThProd;
|
||||
using Thermo.Active.Model.DTOModels.ThRecipe;
|
||||
using Thermo.Active.Model.DTOModels.ThWarmers;
|
||||
|
||||
@@ -31,11 +32,11 @@ namespace Thermo.Active.Listeners
|
||||
|
||||
// FIXME TODO inserire oggetti corretti per THERMO
|
||||
public static Dictionary<string, DTORecipeParam> LastRecipeFullData = new Dictionary<string, DTORecipeParam>();
|
||||
public static Dictionary<string, RecipeCatStatus> LastRecipeOverData = new Dictionary<string, RecipeCatStatus>();
|
||||
public static Dictionary<RecipeSection, RecipeCatStatus> LastRecipeOverData = new Dictionary<RecipeSection, RecipeCatStatus>();
|
||||
public static Dictionary<int, DTOModulesBlock> LastModulesData = new Dictionary<int, DTOModulesBlock>();
|
||||
public static Dictionary<int, DTOWarmers> LastWarmersData = new Dictionary<int, DTOWarmers>();
|
||||
public static Dictionary<string, double> LastAreaData = new Dictionary<string, double>();
|
||||
public static ThermoModels.GaugeModel LastGaugeData = new ThermoModels.GaugeModel();
|
||||
public static Dictionary<string, DTOThermoProd> LastLiveProdData = new Dictionary<string, DTOThermoProd>();
|
||||
public static ThermoModels.ProdCycleModel LastProdCycleData = new ThermoModels.ProdCycleModel();
|
||||
public static ThermoModels.ProdInfoModel LastProdInfoData = new ThermoModels.ProdInfoModel();
|
||||
|
||||
|
||||
@@ -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.9.9")]
|
||||
[assembly: AssemblyVersion("0.9.21")]
|
||||
|
||||
@@ -261,6 +261,15 @@
|
||||
<DependentUpon>App.config</DependentUpon>
|
||||
</Content>
|
||||
<Content Include="CMS_Icon.ico" />
|
||||
<Content Include="Dict\Enums_italian.txt">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Dict\Labels_italian.txt">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Dict\Messaggi_italian.txt">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="SetupActive.iss" />
|
||||
<Content Include="wwwroot\.idea\encodings.xml" />
|
||||
<Content Include="wwwroot\.idea\misc.xml" />
|
||||
@@ -11759,6 +11768,24 @@
|
||||
<None Include="wwwroot\.bowerrc" />
|
||||
<None Include="wwwroot\.editorconfig" />
|
||||
<None Include="wwwroot\.idea\wwwroot.iml" />
|
||||
<None Include="wwwroot\assets\animations\estrazione-assistita.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="wwwroot\assets\animations\estrazione-normale.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="wwwroot\assets\animations\estrazione-senza-cornice.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="wwwroot\assets\animations\imbutitura-a-tempo.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="wwwroot\assets\animations\imbutitura-mantenuta.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="wwwroot\assets\animations\imbutitura-negativa.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Include="wwwroot\assets\fonts\WorkSans-Black.ttf" />
|
||||
<None Include="wwwroot\assets\fonts\WorkSans-Bold.ttf" />
|
||||
<None Include="wwwroot\assets\fonts\WorkSans-ExtraBold.ttf" />
|
||||
|
||||
@@ -85,7 +85,7 @@ namespace Thermo.Active
|
||||
opt.Urls.Add("http://" + ServerStartupConfig.ServerAddress.ToString() + ":" + ServerStartupConfig.ServerPort.ToString());
|
||||
|
||||
// read and save last CURRENT RECIPE data...
|
||||
ServerConfigController.ReadLastRecipe();
|
||||
NcFileAdapter.ReadLastRecipe();
|
||||
RecipeController.WriteCurrentRecipeToPlc();
|
||||
|
||||
//starts threads
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -9,6 +9,19 @@
|
||||
|
||||
.box-gauge {
|
||||
width: 68px;
|
||||
position: relative;
|
||||
|
||||
.value {
|
||||
position: absolute;
|
||||
top: 35%;
|
||||
margin: auto;
|
||||
width: 100%;
|
||||
left: 0;
|
||||
/* right: 0; */
|
||||
text-align: center;
|
||||
font-size: 0.8rem;
|
||||
color: @color-darkish-blue;
|
||||
}
|
||||
|
||||
div {
|
||||
|
||||
|
||||
@@ -133,7 +133,7 @@ button.btn.btn-success[disabled] {
|
||||
}
|
||||
|
||||
button.under {
|
||||
width: 208px;
|
||||
min-width: 118px;
|
||||
height: 45px;
|
||||
object-fit: contain;
|
||||
border-radius: 100px;
|
||||
@@ -144,6 +144,9 @@ button.under {
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
cursor: pointer;
|
||||
color: #fff;
|
||||
font-weight: 500;
|
||||
font-size: 18px;
|
||||
|
||||
img {
|
||||
max-width: 178px;
|
||||
|
||||
@@ -5,23 +5,23 @@
|
||||
|
||||
@color-cef-transparency-key: #00FF00;
|
||||
|
||||
@color-apple-green:#7ed321;
|
||||
@color-apple-green: #7ed321;
|
||||
|
||||
@color-black-40: rgba(0,0,0,0.4);
|
||||
@color-black-50: rgba(0,0,0,0.5);
|
||||
@color-black-40: rgba(0, 0, 0, 0.4);
|
||||
@color-black-50: rgba(0, 0, 0, 0.5);
|
||||
|
||||
@color-background-white: #fff;
|
||||
@color-white2: #f1f1f1;
|
||||
@color-whitetwo: #f8f8f8;
|
||||
@color-white3: #dfdfdf;
|
||||
@color-white4:#f3f3f3;
|
||||
@color-white5:#f4f4f4;
|
||||
@color-white4: #f3f3f3;
|
||||
@color-white5: #f4f4f4;
|
||||
@color-whitegrey: #dddddd;
|
||||
@color-whitethree: #e7e7e7;
|
||||
@color-silver: #bbbcbc;
|
||||
@color-battleship-grey: #657178;
|
||||
@color-nice-blue: #1756ad;
|
||||
@color-slate-gray:#5c656b;
|
||||
@color-slate-gray: #5c656b;
|
||||
@color-gunmetal: #4e585e;
|
||||
@color-bluish-grey: #808e96;
|
||||
@color-cerulean: #007cc3;
|
||||
@@ -32,8 +32,8 @@
|
||||
@color-darkish-blue: #002680;
|
||||
@color-darkish-blue-two: #004990;
|
||||
@color-clear-blue: #1791ff;
|
||||
@color-clear-blue-30: rgba(23,145,255,0.3);
|
||||
@color-clear-blue-75: rgba(23,145,255,0.75);
|
||||
@color-clear-blue-30: rgba(23, 145, 255, 0.3);
|
||||
@color-clear-blue-75: rgba(23, 145, 255, 0.75);
|
||||
@color-perrywinkle: #8eb5e2;
|
||||
@color-white: #fff;
|
||||
@color-input-light: #4b4b4b;
|
||||
@@ -44,8 +44,8 @@
|
||||
@color-squash : #f5a623;
|
||||
@color-harmonies: #f4bf7e;
|
||||
@color-light-orange: #ffb31e;
|
||||
@color-scarlet:#d0021b;
|
||||
@color-faded-red:#d84b5c;
|
||||
@color-scarlet: #d0021b;
|
||||
@color-faded-red: #d84b5c;
|
||||
@color-sandy: #f3d39d;
|
||||
@color-duck-egg-blue: #e5f1f9;
|
||||
@color-greyish-brown: #4b4b4b;
|
||||
@@ -59,11 +59,11 @@
|
||||
|
||||
|
||||
|
||||
@color-alarm-background-image: linear-gradient(to bottom, #ff4d63, #a10518);
|
||||
@color-alarm-background-image: linear-gradient(to bottom, #ff4d63, #a10518);
|
||||
@color-alarm-box-shadow: 0 3px 5px 0 rgba(0, 0, 0, 0.4);
|
||||
@color-alarm-list-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
|
||||
@color-alarm-list-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
|
||||
|
||||
@color-warning-background-image: linear-gradient(to bottom, #f6a623, #dc8c09);
|
||||
@color-warning-background-image: linear-gradient(to bottom, #f6a623, #dc8c09);
|
||||
@color-ribbon-opened: linear-gradient(to bottom, #ffffff, #eeeeee);
|
||||
|
||||
|
||||
@@ -76,6 +76,10 @@
|
||||
@color-button-oval-background-image: linear-gradient(to bottom, #cce8f8, #93cbfc);
|
||||
@color-button-oval-box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.7);
|
||||
|
||||
.text-success{
|
||||
color:@color-darkish-blue;
|
||||
.text-success {
|
||||
color: @color-darkish-blue;
|
||||
}
|
||||
|
||||
.warning {
|
||||
color: @color-light-orange;
|
||||
}
|
||||
@@ -8,8 +8,8 @@
|
||||
@smallgauge-w: @gauge-w - 30px;
|
||||
|
||||
.gauge-container {
|
||||
// grid-column: 3;
|
||||
// grid-row: 2;
|
||||
// grid-column: 3;
|
||||
// grid-row: 2;
|
||||
display: grid;
|
||||
grid-template-rows: 1fr auto 1fr;
|
||||
|
||||
@@ -28,6 +28,27 @@
|
||||
width: @gauge-w;
|
||||
height: @gauge-h;
|
||||
|
||||
.done,
|
||||
.target {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 150px;
|
||||
font-weight: 200;
|
||||
}
|
||||
|
||||
.done {
|
||||
grid-row: 1;
|
||||
grid-column: 1;
|
||||
align-items: flex-end;
|
||||
}
|
||||
|
||||
.target {
|
||||
grid-row: 3;
|
||||
grid-column: 1;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.gauge1,
|
||||
.gauge2 {
|
||||
grid-column: 1;
|
||||
|
||||
@@ -5,61 +5,61 @@
|
||||
|
||||
|
||||
.dashboard {
|
||||
font-family : "Work Sans";
|
||||
height : calc(~'100% - 60px');
|
||||
width : 100%;
|
||||
background-image : url("../../assets/icons/png/bg.png");
|
||||
position : fixed;
|
||||
z-index : 1001;
|
||||
display : grid;
|
||||
grid-template-rows : 144px 1fr;
|
||||
font-family: "Work Sans";
|
||||
height: calc(~'100% - 60px');
|
||||
width: 100%;
|
||||
background-image: url("../../assets/icons/png/bg.png");
|
||||
position: fixed;
|
||||
z-index: 1001;
|
||||
display: grid;
|
||||
grid-template-rows: 144px 1fr;
|
||||
grid-template-columns: 152px 1fr 610px 1fr 152px;
|
||||
grid-row-gap : 40px;
|
||||
padding-top : 20px;
|
||||
padding-bottom : 40px;
|
||||
color : #4b4b4b;
|
||||
grid-row-gap: 40px;
|
||||
padding-top: 20px;
|
||||
padding-bottom: 40px;
|
||||
color: #4b4b4b;
|
||||
|
||||
header {
|
||||
grid-row : 1;
|
||||
grid-row: 1;
|
||||
grid-column-start: 1;
|
||||
grid-column-end : -1;
|
||||
width : 100% !important;
|
||||
justify-content : space-between;
|
||||
height : 144px !important;
|
||||
position : relative !important;
|
||||
grid-column-end: -1;
|
||||
width: 100% !important;
|
||||
justify-content: space-between;
|
||||
height: 144px !important;
|
||||
position: relative !important;
|
||||
|
||||
.arch{
|
||||
.arch {
|
||||
justify-content: center;
|
||||
|
||||
.box-gauge{
|
||||
.box-gauge {
|
||||
width: 126px;
|
||||
|
||||
div {
|
||||
|
||||
&:last-of-type {
|
||||
|
||||
|
||||
label {
|
||||
color: #4b4b4b;
|
||||
|
||||
&:first-of-type{
|
||||
&:first-of-type {
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
&:last-of-type{
|
||||
&:last-of-type {
|
||||
font-size: 26px;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
.gauge-container{
|
||||
.gauge-container {
|
||||
width: 126px;
|
||||
height: 126px;
|
||||
}
|
||||
|
||||
|
||||
.gauge-container>.gauge>.value {
|
||||
stroke: #1791ff;
|
||||
}
|
||||
@@ -74,14 +74,14 @@
|
||||
|
||||
.ribbon-container,
|
||||
.app-ribbon {
|
||||
height : 144px;
|
||||
width : 152px;
|
||||
border-top-right-radius : 72px;
|
||||
height: 144px;
|
||||
width: 152px;
|
||||
border-top-right-radius: 72px;
|
||||
border-bottom-right-radius: 72px;
|
||||
|
||||
.status-icon {
|
||||
width : 114px;
|
||||
height : 114px;
|
||||
width: 114px;
|
||||
height: 114px;
|
||||
border-radius: 57px;
|
||||
|
||||
* {
|
||||
@@ -92,12 +92,12 @@
|
||||
}
|
||||
|
||||
.header-buttons {
|
||||
padding-right : 21px;
|
||||
display : flex;
|
||||
flex-flow : column;
|
||||
align-items : flex-end;
|
||||
padding-right: 21px;
|
||||
display: flex;
|
||||
flex-flow: column;
|
||||
align-items: flex-end;
|
||||
justify-content: space-between;
|
||||
height : 100%;
|
||||
height: 100%;
|
||||
|
||||
.user-info {
|
||||
font-size: 14px;
|
||||
@@ -108,113 +108,138 @@
|
||||
}
|
||||
|
||||
button.modal-close {
|
||||
box-shadow : none;
|
||||
box-shadow: none;
|
||||
background-color: @color-darkish-blue;
|
||||
color : white;
|
||||
color: white;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.first_col {
|
||||
grid-row : 2;
|
||||
grid-row: 2;
|
||||
grid-column: 2;
|
||||
height : 100%;
|
||||
display : flex;
|
||||
flex-flow : column;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-flow: column;
|
||||
|
||||
.timing-area {
|
||||
display : grid;
|
||||
display: grid;
|
||||
grid-template-rows: 1fr 1fr 1fr;
|
||||
height : 610px;
|
||||
height: 610px;
|
||||
|
||||
.start,
|
||||
.current,
|
||||
.end {
|
||||
display : flex;
|
||||
flex-flow : column;
|
||||
align-items : center;
|
||||
justify-content : center;
|
||||
background-color : rgba(153, 207, 255, 0.6);
|
||||
border-top-left-radius : 100px;
|
||||
border-bottom-left-radius: 100px;
|
||||
display: flex;
|
||||
flex-flow: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
// background-color: rgba(153, 207, 255, 0.6);
|
||||
// border-top-left-radius: 100px;
|
||||
// border-bottom-left-radius: 100px;
|
||||
position: relative;
|
||||
|
||||
&::before {
|
||||
content: "";
|
||||
display: block;
|
||||
width: 120%;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
background-repeat: no-repeat;
|
||||
background-position: 0 0;
|
||||
background-size: 100%;
|
||||
left: 0px;
|
||||
top: 0;
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
small {
|
||||
font-size : 26px;
|
||||
font-size: 26px;
|
||||
text-transform: uppercase;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
time {
|
||||
font-size : 120px;
|
||||
font-size: 120px;
|
||||
font-weight: 300;
|
||||
z-index: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.start::before {
|
||||
background-image: url(/assets/svg/dashboard-top-left.svg);
|
||||
}
|
||||
|
||||
.end::before {
|
||||
background-image: url(/assets/svg/dashboard-bottom-left.svg);
|
||||
}
|
||||
|
||||
.current {
|
||||
background-color: transparent;
|
||||
|
||||
time {
|
||||
font-size : 54px;
|
||||
font-size: 54px;
|
||||
font-weight: 500;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.setpoint {
|
||||
margin : auto;
|
||||
display : grid;
|
||||
grid-template-rows : 1fr 1fr;
|
||||
margin: auto;
|
||||
display: grid;
|
||||
grid-template-rows: 1fr 1fr;
|
||||
grid-template-columns: 65px 125px 65px;
|
||||
grid-row-gap : 1rem;
|
||||
grid-row-gap: 1rem;
|
||||
|
||||
img {
|
||||
grid-row : 1;
|
||||
grid-row: 1;
|
||||
grid-column: 1;
|
||||
margin : auto;
|
||||
height : 41px;
|
||||
width : 41px;
|
||||
margin: auto;
|
||||
height: 41px;
|
||||
width: 41px;
|
||||
}
|
||||
|
||||
label {
|
||||
margin : auto;
|
||||
grid-row : 1;
|
||||
margin: auto;
|
||||
grid-row: 1;
|
||||
grid-column-start: 2;
|
||||
grid-column-end : -1;
|
||||
grid-column-end: -1;
|
||||
|
||||
font-size : 54px;
|
||||
font-size: 54px;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
div {
|
||||
display : flex;
|
||||
display: flex;
|
||||
flex-flow: column;
|
||||
|
||||
font-weight: 500;
|
||||
align-items: center;
|
||||
|
||||
small {
|
||||
font-size : 12px;
|
||||
line-height : 25px;
|
||||
font-size: 12px;
|
||||
line-height: 25px;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
span {
|
||||
line-height: 25px;
|
||||
font-size : 25px;
|
||||
font-size: 25px;
|
||||
}
|
||||
}
|
||||
|
||||
button {
|
||||
border : 2px solid #4b4b4b;
|
||||
border-radius : 50%;
|
||||
width : 65px;
|
||||
height : 65px;
|
||||
font-size : 36px;
|
||||
box-shadow : 0 2px 10px 0 rgba(0, 0, 0, 0.5);
|
||||
font-size : 28px;
|
||||
border: 2px solid #4b4b4b;
|
||||
border-radius: 50%;
|
||||
width: 65px;
|
||||
height: 65px;
|
||||
font-size: 36px;
|
||||
box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.5);
|
||||
font-size: 28px;
|
||||
justify-content: center;
|
||||
align-items : center;
|
||||
display : flex;
|
||||
color : #4b4b4b;
|
||||
align-items: center;
|
||||
display: flex;
|
||||
color: #4b4b4b;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -222,72 +247,98 @@
|
||||
}
|
||||
|
||||
.second_col {
|
||||
grid-row : 2;
|
||||
grid-row: 2;
|
||||
grid-column: 3;
|
||||
height : 100%;
|
||||
display : flex;
|
||||
flex-flow : column;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-flow: column;
|
||||
|
||||
.remaining_time {
|
||||
margin : auto;
|
||||
display : flex;
|
||||
margin: auto;
|
||||
display: flex;
|
||||
flex-flow: column;
|
||||
|
||||
align-items: center;
|
||||
|
||||
small {
|
||||
font-size : 26px;
|
||||
font-weight : 500;
|
||||
font-size: 26px;
|
||||
font-weight: 500;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
time {
|
||||
font-size : 120px;
|
||||
font-size: 120px;
|
||||
font-weight: 300;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.third_col {
|
||||
grid-row : 2;
|
||||
grid-row: 2;
|
||||
grid-column-start: 4;
|
||||
grid-column-end : -1;
|
||||
height : 100%;
|
||||
display : flex;
|
||||
flex-flow : column;
|
||||
grid-column-end: -1;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-flow: column;
|
||||
|
||||
.piece_time{
|
||||
|
||||
.recipe {
|
||||
height: 97px;
|
||||
position: relative;
|
||||
|
||||
&::before {
|
||||
content: "";
|
||||
display: block;
|
||||
width: 761px;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
background-repeat: no-repeat;
|
||||
background-position: 50%;
|
||||
background-size: cover;
|
||||
left: -100px;
|
||||
top: 0;
|
||||
z-index: 0;
|
||||
background-image: url(/assets/svg/dashboard-top-right.svg);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.piece_time {
|
||||
display: grid;
|
||||
grid-template-rows : repeat(2,auto);
|
||||
grid-template-columns: repeat(2,auto);
|
||||
grid-template-rows: repeat(2, auto);
|
||||
grid-template-columns: repeat(2, auto);
|
||||
height: 245px;
|
||||
padding: 20px;
|
||||
|
||||
.piece_hours{
|
||||
.piece_hours {
|
||||
grid-row: 1;
|
||||
grid-column: 1;
|
||||
}
|
||||
|
||||
.time_cycle{
|
||||
.time_cycle {
|
||||
grid-row: 1;
|
||||
grid-column: 2;
|
||||
}
|
||||
|
||||
div{
|
||||
div {
|
||||
display: flex;
|
||||
flex-flow: column;
|
||||
|
||||
span{
|
||||
span {
|
||||
font-family: "Work Sans";
|
||||
font-weight: 500;
|
||||
text-align: center;
|
||||
color:#4b4b4b;
|
||||
|
||||
&:first-of-type{
|
||||
text-align: center;
|
||||
color: #4b4b4b;
|
||||
|
||||
&:first-of-type {
|
||||
font-size: 26px;
|
||||
font-weight: 500;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
&:last-of-type{
|
||||
&:last-of-type {
|
||||
font-size: 120px;
|
||||
font-weight: 300;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -301,22 +352,8 @@
|
||||
|
||||
aside {
|
||||
margin-top: 10px;
|
||||
height : 100%;
|
||||
|
||||
.piece_info{
|
||||
height: 77px;
|
||||
}
|
||||
|
||||
.sub_menu{
|
||||
|
||||
.piece_info{
|
||||
height: 60px;
|
||||
}
|
||||
}
|
||||
|
||||
height: calc(100% - 78px);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -8,184 +8,205 @@
|
||||
@footer-button-margin: 19px;
|
||||
@footer-padding: 0 0 9px 8px;
|
||||
@footer-machine-area-size: 300px;
|
||||
|
||||
footer {
|
||||
position: absolute;
|
||||
z-index: 300; // Fix z-index del footer in funzione della modifica dello z-index del main panel
|
||||
z-index: 820;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
|
||||
.machine-area {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
width: @footer-machine-area-size;
|
||||
height: @footer-height;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-evenly;
|
||||
}
|
||||
|
||||
.container {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: flex-end;
|
||||
background-image: @color-footer-background-image;
|
||||
box-shadow: @color-footer-box-shadow;
|
||||
right: @footer-machine-area-size;
|
||||
margin: 0;
|
||||
border-top-right-radius: @footer-height / 2;
|
||||
border-bottom-right-radius: @footer-height /2;
|
||||
line-height: @footer-height;
|
||||
padding: @footer-padding;
|
||||
height: @footer-height;
|
||||
position: absolute;
|
||||
z-index: 300; // Fix z-index del footer in funzione della modifica dello z-index del main panel
|
||||
z-index: 820;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
.machine-area {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
width: @footer-machine-area-size;
|
||||
height: @footer-height;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-sizing: border-box;
|
||||
overflow: visible;
|
||||
|
||||
.swipeup {
|
||||
width: 100%;
|
||||
}
|
||||
.container {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: flex-end;
|
||||
background-image: @color-footer-background-image;
|
||||
box-shadow: @color-footer-box-shadow;
|
||||
right: @footer-machine-area-size;
|
||||
margin: 0;
|
||||
border-top-right-radius: @footer-height / 2;
|
||||
border-bottom-right-radius: @footer-height /2;
|
||||
line-height: @footer-height;
|
||||
padding: @footer-padding;
|
||||
height: @footer-height;
|
||||
|
||||
button {
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
margin-left: @footer-button-margin;
|
||||
margin-right: @footer-button-margin;
|
||||
border: none;
|
||||
min-width: @footer-button-size;
|
||||
min-height: @footer-button-size;
|
||||
max-width: @footer-button-size;
|
||||
max-height: @footer-button-size;
|
||||
border-radius: @footer-button-size /2;
|
||||
background-image: @color-button-oval-background-image;
|
||||
box-shadow: @color-button-oval-box-shadow;
|
||||
}
|
||||
|
||||
button.main-production {
|
||||
background-image: url(../icons/png/produzione-BIG.png);
|
||||
background-size: cover;
|
||||
}
|
||||
|
||||
button.tools-manager {
|
||||
background-image: url(../icons/png/attrezzaggio-BIG.png);
|
||||
background-size: cover;
|
||||
}
|
||||
|
||||
button.report-manager {
|
||||
background-image: url(../icons/png/report-BIG.png);
|
||||
background-size: cover;
|
||||
}
|
||||
|
||||
button.alarms-manager {
|
||||
background-image: url(../icons/png/allarmi-BIG.png);
|
||||
background-size: cover;
|
||||
}
|
||||
|
||||
button.maintenance-manager {
|
||||
background-image: url(../icons/png/manutenzione-BIG.png);
|
||||
background-size: cover;
|
||||
}
|
||||
|
||||
button.utilities {
|
||||
background-image: url(../icons/png/Utilities-big.png);
|
||||
background-size: cover;
|
||||
}
|
||||
|
||||
button.externUtility {
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
box-sizing: border-box;
|
||||
background-image: url(../icons/png/button_bg.png);
|
||||
background-size: cover;
|
||||
|
||||
img {
|
||||
max-width: @footer-button-size;
|
||||
max-height: @footer-button-size;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
box-sizing: border-box;
|
||||
overflow: visible;
|
||||
.swipeup{
|
||||
width: 100%;
|
||||
}
|
||||
button {
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
margin-left: @footer-button-margin;
|
||||
margin-right: @footer-button-margin;
|
||||
border: none;
|
||||
min-width: @footer-button-size;
|
||||
min-height: @footer-button-size;
|
||||
max-width: @footer-button-size;
|
||||
max-height: @footer-button-size;
|
||||
border-radius: @footer-button-size /2;
|
||||
background-image: @color-button-oval-background-image;
|
||||
box-shadow: @color-button-oval-box-shadow;
|
||||
}
|
||||
button.main-production {
|
||||
background-image: url(../icons/png/produzione-BIG.png);
|
||||
background-size: cover;
|
||||
}
|
||||
button.tools-manager {
|
||||
background-image: url(../icons/png/attrezzaggio-BIG.png);
|
||||
background-size: cover;
|
||||
}
|
||||
button.report-manager{
|
||||
background-image: url(../icons/png/report-BIG.png);
|
||||
background-size: cover;
|
||||
}
|
||||
button.alarms-manager{
|
||||
background-image: url(../icons/png/allarmi-BIG.png);
|
||||
background-size: cover;
|
||||
}
|
||||
button.maintenance-manager{
|
||||
background-image: url(../icons/png/manutenzione-BIG.png);
|
||||
background-size: cover;
|
||||
}
|
||||
button.utilities{
|
||||
background-image: url(../icons/png/Utilities-big.png);
|
||||
background-size: cover;
|
||||
}
|
||||
button.externUtility{
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
box-sizing: border-box;
|
||||
background-image: url(../icons/png/button_bg.png);
|
||||
background-size: cover;
|
||||
img{
|
||||
max-width: @footer-button-size;
|
||||
max-height: @footer-button-size;
|
||||
position:absolute;
|
||||
top: 50%;
|
||||
left:50%;
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
|
||||
div{
|
||||
max-width: @footer-button-size;
|
||||
max-height: @footer-button-size;
|
||||
position:absolute;
|
||||
top: 50%;
|
||||
left:50%;
|
||||
transform: translate(-50%, -50%);
|
||||
font-size: 26px;
|
||||
font-weight: bold;
|
||||
color: #002680;
|
||||
text-shadow: 1px 1px 0px #fff;
|
||||
}
|
||||
}
|
||||
.divider{
|
||||
height: 63px;
|
||||
line-height: 63px;
|
||||
margin-left: 20px;
|
||||
margin-right: 20px;
|
||||
color: #002680;
|
||||
font-size: 24px;
|
||||
text-shadow: 0px 0px 2px #f1f1f169;
|
||||
}
|
||||
|
||||
button.scada{
|
||||
background-image: url(../icons/png/SCADA-big.png);
|
||||
background-size: cover;
|
||||
}
|
||||
button.ricetta{
|
||||
background-image: url(../icons/png/gestione-programmi-BIG.png);
|
||||
background-size: cover;
|
||||
}
|
||||
button.jobeditor{
|
||||
background-image: url(../icons/png/editor-BIG.png);
|
||||
background-size: cover;
|
||||
}
|
||||
button.users{
|
||||
background-image: url(../icons/png/users-BIG.png);
|
||||
background-size: cover;
|
||||
}
|
||||
button.progrprerisc{
|
||||
background-image: url(../icons/png/programmazione.png);
|
||||
background-size: cover;
|
||||
}
|
||||
button.clock{
|
||||
background-image: url(../icons/png/dashboard.png);
|
||||
background-size: cover;
|
||||
}
|
||||
|
||||
button:active{
|
||||
box-shadow: 0px 0px 1px 1px #FFF;
|
||||
}
|
||||
button[disabled] {
|
||||
filter: grayscale(100%);
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
// button:hover,
|
||||
button.big {
|
||||
position: relative;
|
||||
min-height: @footer-button-big-size;
|
||||
min-width: @footer-button-big-size;
|
||||
border-radius: @footer-button-big-size /2;
|
||||
|
||||
// &:after {
|
||||
// content: " ";
|
||||
// background-color: white;
|
||||
// width: @footer-button-ball-size;
|
||||
// height: @footer-button-ball-size;
|
||||
// display: block;
|
||||
// border-radius: 50%;
|
||||
// -webkit-animation: fa-spin 2s infinite linear;
|
||||
// animation: fa-spin 2s infinite linear;
|
||||
// position: absolute;
|
||||
// left: -@footer-button-halfball-size;
|
||||
// top: calc(~'50% - @{footer-button-halfball-size}');
|
||||
// transform-origin: (@footer-button-big-size /2 + @footer-button-halfball-size) @footer-button-halfball-size;
|
||||
// }
|
||||
|
||||
&:before {
|
||||
content: " ";
|
||||
background-color: white;
|
||||
width: 16px;
|
||||
height: 4px;
|
||||
display: block;
|
||||
position: absolute;
|
||||
bottom: -8px;
|
||||
left: calc(50% - 8px);
|
||||
border-radius: 13px;
|
||||
}
|
||||
div {
|
||||
max-width: @footer-button-size;
|
||||
max-height: @footer-button-size;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
font-size: 26px;
|
||||
font-weight: bold;
|
||||
color: #002680;
|
||||
text-shadow: 1px 1px 0px #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.divider {
|
||||
height: 63px;
|
||||
line-height: 63px;
|
||||
margin-left: 20px;
|
||||
margin-right: 20px;
|
||||
color: #002680;
|
||||
font-size: 24px;
|
||||
text-shadow: 0px 0px 2px #f1f1f169;
|
||||
}
|
||||
|
||||
button.scada {
|
||||
background-image: url(../icons/png/SCADA-big.png);
|
||||
background-size: cover;
|
||||
}
|
||||
|
||||
button.ricetta {
|
||||
background-image: url(../icons/png/gestione-programmi-BIG.png);
|
||||
background-size: cover;
|
||||
}
|
||||
|
||||
button.jobeditor {
|
||||
background-image: url(../icons/png/editor-BIG.png);
|
||||
background-size: cover;
|
||||
}
|
||||
|
||||
button.users {
|
||||
background-image: url(../icons/png/users-BIG.png);
|
||||
background-size: cover;
|
||||
}
|
||||
|
||||
button.progrprerisc {
|
||||
background-image: url(../icons/png/programmazione.png);
|
||||
background-size: cover;
|
||||
}
|
||||
|
||||
button.clock {
|
||||
background-image: url(../icons/png/dashboard.png);
|
||||
background-size: cover;
|
||||
}
|
||||
|
||||
button:active {
|
||||
box-shadow: 0px 0px 1px 1px #FFF;
|
||||
}
|
||||
|
||||
button[disabled] {
|
||||
filter: grayscale(100%);
|
||||
}
|
||||
|
||||
// button:hover,
|
||||
button.big {
|
||||
position: relative;
|
||||
min-height: @footer-button-big-size;
|
||||
min-width: @footer-button-big-size;
|
||||
border-radius: @footer-button-big-size /2;
|
||||
|
||||
// &:after {
|
||||
// content: " ";
|
||||
// background-color: white;
|
||||
// width: @footer-button-ball-size;
|
||||
// height: @footer-button-ball-size;
|
||||
// display: block;
|
||||
// border-radius: 50%;
|
||||
// -webkit-animation: fa-spin 2s infinite linear;
|
||||
// animation: fa-spin 2s infinite linear;
|
||||
// position: absolute;
|
||||
// left: -@footer-button-halfball-size;
|
||||
// top: calc(~'50% - @{footer-button-halfball-size}');
|
||||
// transform-origin: (@footer-button-big-size /2 + @footer-button-halfball-size) @footer-button-halfball-size;
|
||||
// }
|
||||
|
||||
&:before {
|
||||
content: " ";
|
||||
background-color: white;
|
||||
width: 16px;
|
||||
height: 4px;
|
||||
display: block;
|
||||
position: absolute;
|
||||
bottom: -8px;
|
||||
left: calc(50% - 8px);
|
||||
border-radius: 13px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,2 +0,0 @@
|
||||
// out: false, sourceMap: false, main: ../style.less
|
||||
|
||||
@@ -97,7 +97,7 @@
|
||||
|
||||
button.profile {
|
||||
width: @header-button-size;
|
||||
background-image: url("../profile.png");
|
||||
// background-image: url("../profile.png");
|
||||
color: #000;
|
||||
background-size: cover;
|
||||
|
||||
|
||||
@@ -145,7 +145,7 @@ select:focus {
|
||||
display: flex;
|
||||
flex-flow: row;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
justify-content: space-between;
|
||||
|
||||
&.grid {
|
||||
display: grid;
|
||||
@@ -222,7 +222,7 @@ select:focus {
|
||||
color: #002680;
|
||||
font-size: 24px;
|
||||
font-weight: 500;
|
||||
flex: 0.7;
|
||||
// flex: 0.7;
|
||||
}
|
||||
|
||||
.numeric {
|
||||
|
||||
@@ -3,8 +3,7 @@
|
||||
@import "colors.less";
|
||||
@import "modals.less";
|
||||
@import "dashboard-gauge.less";
|
||||
@import "gantt-component.less";
|
||||
@import "piece.less";
|
||||
|
||||
@import "dashboard.less";
|
||||
@import "riscaldi.less";
|
||||
@import "slider.less";
|
||||
@@ -53,6 +52,7 @@
|
||||
@import "users.less";
|
||||
@import "tooltip.less";
|
||||
|
||||
|
||||
@background-color: rgb(216, 216, 216);
|
||||
@handle-width: 48px;
|
||||
@handle-height: 32px;
|
||||
@@ -252,8 +252,8 @@ body {
|
||||
position: absolute;
|
||||
width: @spinner-loading-height;
|
||||
height: @spinner-loading-width;
|
||||
top: calc(~'50%'- @spinner-loading-height /2);
|
||||
left: calc(~'50%'- @spinner-loading-width /2);
|
||||
top: calc(~'50% - '(@spinner-loading-height /2));
|
||||
left: calc(~'50% - '(@spinner-loading-width /2));
|
||||
text-align: center;
|
||||
line-height: @spinner-loading-height;
|
||||
font-size: @spinner-loading-height/2;
|
||||
|
||||
@@ -1,134 +0,0 @@
|
||||
// out: false, sourceMap: false, main: ../style.less
|
||||
|
||||
.menu_grid {
|
||||
display : grid;
|
||||
grid-template-rows : repeat(2, auto);
|
||||
grid-template-columns: repeat(5, 20%);
|
||||
|
||||
.piece_info {
|
||||
grid-row : 1;
|
||||
grid-column-start: 1;
|
||||
grid-column-end : -1;
|
||||
display : flex;
|
||||
align-items : center;
|
||||
justify-content : space-evenly;
|
||||
height : 84px;
|
||||
border-bottom : 2px solid black;
|
||||
|
||||
label {
|
||||
font-size : 54px;
|
||||
font-weight: 500;
|
||||
text-align : right;
|
||||
color : #4b4b4b;
|
||||
}
|
||||
|
||||
div {
|
||||
height : 53px;
|
||||
display : flex;
|
||||
flex-flow : column;
|
||||
justify-content: space-evenly;
|
||||
|
||||
span {
|
||||
font-family : "Work Sans";
|
||||
font-weight : 500;
|
||||
line-height : 1;
|
||||
letter-spacing: normal;
|
||||
text-align : center;
|
||||
color : #4b4b4b;
|
||||
|
||||
&:first-of-type {
|
||||
font-size : 12px;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
&:last-of-type {
|
||||
font-size: 25px;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
i {
|
||||
height: 30px;
|
||||
width : 30px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.sub_menu {
|
||||
grid-row : 2;
|
||||
grid-column-start : 2;
|
||||
grid-column-end : -1;
|
||||
display : grid;
|
||||
grid-template-rows : repeat(3, 60px);
|
||||
|
||||
.piece_info {
|
||||
height: 60px;
|
||||
display : grid;
|
||||
grid-template-columns: repeat(4, 25%);
|
||||
|
||||
button {
|
||||
margin: auto;
|
||||
background-color: white;
|
||||
border-color : black;
|
||||
border-radius : 50%;
|
||||
width : 50px;
|
||||
height : 50px;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.row_1 {
|
||||
grid-row: 1;
|
||||
|
||||
button {
|
||||
grid-column: 1;
|
||||
}
|
||||
|
||||
div {
|
||||
grid-column: 2;
|
||||
|
||||
&:last-of-type {
|
||||
grid-column: 3;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.row_2 {
|
||||
grid-row: 2;
|
||||
|
||||
div {
|
||||
grid-column: 2;
|
||||
|
||||
&:first-of-type{
|
||||
grid-column: 1;
|
||||
}
|
||||
|
||||
&:last-of-type {
|
||||
grid-column: 3;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.row_3 {
|
||||
grid-row: 3;
|
||||
|
||||
div {
|
||||
grid-column: 2;
|
||||
|
||||
&:first-of-type{
|
||||
grid-column: 1;
|
||||
}
|
||||
|
||||
&:last-of-type {
|
||||
grid-column: 3;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -390,6 +390,9 @@ article .box .body {
|
||||
.text-success {
|
||||
color: #002680;
|
||||
}
|
||||
.warning {
|
||||
color: #ffb31e;
|
||||
}
|
||||
.modal {
|
||||
min-width: 500px;
|
||||
height: 400px;
|
||||
@@ -4072,6 +4075,24 @@ article .box .body {
|
||||
z-index: 1;
|
||||
border: none;
|
||||
}
|
||||
.gauge-container .done,
|
||||
.gauge-container .target {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-size: 150px;
|
||||
font-weight: 200;
|
||||
}
|
||||
.gauge-container .done {
|
||||
grid-row: 1;
|
||||
grid-column: 1;
|
||||
align-items: flex-end;
|
||||
}
|
||||
.gauge-container .target {
|
||||
grid-row: 3;
|
||||
grid-column: 1;
|
||||
align-items: flex-start;
|
||||
}
|
||||
.gauge-container .gauge1,
|
||||
.gauge-container .gauge2 {
|
||||
grid-column: 1;
|
||||
@@ -4102,109 +4123,6 @@ article .box .body {
|
||||
stroke: #4caaff;
|
||||
stroke-width: 1;
|
||||
}
|
||||
.menu_grid {
|
||||
display: grid;
|
||||
grid-template-rows: repeat(2, auto);
|
||||
grid-template-columns: repeat(5, 20%);
|
||||
}
|
||||
.menu_grid .piece_info {
|
||||
grid-row: 1;
|
||||
grid-column-start: 1;
|
||||
grid-column-end: -1;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-evenly;
|
||||
height: 84px;
|
||||
border-bottom: 2px solid black;
|
||||
}
|
||||
.menu_grid .piece_info label {
|
||||
font-size: 54px;
|
||||
font-weight: 500;
|
||||
text-align: right;
|
||||
color: #4b4b4b;
|
||||
}
|
||||
.menu_grid .piece_info div {
|
||||
height: 53px;
|
||||
display: flex;
|
||||
flex-flow: column;
|
||||
justify-content: space-evenly;
|
||||
}
|
||||
.menu_grid .piece_info div span {
|
||||
font-family: "Work Sans";
|
||||
font-weight: 500;
|
||||
line-height: 1;
|
||||
letter-spacing: normal;
|
||||
text-align: center;
|
||||
color: #4b4b4b;
|
||||
}
|
||||
.menu_grid .piece_info div span:first-of-type {
|
||||
font-size: 12px;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
.menu_grid .piece_info div span:last-of-type {
|
||||
font-size: 25px;
|
||||
}
|
||||
.menu_grid .piece_info i {
|
||||
height: 30px;
|
||||
width: 30px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.menu_grid .sub_menu {
|
||||
grid-row: 2;
|
||||
grid-column-start: 2;
|
||||
grid-column-end: -1;
|
||||
display: grid;
|
||||
grid-template-rows: repeat(3, 60px);
|
||||
}
|
||||
.menu_grid .sub_menu .piece_info {
|
||||
height: 60px;
|
||||
display: grid;
|
||||
grid-template-columns: repeat(4, 25%);
|
||||
}
|
||||
.menu_grid .sub_menu .piece_info button {
|
||||
margin: auto;
|
||||
background-color: white;
|
||||
border-color: black;
|
||||
border-radius: 50%;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
}
|
||||
.menu_grid .sub_menu .row_1 {
|
||||
grid-row: 1;
|
||||
}
|
||||
.menu_grid .sub_menu .row_1 button {
|
||||
grid-column: 1;
|
||||
}
|
||||
.menu_grid .sub_menu .row_1 div {
|
||||
grid-column: 2;
|
||||
}
|
||||
.menu_grid .sub_menu .row_1 div:last-of-type {
|
||||
grid-column: 3;
|
||||
}
|
||||
.menu_grid .sub_menu .row_2 {
|
||||
grid-row: 2;
|
||||
}
|
||||
.menu_grid .sub_menu .row_2 div {
|
||||
grid-column: 2;
|
||||
}
|
||||
.menu_grid .sub_menu .row_2 div:first-of-type {
|
||||
grid-column: 1;
|
||||
}
|
||||
.menu_grid .sub_menu .row_2 div:last-of-type {
|
||||
grid-column: 3;
|
||||
}
|
||||
.menu_grid .sub_menu .row_3 {
|
||||
grid-row: 3;
|
||||
}
|
||||
.menu_grid .sub_menu .row_3 div {
|
||||
grid-column: 2;
|
||||
}
|
||||
.menu_grid .sub_menu .row_3 div:first-of-type {
|
||||
grid-column: 1;
|
||||
}
|
||||
.menu_grid .sub_menu .row_3 div:last-of-type {
|
||||
grid-column: 3;
|
||||
}
|
||||
.dashboard {
|
||||
font-family: "Work Sans";
|
||||
height: calc(100% - 60px);
|
||||
@@ -4309,21 +4227,42 @@ article .box .body {
|
||||
flex-flow: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background-color: rgba(153, 207, 255, 0.6);
|
||||
border-top-left-radius: 100px;
|
||||
border-bottom-left-radius: 100px;
|
||||
position: relative;
|
||||
}
|
||||
.dashboard .first_col .timing-area .start::before,
|
||||
.dashboard .first_col .timing-area .current::before,
|
||||
.dashboard .first_col .timing-area .end::before {
|
||||
content: "";
|
||||
display: block;
|
||||
width: 120%;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
background-repeat: no-repeat;
|
||||
background-position: 0 0;
|
||||
background-size: 100%;
|
||||
left: 0px;
|
||||
top: 0;
|
||||
z-index: 0;
|
||||
}
|
||||
.dashboard .first_col .timing-area .start small,
|
||||
.dashboard .first_col .timing-area .current small,
|
||||
.dashboard .first_col .timing-area .end small {
|
||||
font-size: 26px;
|
||||
text-transform: uppercase;
|
||||
z-index: 1;
|
||||
}
|
||||
.dashboard .first_col .timing-area .start time,
|
||||
.dashboard .first_col .timing-area .current time,
|
||||
.dashboard .first_col .timing-area .end time {
|
||||
font-size: 120px;
|
||||
font-weight: 300;
|
||||
z-index: 1;
|
||||
}
|
||||
.dashboard .first_col .timing-area .start::before {
|
||||
background-image: url(/assets/svg/dashboard-top-left.svg);
|
||||
}
|
||||
.dashboard .first_col .timing-area .end::before {
|
||||
background-image: url(/assets/svg/dashboard-bottom-left.svg);
|
||||
}
|
||||
.dashboard .first_col .timing-area .current {
|
||||
background-color: transparent;
|
||||
@@ -4412,10 +4351,30 @@ article .box .body {
|
||||
display: flex;
|
||||
flex-flow: column;
|
||||
}
|
||||
.dashboard .third_col .recipe {
|
||||
height: 97px;
|
||||
position: relative;
|
||||
}
|
||||
.dashboard .third_col .recipe::before {
|
||||
content: "";
|
||||
display: block;
|
||||
width: 761px;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
background-repeat: no-repeat;
|
||||
background-position: 50%;
|
||||
background-size: cover;
|
||||
left: -100px;
|
||||
top: 0;
|
||||
z-index: 0;
|
||||
background-image: url(/assets/svg/dashboard-top-right.svg);
|
||||
}
|
||||
.dashboard .third_col .piece_time {
|
||||
display: grid;
|
||||
grid-template-rows: repeat(2, auto);
|
||||
grid-template-columns: repeat(2, auto);
|
||||
height: 245px;
|
||||
padding: 20px;
|
||||
}
|
||||
.dashboard .third_col .piece_time .piece_hours {
|
||||
grid-row: 1;
|
||||
@@ -4431,29 +4390,24 @@ article .box .body {
|
||||
}
|
||||
.dashboard .third_col .piece_time div span {
|
||||
font-family: "Work Sans";
|
||||
font-weight: 500;
|
||||
text-align: center;
|
||||
color: #4b4b4b;
|
||||
}
|
||||
.dashboard .third_col .piece_time div span:first-of-type {
|
||||
font-size: 26px;
|
||||
font-weight: 500;
|
||||
text-transform: uppercase;
|
||||
}
|
||||
.dashboard .third_col .piece_time div span:last-of-type {
|
||||
font-size: 120px;
|
||||
font-weight: 300;
|
||||
}
|
||||
.dashboard .third_col .pieces {
|
||||
height: 400px;
|
||||
}
|
||||
.dashboard .third_col .pieces aside {
|
||||
margin-top: 10px;
|
||||
height: 100%;
|
||||
}
|
||||
.dashboard .third_col .pieces aside .piece_info {
|
||||
height: 77px;
|
||||
}
|
||||
.dashboard .third_col .pieces aside .sub_menu .piece_info {
|
||||
height: 60px;
|
||||
height: calc(100% - 78px);
|
||||
}
|
||||
.warmers {
|
||||
position: relative;
|
||||
@@ -4847,6 +4801,18 @@ article .box .body {
|
||||
}
|
||||
.arch .box-gauge {
|
||||
width: 68px;
|
||||
position: relative;
|
||||
}
|
||||
.arch .box-gauge .value {
|
||||
position: absolute;
|
||||
top: 35%;
|
||||
margin: auto;
|
||||
width: 100%;
|
||||
left: 0;
|
||||
/* right: 0; */
|
||||
text-align: center;
|
||||
font-size: 0.8rem;
|
||||
color: #002680;
|
||||
}
|
||||
.arch .box-gauge div:last-of-type {
|
||||
margin-top: -25px;
|
||||
@@ -5392,7 +5358,7 @@ select:focus {
|
||||
display: flex;
|
||||
flex-flow: row;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.input-area.grid {
|
||||
display: grid;
|
||||
@@ -5454,7 +5420,6 @@ select:focus {
|
||||
color: #002680;
|
||||
font-size: 24px;
|
||||
font-weight: 500;
|
||||
flex: 0.7;
|
||||
}
|
||||
.input-area .numeric {
|
||||
font-size: 18px;
|
||||
@@ -5649,7 +5614,7 @@ button.btn.btn-success[disabled]:hover {
|
||||
background-image: linear-gradient(to bottom, #1756ad, #002680) !important;
|
||||
}
|
||||
button.under {
|
||||
width: 208px;
|
||||
min-width: 118px;
|
||||
height: 45px;
|
||||
object-fit: contain;
|
||||
border-radius: 100px;
|
||||
@@ -5660,6 +5625,9 @@ button.under {
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
cursor: pointer;
|
||||
color: #fff;
|
||||
font-weight: 500;
|
||||
font-size: 18px;
|
||||
}
|
||||
button.under img {
|
||||
max-width: 178px;
|
||||
@@ -6096,7 +6064,6 @@ fieldset[disabled] .form-group.is-focused .togglebutton label {
|
||||
#app > header button.profile,
|
||||
.dashboard > header button.profile {
|
||||
width: 44px;
|
||||
background-image: url("../profile.png");
|
||||
color: #000;
|
||||
background-size: cover;
|
||||
}
|
||||
@@ -6403,7 +6370,7 @@ footer .machine-area {
|
||||
height: 80px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
justify-content: space-evenly;
|
||||
}
|
||||
footer .container {
|
||||
display: flex;
|
||||
@@ -23745,8 +23712,8 @@ body {
|
||||
position: absolute;
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
top: calc(50%-200px / 2);
|
||||
left: calc(50%-200px / 2);
|
||||
top: calc(50% - 200px / 2);
|
||||
left: calc(50% - 200px / 2);
|
||||
text-align: center;
|
||||
line-height: 200px;
|
||||
font-size: 100px;
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="554" height="186" viewBox="0 0 554 186">
|
||||
<path fill="#99CFFF" fill-opacity=".6" fill-rule="evenodd" stroke="#002680" stroke-linejoin="round" stroke-width="8" d="M550.002 182.001L93 182c-49.153 0-89-39.847-89-89S43.847 4 93 4h331.248C445.819 76.249 490.628 138.473 550.002 182z"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 338 B |
@@ -0,0 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="553" height="187" viewBox="0 0 553 187">
|
||||
<path fill="#99CFFF" fill-opacity=".6" fill-rule="evenodd" stroke="#002680" stroke-linejoin="round" stroke-width="8" d="M423.951 182.998L93 183c-49.153 0-89-39.847-89-89S43.847 5 93 5l455.653-.007c-58.976 43.68-103.408 105.88-124.702 178.005z"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 345 B |
@@ -0,0 +1,3 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="1000" height="88" viewBox="0 0 761 97">
|
||||
<path fill="#99CFFF" fill-opacity=".6" fill-rule="evenodd" stroke="#002680" stroke-linejoin="round" stroke-width="8" d="M773 5v88l-685.61-.006C65.127 58.966 36.96 29.147 4.348 4.992L773 5z"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 290 B |
@@ -2,6 +2,7 @@
|
||||
"env": "development",
|
||||
"api": {
|
||||
"enabled": true,
|
||||
"apiServerUrl": "http://localhost:9000/"
|
||||
}
|
||||
"apiServerUrl": "http://seriate.steamware.net:9000/"
|
||||
},
|
||||
"allUIVisible": true
|
||||
}
|
||||
@@ -4,4 +4,4 @@
|
||||
"enabled": true,
|
||||
"apiServerUrl": "http://localhost:9000/"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -13,7 +13,7 @@
|
||||
<script src="Scripts/jquery.mousewheel.js"></script>
|
||||
<script src="Scripts/jquery.signalR-2.2.2.min.js"></script>
|
||||
<script src="Scripts/raphael-2.1.4.min.js"></script>
|
||||
<script src="http://localhost:9000/signalr/hubs" async></script>
|
||||
<script src="http://seriate.steamware.net:9000/signalr/hubs" async></script>
|
||||
|
||||
<link href="assets/styles/style.css" rel="stylesheet" />
|
||||
</head>
|
||||
@@ -28,4 +28,4 @@
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
</html>
|
||||
Generated
+9
-4
@@ -10831,6 +10831,11 @@
|
||||
"js-tokens": "^3.0.0 || ^4.0.0"
|
||||
}
|
||||
},
|
||||
"lottie-web": {
|
||||
"version": "5.7.0",
|
||||
"resolved": "https://registry.npmjs.org/lottie-web/-/lottie-web-5.7.0.tgz",
|
||||
"integrity": "sha512-mCj9KaVR1FdcaRuKB0oqKqC2R+awlqGgx38Sy4q3H0+aNPJ9Ut5LIvBNGyMHiZRpJlPcRQ1Mk//fp2bY3QYq1A=="
|
||||
},
|
||||
"lower-case": {
|
||||
"version": "1.1.4",
|
||||
"resolved": "https://registry.npmjs.org/lower-case/-/lower-case-1.1.4.tgz",
|
||||
@@ -16938,11 +16943,11 @@
|
||||
}
|
||||
},
|
||||
"vue-property-decorator": {
|
||||
"version": "8.4.0",
|
||||
"resolved": "https://registry.npmjs.org/vue-property-decorator/-/vue-property-decorator-8.4.0.tgz",
|
||||
"integrity": "sha512-0o85LJSTLZvDaB7IXfmpONfAQZ7NgScFvptFSrlFFSsScR716muJb3mMFojNnKC3Vpm7CM4PsmHNdk30uuNpag==",
|
||||
"version": "8.2.2",
|
||||
"resolved": "https://registry.npmjs.org/vue-property-decorator/-/vue-property-decorator-8.2.2.tgz",
|
||||
"integrity": "sha512-3gRrIeoUtjXvkoMX2stJsVs7805Pa9MXEndnk21ej+sWO7AIc5HF1TKqK0Pox5TEjpO02UbadIF0QWNrx6ZwXQ==",
|
||||
"requires": {
|
||||
"vue-class-component": "^7.1.0"
|
||||
"vue-class-component": "^7.0.1"
|
||||
}
|
||||
},
|
||||
"vue-resize": {
|
||||
|
||||
@@ -16,24 +16,25 @@
|
||||
"chart.js": "^2.9.3",
|
||||
"core-js": "^3.4.4",
|
||||
"izitoast": "1.2.0",
|
||||
"lottie-web": "^5.7.0",
|
||||
"moment": "2.24.0",
|
||||
"qrcode": "^1.4.4",
|
||||
"raphael": "^2.3.0",
|
||||
"sprintf-js": "1.1.2",
|
||||
"svg-gauge": "^1.0.6",
|
||||
"svg-pan-zoom": "3.6.1",
|
||||
"v-tooltip": "^2.0.3",
|
||||
"vee-validate": "2.1.1",
|
||||
"vue": "^2.6.11",
|
||||
"vue-chartjs": "^3.5.0",
|
||||
"vue-class-component": "7.2.3",
|
||||
"vue-drag-drop": "1.1.4",
|
||||
"vue-property-decorator": "8.4.0",
|
||||
"vue-property-decorator": "8.2.2",
|
||||
"vue-router": "^3.1.6",
|
||||
"vue-smooth-dnd": "0.8.1",
|
||||
"vue2-ace-editor": "0.0.15",
|
||||
"vue2-datepicker": "3.4.1",
|
||||
"vuex": "3.1.3",
|
||||
"svg-pan-zoom": "3.6.1"
|
||||
"vuex": "3.1.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/plugin-proposal-export-default-from": "7.8.3",
|
||||
|
||||
+2
-1
@@ -17,7 +17,8 @@ declare module Recipe {
|
||||
unitMeasure: string,
|
||||
setpointHMI: number,
|
||||
setpointPLC: number,
|
||||
valueAct: number
|
||||
valueAct: number,
|
||||
enumVal: { [id: string]: { text: string, anim: string } }
|
||||
}
|
||||
|
||||
interface IRecipe {
|
||||
|
||||
@@ -9,7 +9,6 @@ import { Factory, messageService } from "./_base";
|
||||
import { ModalContainer, ModalNcContainer } from "./modules/base-components";
|
||||
import { ModalHelper } from "@/components/modals"
|
||||
import { store, appModelActions, machineStatusActions } from "@/store";
|
||||
import { underTheHood } from "@/app_modules/under-the-hood";
|
||||
import SwitchButton from "@/app_modules_thermo/components/paddle/switch-button.vue";
|
||||
import Sidebar from "@/app_modules_thermo/components/paddle/sidebar.vue";
|
||||
import Dashboard from "@/app_modules_thermo/dashboard/dashboard.vue";
|
||||
@@ -40,7 +39,6 @@ declare var cmsClient;
|
||||
dashboard: Dashboard,
|
||||
predashboard: PreDashboard,
|
||||
alarmList,
|
||||
underTheHood,
|
||||
}
|
||||
})
|
||||
export default class app extends Vue {
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
<predashboard v-if="statusPreDashboard"></predashboard>
|
||||
<alarm-list :applyBlur="applyBlur"></alarm-list>
|
||||
|
||||
<under-the-hood :class="{'blur':(applyBlur || applyBlurNc)}"></under-the-hood>
|
||||
<div
|
||||
id="main-view"
|
||||
ref="main-view"
|
||||
@@ -15,27 +14,6 @@
|
||||
<router-view :class="{'blur':applyBlurInternal}" />
|
||||
<modal-container name="modal" container-name="modal-internal" :inform-hmi="false"></modal-container>
|
||||
</div>
|
||||
<div
|
||||
id="main-view-handler"
|
||||
ref="main-view-handler"
|
||||
@click="toggleMainView()"
|
||||
:class="{liftedUp : isMainViewLiftedUp,liftedDw : !isMainViewLiftedUp,'blur':(applyBlur || applyBlurNc)}"
|
||||
>
|
||||
<vue-gesture
|
||||
:type="'swipedown'"
|
||||
:call="toggleMainView"
|
||||
:onmove="movepanel"
|
||||
:onstart="onstartdrag"
|
||||
:onstop="onstopdrag"
|
||||
>
|
||||
<div
|
||||
class="handle"
|
||||
:title="'header_tooltip_close_uth' | localize('Close under-the-hood area')"
|
||||
>
|
||||
<i class="fa fa-angle-double-down"></i>
|
||||
</div>
|
||||
</vue-gesture>
|
||||
</div>
|
||||
|
||||
<nav :class="{'blur':(applyBlur || applyBlurNc)}">
|
||||
<switch-button></switch-button>
|
||||
@@ -45,7 +23,6 @@
|
||||
|
||||
<app-footer :class="{'blur':(applyBlur || applyBlurNc)}"></app-footer>
|
||||
</div>
|
||||
<modal-nc-container name="modal-nc" :class="{'blur':applyBlur}"></modal-nc-container>
|
||||
<modal-container containerName="modal-login" name="modal-login"></modal-container>
|
||||
<keyboard></keyboard>
|
||||
<modal-container name="modal"></modal-container>
|
||||
|
||||
@@ -1,256 +0,0 @@
|
||||
import { MachineInfoModel, machineInfoActions } from './store/machineInfo.store';
|
||||
import {machineStatusActions, AreaModel} from '@/store/machineStatus.store';
|
||||
import {usersActions} from '@/store/users.store';
|
||||
import {store, appModelActions} from '@/store'
|
||||
import {processModelActions} from "@/store/runningProcess.store";
|
||||
import { signalr_alarms } from './@types/signalr.alarms';
|
||||
import {alarmsModelActions} from "./store/alarms.store";
|
||||
|
||||
let security:Array<signalr_security.securityFunction>=[];
|
||||
let area:Array<AreaModel>=[];
|
||||
let machineInfo:MachineInfoModel;
|
||||
let user: server.userModel ;
|
||||
let process:signalr_process.ProcessData;
|
||||
let alarm:signalr_alarms.processAlarm;
|
||||
let alarm2:signalr_alarms.processAlarm;
|
||||
|
||||
function addMockData(){
|
||||
|
||||
machineInfo = {
|
||||
machineSerialNumber: "12345667890",
|
||||
ncSerialNumber: "1234322222999930",
|
||||
machineName: "Pippo",
|
||||
installationDate: null,
|
||||
ncBrand: null,
|
||||
ncModel: null,
|
||||
firmwareVersion: null,
|
||||
plcVersion: null,
|
||||
processes: 0,
|
||||
softKeys: {},
|
||||
ncSoftKeys: {},
|
||||
heads: [],
|
||||
cmsServerVersion: null,
|
||||
cmsCoreVersion: null,
|
||||
cmsClientVersion: null,
|
||||
canChangePages:true,
|
||||
isSiemens: true,
|
||||
isFanuc: false,
|
||||
isOsai: false,
|
||||
isSCMVisualStyle: false,
|
||||
defaultLanguage: "en",
|
||||
clientDefaultLanguage: "en",
|
||||
softkeysFavorites: []
|
||||
}
|
||||
|
||||
|
||||
|
||||
area.push(
|
||||
{
|
||||
name: 'production',
|
||||
enabled: true,
|
||||
allowExternalBrowser: true,
|
||||
ncNeeded: false
|
||||
},
|
||||
{
|
||||
name: 'ricetta',
|
||||
allowExternalBrowser: true,
|
||||
enabled: true,
|
||||
ncNeeded: false
|
||||
},
|
||||
{
|
||||
name: 'report',
|
||||
enabled: true,
|
||||
allowExternalBrowser: true,
|
||||
ncNeeded: false
|
||||
},
|
||||
{
|
||||
name: 'alarms',
|
||||
enabled: true,
|
||||
allowExternalBrowser: true,
|
||||
ncNeeded: false
|
||||
},
|
||||
{
|
||||
name: 'progrprerisc',
|
||||
enabled: true,
|
||||
allowExternalBrowser: true,
|
||||
ncNeeded: false
|
||||
},
|
||||
{
|
||||
name: 'scada',
|
||||
enabled: true,
|
||||
allowExternalBrowser: true,
|
||||
ncNeeded: false
|
||||
},
|
||||
{
|
||||
name: 'clock',
|
||||
enabled: true,
|
||||
allowExternalBrowser: true,
|
||||
ncNeeded: false
|
||||
},
|
||||
{
|
||||
name: 'jobeditor',
|
||||
enabled: true,
|
||||
allowExternalBrowser: true,
|
||||
ncNeeded: false
|
||||
},
|
||||
{
|
||||
name: 'utilities',
|
||||
enabled: true,
|
||||
allowExternalBrowser: true,
|
||||
ncNeeded: false
|
||||
});
|
||||
|
||||
security.push(
|
||||
{
|
||||
id:0,
|
||||
name:'productionArea',
|
||||
area:'production',
|
||||
enabled: true,
|
||||
canRead: true,
|
||||
canWrite: true
|
||||
},
|
||||
{
|
||||
id:1,
|
||||
name:'ricettaArea',
|
||||
area:'ricetta',
|
||||
enabled: true,
|
||||
canRead: true,
|
||||
canWrite: true
|
||||
},
|
||||
{
|
||||
id:2,
|
||||
name:'reportArea',
|
||||
area:'report',
|
||||
enabled: true,
|
||||
canRead: true,
|
||||
canWrite: true
|
||||
},
|
||||
{
|
||||
id:3,
|
||||
name:'alarmsArea',
|
||||
area:'alarms',
|
||||
enabled: true,
|
||||
canRead: true,
|
||||
canWrite: true
|
||||
},
|
||||
{
|
||||
id:4,
|
||||
name:'progrpreriscArea',
|
||||
area:'progrprerisc',
|
||||
enabled: true,
|
||||
canRead: true,
|
||||
canWrite: true
|
||||
},
|
||||
{
|
||||
id:5,
|
||||
name:'scadaArea',
|
||||
area:'scada',
|
||||
enabled: true,
|
||||
canRead: true,
|
||||
canWrite: true
|
||||
},
|
||||
{
|
||||
name:'clockArea',
|
||||
id:6,
|
||||
area:'clock',
|
||||
enabled: true,
|
||||
canRead: true,
|
||||
canWrite: true
|
||||
},
|
||||
{
|
||||
id:7,
|
||||
name:'jobeditorArea',
|
||||
area:'jobeditor',
|
||||
enabled: true,
|
||||
canRead: true,
|
||||
canWrite: true
|
||||
},
|
||||
{
|
||||
id:8,
|
||||
name:'utilitiesArea',
|
||||
area:'utilities',
|
||||
enabled: true,
|
||||
canRead: true,
|
||||
canWrite: true
|
||||
},
|
||||
{
|
||||
id:9,
|
||||
name:'processCmd',
|
||||
area:'process',
|
||||
enabled: true,
|
||||
canRead: true,
|
||||
canWrite: true
|
||||
},
|
||||
{
|
||||
id:10,
|
||||
name:'alarmCmd',
|
||||
area:'alarm',
|
||||
enabled: true,
|
||||
canRead: true,
|
||||
canWrite: true
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
|
||||
|
||||
user = {
|
||||
id: 1,
|
||||
userId: 1234567890,
|
||||
username: 'fraguerrieri',
|
||||
firstName: 'Francesco',
|
||||
password: 'francesco',
|
||||
lastName: 'Guerrieri',
|
||||
securityStamp: null,
|
||||
roleId: null,
|
||||
role: null,
|
||||
}
|
||||
|
||||
process={
|
||||
id: 1,
|
||||
type: "RUN",
|
||||
isInAlarm: false,
|
||||
partProgramName: "string",
|
||||
status: "RUN",
|
||||
visible: true,
|
||||
reps: 12324
|
||||
}
|
||||
|
||||
alarm={
|
||||
id:1,
|
||||
guid:"ILYGYFC",
|
||||
source:"PLC",
|
||||
message:"allarmeprove1",
|
||||
Message:"allarmeprova1",
|
||||
dateTime:null,
|
||||
DateTime:null,
|
||||
isWarning:false,
|
||||
restorationIsEnabled:false,
|
||||
process:1
|
||||
}
|
||||
|
||||
alarm2={
|
||||
id:2,
|
||||
guid:"VKYCOLUV",
|
||||
source:"PLC",
|
||||
message:"allarmeprova2",
|
||||
Message:"allarmeprova2",
|
||||
dateTime:null,
|
||||
DateTime:null,
|
||||
isWarning:false,
|
||||
restorationIsEnabled:false,
|
||||
process:2
|
||||
}
|
||||
|
||||
processModelActions.addProcess(store,process);
|
||||
machineInfoActions.updateMachineInfo(store,machineInfo);
|
||||
machineStatusActions.setAreasConfg(store,area);
|
||||
machineStatusActions.setSecurityFunction(store,security);
|
||||
usersActions.updateUser(store,user);
|
||||
appModelActions.SetCurrentUser(store,user);
|
||||
alarmsModelActions.addAlarm(store,alarm);
|
||||
alarmsModelActions.addAlarm(store,alarm2);
|
||||
|
||||
}
|
||||
addMockData();
|
||||
|
||||
@@ -1,25 +1,17 @@
|
||||
import { messageService } from "@/_base/messageService";
|
||||
|
||||
// import { machineService } from "src/services/machineService";
|
||||
// import { loginService } from "src/services/loginService";
|
||||
|
||||
import { store, AppModel/*, MachineStatusModel, machineStatusActions, localizationModelActions, machineInfoActions*/ } from "@/store";
|
||||
import {
|
||||
store, AppModel,/*, MachineStatusModel, machineStatusActions, localizationModelActions, machineInfoActions*/
|
||||
machineStatusActions
|
||||
} from "@/store";
|
||||
import { UserInfoDialog, MachineInfoDialog, ContactInfoDialog } from "@/app_modules/machine";
|
||||
|
||||
// import { DataService } from "./services/dataService";
|
||||
// import { ToolingService } from "./services/toolingService";
|
||||
// import { DepotService } from "./services/depotService";
|
||||
// import { MaintenanceService } from "./services/maintenanceService";
|
||||
// import { localizationService, LocalizationService } from "./services/localizationService";
|
||||
// import { DEBUG_CONFIGURATION, USE_RUNTIME_CONFIGURATION } from "./config";
|
||||
import { ModalHelper } from "./components/modals/ModalHelper";
|
||||
import Vue from "vue";
|
||||
// import { scadaService } from "./services/scadaService";
|
||||
// import { Hub } from "./services";
|
||||
import { loginService, machineService, localizationService } from "./services";
|
||||
|
||||
// import { UsersService } from "./services/usersService";
|
||||
|
||||
// Factory.Register(UsersService);
|
||||
// Factory.Register(LocalizationService);
|
||||
|
||||
declare let cmsClient: any;
|
||||
let HMIvisible = false;
|
||||
@@ -49,7 +41,7 @@ messageService.subscribeToChannel("show-contact-info", () => { ModalHelper.ShowM
|
||||
// messageService.subscribeToChannel("show-m155-questions", () => { ModalHelper.ShowNextM155Modal(); });
|
||||
// messageService.subscribeToChannel("show-nochange-page", () => {
|
||||
// ModalHelper.ShowMessage(
|
||||
// Vue.filter('localize')("modal_nochangepage_title", "Operazione non posssibile"),
|
||||
// Vue.filter('localize')("modal_nochangepage_title", "Operazione non possibile"),
|
||||
// Vue.filter('localize')("modal_nochangepage_message", "Termina le operazioni pendenti prima di utilizzare le altre applicazioni"),
|
||||
// null,
|
||||
// "modal"
|
||||
@@ -59,57 +51,21 @@ messageService.subscribeToChannel("show-contact-info", () => { ModalHelper.ShowM
|
||||
//Loading machine configuration
|
||||
async function loadMachineConfig() {
|
||||
|
||||
// await loginService.getUserInfo();
|
||||
// try{
|
||||
// await scadaService.ListScada();
|
||||
// }catch(err){
|
||||
|
||||
// }
|
||||
await loginService.getUserInfo();
|
||||
|
||||
|
||||
try {
|
||||
// let machine = new machineService();
|
||||
// let result = await machine.getAreasConfiguration();
|
||||
// machineStatusActions.setAreasConfg(store, result);
|
||||
let machine = new machineService();
|
||||
let result = await machine.getAreasConfiguration();
|
||||
machineStatusActions.setAreasConfg(store, result);
|
||||
|
||||
// let mcresult = await machine.getMachineConfiguration();
|
||||
// let vendor = mcresult.ncVendor.toLowerCase();
|
||||
// let isSCM = false;
|
||||
|
||||
|
||||
// if (typeof cmsClient != "undefined") {
|
||||
// isSCM = cmsClient.isSCMVisualStyle();
|
||||
// }
|
||||
|
||||
// if (!USE_RUNTIME_CONFIGURATION)
|
||||
// vendor = DEBUG_CONFIGURATION;
|
||||
|
||||
// set vendor type
|
||||
// switch (vendor) {
|
||||
// case "siemens": machineInfoActions.updateMachineInfo(store, { isSiemens: true, isFanuc: false, isOsai: false, defaultLanguage: mcresult.defaultLanguage, isSCMVisualStyle: isSCM }); break;
|
||||
// case "fanuc": machineInfoActions.updateMachineInfo(store, { isSiemens: false, isFanuc: true, isOsai: false, defaultLanguage: mcresult.defaultLanguage, isSCMVisualStyle: isSCM }); break;
|
||||
// case "osai": machineInfoActions.updateMachineInfo(store, { isSiemens: false, isFanuc: false, isOsai: true, defaultLanguage: mcresult.defaultLanguage, isSCMVisualStyle: isSCM }); break;
|
||||
// default: machineInfoActions.updateMachineInfo(store, { isSiemens: false, isFanuc: false, isOsai: false, defaultLanguage: mcresult.defaultLanguage, isSCMVisualStyle: isSCM }); break;
|
||||
// }
|
||||
|
||||
// machineInfoActions.updateMachineInfo(store, { clientDefaultLanguage: mcresult.defaultLanguage });
|
||||
|
||||
// let ds = new DataService();
|
||||
|
||||
// let ts = new ToolingService();
|
||||
|
||||
// let des = new DepotService();
|
||||
|
||||
// ds.GetSoftKeysConfiguration();
|
||||
// ds.GetNcSoftKeysConfiguration();
|
||||
// ds.GetHeadsConfiguration();
|
||||
// ts.GetToolsConfiguration();
|
||||
let mcresult = await machine.getMachineConfiguration();
|
||||
|
||||
// load default language
|
||||
// if ((store.state as AppModel).localization.currentLanguage == "") {
|
||||
// localizationService.changeCurrentLanguage(mcresult.defaultLanguage);
|
||||
// // localizationModelActions.changeCurrentLanguage(store, mcresult.defaultLanguage);
|
||||
// }
|
||||
if (!(store.state as AppModel).localization.currentLanguage) {
|
||||
localizationService.changeCurrentLanguage(mcresult.defaultLanguage);
|
||||
// localizationModelActions.changeCurrentLanguage(store, mcresult.defaultLanguage);
|
||||
}
|
||||
}
|
||||
catch (error) {
|
||||
console.error("Loading initial configuration error: ", error)
|
||||
|
||||
@@ -11,8 +11,6 @@ import Home from "./components/Home.vue";
|
||||
import ModalIframe from "./modules/base-components/modal-iframe.vue";
|
||||
import ModalImage from "./modules/base-components/modal-image.vue";
|
||||
|
||||
import CreateQueue from "./components/create-queue.vue";
|
||||
|
||||
import SoftKeysPrefered from "./modules/base-components/cards/softkeys-prefered.vue";
|
||||
|
||||
/* Da cancellare dopo sviluppo */
|
||||
@@ -48,24 +46,13 @@ export {
|
||||
Home,
|
||||
ModalIframe,
|
||||
ModalImage,
|
||||
ProgramManagement,
|
||||
ModalMissingTools,
|
||||
ModalAddOffsetTool,
|
||||
ModalEditJob,
|
||||
ModalJobAddParameter,
|
||||
ModalLoadProgram,
|
||||
CardFolderPath,
|
||||
CardAssistedTooling,
|
||||
CardToolDepot,
|
||||
CardBusyDepot,
|
||||
CardUtilities,
|
||||
MissingTool,
|
||||
ModalReportSelectColumn,
|
||||
CreateMaintenance,
|
||||
HistoryMaintenance,
|
||||
MaintenanceProgress,
|
||||
SoftKeysPrefered,
|
||||
CreateQueue,
|
||||
ZoomImage,
|
||||
ModalCreateUser,
|
||||
ModalPasswordUser,
|
||||
|
||||
@@ -1,11 +1,5 @@
|
||||
import {
|
||||
// Home,
|
||||
// Utilities,
|
||||
// CardUtilities,
|
||||
// MaintenanceProgress,
|
||||
// CardAssistedTooling,
|
||||
|
||||
// CardToolDepot,
|
||||
// CreateMaintenance,
|
||||
// SoftKeysPrefered,
|
||||
// CreateQueue,
|
||||
@@ -60,9 +54,9 @@ export let routes = [
|
||||
|
||||
|
||||
import { routes as alarmRoutes } from "@/app_modules/alarms/route.js";
|
||||
import { routes as productionRoutes } from "./app_modules_thermo/processo/route.js";
|
||||
import { routes as productionRoutes } from "./app_modules_thermo/processo/route";
|
||||
import { routes as SetupRoutes } from "@/app_modules_thermo/setup/route.js";
|
||||
import { routes as ProgrPreriscaldoRoutes } from "@/app_modules_thermo/programmazione-preriscaldo/route.js";
|
||||
import { routes as ProgrPreriscaldoRoutes } from "@/app_modules_thermo/programmazione-preriscaldo/route";
|
||||
// import { routes as toolingRoutes} from "./app_modules/tooling/route";
|
||||
// import { routes as maintenance } from "./app_modules/maintenance/route";
|
||||
// import { routes as scada} from "./app_modules/scada/route";
|
||||
@@ -72,7 +66,7 @@ import { routes as ProgrPreriscaldoRoutes } from "@/app_modules_thermo/programma
|
||||
injectRoutes(routes, alarmRoutes);
|
||||
injectRoutes(routes, productionRoutes);
|
||||
injectRoutes(routes, SetupRoutes);
|
||||
injectRoutes(routes,ProgrPreriscaldoRoutes);
|
||||
injectRoutes(routes, ProgrPreriscaldoRoutes);
|
||||
// injectRoutes(routes, toolingRoutes);
|
||||
// injectRoutes(routes, maintenance);
|
||||
// injectRoutes(routes, scada);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
import Vue from "vue";
|
||||
import { Component, Watch } from "vue-property-decorator";
|
||||
|
||||
import 'vue2-datepicker/index.css';
|
||||
import moment from "moment";
|
||||
|
||||
|
||||
@@ -51,12 +51,12 @@ export default class AlarmHistory extends Vue {
|
||||
type: 0,
|
||||
user: 1,
|
||||
title: "",
|
||||
sources: [{ id: 0, label: this.$options.filters.localize("alarm_history_filter_nc", "NC")}, {id: 1, label: this.$options.filters.localize("alarm_history_filter_plc", "PLC")}],
|
||||
sources: [{ id: 0, label: this.$options.filters.localize("alarm_history_filter_nc", "NC") }, { id: 1, label: this.$options.filters.localize("alarm_history_filter_plc", "PLC") }],
|
||||
multiUser: [],
|
||||
interval: [new Date(new Date().setDate(new Date().getDate() - 6)), new Date(new Date().setDate(new Date().getDate() + 1))]
|
||||
};
|
||||
|
||||
sources: Array<string> = [this.$options.filters.localize("alarm_history_filter_nc", "NC"),this.$options.filters.localize("alarm_history_filter_plc", "PLC")];
|
||||
sources: Array<string> = [this.$options.filters.localize("alarm_history_filter_nc", "NC"), this.$options.filters.localize("alarm_history_filter_plc", "PLC")];
|
||||
users: Array<any> = [];
|
||||
data: AlarmModel[] = []
|
||||
selectedAlarm: AlarmModel = null;
|
||||
@@ -108,7 +108,7 @@ export default class AlarmHistory extends Vue {
|
||||
arrayUserFilter.push(user.id);
|
||||
})
|
||||
|
||||
let result = await awaiter(alarmsService.getAlarms(this.filter.title, arraySourceFilter, arrayUserFilter, from, to, this.currentPage, this.itemsPerPage,
|
||||
let result = await awaiter(alarmsService.getAlarms(this.filter.title, arraySourceFilter, arrayUserFilter, from, to, this.currentPage, this.itemsPerPage,
|
||||
this.$store.state.currentUser.language));
|
||||
this.data = result.alarms;
|
||||
this.totalPages = result.pages;
|
||||
@@ -128,10 +128,10 @@ export default class AlarmHistory extends Vue {
|
||||
}
|
||||
this.onloading = false;
|
||||
|
||||
messageService.subscribeToChannel("login-reload",
|
||||
() => {
|
||||
this.filterChanged("","")
|
||||
});
|
||||
messageService.subscribeToChannel("login-reload",
|
||||
() => {
|
||||
this.filterChanged("", "")
|
||||
});
|
||||
}
|
||||
|
||||
async onChange(e) {
|
||||
@@ -150,16 +150,16 @@ export default class AlarmHistory extends Vue {
|
||||
this.notes = await awaiter(alarmsService.getNote(this.selectedAlarm.alarmId, this.selectedAlarm.source));
|
||||
}
|
||||
|
||||
async deleteAlarms(){
|
||||
async deleteAlarms() {
|
||||
ModalHelper.AskConfirm(this.$options.filters.localize("modal_confirm_title", "Richiesta di conferma"),
|
||||
this.$options.filters.localize("modal_confirm_delete_alarms", "Confermi la cancellazione di tutti gli allarmi salvati?"),
|
||||
async () => {
|
||||
await awaiter(alarmsService.DeleteAlarms())
|
||||
this.filterChanged("","")
|
||||
}, null);
|
||||
this.$options.filters.localize("modal_confirm_delete_alarms", "Confermi la cancellazione di tutti gli allarmi salvati?"),
|
||||
async () => {
|
||||
await awaiter(alarmsService.DeleteAlarms())
|
||||
this.filterChanged("", "")
|
||||
}, null);
|
||||
}
|
||||
|
||||
async exportAlarms(){
|
||||
async exportAlarms() {
|
||||
let $this = this;
|
||||
let from = this.filter.interval && this.filter.interval.length ? this.filter.interval[0] : null;
|
||||
let to = this.filter.interval && this.filter.interval.length ? this.filter.interval[1] : null;
|
||||
@@ -322,7 +322,7 @@ export default class AlarmHistory extends Vue {
|
||||
$('.checkboxesU').removeClass('checkboxesViewUser');
|
||||
}
|
||||
|
||||
public clearDate(){
|
||||
public clearDate() {
|
||||
this.filter.interval = [new Date(new Date().setDate(new Date().getDate() - 6)), new Date(new Date().setDate(new Date().getDate() + 1))];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,231 +1,391 @@
|
||||
<template>
|
||||
<div class="alarm-history-container">
|
||||
<div class="alarm-history-box">
|
||||
<div class="alarm-history-header">
|
||||
<div
|
||||
class="alarm-history-header-label"
|
||||
>{{'alarm_history_header_title' | localize("Lista allarmi")}}</div>
|
||||
</div>
|
||||
<div class="alarm-history-body">
|
||||
<div class="alarm-history-body-left">
|
||||
<div class="alarm-history-left-filter">
|
||||
<div class="filter-text">
|
||||
<label>{{'alarm_history_body_filter' | localize("Filtro")}}</label>
|
||||
<input type="text" v-model="filter.title" :placeholder="'alarm_history_body_filter_placeholder' | localize('Filtra per titolo allarme')">
|
||||
</div>
|
||||
<!--<div class="filter-type">
|
||||
<div class="alarm-history-container">
|
||||
<div class="alarm-history-box">
|
||||
<div class="alarm-history-header">
|
||||
<div
|
||||
class="alarm-history-header-label"
|
||||
>{{'alarm_history_header_title' | localize("Lista allarmi")}}</div>
|
||||
</div>
|
||||
<div class="alarm-history-body">
|
||||
<div class="alarm-history-body-left">
|
||||
<div class="alarm-history-left-filter">
|
||||
<div class="filter-text">
|
||||
<label>{{'alarm_history_body_filter' | localize("Filtro")}}</label>
|
||||
<input
|
||||
type="text"
|
||||
v-model="filter.title"
|
||||
:placeholder="'alarm_history_body_filter_placeholder' | localize('Filtra per titolo allarme')"
|
||||
/>
|
||||
</div>
|
||||
<!--<div class="filter-type">
|
||||
<label>{{'alarm_history_body_filter_type' | localize("Tipo")}}</label>
|
||||
<select v-model="filter.type">
|
||||
<option :value="0">{{'alarm_history_body_select_type_nc' | localize("NC")}}</option>
|
||||
<option :value="1">{{'alarm_history_body_select_type_plc' | localize("PLC")}}</option>
|
||||
</select>
|
||||
</div>-->
|
||||
<div class="multiselect">
|
||||
<label>{{'alarm_history_body_filter_source' | localize("Source")}}</label>
|
||||
<div class="selectBox" @click="openSelectState()">
|
||||
<select id="selectListCheckboxes">
|
||||
<option><span v-for="(item, index) in filter.sources" :key="item.label" >{{'alarm_history_filter_'+item.label.toLowerCase() | localize(item.label)}}{{(index==filter.sources.length-1)?'':', '}}</span></option>
|
||||
<div class="overSelect"></div>
|
||||
</select>
|
||||
</div>
|
||||
</div>-->
|
||||
<div class="multiselect">
|
||||
<label>{{'alarm_history_body_filter_source' | localize("Source")}}</label>
|
||||
<div class="selectBox" @click="openSelectState()">
|
||||
<select id="selectListCheckboxes">
|
||||
<option>
|
||||
<span
|
||||
v-for="(item, index) in filter.sources"
|
||||
:key="item.label"
|
||||
>{{'alarm_history_filter_'+item.label.toLowerCase() | localize(item.label)}}{{(index==filter.sources.length-1)?'':', '}}</span>
|
||||
</option>
|
||||
<div class="overSelect"></div>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="checkboxes">
|
||||
<div>
|
||||
<label for="NC">
|
||||
<div class="custom-checkbox">
|
||||
<input type="checkbox" v-model="filter.sources" :value="{id: 0, label: $options.filters.localize('alarm_history_filter_nc', 'NC')}" id="NC" />
|
||||
<label for="NC"></label>
|
||||
</div>
|
||||
<label class="label-state">{{'alarm_history_filter_nc' | localize("NC")}}</label>
|
||||
</label>
|
||||
</div>
|
||||
<div>
|
||||
<label for="PLC">
|
||||
<div class="custom-checkbox">
|
||||
<input type="checkbox" v-model="filter.sources" :value="{id: 1, label: $options.filters.localize('alarm_history_filter_plc', 'PLC')}" id="PLC" />
|
||||
<label for="PLC"></label>
|
||||
</div>
|
||||
<label class="label-state">{{'alarm_history_filter_plc' | localize("PLC")}}</label>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter-date-range">
|
||||
<label>{{'alarm_history_body_date_range' | localize("Intervallo date")}}</label>
|
||||
<date-picker v-on:clear="clearDate()" v-model="filter.interval" range type="daterange" :lang="lang"></date-picker>
|
||||
</div>
|
||||
<!--<div class="filter-user">
|
||||
<div class="checkboxes">
|
||||
<div>
|
||||
<label for="NC">
|
||||
<div class="custom-checkbox">
|
||||
<input
|
||||
type="checkbox"
|
||||
v-model="filter.sources"
|
||||
:value="{id: 0, label: $options.filters.localize('alarm_history_filter_nc', 'NC')}"
|
||||
id="NC"
|
||||
/>
|
||||
<label for="NC"></label>
|
||||
</div>
|
||||
<label class="label-state">{{'alarm_history_filter_nc' | localize("NC")}}</label>
|
||||
</label>
|
||||
</div>
|
||||
<div>
|
||||
<label for="PLC">
|
||||
<div class="custom-checkbox">
|
||||
<input
|
||||
type="checkbox"
|
||||
v-model="filter.sources"
|
||||
:value="{id: 1, label: $options.filters.localize('alarm_history_filter_plc', 'PLC')}"
|
||||
id="PLC"
|
||||
/>
|
||||
<label for="PLC"></label>
|
||||
</div>
|
||||
<label class="label-state">{{'alarm_history_filter_plc' | localize("PLC")}}</label>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="filter-date-range">
|
||||
<label>{{'alarm_history_body_date_range' | localize("Intervallo date")}}</label>
|
||||
<date-picker
|
||||
v-on:clear="clearDate()"
|
||||
v-model="filter.interval"
|
||||
range
|
||||
type="daterange"
|
||||
:lang="lang"
|
||||
></date-picker>
|
||||
</div>
|
||||
<!--<div class="filter-user">
|
||||
<label>{{'alarm_history_body_user' | localize("Utente")}}</label>
|
||||
<select v-model="filter.user">
|
||||
<option v-for="u in users" :key="'user-'+u.id" :value="u.id">{{u.username}}</option>
|
||||
</select>
|
||||
</div>-->
|
||||
<div class="multiselect">
|
||||
<label>{{'alarm_history_body_user' | localize("Utente")}}</label>
|
||||
<div class="selectBoxU" @click="openSelectStateU()">
|
||||
<select id="selectListCheckboxes">
|
||||
<option><span v-for="(item, index) in filter.multiUser" :key="item" >{{item}} {{(index==filter.multiUser.length-1)?'':', '}}</span></option>
|
||||
<div class="overSelect"></div>
|
||||
</select>
|
||||
</div>
|
||||
</div>-->
|
||||
<div class="multiselect">
|
||||
<label>{{'alarm_history_body_user' | localize("Utente")}}</label>
|
||||
<div class="selectBoxU" @click="openSelectStateU()">
|
||||
<select id="selectListCheckboxes">
|
||||
<option>
|
||||
<span
|
||||
v-for="(item, index) in filter.multiUser"
|
||||
:key="item"
|
||||
>{{item}} {{(index==filter.multiUser.length-1)?'':', '}}</span>
|
||||
</option>
|
||||
<div class="overSelect"></div>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
<div class="checkboxesU">
|
||||
<div v-for="item in users" :key="item.id">
|
||||
<label :for="item.username">
|
||||
<div class="custom-checkbox">
|
||||
<input type="checkbox" v-model="filter.multiUser" :value="item.username" :id="item.username" />
|
||||
<label :for="item.username"></label>
|
||||
</div>
|
||||
<label class="label-state">{{item.username}}</label>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="group-button">
|
||||
<button class="btn" @click="exportAlarms">
|
||||
<i class="fa fa-download"></i>
|
||||
</button>
|
||||
<button v-if="canDelete" class="btn" @click="deleteAlarms">
|
||||
<i class="fa fa-trash"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="alarm-history-table">
|
||||
<div class="loading" v-if="onloading"><i class="fa fa-circle-o-notch fa-spin"></i></div>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{'alarms_history_table_source' | localize("Sorgente") }}</th>
|
||||
<th>{{'alarms_history_table_title' | localize("Titolo Allarme") }}</th>
|
||||
<th>{{'alarms_history_table_date'| localize("Data")}}</th>
|
||||
<th>{{'alarms_history_table_user'| localize("Utente")}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody :class="{'without-footer': totalPages <= 1}">
|
||||
<tr v-for="(row,index) in data" :key="index" @click="selectAlarm(row)" :class="{selected: selectedAlarm == row}">
|
||||
<td colspan="1" ><span :class="{'warning':row.type==1}" class="type" >{{sources[row.source]}}</span></td>
|
||||
<td colspan="1" v-if="row.source == 0 ">{{row.title}}</td>
|
||||
<td colspan="1" v-if="row.source == 1 ">{{'alarm_'+ row.alarmId | localize('alarm_'+ row.alarmId)}}</td>
|
||||
<td colspan="1">{{convertDate(row.timeStamp)}} {{convertDateToTime(row.timeStamp)}}</td>
|
||||
<td colspan="1">
|
||||
<span v-for="(iduser) in row.users" class="users" :key="iduser">{{user(iduser).username}}</span>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot :class="{'hidden': totalPages <= 1}">
|
||||
<tr>
|
||||
<td colspan="4">
|
||||
<div class="group-label-button">
|
||||
<custom-pagination v-model="currentPage" :items-per-page="itemsPerPage" :total-pages="totalPages"></custom-pagination>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="alarm-history-body-right">
|
||||
<div class="box-right scrollable" v-if="selectedAlarm">
|
||||
<div class="box-right-info">
|
||||
<div class="box-right-info-header">
|
||||
<div class="title">
|
||||
<span v-if="selectedAlarm.source == 0 ">{{selectedAlarm.title}}</span>
|
||||
<span v-if="selectedAlarm.source == 1 ">{{'alarm_'+ selectedAlarm.alarmId | localize('alarm_'+ selectedAlarm.alarmId)}}</span>
|
||||
</div>
|
||||
<div class="subtitle">
|
||||
<span class="inside" v-if="selectedAlarm.source == 0 ">{{'alarm_history_filter_nc' | localize("NC")}}</span><span class="inside" v-if="selectedAlarm.source == 0 && selectedAlarm.processes.length>0"><span v-for="p in selectedAlarm.processes" :key="p" >{{p}} </span></span>
|
||||
<span class="inside" v-if="selectedAlarm.source == 1 ">{{'alarm_history_filter_plc' | localize("PLC")}}</span><span class="inside" v-if="selectedAlarm.source == 1 && selectedAlarm.processes.length>0"><span v-for="p in selectedAlarm.processes" :key="p" >{{p}} </span></span>
|
||||
</div>
|
||||
<div class="date">
|
||||
<label>{{convertDate(selectedAlarm.timeStamp)}} {{convertDateToTime(selectedAlarm.timeStamp)}}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-right-info-body">
|
||||
<span v-if="selectedAlarm.description">
|
||||
{{selectedAlarm.description}}
|
||||
</span>
|
||||
</div>
|
||||
<!-- <div class="box-right-info-footer">
|
||||
<div class="checkboxesU">
|
||||
<div v-for="item in users" :key="item.id">
|
||||
<label :for="item.username">
|
||||
<div class="custom-checkbox">
|
||||
<input
|
||||
type="checkbox"
|
||||
v-model="filter.multiUser"
|
||||
:value="item.username"
|
||||
:id="item.username"
|
||||
/>
|
||||
<label :for="item.username"></label>
|
||||
</div>
|
||||
<label class="label-state">{{item.username}}</label>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="group-button">
|
||||
<button class="btn" @click="exportAlarms">
|
||||
<i class="fa fa-download"></i>
|
||||
</button>
|
||||
<button v-if="canDelete" class="btn" @click="deleteAlarms">
|
||||
<i class="fa fa-trash"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="alarm-history-table">
|
||||
<div class="loading" v-if="onloading">
|
||||
<i class="fa fa-circle-o-notch fa-spin"></i>
|
||||
</div>
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{'alarms_history_table_source' | localize("Sorgente") }}</th>
|
||||
<th>{{'alarms_history_table_title' | localize("Titolo Allarme") }}</th>
|
||||
<th>{{'alarms_history_table_date'| localize("Data")}}</th>
|
||||
<th>{{'alarms_history_table_user'| localize("Utente")}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody :class="{'without-footer': totalPages <= 1}">
|
||||
<tr
|
||||
v-for="(row,index) in data"
|
||||
:key="index"
|
||||
@click="selectAlarm(row)"
|
||||
:class="{selected: selectedAlarm == row}"
|
||||
>
|
||||
<td colspan="1">
|
||||
<span :class="{'warning':row.type==1}" class="type">{{sources[row.source]}}</span>
|
||||
</td>
|
||||
<td colspan="1" v-if="row.source == 0 ">{{row.title}}</td>
|
||||
<td
|
||||
colspan="1"
|
||||
v-if="row.source == 1 "
|
||||
>{{'alarm_'+ row.alarmId | localize('alarm_'+ row.alarmId)}}</td>
|
||||
<td
|
||||
colspan="1"
|
||||
>{{convertDate(row.timeStamp)}} {{convertDateToTime(row.timeStamp)}}</td>
|
||||
<td colspan="1">
|
||||
<span v-for="(iduser) in row.users" class="users" :key="iduser">{{user(iduser).username}}</span>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<tfoot :class="{'hidden': totalPages <= 1}">
|
||||
<tr>
|
||||
<td colspan="4">
|
||||
<div class="group-label-button">
|
||||
<custom-pagination
|
||||
v-model="currentPage"
|
||||
:items-per-page="itemsPerPage"
|
||||
:total-pages="totalPages"
|
||||
></custom-pagination>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="alarm-history-body-right">
|
||||
<div class="box-right scrollable" v-if="selectedAlarm">
|
||||
<div class="box-right-info">
|
||||
<div class="box-right-info-header">
|
||||
<div class="title">
|
||||
<span v-if="selectedAlarm.source == 0 ">{{selectedAlarm.title}}</span>
|
||||
<span
|
||||
v-if="selectedAlarm.source == 1 "
|
||||
>{{'alarm_'+ selectedAlarm.alarmId | localize('alarm_'+ selectedAlarm.alarmId)}}</span>
|
||||
</div>
|
||||
<div class="subtitle">
|
||||
<span
|
||||
class="inside"
|
||||
v-if="selectedAlarm.source == 0 "
|
||||
>{{'alarm_history_filter_nc' | localize("NC")}}</span>
|
||||
<span class="inside" v-if="selectedAlarm.source == 0 && selectedAlarm.processes.length>0">
|
||||
<span v-for="p in selectedAlarm.processes" :key="p">{{p}}</span>
|
||||
</span>
|
||||
<span
|
||||
class="inside"
|
||||
v-if="selectedAlarm.source == 1 "
|
||||
>{{'alarm_history_filter_plc' | localize("PLC")}}</span>
|
||||
<span class="inside" v-if="selectedAlarm.source == 1 && selectedAlarm.processes.length>0">
|
||||
<span v-for="p in selectedAlarm.processes" :key="p">{{p}}</span>
|
||||
</span>
|
||||
</div>
|
||||
<div class="date">
|
||||
<label>{{convertDate(selectedAlarm.timeStamp)}} {{convertDateToTime(selectedAlarm.timeStamp)}}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-right-info-body">
|
||||
<span v-if="selectedAlarm.description">{{selectedAlarm.description}}</span>
|
||||
</div>
|
||||
<!-- <div class="box-right-info-footer">
|
||||
<span>
|
||||
<label>{{'alarm_history_box_right_info_footer_state' | localize("Stato:")}}</label> attivo
|
||||
</span>
|
||||
</div> -->
|
||||
</div>
|
||||
<div class="box-right-action">
|
||||
<div class="attach">
|
||||
<accordion :title="'maintenance_card_attachments' | localize('Allegati')" :counter="attaches.length">
|
||||
<div class="dropdown">
|
||||
<div class="filename" v-for="a in filteredAttaches" :key="a.id" :class="{selected: selectedAttach == a}" @click="onClickSelectAttach(a)">
|
||||
<i class="fa fa-file-text-o" v-if="!isimage(a.fileName) && !ispdf(a.fileName)"></i>
|
||||
<i class="fa fa-file-image-o" v-if="isimage(a.fileName)"></i>
|
||||
<i class="fa fa-file-pdf-o" v-if="ispdf(a.fileName)"></i>
|
||||
<span>{{a.fileName}}</span>
|
||||
<div class="right">
|
||||
<button class="btn-hidden" v-if="selectedAttach == a" @click="openAttach(a)"><i class="fa fa-file-o"></i></button>
|
||||
<button class="btn-hidden" v-if="selectedAttach == a && a.userId == currentUser.id" @click="deleteAttach(a)"><i class="fa fa-trash" ></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="allattach" v-if="attaches.length>3">
|
||||
<button class="btn-hidden" @click="updateLimitation(limitationList)">
|
||||
<span v-if="limitationList > 3">{{'maintenance_card_btn_hide_all_attach' | localize("Nascondi tutti gli allegati")}}</span>
|
||||
<span v-if="limitationList < attaches.length">{{'maintenance_card_btn_view_all_attach' | localize("Mostra tutti gli allegati")}}</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="addattach">
|
||||
<div class="group-button-add-attach"><label for="input">{{'alarm_btn_add_attach' | localize("Aggiungi un allegato")}}<label for="input" class="btn"><i class="fa fa-plus"><input id="input" type="file" accept="application/pdf,image/jpeg,image/png" @change="onChange" style="display: none"/></i></label></label></div>
|
||||
</div>
|
||||
</div>
|
||||
</accordion>
|
||||
</div>
|
||||
<div class="note">
|
||||
<accordion :title="'maintenance_card_notes' | localize('Note')" :counter="notes.length">
|
||||
<div class="dropdown">
|
||||
<div class="all-message-box scrollable_auto">
|
||||
<div class="message-box" v-for="(n, index) in filteredNotes" :key="index" @click="onClickSelectNote(n)">
|
||||
<div class="message-box-header">
|
||||
<div v-if="currentUser && n.user.username != currentUser.username" :class="{'colorWhite':isDarkColor(getColor(n.user.lastName,n.user.firstName))}" :style="{'background-color':getColor(n.user.lastName,n.user.firstName) }" class="avatar">{{n.user.firstName.split(' ').map(function (s) { return s.charAt(0); }).join('')}}{{n.user.lastName.split(' ').map(function (s) { return s.charAt(0); }).join('')}}</div>
|
||||
<textarea :disabled="isDisabled(n)" class="text-message" v-model="n.message"></textarea>
|
||||
<div v-if="currentUser && n.user.username == currentUser.username" :class="{'colorWhite':isDarkColor(getColor(n.user.lastName,n.user.firstName))}" :style="{'background-color':getColor(n.user.lastName,n.user.firstName) }" class="avatar"> {{n.user.firstName.split(' ').map(function (s) { return s.charAt(0); }).join('')}}{{n.user.lastName.split(' ').map(function (s) { return s.charAt(0); }).join('')}}</div>
|
||||
</div>
|
||||
<div class="message-box-body" :class="{'my':(currentUser && n.user.username == currentUser.username)}">
|
||||
<label class="text-date">{{'alarm_history_label_date_timestamp' | localize("Aggiunta il %s alle %s",convertDate(n.dateTime),convertDateToTime(n.dateTime))}}</label>
|
||||
</div>
|
||||
<div class="groupbutton" :class="{'enablemodify':!enableModifyNote}">
|
||||
<button class="btn-hidden" v-if="selectedNote == n && enableModifyNote && currentUser && n.user.username == currentUser.username" @click="onClickModifyNote(n)"><i class="fa fa-pencil-square-o"></i></button>
|
||||
<button class="btn-hidden" v-if="selectedNote == n && enableModifyNote && currentUser && n.user.username == currentUser.username" @click="onClickDeleteNote(n)"><i class="fa fa-trash" ></i></button>
|
||||
<div class="modify-padding">
|
||||
<button class="btn" v-if="selectedNote == n && !enableModifyNote" @click="onClickCancelModifyNote">{{'alarm_history_btn_cancel_modify_note' | localize("Cancel")}}</button>
|
||||
<button class="btn" v-if="selectedNote == n && !enableModifyNote" @click="saveModifyNoteMaintenance(n)">{{'alarm_history_btn_save_modify_note' | localize("Save")}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="allnotes">
|
||||
<button class="btn-hidden" @click="updateLimitation(limitationList)">
|
||||
<span v-if="limitationList > 3">{{'alarm_history_hide_allnote_btn' | localize("Nascondi tutte le note")}}</span>
|
||||
<span v-if="limitationList < notes.length">{{'alarm_history_allnote_btn' | localize("Mostra tutte le note")}}</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="addnote" @click="deselectNote()">
|
||||
<div class="addnote-header">
|
||||
<textarea @focus="deselectNote()" v-validate.initial="{required: true}" class="text-add-note" v-model="newNote.message" :disabled="!enableModifyNote"></textarea>
|
||||
<div class="avatar" v-if="currentUser" :class="{'colorWhite':isDarkColor(getColor(currentUser.lastName,currentUser.firstName))}" :style="{'background-color':getColor(currentUser.lastName,currentUser.firstName) }" >{{currentUser.firstName.split(' ').map(function (s) { return s.charAt(0); }).join('')}}{{currentUser.lastName.split(' ').map(function (s) { return s.charAt(0); }).join('')}}</div>
|
||||
</div>
|
||||
<div class="addnote-buttons">
|
||||
<button class="btn" :disabled="!enableModifyNote" @click="saveNote(newNote)">{{'alarm_history_btn_save_note' | localize("Save")}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</accordion>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="alarm-disable-box-right" v-if="!selectedAlarm">
|
||||
<label>{{'alarm_history_label_select_alarms' | localize("Seleziona un'allarme...")}}</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>-->
|
||||
</div>
|
||||
<div class="box-right-action">
|
||||
<div class="attach">
|
||||
<accordion
|
||||
:title="'maintenance_card_attachments' | localize('Allegati')"
|
||||
:counter="attaches.length"
|
||||
>
|
||||
<div class="dropdown">
|
||||
<div
|
||||
class="filename"
|
||||
v-for="a in filteredAttaches"
|
||||
:key="a.id"
|
||||
:class="{selected: selectedAttach == a}"
|
||||
@click="onClickSelectAttach(a)"
|
||||
>
|
||||
<i class="fa fa-file-text-o" v-if="!isimage(a.fileName) && !ispdf(a.fileName)"></i>
|
||||
<i class="fa fa-file-image-o" v-if="isimage(a.fileName)"></i>
|
||||
<i class="fa fa-file-pdf-o" v-if="ispdf(a.fileName)"></i>
|
||||
<span>{{a.fileName}}</span>
|
||||
<div class="right">
|
||||
<button class="btn-hidden" v-if="selectedAttach == a" @click="openAttach(a)">
|
||||
<i class="fa fa-file-o"></i>
|
||||
</button>
|
||||
<button
|
||||
class="btn-hidden"
|
||||
v-if="selectedAttach == a && a.userId == currentUser.id"
|
||||
@click="deleteAttach(a)"
|
||||
>
|
||||
<i class="fa fa-trash"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="allattach" v-if="attaches.length>3">
|
||||
<button class="btn-hidden" @click="updateLimitation(limitationList)">
|
||||
<span
|
||||
v-if="limitationList > 3"
|
||||
>{{'maintenance_card_btn_hide_all_attach' | localize("Nascondi tutti gli allegati")}}</span>
|
||||
<span
|
||||
v-if="limitationList < attaches.length"
|
||||
>{{'maintenance_card_btn_view_all_attach' | localize("Mostra tutti gli allegati")}}</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="addattach">
|
||||
<div class="group-button-add-attach">
|
||||
<label for="input">
|
||||
{{'alarm_btn_add_attach' | localize("Aggiungi un allegato")}}
|
||||
<label for="input" class="btn">
|
||||
<i class="fa fa-plus">
|
||||
<input
|
||||
id="input"
|
||||
type="file"
|
||||
accept="application/pdf, image/jpeg, image/png"
|
||||
@change="onChange"
|
||||
style="display: none"
|
||||
/>
|
||||
</i>
|
||||
</label>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</accordion>
|
||||
</div>
|
||||
<div class="note">
|
||||
<accordion :title="'maintenance_card_notes' | localize('Note')" :counter="notes.length">
|
||||
<div class="dropdown">
|
||||
<div class="all-message-box scrollable_auto">
|
||||
<div
|
||||
class="message-box"
|
||||
v-for="(n, index) in filteredNotes"
|
||||
:key="index"
|
||||
@click="onClickSelectNote(n)"
|
||||
>
|
||||
<div class="message-box-header">
|
||||
<div
|
||||
v-if="currentUser && n.user.username != currentUser.username"
|
||||
:class="{'colorWhite':isDarkColor(getColor(n.user.lastName,n.user.firstName))}"
|
||||
:style="{'background-color':getColor(n.user.lastName,n.user.firstName) }"
|
||||
class="avatar"
|
||||
>{{n.user.firstName.split(' ').map(function (s) { return s.charAt(0); }).join('')}}{{n.user.lastName.split(' ').map(function (s) { return s.charAt(0); }).join('')}}</div>
|
||||
<textarea :disabled="isDisabled(n)" class="text-message" v-model="n.message"></textarea>
|
||||
<div
|
||||
v-if="currentUser && n.user.username == currentUser.username"
|
||||
:class="{'colorWhite':isDarkColor(getColor(n.user.lastName,n.user.firstName))}"
|
||||
:style="{'background-color':getColor(n.user.lastName,n.user.firstName) }"
|
||||
class="avatar"
|
||||
>{{n.user.firstName.split(' ').map(function (s) { return s.charAt(0); }).join('')}}{{n.user.lastName.split(' ').map(function (s) { return s.charAt(0); }).join('')}}</div>
|
||||
</div>
|
||||
<div
|
||||
class="message-box-body"
|
||||
:class="{'my':(currentUser && n.user.username == currentUser.username)}"
|
||||
>
|
||||
<label
|
||||
class="text-date"
|
||||
>{{'alarm_history_label_date_timestamp' | localize("Aggiunta il %s alle %s",convertDate(n.dateTime),convertDateToTime(n.dateTime))}}</label>
|
||||
</div>
|
||||
<div class="groupbutton" :class="{'enablemodify':!enableModifyNote}">
|
||||
<button
|
||||
class="btn-hidden"
|
||||
v-if="selectedNote == n && enableModifyNote && currentUser && n.user.username == currentUser.username"
|
||||
@click="onClickModifyNote(n)"
|
||||
>
|
||||
<i class="fa fa-pencil-square-o"></i>
|
||||
</button>
|
||||
<button
|
||||
class="btn-hidden"
|
||||
v-if="selectedNote == n && enableModifyNote && currentUser && n.user.username == currentUser.username"
|
||||
@click="onClickDeleteNote(n)"
|
||||
>
|
||||
<i class="fa fa-trash"></i>
|
||||
</button>
|
||||
<div class="modify-padding">
|
||||
<button
|
||||
class="btn"
|
||||
v-if="selectedNote == n && !enableModifyNote"
|
||||
@click="onClickCancelModifyNote"
|
||||
>{{'alarm_history_btn_cancel_modify_note' | localize("Cancel")}}</button>
|
||||
<button
|
||||
class="btn"
|
||||
v-if="selectedNote == n && !enableModifyNote"
|
||||
@click="saveModifyNoteMaintenance(n)"
|
||||
>{{'alarm_history_btn_save_modify_note' | localize("Save")}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="allnotes">
|
||||
<button class="btn-hidden" @click="updateLimitation(limitationList)">
|
||||
<span
|
||||
v-if="limitationList > 3"
|
||||
>{{'alarm_history_hide_allnote_btn' | localize("Nascondi tutte le note")}}</span>
|
||||
<span
|
||||
v-if="limitationList < notes.length"
|
||||
>{{'alarm_history_allnote_btn' | localize("Mostra tutte le note")}}</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="addnote" @click="deselectNote()">
|
||||
<div class="addnote-header">
|
||||
<textarea
|
||||
@focus="deselectNote()"
|
||||
v-validate.initial="{required: true}"
|
||||
class="text-add-note"
|
||||
v-model="newNote.message"
|
||||
:disabled="!enableModifyNote"
|
||||
></textarea>
|
||||
<div
|
||||
class="avatar"
|
||||
v-if="currentUser"
|
||||
:class="{'colorWhite':isDarkColor(getColor(currentUser.lastName,currentUser.firstName))}"
|
||||
:style="{'background-color':getColor(currentUser.lastName,currentUser.firstName) }"
|
||||
>{{currentUser.firstName.split(' ').map(function (s) { return s.charAt(0); }).join('')}}{{currentUser.lastName.split(' ').map(function (s) { return s.charAt(0); }).join('')}}</div>
|
||||
</div>
|
||||
<div class="addnote-buttons">
|
||||
<button
|
||||
class="btn"
|
||||
:disabled="!enableModifyNote"
|
||||
@click="saveNote(newNote)"
|
||||
>{{'alarm_history_btn_save_note' | localize("Save")}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</accordion>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="alarm-disable-box-right" v-if="!selectedAlarm">
|
||||
<label>{{'alarm_history_label_select_alarms' | localize("Seleziona un'allarme...")}}</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script src="./alarm-history.ts" lang="ts"></script>
|
||||
|
||||
@@ -1,32 +1,42 @@
|
||||
import moment from "moment";
|
||||
import Vue from "vue";
|
||||
import Component from "vue-class-component";
|
||||
import { Prop } from "vue-property-decorator";
|
||||
|
||||
@Component({})
|
||||
export default class AlarmItem extends Vue{
|
||||
|
||||
title: string = "";
|
||||
type: string = "";
|
||||
source: string = null;
|
||||
dateprefix: string = null;
|
||||
processid: string = null;
|
||||
alarmid: string = null;
|
||||
restorationIsActive: boolean = false;
|
||||
restorationIsEnabled: boolean = false;
|
||||
date: object = {};
|
||||
export default class AlarmItem extends Vue {
|
||||
|
||||
@Prop({ default: null })
|
||||
title: string;
|
||||
@Prop({ default: null })
|
||||
type: string;
|
||||
@Prop({ default: null })
|
||||
source: string;
|
||||
@Prop({ default: null })
|
||||
dateprefix: string;
|
||||
@Prop({ default: null })
|
||||
processid: string;
|
||||
@Prop({ default: null })
|
||||
alarmid: string;
|
||||
@Prop({ default: false })
|
||||
restorationIsActive: boolean;
|
||||
@Prop({ default: false })
|
||||
restorationIsEnabled: boolean;
|
||||
@Prop()
|
||||
date: object;
|
||||
|
||||
|
||||
|
||||
showDetail() {
|
||||
this.$emit("on-show-detail");
|
||||
}
|
||||
showDetail() {
|
||||
this.$emit("on-show-detail");
|
||||
}
|
||||
|
||||
getDate(date){
|
||||
return moment(date).format('L');
|
||||
}
|
||||
getDate(date) {
|
||||
return moment(date).format('L');
|
||||
}
|
||||
|
||||
getTime(date){
|
||||
return moment(date).format('LT');
|
||||
}
|
||||
getTime(date) {
|
||||
return moment(date).format('LT');
|
||||
}
|
||||
|
||||
};
|
||||
@@ -1,25 +1,29 @@
|
||||
<template>
|
||||
<div class="alarm-item" :class="type">
|
||||
<div class="content">
|
||||
<h2 v-if="title.length>0">{{title}}</h2>
|
||||
<h2 v-if="!title || title.length==0">{{'alarm_'+ alarmid | localize('alarm_'+ alarmid)}}</h2>
|
||||
<div class="summary">
|
||||
<time>{{dateprefix}} {{getDate(date)}} {{getTime(date)}}</time>
|
||||
</div>
|
||||
<div class="summary" v-if="source">
|
||||
<span class="sourcecontainer">
|
||||
<span class="source" v-if="source === 'NC' ">{{'alarm_history_filter_nc' | localize("NC")}}</span>
|
||||
<span class="source" v-if="source === 'PLC' ">{{'alarm_history_filter_plc' | localize("PLC")}}</span>
|
||||
<span class="source" :class="{'restorationIsActive': restorationIsActive}" v-if="restorationIsEnabled">R</span>
|
||||
<span class="source" v-if="source === 'PLC' && processid.length>0">
|
||||
<span v-for="p in processid" :key="p" >{{ p }} </span>
|
||||
</span>
|
||||
<span class="source" v-if="source !== 'PLC' && processid">{{ processid }}</span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<button class="btn" @click="showDetail">{{'alarm_item_btn_show' | localize('Vedi')}}</button>
|
||||
</div>
|
||||
<div class="alarm-item" :class="type">
|
||||
<div class="content">
|
||||
<h2 v-if="title">{{title}}</h2>
|
||||
<h2 v-if="!title || title.length==0">{{'alarm_'+ alarmid | localize('alarm_'+ alarmid)}}</h2>
|
||||
<div class="summary">
|
||||
<time>{{dateprefix}} {{getDate(date)}} {{getTime(date)}}</time>
|
||||
</div>
|
||||
<div class="summary" v-if="source">
|
||||
<span class="sourcecontainer">
|
||||
<span class="source" v-if="source === 'NC' ">{{'alarm_history_filter_nc' | localize("NC")}}</span>
|
||||
<span class="source" v-if="source === 'PLC' ">{{'alarm_history_filter_plc' | localize("PLC")}}</span>
|
||||
<span
|
||||
class="source"
|
||||
:class="{'restorationIsActive': restorationIsActive}"
|
||||
v-if="restorationIsEnabled"
|
||||
>R</span>
|
||||
<span class="source" v-if="source === 'PLC' && processid.length>0">
|
||||
<span v-for="p in processid" :key="p">{{ p }}</span>
|
||||
</span>
|
||||
<span class="source" v-if="source !== 'PLC' && processid">{{ processid }}</span>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<button class="btn" @click="showDetail">{{'alarm_item_btn_show' | localize('Vedi')}}</button>
|
||||
</div>
|
||||
</template>
|
||||
<script src="./alarm-item.ts" lang="ts" />
|
||||
|
||||
|
||||
@@ -1,154 +0,0 @@
|
||||
import Vue from "vue";
|
||||
import Component from "vue-class-component";
|
||||
import { Prop, Watch } from "vue-property-decorator";
|
||||
import ace from "vue2-ace-editor";
|
||||
import "brace/mode/javascript";
|
||||
import "brace/theme/chrome";
|
||||
import "./job-editor-lang-definition"
|
||||
|
||||
import { Container, Draggable } from "vue-smooth-dnd";
|
||||
import objectsJob from "./objects-job.vue";
|
||||
import * as pf from "sprintf-js";
|
||||
import { jobService } from "@/services";
|
||||
import * as iziToast from "izitoast";
|
||||
|
||||
declare var cmsClient: any;
|
||||
|
||||
@Component({ components: { ace, Container, Draggable, objectsJob } })
|
||||
export default class JobEditorDetail extends Vue {
|
||||
|
||||
@Prop({ default: "" })
|
||||
value: string;
|
||||
|
||||
@Prop()
|
||||
activeCommandSet: Array<commandDefinition>;
|
||||
|
||||
commands = new Array<commandInstance>();
|
||||
interactive: boolean = false;
|
||||
|
||||
macros: Array<string> = [];
|
||||
|
||||
get sortedCommands() {
|
||||
return Array.from(this.activeCommandSet).sort((a, b) => {
|
||||
if (a.order > b.order) return 1;
|
||||
if (a.order == b.order) return 0;
|
||||
return -1;
|
||||
})
|
||||
}
|
||||
|
||||
get isoProgram() {
|
||||
return this.value || "";
|
||||
}
|
||||
set isoProgram(value) {
|
||||
this.$emit("input", value);
|
||||
}
|
||||
|
||||
@Watch("isoProgram")
|
||||
isoProgramChanged(n: string, o) {
|
||||
|
||||
if (n && n != o && !this.interactive) {
|
||||
this.commands = [];
|
||||
|
||||
var $this = this;
|
||||
var rows = n.split("\n");
|
||||
rows.forEach(element => {
|
||||
this.parseCommandRow(element);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@Watch("commands", { deep: true, immediate: true })
|
||||
commandsChanged(n, o) {
|
||||
if (n && this.interactive) {
|
||||
var result = "";
|
||||
|
||||
this.commands.forEach(c => {
|
||||
result += pf.vsprintf(c.definition.command, [c.value || "", c.value2 || ""]) + "\n";
|
||||
});
|
||||
|
||||
this.isoProgram = result;
|
||||
}
|
||||
}
|
||||
|
||||
private parseCommandRow(command: string) {
|
||||
if (command)
|
||||
for (var key in this.sortedCommands) {
|
||||
const cd = this.sortedCommands[key];
|
||||
var result = cd.rx.exec(command);
|
||||
if (result && result.length) {
|
||||
this.commands.push({
|
||||
title: cd.title,
|
||||
definition: cd,
|
||||
value: result.length ? result[1] : null,
|
||||
value2: result.length > 1 ? result[2] : null
|
||||
} as commandInstance);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
removeCommand(command) {
|
||||
var idx = this.commands.indexOf(command);
|
||||
if (idx >= 0) this.commands.splice(idx, 1);
|
||||
}
|
||||
|
||||
getChildPayload(index) {
|
||||
return this.activeCommandSet[index];
|
||||
}
|
||||
|
||||
dropNewCommand(event) {
|
||||
|
||||
const { removedIndex, addedIndex, payload, element } = event;
|
||||
this.commands.splice(addedIndex, 0, {
|
||||
definition: payload,
|
||||
title: payload.title,
|
||||
value: null
|
||||
} as commandInstance);
|
||||
}
|
||||
|
||||
|
||||
initEditor(editor) {
|
||||
editor.setFontSize(18);
|
||||
editor.setOptions({
|
||||
hScrollBarAlwaysVisible: true,
|
||||
vScrollBarAlwaysVisible: true
|
||||
})
|
||||
}
|
||||
|
||||
selectProgram(command) {
|
||||
var result = JSON.parse(cmsClient.addPPToJob());
|
||||
|
||||
if (!result)
|
||||
this.showError("internal_error");
|
||||
if (result.error)
|
||||
this.showError(result.error);
|
||||
else
|
||||
command.value = result.name;
|
||||
}
|
||||
|
||||
async mounted() {
|
||||
this.macros = await jobService.GetMacroList();
|
||||
}
|
||||
|
||||
private showError(error){
|
||||
(iziToast as any).error({
|
||||
title: "Error",
|
||||
message: error,
|
||||
theme: "dark",
|
||||
timeout: 10000,
|
||||
class: "t-error",
|
||||
transitionOut: "fadeOut",
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
interface commandDefinition {
|
||||
title: string, layout: string, value: object, command: string, rx: RegExp, order: number
|
||||
}
|
||||
|
||||
class commandInstance {
|
||||
title: string;
|
||||
value: string;
|
||||
value2: string;
|
||||
definition: commandDefinition;
|
||||
}
|
||||
@@ -1,45 +0,0 @@
|
||||
<template>
|
||||
<div class="editor">
|
||||
<div class="buttons">
|
||||
<button class="btn" :active="interactive" @click="interactive = !interactive">
|
||||
<i class="fa fa-th-large"></i>
|
||||
</button>
|
||||
<button class="btn" :active="!interactive" @click="interactive = !interactive">
|
||||
<i class="fa fa-code"></i>
|
||||
</button>
|
||||
</div>
|
||||
<div class="interactive-editor scrollable" v-if="interactive">
|
||||
<Container @drop="dropNewCommand($event)" :group-name="'commands'">
|
||||
<objects-job v-for="(p, index) in commands" :key="index"
|
||||
:expanded="true"
|
||||
:title="p.title | localize(p.title)"
|
||||
:min="p.layout == 'small'">
|
||||
<div class="buttons" slot="buttons">
|
||||
<button class="btn" @click="removeCommand(p)"><i class="fa fa-trash"></i></button>
|
||||
</div>
|
||||
<div class="details" slot v-if="p.title=='job_item_part_program'">
|
||||
<input type="text" v-model="p.value"><button class="btn" @click="selectProgram(p)"><i class="fa fa-folder-open"></i></button>
|
||||
</div>
|
||||
<div class="details" slot v-if="p.title=='job_item_delay'">
|
||||
<input type="number" v-model="p.value">
|
||||
</div>
|
||||
<div class="details" slot v-if="p.title=='job_item_origin'">
|
||||
<input type="number" v-model="p.value">
|
||||
</div>
|
||||
<div class="details" slot v-if="p.title=='job_item_text'">
|
||||
<input type="text" v-model="p.value">
|
||||
</div>
|
||||
<div class="details" slot v-if="p.title=='job_item_macro_cms'">
|
||||
<select v-model="p.value">
|
||||
<option v-for="(m, index) in macros" :key="index" :value="m">{{m}}</option>
|
||||
</select>
|
||||
</div>
|
||||
</objects-job>
|
||||
</Container>
|
||||
</div>
|
||||
<ace class="text-editor"
|
||||
v-model="isoProgram" theme="chrome" mode="iso" lang="iso"
|
||||
v-if="!interactive" @init="initEditor"></ace>
|
||||
</div>
|
||||
</template>
|
||||
<script src="./job-editor-detail.ts" lang="ts"></script>
|
||||
@@ -1,130 +0,0 @@
|
||||
/* ***** BEGIN LICENSE BLOCK *****
|
||||
* Distributed under the BSD license:
|
||||
*
|
||||
* Copyright (c) 2010, Ajax.org B.V.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* * Neither the name of Ajax.org B.V. nor the
|
||||
* names of its contributors may be used to endorse or promote products
|
||||
* derived from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL AJAX.ORG B.V. BE LIABLE FOR ANY
|
||||
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
ace.define("ace/mode/iso_highlight_rules", ["require", "exports", "module", "ace/lib/oop", "ace/mode/text_highlight_rules"], function (acequire, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = acequire("../lib/oop");
|
||||
var TextHighlightRules = acequire("./text_highlight_rules").TextHighlightRules;
|
||||
|
||||
|
||||
var ISOHighlightRules = function () {
|
||||
|
||||
var keywords = (
|
||||
"CALL|PCALL|_N_CMA_DIR|M0|G04|G|M30|G54|G04|M98|M198|CLT|CLD|M0|DLY|UAO"
|
||||
);
|
||||
|
||||
var builtinConstants = (
|
||||
""
|
||||
);
|
||||
|
||||
var builtinFunctions = (
|
||||
""
|
||||
);
|
||||
|
||||
var dataTypes = (
|
||||
""
|
||||
);
|
||||
|
||||
var keywordMapper = this.createKeywordMapper({
|
||||
"support.function": builtinFunctions,
|
||||
"keyword": keywords,
|
||||
"constant.language": builtinConstants,
|
||||
"storage.type": dataTypes
|
||||
}, "identifier", true);
|
||||
|
||||
this.$rules = {
|
||||
"start": [{
|
||||
token: "comment",
|
||||
regex: ";.*$"
|
||||
}, {
|
||||
token: "comment",
|
||||
start: "/\\*",
|
||||
end: "\\*/"
|
||||
}, {
|
||||
token: "string", // " string
|
||||
regex: '".*?"'
|
||||
}, {
|
||||
token: "string", // ' string
|
||||
regex: "'.*?'"
|
||||
}, {
|
||||
token: "string", // ` string (apache drill)
|
||||
regex: "`.*?`"
|
||||
}, {
|
||||
token: "constant.numeric", // float
|
||||
regex: "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"
|
||||
}, {
|
||||
token: keywordMapper,
|
||||
regex: "[A-Z_$][A-Z0-9$]*\\b"
|
||||
}, {
|
||||
token: "keyword.operator",
|
||||
regex: "[\sF|\sP|\sX]"
|
||||
}, {
|
||||
token: "paren.lparen",
|
||||
regex: "[\\(]"
|
||||
}, {
|
||||
token: "paren.rparen",
|
||||
regex: "[\\)]"
|
||||
}, {
|
||||
token: "text",
|
||||
regex: "\\s+"
|
||||
}]
|
||||
};
|
||||
this.normalizeRules();
|
||||
};
|
||||
|
||||
oop.inherits(ISOHighlightRules, TextHighlightRules);
|
||||
|
||||
exports.ISOHighlightRules = ISOHighlightRules;
|
||||
});
|
||||
|
||||
ace.define("ace/mode/iso",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/iso_highlight_rules"], function(acequire, exports, module) {
|
||||
"use strict";
|
||||
|
||||
var oop = acequire("../lib/oop");
|
||||
var TextMode = acequire("./text").Mode;
|
||||
var ISOHighlightRules = acequire("./iso_highlight_rules").ISOHighlightRules;
|
||||
|
||||
var Mode = function() {
|
||||
this.HighlightRules = ISOHighlightRules;
|
||||
this.$behaviour = this.$defaultBehaviour;
|
||||
};
|
||||
oop.inherits(Mode, TextMode);
|
||||
|
||||
(function() {
|
||||
|
||||
this.lineCommentStart = ";";
|
||||
|
||||
this.$id = "ace/mode/iso";
|
||||
}).call(Mode.prototype);
|
||||
|
||||
exports.Mode = Mode;
|
||||
|
||||
});
|
||||
@@ -1,307 +0,0 @@
|
||||
import Vue from "vue";
|
||||
import Component from "vue-class-component";
|
||||
import { Container, Draggable } from "vue-smooth-dnd";
|
||||
import { store, AppModel, jobEditorStoreActions } from "@/store";
|
||||
import { ToolingService } from "@/services";
|
||||
import * as iziToast from "izitoast";
|
||||
import { awaiter } from "@/_base";
|
||||
import { ModalImage } from "@/modules/base-components/index";
|
||||
|
||||
import { ModalMissingTools, ModalJobAddParameter } from "@/modules/base-components";
|
||||
import { ModalHelper } from "@/components/modals";
|
||||
|
||||
import { tool } from "@/modules/base-components/cards";
|
||||
import { inputBox } from "@/modules/base-components/cards";
|
||||
|
||||
import objectsJob from "./objects-job.vue";
|
||||
import jobEditorDetail from "./job-editor-detail.vue";
|
||||
|
||||
declare let $: any;
|
||||
declare let cmsClient: any;
|
||||
@Component({ components: { objectsJob, tool, inputBox, Container, Draggable, jobEditorDetail } })
|
||||
export default class JobEditor extends Vue {
|
||||
|
||||
programName: string = null;
|
||||
editing: boolean = false;
|
||||
get currentJob(): server.Job { return this.$store.state.jobEditor.currentJob; }
|
||||
set currentJob(value: server.Job) { jobEditorStoreActions.setCurrentJob(this.$store, value); }
|
||||
|
||||
limitationList: number = 3;
|
||||
selectedParam = null;
|
||||
selectedTool = null;
|
||||
|
||||
// occorre uno switch per la scelta del linguaggio in base al CN
|
||||
jobitems = siemensJobItems;
|
||||
|
||||
selectedTab: string = "ParBase";
|
||||
|
||||
get ncTools(): server.ToolNc[] { return (this.$store.state as AppModel).tooling.ncTools; }
|
||||
get ncFamilies(): server.FamiliesNc[] { return (this.$store.state as AppModel).tooling.ncFamilies; }
|
||||
|
||||
get jobTools() {
|
||||
var $this = this;
|
||||
return this.currentJob.metadata.tools.map(t => {
|
||||
var tool = $this.ncTools.find(i => i.id == t);
|
||||
if (tool)
|
||||
return tool
|
||||
else
|
||||
return t
|
||||
});
|
||||
}
|
||||
|
||||
public get familyOptionActive(): boolean {
|
||||
return (this.$store.state as AppModel).tooling.familyOptionActive;
|
||||
}
|
||||
|
||||
get jobGenerics() {
|
||||
return this.currentJob ? this.currentJob.metadata.generics : null;
|
||||
}
|
||||
|
||||
async mounted() {
|
||||
awaiter(Promise.all([
|
||||
await new ToolingService().GetNcTools(),
|
||||
await new ToolingService().GetNcFamilies(),
|
||||
await new ToolingService().GetToolsConfiguration()
|
||||
]));
|
||||
}
|
||||
|
||||
selectTab(value) {
|
||||
this.selectedTab = value;
|
||||
}
|
||||
|
||||
getChildPayload(index) {
|
||||
return this.jobitems[index - 1];
|
||||
}
|
||||
|
||||
addImageToJob() {
|
||||
var res = JSON.parse(cmsClient.addImageToJob());
|
||||
if (this.currentJob) {
|
||||
this.currentJob.metadata.generics.images.push(res);
|
||||
}
|
||||
}
|
||||
deleteImageFromJob(image) {
|
||||
ModalHelper.AskConfirm(this.$options.filters.localize("modal_delete_image_job", "Richiesta di conferma"),
|
||||
this.$options.filters.localize("modal_delete_image_job_confirm", "Sei sicuro di voler eliminare l'immagine?"),
|
||||
() => {
|
||||
var res = cmsClient.delImageFromJob(image.name);
|
||||
if (this.currentJob) {
|
||||
var images = this.currentJob.metadata.generics.images;
|
||||
images.splice(images.indexOf(image), 1);
|
||||
}
|
||||
}, null);
|
||||
|
||||
}
|
||||
openImage(image) {
|
||||
ModalHelper.modalImage.content = image.base64;
|
||||
ModalHelper.modalImage.title = image.name;
|
||||
ModalHelper.ShowModal(ModalImage);
|
||||
}
|
||||
|
||||
newJob() {
|
||||
if (this.currentJob)
|
||||
ModalHelper.AskConfirm(this.$options.filters.localize("modal_open_job", "Richiesta di conferma"),
|
||||
this.$options.filters.localize("modal_open_job_body", "Sei sicuro di aver salvato il Job?"),
|
||||
() => {
|
||||
var res = cmsClient.newJob();
|
||||
if (res) {
|
||||
var obj = JSON.parse(res);
|
||||
if (obj.error)
|
||||
this.showError(obj.error);
|
||||
else
|
||||
this.currentJob = obj;
|
||||
}
|
||||
|
||||
}, null);
|
||||
else
|
||||
this.currentJob = JSON.parse(cmsClient.newJob());
|
||||
|
||||
}
|
||||
|
||||
updateLimitation() {
|
||||
if (this.limitationList == this.currentJob.metadata.generics.images.length) {
|
||||
this.limitationList = 3;
|
||||
} else {
|
||||
this.limitationList = this.currentJob.metadata.generics.images.length;
|
||||
}
|
||||
}
|
||||
|
||||
async openJob() {
|
||||
if (this.currentJob)
|
||||
ModalHelper.AskConfirm(this.$options.filters.localize("modal_open_job", "Richiesta di conferma"),
|
||||
this.$options.filters.localize("modal_open_job_body", "Sei sicuro di aver salvato il Job?"),
|
||||
this.loadJob, null);
|
||||
else
|
||||
this.loadJob();
|
||||
}
|
||||
|
||||
async loadJob() {
|
||||
var res = cmsClient.openJob();
|
||||
if (res) {
|
||||
var obj = JSON.parse(res);
|
||||
if (obj.error)
|
||||
this.showError(obj.error);
|
||||
else {
|
||||
this.currentJob = obj;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
saveJobNewPath() {
|
||||
if (this.currentJob) {
|
||||
var res = cmsClient.saveJobNewPath(JSON.stringify(this.currentJob));
|
||||
if (res) {
|
||||
var obj = JSON.parse(res);
|
||||
if (obj.error)
|
||||
this.showError(obj.error);
|
||||
else
|
||||
this.currentJob.name = obj.name;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
saveJob() {
|
||||
if (this.currentJob) {
|
||||
var res = cmsClient.saveJob(JSON.stringify(this.currentJob));
|
||||
if (res) {
|
||||
var obj = JSON.parse(res);
|
||||
if (obj.error)
|
||||
this.showError(obj.error);
|
||||
else
|
||||
this.currentJob.name = obj.name;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
closeJob() {
|
||||
if (this.currentJob) {
|
||||
|
||||
ModalHelper.AskConfirm(this.$options.filters.localize("modal_open_job", "Richiesta di conferma"),
|
||||
this.$options.filters.localize("modal_open_job_body", "Sei sicuro di aver salvato il Job?"),
|
||||
() => {
|
||||
var res = cmsClient.closeJob();
|
||||
if (res) {
|
||||
var obj = JSON.parse(res);
|
||||
if (obj.error)
|
||||
this.showError(obj.error);
|
||||
}
|
||||
else
|
||||
this.currentJob = null;
|
||||
}, null);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
selectParam(param) {
|
||||
this.selectedParam = param;
|
||||
}
|
||||
|
||||
selectTool(tool) {
|
||||
this.selectedTool = tool;
|
||||
}
|
||||
|
||||
async openModalAddToolToJob() {
|
||||
ModalHelper.avaiableTools = this.ncTools.filter(t => this.currentJob.metadata.tools.indexOf(t.id) < 0);
|
||||
ModalHelper.job = this.currentJob;
|
||||
var newTool = await ModalHelper.ShowModalAsync(ModalMissingTools);
|
||||
|
||||
if (newTool) {
|
||||
this.currentJob.metadata.tools.push(newTool.id);
|
||||
}
|
||||
}
|
||||
|
||||
removeTool(tool) {
|
||||
var idx = this.currentJob.metadata.tools.indexOf(tool.id);
|
||||
if (idx >= 0)
|
||||
this.currentJob.metadata.tools.splice(idx, 1);
|
||||
}
|
||||
|
||||
removeParam(parameter) {
|
||||
var idx = this.currentJob.metadata.customs.indexOf(parameter);
|
||||
if (idx >= 0)
|
||||
this.currentJob.metadata.customs.splice(idx, 1);
|
||||
}
|
||||
|
||||
async editParam(parameter) {
|
||||
var result = await ModalHelper.ShowModalAsync(ModalJobAddParameter, parameter);
|
||||
if (result)
|
||||
Object.assign(parameter, result);
|
||||
}
|
||||
|
||||
async openModalJobAddParameter() {
|
||||
|
||||
var result = await ModalHelper.ShowModalAsync(ModalJobAddParameter, null);
|
||||
if (result)
|
||||
this.currentJob.metadata.customs.push(result);
|
||||
}
|
||||
|
||||
|
||||
showError(error) {
|
||||
|
||||
(iziToast as any).error({
|
||||
title: "Error",
|
||||
message: error,
|
||||
theme: "dark",
|
||||
timeout: 10000,
|
||||
class: "t-error",
|
||||
transitionOut: "fadeOut",
|
||||
})
|
||||
}
|
||||
|
||||
familyNameFromId(id): any {
|
||||
var found = this.ncFamilies.find(k => k.id == id);
|
||||
if (found)
|
||||
return found.name;
|
||||
return '';
|
||||
}
|
||||
|
||||
calcFamilyName(id): any {
|
||||
if (this.familyOptionActive)
|
||||
return this.$options.filters.localize("tooling_family_abbreviation", 'F%d', id) + ' - ' + this.familyNameFromId(id);
|
||||
else
|
||||
return this.familyNameFromId(id);
|
||||
}
|
||||
|
||||
getToolIcon = function (id) {
|
||||
if (id == 9999)
|
||||
return "../assets/iicons/Tools/Undefined.png"
|
||||
else if (id == 151 || id == 700)
|
||||
return "../assets/icons/Tools/Saw.png"
|
||||
else
|
||||
return "../assets/icons/Tools/Tools.png"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
const siemensJobItems = [
|
||||
{ title: 'job_item_part_program', layout: "big", command: 'CALL "%s";%s', rx: /CALL "(.+)";(.*)|CALL "(.+)";?/, order: 0 },
|
||||
{ title: 'job_item_macro_cms', layout: "big", command: 'PCALL /_N_CMA_DIR/%s;%s', rx: /PCALL \/_N_CMA_DIR\/(.+);(.*)|PCALL \/_N_CMA_DIR\/(.+);?/, order: 0 },
|
||||
{ title: 'job_item_text', layout: "big", command: "%s;%s", rx: /(.+);(.*)|(.+);?/, order: 100 },
|
||||
{ title: 'job_item_pause', layout: "small", command: "M0;%s", rx: /^M0;(.*)|^M0;?/, order: 0 },
|
||||
{ title: 'job_item_delay', layout: "small", command: "G04 F%s;%s", rx: /G04 F(\d*);(.*)|G04 F(\d*);?/, order: 0 },
|
||||
{ title: 'job_item_origin', layout: "small", command: "G%s;%s", rx: /G(.+);(.*)|G(.+);?/, order: 0 },
|
||||
{ title: 'job_item_end_program', layout: "small", command: "M30;%s", rx: /M30;(.*)|M30;?/, order: 0 },
|
||||
];
|
||||
|
||||
// Da controllare comandi e regex
|
||||
const osaiJobItems = [
|
||||
{ title: 'job_item_part_program', layout: "big", command: 'M198 %s;%s', rx: /M198 (.+);(.*)|M198 (.+);?/, order: 0 },
|
||||
{ title: 'job_item_macro_cms', layout: "big", command: 'M98 P%s;%s', rx: /M98 P(.+);(.*)|M98 P(.+);?/, order: 0 },
|
||||
{ title: 'job_item_text', layout: "big", command: "%s;%s", rx: /(.+);(.*)|(.+);?/, order: 100 },
|
||||
{ title: 'job_item_pause', layout: "small", command: "M0;%s", rx: /^M0;(.*)|^M0;?/, order: 0 },
|
||||
{ title: 'job_item_delay', layout: "small", command: "G04 X%s;%s", rx: /G04 X(.+);(.*)|G04 X(.+);?/, order: 0 },
|
||||
{ title: 'job_item_origin', layout: "small", command: "G54 P%s;%s", rx: /G54 P(.+);(.*)|G54 P(.+);?/, order: 0 },
|
||||
{ title: 'job_item_end_program', layout: "small", command: "M30;%s", rx: /M30;(.*)|M30;?/, order: 0 },
|
||||
];
|
||||
|
||||
// Da controllare comandi e regex
|
||||
const fanucJobItems = [
|
||||
{ title: 'job_item_part_program', layout: "big", command: '(CLT,%s);%s', rx: /\(CLT,(.+)\);(.*)|\(CLT,(.+)\);?/, order: 0 },
|
||||
{ title: 'job_item_macro_cms', layout: "big", command: '(CLD,%s);%s', rx: /\(CLD,(.+)\);(.*)|\(CLD,(.+)\);?/, order: 0 },
|
||||
{ title: 'job_item_text', layout: "big", command: "%s", rx: /(.+);(.*)|(.+);?/, order: 100 },
|
||||
{ title: 'job_item_pause', layout: "small", command: "M0;%s", rx: /^M0;(.*)|^M0;?/, order: 0 },
|
||||
{ title: 'job_item_delay', layout: "small", command: "(DLY,%s);%s", rx: /\(DLY,(.+)\);(.*)|\(DLY,(.+)\);?/, order: 0 },
|
||||
{ title: 'job_item_origin', layout: "small", command: "(UAO,%s);%s", rx: /\(UAO,(.+)\);(.*)|\(UAO,(.+)\);?/, order: 0 },
|
||||
{ title: 'job_item_end_program', layout: "small", command: "M30;%s", rx: /M30;(.*)|M30;?/, order: 0 },
|
||||
];
|
||||
|
||||
@@ -1,135 +0,0 @@
|
||||
<template>
|
||||
<div class="job-editor-container">
|
||||
<div class="job-editor-box">
|
||||
<div class="job-editor-header">
|
||||
<div class="title">
|
||||
<label>{{'job_editor_title' | localize('Job editor')}}</label>
|
||||
</div>
|
||||
<div class="search-job">
|
||||
<input type="text" :placeholder="'job_editor_box_name_placeholder' | localize('Apri il Job o creane uno nuovo..')" class="job-name-box" v-if="!currentJob" readonly="readonly">
|
||||
<input type="text" class="job-name-box" v-if="currentJob" v-model="currentJob.name" readonly="readonly">
|
||||
<button class="btn" @click="newJob()" :title="'job_editor_btn_new' | localize('Crea Job')"><i class="fa fa-file-o"></i></button>
|
||||
<button class="btn" @click="openJob()" :title="'job_editor_btn_open' | localize('Apri Job')"><i class="fa fa-folder-open"></i></button>
|
||||
<button class="btn" :disabled="!currentJob" @click="saveJob()" :title="'job_editor_btn_save' | localize('Salva Job')"><i class="fa fa-floppy-o"></i></button>
|
||||
<button class="btn" :disabled="!currentJob" @click="saveJobNewPath()" :title="'job_editor_btn_save_path' | localize('Salva con nome')"><i class="fa fa-files-o"></i></button>
|
||||
<button class="btn" :disabled="!currentJob" @click="closeJob()" :title="'job_editor_btn_close' | localize('Chiudi Job')"><i class="fa fa-window-close"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="job-editor-body" >
|
||||
<!-- Lista degli elementi disponibili -->
|
||||
<div class="job-editor-column-left" v-show="currentJob">
|
||||
<Container :group-name="'commands'" :get-child-payload="getChildPayload" >
|
||||
<div class="column-left-title">
|
||||
<span>{{'drag_job_items_to_compose_job' | localize('Trascina nella parte centrale della pagina gli oggetti che desideri aggiungere al job')}}</span>
|
||||
</div>
|
||||
<Draggable v-for="(p, index) in jobitems" :key="'aj'+ index">
|
||||
<objects-job :title="p.title | localize(p.title)" :min="p.layout == 'small'"></objects-job></Draggable>
|
||||
</Container>
|
||||
</div>
|
||||
<div class="job-editor-body-box">
|
||||
<div class="job-editor-body-box-left">
|
||||
<job-editor-detail v-if="currentJob" v-model="currentJob.isoMainProgram"
|
||||
:active-command-set="jobitems"></job-editor-detail>
|
||||
</div>
|
||||
<div class="job-editor-body-box-right" v-if="jobGenerics">
|
||||
<div class="box-right-header">
|
||||
<label>{{'job_editor_box_right_metadata' | localize('Metadati')}}</label>
|
||||
</div>
|
||||
<div class="box-right-body">
|
||||
<div class="tab-box">
|
||||
<div class="tab-box-scroll">
|
||||
<button class="tab" :class="{'active': selectedTab == 'ParBase'}" @click="selectTab('ParBase')">
|
||||
<span>{{'job_editor_box_right_basic_parameters' | localize('Parametri base')}}</span>
|
||||
</button>
|
||||
<button class="tab" :class="{'active': selectedTab == 'Utensili'}" @click="selectTab('Utensili')">
|
||||
<span>{{'job_editor_box_right_tools' | localize('Utensili')}}</span>
|
||||
</button>
|
||||
<button class="tab" :class="{'active': selectedTab == 'Parametri'}" @click="selectTab('Parametri')">
|
||||
<span>{{'job_editor_box_right_parameters' | localize('Parametri')}}</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-right-body-container scrollable" v-if="selectedTab == 'ParBase' && currentJob">
|
||||
<div class="title">
|
||||
<span>{{'job_editor_box_right_images' | localize('Immagini')}}</span>
|
||||
</div>
|
||||
<div class="box-image scrollable" >
|
||||
<div v-for="(image,key) in jobGenerics.images" :key="key" v-if="key < limitationList" class="filename">
|
||||
<i class="fa fa-file-image-o" @click="openImage(image)"></i>
|
||||
<span @click="openImage(image)">{{image.name}}</span>
|
||||
<div class="right">
|
||||
<!-- <button class="btn-hidden" v-if="selectedAttachMaintenance == a" @click="openAttach(a)"><i class="fa fa-file-o"></i></button> -->
|
||||
<button class="btn-hidden" @click="deleteImageFromJob(image)"><i class="fa fa-trash"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="allattach" >
|
||||
<button class="btn-hidden" @click="updateLimitation()">
|
||||
<span v-if="limitationList == jobGenerics.images.length">{{'job_editor_btn_hide_all_attach' | localize("Nascondi tutti gli allegati")}}</span>
|
||||
<span v-if="limitationList != jobGenerics.images.length">{{'job_editor_btn_view_all_attach' | localize("Mostra tutti gli allegati")}}</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="addattach">
|
||||
<div class="group-button-add-attach"><label for="input">{{'job_add_attach' | localize('Aggiungi un allegato')}}<button for="input" class="btn" @click="addImageToJob()"><i class="fa fa-plus"></i></button></label></div>
|
||||
</div>
|
||||
<div class="description">
|
||||
<div class="description-title">
|
||||
<label>{{'job_editor_box_right_description' | localize('Descrizione')}}</label>
|
||||
</div>
|
||||
<textarea v-model="jobGenerics.Description" ></textarea>
|
||||
</div>
|
||||
<div class="times">
|
||||
<div class="times-title">
|
||||
<label>{{'job_editor_box_right_times' | localize('Tempi')}}</label>
|
||||
</div>
|
||||
<div class="average-time">
|
||||
<label>{{'job_editor_box_right_average_time' | localize('Tempo medio')}}Tempo medio:</label>
|
||||
<span >{{jobGenerics.ExecutionTime}}</span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-right-body-container" v-if="selectedTab == 'Utensili' && currentJob">
|
||||
<div class="job-editor-tools scrollable">
|
||||
<div class="job-editor-button">
|
||||
<button class="btn" @click="removeTool(selectedTool)"><i class="fa fa-trash"></i></button>
|
||||
</div>
|
||||
<tool :class="{'selected': selectedTool == t}" v-if="t && t.id" @click.native="selectTool(t)" v-for="t in jobTools" :key="'tool_'+t.id" :code="'jobeditor_tool_abbreviation' | localize('T%d',t.id)" :title="calcFamilyName(t.id)" :img-source="getToolIcon(t.toolType)"></tool>
|
||||
<tool :class="{'selected': selectedTool == t}" v-if="!t || !t.id" @click.native="selectTool(t)" v-for="(t,key) in jobTools" class="notfound" :key="'und_'+key" :code="'jobeditor_tool_abbreviation' | localize('T%d',t)" :title="'jobeditor_tool_notfound' | localize('Tool Not Found')" img-source="../assets/icons/Tools/Undefined.png"></tool>
|
||||
</div>
|
||||
<div class="job-editor-tools-footer">
|
||||
<div>{{'job_editor_box_right_add_tool' | localize('Aggiungi un utensile')}}<button class="btn" @click="openModalAddToolToJob()"><i class="fa fa-plus"></i></button></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="box-right-body-container" v-if="selectedTab == 'Parametri' && currentJob">
|
||||
<div class="job-editor-parameters scrollable">
|
||||
<div class="group-button">
|
||||
<button class="btn" @click="editParam(selectedParam)"><i class="fa fa-pencil-square-o"></i></button>
|
||||
<button class="btn" @click="removeParam(selectedParam)"><i class="fa fa-trash"></i></button>
|
||||
</div>
|
||||
<input-box :class="{'selected': selectedParam == c}" v-for="c in currentJob.metadata.customs" v-model="c.value" :key="c.name" :title="c.name" :type="c.type.toLowerCase()" @click.native="selectParam(c)">
|
||||
<option v-if="c.type && c.type.toLowerCase() == 'select'" v-for="(s, k) in c.selectionList" :key="k" :value="s">
|
||||
<div>{{s}}</div>
|
||||
</option>
|
||||
</input-box>
|
||||
</div>
|
||||
<div class="job-editor-parameters-footer">
|
||||
<div>{{'job_editor_box_right_add_parameter' | localize('Aggiungi un parametro')}}<button class="btn" @click="openModalJobAddParameter()"><i class="fa fa-plus"></i></button></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="job-editor-footer">
|
||||
<!-- <div class="button-left">
|
||||
<button class="btn">Svuota job</button>
|
||||
</div> -->
|
||||
<div class="button-right">
|
||||
<button class="btn btn-success" :disabled="!currentJob" @click="saveJob()">{{'job_editor_save_job' | localize('Salva')}}</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script src="./job-editor.ts" lang="ts"></script>
|
||||
@@ -1,22 +0,0 @@
|
||||
import Vue from 'vue';
|
||||
import Component from 'vue-class-component';
|
||||
import {Prop} from 'vue-property-decorator';
|
||||
|
||||
@Component({})
|
||||
export default class ObjectsJob extends Vue{
|
||||
|
||||
// imgSource: {default:"../assets/icons/_png/keyboard-dots-24x48.png"},
|
||||
@Prop({ default: "" })
|
||||
title:string;
|
||||
@Prop({ default: false })
|
||||
min:boolean;
|
||||
@Prop({ default: false })
|
||||
expanded:boolean;
|
||||
|
||||
|
||||
get imgSource() {
|
||||
if (this.min) return "assets/icons/_png/keyboard-dots-24x24.png";
|
||||
return "assets/icons/_png/keyboard-dots-24x48.png";
|
||||
};
|
||||
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
<template>
|
||||
<!-- <div class="test-container"> -->
|
||||
<div class="objects-job" :class="{'min': min, 'job-expanded': expanded}">
|
||||
<div class="main">
|
||||
<div class="objects-job-image">
|
||||
<img :src="imgSource" />
|
||||
</div>
|
||||
<div class="objects-job-title">
|
||||
<label>{{title}}</label>
|
||||
</div>
|
||||
<slot name="buttons"></slot>
|
||||
</div>
|
||||
<slot></slot>
|
||||
</div>
|
||||
<!-- </div> -->
|
||||
</template>
|
||||
|
||||
<script lang="ts" src="./objects-job.ts"></script>
|
||||
@@ -1,3 +0,0 @@
|
||||
import ObjectsJob from "./components/objects-job.vue";
|
||||
export { ObjectsJob }
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
export const JobEditor = () => import("./components/job-editor.vue");
|
||||
|
||||
|
||||
export const routes = [
|
||||
{ path: "/job-editor", component: JobEditor, meta: { title: "Job-Editor", area: "jobeditor" } },
|
||||
];
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
import { Loader } from "@/components";
|
||||
import { AppModel } from "@/store";
|
||||
import Vue from "vue";
|
||||
import Component from "vue-class-component";
|
||||
|
||||
@Component({
|
||||
components:{
|
||||
loader: Loader
|
||||
}
|
||||
})
|
||||
export default class AxesCalibrationDialog extends Vue {
|
||||
|
||||
get progress() {
|
||||
return this.$store.state.machineStatus.resetAxesProgress;
|
||||
}
|
||||
|
||||
};
|
||||
@@ -1,7 +0,0 @@
|
||||
<template>
|
||||
<loader :title="'axes_reset_title' | localize('Azzeramento degli assi')"
|
||||
:message="'axes_reset_message' | localize('Azzeramento degli assi in corso ...')" :percent="progress"></loader>
|
||||
</template>
|
||||
|
||||
<script src="./axes-calibration-dialog.ts" lang="ts"></script>
|
||||
|
||||
@@ -1,64 +0,0 @@
|
||||
import { AppModel } from "@/store";
|
||||
import { Modal, ModalHelper } from "@/components/modals";
|
||||
import Component from "vue-class-component";
|
||||
import Vue from "vue";
|
||||
import { Hub } from "@/services";
|
||||
import { Factory, messageService } from "@/_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"
|
||||
|
||||
mounted(){
|
||||
this.data = ModalHelper.M155ModalData.data;
|
||||
this.value = 0;
|
||||
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 = 0;
|
||||
}
|
||||
|
||||
ischecked(k){
|
||||
return k == this.value;
|
||||
}
|
||||
check(k){
|
||||
return this.value = k;
|
||||
}
|
||||
canSendAnswer(){
|
||||
if(this.getType == this.REAL)
|
||||
return this.value != null && this.value != undefined;
|
||||
else
|
||||
return this.value && this.value != 0;
|
||||
}
|
||||
get getType(){
|
||||
if(this.data)
|
||||
return this.data.type
|
||||
|
||||
return ""
|
||||
}
|
||||
hide() {
|
||||
ModalHelper.M155ModalData.data.toDisplay = false;
|
||||
ModalHelper.HideThisM155Modal(ModalHelper.M155ModalData.data.processId);
|
||||
}
|
||||
answer(){
|
||||
Hub.Current.WriteM155Response(this.data.process,this.value);
|
||||
}
|
||||
};
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user