Compare commits

...

80 Commits

Author SHA1 Message Date
Samuele Locatelli a0d4e0e2e1 refresh localhost 4 prod pack 2020-06-30 15:46:35 +02:00
Samuele Locatelli cc9f87d079 Merge branch 'develop' of https://bitbucket.org/ncarminati/cms_thermo_active into feature/recipe 2020-06-30 15:30:43 +02:00
= 4f6f5ab867 light orange 2020-06-30 15:29:16 +02:00
= d272ff5e02 Merge remote-tracking branch 'CMS/develop' into develop 2020-06-30 15:25:42 +02:00
= 8c48b2c714 fix alarms 2020-06-30 15:25:05 +02:00
Samuele Locatelli ee924dce19 Merge branch 'develop' of https://bitbucket.org/ncarminati/cms_thermo_active into develop 2020-06-30 15:24:38 +02:00
Samuele Locatelli 79874f92c1 update language controller 2020-06-30 15:23:04 +02:00
= 846ae78de7 fix date picker 2020-06-30 15:12:48 +02:00
= bc51324ed0 fix grafici 2020-06-30 15:00:00 +02:00
= d92d0e8b3e Merge remote-tracking branch 'CMS/develop' into develop 2020-06-30 14:02:31 +02:00
= a98de74f19 options.. 2020-06-30 14:01:47 +02:00
Samuele Locatelli df0532dbed moved messaggi position (inside project) 2020-06-30 13:56:39 +02:00
Samuele Locatelli d7fc81b460 fix localhost stack 2020-06-30 12:06:05 +02:00
= 65543fc44d inserimento combo in luogo delle select 2020-06-30 11:45:54 +02:00
Samuele Locatelli e77f4f2900 Merge branch 'feature/alarms' into develop 2020-06-30 11:34:34 +02:00
Samuele Locatelli 1b0432babe Merge branch 'develop' of https://bitbucket.org/ncarminati/cms_thermo_active into develop 2020-06-30 11:34:16 +02:00
Samuele Locatelli 8579511e95 FixAdded strobe/ack for start/end prod pz 2020-06-30 11:33:57 +02:00
Samuele Locatelli 9a4bb57ddb ranaming translation files 2020-06-30 11:33:25 +02:00
= 9e08721ebc Merge remote-tracking branch 'CMS/develop' into develop 2020-06-30 10:22:51 +02:00
= a48c986086 fix binding scheda 2020-06-30 10:22:27 +02:00
= c820e98403 fix portata durata su vuoto 2020-06-30 10:17:09 +02:00
= 8c9c2614ff fix modifica riscaldi 2020-06-30 10:12:12 +02:00
Samuele Locatelli 8798a2a00f Merge branch 'feature/alarms' into develop 2020-06-29 19:42:25 +02:00
Samuele Locatelli f5d9ef2dd9 Completed review of translations file 2020-06-29 19:40:54 +02:00
Samuele Locatelli 3c29a47fc9 start new language translators 2020-06-29 18:58:13 +02:00
Samuele Locatelli 488add201e Review of recipe config models and xml/xsd valid 2020-06-29 18:57:49 +02:00
Samuele Locatelli a552ab5cae Added translation files for modules & recipe param 2020-06-29 18:57:19 +02:00
Samuele Locatelli fad81cfb47 added json animations on wwwroot 2020-06-29 18:56:57 +02:00
Samuele Locatelli ce150ed3c7 Start alarm decoding 2020-06-29 15:02:15 +02:00
= 5831936b24 Merge remote-tracking branch 'CMS/develop' into develop 2020-06-29 13:53:28 +02:00
= 1b31f05fb2 selezione riscaldi con touch 2020-06-29 13:53:16 +02:00
Samuele Locatelli e2b07ff9ca Merge branch 'feature/recipe' into develop 2020-06-29 13:05:30 +02:00
Samuele Locatelli 6066c7155b Merge branch 'develop' of https://bitbucket.org/ncarminati/cms_thermo_active into develop 2020-06-29 13:05:19 +02:00
Samuele Locatelli 07719b3fde force rewrite od osd files 2020-06-29 13:04:03 +02:00
= 59051dc908 primo binding dati dashboard.. 2020-06-26 18:18:09 +02:00
= a3b73742c2 fix selezione riscaldi 2020-06-26 17:32:03 +02:00
Samuele Locatelli b732d1d024 Fix for local deploy 2020-06-26 16:15:48 +02:00
= 71955744f6 rimozione pieces dalla dashboard.. vanno rifattorizzati 2020-06-26 16:09:44 +02:00
Samuele Locatelli 807e225de8 Confirm recipe post PLC request 2020-06-26 12:19:30 +02:00
= 26000cffd1 Merge remote-tracking branch 'CMS/develop' into develop 2020-06-26 11:46:57 +02:00
= 99a6af2491 pulizia dal vecchio progetto 2020-06-26 11:45:17 +02:00
Samuele Locatelli 251795ad19 Merge branch 'feature/recipe' into develop 2020-06-26 11:38:35 +02:00
Samuele Locatelli 002310dcb4 FIx visible/enabled/error status from PLC 2020-06-26 11:37:31 +02:00
= 8db88e9ca6 fix annulla ricetta 2020-06-26 10:13:24 +02:00
Samuele Locatelli 956b9ad191 started vers 0.9.14 with XML cleanup for ModBlock 2020-06-26 08:56:43 +02:00
Samuele Locatelli 02cf47426c Merge branch 'develop' of https://bitbucket.org/ncarminati/cms_thermo_active into develop 2020-06-25 18:12:51 +02:00
Samuele Locatelli e2e190cf8f Merge branch 'develop' into feature/recipe 2020-06-25 18:08:51 +02:00
Samuele Locatelli 23f2299de2 Fix XML from M.Carissoni in modBlock 2020-06-25 18:08:40 +02:00
= e3f376bf51 fix finte eccezioni della direttiva di focus. 2020-06-25 17:04:50 +02:00
= 06e3345d2b Merge remote-tracking branch 'CMS/develop' into develop 2020-06-25 16:47:27 +02:00
= cf6fdeaa79 commenti 2020-06-25 16:47:11 +02:00
Samuele Locatelli 3b823cec89 Removed pattern of using (ncAdapter) from WebAPI 2020-06-25 16:46:01 +02:00
= b0684fa03f algoritmo di posizionamento verticale gantt con ottimizzazione delle posizioni in riga. 2020-06-25 16:44:32 +02:00
Samuele Locatelli b48c18ac12 Merge branch 'develop' into feature/recipe 2020-06-25 16:08:32 +02:00
Samuele Locatelli d452e69a52 update vers number! 2020-06-25 16:08:04 +02:00
Samuele Locatelli f9c354acf5 Fix NC info (static data) retrieval 2020-06-25 16:07:13 +02:00
Samuele Locatelli d0ee6d33d1 fix develop conf for local testing 2020-06-25 14:04:14 +02:00
Samuele Locatelli 91df9b99d4 fix vers 0.9.11 on testing overview 2020-06-25 13:49:31 +02:00
Samuele Locatelli 6cd224d6ce Merge branch 'develop' of https://bitbucket.org/ncarminati/cms_thermo_active into develop 2020-06-25 12:48:45 +02:00
Samuele Locatelli 192722d10e Merge branch 'feature/recipe' into develop 2020-06-25 12:47:36 +02:00
Samuele Locatelli 6095f02b2a Forced send on recipeOverview 2020-06-25 12:47:23 +02:00
Samuele Locatelli eae5ecdf31 more fix on XML example 2020-06-25 12:47:11 +02:00
Samuele Locatelli ceccfca48a Fixed recipe config (validator & example) 2020-06-25 12:45:24 +02:00
= 2dc5ca8ebe fix footer menu size & buttons 2020-06-25 12:29:17 +02:00
= f71c03186e primo dimensionamento corretto delle barre gantt 2020-06-25 12:12:47 +02:00
Samuele Locatelli 9f7b60234a Merge branch 'feature/recipe' into develop 2020-06-25 11:59:34 +02:00
Samuele Locatelli 5a209dc1ff Merge branch 'develop' into feature/recipe 2020-06-25 11:59:24 +02:00
Samuele Locatelli 0a47e22987 Change model for recipe config (enums parameters) 2020-06-25 11:58:47 +02:00
= 6811c29f01 Merge remote-tracking branch 'CMS/develop' into develop 2020-06-25 11:54:09 +02:00
= f168f6a9d0 layout 2020-06-25 11:52:09 +02:00
= 4343386cce fix overview & confirm 2020-06-25 11:49:32 +02:00
Samuele Locatelli 1a97ad094f Merge branch 'feature/recipe' into develop 2020-06-25 10:56:36 +02:00
Samuele Locatelli e550a386ec removed forced sends... 2020-06-25 10:56:23 +02:00
Samuele Locatelli 66865d8e98 forced send of overview data 2020-06-25 10:54:39 +02:00
= 245844a243 processo primo commit 2020-06-25 10:42:33 +02:00
Samuele Locatelli de48382f3d Merge branch 'feature/recipe' into develop 2020-06-25 10:09:45 +02:00
Samuele Locatelli bc75c29f80 Fix overview for recipe template/init 2020-06-25 10:09:31 +02:00
Samuele Locatelli e7e2601a8d updated ModBLock controllers for new datamodel 2020-06-25 09:58:10 +02:00
Samuele Locatelli 4ea2cebfeb Draft for new overview calculation (to be checked) 2020-06-24 19:14:59 +02:00
Samuele Locatelli 1dd83f4e17 Refactoring methods for File persistance 2020-06-24 18:45:22 +02:00
276 changed files with 5291 additions and 12543 deletions
+262 -82
View File
@@ -2,184 +2,364 @@
<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>
+2 -2
View File
@@ -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>
-1
View File
@@ -62,7 +62,6 @@ namespace Thermo.Active.Config
public static List<RiskChannelModel> RiskChannelConfig;
public static List<RiskBoardModel> RiskBoardConfig;
public static LiveData RecipeLiveData = new LiveData();
}
}
+13 -200
View File
@@ -57,28 +57,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,10 +593,18 @@ 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>
/// Module config setup from file
/// </summary>
@@ -633,9 +619,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 +833,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,7 +55,6 @@
<SubType>Designer</SubType>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Compile Include="LiveData.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="ServerConfig.cs" />
<Compile Include="ServerConfigController.cs" />
@@ -91,6 +90,7 @@
</Content>
<EmbeddedResource Include="Config\userSoftKeyConfigValidator.xsd">
<SubType>Designer</SubType>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</EmbeddedResource>
<Content Include="Config\areasConfig.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
@@ -101,9 +101,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 +120,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 +150,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 />
+10
View File
@@ -792,6 +792,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();
}
}
}
@@ -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
{
}
}
@@ -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;
}
@@ -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;
}
}
@@ -108,6 +108,7 @@
<Compile Include="DTOModels\ThModules\DTOModule.cs" />
<Compile Include="DTOModels\ThModules\DTOModuleConfigModel.cs" />
<Compile Include="DTOModels\ThModules\DTOModulesBlock.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" />
+163 -57
View File
@@ -23,12 +23,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 +165,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 +339,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 +354,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 +362,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 +381,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;
}
}
}
@@ -1177,6 +1244,8 @@ namespace Thermo.Active.NC
// manage strobe/ack!
libraryError = numericalControl.PLC_WAckProdUpdate();
if (libraryError.IsError())
return libraryError;
}
}
else
@@ -1184,6 +1253,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 +1366,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 +1392,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 +1399,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 +1421,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 +1437,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 +1451,8 @@ namespace Thermo.Active.NC
};
currStatus = new RPStatus()
{
Visible = false,
Enabled = false,
Visible = true,
Enabled = true,
HasError = false
};
// calcolo intero oggetto
@@ -1368,7 +1463,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 +1983,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 +2000,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 +2050,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 +2109,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,
+244
View File
@@ -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
}
}
+4
View File
@@ -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">
+4
View File
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Newtonsoft.Json" version="12.0.3" targetFramework="net462" />
</packages>
@@ -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);
}
}
@@ -108,13 +108,15 @@ 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);
@@ -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,4 +1,5 @@
using CMS_CORE_Library.Models;
using System;
using System.Collections.Generic;
using System.Web.Http;
using Thermo.Active.NC;
@@ -116,6 +117,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();
@@ -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)
{
+3
View File
@@ -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
+346
View File
@@ -0,0 +1,346 @@
mb_DiscesaCZ,MB_DiscesaCZ ITA
mb_MembDiscesaZ,MB_MembDiscesaZ ITA
mb_MembZ,MB_MembZ ITA
mb_Mod_MembSalitaZ,MB_Mod_MembSalitaZ ITA
mb_Mod_AppoggioDiscesaW,MB_Mod_AppoggioDiscesaW ITA
mb_Mod_RiscaldoInf,MB_Mod_RiscaldoInf ITA
mb_Mod_RiscaldoSup,MB_Mod_RiscaldoSup ITA
mb_Mod_PirometroRisc,MB_Mod_PirometroRisc ITA
mb_Mod_DecompSustain,MB_Mod_DecompSustain ITA
mb_Mod_Acrilico,MB_Mod_Acrilico ITA
mb_Mod_RiscaldiIndietro,MB_Mod_RiscaldiIndietro ITA
mb_Mod_ExtraR,MB_Mod_ExtraR ITA
mb_Mod_Imbutitura,MB_Mod_Imbutitura ITA
mb_Mod_SalitaW,MB_Mod_SalitaW ITA
mb_Mod_AttesaStampo,MB_Mod_AttesaStampo ITA
mb_Mod_Raffreddamento,MB_Mod_Raffreddamento ITA
mb_Mod_PirometroRaffr,MB_Mod_PirometroRaffr ITA
mb_Mod_Vuoto,MB_Mod_Vuoto ITA
mb_Mod_VuotoDiretto,MB_Mod_VuotoDiretto ITA
mb_Mod_VuotoAux,MB_Mod_VuotoAux ITA
mb_Mod_Nebulizz,MB_Mod_Nebulizz ITA
mb_Mod_AttesaPartenzaZ,MB_Mod_AttesaPartenzaZ ITA
mb_Mod_DiscesaZ,MB_Mod_DiscesaZ ITA
mb_Mod_Z,MB_Mod_Z ITA
mb_Mod_SalitaZ,MB_Mod_SalitaZ ITA
mb_Mod_AriaZ,MB_Mod_AriaZ ITA
mb_Mod_VuotoZ,MB_Mod_VuotoZ ITA
mb_Mod_ScaricoVuotoZ,MB_Mod_ScaricoVuotoZ ITA
mb_Mod_ScaricoVuoto,MB_Mod_ScaricoVuoto ITA
mb_Mod_EstrazioneZ,MB_Mod_EstrazioneZ ITA
mb_Mod_DiscesaAssistZ,MB_Mod_DiscesaAssistZ ITA
mb_Mod_Estrazione,MB_Mod_Estrazione ITA
mb_Mod_DiscesaW,MB_Mod_DiscesaW ITA
mb_Mod_RiscaldiIndietro2,MB_Mod_RiscaldiIndietro2 ITA
mb_Mod_SalitaCZ,MB_Mod_SalitaCZ ITA
mb_Mod_Riscaldi2,MB_Mod_Riscaldi2 ITA
mb_Mod_Estrazione_Aux_W,MB_Mod_Estrazione_Aux_W ITA
mb_Mod_Attesa_Pirometro,MB_Mod_Attesa_Pirometro ITA
mb_Mod_Prevuoto,MB_Mod_Prevuoto ITA
mb_Mod_SalitaAssistZ,MB_Mod_SalitaAssistZ ITA
general_sizes_mould_dim_x,general_sizes_mould_dim_x
general_sizes_mould_dim_y,general_sizes_mould_dim_y
general_sizes_mould_max_height,general_sizes_mould_max_height
general_sizes_mould_min_height,general_sizes_mould_min_height
general_sizes_mould_base_height,general_sizes_mould_base_height
general_sizes_sheet_material,general_sizes_sheet_material
general_sizes_sheet_dim_x,general_sizes_sheet_dim_x
general_sizes_sheet_dim_y,general_sizes_sheet_dim_y
general_sizes_sheet_thickness,general_sizes_sheet_thickness
general_sizes_plate_type,general_sizes_plate_type
general_sizes_plate_dim_x,general_sizes_plate_dim_x
general_sizes_plate_dim_y,general_sizes_plate_dim_y
general_sizes_frame_traverses,general_sizes_frame_traverses
general_sizes_frame_dim_x,general_sizes_frame_dim_x
general_sizes_frame_dim_y,general_sizes_frame_dim_y
general_sizes_upperplate_max_height,general_sizes_upperplate_max_height
general_area_working_dxsx,general_area_working_dxsx
positions_mould_lower_position,positions_mould_lower_position
positions_mould_lower_speed,positions_mould_lower_speed
positions_mould_intermediate_position,positions_mould_intermediate_position
positions_mould_upper_position,positions_mould_upper_position
positions_mould_upper_speed,positions_mould_upper_speed
positions_mould_upperdeceleration_position,positions_mould_upperdeceleration_position
positions_mould_upperdeceleration_speed,positions_mould_upperdeceleration_speed
positions_mould_lowerdeceleration_position,positions_mould_lowerdeceleration_position
positions_mould_lowerdeceleration_speed,positions_mould_lowerdeceleration_speed
positions_frame_lower_position,positions_frame_lower_position
positions_frame_lower_speed,positions_frame_lower_speed
positions_frame_upper_position,positions_frame_upper_position
positions_frame_upper_speed,positions_frame_upper_speed
positions_frame_intermediate_position,positions_frame_intermediate_position
positions_frame_intermediate_speed,positions_frame_intermediate_speed
positions_frame_unload_position,positions_frame_unload_position
positions_upperplate_lower_position,positions_upperplate_lower_position
positions_upperplate_lower_speed,positions_upperplate_lower_speed
positions_upperplate_upper_position,positions_upperplate_upper_position
positions_upperplate_upper_speed,positions_upperplate_upper_speed
positions_upperplate_upperdeceleration_position,positions_upperplate_upperdeceleration_position
positions_upperplate_upperdeceleration_speed,positions_upperplate_upperdeceleration_speed
positions_upperplate_lowerdeceleration_position,positions_upperplate_lowerdeceleration_position
positions_upperplate_lowerdeceleration_speed,positions_upperplate_lowerdeceleration_speed
cycle_forming_type,cycle_forming_type
cycle_forming_pause_cycle,cycle_forming_pause_cycle
cycle_forming_cooling_enabled,cycle_forming_cooling_enabled
cycle_forming_blowingbox_enabled,cycle_forming_blowingbox_enabled
cycle_acrylicframe_enabled,cycle_acrylicframe_enabled
cycle_acrylicframe_time,cycle_acrylicframe_time
cycle_upperoverheating_enabled,cycle_upperoverheating_enabled
cycle_upperoverheating_time,cycle_upperoverheating_time
cycle_crystallisation_type,cycle_crystallisation_type
cycle_crystallisation_time,cycle_crystallisation_time
cycle_loader_enable,cycle_loader_enable
cycle_loader_lifter_lowerposition_delay,cycle_loader_lifter_lowerposition_delay
cycle_loader_lifter_upperposition_delay,cycle_loader_lifter_upperposition_delay
cycle_loader_split_sheet_time,cycle_loader_split_sheet_time
cycle_loader_ejector_position,cycle_loader_ejector_position
cycle_loader_pallet_height,cycle_loader_pallet_height
cycle_loader_center_x,cycle_loader_center_x
cycle_loader_center_y,cycle_loader_center_y
cycle_loader_checktichness_enabled,cycle_loader_checktichness_enabled
cycle_loader_suckers_vacuum,cycle_loader_suckers_vacuum
cycle_loader_ionizer_enabled,cycle_loader_ionizer_enabled
cycle_loader_manualunloading_enabled,cycle_loader_manualunloading_enabled
heats_lowerheaters_max_time,heats_lowerheaters_max_time
heats_lowerheaters_movement_enabled,heats_lowerheaters_movement_enabled
heats_lowerheaters_enabled,heats_lowerheaters_enabled
heats_lowerheaters_oscillation,heats_lowerheaters_oscillation
heats_upperheaters_max_time,heats_upperheaters_max_time
heats_upperheaters_movement_enabled,heats_upperheaters_movement_enabled
heats_upperheaters_enabled,heats_upperheaters_enabled
heats_upperheaters_oscillation,heats_upperheaters_oscillation
heats_decomsustain_type,heats_decomsustain_type
heats_decomsustain_decompression_flow,heats_decomsustain_decompression_flow
heats_decomsustain_min_blowing_time,heats_decomsustain_min_blowing_time
heats_decomsustain_sustain_delay,heats_decomsustain_sustain_delay
heats_decomsustain_decompression_delay,heats_decomsustain_decompression_delay
heats_decomsustain_decompression_duration,heats_decomsustain_decompression_duration
heats_decomsustain_smoke_function_enabled,heats_decomsustain_smoke_function_enabled
pyrometer_pyrometer_enabled,pyrometer_pyrometer_enabled
pyrometer_pyrometer_setpoint,pyrometer_pyrometer_setpoint
pyrometer_pyrometer_delay,pyrometer_pyrometer_delay
pyrometer_upperthermoregulator_start_adjustment,pyrometer_upperthermoregulator_start_adjustment
pyrometer_upperthermoregulator_end_adjustment,pyrometer_upperthermoregulator_end_adjustment
pyrometer_upperthermoregulator_min_percentage,pyrometer_upperthermoregulator_min_percentage
pyrometer_upperthermoregulator_max_percentage,pyrometer_upperthermoregulator_max_percentage
pyrometer_upperthermoregulator_sleep_enabled,pyrometer_upperthermoregulator_sleep_enabled
pyrometer_upperthermoregulator_sleep_percentage,pyrometer_upperthermoregulator_sleep_percentage
pyrometer_lowerthermoregulator_start_adjustment,pyrometer_lowerthermoregulator_start_adjustment
pyrometer_lowerthermoregulator_end_adjustment,pyrometer_lowerthermoregulator_end_adjustment
pyrometer_lowerthermoregulator_min_percentage,pyrometer_lowerthermoregulator_min_percentage
pyrometer_lowerthermoregulator_max_percentage,pyrometer_lowerthermoregulator_max_percentage
pyrometer_lowerthermoregulator_sleep_enabled,pyrometer_lowerthermoregulator_sleep_enabled
pyrometer_lowerthermoregulator_sleep_percentage,pyrometer_lowerthermoregulator_sleep_percentage
pyrometer_upperthermoregulator_sleep_temperature,pyrometer_upperthermoregulator_sleep_temperature
pyrometer_upperthermoregulator_working_temperature,pyrometer_upperthermoregulator_working_temperature
pyrometer_lowerthermoregulator_sleep_temperature,pyrometer_lowerthermoregulator_sleep_temperature
pyrometer_lowerthermoregulator_working_temperature,pyrometer_lowerthermoregulator_working_temperature
drawing_type,drawing_type
drawing_height,drawing_height
drawing_delay,drawing_delay
drawing_1_chart_setpointx,drawing_1_chart_setpointx
drawing_1_chart_setpointy,drawing_1_chart_setpointy
drawing_photocell,drawing_photocell
drawing_mantaining_flow,drawing_mantaining_flow
drawing_manual,drawing_manual
drawing_mould_up_delay,drawing_mould_up_delay
upperplate_cycle_type,upperplate_cycle_type
upperplate_cycle_delay,upperplate_cycle_delay
upperplate_cycle_time,upperplate_cycle_time
upperplate_air_enable,upperplate_air_enable
upperplate_air_delay,upperplate_air_delay
upperplate_air_max_time,upperplate_air_max_time
upperplate_air_1_chart_setpointx,upperplate_air_1_chart_setpointx
upperplate_air_1_chart_setpointy,upperplate_air_1_chart_setpointy
upperplate_air_2_chart_setpointx,upperplate_air_2_chart_setpointx
upperplate_air_2_chart_setpointy,upperplate_air_2_chart_setpointy
upperplate_air_3_chart_setpointx,upperplate_air_3_chart_setpointx
upperplate_air_3_chart_setpointy,upperplate_air_3_chart_setpointy
upperplate_air_manual,upperplate_air_manual
upperplate_vacuum_enable,upperplate_vacuum_enable
upperplate_vacuum_delay,upperplate_vacuum_delay
upperplate_vacuum_max_time,upperplate_vacuum_max_time
upperplate_vacuum_1_chart_setpointx,upperplate_vacuum_1_chart_setpointx
upperplate_vacuum_1_chart_setpointy,upperplate_vacuum_1_chart_setpointy
upperplate_vacuum_2_chart_setpointx,upperplate_vacuum_2_chart_setpointx
upperplate_vacuum_2_chart_setpointy,upperplate_vacuum_2_chart_setpointy
upperplate_vacuum_3_chart_setpointx,upperplate_vacuum_3_chart_setpointx
upperplate_vacuum_3_chart_setpointy,upperplate_vacuum_3_chart_setpointy
upperplate_vacuum_manual,upperplate_vacuum_manual
upperplate_extraction_enable,upperplate_extraction_enable
upperplate_extraction_delay,upperplate_extraction_delay
upperplate_extraction_1_chart_setpointx,upperplate_extraction_1_chart_setpointx
upperplate_extraction_1_chart_setpointy,upperplate_extraction_1_chart_setpointy
upperplate_extraction_manual,upperplate_extraction_manual
cooling_blowing_type,cooling_blowing_type
cooling_blowing_delay,cooling_blowing_delay
cooling_blowing_time,cooling_blowing_time
cooling_pyrometer_enabled,cooling_pyrometer_enabled
cooling_pyrometer_setpoint,cooling_pyrometer_setpoint
cooling_pyrometer_delay,cooling_pyrometer_delay
cooling_nebulizer_type,cooling_nebulizer_type
cooling_nebulizer_delay,cooling_nebulizer_delay
cooling_nebulizer_time,cooling_nebulizer_time
cooling_telescopic_enable,cooling_telescopic_enable
cooling_telescopic_position,cooling_telescopic_position
cooling_telescopic_swing_enable,cooling_telescopic_swing_enable
cooling_telescopic_swing_stroke,cooling_telescopic_swing_stroke
cooling_shutter_1_opening_perc,cooling_shutter_1_opening_perc
cooling_shutter_2_opening_perc,cooling_shutter_2_opening_perc
cooling_shutter_3_opening_perc,cooling_shutter_3_opening_perc
cooling_shutter_4_opening_perc,cooling_shutter_4_opening_perc
cooling_shutter_5_opening_perc,cooling_shutter_5_opening_perc
cooling_shutter_6_opening_perc,cooling_shutter_6_opening_perc
cooling_shutter_7_opening_perc,cooling_shutter_7_opening_perc
cooling_shutter_8_opening_perc,cooling_shutter_8_opening_perc
cooling_shutter_9_opening_perc,cooling_shutter_9_opening_perc
cooling_shutter_10_opening_perc,cooling_shutter_10_opening_perc
cooling_shutter_11_opening_perc,cooling_shutter_11_opening_perc
cooling_shutter_12_opening_perc,cooling_shutter_12_opening_perc
cooling_shutter_13_opening_perc,cooling_shutter_13_opening_perc
cooling_shutter_14_opening_perc,cooling_shutter_14_opening_perc
cooling_shutter_15_opening_perc,cooling_shutter_15_opening_perc
cooling_shutter_16_opening_perc,cooling_shutter_16_opening_perc
vacuum_main_start,vacuum_main_start
vacuum_main_delay,vacuum_main_delay
vacuum_main_max_time,vacuum_main_max_time
vacuum_main_1_chart_setpointx,vacuum_main_1_chart_setpointx
vacuum_main_1_chart_setpointy,vacuum_main_1_chart_setpointy
vacuum_main_2_chart_setpointx,vacuum_main_2_chart_setpointx
vacuum_main_2_chart_setpointy,vacuum_main_2_chart_setpointy
vacuum_main_3_chart_setpointx,vacuum_main_3_chart_setpointx
vacuum_main_3_chart_setpointy,vacuum_main_3_chart_setpointy
vacuum_main_manual,vacuum_main_manual
vacuum_direct_enabled,vacuum_direct_enabled
vacuum_direct_delay,vacuum_direct_delay
vacuum_direct_time,vacuum_direct_time
vacuum_aux_enabled,vacuum_aux_enabled
vacuum_aux_delay,vacuum_aux_delay
vacuum_aux_max_time,vacuum_aux_max_time
vacuum_aux_1_chart_setpointx,vacuum_aux_1_chart_setpointx
vacuum_aux_1_chart_setpointy,vacuum_aux_1_chart_setpointy
vacuum_aux_2_chart_setpointx,vacuum_aux_2_chart_setpointx
vacuum_aux_2_chart_setpointy,vacuum_aux_2_chart_setpointy
vacuum_aux_3_chart_setpointx,vacuum_aux_3_chart_setpointx
vacuum_aux_3_chart_setpointy,vacuum_aux_3_chart_setpointy
vacuum_aux_manual,vacuum_aux_manual
vacuum_pre_enabled,vacuum_pre_enabled
vacuum_pre_delay,vacuum_pre_delay
vacuum_pre_max_time,vacuum_pre_max_time
vacuum_pre_1_chart_setpointx,vacuum_pre_1_chart_setpointx
vacuum_pre_1_chart_setpointy,vacuum_pre_1_chart_setpointy
vacuum_pre_2_chart_setpointx,vacuum_pre_2_chart_setpointx
vacuum_pre_2_chart_setpointy,vacuum_pre_2_chart_setpointy
vacuum_pre_3_chart_setpointx,vacuum_pre_3_chart_setpointx
vacuum_pre_3_chart_setpointy,vacuum_pre_3_chart_setpointy
extraction_main_type,extraction_main_type
extraction_main_mould_dw_delay,extraction_main_mould_dw_delay
extraction_main_delay,extraction_main_delay
extraction_main_1_chart_setpointx,extraction_main_1_chart_setpointx
extraction_main_1_chart_setpointy,extraction_main_1_chart_setpointy
extraction_main_manual,extraction_main_manual
extraction_aux_enabled,extraction_aux_enabled
extraction_aux_delay,extraction_aux_delay
extraction_aux_1_chart_setpointx,extraction_aux_1_chart_setpointx
extraction_aux_1_chart_setpointy,extraction_aux_1_chart_setpointy
extraction_aux_manual,extraction_aux_manual
options_undercutmould_1_mode,options_undercutmould_1_mode
options_undercutmould_1_position,options_undercutmould_1_position
options_undercutmould_1_delay_acti,options_undercutmould_1_delay_acti
options_undercutmould_1_delay_dis,options_undercutmould_1_delay_dis
options_undercutmould_2_mode,options_undercutmould_2_mode
options_undercutmould_2_position,options_undercutmould_2_position
options_undercutmould_2_delay_acti,options_undercutmould_2_delay_acti
options_undercutmould_2_delay_dis,options_undercutmould_2_delay_dis
options_undercutmould_3_mode,options_undercutmould_3_mode
options_undercutmould_3_position,options_undercutmould_3_position
options_undercutmould_3_delay_acti,options_undercutmould_3_delay_acti
options_undercutmould_3_delay_dis,options_undercutmould_3_delay_dis
options_undercutmould_4_mode,options_undercutmould_4_mode
options_undercutmould_4_position,options_undercutmould_4_position
options_undercutmould_4_delay_acti,options_undercutmould_4_delay_acti
options_undercutmould_4_delay_dis,options_undercutmould_4_delay_dis
options_undercutmould_5_mode,options_undercutmould_5_mode
options_undercutmould_5_position,options_undercutmould_5_position
options_undercutmould_5_delay_acti,options_undercutmould_5_delay_acti
options_undercutmould_5_delay_dis,options_undercutmould_5_delay_dis
options_undercutmould_6_mode,options_undercutmould_6_mode
options_undercutmould_6_position,options_undercutmould_6_position
options_undercutmould_6_delay_acti,options_undercutmould_6_delay_acti
options_undercutmould_6_delay_dis,options_undercutmould_6_delay_dis
options_undercutmould_7_mode,options_undercutmould_7_mode
options_undercutmould_7_position,options_undercutmould_7_position
options_undercutmould_7_delay_acti,options_undercutmould_7_delay_acti
options_undercutmould_7_delay_dis,options_undercutmould_7_delay_dis
options_undercutmould_8_mode,options_undercutmould_8_mode
options_undercutmould_8_position,options_undercutmould_8_position
options_undercutmould_8_delay_acti,options_undercutmould_8_delay_acti
options_undercutmould_8_delay_dis,options_undercutmould_8_delay_dis
options_undercutmould_9_mode,options_undercutmould_9_mode
options_undercutmould_9_position,options_undercutmould_9_position
options_undercutmould_9_delay_acti,options_undercutmould_9_delay_acti
options_undercutmould_9_delay_dis,options_undercutmould_9_delay_dis
options_undercutmould_10_mode,options_undercutmould_10_mode
options_undercutmould_10_position,options_undercutmould_10_position
options_undercutmould_10_delay_acti,options_undercutmould_10_delay_acti
options_undercutmould_10_delay_dis,options_undercutmould_10_delay_dis
options_undercutupperplate_1_mode,options_undercutupperplate_1_mode
options_undercutupperplate_1_position,options_undercutupperplate_1_position
options_undercutupperplate_1_delay_acti,options_undercutupperplate_1_delay_acti
options_undercutupperplate_1_delay_dis,options_undercutupperplate_1_delay_dis
options_undercutupperplate_2_mode,options_undercutupperplate_2_mode
options_undercutupperplate_2_position,options_undercutupperplate_2_position
options_undercutupperplate_2_delay_acti,options_undercutupperplate_2_delay_acti
options_undercutupperplate_2_delay_dis,options_undercutupperplate_2_delay_dis
options_undercutupperplate_3_mode,options_undercutupperplate_3_mode
options_undercutupperplate_3_position,options_undercutupperplate_3_position
options_undercutupperplate_3_delay_acti,options_undercutupperplate_3_delay_acti
options_undercutupperplate_3_delay_dis,options_undercutupperplate_3_delay_dis
options_undercutupperplate_4_mode,options_undercutupperplate_4_mode
options_undercutupperplate_4_position,options_undercutupperplate_4_position
options_undercutupperplate_4_delay_acti,options_undercutupperplate_4_delay_acti
options_undercutupperplate_4_delay_dis,options_undercutupperplate_4_delay_dis
options_undercutupperplate_5_mode,options_undercutupperplate_5_mode
options_undercutupperplate_5_position,options_undercutupperplate_5_position
options_undercutupperplate_5_delay_acti,options_undercutupperplate_5_delay_acti
options_undercutupperplate_5_delay_dis,options_undercutupperplate_5_delay_dis
options_undercutupperplate_6_mode,options_undercutupperplate_6_mode
options_undercutupperplate_6_position,options_undercutupperplate_6_position
options_undercutupperplate_6_delay_acti,options_undercutupperplate_6_delay_acti
options_undercutupperplate_6_delay_dis,options_undercutupperplate_6_delay_dis
options_undercutupperplate_7_mode,options_undercutupperplate_7_mode
options_undercutupperplate_7_position,options_undercutupperplate_7_position
options_undercutupperplate_7_delay_acti,options_undercutupperplate_7_delay_acti
options_undercutupperplate_7_delay_dis,options_undercutupperplate_7_delay_dis
options_undercutupperplate_8_mode,options_undercutupperplate_8_mode
options_undercutupperplate_8_position,options_undercutupperplate_8_position
options_undercutupperplate_8_delay_acti,options_undercutupperplate_8_delay_acti
options_undercutupperplate_8_delay_dis,options_undercutupperplate_8_delay_dis
options_undercutupperplate_9_mode,options_undercutupperplate_9_mode
options_undercutupperplate_9_position,options_undercutupperplate_9_position
options_undercutupperplate_9_delay_acti,options_undercutupperplate_9_delay_acti
options_undercutupperplate_9_delay_dis,options_undercutupperplate_9_delay_dis
options_undercutupperplate_10_mode,options_undercutupperplate_10_mode
options_undercutupperplate_10_position,options_undercutupperplate_10_position
options_undercutupperplate_10_delay_acti,options_undercutupperplate_10_delay_acti
options_undercutupperplate_10_delay_dis,options_undercutupperplate_10_delay_dis
options_thermoregulator_1_enabled,options_thermoregulator_1_enabled
options_thermoregulator_1_setpoint,options_thermoregulator_1_setpoint
options_thermoregulator_2_enabled,options_thermoregulator_2_enabled
options_thermoregulator_2_setpoint,options_thermoregulator_2_setpoint
options_thermoregulator_3_enabled,options_thermoregulator_3_enabled
options_thermoregulator_3_setpoint,options_thermoregulator_3_setpoint
options_thermoregulator_4_enabled,options_thermoregulator_4_enabled
options_thermoregulator_4_setpoint,options_thermoregulator_4_setpoint
options_thermoregulator_5_enabled,options_thermoregulator_5_enabled
options_thermoregulator_5_setpoint,options_thermoregulator_5_setpoint
options_thermoregulator_6_enabled,options_thermoregulator_6_enabled
options_thermoregulator_6_setpoint,options_thermoregulator_6_setpoint
options_thermoregulator_7_enabled,options_thermoregulator_7_enabled
options_thermoregulator_7_setpoint,options_thermoregulator_7_setpoint
options_thermoregulator_8_enabled,options_thermoregulator_8_enabled
options_thermoregulator_8_setpoint,options_thermoregulator_8_setpoint
options_thermoregulator_9_enabled,options_thermoregulator_9_enabled
options_thermoregulator_9_setpoint,options_thermoregulator_9_setpoint
options_thermoregulator_10_enabled,options_thermoregulator_10_enabled
options_thermoregulator_10_setpoint,options_thermoregulator_10_setpoint
+650
View File
@@ -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
@@ -266,7 +266,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 +282,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);
@@ -31,7 +31,7 @@ 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>();
+1 -1
View File
@@ -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.17")]
+27
View File
@@ -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" />
+1 -1
View File
@@ -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
@@ -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,11 @@
@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;
}
}
}
}
}
+76 -121
View File
@@ -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;
@@ -5392,7 +5346,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 +5408,6 @@ select:focus {
color: #002680;
font-size: 24px;
font-weight: 500;
flex: 0.7;
}
.input-area .numeric {
font-size: 18px;
@@ -5649,7 +5602,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 +5613,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 +6052,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 +6358,7 @@ footer .machine-area {
height: 80px;
display: flex;
align-items: center;
justify-content: center;
justify-content: space-evenly;
}
footer .container {
display: flex;
@@ -23745,8 +23700,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

@@ -3,5 +3,6 @@
"api": {
"enabled": true,
"apiServerUrl": "http://localhost:9000/"
}
},
"allUIVisible": true
}
+1 -1
View File
@@ -4,4 +4,4 @@
"enabled": true,
"apiServerUrl": "http://localhost:9000/"
}
}
}
+1 -1
View File
@@ -28,4 +28,4 @@
</body>
</html>
</html>
+9 -4
View File
@@ -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": {
+4 -3
View File
@@ -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
View File
@@ -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 {
-2
View File
@@ -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 {
-23
View File
@@ -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>
-256
View File
@@ -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();
+16 -60
View File
@@ -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)
-13
View File
@@ -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,
+3 -9
View File
@@ -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)}}&nbsp;&nbsp;&nbsp;{{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)}}&nbsp;&nbsp;&nbsp;{{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)}}&nbsp;&nbsp;&nbsp;{{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)}}&nbsp;&nbsp;&nbsp;{{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);
}
};
@@ -1,33 +0,0 @@
<template>
<modal :title="'modal_m155_title' | localize('Message from Process %d',process)" class="m155" :class="{'multiple': getType != REAL}" name="modal" >
<div v-if="data">
<h2 v-if="getType != SHOW_VAL">{{data.message}}</h2>
<div class="content-real" v-if="getType == REAL">
<span>{{'modal_m155_value' | localize("Value: ")}}</span>
<input type="number" min="0" max="4294967295" v-model="value">
</div>
<div class="content-real-showval" v-if="getType == SHOW_VAL">
<span>{{data.message}}</span>
<input type="number" min="0" max="4294967295" v-model="data.value" disabled="disabled">
</div>
<div v-if="getType != REAL" >
<div class="content-btn" v-for="(t,k) in data.buttons" :key="'m155_'+k" @click="check(k)">
<input type="radio" name="radio-group" :checked="ischecked(k)" >
<label for="datefixed">{{t}}</label>
</div>
</div>
</div>
<footer>
<div class="pull-left">
<button class="btn" @click="hide()">{{'modal_m155_hide_window' | localize("Hide")}}</button>
</div>
<div class="pull-right">
<button class="btn btn-success" @click="answer()" :disabled="!canSendAnswer()">{{'confirm_request_confirm' | localize("Confirm")}}</button>
</div>
</footer>
</modal>
</template>
<script src="./m155-dialog.ts" lang="ts"></script>
@@ -1,36 +1,49 @@
<template>
<div class="user-info">
<!--
<div class="user-info">
<!--
<button class="dark-blue" @click="sendMessage('show-help')" :title="'header_tooltip_btn_help' | localize('Show Machine Help')">
<i class="fa fa-question"></i>
</button>
-->
<button class="dark-blue" v-if="false"
@click="sendMessage('show-cmsconnect-info')">
<span>C</span>
</button>
<button class="dark-blue"
@click="sendMessage('show-contact-info')">
<i class="fa fa-phone"></i>
</button>
<button class="dark-blue"
@click="sendMessage('show-machine-info')" :title="'header_tooltip_btn_mchinfo' | localize('Show Machine Info')">
<img src="assets/icons/png/machine-info.png" width="28px">
<div class="machine-info" v-if="state.isMainViewLiftedUp">
<small>{{state.machineInfo.machineName}}</small>
<small>{{state.machineInfo.machineSerialNumber}}</small>
</div>
</button>
<button class="profile dark-blue" v-if="currentUser" @click="sendMessage('show-user-info')" :title="'header_tooltip_btn_usrinfo' | localize('Show User Info')" :class="{'colorWhite':isDarkColor(getColor(currentUser.lastName,currentUser.firstName))}" :style="{'background-color':getColor(currentUser.lastName,currentUser.firstName) }">
<i class="fa fa-user"></i>
</button>
<button class="profile dark-blue colorWhite" v-else @click="sendMessage('show-user-info')" :title="'header_tooltip_btn_usrinfo' | localize('Show User Info')">
<i class="fa fa-user"></i>
</button>
<time :title="date" >
<i class="fa fa-clock-o"></i>
<span>{{hours}}:{{minutes}}</span>
</time>
</div>
-->
<button class="dark-blue" v-if="false" @click="sendMessage('show-cmsconnect-info')">
<span>C</span>
</button>
<button class="dark-blue" @click="sendMessage('show-contact-info')">
<i class="fa fa-phone"></i>
</button>
<button
class="dark-blue"
@click="sendMessage('show-machine-info')"
:title="'header_tooltip_btn_mchinfo' | localize('Show Machine Info')"
>
<img src="assets/icons/png/machine-info.png" width="28px" />
<div class="machine-info" v-if="state.isMainViewLiftedUp">
<small>{{state.machineInfo.machineName}}</small>
<small>{{state.machineInfo.machineSerialNumber}}</small>
</div>
</button>
<button
class="profile dark-blue"
v-if="currentUser"
@click="sendMessage('show-user-info')"
:title="'header_tooltip_btn_usrinfo' | localize('Show User Info')"
:class="{'colorWhite':isDarkColor(getColor(currentUser.lastName,currentUser.firstName))}"
:style="{'background-color':getColor(currentUser.lastName,currentUser.firstName) }"
>
<i class="fa fa-user"></i>
</button>
<button
class="profile dark-blue colorWhite"
v-else
@click="sendMessage('show-user-info')"
:title="'header_tooltip_btn_usrinfo' | localize('Show User Info')"
>
<i class="fa fa-user"></i>
</button>
<time :title="date">
<i class="fa fa-clock-o"></i>
<span>{{hours}}:{{minutes}}</span>
</time>
</div>
</template>
<script src="./user-info.ts" lang="ts"></script>
@@ -9,8 +9,6 @@ import CmsconnectInfoDialog from "./components/cmsconnect-info-dialog.vue";
export {
Login,
AxesCalibration,
M155Questions,
MachineInfoDialog,
ContactInfoDialog,
UserInfoDialog,
@@ -1,148 +0,0 @@
import { Hub } from "@/services/hub";
import { DoughnutChartAnimated } from "@/components/doughnut-chart";
import Vue from "vue";
import Component from "vue-class-component";
import { Prop } from "vue-property-decorator";
declare let $: any;
@Component({
components:{
DoughnutChartAnimated
}
})
export default class CardAxesProduction extends Vue{
@Prop({ default:true })
followAxesNumber: boolean;
enableInterp: boolean = true;
enableOm: boolean = false;
enableGoto: boolean = false;
enableProg: boolean = false;
get nameAxes() {
return this.$store.state.process.axes;
}
get CNCumeas() {
return this.$store.state.process.unitMeasure;
}
get numAxes() {
if (!this.followAxesNumber) return null;
var n = this.$store.state.process.axes.length;
if (n == 7) return "_7";
else if (n == 8) return "_8";
else if (n == 9) return "_9";
else if (n > 9) return "_9 more9";
return null;
}
get axesInterpoleted() {
return this.$store.state.process.valueAxisSelected.interpolated;
}
get axesMachine() {
return this.$store.state.process.valueAxisSelected.machine;
}
get axesProgrammePos() {
return this.$store.state.process.valueAxisSelected.programmePos;
}
get axesToGo() {
return this.$store.state.process.valueAxisSelected.toGo;
}
get getRapidOverride() {
return this.$store.state.process.rapidOverride;
}
get getWorkOverride() {
return this.$store.state.process.workOverride;
}
selectTab(tab) {
if(tab == "INTER") {
this.enableInterp = true;
this.enableOm = false;
this.enableGoto = false;
this.enableProg = false;
}
else if (tab == "OM") {
this.enableOm = true;
this.enableGoto = false;
this.enableProg = false;
this.enableInterp = false;
} else if (tab == "GOTO") {
this.enableGoto = true;
this.enableOm = false;
this.enableProg = false;
this.enableInterp = false;
} else if (tab == "ERR") {
this.enableProg = true;
this.enableOm = false;
this.enableGoto = false;
this.enableInterp = false;
} else {
this.enableOm = true;
this.enableGoto = false;
this.enableProg = false;
this.enableInterp = false;
}
}
axes(name, value) {
var nameAxes;
var valueAxes;
var newAxis = [];
nameAxes = name;
valueAxes = value;
var keys = Object.keys(valueAxes);
nameAxes.forEach(element => {
for (var key in valueAxes) {
if (element.id == key) {
var axesElement = {
name: element.name,
umeas: this.uMeasure(element.type),
value: valueAxes[key]
};
newAxis.push(axesElement);
}
}
});
return newAxis;
}
uMeasure(type) {
if(type==="ROTATING")
return "°";
else{
if(type==="LINEAR" && this.CNCumeas){
if(this.CNCumeas === "mm")
return "mm"
if(this.CNCumeas === "inches")
return "In"
return "--"
}
else
return "--";
}
}
GetRoundNumber(){
if(this.CNCumeas === "inches"){
return 4;
}
else {
return 3;
}
}
};
@@ -1,98 +0,0 @@
<template>
<!-- <div class="test-container"> -->
<div class="card-axes-production">
<!-- OVERRIDE DOUGHNUT CHART -->
<div class="override-box">
<doughnut-chart-animated
height="205px"
width="232px"
:value="getRapidOverride"
:secondValue="getWorkOverride"
:secondValueIsActive="true"
:firstText="'card_production_rapid' | localize('Rapid:')"
:secondText="'card_production_work' | localize('Work:')"
:angle-size="270"
:interval="5">
</doughnut-chart-animated>
<div class="label-container">
<div>
<span class="title rapid">RAPID:</span><br>
<span class="value rapid">{{getRapidOverride}}</span>
</div>
<div>
<span class="title work">WORK:</span><br>
<span class="value work">{{getWorkOverride}}</span>
</div>
</div>
</div>
<div class="first-box-axes">
<!--<div class="axes" v-for="a in axes(nameAxes,axesInterpoleted)" :key="a.id" :class="numAxes">
<div class="variable" :class="numAxes">
{{a.name}}
</div>
<div class="number" :class="numAxes">
<span>{{a.value.toFixed(3)}}</span>
<span class="umeasure">{{a.umeas}}</span>
</div>
</div>
AXES TAB -->
<div class="tabs">
<button class="tab" :class="{'active': enableInterp}" @click="selectTab('INTER')">{{'card_axes_production_axes_tab_interp' | localize("INTERP")}}</button>
<button class="tab" :class="{'active': enableOm}" @click="selectTab('OM')">{{'card_axes_production_axes_tab_om' | localize("OM")}}</button>
<button class="tab" :class="{'active': enableGoto}" @click="selectTab('GOTO')">{{'card_axes_production_axes_tab_goto' | localize("GOTO")}}</button>
<button class="tab" :class="{'active': enableProg}" @click="selectTab('ERR')">{{'card_axes_production_axes_tab_prog' | localize("PROG")}}</button>
</div>
<div class="content-box scrollable" v-if="enableInterp">
<div class="axes" v-for="a in axes(nameAxes, axesInterpoleted)" :key="a.id" :class="numAxes">
<div class="variable" :class="numAxes">
{{a.name}}
</div>
<div class="number" :class="numAxes">
{{a.value.toFixed(GetRoundNumber())}}
<!--<span class="umeasure">{{a.umeas}}</span>-->
</div>
</div>
</div>
<div class="content-box scrollable" v-if="enableOm">
<div class="axes" v-for="a in axes(nameAxes, axesMachine)" :key="a.id" :class="numAxes">
<div class="variable" :class="numAxes">
{{a.name}}
</div>
<div class="number" :class="numAxes">
{{a.value.toFixed(GetRoundNumber())}}
<!--<span class="umeasure">{{a.umeas}}</span>-->
</div>
</div>
</div>
<div class="content-box scrollable" v-if="enableGoto">
<div class="axes" v-for="a in axes(nameAxes, axesToGo)" :key="a.id" :class="numAxes">
<div class="variable" :class="numAxes">
{{a.name}}
</div>
<div class="number" :class="numAxes">
{{a.value.toFixed(GetRoundNumber())}}
<!--<span class="umeasure">{{a.umeas}}</span>-->
</div>
</div>
</div>
<div class="content-box scrollable" v-if="enableProg">
<div class="axes" v-for="a in axes(nameAxes, axesProgrammePos)" :key="a.id" :class="numAxes">
<div class="variable" :class="numAxes">
{{a.name}}
</div>
<div class="number" :class="numAxes">
{{a.value.toFixed(GetRoundNumber())}}
<!--<span class="umeasure">{{a.umeas}}</span>-->
</div>
</div>
</div>
</div>
</div>
<!-- </div> -->
</template>
<script src="./card-axes-production.ts" lang="ts" />
@@ -1,41 +0,0 @@
import Vue from "vue";
import Popup from "@/modules/base-components/popup.vue";
import { FileService } from 'src/services/fileService';
import Component from "vue-class-component";
import { Prop } from "vue-property-decorator";
@Component({ components: { popup: Popup } })
export default class CardElementQueue extends Vue {
@Prop({ default: "Part program 01" })
name;
@Prop({ default: 2 })
number;
@Prop({ default: 0 })
remainingReps;
@Prop({ default: 0 })
status;
@Prop({ default: 0 })
selectedProcess;
enablePopup: boolean = false;
onClick() {
this.$emit("click");
}
clickReps() {
this.$emit("position", this.$el, true);
}
// close(){
// this.enablePopup = false;
// }
}
@@ -1,22 +0,0 @@
<template>
<!-- <div class="test-container"> -->
<div class="card-element-queue" :class="{'border-blue': status != 1 && status != 2 && status != 3, 'border-green': status == 1, 'border-orange' : status == 2, 'finished' : status == 3}">
<div class="card-element-queue-name">
<label>{{name}}</label>
</div>
<div class="card-element-queue-right" v-if="status == 1 || status == 3">
<div class="square-number">
<label v-if="status == 1">{{remainingReps}}/{{number}}</label>
<label v-if="status == 3"><i class="fa fa-check" aria-hidden="true"></i></label>
</div>
</div>
<div class="card-element-queue-right" v-if="status != 1 && status != 3">
<div @click="clickReps()" class="square-number">
<label>x{{number}}</label>
</div>
<button class="btn" @click="onClick()"><img src="assets/icons/_png/trash.png"></button>
</div>
</div>
<!-- </div> -->
</template>
<script src="./card-element-queue.ts" lang="ts"></script>
@@ -1,157 +0,0 @@
import Vue from "vue";
import cardProductionSectionFile from "./card-production-section-file.vue";
import moment from "moment";
import { fileService, FileService } from "@/services/fileService";
import Component from "vue-class-component";
import { Prop, Watch } from "vue-property-decorator";
import { ModalHelper,Modal } from "@/components/modals";
import { ModalImage } from "@/modules/base-components/index";
const maxIsolines: number = 8;
@Component({
components: {
cardProductionSectionFile
}
})
export default class CardJobProduction extends Vue {
@Prop({ default: true })
noQueue: boolean;
enableIsoLines: boolean = true;
enableFileSections: boolean = false;
rowSelected: string = "";
startStopQueue: boolean = false;
// from a mixin
isOsai: () => boolean;
mounted() {
if (this.queueStatus == 0) {
this.startStopQueue = true;
}
else {
this.startStopQueue = false;
}
}
@Watch("queueStatus")
queueStatusChanged(n, o) {
if (n) {
if (n == 0) {
this.startStopQueue = true;
}
else {
this.startStopQueue = false;
}
}
}
get selectedProcess() {
return this.$store.state.process.selectedProcess;
}
get activeOrigin() {
return this.$store.state.process.activeOrigin;
}
get getFeedOverride() {
return this.$store.state.process.feedOverride;
}
get activeOffsetId() {
return this.$store.state.process.activeOffsetId;
}
get activeProcessMessage() {
return this.$store.state.process.processMessage;
}
get canLoadProgram() {
return this.$store.state.process.canLoadProgram;
}
get activeOffsetData() {
return this.$store.state.process.offsetData;
}
get currentProgram() {
return this.$store.state.process.currentProgram;
}
get indexofActiveLine() {
if (this.isOsai())
return 1;
else
return 0;
}
get currentProgramImage() {
return this.$store.state.process.currentProgramImage;
}
get currentProgramName() {
return this.$store.state.process.currentProgramName;
}
get timeleft() {
if (this.currentProgram)
return moment(this.currentProgram.timeLeft).format("HH : mm : SS");
return "00 : 00 : 00";
}
get queueStatus() {
return this.$store.state.process.queueStatus;
}
get startStopQueueEnabled() {
return this.$store.state.process.startStopQueueEnabled;
}
get isolines() {
if(this.currentProgram.isoLines.length > maxIsolines)
return this.currentProgram.isoLines.slice(0,maxIsolines-1);
return this.currentProgram.isoLines;
}
get remainingIsoLines() {
let lines = maxIsolines - this.currentProgram.isoLines.length;
if (lines < 0 )
lines = 0;
return lines
}
selectTab(tab) {
if (tab == "IsoLines") {
this.enableIsoLines = true;
this.enableFileSections = false;
} else if (tab == "FileSections") {
this.enableIsoLines = false;
this.enableFileSections = true;
} else {
this.enableIsoLines = true;
this.enableFileSections = false;
}
}
selectRow(row) {
this.rowSelected = row;
}
zoomImage() {
ModalHelper.modalImage.content = this.currentProgramImage;
ModalHelper.modalImage.title = this.currentProgramName;
ModalHelper.ShowModal(ModalImage);
}
async deactivateProgram() {
await fileService.deactivateProgram();
}
async startQueue() {
await new FileService().startQueue(this.selectedProcess);
if (this.queueStatus == 0) {
this.startStopQueue = false;
}
else {
this.startStopQueue = true;
}
}
async stopQueue() {
await new FileService().stopQueue(this.selectedProcess);
if (this.queueStatus == 0) {
this.startStopQueue = true;
}
else {
this.startStopQueue = false;
}
}
}
@@ -1,88 +0,0 @@
<template>
<!-- <div class="test-container"> -->
<div class="card-job-production" :class="{'width-100':noQueue}">
<div class="card-job-production-header">
<div class="title">
<label v-if="currentProgram">{{currentProgramName}}</label>
</div>
<div class="box-right">
<button class="btn" v-if="noQueue" @click="deactivateProgram()" :disabled="!canLoadProgram"><i class="fa fa-times" aria-hidden="true"></i></button>
<button class="btn" v-if="!noQueue" @click="stopQueue()" :disabled="!startStopQueueEnabled"><i class="fa fa-stop" aria-hidden="true"></i></button>
<div class="rectangle" v-if="false">
<label>- {{timeleft}}</label>
</div>
</div>
</div>
<div class="card-job-production-body">
<div class="card-job-production-body-top">
<div class="img-container">
<div v-if="currentProgramImage" class="container" @click="zoomImage()">
<img :src="currentProgramImage" >
<div class="eye"><i class="fa fa-eye" aria-hidden="true"></i></div>
</div>
<div v-if="!currentProgramImage" class="noimage">
{{'modal_load_program_lbl_img_not_found' | localize('Preview non disponibile')}}
</div>
</div>
<div class="info-container">
<div class="var">
<div class="variable">{{'card_job_production_feed_override' | localize('Feed override:')}}</div>
<div class="elm number">{{getFeedOverride}}<span class="umeasure">&nbsp;</span></div>
</div>
<div class="var">
<div class="variable">{{'card_job_production_origin' | localize('Origine attiva:')}}</div>
<div class="elm number">{{activeOrigin}}<span class="umeasure">&nbsp;</span></div>
</div>
<!-- Offset data -->
<div class="var">
<div class="variable">{{'card_job_production_offset' | localize('Id correttore attivo:')}}</div>
<div class="elm number">{{activeOffsetId}}<span class="umeasure">&nbsp;</span></div>
</div>
<div class="var">
<div class="variable">{{'card_job_production_offset_length' | localize('Lunghezza reale:')}}</div>
<div class="elm number">{{activeOffsetData.realLength}}<span class="umeasure">{{activeOffsetData.unitOfMeasure}}</span></div>
</div>
<div class="var" >
<div class="variable">{{'card_job_production_offset_radius' | localize('Raggio reale:')}}</div>
<div class="elm number">{{activeOffsetData.realRadius}}<span class="umeasure">{{activeOffsetData.unitOfMeasure}}</span></div>
</div>
<div class="var" v-if="activeProcessMessage">
<div class="variable">{{'card_job_production_message' | localize('Messaggio:')}}</div>
<div class="elm message">{{activeProcessMessage}}</div>
</div>
</div>
</div>
<div class="card-job-production-body-bottom" :class="{'width-body-bottom':noQueue}">
<div class="tabs">
<button class="tab" :class="{'active': enableIsoLines}" @click="selectTab('IsoLines')">{{'card_job_production_iso_lines' | localize('Linee ISO')}}</button>
<button class="tab" :class="{'active': enableFileSections}" @click="selectTab('FileSections')" v-if="false">{{'card_job_production_section_file' | localize('Sezioni file')}}</button>
</div>
<div class="content-box" v-if="enableIsoLines && currentProgram">
<div class="row" :class="{'selected': idx==indexofActiveLine,'width-100':noQueue}" v-for="(l, idx) in isolines" :key="idx" >
<div class="triangle"></div><label>{{l}}</label>
</div>
<div class="row" :class="{'width-100':noQueue}" v-for="(l, idx) in remainingIsoLines" :key="'emptyisolines_'+idx" >
<div class="triangle"></div><label>&nbsp;</label>
</div>
</div>
<div class="content-box scrollable" v-if="enableFileSections">
<card-production-section-file type="check"></card-production-section-file>
<card-production-section-file type="play"></card-production-section-file>
<card-production-section-file type="queued"></card-production-section-file>
</div>
</div>
</div>
<div class="card-job-production-box-start" v-if="!noQueue && startStopQueue">
<div>
<button class="btn btn-success" @click="startQueue()" :disabled="!startStopQueueEnabled">{{'card_job_production_btn_start_queue' | localize('Start Queue')}}</button>
</div>
</div>
</div>
<!-- </div> -->
</template>
<script src="./card-job-production.ts" lang="ts"></script>
@@ -1,90 +0,0 @@
import Vue from "vue";
import { Hub } from "@/services/hub";
import Component from "vue-class-component";
import { ModalHelper,Modal } from "@/components/modals";
import { Prop } from "vue-property-decorator";
import modalLoadProgram from "@/modules/base-components/modal-load-program.vue";
import cardJobProduction from "./card-job-production.vue";
import cardQueueProduction from "./card-queue-production.vue";
@Component({
components: {
cardQueueProduction,
cardJobProduction
}
})
export default class CardProductionCms extends Vue {
@Prop({ default: false })
queue: boolean;
// From mixin
isCnReady: () => boolean;
checkSecurityDisabled: (string) => boolean;
get currentProgram() {
return this.$store.state.process.currentProgram;
}
get loadPrgVisible() {
if (
!this.queue &&
((this.currentProgram &&
(!this.currentProgram.path || this.currentProgram.path == "")) ||
!this.currentProgram)
)
return true;
else return false;
}
get infoPrgVisible() {
if (
(this.currentProgram &&
this.currentProgram.path &&
this.currentProgram.path != "") ||
this.queue
)
return true;
else return false;
}
get canLoadProgram() {
return this.$store.state.process.canLoadProgram;
}
get siemensKeyboardOption() {
return this.$store.state.machineInfo.siemensKeyboardOption;
}
openModal() {
ModalHelper.ShowModal(modalLoadProgram);
}
ncSoftkeyClick(id) {
Hub.Current.ncSoftKeyClick(id);
}
softkeyName(id) {
let r = this.$store.getters.getNcSoftKeyInfo(id);
if (r) return r.visualizedName;
return null;
}
isSoftkeyKeySelected(id) {
let r = this.$store.getters.getNcSoftKeyStatus(id);
if (r) return r.value;
return false;
}
isSoftkeyKeyKeyActive(id) {
if (!this.isCnReady()) return false;
if (this.checkSecurityDisabled('ncSoftkeys')) return false;
let r = this.$store.getters.getNcSoftKeyStatus(id);
if (r) return r.active;
return false;
}
}
@@ -1,26 +0,0 @@
<template>
<!-- <div class="test-container"> -->
<div class="card-production-cms">
<div class="card-production-cms-queue" v-if="queue">
<card-queue-production></card-queue-production>
</div>
<div class="card-production-cms-job">
<card-job-production :no-queue="!queue" v-if="infoPrgVisible"></card-job-production>
<div v-if="loadPrgVisible" class="load-container" >
<div class="center-container">
<div class="labelLoadPrg">{{'production_label_select_prg' | localize('Seleziona un programma')}}</div>
<button class="btn btn-success" @click="openModal()" :disabled="!isCnReady() || !canLoadProgram"><i class="fa fa-plus"></i></button>
</div>
</div>
</div>
<div class="overlay-noauto" v-if="!isSoftkeyKeySelected(1)">
<div class="messsage">
<div>{{'production_label_select_auto_mode' | localize('Seleziona la modalità automatica per eseguire un programma')}}</div>
<button @click="ncSoftkeyClick(1)" v-if="!siemensKeyboardOption" :disabled="!isSoftkeyKeyKeyActive(1)" class="btn btn-success" ><img src="assets/icons/under-hood-png/automatic-blue@2x.png"> {{softkeyName(1)}}</button>
</div>
</div>
</div>
<!-- </div> -->
</template>
<script src="./card-production-cms.ts" lang="ts"></script>

Some files were not shown because too many files have changed in this diff Show More