Merge branch 'feature/removal/toolMan'
This commit is contained in:
@@ -5,11 +5,6 @@
|
||||
<allowExternalBrowser>false</allowExternalBrowser>
|
||||
<ncNeeded>true</ncNeeded>
|
||||
</production>
|
||||
<tooling>
|
||||
<enabled>true</enabled>
|
||||
<allowExternalBrowser>false</allowExternalBrowser>
|
||||
<ncNeeded>true</ncNeeded>
|
||||
</tooling>
|
||||
<report>
|
||||
<enabled>false</enabled>
|
||||
<allowExternalBrowser>true</allowExternalBrowser>
|
||||
|
||||
@@ -13,16 +13,6 @@
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
<xs:element name="tooling">
|
||||
<xs:complexType>
|
||||
<xs:all>
|
||||
<xs:element name="enabled" type="xs:boolean" />
|
||||
<xs:element name="allowExternalBrowser" />
|
||||
<xs:element name="ncNeeded" type="xs:boolean" />
|
||||
</xs:all>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
<xs:element name="report">
|
||||
<xs:complexType>
|
||||
<xs:all>
|
||||
|
||||
@@ -1,923 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<root>
|
||||
<toolManagerConfig>
|
||||
<toolMetricType>DIAMETER</toolMetricType> <!-- RADIUS/DIAMETER -->
|
||||
<familyOpt>true</familyOpt>
|
||||
<shankOpt>true</shankOpt>
|
||||
<magPositionOpt>true</magPositionOpt>
|
||||
<offsetOpt>true</offsetOpt>
|
||||
<reviveOpt>true</reviveOpt>
|
||||
<gammaOpt>true</gammaOpt>
|
||||
<lifeOpt>true</lifeOpt>
|
||||
<tcpOpt>true</tcpOpt>
|
||||
<coolingOpt>true</coolingOpt>
|
||||
<multidimensionalShankOpt>true</multidimensionalShankOpt>
|
||||
<selfAdaptivePathOpt>true</selfAdaptivePathOpt>
|
||||
<dynamicCompensationOpt>true</dynamicCompensationOpt>
|
||||
<ballufOpt>true</ballufOpt>
|
||||
<integrityCheckOpt>true</integrityCheckOpt>
|
||||
</toolManagerConfig>
|
||||
<coolingLocalizedNames>
|
||||
<cooling>
|
||||
<lang langKey="en">Cooling</lang>
|
||||
<lang langKey="it">Raffreddamento</lang>
|
||||
</cooling>
|
||||
<cooling1>
|
||||
<lang langKey="en">Cooling 1</lang>
|
||||
<lang langKey="it">Raffreddamento 1</lang>
|
||||
</cooling1>
|
||||
<cooling2>
|
||||
<lang langKey="en">Cooling 2</lang>
|
||||
<lang langKey="it">Raffreddamento 2</lang>
|
||||
</cooling2>
|
||||
<cooling3>
|
||||
<lang langKey="en">Cooling 3</lang>
|
||||
<lang langKey="it">Raffreddamento 3</lang>
|
||||
</cooling3>
|
||||
<cooling4>
|
||||
<lang langKey="en">Cooling 4</lang>
|
||||
<lang langKey="it">Raffreddamento 4</lang>
|
||||
</cooling4>
|
||||
<cooling5>
|
||||
<lang langKey="en">Cooling 5</lang>
|
||||
<lang langKey="it">Raffreddamento 5</lang>
|
||||
</cooling5>
|
||||
<cooling6>
|
||||
<lang langKey="en">Cooling 6</lang>
|
||||
<lang langKey="it">Raffreddamento 6</lang>
|
||||
</cooling6>
|
||||
<cooling7>
|
||||
<lang langKey="en">Cooling 7</lang>
|
||||
<lang langKey="it">Raffreddamento 7</lang>
|
||||
</cooling7>
|
||||
</coolingLocalizedNames>
|
||||
<magazineNames>
|
||||
<magazine>
|
||||
<id>1</id>
|
||||
<assistedTooling>true</assistedTooling>
|
||||
<localizedNames>
|
||||
<lang langKey="en">Magazine 1</lang>
|
||||
<lang langKey="it">Magazzino 1</lang>
|
||||
</localizedNames>
|
||||
</magazine>
|
||||
<magazine>
|
||||
<id>2</id>
|
||||
<assistedTooling>false</assistedTooling>
|
||||
<localizedNames>
|
||||
<lang langKey="en">Magazine 2</lang>
|
||||
<lang langKey="it">Magazzino 2</lang>
|
||||
</localizedNames>
|
||||
</magazine>
|
||||
<magazine>
|
||||
<id>3</id>
|
||||
<assistedTooling>false</assistedTooling>
|
||||
<localizedNames>
|
||||
<lang langKey="en">Magazine 3</lang>
|
||||
<lang langKey="it">Magazzino 3</lang>
|
||||
</localizedNames>
|
||||
</magazine>
|
||||
</magazineNames>
|
||||
|
||||
<toolTypes>
|
||||
<toolType>
|
||||
<id>0</id>
|
||||
<disabled>false</disabled>
|
||||
<localizedNames>
|
||||
<lang langKey="en">Generic</lang>
|
||||
<lang langKey="it">Generico</lang>
|
||||
<lang langKey="fr">Générique</lang>
|
||||
<lang langKey="de">Allgemein</lang>
|
||||
<lang langKey="hr">Opće</lang>
|
||||
<lang langKey="ro">Generic</lang>
|
||||
<lang langKey="nl">Algemeen</lang>
|
||||
<lang langKey="el">Γενικό</lang>
|
||||
<lang langKey="ru">Общий</lang>
|
||||
<lang langKey="pl">Ogólny</lang>
|
||||
<lang langKey="sv">Generisk</lang>
|
||||
<lang langKey="da">Generel</lang>
|
||||
<lang langKey="pt">Genérico</lang>
|
||||
<lang langKey="es">Genérico</lang>
|
||||
</localizedNames>
|
||||
</toolType>
|
||||
|
||||
<toolType>
|
||||
<id>10</id>
|
||||
<disabled>false</disabled>
|
||||
<localizedNames>
|
||||
<lang langKey="en">Angular Transmission</lang>
|
||||
<lang langKey="it">Rinvio Angolare</lang>
|
||||
<lang langKey="fr">Transmission Angulaire</lang>
|
||||
<lang langKey="de">Scheibe</lang>
|
||||
<lang langKey="hr">Disk</lang>
|
||||
<lang langKey="ro">Transmisie unghiulară</lang>
|
||||
<lang langKey="nl">Hoekige transmissie</lang>
|
||||
<lang langKey="el">Γωνιακή μετάδοση</lang>
|
||||
<lang langKey="ru">Угловой контрпривод</lang>
|
||||
<lang langKey="pl">Przekładnia kątowa</lang>
|
||||
<lang langKey="sv">Vinkelöverföring</lang>
|
||||
<lang langKey="da">Vinkel mellemarm</lang>
|
||||
<lang langKey="pt">Transmissão Angular</lang>
|
||||
<lang langKey="es">Reenvío Angular</lang>
|
||||
</localizedNames>
|
||||
</toolType>
|
||||
|
||||
<toolType>
|
||||
<id>70</id>
|
||||
<disabled>false</disabled>
|
||||
<localizedNames>
|
||||
<lang langKey="en">Ultrasound disk amplitude 15%%</lang>
|
||||
<lang langKey="it">Disco ultrasuoni amplitude 15%%</lang>
|
||||
<lang langKey="fr">Disque à ultrasons, amplitude 15%%</lang>
|
||||
<lang langKey="de">Ultraschallscheibenamplitude 15%%</lang>
|
||||
<lang langKey="hr">Amplituda ultrazvučnog diska 15%%</lang>
|
||||
<lang langKey="ro">Disc de ultrasunete, amplitudine 15%%</lang>
|
||||
<lang langKey="nl">Ultrasoon schijf amplitude 15%%</lang>
|
||||
<lang langKey="el">Δίσκος υπερήχων πλάτους 15%%</lang>
|
||||
<lang langKey="ru">Ультразвуковой диск амплитуда 15%%</lang>
|
||||
<lang langKey="pl">Tarcza ultradźwiękowa amplituda 15%%</lang>
|
||||
<lang langKey="sv">Amplitud ultraljudsskiva 15%%</lang>
|
||||
<lang langKey="da">Ultralydsskive amplitude 15%%</lang>
|
||||
<lang langKey="pt">Disco ultrassom amplitude 15%%</lang>
|
||||
<lang langKey="es">Disco ultrasonidos amplitud 15%%</lang>
|
||||
</localizedNames>
|
||||
</toolType>
|
||||
|
||||
<toolType>
|
||||
<id>71</id>
|
||||
<disabled>false</disabled>
|
||||
<localizedNames>
|
||||
<lang langKey="en">Ultrasound disk amplitude 20%%</lang>
|
||||
<lang langKey="it">Disco ultrasuoni amplitude 20%%</lang>
|
||||
<lang langKey="fr">Disque à ultrasons, amplitude 20%%</lang>
|
||||
<lang langKey="de">Ultraschallscheibenamplitude 20%%</lang>
|
||||
<lang langKey="hr">Amplituda ultrazvučnog diska 20%%</lang>
|
||||
<lang langKey="ro">Disc de ultrasunete, amplitudine 20%%</lang>
|
||||
<lang langKey="nl">Ultrasoon schijf amplitude 20%%</lang>
|
||||
<lang langKey="el">Δίσκος υπερήχων πλάτους 20%%</lang>
|
||||
<lang langKey="ru">Ультразвуковой диск амплитуда 20%%</lang>
|
||||
<lang langKey="pl">Tarcza ultradźwiękowa amplituda 20%%</lang>
|
||||
<lang langKey="sv">Amplitud ultraljudsskiva 20%%</lang>
|
||||
<lang langKey="da">Ultralydsskive amplitude 20%%</lang>
|
||||
<lang langKey="pt">Disco ultrassom amplitude 20%%</lang>
|
||||
<lang langKey="es">Disco ultrasonidos amplitud 20%%</lang>
|
||||
</localizedNames>
|
||||
</toolType>
|
||||
|
||||
<toolType>
|
||||
<id>72</id>
|
||||
<disabled>false</disabled>
|
||||
<localizedNames>
|
||||
<lang langKey="en">Ultrasound disk amplitude 30%%</lang>
|
||||
<lang langKey="it">Disco ultrasuoni amplitude 30%%</lang>
|
||||
<lang langKey="fr">Disque à ultrasons, amplitude 30%%</lang>
|
||||
<lang langKey="de">Ultraschallscheibenamplitude 30%%</lang>
|
||||
<lang langKey="hr">Amplituda ultrazvučnog diska 30%%</lang>
|
||||
<lang langKey="ro">Disc de ultrasunete, amplitudine 30%%</lang>
|
||||
<lang langKey="nl">Ultrasoon schijf amplitude 30%%</lang>
|
||||
<lang langKey="el">Δίσκος υπερήχων πλάτους 30%%</lang>
|
||||
<lang langKey="ru">Ультразвуковой диск амплитуда 30%%</lang>
|
||||
<lang langKey="pl">Tarcza ultradźwiękowa amplituda 30%%</lang>
|
||||
<lang langKey="sv">Amplitud ultraljudsskiva 30%%</lang>
|
||||
<lang langKey="da">Ultralydsskive amplitude 30%%</lang>
|
||||
<lang langKey="pt">Disco ultrassom amplitude 30%%</lang>
|
||||
<lang langKey="es">Disco ultrasonidos amplitud 30%%</lang>
|
||||
</localizedNames>
|
||||
</toolType>
|
||||
|
||||
<toolType>
|
||||
<id>73</id>
|
||||
<disabled>false</disabled>
|
||||
<localizedNames>
|
||||
<lang langKey="en">Ultrasound disk amplitude 40%%</lang>
|
||||
<lang langKey="it">Disco ultrasuoni amplitude 40%%</lang>
|
||||
<lang langKey="fr">Disque à ultrasons, amplitude 40%%</lang>
|
||||
<lang langKey="de">Ultraschallscheibenamplitude 40%%</lang>
|
||||
<lang langKey="hr">Amplituda ultrazvučnog diska 40%%</lang>
|
||||
<lang langKey="ro">Disc de ultrasunete, amplitudine 40%%</lang>
|
||||
<lang langKey="nl">Ultrasoon schijf amplitude 40%%</lang>
|
||||
<lang langKey="el">Δίσκος υπερήχων πλάτους 40%%</lang>
|
||||
<lang langKey="ru">Ультразвуковой диск амплитуда 40%%</lang>
|
||||
<lang langKey="pl">Tarcza ultradźwiękowa amplituda 40%%</lang>
|
||||
<lang langKey="sv">Amplitud ultraljudsskiva 40%%</lang>
|
||||
<lang langKey="da">Ultralydsskive amplitude 40%%</lang>
|
||||
<lang langKey="pt">Disco ultrassom amplitude 40%%</lang>
|
||||
<lang langKey="es">Disco ultrasonidos amplitud 40%%</lang>
|
||||
</localizedNames>
|
||||
</toolType>
|
||||
|
||||
<toolType>
|
||||
<id>74</id>
|
||||
<disabled>false</disabled>
|
||||
<localizedNames>
|
||||
<lang langKey="en">Ultrasound disk amplitude 50%%</lang>
|
||||
<lang langKey="it">Disco ultrasuoni amplitude 50%%</lang>
|
||||
<lang langKey="fr">Disque à ultrasons, amplitude 50%%</lang>
|
||||
<lang langKey="de">Ultraschallscheibenamplitude 50%%</lang>
|
||||
<lang langKey="hr">Amplituda ultrazvučnog diska 50%%</lang>
|
||||
<lang langKey="ro">Disc de ultrasunete, amplitudine 50%%</lang>
|
||||
<lang langKey="nl">Ultrasoon schijf amplitude 50%%</lang>
|
||||
<lang langKey="el">Δίσκος υπερήχων πλάτους 50%%</lang>
|
||||
<lang langKey="ru">Ультразвуковой диск амплитуда 50%%</lang>
|
||||
<lang langKey="pl">Tarcza ultradźwiękowa amplituda 50%%</lang>
|
||||
<lang langKey="sv">Amplitud ultraljudsskiva 50%%</lang>
|
||||
<lang langKey="da">Ultralydsskive amplitude 50%%</lang>
|
||||
<lang langKey="pt">Disco ultrassom amplitude 50%%</lang>
|
||||
<lang langKey="es">Disco ultrasonidos amplitud 50%%</lang>
|
||||
</localizedNames>
|
||||
</toolType>
|
||||
|
||||
<toolType>
|
||||
<id>75</id>
|
||||
<disabled>false</disabled>
|
||||
<localizedNames>
|
||||
<lang langKey="en">Ultrasound disk amplitude 60%%</lang>
|
||||
<lang langKey="it">Disco ultrasuoni amplitude 60%%</lang>
|
||||
<lang langKey="fr">Disque à ultrasons, amplitude 60%%</lang>
|
||||
<lang langKey="de">Ultraschallscheibenamplitude 60%%</lang>
|
||||
<lang langKey="hr">Amplituda ultrazvučnog diska 60%%</lang>
|
||||
<lang langKey="ro">Disc de ultrasunete, amplitudine 60%%</lang>
|
||||
<lang langKey="nl">Ultrasoon schijf amplitude 60%%</lang>
|
||||
<lang langKey="el">Δίσκος υπερήχων πλάτους 60%%</lang>
|
||||
<lang langKey="ru">Ультразвуковой диск амплитуда 60%%</lang>
|
||||
<lang langKey="pl">Tarcza ultradźwiękowa amplituda 60%%</lang>
|
||||
<lang langKey="sv">Amplitud ultraljudsskiva 60%%</lang>
|
||||
<lang langKey="da">Ultralydsskive amplitude 60%%</lang>
|
||||
<lang langKey="pt">Disco ultrassom amplitude 60%%</lang>
|
||||
<lang langKey="es">Disco ultrasonidos amplitud 60%%</lang>
|
||||
</localizedNames>
|
||||
</toolType>
|
||||
|
||||
<toolType>
|
||||
<id>76</id>
|
||||
<disabled>false</disabled>
|
||||
<localizedNames>
|
||||
<lang langKey="en">Ultrasound disk amplitude 70%%</lang>
|
||||
<lang langKey="it">Disco ultrasuoni amplitude 70%%</lang>
|
||||
<lang langKey="fr">Disque à ultrasons, amplitude 70%%</lang>
|
||||
<lang langKey="de">Ultraschallscheibenamplitude 70%%</lang>
|
||||
<lang langKey="hr">Amplituda ultrazvučnog diska 70%%</lang>
|
||||
<lang langKey="ro">Disc de ultrasunete, amplitudine 70%%</lang>
|
||||
<lang langKey="nl">Ultrasoon schijf amplitude 70%%</lang>
|
||||
<lang langKey="el">Δίσκος υπερήχων πλάτους 70%%</lang>
|
||||
<lang langKey="ru">Ультразвуковой диск амплитуда 70%%</lang>
|
||||
<lang langKey="pl">Tarcza ultradźwiękowa amplituda 70%%</lang>
|
||||
<lang langKey="sv">Amplitud ultraljudsskiva 70%%</lang>
|
||||
<lang langKey="da">Ultralydsskive amplitude 70%%</lang>
|
||||
<lang langKey="pt">Disco ultrassom amplitude 70%%</lang>
|
||||
<lang langKey="es">Disco ultrasonidos amplitud 70%%</lang>
|
||||
</localizedNames>
|
||||
</toolType>
|
||||
|
||||
<toolType>
|
||||
<id>77</id>
|
||||
<disabled>false</disabled>
|
||||
<localizedNames>
|
||||
<lang langKey="en">Ultrasound disk amplitude 80%%</lang>
|
||||
<lang langKey="it">Disco ultrasuoni amplitude 80%%</lang>
|
||||
<lang langKey="fr">Disque à ultrasons, amplitude 80%%</lang>
|
||||
<lang langKey="de">Ultraschallscheibenamplitude 80%%</lang>
|
||||
<lang langKey="hr">Amplituda ultrazvučnog diska 80%%</lang>
|
||||
<lang langKey="ro">Disc de ultrasunete, amplitudine 80%%</lang>
|
||||
<lang langKey="nl">Ultrasoon schijf amplitude 80%%</lang>
|
||||
<lang langKey="el">Δίσκος υπερήχων πλάτους 80%%</lang>
|
||||
<lang langKey="ru">Ультразвуковой диск амплитуда 80%%</lang>
|
||||
<lang langKey="pl">Tarcza ultradźwiękowa amplituda 80%%</lang>
|
||||
<lang langKey="sv">Amplitud ultraljudsskiva 80%%</lang>
|
||||
<lang langKey="da">Ultralydsskive amplitude 80%%</lang>
|
||||
<lang langKey="pt">Disco ultrassom amplitude 80%%</lang>
|
||||
<lang langKey="es">Disco ultrasonidos amplitud 80%%</lang>
|
||||
</localizedNames>
|
||||
</toolType>
|
||||
|
||||
<toolType>
|
||||
<id>78</id>
|
||||
<disabled>false</disabled>
|
||||
<localizedNames>
|
||||
<lang langKey="en">Ultrasound disk amplitude 90%%</lang>
|
||||
<lang langKey="it">Disco ultrasuoni amplitude 90%%</lang>
|
||||
<lang langKey="fr">Disque à ultrasons, amplitude 90%%</lang>
|
||||
<lang langKey="de">Ultraschallscheibenamplitude 90%%</lang>
|
||||
<lang langKey="hr">Amplituda ultrazvučnog diska 90%%</lang>
|
||||
<lang langKey="ro">Disc de ultrasunete, amplitudine 90%%</lang>
|
||||
<lang langKey="nl">Ultrasoon schijf amplitude 90%%</lang>
|
||||
<lang langKey="el">Δίσκος υπερήχων πλάτους 90%%</lang>
|
||||
<lang langKey="ru">Ультразвуковой диск амплитуда 90%%</lang>
|
||||
<lang langKey="pl">Tarcza ultradźwiękowa amplituda 90%%</lang>
|
||||
<lang langKey="sv">Amplitud ultraljudsskiva 90%%</lang>
|
||||
<lang langKey="da">Ultralydsskive amplitude 90%%</lang>
|
||||
<lang langKey="pt">Disco ultrassom amplitude 90%%</lang>
|
||||
<lang langKey="es">Disco ultrasonidos amplitud 90%%</lang>
|
||||
</localizedNames>
|
||||
</toolType>
|
||||
|
||||
<toolType>
|
||||
<id>79</id>
|
||||
<disabled>false</disabled>
|
||||
<localizedNames>
|
||||
<lang langKey="en">Ultrasound disk amplitude 100%%</lang>
|
||||
<lang langKey="it">Disco ultrasuoni amplitude 100%%</lang>
|
||||
<lang langKey="fr">Disque à ultrasons, amplitude 100%%</lang>
|
||||
<lang langKey="de">Ultraschallscheibenamplitude 100%%</lang>
|
||||
<lang langKey="hr">Amplituda ultrazvučnog diska 100%%</lang>
|
||||
<lang langKey="ro">Disc de ultrasunete, amplitudine 100%%</lang>
|
||||
<lang langKey="nl">Ultrasoon schijf amplitude 100%%</lang>
|
||||
<lang langKey="el">Δίσκος υπερήχων πλάτους 100%%</lang>
|
||||
<lang langKey="ru">Ультразвуковой диск амплитуда 100%%</lang>
|
||||
<lang langKey="pl">Tarcza ultradźwiękowa amplituda 100%%</lang>
|
||||
<lang langKey="sv">Amplitud ultraljudsskiva 100%%</lang>
|
||||
<lang langKey="da">Ultralydsskive amplitude 100%%</lang>
|
||||
<lang langKey="pt">Disco ultrassom amplitude 100%%</lang>
|
||||
<lang langKey="es">Disco ultrasonidos amplitud 100%%</lang>
|
||||
</localizedNames>
|
||||
</toolType>
|
||||
|
||||
<toolType>
|
||||
<id>80</id>
|
||||
<disabled>false</disabled>
|
||||
<localizedNames>
|
||||
<lang langKey="en">Ultrasound blade amplitude 10%%</lang>
|
||||
<lang langKey="it">Lama ultrasuoni amplitude 10%%</lang>
|
||||
<lang langKey="fr">Lame à ultrasons, amplitude 10%%</lang>
|
||||
<lang langKey="de">Ultraschallklingenamplitude 10%%</lang>
|
||||
<lang langKey="hr">Amplituda ultrazvučne oštrice 10%%</lang>
|
||||
<lang langKey="ro">Lama cu ultrasunete, amplitudine 10%%</lang>
|
||||
<lang langKey="nl">Ultrasoon mes amplitude 10%%</lang>
|
||||
<lang langKey="el">Λεπίδα υπερήχων πλάτους 10%%</lang>
|
||||
<lang langKey="ru">Ультразвуковой резец амплитуда 10%%</lang>
|
||||
<lang langKey="pl">Ostrze ultradźwiękowe amplituda 10%%</lang>
|
||||
<lang langKey="sv">Amplitud ultraljudsblad 10%%</lang>
|
||||
<lang langKey="da">Ultralydsklinge amplitude 10%%</lang>
|
||||
<lang langKey="pt">Lâmina ultrassom amplitude 10%%</lang>
|
||||
<lang langKey="es">Cuchilla ultrasonidos amplitud 10%%</lang>
|
||||
</localizedNames>
|
||||
</toolType>
|
||||
|
||||
<toolType>
|
||||
<id>81</id>
|
||||
<disabled>false</disabled>
|
||||
<localizedNames>
|
||||
<lang langKey="en">Ultrasound blade amplitude 20%%</lang>
|
||||
<lang langKey="it">Lama ultrasuoni amplitude 20%%</lang>
|
||||
<lang langKey="fr">Lame à ultrasons, amplitude 20%%</lang>
|
||||
<lang langKey="de">Ultraschallklingenamplitude 20%%</lang>
|
||||
<lang langKey="hr">Amplituda ultrazvučne oštrice 20%%</lang>
|
||||
<lang langKey="ro">Lama cu ultrasunete, amplitudine 20%%</lang>
|
||||
<lang langKey="nl">Ultrasoon mes amplitude 20%%</lang>
|
||||
<lang langKey="el">Λεπίδα υπερήχων πλάτους 20%%</lang>
|
||||
<lang langKey="ru">Ультразвуковой резец амплитуда 20%%</lang>
|
||||
<lang langKey="pl">Ostrze ultradźwiękowe amplituda 20%%</lang>
|
||||
<lang langKey="sv">Amplitud ultraljudsblad 20%%</lang>
|
||||
<lang langKey="da">Ultralydsklinge amplitude 20%%</lang>
|
||||
<lang langKey="pt">Lâmina ultrassom amplitude 20%%</lang>
|
||||
<lang langKey="es">Cuchilla ultrasonidos amplitud 20%%</lang>
|
||||
</localizedNames>
|
||||
</toolType>
|
||||
|
||||
<toolType>
|
||||
<id>82</id>
|
||||
<disabled>false</disabled>
|
||||
<localizedNames>
|
||||
<lang langKey="en">Ultrasound blade amplitude 30%%</lang>
|
||||
<lang langKey="it">Lama ultrasuoni amplitude 30%%</lang>
|
||||
<lang langKey="fr">Lame à ultrasons, amplitude 30%%</lang>
|
||||
<lang langKey="de">Ultraschallklingenamplitude 30%%</lang>
|
||||
<lang langKey="hr">Amplituda ultrazvučne oštrice 30%%</lang>
|
||||
<lang langKey="ro">Lama cu ultrasunete, amplitudine 30%%</lang>
|
||||
<lang langKey="nl">Ultrasoon mes amplitude 30%%</lang>
|
||||
<lang langKey="el">Λεπίδα υπερήχων πλάτους 30%%</lang>
|
||||
<lang langKey="ru">Ультразвуковой резец амплитуда 30%%</lang>
|
||||
<lang langKey="pl">Ostrze ultradźwiękowe amplituda 30%%</lang>
|
||||
<lang langKey="sv">Amplitud ultraljudsblad 30%%</lang>
|
||||
<lang langKey="da">Ultralydsklinge amplitude 30%%</lang>
|
||||
<lang langKey="pt">Lâmina ultrassom amplitude 30%%</lang>
|
||||
<lang langKey="es">Cuchilla ultrasonidos amplitud 30%%</lang>
|
||||
</localizedNames>
|
||||
</toolType>
|
||||
|
||||
<toolType>
|
||||
<id>83</id>
|
||||
<disabled>false</disabled>
|
||||
<localizedNames>
|
||||
<lang langKey="en">Ultrasound blade amplitude 40%%</lang>
|
||||
<lang langKey="it">Lama ultrasuoni amplitude 40%%</lang>
|
||||
<lang langKey="fr">Lame à ultrasons, amplitude 40%%</lang>
|
||||
<lang langKey="de">Ultraschallklingenamplitude 40%%</lang>
|
||||
<lang langKey="hr">Amplituda ultrazvučne oštrice 40%%</lang>
|
||||
<lang langKey="ro">Lama cu ultrasunete, amplitudine 40%%</lang>
|
||||
<lang langKey="nl">Ultrasoon mes amplitude 40%%</lang>
|
||||
<lang langKey="el">Λεπίδα υπερήχων πλάτους 40%%</lang>
|
||||
<lang langKey="ru">Ультразвуковой резец амплитуда 40%%</lang>
|
||||
<lang langKey="pl">Ostrze ultradźwiękowe amplituda 40%%</lang>
|
||||
<lang langKey="sv">Amplitud ultraljudsblad 40%%</lang>
|
||||
<lang langKey="da">Ultralydsklinge amplitude 40%%</lang>
|
||||
<lang langKey="pt">Lâmina ultrassom amplitude 40%%</lang>
|
||||
<lang langKey="es">Cuchilla ultrasonidos amplitud 40%%</lang>
|
||||
</localizedNames>
|
||||
</toolType>
|
||||
|
||||
<toolType>
|
||||
<id>84</id>
|
||||
<disabled>false</disabled>
|
||||
<localizedNames>
|
||||
<lang langKey="en">Ultrasound blade amplitude 50%%</lang>
|
||||
<lang langKey="it">Lama ultrasuoni amplitude 50%%</lang>
|
||||
<lang langKey="fr">Lame à ultrasons, amplitude 50%%</lang>
|
||||
<lang langKey="de">Ultraschallklingenamplitude 50%%</lang>
|
||||
<lang langKey="hr">Amplituda ultrazvučne oštrice 50%%</lang>
|
||||
<lang langKey="ro">Lama cu ultrasunete, amplitudine 50%%</lang>
|
||||
<lang langKey="nl">Ultrasoon mes amplitude 50%%</lang>
|
||||
<lang langKey="el">Λεπίδα υπερήχων πλάτους 50%%</lang>
|
||||
<lang langKey="ru">Ультразвуковой резец амплитуда 50%%</lang>
|
||||
<lang langKey="pl">Ostrze ultradźwiękowe amplituda 50%%</lang>
|
||||
<lang langKey="sv">Amplitud ultraljudsblad 50%%</lang>
|
||||
<lang langKey="da">Ultralydsklinge amplitude 50%%</lang>
|
||||
<lang langKey="pt">Lâmina ultrassom amplitude 50%%</lang>
|
||||
<lang langKey="es">Cuchilla ultrasonidos amplitud 50%%</lang>
|
||||
</localizedNames>
|
||||
</toolType>
|
||||
|
||||
<toolType>
|
||||
<id>85</id>
|
||||
<disabled>false</disabled>
|
||||
<localizedNames>
|
||||
<lang langKey="en">Ultrasound blade amplitude 60%%</lang>
|
||||
<lang langKey="it">Lama ultrasuoni amplitude 60%%</lang>
|
||||
<lang langKey="fr">Lame à ultrasons, amplitude 60%%</lang>
|
||||
<lang langKey="de">Ultraschallklingenamplitude 60%%</lang>
|
||||
<lang langKey="hr">Amplituda ultrazvučne oštrice 60%%</lang>
|
||||
<lang langKey="ro">Lama cu ultrasunete, amplitudine 60%%</lang>
|
||||
<lang langKey="nl">Ultrasoon mes amplitude 60%%</lang>
|
||||
<lang langKey="el">Λεπίδα υπερήχων πλάτους 60%%</lang>
|
||||
<lang langKey="ru">Ультразвуковой резец амплитуда 60%%</lang>
|
||||
<lang langKey="pl">Ostrze ultradźwiękowe amplituda 60%%</lang>
|
||||
<lang langKey="sv">Amplitud ultraljudsblad 60%%</lang>
|
||||
<lang langKey="da">Ultralydsklinge amplitude 60%%</lang>
|
||||
<lang langKey="pt">Lâmina ultrassom amplitude 60%%</lang>
|
||||
<lang langKey="es">Cuchilla ultrasonidos amplitud 60%%</lang>
|
||||
</localizedNames>
|
||||
</toolType>
|
||||
|
||||
<toolType>
|
||||
<id>86</id>
|
||||
<disabled>false</disabled>
|
||||
<localizedNames>
|
||||
<lang langKey="en">Ultrasound blade amplitude 70%%</lang>
|
||||
<lang langKey="it">Lama ultrasuoni amplitude 70%%</lang>
|
||||
<lang langKey="fr">Lame à ultrasons, amplitude 70%%</lang>
|
||||
<lang langKey="de">Ultraschallklingenamplitude 70%%</lang>
|
||||
<lang langKey="hr">Amplituda ultrazvučne oštrice 70%%</lang>
|
||||
<lang langKey="ro">Lama cu ultrasunete, amplitudine 70%%</lang>
|
||||
<lang langKey="nl">Ultrasoon mes amplitude 70%%</lang>
|
||||
<lang langKey="el">Λεπίδα υπερήχων πλάτους 70%%</lang>
|
||||
<lang langKey="ru">Ультразвуковой резец амплитуда 70%%</lang>
|
||||
<lang langKey="pl">Ostrze ultradźwiękowe amplituda 70%%</lang>
|
||||
<lang langKey="sv">Amplitud ultraljudsblad 70%%</lang>
|
||||
<lang langKey="da">Ultralydsklinge amplitude 70%%</lang>
|
||||
<lang langKey="pt">Lâmina ultrassom amplitude 70%%</lang>
|
||||
<lang langKey="es">Cuchilla ultrasonidos amplitud 70%%</lang>
|
||||
</localizedNames>
|
||||
</toolType>
|
||||
|
||||
<toolType>
|
||||
<id>87</id>
|
||||
<disabled>false</disabled>
|
||||
<localizedNames>
|
||||
<lang langKey="en">Ultrasound blade amplitude 80%%</lang>
|
||||
<lang langKey="it">Lama ultrasuoni amplitude 80%%</lang>
|
||||
<lang langKey="fr">Lame à ultrasons, amplitude 80%%</lang>
|
||||
<lang langKey="de">Ultraschallklingenamplitude 80%%</lang>
|
||||
<lang langKey="hr">Amplituda ultrazvučne oštrice 80%%</lang>
|
||||
<lang langKey="ro">Lama cu ultrasunete, amplitudine 80%%</lang>
|
||||
<lang langKey="nl">Ultrasoon mes amplitude 80%%</lang>
|
||||
<lang langKey="el">Λεπίδα υπερήχων πλάτους 80%%</lang>
|
||||
<lang langKey="ru">Ультразвуковой резец амплитуда 80%%</lang>
|
||||
<lang langKey="pl">Ostrze ultradźwiękowe amplituda 80%%</lang>
|
||||
<lang langKey="sv">Amplitud ultraljudsblad 80%%</lang>
|
||||
<lang langKey="da">Ultralydsklinge amplitude 80%%</lang>
|
||||
<lang langKey="pt">Lâmina ultrassom amplitude 80%%</lang>
|
||||
<lang langKey="es">Cuchilla ultrasonidos amplitud 80%%</lang>
|
||||
</localizedNames>
|
||||
</toolType>
|
||||
|
||||
<toolType>
|
||||
<id>88</id>
|
||||
<disabled>false</disabled>
|
||||
<localizedNames>
|
||||
<lang langKey="en">Ultrasound blade amplitude 90%%</lang>
|
||||
<lang langKey="it">Lama ultrasuoni amplitude 90%%</lang>
|
||||
<lang langKey="fr">Lame à ultrasons, amplitude 90%%</lang>
|
||||
<lang langKey="de">Ultraschallklingenamplitude 90%%</lang>
|
||||
<lang langKey="hr">Amplituda ultrazvučne oštrice 90%%</lang>
|
||||
<lang langKey="ro">Lama cu ultrasunete, amplitudine 90%%</lang>
|
||||
<lang langKey="nl">Ultrasoon mes amplitude 90%%</lang>
|
||||
<lang langKey="el">Λεπίδα υπερήχων πλάτους 90%%</lang>
|
||||
<lang langKey="ru">Ультразвуковой резец амплитуда 90%%</lang>
|
||||
<lang langKey="pl">Ostrze ultradźwiękowe amplituda 90%%</lang>
|
||||
<lang langKey="sv">Amplitud ultraljudsblad 90%%</lang>
|
||||
<lang langKey="da">Ultralydsklinge amplitude 90%%</lang>
|
||||
<lang langKey="pt">Lâmina ultrassom amplitude 90%%</lang>
|
||||
<lang langKey="es">Cuchilla ultrasonidos amplitud 90%%</lang>
|
||||
</localizedNames>
|
||||
</toolType>
|
||||
|
||||
<toolType>
|
||||
<id>89</id>
|
||||
<disabled>false</disabled>
|
||||
<localizedNames>
|
||||
<lang langKey="en">Ultrasound blade amplitude 100%%</lang>
|
||||
<lang langKey="it">Lama ultrasuoni amplitude 100%%</lang>
|
||||
<lang langKey="fr">Lame à ultrasons, amplitude 100%%</lang>
|
||||
<lang langKey="de">Ultraschallklingenamplitude 100%%</lang>
|
||||
<lang langKey="hr">Amplituda ultrazvučne oštrice 100%%</lang>
|
||||
<lang langKey="ro">Lama cu ultrasunete, amplitudine 100%%</lang>
|
||||
<lang langKey="nl">Ultrasoon mes amplitude 100%%</lang>
|
||||
<lang langKey="el">Λεπίδα υπερήχων πλάτους 100%%</lang>
|
||||
<lang langKey="ru">Ультразвуковой резец амплитуда 100%%</lang>
|
||||
<lang langKey="pl">Ostrze ultradźwiękowe amplituda 100%%</lang>
|
||||
<lang langKey="sv">Amplitud ultraljudsblad 100%%</lang>
|
||||
<lang langKey="da">Ultralydsklinge amplitude 100%%</lang>
|
||||
<lang langKey="pt">Lâmina ultrassom amplitude 100%%</lang>
|
||||
<lang langKey="es">Cuchilla ultrasonidos amplitud 100%%</lang>
|
||||
</localizedNames>
|
||||
</toolType>
|
||||
|
||||
<toolType>
|
||||
<id>90</id>
|
||||
<disabled>false</disabled>
|
||||
<localizedNames>
|
||||
<lang langKey="en">Blade 1</lang>
|
||||
<lang langKey="it">Lama 1</lang>
|
||||
<lang langKey="fr">Lame 1</lang>
|
||||
<lang langKey="de">Klinge 1</lang>
|
||||
<lang langKey="hr">List pile 1</lang>
|
||||
<lang langKey="ro">Lama 1</lang>
|
||||
<lang langKey="nl">Mes 1</lang>
|
||||
<lang langKey="el">Λάμα 1</lang>
|
||||
<lang langKey="ru">Резец 1</lang>
|
||||
<lang langKey="pl">Ostrze 1</lang>
|
||||
<lang langKey="sv">Blad 1</lang>
|
||||
<lang langKey="da">Klinge 1</lang>
|
||||
<lang langKey="pt">Lâmina 1</lang>
|
||||
<lang langKey="es">Cuchilla 1</lang>
|
||||
</localizedNames>
|
||||
</toolType>
|
||||
|
||||
<toolType>
|
||||
<id>91</id>
|
||||
<disabled>false</disabled>
|
||||
<localizedNames>
|
||||
<lang langKey="en">Blade 2</lang>
|
||||
<lang langKey="it">Lama 2</lang>
|
||||
<lang langKey="fr">Lame 2</lang>
|
||||
<lang langKey="de">Klinge 2</lang>
|
||||
<lang langKey="hr">List pile 2</lang>
|
||||
<lang langKey="ro">Lama 2</lang>
|
||||
<lang langKey="nl">Mes 2</lang>
|
||||
<lang langKey="el">Λάμα 2</lang>
|
||||
<lang langKey="ru">Резец 2</lang>
|
||||
<lang langKey="pl">Ostrze 2</lang>
|
||||
<lang langKey="sv">Blad 2</lang>
|
||||
<lang langKey="da">Klinge 2</lang>
|
||||
<lang langKey="pt">Lâmina 2</lang>
|
||||
<lang langKey="es">Cuchilla 2</lang>
|
||||
</localizedNames>
|
||||
</toolType>
|
||||
|
||||
<toolType>
|
||||
<id>92</id>
|
||||
<disabled>false</disabled>
|
||||
<localizedNames>
|
||||
<lang langKey="en">Blade 3</lang>
|
||||
<lang langKey="it">Lama 3</lang>
|
||||
<lang langKey="fr">Lame 3</lang>
|
||||
<lang langKey="de">Klinge 3</lang>
|
||||
<lang langKey="hr">List pile 3</lang>
|
||||
<lang langKey="ro">Lama 3</lang>
|
||||
<lang langKey="nl">Mes 3</lang>
|
||||
<lang langKey="el">Λάμα 3</lang>
|
||||
<lang langKey="ru">Резец 3</lang>
|
||||
<lang langKey="pl">Ostrze 3</lang>
|
||||
<lang langKey="sv">Blad 3</lang>
|
||||
<lang langKey="da">Klinge 3</lang>
|
||||
<lang langKey="pt">Lâmina 3</lang>
|
||||
<lang langKey="es">Cuchilla 3</lang>
|
||||
</localizedNames>
|
||||
</toolType>
|
||||
|
||||
<toolType>
|
||||
<id>93</id>
|
||||
<disabled>false</disabled>
|
||||
<localizedNames>
|
||||
<lang langKey="en">Blade 4</lang>
|
||||
<lang langKey="it">Lama 4</lang>
|
||||
<lang langKey="fr">Lame 4</lang>
|
||||
<lang langKey="de">Klinge 4</lang>
|
||||
<lang langKey="hr">List pile 4</lang>
|
||||
<lang langKey="ro">Lama 4</lang>
|
||||
<lang langKey="nl">Mes 4</lang>
|
||||
<lang langKey="el">Λάμα 4</lang>
|
||||
<lang langKey="ru">Резец 4</lang>
|
||||
<lang langKey="pl">Ostrze 4</lang>
|
||||
<lang langKey="sv">Blad 4</lang>
|
||||
<lang langKey="da">Klinge 4</lang>
|
||||
<lang langKey="pt">Lâmina 4</lang>
|
||||
<lang langKey="es">Cuchilla 4</lang>
|
||||
</localizedNames>
|
||||
</toolType>
|
||||
|
||||
<toolType>
|
||||
<id>94</id>
|
||||
<disabled>false</disabled>
|
||||
<localizedNames>
|
||||
<lang langKey="en">Blade 5</lang>
|
||||
<lang langKey="it">Lama 5</lang>
|
||||
<lang langKey="fr">Lame 5</lang>
|
||||
<lang langKey="de">Klinge 5</lang>
|
||||
<lang langKey="hr">List pile 5</lang>
|
||||
<lang langKey="ro">Lama 5</lang>
|
||||
<lang langKey="nl">Mes 5</lang>
|
||||
<lang langKey="el">Λάμα 5</lang>
|
||||
<lang langKey="ru">Резец 5</lang>
|
||||
<lang langKey="pl">Ostrze 5</lang>
|
||||
<lang langKey="sv">Blad 5</lang>
|
||||
<lang langKey="da">Klinge 5</lang>
|
||||
<lang langKey="pt">Lâmina 5</lang>
|
||||
<lang langKey="es">Cuchilla 5</lang>
|
||||
</localizedNames>
|
||||
</toolType>
|
||||
|
||||
<toolType>
|
||||
<id>95</id>
|
||||
<disabled>false</disabled>
|
||||
<localizedNames>
|
||||
<lang langKey="en">Blade 6</lang>
|
||||
<lang langKey="it">Lama 6</lang>
|
||||
<lang langKey="fr">Lame 6</lang>
|
||||
<lang langKey="de">Klinge 6</lang>
|
||||
<lang langKey="hr">List pile 6</lang>
|
||||
<lang langKey="ro">Lama 6</lang>
|
||||
<lang langKey="nl">Mes 6</lang>
|
||||
<lang langKey="el">Λάμα 6</lang>
|
||||
<lang langKey="ru">Резец 6</lang>
|
||||
<lang langKey="pl">Ostrze 6</lang>
|
||||
<lang langKey="sv">Blad 6</lang>
|
||||
<lang langKey="da">Klinge 6</lang>
|
||||
<lang langKey="pt">Lâmina 6</lang>
|
||||
<lang langKey="es">Cuchilla 6</lang>
|
||||
</localizedNames>
|
||||
</toolType>
|
||||
|
||||
<toolType>
|
||||
<id>96</id>
|
||||
<disabled>false</disabled>
|
||||
<localizedNames>
|
||||
<lang langKey="en">Blade 7</lang>
|
||||
<lang langKey="it">Lama 7</lang>
|
||||
<lang langKey="fr">Lame 7</lang>
|
||||
<lang langKey="de">Klinge 7</lang>
|
||||
<lang langKey="hr">List pile 7</lang>
|
||||
<lang langKey="ro">Lama 7</lang>
|
||||
<lang langKey="nl">Mes 7</lang>
|
||||
<lang langKey="el">Λάμα 7</lang>
|
||||
<lang langKey="ru">Резец 7</lang>
|
||||
<lang langKey="pl">Ostrze 7</lang>
|
||||
<lang langKey="sv">Blad 7</lang>
|
||||
<lang langKey="da">Klinge 7</lang>
|
||||
<lang langKey="pt">Lâmina 7</lang>
|
||||
<lang langKey="es">Cuchilla 7</lang>
|
||||
</localizedNames>
|
||||
</toolType>
|
||||
|
||||
<toolType>
|
||||
<id>97</id>
|
||||
<disabled>false</disabled>
|
||||
<localizedNames>
|
||||
<lang langKey="en">Blade ⌀300</lang>
|
||||
<lang langKey="it">Lama ⌀300</lang>
|
||||
<lang langKey="fr">Lame ⌀300</lang>
|
||||
<lang langKey="de">Klinge ⌀300</lang>
|
||||
<lang langKey="hr">List pile ⌀300</lang>
|
||||
<lang langKey="ro">Lama ⌀300</lang>
|
||||
<lang langKey="nl">Mes ⌀300</lang>
|
||||
<lang langKey="el">Λάμα ⌀300</lang>
|
||||
<lang langKey="ru">Резец ⌀300</lang>
|
||||
<lang langKey="pl">Ostrze ⌀300</lang>
|
||||
<lang langKey="sv">Blad ⌀300</lang>
|
||||
<lang langKey="da">Klinge ⌀300</lang>
|
||||
<lang langKey="pt">Lâmina ⌀300</lang>
|
||||
<lang langKey="es">Cuchilla ⌀300</lang>
|
||||
</localizedNames>
|
||||
</toolType>
|
||||
|
||||
<toolType>
|
||||
<id>98</id>
|
||||
<disabled>false</disabled>
|
||||
<localizedNames>
|
||||
<lang langKey="en">Blade ⌀400</lang>
|
||||
<lang langKey="it">Lama ⌀400</lang>
|
||||
<lang langKey="fr">Lame ⌀400</lang>
|
||||
<lang langKey="de">Klinge ⌀400</lang>
|
||||
<lang langKey="hr">List pile ⌀400</lang>
|
||||
<lang langKey="ro">Lama ⌀400</lang>
|
||||
<lang langKey="nl">Mes ⌀400</lang>
|
||||
<lang langKey="el">Λάμα ⌀400</lang>
|
||||
<lang langKey="ru">Резец ⌀400</lang>
|
||||
<lang langKey="pl">Ostrze ⌀400</lang>
|
||||
<lang langKey="sv">Blad ⌀400</lang>
|
||||
<lang langKey="da">Klinge ⌀400</lang>
|
||||
<lang langKey="pt">Lâmina ⌀400</lang>
|
||||
<lang langKey="es">Cuchilla ⌀400</lang>
|
||||
</localizedNames>
|
||||
</toolType>
|
||||
|
||||
<toolType>
|
||||
<id>99</id>
|
||||
<disabled>false</disabled>
|
||||
<localizedNames>
|
||||
<lang langKey="en">Blade ⌀500</lang>
|
||||
<lang langKey="it">Lama ⌀500</lang>
|
||||
<lang langKey="fr">Lame ⌀500</lang>
|
||||
<lang langKey="de">Klinge ⌀500</lang>
|
||||
<lang langKey="hr">List pile ⌀500</lang>
|
||||
<lang langKey="ro">Lama ⌀500</lang>
|
||||
<lang langKey="nl">Mes ⌀500</lang>
|
||||
<lang langKey="el">Λάμα ⌀500</lang>
|
||||
<lang langKey="ru">Резец ⌀500</lang>
|
||||
<lang langKey="pl">Ostrze ⌀500</lang>
|
||||
<lang langKey="sv">Blad ⌀500</lang>
|
||||
<lang langKey="da">Klinge ⌀500</lang>
|
||||
<lang langKey="pt">Lâmina ⌀500</lang>
|
||||
<lang langKey="es">Cuchilla ⌀500</lang>
|
||||
</localizedNames>
|
||||
</toolType>
|
||||
|
||||
<toolType>
|
||||
<id>101</id>
|
||||
<disabled>false</disabled>
|
||||
<localizedNames>
|
||||
<lang langKey="en">Radio Probe 1 - Reciever 1</lang>
|
||||
<lang langKey="it">Radio Probe 1 - Ricevitore 1</lang>
|
||||
<lang langKey="fr">Radio Probe 1 - Récepteur 1</lang>
|
||||
<lang langKey="de">Radio Probe 1 - Empfänger 1</lang>
|
||||
<lang langKey="hr">Radio Probe 1 - Prijemnik 1</lang>
|
||||
<lang langKey="ro">Probe Radio 1 - Receptor 1</lang>
|
||||
<lang langKey="nl">Radio Probe 1 - Ontvanger 1</lang>
|
||||
<lang langKey="el">Ραδιο-ανιχνευτής 1 - Δέκτης 1</lang>
|
||||
<lang langKey="ru">Радиодатчик 1 - Приемник 1</lang>
|
||||
<lang langKey="pl">Sonda radiowa 1 - Odbiornik 1</lang>
|
||||
<lang langKey="sv">Radiosond 1 - Mottagare 1</lang>
|
||||
<lang langKey="da">Radio Sonde 1 - Modtager 1</lang>
|
||||
<lang langKey="pt">Sonda Probe 1 - Receptor 1</lang>
|
||||
<lang langKey="es">Radio Probe 1 - Receptor 1</lang>
|
||||
</localizedNames>
|
||||
</toolType>
|
||||
|
||||
<toolType>
|
||||
<id>102</id>
|
||||
<disabled>false</disabled>
|
||||
<localizedNames>
|
||||
<lang langKey="en">Radio Probe 2 - Reciever 1</lang>
|
||||
<lang langKey="it">Radio Probe 2 - Ricevitore 1</lang>
|
||||
<lang langKey="fr">Radio Probe 2 - Récepteur 1</lang>
|
||||
<lang langKey="de">Radio Probe 2 - Empfänger 1</lang>
|
||||
<lang langKey="hr">Radio Probe 2 - Prijemnik 1</lang>
|
||||
<lang langKey="ro">Probe Radio 2 - Receptor 1</lang>
|
||||
<lang langKey="nl">Radio Probe 2 - Ontvanger 1</lang>
|
||||
<lang langKey="el">Ραδιο-ανιχνευτής 2 - Δέκτης 1</lang>
|
||||
<lang langKey="ru">Радиодатчик 2 - Приемник 1</lang>
|
||||
<lang langKey="pl">Sonda radiowa 2 - Odbiornik 1</lang>
|
||||
<lang langKey="sv">Radiosond 2 - Mottagare 1</lang>
|
||||
<lang langKey="da">Radio Sonde 2 - Modtager 1</lang>
|
||||
<lang langKey="pt">Sonda Probe 2 - Receptor 1</lang>
|
||||
<lang langKey="es">Radio Probe 2 - Receptor 1</lang>
|
||||
</localizedNames>
|
||||
</toolType>
|
||||
|
||||
<toolType>
|
||||
<id>103</id>
|
||||
<disabled>false</disabled>
|
||||
<localizedNames>
|
||||
<lang langKey="en">Radio Probe 3 - Reciever 1</lang>
|
||||
<lang langKey="it">Radio Probe 3 - Ricevitore 1</lang>
|
||||
<lang langKey="fr">Radio Probe 3 - Récepteur 1</lang>
|
||||
<lang langKey="de">Radio Probe 3 - Empfänger 1</lang>
|
||||
<lang langKey="hr">Radio Probe 3 - Prijemnik 1</lang>
|
||||
<lang langKey="ro">Probe Radio 3 - Receptor 1</lang>
|
||||
<lang langKey="nl">Radio Probe 3 - Ontvanger 1</lang>
|
||||
<lang langKey="el">Ραδιο-ανιχνευτής 3 - Δέκτης 1</lang>
|
||||
<lang langKey="ru">Радиодатчик 3 - Приемник 1</lang>
|
||||
<lang langKey="pl">Sonda radiowa 3 - Odbiornik 1</lang>
|
||||
<lang langKey="sv">Radiosond 3 - Mottagare 1</lang>
|
||||
<lang langKey="da">Radio Sonde 3 - Modtager 1</lang>
|
||||
<lang langKey="pt">Sonda Probe 3 - Receptor 1</lang>
|
||||
<lang langKey="es">Radio Probe 3 - Receptor 1</lang>
|
||||
</localizedNames>
|
||||
</toolType>
|
||||
|
||||
<toolType>
|
||||
<id>104</id>
|
||||
<disabled>false</disabled>
|
||||
<localizedNames>
|
||||
<lang langKey="en">Radio Probe 4 - Reciever 1</lang>
|
||||
<lang langKey="it">Radio Probe 4 - Ricevitore 1</lang>
|
||||
<lang langKey="fr">Radio Probe 4 - Récepteur 1</lang>
|
||||
<lang langKey="de">Radio Probe 4 - Empfänger 1</lang>
|
||||
<lang langKey="hr">Radio Probe 4 - Prijemnik 1</lang>
|
||||
<lang langKey="ro">Probe Radio 4 - Receptor 1</lang>
|
||||
<lang langKey="nl">Radio Probe 4 - Ontvanger 1</lang>
|
||||
<lang langKey="el">Ραδιο-ανιχνευτής 4 - Δέκτης 1</lang>
|
||||
<lang langKey="ru">Радиодатчик 4 - Приемник 1</lang>
|
||||
<lang langKey="pl">Sonda radiowa 4 - Odbiornik 1</lang>
|
||||
<lang langKey="sv">Radiosond 4 - Mottagare 1</lang>
|
||||
<lang langKey="da">Radio Sonde 4 - Modtager 1</lang>
|
||||
<lang langKey="pt">Sonda Probe 4 - Receptor 1</lang>
|
||||
<lang langKey="es">Radio Probe 4 - Receptor 1</lang>
|
||||
</localizedNames>
|
||||
</toolType>
|
||||
|
||||
<toolType>
|
||||
<id>105</id>
|
||||
<disabled>false</disabled>
|
||||
<localizedNames>
|
||||
<lang langKey="en">Radio Probe 1 - Reciever 2</lang>
|
||||
<lang langKey="it">Radio Probe 1 - Ricevitore 2</lang>
|
||||
<lang langKey="fr">Radio Probe 1 - Récepteur 2</lang>
|
||||
<lang langKey="de">Radio Probe 1 - Empfänger 2</lang>
|
||||
<lang langKey="hr">Radio Probe 1 - Prijemnik 2</lang>
|
||||
<lang langKey="ro">Probe Radio 1 - Receptor 2</lang>
|
||||
<lang langKey="nl">Radio Probe 1 - Ontvanger 2</lang>
|
||||
<lang langKey="el">Ραδιο-ανιχνευτής 1 - Δέκτης 2</lang>
|
||||
<lang langKey="ru">Радиодатчик 1 - Приемник 2</lang>
|
||||
<lang langKey="pl">Sonda radiowa 1 - Odbiornik 2</lang>
|
||||
<lang langKey="sv">Radiosond 1 - Mottagare 2</lang>
|
||||
<lang langKey="da">Radio Sonde 1 - Modtager 2</lang>
|
||||
<lang langKey="pt">Sonda Probe 1 - Receptor 2</lang>
|
||||
<lang langKey="es">Radio Probe 1 - Receptor 2</lang>
|
||||
</localizedNames>
|
||||
</toolType>
|
||||
|
||||
<toolType>
|
||||
<id>106</id>
|
||||
<disabled>false</disabled>
|
||||
<localizedNames>
|
||||
<lang langKey="en">Radio Probe 2 - Reciever 2</lang>
|
||||
<lang langKey="it">Radio Probe 2 - Ricevitore 2</lang>
|
||||
<lang langKey="fr">Radio Probe 2 - Récepteur 2</lang>
|
||||
<lang langKey="de">Radio Probe 2 - Empfänger 2</lang>
|
||||
<lang langKey="hr">Radio Probe 2 - Prijemnik 2</lang>
|
||||
<lang langKey="ro">Probe Radio 2 - Receptor 2</lang>
|
||||
<lang langKey="nl">Radio Probe 2 - Ontvanger 2</lang>
|
||||
<lang langKey="el">Ραδιο-ανιχνευτής 2 - Δέκτης 2</lang>
|
||||
<lang langKey="ru">Радиодатчик 2 - Приемник 2</lang>
|
||||
<lang langKey="pl">Sonda radiowa 2 - Odbiornik 2</lang>
|
||||
<lang langKey="sv">Radiosond 2 - Mottagare 2</lang>
|
||||
<lang langKey="da">Radio Sonde 2 - Modtager 2</lang>
|
||||
<lang langKey="pt">Sonda Probe 2 - Receptor 2</lang>
|
||||
<lang langKey="es">Radio Probe 2 - Receptor 2</lang>
|
||||
</localizedNames>
|
||||
</toolType>
|
||||
|
||||
<toolType>
|
||||
<id>107</id>
|
||||
<disabled>false</disabled>
|
||||
<localizedNames>
|
||||
<lang langKey="en">Radio Probe 3 - Reciever 2</lang>
|
||||
<lang langKey="it">Radio Probe 3 - Ricevitore 2</lang>
|
||||
<lang langKey="fr">Radio Probe 3 - Récepteur 2</lang>
|
||||
<lang langKey="de">Radio Probe 3 - Empfänger 2</lang>
|
||||
<lang langKey="hr">Radio Probe 3 - Prijemnik 2</lang>
|
||||
<lang langKey="ro">Probe Radio 3 - Receptor 2</lang>
|
||||
<lang langKey="nl">Radio Probe 3 - Ontvanger 2</lang>
|
||||
<lang langKey="el">Ραδιο-ανιχνευτής 3 - Δέκτης 2</lang>
|
||||
<lang langKey="ru">Радиодатчик 3 - Приемник 2</lang>
|
||||
<lang langKey="pl">Sonda radiowa 3 - Odbiornik 2</lang>
|
||||
<lang langKey="sv">Radiosond 3 - Mottagare 2</lang>
|
||||
<lang langKey="da">Radio Sonde 3 - Modtager 2</lang>
|
||||
<lang langKey="pt">Sonda Probe 3 - Receptor 2</lang>
|
||||
<lang langKey="es">Radio Probe 3 - Receptor 2</lang>
|
||||
</localizedNames>
|
||||
</toolType>
|
||||
|
||||
<toolType>
|
||||
<id>108</id>
|
||||
<disabled>false</disabled>
|
||||
<localizedNames>
|
||||
<lang langKey="en">Radio Probe 4 - Reciever 2</lang>
|
||||
<lang langKey="it">Radio Probe 4 - Ricevitore 2</lang>
|
||||
<lang langKey="fr">Radio Probe 4 - Récepteur 2</lang>
|
||||
<lang langKey="de">Radio Probe 4 - Empfänger 2</lang>
|
||||
<lang langKey="hr">Radio Probe 4 - Prijemnik 2</lang>
|
||||
<lang langKey="ro">Probe Radio 4 - Receptor 2</lang>
|
||||
<lang langKey="nl">Radio Probe 4 - Ontvanger 2</lang>
|
||||
<lang langKey="el">Ραδιο-ανιχνευτής 4 - Δέκτης 2</lang>
|
||||
<lang langKey="ru">Радиодатчик 4 - Приемник 2</lang>
|
||||
<lang langKey="pl">Sonda radiowa 4 - Odbiornik 2</lang>
|
||||
<lang langKey="sv">Radiosond 4 - Mottagare 2</lang>
|
||||
<lang langKey="da">Radio Sonde 4 - Modtager 2</lang>
|
||||
<lang langKey="pt">Sonda Probe 4 - Receptor 2</lang>
|
||||
<lang langKey="es">Radio Probe 4 - Receptor 2</lang>
|
||||
</localizedNames>
|
||||
</toolType>
|
||||
|
||||
</toolTypes>
|
||||
</root>
|
||||
@@ -1,175 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
||||
<xs:element name="root">
|
||||
<xs:complexType>
|
||||
<xs:all>
|
||||
<xs:element name="toolManagerConfig">
|
||||
<xs:complexType>
|
||||
<xs:all>
|
||||
<xs:element name="toolMetricType" type="tmType" minOccurs='1' maxOccurs='1'/>
|
||||
<xs:element name="familyOpt" type="xs:boolean" minOccurs='1' maxOccurs='1' />
|
||||
<xs:element name="shankOpt" type="xs:boolean" minOccurs="1" maxOccurs="1" />
|
||||
<xs:element name="magPositionOpt" type="xs:boolean" minOccurs='1' maxOccurs='1' />
|
||||
<xs:element name="offsetOpt" type="xs:boolean" minOccurs='1' maxOccurs='1' />
|
||||
<xs:element name="reviveOpt" type="xs:boolean" minOccurs='1' maxOccurs='1' />
|
||||
<xs:element name="gammaOpt" type="xs:boolean" minOccurs='1' maxOccurs='1' />
|
||||
<xs:element name="lifeOpt" type="xs:boolean" minOccurs='1' maxOccurs='1' />
|
||||
<xs:element name="tcpOpt" type="xs:boolean" minOccurs='1' maxOccurs='1' />
|
||||
<xs:element name="coolingOpt" type="xs:boolean" minOccurs='1' maxOccurs='1' />
|
||||
<xs:element name="multidimensionalShankOpt" type="xs:boolean" minOccurs='1' maxOccurs='1' />
|
||||
<xs:element name="selfAdaptivePathOpt" type="xs:boolean" minOccurs='1' maxOccurs='1' />
|
||||
<xs:element name="dynamicCompensationOpt" type="xs:boolean" minOccurs='1' maxOccurs='1' />
|
||||
<xs:element name="ballufOpt" type="xs:boolean" minOccurs='1' maxOccurs='1' />
|
||||
<xs:element name="integrityCheckOpt" type="xs:boolean" minOccurs='1' maxOccurs='1' />
|
||||
</xs:all>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
<xs:element name="coolingLocalizedNames">
|
||||
<xs:complexType>
|
||||
<xs:all>
|
||||
|
||||
<xs:element name="cooling">
|
||||
<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="cooling1">
|
||||
<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="cooling2">
|
||||
<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="cooling3">
|
||||
<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="cooling4">
|
||||
<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="cooling5">
|
||||
<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="cooling6">
|
||||
<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="cooling7">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="lang" type="langType" minOccurs="0" maxOccurs="unbounded">
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
</xs:all>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
<xs:element name="magazineNames">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="magazine" minOccurs="1" maxOccurs="unbounded">
|
||||
<xs:complexType>
|
||||
<xs:all>
|
||||
<xs:element name="id" type="xs:int"/>
|
||||
<xs:element name="assistedTooling" type="xs:boolean"/>
|
||||
<xs:element name="localizedNames">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="lang" type="langType" minOccurs="0" maxOccurs="unbounded">
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:all>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
<!-- ToolTypes -->
|
||||
<xs:element name="toolTypes">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="toolType" type="toolTypeType" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
</xs:all>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
|
||||
<xs:simpleType name="tmType" final="restriction" >
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:enumeration value="RADIUS" />
|
||||
<xs:enumeration value="DIAMETER" />
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
|
||||
<!-- Language Type -->
|
||||
<xs:complexType name="langType">
|
||||
<xs:simpleContent>
|
||||
<xs:extension base="xs:string">
|
||||
<xs:attribute name="langKey" use="required" type="xs:string" />
|
||||
</xs:extension>
|
||||
</xs:simpleContent>
|
||||
</xs:complexType>
|
||||
|
||||
<!-- Language Type -->
|
||||
<xs:complexType name="toolTypeType">
|
||||
<xs:all>
|
||||
<xs:element name="id" minOccurs='1' maxOccurs='1'/>
|
||||
<xs:element name="disabled" minOccurs='1' maxOccurs='1'/>
|
||||
<xs:element name="localizedNames">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="lang" type="langType" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xs:sequence>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:all>
|
||||
</xs:complexType>
|
||||
</xs:schema>
|
||||
@@ -205,7 +205,7 @@
|
||||
<visible>true</visible>
|
||||
</softKey_procedure>
|
||||
|
||||
<softKey_toggle>
|
||||
<!--<softKey_toggle>
|
||||
<active>false</active>
|
||||
<category>6</category>
|
||||
<operatorConfirmationNeeded>false</operatorConfirmationNeeded>
|
||||
@@ -227,7 +227,7 @@
|
||||
<lang langKey="it">Protezione magazzino 2</lang>
|
||||
</localizedNames>
|
||||
<visible>true</visible>
|
||||
</softKey_toggle>
|
||||
</softKey_toggle>-->
|
||||
|
||||
<softKey_group>
|
||||
<active>true</active>
|
||||
@@ -348,7 +348,7 @@
|
||||
<visible>true</visible>
|
||||
</softKey_procedure>
|
||||
|
||||
<softKey_procedure>
|
||||
<!--<softKey_procedure>
|
||||
<active>false</active>
|
||||
<category>6</category>
|
||||
<operatorConfirmationNeeded>false</operatorConfirmationNeeded>
|
||||
@@ -358,9 +358,9 @@
|
||||
<lang langKey="it">Attrezzaggio macchina</lang>
|
||||
</localizedNames>
|
||||
<visible>true</visible>
|
||||
</softKey_procedure>
|
||||
</softKey_procedure>-->
|
||||
|
||||
<softKey_procedure>
|
||||
<!--<softKey_procedure>
|
||||
<active>true</active>
|
||||
<category>5</category>
|
||||
<operatorConfirmationNeeded>false</operatorConfirmationNeeded>
|
||||
@@ -370,7 +370,7 @@
|
||||
<lang langKey="it">Ripristino cambio utensile</lang>
|
||||
</localizedNames>
|
||||
<visible>true</visible>
|
||||
</softKey_procedure>
|
||||
</softKey_procedure>-->
|
||||
|
||||
<softKey_toggle>
|
||||
<active>false</active>
|
||||
@@ -399,7 +399,7 @@
|
||||
<visible>true</visible>
|
||||
</softKey_group>
|
||||
|
||||
<softKey_toggle>
|
||||
<!--<softKey_toggle>
|
||||
<active>true</active>
|
||||
<category>3</category>
|
||||
<operatorConfirmationNeeded>false</operatorConfirmationNeeded>
|
||||
@@ -409,9 +409,9 @@
|
||||
<lang langKey="it">Soffiatore esterno utensile</lang>
|
||||
</localizedNames>
|
||||
<visible>true</visible>
|
||||
</softKey_toggle>
|
||||
</softKey_toggle>-->
|
||||
|
||||
<softKey_toggle>
|
||||
<!--<softKey_toggle>
|
||||
<active>false</active>
|
||||
<category>3</category>
|
||||
<operatorConfirmationNeeded>false</operatorConfirmationNeeded>
|
||||
@@ -421,7 +421,7 @@
|
||||
<lang langKey="it">Soffiatore interno utensile</lang>
|
||||
</localizedNames>
|
||||
<visible>true</visible>
|
||||
</softKey_toggle>
|
||||
</softKey_toggle>-->
|
||||
|
||||
<softKey_toggle>
|
||||
<active>false</active>
|
||||
@@ -435,7 +435,7 @@
|
||||
<visible>true</visible>
|
||||
</softKey_toggle>
|
||||
|
||||
<softKey_toggle>
|
||||
<!--<softKey_toggle>
|
||||
<active>false</active>
|
||||
<category>3</category>
|
||||
<operatorConfirmationNeeded>false</operatorConfirmationNeeded>
|
||||
@@ -457,7 +457,7 @@
|
||||
<lang langKey="it">Nebulizzatore interno utensile</lang>
|
||||
</localizedNames>
|
||||
<visible>true</visible>
|
||||
</softKey_toggle>
|
||||
</softKey_toggle>-->
|
||||
|
||||
<softKey_toggle>
|
||||
<active>false</active>
|
||||
|
||||
@@ -32,11 +32,9 @@ namespace Thermo.Active.Config
|
||||
public static List<NcSoftKeysModel> NcSoftKeysConfig;
|
||||
public static List<AlarmsConfigModel> InitialAlarmsConfig;
|
||||
public static List<HeadsConfigModel> HeadsConfig;
|
||||
public static ToolManagerConfigModel ToolManagerConfig;
|
||||
public static CmsConnectConfigModel CmsConnectConfig;
|
||||
|
||||
public static AreasConfigModel ProductionConfig;
|
||||
public static AreasConfigModel ToolingConfig;
|
||||
public static AreasConfigModel ReportConfig;
|
||||
public static AreasConfigModel AlarmsConfig;
|
||||
public static AreasConfigModel MaintenanceConfig;
|
||||
|
||||
@@ -33,7 +33,6 @@ namespace Thermo.Active.Config
|
||||
ReadUserSoftKeysConfig();
|
||||
ReadAlarmsConfig();
|
||||
ReadHeadsConfig();
|
||||
ReadToolManagerConfig();
|
||||
// ReadCMSConnectConfig();
|
||||
ReadMacros();
|
||||
ReadScadaFile();
|
||||
@@ -113,10 +112,6 @@ namespace Thermo.Active.Config
|
||||
SetAreaValue(ref ProductionConfig, element);
|
||||
break;
|
||||
|
||||
case AREAS.TOOLING_KEY:
|
||||
SetAreaValue(ref ToolingConfig, element);
|
||||
break;
|
||||
|
||||
case AREAS.REPORT_KEY:
|
||||
SetAreaValue(ref ReportConfig, element);
|
||||
break;
|
||||
@@ -181,9 +176,6 @@ namespace Thermo.Active.Config
|
||||
{
|
||||
case AREAS.PRODUCTION_KEY:
|
||||
return ProductionConfig.Enabled;
|
||||
|
||||
case AREAS.TOOLING_KEY:
|
||||
return ToolingConfig.Enabled;
|
||||
|
||||
case AREAS.REPORT_KEY:
|
||||
return ProductionConfig.Enabled;
|
||||
@@ -580,97 +572,6 @@ namespace Thermo.Active.Config
|
||||
.ToList();
|
||||
}
|
||||
|
||||
private static void ReadToolManagerConfig()
|
||||
{
|
||||
XDocument xmlConfigFile = GetXmlHandlerWithValidator(TOOL_MANAGER_CONFIG_SCHEMA_PATH, TOOL_MANAGER_CONFIG_PATH);
|
||||
|
||||
// Read config from XML file
|
||||
ToolManagerConfig = xmlConfigFile
|
||||
.Root
|
||||
.Descendants("toolManagerConfig")
|
||||
.Select(x => new ToolManagerConfigModel()
|
||||
{
|
||||
ToolMetricType = x.Element("toolMetricType").Value,
|
||||
FamilyOpt = Convert.ToBoolean(x.Element("familyOpt").Value),
|
||||
ShankOpt = Convert.ToBoolean(x.Element("shankOpt").Value),
|
||||
MagPosTypeOpt = Convert.ToBoolean(x.Element("magPositionOpt").Value),
|
||||
OffsetOpt = Convert.ToBoolean(x.Element("offsetOpt").Value),
|
||||
ReviveOpt = Convert.ToBoolean(x.Element("reviveOpt").Value),
|
||||
GammaOpt = Convert.ToBoolean(x.Element("gammaOpt").Value),
|
||||
LifeOpt = Convert.ToBoolean(x.Element("lifeOpt").Value),
|
||||
TcpOpt = Convert.ToBoolean(x.Element("tcpOpt").Value),
|
||||
CoolingOpt = Convert.ToBoolean(x.Element("coolingOpt").Value),
|
||||
MultidimensionalShankOpt = Convert.ToBoolean(x.Element("multidimensionalShankOpt").Value),
|
||||
SelfAdaptivePathOpt = Convert.ToBoolean(x.Element("selfAdaptivePathOpt").Value),
|
||||
DynamicCompensationOpt = Convert.ToBoolean(x.Element("dynamicCompensationOpt").Value),
|
||||
BallufOpt = Convert.ToBoolean(x.Element("ballufOpt").Value),
|
||||
IntegrityCheckOpt = Convert.ToBoolean(x.Element("integrityCheckOpt").Value)
|
||||
})
|
||||
.FirstOrDefault();
|
||||
|
||||
|
||||
ToolManagerConfig.CooligsTranslations = xmlConfigFile
|
||||
.Root
|
||||
.Descendants("coolingLocalizedNames")
|
||||
.Select(x => new CooligTranslations()
|
||||
{
|
||||
Cooling = x.Element("cooling").Elements().ToDictionary( // Read localized names of cooling and convert into a dictionary
|
||||
y => y.Attribute("langKey").Value, y => y.Value
|
||||
),
|
||||
Cooling1 = x.Element("cooling1").Elements().ToDictionary(
|
||||
y => y.Attribute("langKey").Value, y => y.Value
|
||||
),
|
||||
Cooling2 = x.Element("cooling2").Elements().ToDictionary(
|
||||
y => y.Attribute("langKey").Value, y => y.Value
|
||||
),
|
||||
Cooling3 = x.Element("cooling3").Elements().ToDictionary(
|
||||
y => y.Attribute("langKey").Value, y => y.Value
|
||||
),
|
||||
Cooling4 = x.Element("cooling4").Elements().ToDictionary(
|
||||
y => y.Attribute("langKey").Value, y => y.Value
|
||||
),
|
||||
Cooling5 = x.Element("cooling5").Elements().ToDictionary(
|
||||
y => y.Attribute("langKey").Value, y => y.Value
|
||||
),
|
||||
Cooling6 = x.Element("cooling6").Elements().ToDictionary(
|
||||
y => y.Attribute("langKey").Value, y => y.Value
|
||||
),
|
||||
Cooling7 = x.Element("cooling7").Elements().ToDictionary(
|
||||
y => y.Attribute("langKey").Value, y => y.Value
|
||||
)
|
||||
|
||||
})
|
||||
.FirstOrDefault();
|
||||
|
||||
ToolManagerConfig.MagazineNames = xmlConfigFile
|
||||
.Root
|
||||
.Descendants("magazineNames")
|
||||
.Elements()
|
||||
.Select(x => new MagazineNamesModel()
|
||||
{
|
||||
MagazineId = Convert.ToInt32(x.Element("id").Value),
|
||||
AssistedTooling = Convert.ToBoolean(x.Element("assistedTooling").Value),
|
||||
LocalizedNames = x.Element("localizedNames").Elements().ToDictionary( // Read localized names and convert into a dictionary
|
||||
y => y.Attribute("langKey").Value, y => y.Value
|
||||
),
|
||||
})
|
||||
.ToList();
|
||||
|
||||
ToolManagerConfig.ToolTypes = xmlConfigFile
|
||||
.Root
|
||||
.Descendants("toolTypes")
|
||||
.Elements()
|
||||
.Select(x => new ToolTypeConfigModel()
|
||||
{
|
||||
Id = Convert.ToInt32(x.Element("id").Value),
|
||||
Disabled = Convert.ToBoolean(x.Element("disabled").Value),
|
||||
LocalizedNames = x.Element("localizedNames").Elements().ToDictionary( // Read localized names and convert into a dictionary
|
||||
y => y.Attribute("langKey").Value, y => y.Value
|
||||
),
|
||||
})
|
||||
.ToList();
|
||||
}
|
||||
|
||||
|
||||
private static void ReadCMSConnectConfig()
|
||||
{
|
||||
|
||||
@@ -69,10 +69,6 @@
|
||||
<Content Include="Config\customMainProgram.txt">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="Config\toolManagerConfig.xml">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
<SubType>Designer</SubType>
|
||||
</Content>
|
||||
<Content Include="Config\userSoftKeyConfig.xml">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
<SubType>Designer</SubType>
|
||||
@@ -113,9 +109,6 @@
|
||||
<EmbeddedResource Include="Config\ncSoftKeyConfigValidator.xsd">
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Config\toolManagerConfigValidator.xsd">
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Thermo.Active.Model\Thermo.Active.Model.csproj">
|
||||
|
||||
@@ -5,7 +5,6 @@ using Thermo.Active.Database.Controllers;
|
||||
using Thermo.Active.Model.DTOModels;
|
||||
using Thermo.Active.Model.DTOModels.AlarmModels;
|
||||
using Thermo.Active.Model.DTOModels.Scada;
|
||||
using Thermo.Active.Model.DTOModels.ToolModels;
|
||||
using Thermo.Active.NC;
|
||||
using Thermo.Active.Utils;
|
||||
using System;
|
||||
@@ -508,50 +507,6 @@ public static class ThreadsFunctions
|
||||
}
|
||||
}
|
||||
|
||||
public static void ReadMagazinesStatus()
|
||||
{
|
||||
SiemensToolTableAdapter ncAdapter = new SiemensToolTableAdapter();
|
||||
Stopwatch sw = new Stopwatch();
|
||||
|
||||
try
|
||||
{
|
||||
// Try connection
|
||||
CmsError libraryError = ncAdapter.Connect();
|
||||
if (libraryError.errorCode != 0)
|
||||
ManageLibraryError(libraryError);
|
||||
|
||||
while (true)
|
||||
{
|
||||
sw.Restart();
|
||||
|
||||
if (ncAdapter.numericalControl.NC_IsConnected())
|
||||
{
|
||||
// Get Data from config and PLC
|
||||
libraryError = ncAdapter.GetMagazineStatus(out DTOMagazineActionModel magazineStatus);
|
||||
if (libraryError.errorCode != 0)
|
||||
ManageLibraryError(libraryError);
|
||||
else
|
||||
// Send through signalR
|
||||
MessageServices.Current.Publish(SEND_MAGAZINES_STATUS, null, magazineStatus);
|
||||
}
|
||||
else
|
||||
RestoreConnection();
|
||||
|
||||
sw.Stop();
|
||||
|
||||
//Update thread timer
|
||||
UpdateStat(MethodBase.GetCurrentMethod().Name, sw.ElapsedMilliseconds);
|
||||
|
||||
// Wait
|
||||
Thread.Sleep(CalcSleepTime(1000, (int)sw.ElapsedMilliseconds));
|
||||
}
|
||||
}
|
||||
catch (ThreadAbortException)
|
||||
{
|
||||
ncAdapter.Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
public static void ReadActiveProgramData()
|
||||
{
|
||||
NcFileAdapter ncAdapter = new NcFileAdapter();
|
||||
@@ -597,108 +552,6 @@ public static class ThreadsFunctions
|
||||
}
|
||||
}
|
||||
|
||||
public static void UpdateToolsData()
|
||||
{
|
||||
NcToolTableAdapter ncAdapter = new NcToolTableAdapter();
|
||||
Stopwatch sw = new Stopwatch();
|
||||
|
||||
if(NcConfig.NcVendor != NC_VENDOR.SIEMENS)
|
||||
{
|
||||
try
|
||||
{
|
||||
// Try connection
|
||||
CmsError libraryError = ncAdapter.Connect();
|
||||
if (libraryError.errorCode != 0)
|
||||
ManageLibraryError(libraryError);
|
||||
|
||||
while (true)
|
||||
{
|
||||
sw.Restart();
|
||||
|
||||
// Check if client is connected
|
||||
if (ncAdapter.numericalControl.NC_IsConnected())
|
||||
{
|
||||
// Get new data from PLC
|
||||
libraryError = ncAdapter.GetUpdatedToolsData(out Dictionary<int, byte> updatedStatus, out Dictionary<int, uint> updatedLives);
|
||||
if (libraryError.IsError())
|
||||
ManageLibraryError(libraryError);
|
||||
|
||||
MessageServices.Current.Publish(UPDATE_TOOLS_DATA, null,
|
||||
new DTONewToolDataModel
|
||||
{
|
||||
UpdatedStatus = updatedStatus,
|
||||
UpdatedLives = updatedLives
|
||||
});
|
||||
}
|
||||
else
|
||||
RestoreConnection();
|
||||
sw.Stop();
|
||||
|
||||
//Update thread timer
|
||||
UpdateStat(MethodBase.GetCurrentMethod().Name, sw.ElapsedMilliseconds);
|
||||
|
||||
// Wait
|
||||
Thread.Sleep(CalcSleepTime(1000, (int)sw.ElapsedMilliseconds));
|
||||
}
|
||||
}
|
||||
catch (ThreadAbortException)
|
||||
{
|
||||
ncAdapter.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void ReadNcMagazineActive()
|
||||
{
|
||||
if (NcConfig.NcVendor != NC_VENDOR.SIEMENS)
|
||||
{
|
||||
NcToolTableAdapter ncAdapter = new NcToolTableAdapter();
|
||||
Stopwatch sw = new Stopwatch();
|
||||
try
|
||||
{
|
||||
// Try connection
|
||||
CmsError libraryError = ncAdapter.Connect();
|
||||
if (libraryError.errorCode != 0)
|
||||
ManageLibraryError(libraryError);
|
||||
|
||||
while (true)
|
||||
{
|
||||
sw.Restart();
|
||||
|
||||
// Check if client is connected
|
||||
if (ncAdapter.numericalControl.NC_IsConnected())
|
||||
{
|
||||
// Get new data from PLC
|
||||
libraryError = ncAdapter.GetNcMagazineStatus(out Dictionary<int, bool> status);
|
||||
if (libraryError.IsError())
|
||||
ManageLibraryError(libraryError);
|
||||
|
||||
MessageServices.Current.Publish(NC_MAGAZINE_IS_ACTIVE, null, status);
|
||||
|
||||
libraryError = ncAdapter.ReadAssistedToolingProcedure(out DTOAssistedToolingEndValueModel data);
|
||||
if (libraryError.IsError())
|
||||
ManageLibraryError(libraryError);
|
||||
|
||||
MessageServices.Current.Publish(ASSISTED_TOOLING_DATA, null, data);
|
||||
}
|
||||
else
|
||||
RestoreConnection();
|
||||
sw.Stop();
|
||||
|
||||
//Update thread timer
|
||||
UpdateStat(MethodBase.GetCurrentMethod().Name, sw.ElapsedMilliseconds);
|
||||
|
||||
// Wait
|
||||
Thread.Sleep(CalcSleepTime(500, (int)sw.ElapsedMilliseconds));
|
||||
}
|
||||
}
|
||||
catch (ThreadAbortException)
|
||||
{
|
||||
ncAdapter.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void ReadPartProgramQueueData()
|
||||
{
|
||||
NcFileAdapter ncAdapter = new NcFileAdapter();
|
||||
@@ -1053,28 +906,12 @@ public static class ThreadsFunctions
|
||||
ncAdapter.Dispose();
|
||||
}
|
||||
|
||||
if (cmsError.errorCode == CMS_ERROR_CODES.SIEMENS_TOOL_TABLE_ERROR)
|
||||
ManageLibraryError(cmsError);
|
||||
|
||||
// Send status to UI
|
||||
MessageServices.Current.Publish(SEND_NC_STATUS, null, ncAdapter.numericalControl.NC_IsConnected());
|
||||
|
||||
Thread.Sleep(1000);
|
||||
}
|
||||
|
||||
|
||||
if(NcConfig.NcVendor == NC_VENDOR.FANUC || NcConfig.NcVendor == NC_VENDOR.OSAI)
|
||||
{
|
||||
using (NcToolTableAdapter toolTable = new NcToolTableAdapter())
|
||||
{
|
||||
toolTable.Connect();
|
||||
// After reconecction write option
|
||||
cmsError = toolTable.SetupNcToolManager();
|
||||
if (cmsError.IsError())
|
||||
ManageLibraryError(cmsError);
|
||||
// cmsError = toolTable.RestoreTableLock();
|
||||
}
|
||||
}
|
||||
if (!cmsError.IsError())
|
||||
{
|
||||
if (ServerStartupConfig.AutoOpenCmsClient)
|
||||
@@ -1122,7 +959,6 @@ public static class ThreadsFunctions
|
||||
case CMS_ERROR_CODES.SIEMENS_ENVIRONMENT_NOT_FOUND:
|
||||
case CMS_ERROR_CODES.OSAI_TT_FOLDER_NOT_FOUND:
|
||||
case CMS_ERROR_CODES.OPTION_NOT_CONSISTENT:
|
||||
case CMS_ERROR_CODES.SIEMENS_TOOL_TABLE_ERROR:
|
||||
ManageError(ERROR_LEVEL.FATAL, cmsError.localizationKey);
|
||||
break;
|
||||
|
||||
|
||||
@@ -18,13 +18,10 @@ namespace Thermo.Active.Core
|
||||
ThreadsFunctions.ReadEnabledFunctionality,
|
||||
ThreadsFunctions.ReadExpiredMaintenances,
|
||||
ThreadsFunctions.ReadAxesPositionsData,
|
||||
ThreadsFunctions.ReadMagazinesStatus,
|
||||
ThreadsFunctions.ReadUserSoftKeysData,
|
||||
ThreadsFunctions.ReadHeadsData,
|
||||
ThreadsFunctions.ReadAxesNamesData,
|
||||
ThreadsFunctions.ReadActiveProgramData,
|
||||
ThreadsFunctions.UpdateToolsData,
|
||||
ThreadsFunctions.ReadNcMagazineActive,
|
||||
//ThreadsFunctions.ReadPartProgramQueueData,
|
||||
ThreadsFunctions.ReadScadaData,
|
||||
ThreadsFunctions.ReadM154Data
|
||||
|
||||
@@ -1,685 +0,0 @@
|
||||
using Thermo.Active.Model.DatabaseModels;
|
||||
using Thermo.Active.Model.DTOModels.ToolModels;
|
||||
using Thermo.Active.Utils;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data.Entity;
|
||||
using System.Linq;
|
||||
using static Thermo.Active.Utils.SupportFunctions;
|
||||
using static Thermo.Active.Model.Constants;
|
||||
|
||||
namespace Thermo.Active.Database.Controllers
|
||||
{
|
||||
public class NcToolManagerController : IDisposable
|
||||
{
|
||||
public DatabaseContext dbCtx;
|
||||
|
||||
public NcToolManagerController()
|
||||
{
|
||||
// Initialize database context
|
||||
dbCtx = new DatabaseContext();
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
// Clear database context
|
||||
dbCtx.Dispose();
|
||||
}
|
||||
|
||||
public List<DbNcFamilyModel> FindFamilies()
|
||||
{
|
||||
List<DbNcFamilyModel> families = dbCtx
|
||||
.Families
|
||||
.Include("Tools")
|
||||
.ToList();
|
||||
|
||||
return families;
|
||||
}
|
||||
|
||||
public List<DTONcFamilyModel> GetFamilies()
|
||||
{
|
||||
List<DbNcFamilyModel> dbFamilies = FindFamilies();
|
||||
|
||||
return dbFamilies
|
||||
.Select(x => (DTONcFamilyModel)x)
|
||||
.ToList();
|
||||
}
|
||||
|
||||
public List<DbNcFamilyModel> FindFamiliesByShankId(int shankId)
|
||||
{
|
||||
DbNcShankModel shank = FindShankWithTools(shankId);
|
||||
// Get only families id
|
||||
short[] ids = shank.Tools.Select(x => x.FamilyId).ToArray();
|
||||
|
||||
return FindFamilies() // Get Families
|
||||
.Where(x => ids.Contains(x.FamilyId)) // Filter by ids
|
||||
.ToList();
|
||||
}
|
||||
|
||||
public DbNcToolModel FindTool(int toolId)
|
||||
{
|
||||
return dbCtx.Tools
|
||||
.Where(x => x.ToolId == toolId)
|
||||
.FirstOrDefault();
|
||||
}
|
||||
|
||||
public DbNcToolModel FindToolWithDependencies(int toolId)
|
||||
{
|
||||
return dbCtx.Tools
|
||||
.Where(x => x.ToolId == toolId)
|
||||
.Include("Family")
|
||||
.Include("Shank")
|
||||
.FirstOrDefault();
|
||||
}
|
||||
|
||||
public DbNcShankModel FindShankWithTools(int shankId)
|
||||
{
|
||||
return dbCtx.Shanks
|
||||
.Include("Tools")
|
||||
.Where(x => x.ShankId == shankId)
|
||||
.FirstOrDefault();
|
||||
}
|
||||
|
||||
public DbNcFamilyModel FindFamily(int familyId)
|
||||
{
|
||||
return dbCtx
|
||||
.Families
|
||||
.Where(x => x.FamilyId == familyId)
|
||||
.Include("Tools")
|
||||
.FirstOrDefault();
|
||||
}
|
||||
|
||||
public List<DbNcToolModel> FindToolsWithDependencies()
|
||||
{
|
||||
List<DbNcToolModel> tools = dbCtx
|
||||
.Tools
|
||||
.Include("Family")
|
||||
.Include("Shank")
|
||||
.ToList();
|
||||
|
||||
return tools;
|
||||
}
|
||||
|
||||
public List<DbNcToolModel> FindToolsByShankIdWithDependencies(int shankId)
|
||||
{
|
||||
List<DbNcToolModel> tools = FindToolsWithDependencies()
|
||||
.Where(x => x.ShankId == shankId)
|
||||
.ToList();
|
||||
|
||||
return tools;
|
||||
}
|
||||
|
||||
public List<DbNcToolModel> FindTools()
|
||||
{
|
||||
List<DbNcToolModel> tools = dbCtx
|
||||
.Tools
|
||||
.ToList();
|
||||
|
||||
return tools;
|
||||
}
|
||||
|
||||
public List<DTONcToolModel> GetTools()
|
||||
{
|
||||
List<DbNcToolModel> dbTools = FindToolsWithDependencies();
|
||||
|
||||
return dbTools
|
||||
.Select(x => (DTONcToolModel)x)
|
||||
.ToList();
|
||||
}
|
||||
|
||||
public List<DbNcShankModel> FindShanks()
|
||||
{
|
||||
List<DbNcShankModel> shanks = dbCtx
|
||||
.Shanks
|
||||
.Include("MagazinePosition")
|
||||
.ToList();
|
||||
|
||||
return shanks;
|
||||
}
|
||||
|
||||
public DbNcShankModel FindShank(int shankId)
|
||||
{
|
||||
return dbCtx.Shanks
|
||||
.Where(x => x.ShankId == shankId)
|
||||
.FirstOrDefault();
|
||||
}
|
||||
|
||||
public DbNcShankModel FindShanksByPositions(int magazineId, int positionId)
|
||||
{
|
||||
DbNcShankModel shank = FindShanks()
|
||||
.Where(x => x.MagazineId == magazineId && x.PositionId == positionId)
|
||||
.FirstOrDefault();
|
||||
|
||||
return shank;
|
||||
}
|
||||
|
||||
public List<DbNcShankModel> FindShanksByFamilyId(int familyId)
|
||||
{
|
||||
return dbCtx
|
||||
.Tools
|
||||
.Include("Shank")
|
||||
.Where(x => x.FamilyId == familyId && x.ShankId != null)
|
||||
.Select(x => x.Shank)
|
||||
.ToList();
|
||||
}
|
||||
|
||||
public DbNcShankModel FindShankByToolId(int toolId)
|
||||
{
|
||||
return dbCtx
|
||||
.Tools
|
||||
.Include("Shank")
|
||||
.Where(x => x.ToolId == toolId && x.ShankId != null)
|
||||
.Select(x => x.Shank)
|
||||
.FirstOrDefault();
|
||||
}
|
||||
|
||||
public List<DTONcShankModel> GetShanks()
|
||||
{
|
||||
// Get shank from database
|
||||
List<DbNcShankModel> dbShanks = dbCtx
|
||||
.Shanks
|
||||
.Include("Tools")
|
||||
.ToList();
|
||||
|
||||
// Populate dto shanks
|
||||
List<DTONcShankModel> dtoShanks = dbShanks
|
||||
.Select(x => (DTONcShankModel)x)
|
||||
.ToList();
|
||||
|
||||
return dtoShanks;
|
||||
}
|
||||
|
||||
public List<DTONcShankModel> GetShanksWithSpace()
|
||||
{
|
||||
// Populate nks
|
||||
List<DTONcShankModel> dtoShanks = GetShanks();
|
||||
|
||||
List<DTONcFamilyModel> dtoFamilies = GetFamilies();
|
||||
|
||||
// Calculate & set space occupied for each shank
|
||||
foreach(var shank in dtoShanks)
|
||||
{
|
||||
// Get only families id
|
||||
short[] ids = shank.ChildsTools.Select(x => x.FamilyId).ToArray();
|
||||
|
||||
// Get Families data
|
||||
List<DTONcFamilyModel> families = dtoFamilies
|
||||
.Where(x => ids.Contains(x.Id))
|
||||
.ToList();
|
||||
|
||||
if (families.Count() > 0)
|
||||
{
|
||||
// Find max between families
|
||||
shank.MaxRight = families.Max(x => x.RightSize);
|
||||
shank.MaxLeft = families.Max(x => x.LeftSize);
|
||||
}
|
||||
}
|
||||
|
||||
return dtoShanks;
|
||||
}
|
||||
|
||||
public DTONcShankModel GetShank(int shankId)
|
||||
{
|
||||
// Get shank from database
|
||||
DTONcShankModel dtoShanks = GetShanksWithSpace()
|
||||
.Where(x => x.Id == shankId)
|
||||
.FirstOrDefault();
|
||||
|
||||
return dtoShanks;
|
||||
}
|
||||
|
||||
public List<DbNcMagazinePositionModel> FindMagazinesPositions()
|
||||
{
|
||||
List<DbNcMagazinePositionModel> positions = dbCtx
|
||||
.MagazinePositions
|
||||
.ToList();
|
||||
|
||||
return positions;
|
||||
}
|
||||
|
||||
public List<DbNcMagazinePositionModel> FindMagazinePositions(byte magId)
|
||||
{
|
||||
return dbCtx
|
||||
.MagazinePositions
|
||||
.Where(x => x.MagazineId == magId)
|
||||
.ToList();
|
||||
}
|
||||
|
||||
public void GetShankMaxSpaceOccupied(int shankId, out int maxRight, out int maxLeft)
|
||||
{
|
||||
// Get families
|
||||
List<DbNcFamilyModel> families = FindFamiliesByShankId(shankId);
|
||||
// Find max
|
||||
maxRight = families.Max(x => x.RightSize);
|
||||
maxLeft = families.Max(x => x.LeftSize);
|
||||
}
|
||||
|
||||
public List<DTONcMagazinePositionModel> GetMagazinePositions(byte magId)
|
||||
{
|
||||
// Get only magazine positions that match with magazineId
|
||||
List<DTONcMagazinePositionModel> magPos = FindMagazinePositions(magId).Select(x => (DTONcMagazinePositionModel)x).ToList();
|
||||
// Get&filter shanks by magazineId in order to get only mounted shanks in the current magazineId
|
||||
List<DbNcShankModel> shanks = dbCtx.Shanks.Where(x => x.MagazineId == magId).ToList();
|
||||
|
||||
foreach(DbNcShankModel shank in shanks)
|
||||
{
|
||||
// Populate magazinePosition shank Id
|
||||
var pos = magPos
|
||||
.FirstOrDefault(x => x.PositionId == shank.PositionId);
|
||||
|
||||
if(pos != null)
|
||||
pos.ShankId = shank.ShankId;
|
||||
}
|
||||
// Convert in DTOModel and return
|
||||
return magPos;
|
||||
}
|
||||
|
||||
public DbNcMagazinePositionModel FindMagazinePosition(byte magId, byte posId)
|
||||
{
|
||||
DbNcMagazinePositionModel positions = dbCtx
|
||||
.MagazinePositions
|
||||
.FirstOrDefault(x => x.MagazineId == magId && x.PositionId == posId);
|
||||
|
||||
return positions;
|
||||
}
|
||||
|
||||
public List<DTONcShankModel> GetMountedShanks(int magazineId)
|
||||
{
|
||||
List<DTONcShankModel> dtoShanks = GetShanksWithSpace()
|
||||
.Where(x => x.MagazineId != null && x.MagazineId == magazineId)
|
||||
.ToList();
|
||||
|
||||
return dtoShanks;
|
||||
}
|
||||
|
||||
public List<DbNcToolModel> GetMountedTools()
|
||||
{
|
||||
List<DbNcToolModel> tools = FindToolsWithDependencies()
|
||||
.Where(x => x.Shank != null && x.Shank.MagazineId != null)
|
||||
.ToList();
|
||||
|
||||
return tools;
|
||||
}
|
||||
|
||||
public List<DTONcShankModel> GetAvailableShanksWithChilds()
|
||||
{
|
||||
List<DTONcShankModel> dtoShanks = GetShanksWithSpace()
|
||||
.Where(x => x.MagazineId == null && x.ChildsTools.Count > 0)
|
||||
.ToList();
|
||||
|
||||
return dtoShanks;
|
||||
}
|
||||
|
||||
public List<DTONcToolModel> GetAvailableTools()
|
||||
{
|
||||
List<DTONcToolModel> dtoTools = GetTools()
|
||||
.Where(x => x.ShankId == null || x.ShankId == 0)
|
||||
.ToList();
|
||||
|
||||
return dtoTools;
|
||||
}
|
||||
|
||||
public DbNcToolModel AddTool(DTONewNcToolModel dtoTool, short toolId)
|
||||
{
|
||||
// Copy data
|
||||
DbNcToolModel dbTool = (DbNcToolModel)dtoTool;
|
||||
|
||||
if (toolId == 0)
|
||||
// Get next id
|
||||
dbTool.ToolId = GetFirstFreeId(dbCtx.Tools.Select(x => x.ToolId).ToList());
|
||||
else
|
||||
dbTool.ToolId = toolId;
|
||||
|
||||
dbCtx.Tools.Add(dbTool);
|
||||
|
||||
dbCtx.SaveChanges();
|
||||
// Get foreign key data
|
||||
dbCtx.Entry(dbTool).Reference(x => x.Family).Load();
|
||||
dbCtx.Entry(dbTool).Reference(x => x.Shank).Load();
|
||||
|
||||
return dbTool;
|
||||
}
|
||||
|
||||
public DbNcToolModel UpdateTool(int toolId, DTONewNcToolModel dtoTool)
|
||||
{
|
||||
DbNcToolModel tool = FindTool(toolId);
|
||||
|
||||
tool.Status = ((DbNcToolModel)dtoTool).Status;
|
||||
var shankId = tool.ShankId;
|
||||
|
||||
// Update db model
|
||||
SupportFunctions.CopyProperties(dtoTool, tool);
|
||||
tool.ShankId = shankId;
|
||||
|
||||
// Save
|
||||
dbCtx.SaveChanges();
|
||||
|
||||
return tool;
|
||||
}
|
||||
|
||||
public DbNcToolModel UpdateToolOffset(int toolId, int position, short offsetId)
|
||||
{
|
||||
DbNcToolModel tool = FindTool(toolId);
|
||||
|
||||
switch (position)
|
||||
{
|
||||
case 1:
|
||||
tool.OffsetId1 = offsetId;
|
||||
break;
|
||||
case 2:
|
||||
tool.OffsetId2 = offsetId;
|
||||
break;
|
||||
case 3:
|
||||
tool.OffsetId3 = offsetId;
|
||||
break;
|
||||
}
|
||||
|
||||
// Save
|
||||
dbCtx.SaveChanges();
|
||||
|
||||
return tool;
|
||||
}
|
||||
|
||||
public void DeleteTool(int toolId)
|
||||
{
|
||||
DbNcToolModel tool = FindTool(toolId);
|
||||
if(tool != null)
|
||||
DeleteTool(tool);
|
||||
}
|
||||
|
||||
public void DeleteTool(DbNcToolModel tool)
|
||||
{
|
||||
dbCtx.Tools.Remove(tool);
|
||||
|
||||
dbCtx.SaveChanges();
|
||||
}
|
||||
|
||||
public DbNcFamilyModel AddFamily(DTONcFamilyModel family)
|
||||
{
|
||||
DbNcFamilyModel dbFamily = (DbNcFamilyModel)family;
|
||||
|
||||
// Get next free id if id is 0
|
||||
if (dbFamily.FamilyId == 0)
|
||||
dbFamily.FamilyId = GetFirstFreeId(dbCtx.Families.Select(x => x.FamilyId).ToList());
|
||||
|
||||
dbFamily.Name = DEFAULT_FAM_NAME + dbFamily.FamilyId;
|
||||
dbCtx.Families.Add(dbFamily);
|
||||
|
||||
dbCtx.SaveChanges();
|
||||
|
||||
return dbFamily;
|
||||
}
|
||||
|
||||
public DbNcFamilyModel UpdateFamily(int familyId, DTONewNcFamilyModel family)
|
||||
{
|
||||
DbNcFamilyModel dbFamily = FindFamily(familyId);
|
||||
// Copy data from NewModel to DbModel
|
||||
SupportFunctions.CopyProperties(family, dbFamily);
|
||||
// Set cooling byte
|
||||
dbFamily.CoolingByte = ((DbNcFamilyModel)family).CoolingByte;
|
||||
|
||||
dbCtx.SaveChanges();
|
||||
// Connect tools data
|
||||
dbCtx.Entry(dbFamily).Collection(x => x.Tools).Load();
|
||||
|
||||
return dbFamily;
|
||||
}
|
||||
|
||||
public void DeleteFamily(int famId)
|
||||
{
|
||||
var family = FindFamily(famId);
|
||||
|
||||
dbCtx.Families.Remove(family);
|
||||
|
||||
dbCtx.SaveChanges();
|
||||
}
|
||||
|
||||
public DbNcShankModel AddShank(DTONewNcShankModel shank, short shankId = 0)
|
||||
{
|
||||
DbNcShankModel dbShank = (DbNcShankModel)shank;
|
||||
|
||||
if (shankId == 0)
|
||||
// Get next id
|
||||
dbShank.ShankId = GetFirstFreeId(dbCtx.Shanks.Select(x => x.ShankId).ToList());
|
||||
else
|
||||
dbShank.ShankId = shankId;
|
||||
|
||||
dbCtx.Shanks.Add(dbShank);
|
||||
|
||||
dbCtx.SaveChanges();
|
||||
|
||||
|
||||
return dbShank;
|
||||
}
|
||||
|
||||
public DbNcShankModel UpdateShank(int shankId, DTONewNcShankModel dtoShank)
|
||||
{
|
||||
DbNcShankModel ncShank = FindShankWithTools(shankId);
|
||||
|
||||
return UpdateShank(ncShank, dtoShank);
|
||||
}
|
||||
|
||||
public DbNcShankModel UpdateShank(DbNcShankModel dbShank, DTONewNcShankModel dtoShank)
|
||||
{
|
||||
dbShank.Balluf = dtoShank.Balluf;
|
||||
dbShank.MagazinePositionType = dtoShank.MagazinePositionType;
|
||||
|
||||
dbCtx.SaveChanges();
|
||||
|
||||
dbCtx.Entry(dbShank).Collection(x => x.Tools).Load();
|
||||
|
||||
return dbShank;
|
||||
}
|
||||
|
||||
public DbNcShankModel DeleteNcShank(int shankId)
|
||||
{
|
||||
DbNcShankModel shank = FindShankWithTools(shankId);
|
||||
DeleteNcShank(shank);
|
||||
|
||||
return shank;
|
||||
}
|
||||
|
||||
public void DeleteNcShank(DbNcShankModel shank)
|
||||
{
|
||||
dbCtx.Shanks.Remove(shank);
|
||||
|
||||
dbCtx.SaveChanges();
|
||||
}
|
||||
|
||||
public DbNcMagazinePositionModel UpdatePosition(DbNcMagazinePositionModel dbPos, DTONcMagazinePositionModel dtoPos)
|
||||
{
|
||||
dbCtx.MagazinePositions.Attach(dbPos);
|
||||
dbPos.Type = dtoPos.Type;
|
||||
dbPos.Disabled = dtoPos.Disabled;
|
||||
|
||||
dbCtx.SaveChanges();
|
||||
|
||||
return dbPos;
|
||||
}
|
||||
|
||||
public DbNcMagazinePositionModel LoadShankInMagazine(byte magazineId, byte positionId, DbNcShankModel shank)
|
||||
{
|
||||
dbCtx.Shanks.Attach(shank);
|
||||
// Set ids with new positions
|
||||
shank.MagazineId = magazineId;
|
||||
shank.PositionId = positionId;
|
||||
|
||||
// Set original Ids
|
||||
shank.OriginMagazineId = magazineId;
|
||||
shank.OriginPositionId = positionId;
|
||||
|
||||
dbCtx.SaveChanges();
|
||||
|
||||
return FindMagazinePosition(magazineId, positionId);
|
||||
}
|
||||
|
||||
public DbNcMagazinePositionModel UnloadShankInMagazine(byte magazineId, byte positionId, DbNcShankModel shank)
|
||||
{
|
||||
dbCtx.Shanks.Attach(shank);
|
||||
// set id to null
|
||||
shank.MagazineId = null;
|
||||
shank.PositionId = null;
|
||||
|
||||
shank.OriginMagazineId = null;
|
||||
shank.OriginPositionId = null;
|
||||
|
||||
dbCtx.SaveChanges();
|
||||
|
||||
return FindMagazinePosition(magazineId, positionId);
|
||||
}
|
||||
|
||||
public DTONcShankModel LoadToolIntoShank(DbNcToolModel tool, short shankId)
|
||||
{
|
||||
dbCtx.Tools.Attach(tool);
|
||||
// Set tool shankId
|
||||
tool.ShankId = shankId;
|
||||
|
||||
dbCtx.SaveChanges();
|
||||
|
||||
return GetShank(shankId);
|
||||
}
|
||||
|
||||
public DTONcShankModel UnloadToolFromShank(DbNcToolModel tool)
|
||||
{
|
||||
dbCtx.Tools.Attach(tool);
|
||||
int? shankId = tool.ShankId;
|
||||
// Set to null shankId
|
||||
tool.ShankId = null;
|
||||
|
||||
dbCtx.SaveChanges();
|
||||
|
||||
return GetShank(shankId.Value);
|
||||
}
|
||||
|
||||
public void SetupMagazinePositions(List<DbNcMagazinePositionModel> config)
|
||||
{
|
||||
dbCtx.MagazinePositions.AddRange(config);
|
||||
dbCtx.SaveChanges();
|
||||
}
|
||||
|
||||
public void UpdateToolsData(List<DbNcToolModel> tools)
|
||||
{
|
||||
foreach (var tool in tools)
|
||||
{
|
||||
DbNcToolModel tmpTool = dbCtx.Tools.Where(x => x.ToolId == tool.ToolId).FirstOrDefault();
|
||||
tmpTool = tool;
|
||||
}
|
||||
|
||||
dbCtx.SaveChanges();
|
||||
}
|
||||
|
||||
public DTOExportToolTableModel GetExportData()
|
||||
{
|
||||
return new DTOExportToolTableModel
|
||||
{
|
||||
Tools = FindTools(),
|
||||
Families = FindFamilies(),
|
||||
Shanks = FindShanks()
|
||||
.Select(x => {
|
||||
// Reset positional Data
|
||||
x.MagazineId = null;
|
||||
x.PositionId = null;
|
||||
x.OriginMagazineId = null;
|
||||
x.OriginPositionId = null;
|
||||
|
||||
return x; })
|
||||
.ToList()
|
||||
};
|
||||
}
|
||||
|
||||
public List<DTOImportStatusModel> ImportData(DTOExportToolTableModel data)
|
||||
{
|
||||
List<DTOImportStatusModel> importStatus = new List<DTOImportStatusModel>();
|
||||
|
||||
List<DbNcToolModel> tools = FindTools();
|
||||
List<DbNcFamilyModel> families = FindFamilies();
|
||||
List<DbNcShankModel> shanks = FindShanks();
|
||||
|
||||
if(data.Families != null)
|
||||
// loop thought new families
|
||||
foreach (var family in data.Families)
|
||||
{
|
||||
// Check if not exist
|
||||
if (families.FirstOrDefault(x => x.FamilyId == family.FamilyId) == null)
|
||||
{
|
||||
dbCtx.Families.Add(family);
|
||||
// Set status
|
||||
importStatus.Add(new DTOImportStatusModel()
|
||||
{
|
||||
Id = family.FamilyId,
|
||||
Status = IMPORT_STATUS.OK.ToString(),
|
||||
Type = "FAMILY"
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
// Set duplicated status
|
||||
importStatus.Add(new DTOImportStatusModel()
|
||||
{
|
||||
Id = family.FamilyId,
|
||||
Status = IMPORT_STATUS.EXIST.ToString(),
|
||||
Type = "FAMILY"
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
if(data.Shanks != null)
|
||||
// loop thought new shanks
|
||||
foreach (var shank in data.Shanks)
|
||||
{
|
||||
// Check if not exist
|
||||
if (shanks.FirstOrDefault(x => x.ShankId == shank.ShankId) == null)
|
||||
{
|
||||
dbCtx.Shanks.Add(shank);
|
||||
importStatus.Add(new DTOImportStatusModel()
|
||||
{
|
||||
Id = shank.ShankId,
|
||||
Status = IMPORT_STATUS.OK.ToString(),
|
||||
Type = "SHANK"
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
importStatus.Add(new DTOImportStatusModel()
|
||||
{
|
||||
Id = shank.ShankId,
|
||||
Status = IMPORT_STATUS.EXIST.ToString(),
|
||||
Type = "SHANK"
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
if(data.Tools != null)
|
||||
// loop thought new tools
|
||||
foreach (var tool in data.Tools)
|
||||
{
|
||||
// Check if not exist
|
||||
if (tools.FirstOrDefault(x => x.ToolId == tool.ToolId) == null)
|
||||
{
|
||||
dbCtx.Tools.Add(tool);
|
||||
importStatus.Add(new DTOImportStatusModel()
|
||||
{
|
||||
Id = tool.ToolId,
|
||||
Status = IMPORT_STATUS.EXIST.ToString(),
|
||||
Type = "TOOL"
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
importStatus.Add(new DTOImportStatusModel()
|
||||
{
|
||||
Id = tool.ToolId,
|
||||
Status = IMPORT_STATUS.EXIST.ToString(),
|
||||
Type = "TOOL"
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// Save
|
||||
dbCtx.SaveChanges();
|
||||
|
||||
return importStatus;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -35,7 +35,6 @@ namespace Thermo.Active.Database
|
||||
// Tool tables
|
||||
public DbSet<DbNcFamilyModel> Families { get; set; }
|
||||
public DbSet<DbNcShankModel> Shanks { get; set; }
|
||||
public DbSet<DbNcToolModel> Tools { get; set; }
|
||||
public DbSet<DbNcMagazinePositionModel> MagazinePositions { get; set; }
|
||||
public DbSet<QueueItemsModel> Queue { get; set; }
|
||||
// Alarms
|
||||
|
||||
@@ -42,7 +42,9 @@ namespace Thermo.Active.Database.Migrations
|
||||
new FunctionAccessModel() { Name = HEADS_CMD, Area = UNDER_HOOD, Enabled = true, WriteLevelMin = 1, ReadLevelMin = 1, PlcId = 6},
|
||||
new FunctionAccessModel() { Name = AXES_SELECTION, Area = UNDER_HOOD, Enabled = true, WriteLevelMin = 1, ReadLevelMin = 1, PlcId = 7},
|
||||
|
||||
new FunctionAccessModel() { Name = TOOL_MANAGER, Area = TOOLING_KEY, Enabled = true, WriteLevelMin = 1, ReadLevelMin = 1, PlcId = 8},
|
||||
#if false
|
||||
new FunctionAccessModel() { Name = TOOL_MANAGER, Area = TOOLING_KEY, Enabled = true, WriteLevelMin = 1, ReadLevelMin = 1, PlcId = 8 },
|
||||
#endif
|
||||
new FunctionAccessModel() { Name = MAINTENANCE, Area = MAINTENANCE_KEY, Enabled = true, WriteLevelMin = 1, ReadLevelMin = 1, PlcId = 9},
|
||||
|
||||
|
||||
|
||||
@@ -115,7 +115,6 @@
|
||||
<Compile Include="Controllers\MachinesController.cs" />
|
||||
<Compile Include="Controllers\MaintenancesController.cs" />
|
||||
<Compile Include="Controllers\QueueController.cs" />
|
||||
<Compile Include="Controllers\NcToolManagerController.cs" />
|
||||
<Compile Include="Controllers\RedisController.cs" />
|
||||
<Compile Include="Controllers\SessionsController.cs" />
|
||||
<Compile Include="Controllers\UsersController.cs" />
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Thermo.Active.Model.ConfigModels
|
||||
{
|
||||
public class MagazineNamesModel
|
||||
{
|
||||
public int MagazineId { get; set; }
|
||||
|
||||
public bool AssistedTooling { get; set; }
|
||||
|
||||
public Dictionary<string, string> LocalizedNames { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,46 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Thermo.Active.Model.ConfigModels
|
||||
{
|
||||
public class ToolManagerConfigModel
|
||||
{
|
||||
|
||||
public string ToolMetricType { get; set; }
|
||||
public bool FamilyOpt { get; set; }
|
||||
public bool ShankOpt { get; set; }
|
||||
public bool MagPosTypeOpt { get; set; }
|
||||
public bool OffsetOpt { get; set; }
|
||||
public bool ReviveOpt { get; set; }
|
||||
public bool GammaOpt { get; set; }
|
||||
public bool LifeOpt { get; set; }
|
||||
public bool TcpOpt { get; set; }
|
||||
public bool CoolingOpt { get; set; }
|
||||
public bool MultidimensionalShankOpt { get; set; }
|
||||
public bool SelfAdaptivePathOpt { get; set; }
|
||||
public bool DynamicCompensationOpt { get; set; }
|
||||
public bool BallufOpt { get; set; }
|
||||
public bool IntegrityCheckOpt { get; set; }
|
||||
|
||||
public CooligTranslations CooligsTranslations { get; set; }
|
||||
|
||||
public List<MagazineNamesModel> MagazineNames { get; set; }
|
||||
|
||||
public List<ToolTypeConfigModel> ToolTypes { get; set; }
|
||||
}
|
||||
|
||||
public class CooligTranslations
|
||||
{
|
||||
public Dictionary<string, string> Cooling { get; set; }
|
||||
public Dictionary<string, string> Cooling1 { get; set; }
|
||||
public Dictionary<string, string> Cooling2 { get; set; }
|
||||
public Dictionary<string, string> Cooling3 { get; set; }
|
||||
public Dictionary<string, string> Cooling4 { get; set; }
|
||||
public Dictionary<string, string> Cooling5 { get; set; }
|
||||
public Dictionary<string, string> Cooling6 { get; set; }
|
||||
public Dictionary<string, string> Cooling7 { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Thermo.Active.Model.ConfigModels
|
||||
{
|
||||
public class ToolTypeConfigModel
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
public bool Disabled { get; set; }
|
||||
|
||||
public Dictionary<string, string> LocalizedNames { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -148,7 +148,6 @@ namespace Thermo.Active.Model
|
||||
public class AREAS
|
||||
{
|
||||
public const string PRODUCTION_KEY = "production";
|
||||
public const string TOOLING_KEY = "tooling";
|
||||
public const string REPORT_KEY = "report";
|
||||
public const string ALARMS_KEY = "alarms";
|
||||
public const string MAINTENANCE_KEY = "maintenance";
|
||||
@@ -158,6 +157,8 @@ namespace Thermo.Active.Model
|
||||
public const string UNDER_HOOD = "underHood";
|
||||
public const string JOBEDITOR_KEY = "jobeditor";
|
||||
public const string USERS_KEY = "users";
|
||||
public const string THERMO_KEY = "tooling";
|
||||
public const string RISC_KEY = "risc";
|
||||
}
|
||||
|
||||
// Config File Names
|
||||
@@ -198,9 +199,6 @@ namespace Thermo.Active.Model
|
||||
public const string NC_SOFTKEYS_CONFIG_SCHEMA_PATH = RESOURCE_DIRECTORY + "ncSoftKeyConfigValidator.xsd";
|
||||
public const string NC_SOFTKEYS_CONFIG_PATH = CONFIG_DIRECTORY + "ncSoftKeyConfig.xml";
|
||||
|
||||
public const string TOOL_MANAGER_CONFIG_SCHEMA_PATH = RESOURCE_DIRECTORY + "toolManagerConfigValidator.xsd";
|
||||
public const string TOOL_MANAGER_CONFIG_PATH = CONFIG_DIRECTORY + "toolManagerConfig.xml";
|
||||
|
||||
public const string CMS_CONNECT_CONFIG_SCHEMA_PATH = RESOURCE_DIRECTORY + "cmsConnectConfigValidator.xsd";
|
||||
public const string CMS_CONNECT_CONFIG_PATH = CONFIG_DIRECTORY + "cmsConnectConfig.xml";
|
||||
|
||||
@@ -241,14 +239,11 @@ namespace Thermo.Active.Model
|
||||
public const string SEND_NC_SOFTKEYS_DATA = "SEND_NC_SOFTKEYS_DATA";
|
||||
public const string SEND_HEADS_DATA = "SEND_HEADS_DATA";
|
||||
public const string SEND_AXIS_NAMES_DATA = "SEND_AXIS_NAMES_DATA";
|
||||
public const string SEND_MAGAZINES_STATUS = "SEND_MAGAZINES_STATUS";
|
||||
public const string SEND_ACTIVE_PROGRAM_DATA = "SEND_ACTIVE_PROGRAM_DATA";
|
||||
public const string UPDATE_TOOLS_DATA = "UPDATE_TOOLS_DATA";
|
||||
public const string NC_MAGAZINE_IS_ACTIVE = "UPDATE_NC_MAGAZINE_STATUS";
|
||||
public const string SEND_QUEUE_DATA = "SEND_QUEUE_DATA";
|
||||
public const string SEND_M155_DATA = "SEND_M155_DATA";
|
||||
public const string SEND_SCADA_DATA = "SEND_SCADA_DATA";
|
||||
public const string ASSISTED_TOOLING_DATA = "ASSISTED_TOOLING_DATA";
|
||||
public const string SEND_RECIPE_STATUS = "SEND_RECIPE_STATUS";
|
||||
|
||||
public const string BROADCAST_DATA = "BROADCAST_DATA";
|
||||
|
||||
@@ -271,18 +266,16 @@ namespace Thermo.Active.Model
|
||||
public const string NC_SOFTKEY = "ncSoftkeys";
|
||||
public const string USER_SOFTKEY = "userSoftkeys";
|
||||
public const string HEADS_CMD = "headsCmd";
|
||||
public const string TOOL_MANAGER = "toolManager";
|
||||
public const string MAINTENANCE = "maintenance";
|
||||
public const string AXES_SELECTION = "axesSoftkeys";
|
||||
public const string THERMO_MANAGER = "thermoManager";
|
||||
public const string RISC_MANAGER = "riscManager";
|
||||
}
|
||||
|
||||
public static class API_ERROR_KEYS
|
||||
{
|
||||
public const string INCORRECT_PARAMETERS = "error_incorrect_parameters";
|
||||
public const string MAGAZINE_POSITION_OCCUPIED = "error_magazine_position_occupied";
|
||||
public const string TOOL_IS_MOUNTED = "error_tool_mounted";
|
||||
public const string OPTION_NOT_ACTIVE = "error_option_not_active";
|
||||
public const string MAG_POS_DISABLED = "error_mag_pos_disabled";
|
||||
public const string ID_ALREADY_EXIST = "error_id_already_exist";
|
||||
public const string PASSWORD_IS_INVALID = "error_password_is_invalid";
|
||||
public const string IMPORT_FILE_NOT_VALID = "error_import_file_not_valid";
|
||||
|
||||
@@ -57,67 +57,13 @@ namespace Thermo.Active.Model.DTOModels
|
||||
}
|
||||
}
|
||||
|
||||
public class DTOToolInSpindleModel
|
||||
{
|
||||
// Siemens data
|
||||
public string ToolName;
|
||||
public int ChildId;
|
||||
// Fanuc-Osai
|
||||
public int FamilyId;
|
||||
public int ShankId;
|
||||
|
||||
public bool Disabled { get; set; }
|
||||
public bool Broken { get; set; }
|
||||
public bool Measured { get; set; }
|
||||
public int ResidualLife { get; set; }
|
||||
|
||||
public int MaxSpeed { get; set; }
|
||||
public byte MaxLoad { get; set; }
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
// Object is not a DTOSpindleModel
|
||||
if (!(obj is DTOToolInSpindleModel item))
|
||||
return false;
|
||||
|
||||
// Compare the fields
|
||||
if (ToolName != item.ToolName)
|
||||
return false;
|
||||
|
||||
if (ChildId != item.ChildId)
|
||||
return false;
|
||||
|
||||
if (Disabled != item.Disabled)
|
||||
return false;
|
||||
|
||||
if (Broken != item.Broken)
|
||||
return false;
|
||||
|
||||
if (Measured != item.Measured)
|
||||
return false;
|
||||
|
||||
if (ResidualLife != item.ResidualLife)
|
||||
return false;
|
||||
|
||||
if (MaxSpeed != item.MaxSpeed)
|
||||
return false;
|
||||
|
||||
if (MaxLoad != item.MaxLoad)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
public class DTOSpindleModel : DTOHeadModel
|
||||
{
|
||||
public int ActualSpeed;
|
||||
public short Load;
|
||||
public ushort MountedTool;
|
||||
public bool Configured;
|
||||
public ROTATION Rotation;
|
||||
public bool FixedHead;
|
||||
public DTOToolInSpindleModel ToolData;
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
@@ -132,18 +78,12 @@ namespace Thermo.Active.Model.DTOModels
|
||||
if (Load != item.Load)
|
||||
return false;
|
||||
|
||||
if (MountedTool != item.MountedTool)
|
||||
return false;
|
||||
|
||||
if (Configured != item.Configured)
|
||||
return false;
|
||||
|
||||
if (Rotation != item.Rotation)
|
||||
return false;
|
||||
|
||||
if (ToolData != null && !ToolData.Equals(item.ToolData))
|
||||
return false;
|
||||
|
||||
// Call Parent equals
|
||||
return base.Equals(item);
|
||||
}
|
||||
|
||||
@@ -10,7 +10,6 @@ namespace Thermo.Active.Model.DTOModels
|
||||
public class DTOStartupConfigurationModel
|
||||
{
|
||||
public AreasConfigModel ProductionConfig;
|
||||
public AreasConfigModel ToolingConfig;
|
||||
public AreasConfigModel ReportConfig;
|
||||
public AreasConfigModel AlarmsConfig;
|
||||
public AreasConfigModel MaintenanceConfig;
|
||||
|
||||
@@ -7,12 +7,10 @@ namespace Thermo.Active.Model.DTOModels.JobModels
|
||||
{
|
||||
public string Description;
|
||||
public TimeSpan ExecutionTime;
|
||||
public List<int> Tools;
|
||||
public List<DTOJobCustomParamModel> Customs;
|
||||
|
||||
public DTOMetadataFieldsModel()
|
||||
{
|
||||
Tools = new List<int>();
|
||||
Customs = new List<DTOJobCustomParamModel>();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,13 +5,11 @@ namespace Thermo.Active.Model.DTOModels.JobModels
|
||||
public class DTOMetadataModel
|
||||
{
|
||||
public DTOGenericParamModel Generics;
|
||||
public List<int> Tools;
|
||||
public List<DTOJobCustomParamModel> Customs;
|
||||
|
||||
public DTOMetadataModel()
|
||||
{
|
||||
Generics = new DTOGenericParamModel();
|
||||
Tools = new List<int>();
|
||||
Customs = new List<DTOJobCustomParamModel>();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,58 +0,0 @@
|
||||
using static CMS_CORE_Library.Models.DataStructures;
|
||||
|
||||
namespace Thermo.Active.Model.DTOModels.ToolModels
|
||||
{
|
||||
public class DTOAssistedToolingModel
|
||||
{
|
||||
public ushort ToolId { get; set; }
|
||||
public ushort MagazineId { get; set; }
|
||||
public ushort PositionId { get; set; }
|
||||
public ASSISTED_TOOLING_ACTION Action { get; set; }
|
||||
}
|
||||
|
||||
public class DTOAssistedToolingEndValueModel : AssistedToolingModel
|
||||
{
|
||||
public DTOAssistedToolingEndValueModel()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public DTOAssistedToolingEndValueModel(AssistedToolingModel data)
|
||||
{
|
||||
Action = data.Action;
|
||||
IsActive = data.IsActive;
|
||||
MagazineId = data.MagazineId;
|
||||
PositionId = data.PositionId;
|
||||
ToolId = data.ToolId;
|
||||
}
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
|
||||
if (!(obj is DTOAssistedToolingEndValueModel item))
|
||||
return false;
|
||||
|
||||
if (IsActive != item.IsActive)
|
||||
return false;
|
||||
|
||||
if (ToolId != item.ToolId)
|
||||
return false;
|
||||
|
||||
if (MagazineId != item.MagazineId)
|
||||
return false;
|
||||
|
||||
if (PositionId != item.PositionId)
|
||||
return false;
|
||||
|
||||
if (Action != item.Action)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return base.GetHashCode();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
using CMS_CORE_Library.Models;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Thermo.Active.Model.DTOModels.ToolModels
|
||||
{
|
||||
public class DTOEdgeModel
|
||||
{
|
||||
public double ResidualLife { get; set; }
|
||||
|
||||
public double NominalLife { get; set; }
|
||||
|
||||
public double PreAlmLife { get; set; }
|
||||
|
||||
[Required]
|
||||
public Dictionary<string, double> EdgeAdditionalParams { get; set; }
|
||||
|
||||
public static explicit operator EdgeModel(DTOEdgeModel obj)
|
||||
{
|
||||
return new EdgeModel()
|
||||
{
|
||||
Id = 0,
|
||||
NominalLife = obj.NominalLife,
|
||||
ResidualLife = obj.ResidualLife,
|
||||
PreAlmLife = obj.PreAlmLife,
|
||||
EdgeAdditionalParams = obj.EdgeAdditionalParams
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
using Thermo.Active.Model.DatabaseModels;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Thermo.Active.Model.DTOModels.ToolModels
|
||||
{
|
||||
public class DTOExportToolTableModel
|
||||
{
|
||||
public List<DbNcToolModel> Tools { get; set; }
|
||||
public List<DbNcFamilyModel> Families { get; set; }
|
||||
public List<DbNcShankModel> Shanks { get; set; }
|
||||
}
|
||||
|
||||
public class DTOImportStatusModel
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
public string Status { get; set; }
|
||||
|
||||
public string Type { get; set; }
|
||||
}
|
||||
|
||||
public enum IMPORT_STATUS
|
||||
{
|
||||
OK = 0,
|
||||
EXIST = 1
|
||||
}
|
||||
}
|
||||
@@ -1,46 +0,0 @@
|
||||
using CMS_CORE_Library.Models;
|
||||
using static CMS_CORE_Library.Models.DataStructures;
|
||||
|
||||
namespace Thermo.Active.Model.DTOModels.ToolModels
|
||||
{
|
||||
public class DTOMagazineActionModel
|
||||
{
|
||||
public MAGAZINE_ACTIONS action;
|
||||
public int OriginMagazine;
|
||||
public int OriginPosition;
|
||||
public int DestinationMagazine;
|
||||
public int DestinationPosition;
|
||||
public MagazineActionToolModel Tool;
|
||||
|
||||
public static explicit operator DTOMagazineActionModel(MagazineActionModel magazineStatus)
|
||||
{
|
||||
return new DTOMagazineActionModel()
|
||||
{
|
||||
action = magazineStatus.Action,
|
||||
OriginMagazine = magazineStatus.OriginMagazine,
|
||||
OriginPosition = magazineStatus.OriginPosition,
|
||||
DestinationMagazine = magazineStatus.DestinationMagazine,
|
||||
DestinationPosition = magazineStatus.DestinationPosition,
|
||||
Tool = magazineStatus.Tool
|
||||
};
|
||||
}
|
||||
|
||||
public override bool Equals(object obj)
|
||||
{
|
||||
|
||||
// Object is not a DTOMagazineStatusModel instance
|
||||
if (!(obj is DTOMagazineActionModel item))
|
||||
return false;
|
||||
|
||||
if (item.action != action)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return base.GetHashCode();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,242 +0,0 @@
|
||||
using Thermo.Active.Model.DatabaseModels;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Thermo.Active.Model.DTOModels.ToolModels
|
||||
{
|
||||
public class DTONewNcFamilyModel
|
||||
{
|
||||
[Required]
|
||||
public string Name { get; set; }
|
||||
|
||||
[Required]
|
||||
public byte ToolType { get; set; }
|
||||
|
||||
[Required]
|
||||
public byte RightSize { get; set; }
|
||||
|
||||
[Required]
|
||||
public byte LeftSize { get; set; }
|
||||
|
||||
[Required]
|
||||
public byte TcpTable { get; set; }
|
||||
|
||||
[Required]
|
||||
public byte Gamma { get; set; }
|
||||
|
||||
[Required]
|
||||
public byte RotationType { get; set; }
|
||||
|
||||
[Required]
|
||||
public bool Cooling { get; set; }
|
||||
[Required]
|
||||
public bool Cooling1 { get; set; }
|
||||
[Required]
|
||||
public bool Cooling2 { get; set; }
|
||||
[Required]
|
||||
public bool Cooling3 { get; set; }
|
||||
[Required]
|
||||
public bool Cooling4 { get; set; }
|
||||
[Required]
|
||||
public bool Cooling5 { get; set; }
|
||||
[Required]
|
||||
public bool Cooling6 { get; set; }
|
||||
[Required]
|
||||
public bool Cooling7 { get; set; }
|
||||
|
||||
[Required]
|
||||
public int MaxSpeed { get; set; }
|
||||
|
||||
[Required]
|
||||
public byte MaxLoad { get; set; }
|
||||
|
||||
[Required]
|
||||
public byte MinLoadPctAutoload { get; set; }
|
||||
|
||||
[Required]
|
||||
public byte MaxLoadPctAutoload { get; set; }
|
||||
|
||||
[Required]
|
||||
public byte DynamicCompensation { get; set; }
|
||||
|
||||
[Required]
|
||||
public byte MinLoadDynamicCompensation { get; set; }
|
||||
|
||||
[Required]
|
||||
public byte MaxLoadDynamicCompensation { get; set; }
|
||||
|
||||
[Required]
|
||||
public byte LifeType { get; set; }
|
||||
|
||||
[Required]
|
||||
public int NominalLife { get; set; }
|
||||
|
||||
[Required]
|
||||
public int ReviveDelta { get; set; }
|
||||
|
||||
public static explicit operator DTONewNcFamilyModel(DbNcFamilyModel obj)
|
||||
{
|
||||
// Get bit values
|
||||
BitArray coolingByte = new BitArray(new byte[] { obj.CoolingByte });
|
||||
bool[] bits = new bool[8];
|
||||
coolingByte.CopyTo(bits, 0);
|
||||
|
||||
return new DTONcFamilyModel()
|
||||
{
|
||||
Id = obj.FamilyId,
|
||||
Name = obj.Name,
|
||||
ToolType = obj.ToolType,
|
||||
RightSize = obj.RightSize,
|
||||
LeftSize = obj.LeftSize,
|
||||
TcpTable = obj.TcpTable,
|
||||
Gamma = obj.Gamma,
|
||||
RotationType = obj.RotationType,
|
||||
Cooling = bits[0],
|
||||
Cooling1 = bits[1],
|
||||
Cooling2 = bits[2],
|
||||
Cooling3 = bits[3],
|
||||
Cooling4 = bits[4],
|
||||
Cooling5 = bits[5],
|
||||
Cooling6 = bits[6],
|
||||
Cooling7 = bits[7],
|
||||
MaxSpeed = obj.MaxSpeed,
|
||||
MaxLoad = obj.MaxLoad,
|
||||
MinLoadDynamicCompensation = obj.MinLoadDynamicCompensation,
|
||||
MaxLoadDynamicCompensation = obj.MaxLoadDynamicCompensation,
|
||||
MaxLoadPctAutoload = obj.MaxLoadPctAutoload,
|
||||
MinLoadPctAutoload = obj.MinLoadPctAutoload,
|
||||
DynamicCompensation = obj.DynamicCompensation,
|
||||
LifeType = obj.LifeType,
|
||||
NominalLife = obj.NominalLife,
|
||||
ReviveDelta = obj.ReviveDelta
|
||||
};
|
||||
}
|
||||
|
||||
public static explicit operator DbNcFamilyModel(DTONewNcFamilyModel obj)
|
||||
{
|
||||
// Prepare status byte
|
||||
bool[] result = new bool[8] { obj.Cooling, obj.Cooling1, obj.Cooling2, obj.Cooling3, obj.Cooling4, obj.Cooling5, obj.Cooling6, obj.Cooling7 };
|
||||
byte coolingByte = ConvertArrayToByte(result);
|
||||
|
||||
return new DbNcFamilyModel()
|
||||
{
|
||||
Name = obj.Name,
|
||||
ToolType = obj.ToolType,
|
||||
RightSize = obj.RightSize,
|
||||
LeftSize = obj.LeftSize,
|
||||
TcpTable = obj.TcpTable,
|
||||
Gamma = obj.Gamma,
|
||||
RotationType = obj.RotationType,
|
||||
CoolingByte = coolingByte,
|
||||
MaxSpeed = obj.MaxSpeed,
|
||||
MaxLoad = obj.MaxLoad,
|
||||
MinLoadDynamicCompensation = obj.MinLoadDynamicCompensation,
|
||||
MaxLoadDynamicCompensation = obj.MaxLoadDynamicCompensation,
|
||||
MaxLoadPctAutoload = obj.MaxLoadPctAutoload,
|
||||
MinLoadPctAutoload = obj.MinLoadPctAutoload,
|
||||
DynamicCompensation = obj.DynamicCompensation,
|
||||
LifeType = obj.LifeType,
|
||||
NominalLife = obj.NominalLife,
|
||||
ReviveDelta = obj.ReviveDelta,
|
||||
};
|
||||
}
|
||||
|
||||
protected static byte ConvertArrayToByte(bool[] bits)
|
||||
{
|
||||
BitArray bitField = new BitArray(bits); //BitArray takes a bool[]
|
||||
byte[] bytes = new byte[1];
|
||||
bitField.CopyTo(bytes, 0);
|
||||
|
||||
return bytes[0];
|
||||
}
|
||||
}
|
||||
|
||||
public class DTONcFamilyModel : DTONewNcFamilyModel
|
||||
{
|
||||
public short Id { get; set; }
|
||||
|
||||
public List<DTONcToolModel> ChildTools { get; set; }
|
||||
|
||||
public static explicit operator DTONcFamilyModel(DbNcFamilyModel obj)
|
||||
{
|
||||
List<DTONcToolModel> tools = new List<DTONcToolModel>();
|
||||
|
||||
if (obj.Tools != null)
|
||||
foreach (DbNcToolModel tool in obj.Tools)
|
||||
{
|
||||
tools.Add((DTONcToolModel)tool);
|
||||
}
|
||||
|
||||
// Get bit values
|
||||
BitArray coolingByte = new BitArray(new byte[] { obj.CoolingByte });
|
||||
bool[] bits = new bool[8];
|
||||
coolingByte.CopyTo(bits, 0);
|
||||
|
||||
return new DTONcFamilyModel()
|
||||
{
|
||||
Id = obj.FamilyId,
|
||||
Name = obj.Name,
|
||||
ToolType = obj.ToolType,
|
||||
RightSize = obj.RightSize,
|
||||
LeftSize = obj.LeftSize,
|
||||
TcpTable = obj.TcpTable,
|
||||
Gamma = obj.Gamma,
|
||||
RotationType = obj.RotationType,
|
||||
Cooling = bits[0],
|
||||
Cooling1 = bits[1],
|
||||
Cooling2 = bits[2],
|
||||
Cooling3 = bits[3],
|
||||
Cooling4 = bits[4],
|
||||
Cooling5 = bits[5],
|
||||
Cooling6 = bits[6],
|
||||
Cooling7 = bits[7],
|
||||
MaxSpeed = obj.MaxSpeed,
|
||||
MaxLoad = obj.MaxLoad,
|
||||
MinLoadDynamicCompensation = obj.MinLoadDynamicCompensation,
|
||||
MaxLoadDynamicCompensation = obj.MaxLoadDynamicCompensation,
|
||||
MaxLoadPctAutoload = obj.MaxLoadPctAutoload,
|
||||
MinLoadPctAutoload = obj.MinLoadPctAutoload,
|
||||
DynamicCompensation = obj.DynamicCompensation,
|
||||
LifeType = obj.LifeType,
|
||||
NominalLife = obj.NominalLife,
|
||||
ReviveDelta = obj.ReviveDelta,
|
||||
ChildTools = tools
|
||||
};
|
||||
}
|
||||
|
||||
public static explicit operator DbNcFamilyModel(DTONcFamilyModel obj)
|
||||
{
|
||||
// Prepare status byte
|
||||
bool[] result = new bool[8] { obj.Cooling, obj.Cooling1, obj.Cooling2, obj.Cooling3, obj.Cooling4, obj.Cooling5, obj.Cooling6, obj.Cooling7 };
|
||||
byte coolingByte = ConvertArrayToByte(result);
|
||||
|
||||
return new DbNcFamilyModel()
|
||||
{
|
||||
FamilyId = obj.Id,
|
||||
Name = obj.Name,
|
||||
ToolType = obj.ToolType,
|
||||
RightSize = obj.RightSize,
|
||||
LeftSize = obj.LeftSize,
|
||||
TcpTable = obj.TcpTable,
|
||||
Gamma = obj.Gamma,
|
||||
RotationType = obj.RotationType,
|
||||
CoolingByte = coolingByte,
|
||||
MaxSpeed = obj.MaxSpeed,
|
||||
MaxLoad = obj.MaxLoad,
|
||||
MinLoadDynamicCompensation = obj.MinLoadDynamicCompensation,
|
||||
MaxLoadDynamicCompensation = obj.MaxLoadDynamicCompensation,
|
||||
MaxLoadPctAutoload = obj.MaxLoadPctAutoload,
|
||||
MinLoadPctAutoload = obj.MinLoadPctAutoload,
|
||||
DynamicCompensation = obj.DynamicCompensation,
|
||||
LifeType = obj.LifeType,
|
||||
NominalLife = obj.NominalLife,
|
||||
ReviveDelta = obj.ReviveDelta,
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
using Thermo.Active.Model.DatabaseModels;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Thermo.Active.Model.DTOModels.ToolModels
|
||||
{
|
||||
public class DTONcMagazinePositionModel
|
||||
{
|
||||
public byte MagazineId { get; set; }
|
||||
|
||||
public int PositionId { get; set; }
|
||||
|
||||
[Required]
|
||||
public bool Disabled { get; set; }
|
||||
|
||||
[Required]
|
||||
public byte Type { get; set; }
|
||||
|
||||
public int? ShankId { get; set; }
|
||||
|
||||
public static explicit operator DTONcMagazinePositionModel(DbNcMagazinePositionModel obj)
|
||||
{
|
||||
return new DTONcMagazinePositionModel()
|
||||
{
|
||||
MagazineId = obj.MagazineId,
|
||||
PositionId = obj.PositionId,
|
||||
Disabled = obj.Disabled,
|
||||
Type = obj.Type
|
||||
};
|
||||
}
|
||||
|
||||
public static explicit operator DbNcMagazinePositionModel(DTONcMagazinePositionModel obj)
|
||||
{
|
||||
return new DbNcMagazinePositionModel()
|
||||
{
|
||||
MagazineId = obj.MagazineId,
|
||||
PositionId = obj.PositionId,
|
||||
Disabled = obj.Disabled,
|
||||
Type = obj.Type
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Thermo.Active.Model.DTOModels.ToolModels
|
||||
{
|
||||
public class DTONcMountedShankModel
|
||||
{
|
||||
public byte PositionId;
|
||||
public byte MagazineId;
|
||||
public int ShankId;
|
||||
}
|
||||
}
|
||||
@@ -1,93 +0,0 @@
|
||||
using Thermo.Active.Model.DatabaseModels;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Thermo.Active.Model.DTOModels.ToolModels
|
||||
{
|
||||
public class DTONewNcShankModel
|
||||
{
|
||||
[Required]
|
||||
public ushort? Balluf { get; set; }
|
||||
|
||||
[Required]
|
||||
public byte MagazinePositionType { get; set; }
|
||||
|
||||
public static explicit operator DTONewNcShankModel(DbNcShankModel obj)
|
||||
{
|
||||
return new DTONewNcShankModel()
|
||||
{
|
||||
Balluf = (ushort)obj.Balluf,
|
||||
MagazinePositionType = obj.MagazinePositionType
|
||||
};
|
||||
}
|
||||
|
||||
public static explicit operator DbNcShankModel(DTONewNcShankModel obj)
|
||||
{
|
||||
return new DbNcShankModel()
|
||||
{
|
||||
Balluf = obj.Balluf,
|
||||
MagazinePositionType = obj.MagazinePositionType
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
public class DTONcShankModel : DTONewNcShankModel
|
||||
{
|
||||
public short Id { get; set; }
|
||||
|
||||
[Range(1, byte.MaxValue)]
|
||||
public byte? MagazineId { get; set; }
|
||||
|
||||
[Range(1, ushort.MaxValue)]
|
||||
public int? PositionId { get; set; }
|
||||
|
||||
[Range(1, byte.MaxValue)]
|
||||
public byte? OriginMagazineId { get; set; }
|
||||
|
||||
[Range(1, ushort.MaxValue)]
|
||||
public int? OriginPositionId { get; set; }
|
||||
|
||||
public int MaxLeft { get; set; }
|
||||
|
||||
public int MaxRight { get; set; }
|
||||
|
||||
public List<DTONcToolModel> ChildsTools { get; set; }
|
||||
|
||||
public static explicit operator DTONcShankModel(DbNcShankModel obj)
|
||||
{
|
||||
List<DTONcToolModel> tools = new List<DTONcToolModel>();
|
||||
|
||||
if (obj.Tools != null)
|
||||
foreach (DbNcToolModel tool in obj.Tools)
|
||||
{
|
||||
tools.Add((DTONcToolModel)tool);
|
||||
}
|
||||
|
||||
return new DTONcShankModel()
|
||||
{
|
||||
Id = obj.ShankId,
|
||||
Balluf = (ushort?)obj.Balluf,
|
||||
MagazinePositionType = obj.MagazinePositionType,
|
||||
MagazineId = obj.MagazineId,
|
||||
PositionId = obj.PositionId,
|
||||
OriginMagazineId = obj.OriginMagazineId,
|
||||
OriginPositionId = obj.OriginPositionId,
|
||||
ChildsTools = tools
|
||||
};
|
||||
}
|
||||
|
||||
public static explicit operator DbNcShankModel(DTONcShankModel obj)
|
||||
{
|
||||
return new DbNcShankModel()
|
||||
{
|
||||
ShankId = obj.Id,
|
||||
Balluf = obj.Balluf,
|
||||
MagazinePositionType = obj.MagazinePositionType,
|
||||
MagazineId = obj.MagazineId,
|
||||
PositionId = obj.PositionId,
|
||||
OriginMagazineId = obj.OriginMagazineId,
|
||||
OriginPositionId = obj.OriginPositionId,
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,209 +0,0 @@
|
||||
using CMS_CORE_Library.Models;
|
||||
using Thermo.Active.Model.DatabaseModels;
|
||||
using System.Collections;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Thermo.Active.Model.DTOModels.ToolModels
|
||||
{
|
||||
|
||||
public class DTONcTool
|
||||
{
|
||||
[Required]
|
||||
public short OffsetLength { get; set; }
|
||||
|
||||
[Required]
|
||||
public int ResidualLife { get; set; }
|
||||
|
||||
[Required]
|
||||
public int ResidualRevive { get; set; }
|
||||
|
||||
[Required]
|
||||
// Foreign keys
|
||||
public short FamilyId { get; set; }
|
||||
|
||||
[Required]
|
||||
public bool Disabled { get; set; }
|
||||
|
||||
[Required]
|
||||
public bool Broken { get; set; }
|
||||
|
||||
[Required]
|
||||
public bool Measured { get; set; }
|
||||
|
||||
[Required]
|
||||
public bool IntegrityCheck { get; set; }
|
||||
|
||||
[Required]
|
||||
public bool ClockwiseRotation { get; set; }
|
||||
|
||||
[Required]
|
||||
public bool CounterClockwiseRotation { get; set; }
|
||||
|
||||
public short? ShankId { get; set; } = null;
|
||||
|
||||
public static explicit operator DTONcTool(DbNcToolModel obj)
|
||||
{
|
||||
// Get bit values
|
||||
BitArray statusBits = new BitArray(obj.Status);
|
||||
bool[] bits = new bool[8];
|
||||
statusBits.CopyTo(bits, 0);
|
||||
|
||||
return new DTONcTool()
|
||||
{
|
||||
FamilyId = obj.FamilyId,
|
||||
ShankId = (short)(obj.ShankId == null ? 0 : obj.ShankId.Value),
|
||||
OffsetLength = obj.OffsetLength,
|
||||
ResidualLife = obj.ResidualLife,
|
||||
ResidualRevive = obj.ResidualRevive,
|
||||
Disabled = bits[0],
|
||||
Broken = bits[1],
|
||||
Measured = bits[2],
|
||||
IntegrityCheck = bits[3],
|
||||
ClockwiseRotation = bits[4],
|
||||
CounterClockwiseRotation = bits[5],
|
||||
};
|
||||
}
|
||||
|
||||
public static explicit operator DbNcToolModel(DTONcTool obj)
|
||||
{
|
||||
// Prepare status byte
|
||||
bool[] result = new bool[8] { obj.Disabled, obj.Broken, obj.Measured, obj.IntegrityCheck, obj.ClockwiseRotation, obj.CounterClockwiseRotation, false, false };
|
||||
byte status = ConvertArrayToByte(result);
|
||||
|
||||
return new DbNcToolModel()
|
||||
{
|
||||
FamilyId = obj.FamilyId,
|
||||
ShankId = obj.ShankId,
|
||||
OffsetLength = obj.OffsetLength,
|
||||
ResidualLife = obj.ResidualLife,
|
||||
ResidualRevive = obj.ResidualRevive,
|
||||
Status = status
|
||||
};
|
||||
}
|
||||
|
||||
protected static byte ConvertArrayToByte(bool[] bits)
|
||||
{
|
||||
BitArray bitField = new BitArray(bits); //BitArray takes a bool[]
|
||||
byte[] bytes = new byte[1];
|
||||
bitField.CopyTo(bytes, 0);
|
||||
|
||||
return bytes[0];
|
||||
}
|
||||
}
|
||||
|
||||
public class DTONcToolModel : DTONewNcToolModel
|
||||
{
|
||||
public short Id { get; set; }
|
||||
|
||||
public OffsetModel Offset1 { get; set; }
|
||||
|
||||
public OffsetModel Offset2 { get; set; }
|
||||
|
||||
public OffsetModel Offset3 { get; set; }
|
||||
|
||||
|
||||
public static explicit operator DTONcToolModel(DbNcToolModel obj)
|
||||
{
|
||||
// Get bit values
|
||||
BitArray statusBits = new BitArray(new byte[] { obj.Status });
|
||||
bool[] bits = new bool[8];
|
||||
statusBits.CopyTo(bits, 0);
|
||||
|
||||
return new DTONcToolModel()
|
||||
{
|
||||
Id = obj.ToolId,
|
||||
FamilyId = obj.FamilyId,
|
||||
ShankId = obj.ShankId,
|
||||
OffsetLength = obj.OffsetLength,
|
||||
ResidualLife = obj.ResidualLife,
|
||||
ResidualRevive = obj.ResidualRevive,
|
||||
Disabled = bits[0],
|
||||
Broken = bits[1],
|
||||
Measured = bits[2],
|
||||
IntegrityCheck = bits[3],
|
||||
ClockwiseRotation = bits[4],
|
||||
CounterClockwiseRotation = bits[5],
|
||||
OffsetId1 = obj.OffsetId1,
|
||||
OffsetId2 = obj.OffsetId2,
|
||||
OffsetId3 = obj.OffsetId3
|
||||
};
|
||||
}
|
||||
|
||||
public static explicit operator DbNcToolModel(DTONcToolModel obj)
|
||||
{
|
||||
// Prepare status byte
|
||||
bool[] result = new bool[8] { obj.Disabled, obj.Broken, obj.Measured, obj.IntegrityCheck, obj.ClockwiseRotation, obj.CounterClockwiseRotation, false, false };
|
||||
byte status = ConvertArrayToByte(result);
|
||||
|
||||
return new DbNcToolModel()
|
||||
{
|
||||
ToolId = obj.Id,
|
||||
FamilyId = obj.FamilyId,
|
||||
ShankId = obj.ShankId,
|
||||
OffsetLength = obj.OffsetLength,
|
||||
ResidualLife = obj.ResidualLife,
|
||||
ResidualRevive = obj.ResidualRevive,
|
||||
Status = status,
|
||||
OffsetId1 = obj.OffsetId1,
|
||||
OffsetId2 = obj.OffsetId2,
|
||||
OffsetId3 = obj.OffsetId3
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
public class DTONewNcToolModel : DTONcTool
|
||||
{
|
||||
public short? OffsetId1 { get; set; }
|
||||
|
||||
public short? OffsetId2 { get; set; }
|
||||
|
||||
public short? OffsetId3 { get; set; }
|
||||
|
||||
|
||||
public static explicit operator DTONewNcToolModel(DbNcToolModel obj)
|
||||
{
|
||||
// Get bit values
|
||||
BitArray statusBits = new BitArray(obj.Status);
|
||||
bool[] bits = new bool[8];
|
||||
statusBits.CopyTo(bits, 0);
|
||||
|
||||
return new DTONewNcToolModel()
|
||||
{
|
||||
FamilyId = obj.FamilyId,
|
||||
ShankId = (short)(obj.ShankId == null ? 0 : obj.ShankId.Value),
|
||||
OffsetLength = obj.OffsetLength,
|
||||
ResidualLife = obj.ResidualLife,
|
||||
ResidualRevive = obj.ResidualRevive,
|
||||
Disabled = bits[0],
|
||||
Broken = bits[1],
|
||||
Measured = bits[2],
|
||||
IntegrityCheck = bits[3],
|
||||
ClockwiseRotation = bits[4],
|
||||
CounterClockwiseRotation = bits[5],
|
||||
OffsetId1 = obj.OffsetId1,
|
||||
OffsetId2 = obj.OffsetId2,
|
||||
OffsetId3 = obj.OffsetId3
|
||||
};
|
||||
}
|
||||
|
||||
public static explicit operator DbNcToolModel(DTONewNcToolModel obj)
|
||||
{
|
||||
// Prepare status byte
|
||||
bool[] result = new bool[8] { obj.Disabled, obj.Broken, obj.Measured, obj.IntegrityCheck, obj.ClockwiseRotation, obj.CounterClockwiseRotation, false, false};
|
||||
byte status = ConvertArrayToByte(result);
|
||||
|
||||
return new DbNcToolModel()
|
||||
{
|
||||
FamilyId = obj.FamilyId,
|
||||
ShankId = obj.ShankId,
|
||||
OffsetLength = obj.OffsetLength,
|
||||
ResidualLife = obj.ResidualLife,
|
||||
ResidualRevive = obj.ResidualRevive,
|
||||
Status = status,
|
||||
OffsetId1 = obj.OffsetId1,
|
||||
OffsetId2 = obj.OffsetId2,
|
||||
OffsetId3 = obj.OffsetId3
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Thermo.Active.Model.DTOModels.ToolModels
|
||||
{
|
||||
public class DTONewToolDataModel
|
||||
{
|
||||
public Dictionary<int, byte> UpdatedStatus;
|
||||
public Dictionary<int, uint> UpdatedLives;
|
||||
}
|
||||
}
|
||||
@@ -1,138 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Thermo.Active.Model.DTOModels.ToolModels
|
||||
{
|
||||
// Tool with family data
|
||||
|
||||
public class DTONewNcToolWithFamilyModel : DTONewNcToolModel
|
||||
{
|
||||
// Family fields
|
||||
public string Name { get; set; }
|
||||
|
||||
public byte ToolType { get; set; }
|
||||
|
||||
public byte RightSize { get; set; }
|
||||
|
||||
public byte LeftSize { get; set; }
|
||||
|
||||
public byte TcpTable { get; set; }
|
||||
|
||||
public byte Gamma { get; set; }
|
||||
|
||||
public byte RotationType { get; set; }
|
||||
|
||||
public bool Cooling { get; set; }
|
||||
|
||||
public bool Cooling1 { get; set; }
|
||||
|
||||
public bool Cooling2 { get; set; }
|
||||
|
||||
public bool Cooling3 { get; set; }
|
||||
|
||||
public bool Cooling4 { get; set; }
|
||||
|
||||
public bool Cooling5 { get; set; }
|
||||
|
||||
public bool Cooling6 { get; set; }
|
||||
|
||||
public bool Cooling7 { get; set; }
|
||||
|
||||
public int MaxSpeed { get; set; }
|
||||
|
||||
public byte MaxLoad { get; set; }
|
||||
|
||||
public byte MinLoadPctAutoload { get; set; }
|
||||
|
||||
public byte MaxLoadPctAutoload { get; set; }
|
||||
|
||||
public byte DynamicCompensation { get; set; }
|
||||
|
||||
public byte MinLoadDynamicCompensation { get; set; }
|
||||
|
||||
public byte MaxLoadDynamicCompensation { get; set; }
|
||||
|
||||
public byte LifeType { get; set; }
|
||||
|
||||
public int NominalLife { get; set; }
|
||||
|
||||
public int ReviveDelta { get; set; }
|
||||
}
|
||||
|
||||
|
||||
public class DTONcToolWithFamilyModel : DTONcToolModel
|
||||
{
|
||||
// Family fields
|
||||
[Required]
|
||||
public string Name { get; set; }
|
||||
|
||||
[Required]
|
||||
public byte ToolType { get; set; }
|
||||
|
||||
[Required]
|
||||
public byte RightSize { get; set; }
|
||||
|
||||
[Required]
|
||||
public byte LeftSize { get; set; }
|
||||
|
||||
[Required]
|
||||
public byte TcpTable { get; set; }
|
||||
|
||||
[Required]
|
||||
public byte Gamma { get; set; }
|
||||
|
||||
[Required]
|
||||
public byte RotationType { get; set; }
|
||||
|
||||
[Required]
|
||||
public bool Cooling { get; set; }
|
||||
[Required]
|
||||
public bool Cooling1 { get; set; }
|
||||
[Required]
|
||||
public bool Cooling2 { get; set; }
|
||||
[Required]
|
||||
public bool Cooling3 { get; set; }
|
||||
[Required]
|
||||
public bool Cooling4 { get; set; }
|
||||
[Required]
|
||||
public bool Cooling5 { get; set; }
|
||||
[Required]
|
||||
public bool Cooling6 { get; set; }
|
||||
[Required]
|
||||
public bool Cooling7 { get; set; }
|
||||
|
||||
[Required]
|
||||
public int MaxSpeed { get; set; }
|
||||
|
||||
[Required]
|
||||
public byte MaxLoad { get; set; }
|
||||
|
||||
[Required]
|
||||
public byte MinLoadPctAutoload { get; set; }
|
||||
|
||||
[Required]
|
||||
public byte MaxLoadPctAutoload { get; set; }
|
||||
|
||||
[Required]
|
||||
public byte DynamicCompensation { get; set; }
|
||||
|
||||
[Required]
|
||||
public byte MinLoadDynamicCompensation { get; set; }
|
||||
|
||||
[Required]
|
||||
public byte MaxLoadDynamicCompensation { get; set; }
|
||||
|
||||
[Required]
|
||||
public byte LifeType { get; set; }
|
||||
|
||||
[Required]
|
||||
public int NominalLife { get; set; }
|
||||
|
||||
[Required]
|
||||
public int ReviveDelta { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
using CMS_CORE_Library.Models;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Thermo.Active.Model.DTOModels.ToolModels
|
||||
{
|
||||
public class DTOSelfAdaptiveModel
|
||||
{
|
||||
public byte Step { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,69 +0,0 @@
|
||||
using CMS_CORE_Library.Models;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
|
||||
namespace Thermo.Active.Model.DTOModels.ToolModels
|
||||
{
|
||||
public class DTOShankModel
|
||||
{
|
||||
public int Id;
|
||||
[Required]
|
||||
public string Name { get; set; }
|
||||
[Required]
|
||||
public bool IsEnabled { get; set; }
|
||||
[Required]
|
||||
public bool IsInhibited { get; set; }
|
||||
[Required]
|
||||
public bool InChangeTool { get; set; }
|
||||
[Required]
|
||||
public bool InFixedPlace { get; set; }
|
||||
[Required]
|
||||
public bool InUse { get; set; }
|
||||
[Required]
|
||||
public int LeftSize { get; set; }
|
||||
[Required]
|
||||
public int RightSize { get; set; }
|
||||
[Required]
|
||||
public int MagazinePositionType { get; set; }
|
||||
|
||||
public List<DTOShankChildModel> ChildsTools { get; set; }
|
||||
|
||||
public static explicit operator ShankModel(DTOShankModel obj)
|
||||
{
|
||||
List<ShankChildModel> childs = obj.ChildsTools?.Select(x => new ShankChildModel
|
||||
{
|
||||
Id = x.Id,
|
||||
FamilyName = x.FamilyName,
|
||||
MultitoolId = x.MultitoolId,
|
||||
ToolType = x.ToolType
|
||||
}).ToList();
|
||||
|
||||
|
||||
return new ShankModel()
|
||||
{
|
||||
Id = 0,
|
||||
Name = obj.Name,
|
||||
IsEnabled = obj.IsEnabled,
|
||||
IsInhibited = obj.IsInhibited,
|
||||
InChangeTool = obj.InChangeTool,
|
||||
InFixedPlace = obj.InFixedPlace,
|
||||
InUse = obj.InUse,
|
||||
LeftSize = obj.LeftSize,
|
||||
RightSize = obj.RightSize,
|
||||
MagazinePositionType = obj.MagazinePositionType,
|
||||
ChildsTools = childs
|
||||
};
|
||||
}
|
||||
}
|
||||
public class DTOShankChildModel
|
||||
{
|
||||
public int Id;
|
||||
[Required]
|
||||
public int MultitoolId;
|
||||
[Required]
|
||||
public string FamilyName;
|
||||
[Required]
|
||||
public int ToolType;
|
||||
}
|
||||
}
|
||||
@@ -1,128 +0,0 @@
|
||||
using CMS_CORE_Library.Models;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using static CMS_CORE_Library.Models.DataStructures;
|
||||
|
||||
namespace Thermo.Active.Model.DTOModels.ToolModels
|
||||
{
|
||||
public class DTOSiemensToolModel
|
||||
{
|
||||
[Required]
|
||||
public string FamilyName { get; set; }
|
||||
|
||||
[Required]
|
||||
public int MagazinePositionType { get; set; }
|
||||
|
||||
[Required]
|
||||
public int ToolType { get; set; }
|
||||
|
||||
public SIEMENS_LIFE_TYPE LifeType { get; set; }
|
||||
|
||||
[Required]
|
||||
public int LeftSize { get; set; }
|
||||
|
||||
[Required]
|
||||
public int RightSize { get; set; }
|
||||
|
||||
[Required]
|
||||
public double MaxSpeed { get; set; }
|
||||
|
||||
[Required]
|
||||
public double MaxAcceleration { get; set; }
|
||||
|
||||
[Required]
|
||||
public ROTATION Rotation { get; set; }
|
||||
|
||||
[Required]
|
||||
public bool Cooling1 { get; set; }
|
||||
|
||||
[Required]
|
||||
public bool Cooling2 { get; set; }
|
||||
|
||||
[Required]
|
||||
public bool IsEnabled { get; set; }
|
||||
|
||||
[Required]
|
||||
public bool IsActive { get; set; }
|
||||
|
||||
[Required]
|
||||
public bool InFixedPlace { get; set; }
|
||||
|
||||
[Required]
|
||||
public bool IsInhibited { get; set; }
|
||||
|
||||
[Required]
|
||||
public bool IsMeasured { get; set; }
|
||||
|
||||
[Required]
|
||||
public bool InChangeTool { get; set; }
|
||||
|
||||
[Required]
|
||||
public bool IsInUse { get; set; }
|
||||
|
||||
[Required]
|
||||
public bool PreAlarm { get; set; }
|
||||
// Custom fields
|
||||
[Required]
|
||||
public int Load { get; set; }
|
||||
|
||||
[Required]
|
||||
public int Gamma { get; set; }
|
||||
|
||||
[Required]
|
||||
public int MaxLoadPctAutoload { get; set; }
|
||||
|
||||
[Required]
|
||||
public int MinLoadPctAutoload { get; set; }
|
||||
|
||||
[Required]
|
||||
public int ToolTypeCode { get; set; }
|
||||
|
||||
public DTONcShankModel Shank { get; set; }
|
||||
|
||||
public static explicit operator SiemensToolModel(DTOSiemensToolModel dtoModel)
|
||||
{
|
||||
return new SiemensToolModel()
|
||||
{
|
||||
MagazinePositionType = dtoModel.MagazinePositionType,
|
||||
ToolType = dtoModel.ToolType,
|
||||
LifeType = dtoModel.LifeType,
|
||||
FamilyName = dtoModel.FamilyName,
|
||||
MaxSpeed = dtoModel.MaxSpeed,
|
||||
//MaxAcceleration = dtoModel.MaxAcceleration,
|
||||
IsEnabled = dtoModel.IsEnabled,
|
||||
IsActive = dtoModel.IsActive,
|
||||
IsInhibited = dtoModel.IsInhibited,
|
||||
IsInUse = dtoModel.IsInUse,
|
||||
IsMeasured = dtoModel.IsMeasured,
|
||||
InChangeTool = dtoModel.InChangeTool,
|
||||
InFixedPlace = dtoModel.InFixedPlace,
|
||||
PreAlarm = dtoModel.PreAlarm,
|
||||
|
||||
Cooling1 = dtoModel.Cooling1,
|
||||
Cooling2 = dtoModel.Cooling2,
|
||||
LeftSize = dtoModel.LeftSize,
|
||||
RightSize = dtoModel.RightSize,
|
||||
Rotation = dtoModel.Rotation,
|
||||
|
||||
Load = dtoModel.Load,
|
||||
Gamma = dtoModel.Gamma,
|
||||
MaxLoadPctAutoload = dtoModel.MaxLoadPctAutoload,
|
||||
MinLoadPctAutoload = dtoModel.MinLoadPctAutoload,
|
||||
ToolTypeCode = dtoModel.ToolTypeCode
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
public class DTOMagazinesPositionsModel
|
||||
{
|
||||
[Required]
|
||||
public bool Disabled { get; set; }
|
||||
}
|
||||
|
||||
public class DTOFamilyModel
|
||||
{
|
||||
[Required]
|
||||
public string Name { get; set; }
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace Thermo.Active.Model.DTOModels.ToolModels
|
||||
{
|
||||
public class DTOSiemensUpdateMagazineModel
|
||||
{
|
||||
[Required]
|
||||
public int ToolId { get; set; }
|
||||
}
|
||||
|
||||
public class DTONcUpdateMagazineModel
|
||||
{
|
||||
[Required]
|
||||
public int ShankId { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -18,9 +18,6 @@ namespace Thermo.Active.Model.DatabaseModels
|
||||
[Column("name")]
|
||||
public string Name { get; set; }
|
||||
|
||||
[Column("type")]
|
||||
public byte ToolType { get; set; }
|
||||
|
||||
[Column("right_size")]
|
||||
public byte RightSize { get; set; }
|
||||
|
||||
@@ -69,16 +66,12 @@ namespace Thermo.Active.Model.DatabaseModels
|
||||
[Column("revive_delta")]
|
||||
public int ReviveDelta { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
[IgnoreDataMember]
|
||||
public List<DbNcToolModel> Tools { get; set; }
|
||||
|
||||
public static explicit operator NcFamilyModel(DbNcFamilyModel obj)
|
||||
{
|
||||
return new NcFamilyModel()
|
||||
{
|
||||
FamilyId = (ushort)obj.FamilyId,
|
||||
ToolType = obj.ToolType,
|
||||
RightSize = obj.RightSize,
|
||||
LeftSize = obj.LeftSize,
|
||||
TcpTable = obj.TcpTable,
|
||||
@@ -103,7 +96,6 @@ namespace Thermo.Active.Model.DatabaseModels
|
||||
return new DbNcFamilyModel()
|
||||
{
|
||||
FamilyId = (short)obj.FamilyId,
|
||||
ToolType = obj.ToolType,
|
||||
RightSize = obj.RightSize,
|
||||
LeftSize = obj.LeftSize,
|
||||
TcpTable = obj.TcpTable,
|
||||
|
||||
@@ -39,11 +39,6 @@ namespace Thermo.Active.Model.DatabaseModels
|
||||
[IgnoreDataMember]
|
||||
public DbNcMagazinePositionModel MagazinePosition { get; set; }
|
||||
|
||||
|
||||
[JsonIgnore]
|
||||
[IgnoreDataMember]
|
||||
public List<DbNcToolModel> Tools { get; set; }
|
||||
|
||||
public static explicit operator NcShankModel(DbNcShankModel obj)
|
||||
{
|
||||
return new NcShankModel()
|
||||
|
||||
@@ -1,91 +0,0 @@
|
||||
using CMS_CORE_Library.Models;
|
||||
using Newtonsoft.Json;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace Thermo.Active.Model.DatabaseModels
|
||||
{
|
||||
[Table("tool")]
|
||||
public class DbNcToolModel
|
||||
{
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.None)]
|
||||
[Column("id")]
|
||||
public short ToolId { get; set; }
|
||||
|
||||
[Column("offset_length")]
|
||||
public short OffsetLength { get; set; }
|
||||
|
||||
[Column("residual_life")]
|
||||
public int ResidualLife { get; set; }
|
||||
|
||||
[Column("residual_revive")]
|
||||
public int ResidualRevive { get; set; }
|
||||
|
||||
[Column("status")]
|
||||
public byte Status { get; set; }
|
||||
|
||||
// Foreign keys
|
||||
[Column("family_id")]
|
||||
[ForeignKey("Family")]
|
||||
public short FamilyId { get; set; }
|
||||
|
||||
[Column("shank_id")]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.None)]
|
||||
|
||||
[ForeignKey("Shank")]
|
||||
public short? ShankId { get; set; }
|
||||
|
||||
[Column("offsetId1")]
|
||||
public short? OffsetId1 { get; set; }
|
||||
|
||||
[Column("offsetId2")]
|
||||
public short? OffsetId2 { get; set; }
|
||||
|
||||
[Column("offsetId3")]
|
||||
public short? OffsetId3 { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
[IgnoreDataMember]
|
||||
public virtual DbNcFamilyModel Family { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
[IgnoreDataMember]
|
||||
public virtual DbNcShankModel Shank { get; set; }
|
||||
|
||||
public static explicit operator NcToolModel(DbNcToolModel obj)
|
||||
{
|
||||
return new NcToolModel()
|
||||
{
|
||||
ToolId = obj.ToolId,
|
||||
FamilyId = obj.FamilyId,
|
||||
OffsetLength = obj.OffsetLength,
|
||||
ResidualLife = (ushort)obj.ResidualLife,
|
||||
Status = obj.Status,
|
||||
ResidualRevive = (ushort)obj.ResidualRevive,
|
||||
ShankId = (short)(obj.ShankId == null ? 0 : obj.ShankId.Value),
|
||||
OffsetId1 = (ushort)(obj.OffsetId1 == null ? 0 : obj.OffsetId1.Value),
|
||||
OffsetId2 = (ushort)(obj.OffsetId2 == null ? 0 : obj.OffsetId2.Value),
|
||||
OffsetId3 = (ushort)(obj.OffsetId3 == null ? 0 : obj.OffsetId3.Value)
|
||||
};
|
||||
}
|
||||
|
||||
public static explicit operator DbNcToolModel(NcToolModel obj)
|
||||
{
|
||||
return new DbNcToolModel()
|
||||
{
|
||||
ToolId = obj.ToolId,
|
||||
FamilyId = obj.FamilyId,
|
||||
OffsetLength = obj.OffsetLength,
|
||||
ResidualLife = (ushort)obj.ResidualLife,
|
||||
Status = obj.Status,
|
||||
ResidualRevive = (ushort)obj.ResidualRevive,
|
||||
ShankId = obj.ShankId == 0 ? null : (short?)obj.ShankId,
|
||||
OffsetId1 = obj.OffsetId1 == 0 ? null : (short?)obj.OffsetId1,
|
||||
OffsetId2 = obj.OffsetId2 == 0 ? null : (short?)obj.OffsetId2,
|
||||
OffsetId3 = obj.OffsetId3 == 0 ? null : (short?)obj.OffsetId3
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -67,15 +67,12 @@
|
||||
<Compile Include="ConfigModels\CmsConnectConfigModel.cs" />
|
||||
<Compile Include="ConfigModels\ExtSoftwareModel.cs" />
|
||||
<Compile Include="ConfigModels\HeadsConfigModel.cs" />
|
||||
<Compile Include="ConfigModels\MagazineNamesModel.cs" />
|
||||
<Compile Include="ConfigModels\MaintenanceConfigModel.cs" />
|
||||
<Compile Include="ConfigModels\NcSoftKeysModel.cs" />
|
||||
<Compile Include="ConfigModels\ServerConfigModel.cs" />
|
||||
<Compile Include="ConfigModels\AreasConfigModel.cs" />
|
||||
<Compile Include="ConfigModels\NcConfigModel.cs" />
|
||||
<Compile Include="ConfigModels\SoftwareProdConfigModel.cs" />
|
||||
<Compile Include="ConfigModels\ToolManagerConfigModel.cs" />
|
||||
<Compile Include="ConfigModels\ToolTypeConfigModel.cs" />
|
||||
<Compile Include="ConfigModels\UserSoftKeyConfigModel.cs" />
|
||||
<Compile Include="Constants.cs" />
|
||||
<Compile Include="DatabaseModels\AlarmFileModel.cs" />
|
||||
@@ -93,7 +90,6 @@
|
||||
<Compile Include="DatabaseModels\NcFamilyModel.cs" />
|
||||
<Compile Include="DatabaseModels\NcMagazinePositionModel.cs" />
|
||||
<Compile Include="DatabaseModels\NcShankModel.cs" />
|
||||
<Compile Include="DatabaseModels\NcToolModel.cs" />
|
||||
<Compile Include="DatabaseModels\PerformedMaintenanceModel.cs" />
|
||||
<Compile Include="DatabaseModels\QueueItemsModel.cs" />
|
||||
<Compile Include="DatabaseModels\RoleModel.cs">
|
||||
@@ -120,10 +116,6 @@
|
||||
<Compile Include="DTOModels\JobModels\DTOMetadataModel.cs" />
|
||||
<Compile Include="DTOModels\Scada\DTOScadaModel.cs" />
|
||||
<Compile Include="DTOModels\Scada\ScadaSchemaModel.cs" />
|
||||
<Compile Include="DTOModels\ToolModels\DTOAssistedToolingModel.cs" />
|
||||
<Compile Include="DTOModels\ToolModels\DTOSelfAdaptiveModel.cs" />
|
||||
<Compile Include="DTOModels\ToolModels\DTOExportToolTableModel.cs" />
|
||||
<Compile Include="DTOModels\ToolModels\DTONewToolDataModel.cs" />
|
||||
<Compile Include="DTOModels\MaintenanceModels\DTOExpiredMaintenanceModel.cs" />
|
||||
<Compile Include="DTOModels\DTOHeadModel.cs" />
|
||||
<Compile Include="DTOModels\DTOHeadsConfigModel.cs" />
|
||||
@@ -144,17 +136,6 @@
|
||||
<Compile Include="DTOModels\MaintenanceModels\DTOMaintenanceNoteModel.cs" />
|
||||
<Compile Include="DTOModels\MaintenanceModels\DTONewMaintenanceModel.cs" />
|
||||
<Compile Include="DatabaseModels\MaintenanceNoteModel.cs" />
|
||||
<Compile Include="DTOModels\ToolModels\DTOEdgeModel.cs" />
|
||||
<Compile Include="DTOModels\ToolModels\DTOMagazineStatusModel.cs" />
|
||||
<Compile Include="DTOModels\ToolModels\DTONcFamilyModel.cs" />
|
||||
<Compile Include="DTOModels\ToolModels\DTONcMagazinePositionModel.cs" />
|
||||
<Compile Include="DTOModels\ToolModels\DTONcMountedShankModel.cs" />
|
||||
<Compile Include="DTOModels\ToolModels\DTONcShankModel.cs" />
|
||||
<Compile Include="DTOModels\ToolModels\DTONcToolModel.cs" />
|
||||
<Compile Include="DTOModels\ToolModels\DTONewToolWithFamilyModel.cs" />
|
||||
<Compile Include="DTOModels\ToolModels\DTOShankModel.cs" />
|
||||
<Compile Include="DTOModels\ToolModels\DTOSiemensToolModel.cs" />
|
||||
<Compile Include="DTOModels\ToolModels\DTOUpdateMagazineModel.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="DatabaseModels\UserModel.cs">
|
||||
<Generator>DtsGenerator</Generator>
|
||||
|
||||
@@ -870,53 +870,18 @@ namespace Thermo.Active.NC
|
||||
OverrideEditable = head.OverrideEditable,
|
||||
ActualSpeed = head.ActualSpeed_Pressure,
|
||||
Load = head.Load_Abrasive,
|
||||
MountedTool = (ushort)head.MountedTool_Vacum,
|
||||
Override = head.Override,
|
||||
IsActive = head.IsActive,
|
||||
IsSelected = head.IsSelected,
|
||||
AbrasiveIsActive = head.AbrasiveIsActive,
|
||||
Configured = head.Configured,
|
||||
Rotation = head.Rotation,
|
||||
WorkedTime = head.WorkedTime,
|
||||
ToolData = head.Tool == null ? null : new DTOToolInSpindleModel()
|
||||
{
|
||||
ChildId = head.Tool.ChildId,
|
||||
ToolName = head.Tool.ToolName,
|
||||
Disabled = head.Tool.Disabled,
|
||||
Measured = head.Tool.Measured,
|
||||
Broken = head.Tool.Broken,
|
||||
MaxSpeed = (int)head.Tool.MaxSpeed,
|
||||
MaxLoad = (byte)head.Tool.MaxLoad,
|
||||
ResidualLife = (int)head.Tool.ResidualLife
|
||||
}
|
||||
});
|
||||
}
|
||||
break;
|
||||
|
||||
case HEAD_TYPE.AWJ:
|
||||
{
|
||||
float vacumValue = (float)head.MountedTool_Vacum / 100;
|
||||
heads.Add(new DTOAbrasiveWaterJet()
|
||||
{
|
||||
Id = head.Id,
|
||||
Process = head.Process,
|
||||
Type = configuredHead.Type.ToString(),
|
||||
FixedHead = configuredHead.FixedHead,
|
||||
inWarning = vacumValue >= configuredHead.WarningLimit,
|
||||
inAlarm = vacumValue >= configuredHead.AlarmLimit,
|
||||
OverrideEditable = head.OverrideEditable,
|
||||
ActualPressure = head.ActualSpeed_Pressure,
|
||||
Abrasive = Convert.ToUInt16(head.Load_Abrasive),
|
||||
Vacum = vacumValue,
|
||||
Override = head.Override,
|
||||
IsActive = head.IsActive,
|
||||
IsSelected = head.IsSelected,
|
||||
AbrasiveIsActive = head.AbrasiveIsActive,
|
||||
WorkedTime = head.WorkedTime
|
||||
});
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case HEAD_TYPE.WJ:
|
||||
{
|
||||
heads.Add(new DTOWaterJet()
|
||||
|
||||
@@ -1,911 +0,0 @@
|
||||
using CMS_CORE_Library.Models;
|
||||
using Thermo.Active.Database.Controllers;
|
||||
using Thermo.Active.Model.DatabaseModels;
|
||||
using Thermo.Active.Model.DTOModels.ToolModels;
|
||||
using Thermo.Active.Utils;
|
||||
using System.Collections.Generic;
|
||||
using System.Data.Entity;
|
||||
using System.Linq;
|
||||
using static CMS_CORE_Library.Models.DataStructures;
|
||||
using static Thermo.Active.Config.ServerConfig;
|
||||
using static Thermo.Active.Model.Constants;
|
||||
|
||||
namespace Thermo.Active.NC
|
||||
{
|
||||
public class NcToolTableAdapter : NcAdapter
|
||||
{
|
||||
public CmsError GetToolsData(out List<DTONcToolModel> dtoTools)
|
||||
{
|
||||
dtoTools = new List<DTONcToolModel>();
|
||||
|
||||
CmsError cmsError = NO_ERROR;
|
||||
|
||||
using (NcToolManagerController toolsManager = new NcToolManagerController())
|
||||
{
|
||||
List<DbNcToolModel> tools = toolsManager.FindToolsWithDependencies();
|
||||
|
||||
foreach (DbNcToolModel tool in tools)
|
||||
{
|
||||
DTONcToolModel dtoTool = (DTONcToolModel)tool;
|
||||
|
||||
cmsError = GetToolData(tool, ref dtoTool);
|
||||
|
||||
dtoTools.Add(dtoTool);
|
||||
}
|
||||
|
||||
return cmsError;
|
||||
}
|
||||
}
|
||||
|
||||
public CmsError GetToolData(DbNcToolModel tool, ref DTONcToolModel dtoTool)
|
||||
{
|
||||
dtoTool = (DTONcToolModel)tool;
|
||||
|
||||
OffsetModel offset = new OffsetModel();
|
||||
CmsError cmsError = NO_ERROR;
|
||||
|
||||
if (tool.OffsetId1 != null && tool.OffsetId1 != 0)
|
||||
{
|
||||
// Read first offset data
|
||||
cmsError = numericalControl.TOOLS_ROffset((short)tool.OffsetId1, ref offset);
|
||||
if (cmsError.IsError())
|
||||
return cmsError;
|
||||
|
||||
dtoTool.Offset1 = offset;
|
||||
}
|
||||
if (tool.OffsetId2 != null && tool.OffsetId2 != 0)
|
||||
{
|
||||
// Read second offset data
|
||||
cmsError = numericalControl.TOOLS_ROffset((short)tool.OffsetId2, ref offset);
|
||||
if (cmsError.IsError())
|
||||
return cmsError;
|
||||
|
||||
dtoTool.Offset2 = offset;
|
||||
}
|
||||
if (tool.OffsetId3 != null && tool.OffsetId3 != 0)
|
||||
{
|
||||
// Read third offset data
|
||||
cmsError = numericalControl.TOOLS_ROffset((short)tool.OffsetId3, ref offset);
|
||||
if (cmsError.IsError())
|
||||
return cmsError;
|
||||
|
||||
dtoTool.Offset3 = offset;
|
||||
}
|
||||
|
||||
return cmsError;
|
||||
}
|
||||
|
||||
public CmsError AddTool(DTONewNcToolModel tool, out DTONcToolModel dtoTool, short toolId)
|
||||
{
|
||||
dtoTool = new DTONcToolModel();
|
||||
|
||||
using (NcToolManagerController toolsManager = new NcToolManagerController())
|
||||
{
|
||||
DbNcToolModel ncTool = toolsManager.AddTool(tool, toolId);
|
||||
|
||||
if (!ToolManagerConfig.OffsetOpt)
|
||||
{
|
||||
CmsError cmsError = UpdateToolOffsetId(ncTool.ToolId, 1, ncTool.ToolId, out DTONcToolModel toolWithOffset);
|
||||
if (cmsError.IsError())
|
||||
return cmsError;
|
||||
|
||||
ncTool.OffsetId1 = ncTool.ToolId;
|
||||
}
|
||||
|
||||
GetToolData(ncTool, ref dtoTool);
|
||||
|
||||
return NO_ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
public CmsError UpdateTool(int toolId, DTONewNcToolModel newTool, out DTONcToolModel toolWithOffsets, DTONewNcToolWithFamilyModel dtoToolWithFamily)
|
||||
{
|
||||
toolWithOffsets = new DTONcToolModel();
|
||||
CmsError cmsError = NO_ERROR;
|
||||
using (NcToolManagerController toolsManager = new NcToolManagerController())
|
||||
{
|
||||
using (var dbContextTransaction = toolsManager.dbCtx.Database.BeginTransaction())
|
||||
{
|
||||
// If family option is not active, update family data
|
||||
if (!ToolManagerConfig.FamilyOpt)
|
||||
{
|
||||
// Copy only family
|
||||
DTONewNcFamilyModel newFamily = new DTONewNcFamilyModel();
|
||||
SupportFunctions.CopyProperties(dtoToolWithFamily, newFamily);
|
||||
// Update only family data
|
||||
newFamily = (DTONcFamilyModel)toolsManager.UpdateFamily(dtoToolWithFamily.FamilyId, newFamily);
|
||||
}
|
||||
|
||||
// Update database tool Tool
|
||||
DbNcToolModel dbTool = toolsManager.UpdateTool(toolId, newTool);
|
||||
|
||||
// Populate updated tool with offset data
|
||||
cmsError = GetToolData(dbTool, ref toolWithOffsets);
|
||||
if (cmsError.IsError())
|
||||
{
|
||||
dbContextTransaction.Rollback();
|
||||
return cmsError;
|
||||
}
|
||||
|
||||
bool startIsActive = false;
|
||||
|
||||
// Check if tool is loaded into a shank
|
||||
if (dbTool.ShankId != null)
|
||||
{
|
||||
// Check if shank is loaded into magazine
|
||||
DbNcShankModel shank = toolsManager.FindShankWithTools(dbTool.ShankId.Value);
|
||||
if (shank.MagazineId != null)
|
||||
{
|
||||
startIsActive = true;
|
||||
// Create backup of data stored on the NC and block memory/files accesses
|
||||
cmsError = numericalControl.TOOLS_WStartEditData();
|
||||
if (cmsError.IsError())
|
||||
{
|
||||
ManageErrorAndTransaction(cmsError, dbContextTransaction, startIsActive);
|
||||
return cmsError;
|
||||
}
|
||||
|
||||
// If family option is not active, update NC data
|
||||
//if (!ToolManagerConfig.FamilyOpt)
|
||||
//{
|
||||
// Update Nc families
|
||||
cmsError = UpdateNcFamily(toolsManager);
|
||||
if (cmsError.IsError())
|
||||
ManageErrorAndTransaction(cmsError, dbContextTransaction, true);
|
||||
//}
|
||||
|
||||
// Update tool
|
||||
cmsError = UpdateNcTools(toolsManager);
|
||||
}
|
||||
}
|
||||
|
||||
ManageErrorAndTransaction(cmsError, dbContextTransaction, startIsActive);
|
||||
|
||||
return NO_ERROR;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public CmsError UpdateNcTools(NcToolManagerController toolsManager = null)
|
||||
{
|
||||
if (toolsManager == null)
|
||||
toolsManager = new NcToolManagerController();
|
||||
|
||||
List<NcShankModel> shanks = toolsManager
|
||||
.FindShanks()
|
||||
.Where(x => x.MagazineId != null)
|
||||
.Select(x => (NcShankModel)x)
|
||||
.ToList();
|
||||
|
||||
// Get tools
|
||||
List<NcToolModel> tools = toolsManager
|
||||
.FindTools()
|
||||
.Select(x => (NcToolModel)x)
|
||||
.Where(x => shanks.Any(y => y.ShankId == x.ShankId)) // Find only mounted tools
|
||||
.ToList();
|
||||
|
||||
// Update tools
|
||||
return numericalControl.TOOLS_WUpdateTools(tools);
|
||||
}
|
||||
|
||||
public CmsError UpdateOffset(short offsetId, OffsetModel offsetData)
|
||||
{
|
||||
return numericalControl.TOOLS_WOffset(offsetId, ref offsetData);
|
||||
}
|
||||
|
||||
public CmsError UpdateToolOffsetId(int toolId, int positionId, short offsetId, out DTONcToolModel toolWithOffsets)
|
||||
{
|
||||
toolWithOffsets = new DTONcToolModel();
|
||||
|
||||
using (NcToolManagerController toolsManager = new NcToolManagerController())
|
||||
{
|
||||
using (var dbContextTransaction = toolsManager.dbCtx.Database.BeginTransaction())
|
||||
{
|
||||
// Update database tool Tool
|
||||
DbNcToolModel dbTool = toolsManager.UpdateToolOffset(toolId, positionId, offsetId);
|
||||
|
||||
// Populate updated tool with offset data
|
||||
CmsError cmsError = GetToolData(dbTool, ref toolWithOffsets);
|
||||
if (cmsError.IsError())
|
||||
{
|
||||
dbContextTransaction.Rollback();
|
||||
return cmsError;
|
||||
}
|
||||
|
||||
bool startIsActive = false;
|
||||
|
||||
// Check if tool is loaded into a shank
|
||||
if (dbTool.ShankId != null)
|
||||
{
|
||||
// Check if shank is loaded into magazine
|
||||
DbNcShankModel shank = toolsManager.FindShankWithTools(dbTool.ShankId.Value);
|
||||
if (shank.MagazineId != null)
|
||||
{
|
||||
startIsActive = true;
|
||||
// Create backup of data stored on the NC and block file accesses
|
||||
cmsError = numericalControl.TOOLS_WStartEditData();
|
||||
if (cmsError.IsError())
|
||||
{
|
||||
ManageErrorAndTransaction(cmsError, dbContextTransaction, startIsActive);
|
||||
return cmsError;
|
||||
}
|
||||
|
||||
// R tool
|
||||
cmsError = UpdateNcTools(toolsManager);
|
||||
}
|
||||
}
|
||||
|
||||
ManageErrorAndTransaction(cmsError, dbContextTransaction, startIsActive);
|
||||
|
||||
return NO_ERROR;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public CmsError DeleteNcTool(DbNcToolModel tool)
|
||||
{
|
||||
using (NcToolManagerController toolsManager = new NcToolManagerController())
|
||||
{
|
||||
using (var dbContextTransaction = toolsManager.dbCtx.Database.BeginTransaction())
|
||||
{
|
||||
if (!ToolManagerConfig.FamilyOpt)
|
||||
{
|
||||
DbNcFamilyModel fam = toolsManager.FindFamily(tool.FamilyId);
|
||||
// Check if family is connected to other tools
|
||||
if (fam != null && fam.Tools.Count() == 1)
|
||||
{
|
||||
toolsManager.DeleteFamily(fam.FamilyId);
|
||||
}
|
||||
}
|
||||
|
||||
DbNcShankModel shank = null;
|
||||
if (!ToolManagerConfig.ShankOpt && tool.ShankId != null)
|
||||
{
|
||||
// If option is active find & delete tool shank
|
||||
shank = toolsManager.FindShankWithTools(tool.ShankId.Value);
|
||||
|
||||
toolsManager.DeleteNcShank(shank.ShankId);
|
||||
}
|
||||
|
||||
// Delete db tool
|
||||
toolsManager.DeleteTool(tool.ToolId);
|
||||
|
||||
bool startIsActive = false;
|
||||
CmsError cmsError = NO_ERROR;
|
||||
|
||||
if (tool.ShankId != null && shank != null)
|
||||
{
|
||||
if (shank.MagazineId != null)
|
||||
{
|
||||
startIsActive = true;
|
||||
// Create backup of data stored on the NC and block file accesses
|
||||
cmsError = numericalControl.TOOLS_WStartEditData();
|
||||
if (cmsError.IsError())
|
||||
{
|
||||
ManageErrorAndTransaction(cmsError, dbContextTransaction, startIsActive);
|
||||
return cmsError;
|
||||
}
|
||||
|
||||
// Update Nc data
|
||||
cmsError = UpdateNcTools(toolsManager);
|
||||
}
|
||||
}
|
||||
|
||||
ManageErrorAndTransaction(cmsError, dbContextTransaction, startIsActive);
|
||||
|
||||
return cmsError;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public CmsError UpdateShank(int shankId, DTONewNcShankModel dtoShank, out DTONcShankModel shank)
|
||||
{
|
||||
shank = new DTONcShankModel();
|
||||
|
||||
using (NcToolManagerController toolsManager = new NcToolManagerController())
|
||||
{
|
||||
using (var dbContextTransaction = toolsManager.dbCtx.Database.BeginTransaction())
|
||||
{
|
||||
bool startIsActive = false;
|
||||
CmsError cmsError = NO_ERROR;
|
||||
|
||||
// Update db data
|
||||
shank = (DTONcShankModel)toolsManager.UpdateShank(shankId, dtoShank);
|
||||
if (shank.MagazineId != null)
|
||||
{
|
||||
startIsActive = true;
|
||||
// Create backup of data stored on the NC and block file accesses
|
||||
cmsError = numericalControl.TOOLS_WStartEditData();
|
||||
if (cmsError.IsError())
|
||||
{
|
||||
ManageErrorAndTransaction(cmsError, dbContextTransaction, startIsActive);
|
||||
return cmsError;
|
||||
}
|
||||
|
||||
// Update nc data
|
||||
cmsError = UpdateNcShanks(toolsManager);
|
||||
}
|
||||
|
||||
ManageErrorAndTransaction(cmsError, dbContextTransaction, startIsActive);
|
||||
|
||||
return cmsError;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public CmsError DeleteNcShank(int shankId)
|
||||
{
|
||||
using (NcToolManagerController toolsManager = new NcToolManagerController())
|
||||
{
|
||||
CmsError cmsError = NO_ERROR;
|
||||
using (var dbContextTransaction = toolsManager.dbCtx.Database.BeginTransaction())
|
||||
{
|
||||
// Delete database shank
|
||||
DbNcShankModel deletedShank = toolsManager.DeleteNcShank(shankId);
|
||||
bool startIsActive = false;
|
||||
if (deletedShank.MagazineId != null)
|
||||
{
|
||||
startIsActive = true;
|
||||
// Create backup of data stored on the NC and block file accesses
|
||||
cmsError = numericalControl.TOOLS_WStartEditData();
|
||||
if (cmsError.IsError())
|
||||
{
|
||||
ManageErrorAndTransaction(cmsError, dbContextTransaction, startIsActive);
|
||||
return cmsError;
|
||||
}
|
||||
|
||||
// Update nc data
|
||||
cmsError = UpdateNcShanks(toolsManager);
|
||||
}
|
||||
|
||||
ManageErrorAndTransaction(cmsError, dbContextTransaction, startIsActive);
|
||||
|
||||
return cmsError;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private CmsError UpdateNcShanks(NcToolManagerController toolsManager)
|
||||
{
|
||||
// Get mounted shanks
|
||||
List<NcShankModel> shanks = toolsManager
|
||||
.FindShanks()
|
||||
.Where(x => x.MagazineId != null)
|
||||
.Select(x => (NcShankModel)x)
|
||||
.ToList();
|
||||
|
||||
// Update nc data
|
||||
return numericalControl.TOOLS_WUpdateShanks(shanks);
|
||||
}
|
||||
|
||||
public DTONcFamilyModel AddFamily(DTONcFamilyModel family)
|
||||
{
|
||||
using (NcToolManagerController toolsManager = new NcToolManagerController())
|
||||
{
|
||||
return (DTONcFamilyModel)toolsManager.AddFamily(family);
|
||||
}
|
||||
}
|
||||
|
||||
public CmsError UpdateFamily(int familyId, DTONewNcFamilyModel family, out DTONcFamilyModel newFamily)
|
||||
{
|
||||
newFamily = new DTONcFamilyModel();
|
||||
using (NcToolManagerController toolsManager = new NcToolManagerController())
|
||||
{
|
||||
using (var dbContextTransaction = toolsManager.dbCtx.Database.BeginTransaction())
|
||||
{
|
||||
// Update db family
|
||||
newFamily = (DTONcFamilyModel)toolsManager.UpdateFamily(familyId, family);
|
||||
|
||||
// Create backup of data stored on the NC and block file accesses
|
||||
CmsError cmsError = numericalControl.TOOLS_WStartEditData();
|
||||
if (cmsError.IsError())
|
||||
{
|
||||
ManageErrorAndTransaction(cmsError, dbContextTransaction, true);
|
||||
return cmsError;
|
||||
}
|
||||
|
||||
// Update Nc families
|
||||
cmsError = UpdateNcFamily(toolsManager);
|
||||
|
||||
ManageErrorAndTransaction(cmsError, dbContextTransaction, true);
|
||||
|
||||
return cmsError;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public CmsError DeleteNcFamily(int famId)
|
||||
{
|
||||
using (NcToolManagerController toolsManager = new NcToolManagerController())
|
||||
{
|
||||
using (var dbContextTransaction = toolsManager.dbCtx.Database.BeginTransaction())
|
||||
{
|
||||
// Create backup of data stored on the NC and block file accesses
|
||||
CmsError cmsError = numericalControl.TOOLS_WStartEditData();
|
||||
if (cmsError.IsError())
|
||||
return cmsError;
|
||||
|
||||
// Check if shank opt is disabled
|
||||
if (!ToolManagerConfig.ShankOpt)
|
||||
{
|
||||
// If the relationship is 1:1 (tool:shank) i have to remove shanks manually
|
||||
// Tools are deleted thanks to foreign keys constraint
|
||||
List<DbNcShankModel> shanks = toolsManager.FindShanksByFamilyId(famId);
|
||||
foreach (var shank in shanks)
|
||||
{
|
||||
if (shank != null)
|
||||
toolsManager.DeleteNcShank(shank.ShankId);
|
||||
}
|
||||
}
|
||||
|
||||
toolsManager.DeleteFamily(famId);
|
||||
|
||||
// Update Nc families
|
||||
cmsError = UpdateNcFamily(toolsManager);
|
||||
|
||||
ManageErrorAndTransaction(cmsError, dbContextTransaction, true);
|
||||
|
||||
return cmsError;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private CmsError UpdateNcFamily(NcToolManagerController toolsManager)
|
||||
{
|
||||
// Get mounted shanks
|
||||
List<NcShankModel> shanks = toolsManager
|
||||
.FindShanks()
|
||||
.Where(x => x.MagazineId != null)
|
||||
.Select(x => (NcShankModel)x)
|
||||
.ToList();
|
||||
|
||||
// Get tools
|
||||
List<NcToolModel> tools = toolsManager
|
||||
.FindTools()
|
||||
.Select(x => (NcToolModel)x)
|
||||
.Where(x => shanks.Any(y => y.ShankId == x.ShankId)) // Find only mounted tools
|
||||
.ToList();
|
||||
|
||||
List<NcFamilyModel> families = toolsManager
|
||||
.FindFamilies()
|
||||
.Select(x => (NcFamilyModel)x)
|
||||
.Where(x => tools.Any(y => y.FamilyId == x.FamilyId)) // Find only families of mounted tools
|
||||
.ToList();
|
||||
|
||||
// Update nc families
|
||||
return numericalControl.TOOLS_WUpdateFamilies(families);
|
||||
}
|
||||
|
||||
public CmsError UpdateMagazinePosition(DbNcMagazinePositionModel dbPos, DTONcMagazinePositionModel dtoPos, out DTONcMagazinePositionModel magPos)
|
||||
{
|
||||
magPos = new DTONcMagazinePositionModel();
|
||||
|
||||
using (NcToolManagerController toolsManager = new NcToolManagerController())
|
||||
{
|
||||
using (DbContextTransaction dbContextTransaction = toolsManager.dbCtx.Database.BeginTransaction())
|
||||
{
|
||||
// Create backup of data stored on the NC and block file accesses
|
||||
CmsError cmsError = StartEditData();
|
||||
if (cmsError.IsError())
|
||||
{
|
||||
ManageErrorAndTransaction(cmsError, dbContextTransaction, true);
|
||||
return cmsError;
|
||||
}
|
||||
|
||||
// Update database data
|
||||
magPos = (DTONcMagazinePositionModel)toolsManager.UpdatePosition(dbPos, dtoPos);
|
||||
|
||||
// Get magazines positions
|
||||
List<NcMagazinePositionModel> positions = toolsManager.FindMagazinesPositions()
|
||||
.Select(x => (NcMagazinePositionModel)x)
|
||||
.ToList();
|
||||
// Update Nc data
|
||||
cmsError = numericalControl.TOOLS_WUpdateMagazinePositions(positions);
|
||||
|
||||
ManageErrorAndTransaction(cmsError, dbContextTransaction, true);
|
||||
|
||||
return cmsError;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void ManageErrorAndTransaction(CmsError cmsError, DbContextTransaction dbContextTransaction, bool ncStartIsActive)
|
||||
{
|
||||
// Check cmsError, manage transaction and if startIsActive = true manage Nc backup created with TOOLS_WStartEditData()
|
||||
if (cmsError.IsError())
|
||||
{
|
||||
// Close transaction
|
||||
dbContextTransaction.Rollback();
|
||||
// Restore backup
|
||||
if (ncStartIsActive)
|
||||
numericalControl.TOOLS_WRestoreBackup();
|
||||
}
|
||||
else
|
||||
{
|
||||
// Close transaction
|
||||
dbContextTransaction.Commit();
|
||||
// Stop editing ncData
|
||||
if (ncStartIsActive)
|
||||
numericalControl.TOOLS_WStopEditData();
|
||||
}
|
||||
}
|
||||
|
||||
public DTONcShankModel LoadIntoShank(DbNcToolModel tool, short shankId)
|
||||
{
|
||||
using (NcToolManagerController toolsManager = new NcToolManagerController())
|
||||
{
|
||||
return toolsManager.LoadToolIntoShank(tool, shankId);
|
||||
}
|
||||
}
|
||||
|
||||
public DTONcShankModel UnloadFromShank(DbNcToolModel tool)
|
||||
{
|
||||
using (NcToolManagerController toolsManager = new NcToolManagerController())
|
||||
{
|
||||
return toolsManager.UnloadToolFromShank(tool);
|
||||
}
|
||||
}
|
||||
|
||||
public CmsError SetupNcToolManager()
|
||||
{
|
||||
CmsError cmsError = UpdateMagazinePositionConf(out bool newDb);
|
||||
if (cmsError.IsError())
|
||||
return cmsError;
|
||||
|
||||
cmsError = WriteOption();
|
||||
if (cmsError.IsError())
|
||||
return cmsError;
|
||||
|
||||
using (NcToolManagerController toolManager = new NcToolManagerController())
|
||||
{
|
||||
// If database was empty read data from NC and update database
|
||||
if (newDb)
|
||||
{
|
||||
List<NcToolModel> tools = new List<NcToolModel>();
|
||||
List<NcFamilyModel> families = new List<NcFamilyModel>();
|
||||
List<NcShankModel> shanks = new List<NcShankModel>();
|
||||
|
||||
// Read data from Nc memory
|
||||
cmsError = numericalControl.TOOLS_RStoredData(ref tools, ref families, ref shanks);
|
||||
if (cmsError.IsError())
|
||||
return cmsError;
|
||||
|
||||
// Check if there are data
|
||||
if (tools.Count() > 0 || families.Count() > 0 || shanks.Count() > 0)
|
||||
{
|
||||
// Populate import object
|
||||
DTOExportToolTableModel exp = new DTOExportToolTableModel()
|
||||
{
|
||||
Tools = tools.Select(x => (DbNcToolModel)x).ToList(),
|
||||
Families = families.Select(x =>
|
||||
{
|
||||
var fam = (DbNcFamilyModel)x;
|
||||
fam.Name = "Fam" + fam.FamilyId.ToString();
|
||||
return fam;
|
||||
}).ToList(),
|
||||
Shanks = shanks.Select(x => (DbNcShankModel)x).ToList()
|
||||
};
|
||||
|
||||
// Import
|
||||
toolManager.ImportData(exp);
|
||||
}
|
||||
}
|
||||
|
||||
List<DTONcToolModel> databaseTool = toolManager.GetTools();
|
||||
bool exist = false;
|
||||
if (databaseTool != null && databaseTool.Count() > 0)
|
||||
// Check options consistency with database data
|
||||
exist = databaseTool.Exists(x =>
|
||||
(!ToolManagerConfig.FamilyOpt && x.FamilyId != x.Id) || // Check family
|
||||
(!ToolManagerConfig.ShankOpt && x.ShankId != x.Id) || // Check shanks
|
||||
(!ToolManagerConfig.OffsetOpt && x.OffsetId1 != x.Id && x.OffsetId2 != null && x.OffsetId3 != null) // Check offsets
|
||||
);
|
||||
|
||||
if (exist)
|
||||
return OPTION_NOT_CONSISTENT_ERROR;
|
||||
|
||||
// Check if there are blocked magazines, and release them
|
||||
cmsError = RestoreTableLock();
|
||||
if (cmsError.IsError())
|
||||
return cmsError;
|
||||
|
||||
}
|
||||
|
||||
return NO_ERROR;
|
||||
}
|
||||
|
||||
public CmsError UpdateMagazinePositionConf(out bool newDb)
|
||||
{
|
||||
newDb = false;
|
||||
using (NcToolManagerController toolsManager = new NcToolManagerController())
|
||||
{
|
||||
// Get database configured positions
|
||||
List<DbNcMagazinePositionModel> dbPositions = toolsManager.FindMagazinesPositions();
|
||||
if (dbPositions.Count <= 0)
|
||||
{
|
||||
// THe software is using a new database
|
||||
newDb = true;
|
||||
|
||||
CmsError cmsError = GetMagazineConfiguration(out List<NcMagazineConfigModel> config);
|
||||
if (cmsError.IsError())
|
||||
return cmsError;
|
||||
|
||||
// Setup new positions list in order to be saved in the database
|
||||
List<DbNcMagazinePositionModel> fromConfigPosition = new List<DbNcMagazinePositionModel>();
|
||||
foreach (var conf in config)
|
||||
{
|
||||
for (byte i = 1; i <= conf.MaxPositions; i++)
|
||||
{
|
||||
// Create new position
|
||||
fromConfigPosition.Add(new DbNcMagazinePositionModel()
|
||||
{
|
||||
MagazineId = conf.Id,
|
||||
PositionId = i,
|
||||
Disabled = false,
|
||||
Type = 0
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// Update database
|
||||
toolsManager.SetupMagazinePositions(fromConfigPosition);
|
||||
|
||||
return cmsError;
|
||||
}
|
||||
|
||||
return NO_ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
public CmsError WriteOption()
|
||||
{
|
||||
ToolManagerOptionsModel options = new ToolManagerOptionsModel();
|
||||
SupportFunctions.CopyProperties(ToolManagerConfig, options);
|
||||
|
||||
return numericalControl.TOOLS_WOptions(options);
|
||||
}
|
||||
|
||||
public CmsError GetMagazineConfiguration(out List<NcMagazineConfigModel> config)
|
||||
{
|
||||
config = new List<NcMagazineConfigModel>();
|
||||
// Read configuration
|
||||
return numericalControl.TOOLS_RMagazineConfig(ref config);
|
||||
}
|
||||
|
||||
public CmsError StartEditData()
|
||||
{
|
||||
return numericalControl.TOOLS_WStartEditData();
|
||||
}
|
||||
|
||||
public CmsError StopEditData()
|
||||
{
|
||||
return numericalControl.TOOLS_WStopEditData();
|
||||
}
|
||||
|
||||
public CmsError StartEditTooling(int magazineId)
|
||||
{
|
||||
return numericalControl.TOOLS_WStartEditTooling(magazineId);
|
||||
}
|
||||
|
||||
public CmsError StopEditTooling(int magazineId)
|
||||
{
|
||||
using (NcToolManagerController toolsManager = new NcToolManagerController())
|
||||
{
|
||||
// Get mounted shanks
|
||||
List<NcShankModel> shanks = toolsManager
|
||||
.FindShanks()
|
||||
.Where(x => x.MagazineId != null)
|
||||
.Select(x => (NcShankModel)x)
|
||||
.ToList();
|
||||
// Update shanks
|
||||
CmsError cmsError = numericalControl.TOOLS_WUpdateShanks(shanks);
|
||||
if (cmsError.IsError())
|
||||
return cmsError;
|
||||
|
||||
// Get magazine positions
|
||||
List<NcMagazinePositionModel> positions = toolsManager.FindMagazinesPositions()
|
||||
.Select(x => (NcMagazinePositionModel)x)
|
||||
.ToList();
|
||||
// Update positions
|
||||
cmsError = numericalControl.TOOLS_WUpdateMagazinePositions(positions);
|
||||
if (cmsError.IsError())
|
||||
return cmsError;
|
||||
|
||||
// Get tools
|
||||
List<NcToolModel> tools = toolsManager
|
||||
.FindTools()
|
||||
.Select(x => (NcToolModel)x)
|
||||
.Where(x => shanks.Any(y => y.ShankId == x.ShankId)) // Find only mounted tools
|
||||
.ToList();
|
||||
|
||||
// Update tools
|
||||
cmsError = numericalControl.TOOLS_WUpdateTools(tools);
|
||||
if (cmsError.IsError())
|
||||
return cmsError;
|
||||
|
||||
// Get families
|
||||
List<NcFamilyModel> families = toolsManager
|
||||
.FindFamilies()
|
||||
.Select(x => (NcFamilyModel)x)
|
||||
.Where(x => tools.Any(y => y.FamilyId == x.FamilyId)) // Find only families of mounted tools
|
||||
.ToList();
|
||||
|
||||
// Update families
|
||||
cmsError = numericalControl.TOOLS_WUpdateFamilies(families);
|
||||
if (cmsError.IsError())
|
||||
return cmsError;
|
||||
}
|
||||
|
||||
return numericalControl.TOOLS_WStopEditTooling(magazineId);
|
||||
}
|
||||
|
||||
public CmsError GetUpdatedToolsData(out Dictionary<int, byte> updatedStatus, out Dictionary<int, uint> updatedLives)
|
||||
{
|
||||
updatedStatus = new Dictionary<int, byte>();
|
||||
updatedLives = new Dictionary<int, uint>();
|
||||
return numericalControl.TOOLS_RUpdatedToolsData(ref updatedStatus, ref updatedLives);
|
||||
}
|
||||
|
||||
public CmsError CheckIfShankCanFit(int magazineId, int positionId, DbNcShankModel shankToBeLoaded)
|
||||
{
|
||||
CmsError cmsError = GetMagazineConfiguration(out List<NcMagazineConfigModel> magazinesConfig);
|
||||
if (cmsError.IsError())
|
||||
return cmsError;
|
||||
|
||||
NcMagazineConfigModel magConfig = magazinesConfig.FirstOrDefault(x => x.Id == magazineId);// Get only current magazine config
|
||||
if (magConfig == null)
|
||||
return INCORRECT_PARAMETERS_ERROR;
|
||||
|
||||
using (NcToolManagerController toolsManager = new NcToolManagerController())
|
||||
{
|
||||
List<DbNcToolModel> magazineMountedTools = toolsManager.GetMountedTools();
|
||||
|
||||
// Check if there is a tool already mounted the selected position (magazineId, positionId)
|
||||
var toolAlreadyMounted = magazineMountedTools.FirstOrDefault(x => x.Shank.MagazineId == magazineId && x.Shank.PositionId == positionId);
|
||||
if (toolAlreadyMounted != null)
|
||||
return MAGAZINE_POSITION_OCCUPIED_ERROR;
|
||||
|
||||
// Get shank occupied space
|
||||
toolsManager.GetShankMaxSpaceOccupied(shankToBeLoaded.ShankId, out int maxRight, out int maxLeft);
|
||||
|
||||
// Check if tool can fit in the position considering other tools
|
||||
foreach (var mountedTool in magazineMountedTools)
|
||||
{
|
||||
// Check if is not the same position && if is different check if the position is on the same magazine
|
||||
if (mountedTool.Shank.PositionId != positionId && mountedTool.Shank.MagazineId == magazineId)
|
||||
{
|
||||
int decPosition, incPosition;
|
||||
decPosition = incPosition = mountedTool.Shank.PositionId.Value;
|
||||
// if it is a circular magazine move position before ( for left case ) or after ( right case ) the location you want to mount the tool
|
||||
if (magConfig.Type != NC_MAGAZINE_TYPE.BOX_MAGAZINE)
|
||||
{
|
||||
decPosition = decPosition < positionId ? decPosition + magConfig.MaxPositions : decPosition;
|
||||
incPosition = incPosition > positionId ? incPosition - magConfig.MaxPositions : incPosition;
|
||||
}
|
||||
|
||||
// Right check
|
||||
if (positionId < decPosition)
|
||||
{
|
||||
if (!(magConfig.Type == NC_MAGAZINE_TYPE.BOX_MAGAZINE && mountedTool.Shank.PositionId == 1))
|
||||
{
|
||||
// Calculate left space occupied (with mounted shank)
|
||||
double leftMounted = decPosition - (mountedTool.Family.LeftSize / 2.0);
|
||||
// Calculate right space needed (with shank to be loaded)
|
||||
double rightToBeMount = positionId + (maxRight / 2.0);
|
||||
if (leftMounted < rightToBeMount)
|
||||
return MAGAZINE_POSITION_OCCUPIED_ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
// Left check
|
||||
if (positionId > incPosition)
|
||||
{
|
||||
if (!(magConfig.Type == NC_MAGAZINE_TYPE.BOX_MAGAZINE && mountedTool.Shank.PositionId == magConfig.MaxPositions))
|
||||
{
|
||||
// Calculate right space occupied (with mounted shank)
|
||||
double rightMounted = incPosition + (mountedTool.Family.RightSize / 2.0);
|
||||
// Calculate left space needed (with shank to be loaded)
|
||||
double leftToBeMounted = positionId - (maxLeft / 2.0);
|
||||
if (rightMounted > leftToBeMounted)
|
||||
return MAGAZINE_POSITION_OCCUPIED_ERROR;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return NO_ERROR;
|
||||
}
|
||||
|
||||
public CmsError GetNcMagazineStatus(out Dictionary<int, bool> status)
|
||||
{
|
||||
status = new Dictionary<int, bool>();
|
||||
return numericalControl.TOOLS_RMagazineStatus(ref status);
|
||||
}
|
||||
|
||||
public CmsError StartAssistedToolingProcedure(ushort toolId, ushort familyId, ushort shankId, ushort magazineId, ushort positionId, ASSISTED_TOOLING_ACTION action)
|
||||
{
|
||||
return numericalControl.PLC_WAssistedToolingCmd(toolId, familyId, shankId, magazineId, positionId, action);
|
||||
}
|
||||
|
||||
public CmsError ReadAssistedToolingProcedure(out DTOAssistedToolingEndValueModel data)
|
||||
{
|
||||
data = new DTOAssistedToolingEndValueModel();
|
||||
AssistedToolingModel tmpData = new AssistedToolingModel();
|
||||
CmsError cmsError = numericalControl.PLC_RAssistedToolingData(ref tmpData);
|
||||
if (cmsError.IsError())
|
||||
return cmsError;
|
||||
|
||||
data = new DTOAssistedToolingEndValueModel(tmpData);
|
||||
|
||||
return cmsError;
|
||||
}
|
||||
|
||||
public CmsError TerminateAssistedProcedure(int magazineId, bool writeData)
|
||||
{
|
||||
if (writeData)
|
||||
{
|
||||
CmsError cmsError = StartEditTooling(magazineId);
|
||||
if (!cmsError.IsError())
|
||||
{
|
||||
// Write tool table new data
|
||||
cmsError = StopEditTooling(magazineId);
|
||||
if (!cmsError.IsError())
|
||||
{
|
||||
// Close procedure
|
||||
return numericalControl.PLC_WTerminateAssistedToolingProcedure();
|
||||
}
|
||||
}
|
||||
return cmsError;
|
||||
}
|
||||
else
|
||||
{
|
||||
return numericalControl.PLC_WTerminateAssistedToolingProcedure();
|
||||
}
|
||||
}
|
||||
|
||||
public CmsError GetSelfAdaptiveStep(out DTOSelfAdaptiveModel step)
|
||||
{
|
||||
step = new DTOSelfAdaptiveModel();
|
||||
byte intStep = 0;
|
||||
|
||||
//Get the value
|
||||
CmsError cmsError = numericalControl.TOOLS_RAdatpivePathStep(ref intStep);
|
||||
step.Step = intStep;
|
||||
return cmsError;
|
||||
}
|
||||
|
||||
public CmsError SetSelfAdaptiveStep(DTOSelfAdaptiveModel step)
|
||||
{
|
||||
//Limit Value
|
||||
if (step.Step > 100)
|
||||
step.Step = 100;
|
||||
if (step.Step < 0)
|
||||
step.Step = 0;
|
||||
|
||||
//Set the value
|
||||
return numericalControl.TOOLS_WAdatpivePathStep(step.Step);
|
||||
}
|
||||
|
||||
public CmsError RestoreTableLock()
|
||||
{
|
||||
List<int> ids = new List<int>();
|
||||
// check if there are magazines blocked by Active previously
|
||||
CmsError cmsError = numericalControl.TOOLS_RMagazineBlock(ref ids);
|
||||
if (cmsError.IsError())
|
||||
return cmsError;
|
||||
|
||||
if (ids.Count() > 0)
|
||||
{
|
||||
// Update tables
|
||||
cmsError = StopEditTooling(ids.FirstOrDefault());
|
||||
if (cmsError.IsError())
|
||||
return cmsError;
|
||||
// Free magazines
|
||||
return numericalControl.TOOLS_WFreeMagazines();
|
||||
}
|
||||
|
||||
return NO_ERROR;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,272 +0,0 @@
|
||||
using CMS_CORE_Library.Models;
|
||||
using Thermo.Active.Model.DTOModels.ToolModels;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using static Thermo.Active.Config.ServerConfig;
|
||||
using static Thermo.Active.Model.Constants;
|
||||
|
||||
namespace Thermo.Active.NC
|
||||
{
|
||||
public class SiemensToolTableAdapter : NcAdapter
|
||||
{
|
||||
public CmsError GetToolTableConfiguration(out ToolTableConfiguration config)
|
||||
{
|
||||
config = new ToolTableConfiguration();
|
||||
CmsError cmsError = numericalControl.TOOLS_RConfiguration(ref config);
|
||||
if (cmsError.IsError())
|
||||
return cmsError;
|
||||
|
||||
// Set magazine assisted tooling from config
|
||||
foreach (var magConfig in ToolManagerConfig.MagazineNames)
|
||||
{
|
||||
var mag = config.Magazines.FirstOrDefault(x => magConfig.MagazineId == x.Id);
|
||||
if (mag != null)
|
||||
mag.AssistedToolingIsActive = magConfig.AssistedTooling;
|
||||
}
|
||||
|
||||
config.RadiusMetricType = (ToolManagerConfig.ToolMetricType == RADIUS_METRIC);
|
||||
|
||||
config.SelfAdaptivePathOptionActive = true;
|
||||
if (!ToolManagerConfig.SelfAdaptivePathOpt)
|
||||
config.SelfAdaptivePathOptionActive = false;
|
||||
|
||||
if (NcConfig.NcVendor != NC_VENDOR.SIEMENS && NcConfig.NcVendor != NC_VENDOR.DEMO)
|
||||
{
|
||||
// Setup options
|
||||
config.FamilyOptionActive = true;
|
||||
config.MultitoolOptionActive = true;
|
||||
config.OffsetOptionActive = true;
|
||||
config.LifeOption = true;
|
||||
|
||||
// Add categories to be removed
|
||||
List<string> categories = new List<string>();
|
||||
if (!ToolManagerConfig.ShankOpt)
|
||||
{
|
||||
config.MultitoolOptionActive = false;
|
||||
categories.Add("shankType");
|
||||
config.ToolsConfiguration = config.ToolsConfiguration.Where(x => !(x.Name == "shankId")).ToList();
|
||||
}
|
||||
|
||||
if (!ToolManagerConfig.FamilyOpt)
|
||||
{
|
||||
config.FamilyOptionActive = false;
|
||||
categories.Add("family");
|
||||
config.ToolsConfiguration = config.ToolsConfiguration.Where(x => !(x.Name == "familyId")).ToList();
|
||||
config.ToolsConfiguration = config.FamiliesConfiguration.FamilyConfiguration.Concat(config.ToolsConfiguration).ToList();
|
||||
}
|
||||
|
||||
if (!ToolManagerConfig.OffsetOpt)
|
||||
config.OffsetOptionActive = false;
|
||||
|
||||
categories.Add("offset");
|
||||
|
||||
if (!ToolManagerConfig.TcpOpt)
|
||||
categories.Add("tcp");
|
||||
|
||||
if (!ToolManagerConfig.CoolingOpt)
|
||||
categories.Add("cooling");
|
||||
|
||||
if (!ToolManagerConfig.DynamicCompensationOpt)
|
||||
categories.Add("dynamicCompensation");
|
||||
|
||||
if (!ToolManagerConfig.GammaOpt)
|
||||
categories.Add("gamma");
|
||||
|
||||
if (!ToolManagerConfig.LifeOpt)
|
||||
{
|
||||
categories.Add("life");
|
||||
config.LifeOption = false;
|
||||
}
|
||||
|
||||
if (!ToolManagerConfig.MagPosTypeOpt)
|
||||
categories.Add("magPos");
|
||||
|
||||
if (!ToolManagerConfig.MultidimensionalShankOpt)
|
||||
categories.Add("shankOpt");
|
||||
|
||||
if (!ToolManagerConfig.SelfAdaptivePathOpt)
|
||||
categories.Add("selfAdaptive");
|
||||
|
||||
if (!ToolManagerConfig.BallufOpt)
|
||||
categories.Add("balluf");
|
||||
|
||||
if (!ToolManagerConfig.ReviveOpt)
|
||||
categories.Add("revive");
|
||||
|
||||
if (!ToolManagerConfig.IntegrityCheckOpt)
|
||||
categories.Add("integrityCheck");
|
||||
|
||||
// Remove category from configurations
|
||||
config.ToolsConfiguration = config.ToolsConfiguration.Where(x => !categories.Contains(x.Category) && !categories.Contains(x.SubCategory)).ToList();
|
||||
|
||||
// Remove categories from familyConfig
|
||||
config.FamiliesConfiguration.FamilyConfiguration = config.FamiliesConfiguration.FamilyConfiguration.Where(x => !categories.Contains(x.Category)).ToList();
|
||||
// Remove also SUBCATEGORIES because "ReadOnlyFamily" configuration has category field not populated
|
||||
config.FamiliesConfiguration.FamilyReadOnlyConfiguration = config.FamiliesConfiguration.FamilyReadOnlyConfiguration.Where(x => !categories.Contains(x.SubCategory)).ToList();
|
||||
|
||||
config.ShanksConfiguration.ShankConfiguration = config.ShanksConfiguration.ShankConfiguration.Where(x => !categories.Contains(x.Category)).ToList();
|
||||
config.MagazinePosConfiguration = config.MagazinePosConfiguration.Where(x => !categories.Contains(x.Category)).ToList();
|
||||
|
||||
// Update tool types list
|
||||
config.FamiliesConfiguration.FamilyConfiguration.Where(x => x.Name == "toolType").FirstOrDefault().SelectValues = GetToolTypeList();
|
||||
}
|
||||
else if (NcConfig.NcVendor == NC_VENDOR.SIEMENS) // IF == SIEMENS
|
||||
{
|
||||
// Update Tool types list
|
||||
config.ToolsConfiguration.Where(x => x.Name == "toolTypeCode").FirstOrDefault().SelectValues = GetToolTypeList();
|
||||
}
|
||||
|
||||
return cmsError;
|
||||
}
|
||||
|
||||
private Dictionary<int, string> GetToolTypeList()
|
||||
{
|
||||
return ToolManagerConfig
|
||||
.ToolTypes.Where(x => !x.Disabled)
|
||||
.ToDictionary(x => x.Id, x => x.Id.ToString());
|
||||
}
|
||||
|
||||
public CmsError GetToolTableData(out List<SiemensToolModel> config)
|
||||
{
|
||||
config = new List<SiemensToolModel>();
|
||||
return numericalControl.TOOLS_RToolsData(ref config);
|
||||
}
|
||||
|
||||
public CmsError GetShanksData(out List<ShankModel> shanks)
|
||||
{
|
||||
shanks = new List<ShankModel>();
|
||||
return numericalControl.TOOLS_RShanksData(ref shanks);
|
||||
}
|
||||
|
||||
public CmsError GetFamiliesData(out List<FamilyModel> families)
|
||||
{
|
||||
families = new List<FamilyModel>();
|
||||
return numericalControl.TOOLS_RFamilyData(ref families);
|
||||
}
|
||||
|
||||
public CmsError GetMagazinesPositionsData(out List<PositionModel> magazinesPositions)
|
||||
{
|
||||
magazinesPositions = new List<PositionModel>();
|
||||
return numericalControl.TOOLS_RMagazinePositions(ref magazinesPositions);
|
||||
}
|
||||
|
||||
public CmsError GetMagazineStatus(out DTOMagazineActionModel magazineStatus)
|
||||
{
|
||||
// Set up models
|
||||
magazineStatus = new DTOMagazineActionModel();
|
||||
MagazineActionModel libModel = new MagazineActionModel();
|
||||
// Read status from NC
|
||||
CmsError cmsError = numericalControl.TOOLS_RMagazineAction(ref libModel);
|
||||
if (cmsError.IsError())
|
||||
return cmsError;
|
||||
|
||||
magazineStatus = (DTOMagazineActionModel)libModel;
|
||||
|
||||
return cmsError;
|
||||
}
|
||||
|
||||
public CmsError AddTool(ref SiemensToolModel tool)
|
||||
{
|
||||
return numericalControl.TOOLS_WAddTool(ref tool);
|
||||
}
|
||||
|
||||
public CmsError UpdateTool(ref SiemensToolModel tool)
|
||||
{
|
||||
return numericalControl.TOOLS_WUpdateTool(ref tool);
|
||||
}
|
||||
|
||||
public CmsError AddFamily(string name, out FamilyModel family)
|
||||
{
|
||||
family = new FamilyModel()
|
||||
{
|
||||
Name = name
|
||||
};
|
||||
|
||||
return numericalControl.TOOLS_WAddFamily(ref family);
|
||||
}
|
||||
|
||||
public CmsError AddShank(ref ShankModel shank)
|
||||
{
|
||||
return numericalControl.TOOLS_WAddShank(ref shank);
|
||||
}
|
||||
|
||||
public CmsError UpdateShank(ref ShankModel shank)
|
||||
{
|
||||
return numericalControl.TOOLS_WUpdateShank(ref shank);
|
||||
}
|
||||
|
||||
public CmsError UpdateFamilyName(string oldName, string newName)
|
||||
{
|
||||
return numericalControl.TOOLS_WUpdateFamilyData(oldName, newName);
|
||||
}
|
||||
|
||||
public CmsError UpdateMagazinePosition(PositionModel magazinePosition)
|
||||
{
|
||||
return numericalControl.TOOLS_WUpdatePosition(magazinePosition);
|
||||
}
|
||||
|
||||
public CmsError DeleteTool(int id)
|
||||
{
|
||||
return numericalControl.TOOLS_WDeleteTool(id);
|
||||
}
|
||||
|
||||
public CmsError DeleteShank(int id)
|
||||
{
|
||||
return numericalControl.TOOLS_WDeleteShank(id);
|
||||
}
|
||||
|
||||
public CmsError DeleteFamily(string name)
|
||||
{
|
||||
return numericalControl.TOOLS_WDeleteFamily(name);
|
||||
}
|
||||
|
||||
public CmsError AddEdge(int toolId, ref EdgeModel edge)
|
||||
{
|
||||
return numericalControl.TOOLS_WAddEdge(toolId, ref edge);
|
||||
}
|
||||
|
||||
public CmsError UpdateEdge(int toolId, ref EdgeModel edge)
|
||||
{
|
||||
return numericalControl.TOOLS_WUpdateEdge(toolId, ref edge);
|
||||
}
|
||||
|
||||
public CmsError DeleteEdge(int toolId, int edgeId)
|
||||
{
|
||||
return numericalControl.TOOLS_WDeleteEdge(toolId, edgeId);
|
||||
}
|
||||
|
||||
public CmsError GetMagazinePositionsAndTools(int magazineId, out List<MountedToolModel> magazinePos)
|
||||
{
|
||||
magazinePos = new List<MountedToolModel>();
|
||||
return numericalControl.TOOLS_RMountedTools(magazineId, ref magazinePos);
|
||||
}
|
||||
|
||||
public CmsError GetNotInMagazinesTools(out List<ShankModel> multiTools, out List<SiemensToolModel> tools)
|
||||
{
|
||||
multiTools = new List<ShankModel>();
|
||||
tools = new List<SiemensToolModel>();
|
||||
return numericalControl.TOOLS_RAvailableTools(ref multiTools, ref tools);
|
||||
}
|
||||
|
||||
public CmsError LoadToolInMagazine(int magazineId, NewToolInMagazineModel newMag, out MountedToolModel mounted)
|
||||
{
|
||||
mounted = new MountedToolModel();
|
||||
return numericalControl.TOOLS_WLoadToolInMagazine(magazineId, newMag, ref mounted);
|
||||
}
|
||||
|
||||
public CmsError UnloadToolInMagazine(int magazineId, int positionId)
|
||||
{
|
||||
return numericalControl.TOOLS_WUnloadToolFromMagazine(magazineId, positionId);
|
||||
}
|
||||
|
||||
public CmsError LoadTooolIntoShank(int shankId, int positionId, int toolId)
|
||||
{
|
||||
return numericalControl.TOOLS_WLoadToolIntoShank(shankId, positionId, toolId);
|
||||
}
|
||||
|
||||
public CmsError UnloadTooolFromShank(int shankId, int positionId)
|
||||
{
|
||||
return numericalControl.TOOLS_WUnloadToolFromShank(shankId, positionId);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -49,9 +49,7 @@
|
||||
<ItemGroup>
|
||||
<Compile Include="NcFileAdapter.cs" />
|
||||
<Compile Include="NcAdapter.cs" />
|
||||
<Compile Include="NcToolTableAdapter.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="SiemensToolTableAdapter.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="app.config" />
|
||||
|
||||
@@ -249,7 +249,6 @@ namespace Thermo.Active.Utils
|
||||
{
|
||||
job.Metadata.Generics.Description = metasFromFile.Description;
|
||||
job.Metadata.Generics.ExecutionTime = metasFromFile.ExecutionTime;
|
||||
job.Metadata.Tools = metasFromFile.Tools;
|
||||
job.Metadata.Customs = metasFromFile.Customs;
|
||||
}
|
||||
}
|
||||
@@ -349,7 +348,6 @@ namespace Thermo.Active.Utils
|
||||
{
|
||||
jobData.Metadata.Generics.Description = metasFromFile.Description;
|
||||
jobData.Metadata.Generics.ExecutionTime = metasFromFile.ExecutionTime;
|
||||
jobData.Metadata.Tools = metasFromFile.Tools;
|
||||
jobData.Metadata.Customs = metasFromFile.Customs;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,7 +24,6 @@ namespace Thermo.Active.Controllers.WebApi
|
||||
ScadaConfig = ScadaConfig,
|
||||
MaintenanceConfig = MaintenanceConfig,
|
||||
ReportConfig = ReportConfig,
|
||||
ToolingConfig = ToolingConfig,
|
||||
UtilitiesConfig = UtilitiesConfig,
|
||||
JobEditorConfig = JobEditorConfig,
|
||||
UsersConfig = UsersConfig
|
||||
@@ -127,20 +126,6 @@ namespace Thermo.Active.Controllers.WebApi
|
||||
return Ok(alarmsConfig);
|
||||
}
|
||||
|
||||
[Route("tool_manager"), HttpGet]
|
||||
public IHttpActionResult GetToolTableConfiguration()
|
||||
{
|
||||
using (SiemensToolTableAdapter ncAdapter = new SiemensToolTableAdapter())
|
||||
{
|
||||
ncAdapter.Connect();
|
||||
CmsError libraryError = ncAdapter.GetToolTableConfiguration(out ToolTableConfiguration toolTableConfiguration);
|
||||
if (libraryError.IsError())
|
||||
return BadRequest(libraryError.localizationKey);
|
||||
|
||||
return Ok(toolTableConfiguration);
|
||||
}
|
||||
}
|
||||
|
||||
[Route("cmscontact"), HttpGet]
|
||||
public IHttpActionResult GetCmsContact()
|
||||
{
|
||||
|
||||
@@ -54,20 +54,9 @@ namespace Thermo.Active.Controllers.WebApi
|
||||
Dictionary<string, string> alarmsNames = GetPlcAlarmsTranslations(language);
|
||||
Dictionary<string, string> headsNames = GetLocalizedHeadsNames(language);
|
||||
|
||||
Dictionary<string, string> magazinesNames = GetToolManagerTranslations(language);
|
||||
|
||||
Dictionary<string, string> scadaTranslations = GetScadaTranslations(language);
|
||||
|
||||
// Cooling
|
||||
if (NcConfig.NcVendor != NC_VENDOR.SIEMENS)
|
||||
{
|
||||
Dictionary<string, string> coolingNames = GetCoolingTranslations(language);
|
||||
foreach (var coolingItem in coolingNames)
|
||||
{
|
||||
translations[coolingItem.Key] = coolingItem.Value;
|
||||
}
|
||||
}
|
||||
|
||||
// Concat maintenances dictionary with translations dictionary
|
||||
translations = translations.Concat(maintenanceNames).ToDictionary(x => x.Key, x => x.Value);
|
||||
// Softkeys
|
||||
@@ -76,8 +65,6 @@ namespace Thermo.Active.Controllers.WebApi
|
||||
translations = translations.Concat(alarmsNames).ToDictionary(x => x.Key, x => x.Value);
|
||||
// Heads
|
||||
translations = translations.Concat(headsNames).ToDictionary(x => x.Key, x => x.Value);
|
||||
// Magazines
|
||||
translations = translations.Concat(magazinesNames).ToDictionary(x => x.Key, x => x.Value);
|
||||
// Scada
|
||||
translations = translations.Concat(scadaTranslations).ToDictionary(x => x.Key, x => x.Value);
|
||||
|
||||
@@ -173,86 +160,6 @@ namespace Thermo.Active.Controllers.WebApi
|
||||
}
|
||||
}
|
||||
|
||||
private static Dictionary<string, string> GetCoolingTranslations(string language)
|
||||
{
|
||||
Dictionary<string, string> dictionary = new Dictionary<string, string>();
|
||||
|
||||
// Find translated key
|
||||
var key = ToolManagerConfig.CooligsTranslations.Cooling.Where(x => x.Key == language).FirstOrDefault();
|
||||
if (key.Value != null)
|
||||
{
|
||||
// Add translated value \
|
||||
dictionary.Add("tooling_family_param_cooling", key.Value);
|
||||
dictionary.Add("tooling_equipment_param_cooling", key.Value);
|
||||
}
|
||||
key = ToolManagerConfig.CooligsTranslations.Cooling1.Where(x => x.Key == language).FirstOrDefault();
|
||||
if (key.Value != null)
|
||||
{
|
||||
dictionary.Add("tooling_family_param_cooling1", key.Value);
|
||||
dictionary.Add("tooling_equipment_param_cooling1", key.Value);
|
||||
}
|
||||
key = ToolManagerConfig.CooligsTranslations.Cooling2.Where(x => x.Key == language).FirstOrDefault();
|
||||
if (key.Value != null)
|
||||
{
|
||||
dictionary.Add("tooling_family_param_cooling2", key.Value);
|
||||
dictionary.Add("tooling_equipment_param_cooling2", key.Value);
|
||||
}
|
||||
key = ToolManagerConfig.CooligsTranslations.Cooling3.Where(x => x.Key == language).FirstOrDefault();
|
||||
if (key.Value != null)
|
||||
{
|
||||
dictionary.Add("tooling_family_param_cooling3", key.Value);
|
||||
dictionary.Add("tooling_equipment_param_cooling3", key.Value);
|
||||
}
|
||||
key = ToolManagerConfig.CooligsTranslations.Cooling4.Where(x => x.Key == language).FirstOrDefault();
|
||||
if (key.Value != null)
|
||||
{
|
||||
dictionary.Add("tooling_family_param_cooling4", key.Value);
|
||||
dictionary.Add("tooling_equipment_param_cooling4", key.Value);
|
||||
}
|
||||
key = ToolManagerConfig.CooligsTranslations.Cooling5.Where(x => x.Key == language).FirstOrDefault();
|
||||
if (key.Value != null)
|
||||
{
|
||||
dictionary.Add("tooling_family_param_cooling5", key.Value);
|
||||
dictionary.Add("tooling_equipment_param_cooling5", key.Value);
|
||||
}
|
||||
key = ToolManagerConfig.CooligsTranslations.Cooling6.Where(x => x.Key == language).FirstOrDefault();
|
||||
if (key.Value != null)
|
||||
{
|
||||
dictionary.Add("tooling_family_param_cooling6", key.Value);
|
||||
dictionary.Add("tooling_equipment_param_cooling6", key.Value);
|
||||
}
|
||||
key = ToolManagerConfig.CooligsTranslations.Cooling7.Where(x => x.Key == language).FirstOrDefault();
|
||||
if (key.Value != null)
|
||||
{
|
||||
dictionary.Add("tooling_family_param_cooling7", key.Value);
|
||||
dictionary.Add("tooling_equipment_param_cooling7", key.Value);
|
||||
}
|
||||
return dictionary;
|
||||
}
|
||||
|
||||
private static Dictionary<string, string> GetToolManagerTranslations(string language)
|
||||
{
|
||||
Dictionary<string, string> translatedNames = new Dictionary<string, string>();
|
||||
|
||||
foreach (var mag in ToolManagerConfig.MagazineNames)
|
||||
{
|
||||
translatedNames.Add(
|
||||
"magazine_name_" + mag.MagazineId,
|
||||
GetValueFromLocalizationList(mag.LocalizedNames, language, "Magazine_" + mag.MagazineId)
|
||||
);
|
||||
}
|
||||
|
||||
foreach(var toolType in ToolManagerConfig.ToolTypes)
|
||||
{
|
||||
translatedNames.Add(
|
||||
"tooling_equipment_list_select_" + toolType.Id,
|
||||
GetValueFromLocalizationList(toolType.LocalizedNames, language, "Magazine_" + toolType.Id)
|
||||
);
|
||||
}
|
||||
|
||||
return translatedNames;
|
||||
}
|
||||
|
||||
private static Dictionary<string, string> GetScadaTranslations(string language)
|
||||
{
|
||||
Dictionary<string, string> translatedNames = new Dictionary<string, string>();
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,449 +0,0 @@
|
||||
using CMS_CORE_Library.Models;
|
||||
using Thermo.Active.Model.DatabaseModels;
|
||||
using Thermo.Active.Model.DTOModels.ToolModels;
|
||||
using Thermo.Active.NC;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Web.Http;
|
||||
|
||||
namespace Thermo.Active.Controllers.WebApi
|
||||
{
|
||||
[RoutePrefix("api/tool_manager")]
|
||||
public class SiemensToolManagerController : ApiController
|
||||
{
|
||||
[Route("tools"), HttpGet]
|
||||
public IHttpActionResult GetToolTable()
|
||||
{
|
||||
using (SiemensToolTableAdapter ncAdapter = new SiemensToolTableAdapter())
|
||||
{
|
||||
ncAdapter.Connect();
|
||||
CmsError libraryError = ncAdapter.GetToolTableData(out List<SiemensToolModel> tools);
|
||||
if (libraryError.IsError())
|
||||
return BadRequest(libraryError.localizationKey);
|
||||
|
||||
return Ok(tools);
|
||||
}
|
||||
}
|
||||
|
||||
[Route("siemens/tool"), HttpPost]
|
||||
public IHttpActionResult AddTool([FromBody][Required]DTOSiemensToolModel tool)
|
||||
{
|
||||
if (!ModelState.IsValid)
|
||||
return BadRequest(ModelState);
|
||||
|
||||
using (SiemensToolTableAdapter ncAdapter = new SiemensToolTableAdapter())
|
||||
{
|
||||
// Convert from DTOModel to library model
|
||||
SiemensToolModel siemensModel = (SiemensToolModel)tool; ;
|
||||
|
||||
ncAdapter.Connect();
|
||||
CmsError libraryError = ncAdapter.AddTool(ref siemensModel);
|
||||
if (libraryError.IsError())
|
||||
return BadRequest(libraryError.localizationKey);
|
||||
|
||||
return Ok(siemensModel);
|
||||
}
|
||||
}
|
||||
|
||||
[Route("siemens/tool/{id}"), HttpPut]
|
||||
public IHttpActionResult UpdateTool(int id, [FromBody][Required]DTOSiemensToolModel tool)
|
||||
{
|
||||
if (!ModelState.IsValid)
|
||||
return BadRequest(ModelState);
|
||||
|
||||
using (SiemensToolTableAdapter ncAdapter = new SiemensToolTableAdapter())
|
||||
{
|
||||
// Convert from DTOModel to library model
|
||||
SiemensToolModel siemensModel = (SiemensToolModel)tool;
|
||||
siemensModel.Id = id;
|
||||
|
||||
ncAdapter.Connect();
|
||||
CmsError libraryError = ncAdapter.UpdateTool(ref siemensModel);
|
||||
|
||||
if (libraryError.IsError())
|
||||
return BadRequest(libraryError.localizationKey);
|
||||
|
||||
return Ok(siemensModel);
|
||||
}
|
||||
}
|
||||
|
||||
[Route("tool/{id:int}"), HttpDelete]
|
||||
public IHttpActionResult DeleteTool(int id)
|
||||
{
|
||||
using (SiemensToolTableAdapter ncAdapter = new SiemensToolTableAdapter())
|
||||
{
|
||||
ncAdapter.Connect();
|
||||
// Call delete library function
|
||||
CmsError libraryError = ncAdapter.DeleteTool(id);
|
||||
if (libraryError.IsError())
|
||||
return BadRequest(libraryError.localizationKey);
|
||||
|
||||
return Ok();
|
||||
}
|
||||
}
|
||||
|
||||
[Route("families"), HttpGet]
|
||||
public IHttpActionResult GetFamilies()
|
||||
{
|
||||
using (SiemensToolTableAdapter ncAdapter = new SiemensToolTableAdapter())
|
||||
{
|
||||
ncAdapter.Connect();
|
||||
CmsError libraryError = ncAdapter.GetFamiliesData(out List<FamilyModel> families);
|
||||
if (libraryError.IsError())
|
||||
return BadRequest(libraryError.localizationKey);
|
||||
|
||||
return Ok(families);
|
||||
}
|
||||
}
|
||||
|
||||
[Route("family"), HttpPost]
|
||||
public IHttpActionResult AddFamily([FromBody] DTOFamilyModel family)
|
||||
{
|
||||
if (String.IsNullOrEmpty(family.Name))
|
||||
return BadRequest();
|
||||
|
||||
using (SiemensToolTableAdapter ncAdapter = new SiemensToolTableAdapter())
|
||||
{
|
||||
ncAdapter.Connect();
|
||||
CmsError libraryError = ncAdapter.AddFamily(family.Name, out FamilyModel newFamily);
|
||||
if (libraryError.IsError())
|
||||
return BadRequest(libraryError.localizationKey);
|
||||
|
||||
return Ok(newFamily);
|
||||
}
|
||||
}
|
||||
|
||||
[Route("family/{oldName}"), HttpPut]
|
||||
public IHttpActionResult PutFamily(string oldName, [FromBody]DTOFamilyModel family)
|
||||
{
|
||||
if (string.IsNullOrEmpty(family.Name))
|
||||
return BadRequest();
|
||||
|
||||
using (SiemensToolTableAdapter ncAdapter = new SiemensToolTableAdapter())
|
||||
{
|
||||
ncAdapter.Connect();
|
||||
|
||||
CmsError libraryError = ncAdapter.UpdateFamilyName(oldName, family.Name);
|
||||
if (libraryError.IsError())
|
||||
return BadRequest(libraryError.localizationKey);
|
||||
|
||||
return Ok(family);
|
||||
}
|
||||
}
|
||||
|
||||
[Route("family/{name}"), HttpDelete]
|
||||
public IHttpActionResult DeleteFamily(string name)
|
||||
{
|
||||
using (SiemensToolTableAdapter ncAdapter = new SiemensToolTableAdapter())
|
||||
{
|
||||
ncAdapter.Connect();
|
||||
// Call delete library function
|
||||
CmsError libraryError = ncAdapter.DeleteFamily(name);
|
||||
if (libraryError.IsError())
|
||||
return BadRequest(libraryError.localizationKey);
|
||||
|
||||
return Ok();
|
||||
}
|
||||
}
|
||||
|
||||
[Route("magazines_positions"), HttpGet]
|
||||
public IHttpActionResult GetMagazinesPositions()
|
||||
{
|
||||
using (SiemensToolTableAdapter ncAdapter = new SiemensToolTableAdapter())
|
||||
{
|
||||
ncAdapter.Connect();
|
||||
CmsError libraryError = ncAdapter.GetMagazinesPositionsData(out List<PositionModel> magazines);
|
||||
if (libraryError.IsError())
|
||||
return BadRequest(libraryError.localizationKey);
|
||||
|
||||
return Ok(magazines);
|
||||
}
|
||||
}
|
||||
|
||||
[Route("magazine/{magazineId:int}/positions"), HttpGet]
|
||||
public IHttpActionResult GetMagazinePositions(int magazineId)
|
||||
{
|
||||
using (SiemensToolTableAdapter ncAdapter = new SiemensToolTableAdapter())
|
||||
{
|
||||
ncAdapter.Connect();
|
||||
CmsError libraryError = ncAdapter.GetMagazinesPositionsData(out List<PositionModel> magazines);
|
||||
// Filter by magazine id
|
||||
magazines = magazines.Where(x => x.MagazineId == magazineId).ToList();
|
||||
if (libraryError.IsError())
|
||||
return BadRequest(libraryError.localizationKey);
|
||||
|
||||
return Ok(magazines);
|
||||
}
|
||||
}
|
||||
|
||||
[Route("magazine/{magazineId}/position/{positionId}"), HttpPut]
|
||||
public IHttpActionResult PutMagazinePosition([Required]int magazineId, [Required]int positionId, [FromBody]DTOMagazinesPositionsModel magazinesPos)
|
||||
{
|
||||
if (!ModelState.IsValid)
|
||||
return BadRequest(ModelState);
|
||||
|
||||
using (SiemensToolTableAdapter ncAdapter = new SiemensToolTableAdapter())
|
||||
{
|
||||
ncAdapter.Connect();
|
||||
|
||||
// Create Library model
|
||||
PositionModel pos = new PositionModel()
|
||||
{
|
||||
PositionId = positionId,
|
||||
MagazineId = magazineId,
|
||||
Disabled = magazinesPos.Disabled
|
||||
};
|
||||
// Update
|
||||
CmsError libraryError = ncAdapter.UpdateMagazinePosition(pos);
|
||||
if (libraryError.IsError())
|
||||
return BadRequest(libraryError.localizationKey);
|
||||
|
||||
return Ok();
|
||||
}
|
||||
}
|
||||
|
||||
[Route("shanks"), HttpGet]
|
||||
public IHttpActionResult GetShanks()
|
||||
{
|
||||
using (SiemensToolTableAdapter ncAdapter = new SiemensToolTableAdapter())
|
||||
{
|
||||
ncAdapter.Connect();
|
||||
CmsError libraryError = ncAdapter.GetShanksData(out List<ShankModel> shanks);
|
||||
if (libraryError.IsError())
|
||||
return BadRequest(libraryError.localizationKey);
|
||||
|
||||
return Ok(shanks);
|
||||
}
|
||||
}
|
||||
|
||||
[Route("shank"), HttpPost]
|
||||
public IHttpActionResult AddShank([FromBody][Required] DTOShankModel dtoShank)
|
||||
{
|
||||
if (!ModelState.IsValid)
|
||||
return BadRequest(ModelState);
|
||||
|
||||
using (SiemensToolTableAdapter ncAdapter = new SiemensToolTableAdapter())
|
||||
{
|
||||
ShankModel shank = (ShankModel)dtoShank;
|
||||
|
||||
ncAdapter.Connect();
|
||||
CmsError libraryError = ncAdapter.AddShank(ref shank);
|
||||
if (libraryError.IsError())
|
||||
return BadRequest(libraryError.localizationKey);
|
||||
|
||||
return Ok(shank);
|
||||
}
|
||||
}
|
||||
|
||||
[Route("shank/{shankId:int}"), HttpPut]
|
||||
public IHttpActionResult UpdateShank(int shankId, [FromBody][Required] DTOShankModel dtoShank)
|
||||
{
|
||||
if (!ModelState.IsValid)
|
||||
return BadRequest(ModelState);
|
||||
|
||||
using (SiemensToolTableAdapter ncAdapter = new SiemensToolTableAdapter())
|
||||
{
|
||||
ShankModel shank = (ShankModel)dtoShank;
|
||||
shank.Id = shankId;
|
||||
|
||||
ncAdapter.Connect();
|
||||
CmsError libraryError = ncAdapter.UpdateShank(ref shank);
|
||||
if (libraryError.IsError())
|
||||
return BadRequest(libraryError.localizationKey);
|
||||
|
||||
return Ok(shank);
|
||||
}
|
||||
}
|
||||
|
||||
[Route("shank/{id:int}"), HttpDelete]
|
||||
public IHttpActionResult DeleteShank(int id)
|
||||
{
|
||||
using (SiemensToolTableAdapter ncAdapter = new SiemensToolTableAdapter())
|
||||
{
|
||||
ncAdapter.Connect();
|
||||
// Call delete library function
|
||||
CmsError libraryError = ncAdapter.DeleteShank(id);
|
||||
if (libraryError.IsError())
|
||||
return BadRequest(libraryError.localizationKey);
|
||||
|
||||
return Ok();
|
||||
}
|
||||
}
|
||||
|
||||
[Route("tool/{toolId:int}/edge"), HttpPost]
|
||||
public IHttpActionResult AddEdge(int toolId, [FromBody][Required]DTOEdgeModel dtoEdge)
|
||||
{
|
||||
if (!ModelState.IsValid)
|
||||
return BadRequest(ModelState);
|
||||
|
||||
using (SiemensToolTableAdapter siemensHandler = new SiemensToolTableAdapter())
|
||||
{
|
||||
siemensHandler.Connect();
|
||||
|
||||
EdgeModel edge = (EdgeModel)dtoEdge;
|
||||
|
||||
// Call library add methods
|
||||
CmsError libraryError = siemensHandler.AddEdge(toolId, ref edge);
|
||||
if (libraryError.IsError())
|
||||
return BadRequest(libraryError.localizationKey);
|
||||
|
||||
return Ok(edge);
|
||||
}
|
||||
}
|
||||
|
||||
[Route("tool/{toolId:int}/edge/{edgeId:int}"), HttpPut]
|
||||
public IHttpActionResult UpdateEdge(int toolId, int edgeId, [FromBody][Required]DTOEdgeModel dtoEdge)
|
||||
{
|
||||
if (!ModelState.IsValid)
|
||||
return BadRequest(ModelState);
|
||||
|
||||
using (SiemensToolTableAdapter ncAdapter = new SiemensToolTableAdapter())
|
||||
{
|
||||
ncAdapter.Connect();
|
||||
|
||||
EdgeModel edge = (EdgeModel)dtoEdge;
|
||||
edge.Id = edgeId;
|
||||
|
||||
// Call library add methods
|
||||
CmsError libraryError = ncAdapter.UpdateEdge(toolId, ref edge);
|
||||
if (libraryError.IsError())
|
||||
return BadRequest(libraryError.localizationKey);
|
||||
|
||||
return Ok(edge);
|
||||
}
|
||||
}
|
||||
|
||||
[Route("tool/{toolId:int}/edge/{edgeId:int}"), HttpDelete]
|
||||
public IHttpActionResult DeleteEdge(int toolId, int edgeId)
|
||||
{
|
||||
using (SiemensToolTableAdapter ncAdapter = new SiemensToolTableAdapter())
|
||||
{
|
||||
ncAdapter.Connect();
|
||||
// Call delete library function
|
||||
CmsError libraryError = ncAdapter.DeleteEdge(toolId, edgeId);
|
||||
if (libraryError.IsError())
|
||||
return BadRequest(libraryError.localizationKey);
|
||||
|
||||
return Ok();
|
||||
}
|
||||
}
|
||||
|
||||
[Route("magazine/{magazineId:int}/mounted_tools"), HttpGet]
|
||||
public IHttpActionResult GetMagazineTools(int magazineId)
|
||||
{
|
||||
using (SiemensToolTableAdapter ncAdapter = new SiemensToolTableAdapter())
|
||||
{
|
||||
ncAdapter.Connect();
|
||||
// Call delete library function
|
||||
CmsError libraryError = ncAdapter.GetMagazinePositionsAndTools(magazineId, out List<MountedToolModel> magazinePos);
|
||||
if (libraryError.IsError())
|
||||
return BadRequest(libraryError.localizationKey);
|
||||
|
||||
return Ok(magazinePos);
|
||||
}
|
||||
}
|
||||
|
||||
[Route("magazine/available_tools"), HttpGet]
|
||||
public IHttpActionResult GetAvailableTools()
|
||||
{
|
||||
using (SiemensToolTableAdapter ncAdapter = new SiemensToolTableAdapter())
|
||||
{
|
||||
ncAdapter.Connect();
|
||||
// Call delete library function
|
||||
CmsError libraryError = ncAdapter.GetNotInMagazinesTools(out List<ShankModel> multiTools, out List<SiemensToolModel> tools);
|
||||
if (libraryError.IsError())
|
||||
return BadRequest(libraryError.localizationKey);
|
||||
|
||||
return Ok(new
|
||||
{
|
||||
MultiTools = multiTools,
|
||||
Tools = tools
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
[Route("magazine/{magazineId:int}/load/position/{positionId:int}"), HttpPut]
|
||||
public IHttpActionResult LoadToolInToMagazine(int magazineId, int positionId, [FromBody][Required] DTOSiemensUpdateMagazineModel toolId)
|
||||
{
|
||||
if (!ModelState.IsValid)
|
||||
return BadRequest(ModelState);
|
||||
if (toolId.ToolId == 0)
|
||||
return BadRequest("error_incorrect_parameters");
|
||||
|
||||
using (SiemensToolTableAdapter ncAdapter = new SiemensToolTableAdapter())
|
||||
{
|
||||
ncAdapter.Connect();
|
||||
|
||||
NewToolInMagazineModel libraryMag = new NewToolInMagazineModel { PositionId = positionId, ToolId = toolId.ToolId };
|
||||
// Call delete library function
|
||||
CmsError libraryError = ncAdapter.LoadToolInMagazine(magazineId, libraryMag, out MountedToolModel mounted);
|
||||
if (libraryError.IsError())
|
||||
return BadRequest(libraryError.localizationKey);
|
||||
|
||||
return Ok(mounted);
|
||||
}
|
||||
}
|
||||
|
||||
[Route("magazine/{magazineId:int}/unload/position/{positionId:int}"), HttpPut]
|
||||
public IHttpActionResult UnloadToolFromMagazine(int magazineId, int positionId)
|
||||
{
|
||||
if (!ModelState.IsValid)
|
||||
return BadRequest(ModelState);
|
||||
|
||||
using (SiemensToolTableAdapter ncAdapter = new SiemensToolTableAdapter())
|
||||
{
|
||||
ncAdapter.Connect();
|
||||
|
||||
// Call delete library function
|
||||
CmsError libraryError = ncAdapter.UnloadToolInMagazine(magazineId, positionId);
|
||||
if (libraryError.IsError())
|
||||
return BadRequest(libraryError.localizationKey);
|
||||
|
||||
return Ok(new
|
||||
{
|
||||
magazineId,
|
||||
positionId,
|
||||
toolId = 0
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
[Route("shank/{shankId:int}/load/{positionId:int}/tool/{toolId:int}"), HttpPut]
|
||||
public IHttpActionResult LoadToolIntoShank(int shankId, int positionId, int toolId)
|
||||
{
|
||||
if (!ModelState.IsValid)
|
||||
return BadRequest(ModelState);
|
||||
|
||||
using (SiemensToolTableAdapter ncAdapter = new SiemensToolTableAdapter())
|
||||
{
|
||||
ncAdapter.Connect();
|
||||
|
||||
CmsError libraryError = ncAdapter.LoadTooolIntoShank(shankId, positionId, toolId);
|
||||
if (libraryError.IsError())
|
||||
return BadRequest(libraryError.localizationKey);
|
||||
|
||||
return Ok();
|
||||
}
|
||||
}
|
||||
|
||||
[Route("shank/{shankId:int}/unload/{positionId:int}"), HttpPut]
|
||||
public IHttpActionResult UnloadToolFromShank(int shankId, int positionId)
|
||||
{
|
||||
if (!ModelState.IsValid)
|
||||
return BadRequest(ModelState);
|
||||
|
||||
using (SiemensToolTableAdapter ncAdapter = new SiemensToolTableAdapter())
|
||||
{
|
||||
ncAdapter.Connect();
|
||||
|
||||
CmsError libraryError = ncAdapter.UnloadTooolFromShank(shankId, positionId);
|
||||
if (libraryError.IsError())
|
||||
return BadRequest(libraryError.localizationKey);
|
||||
|
||||
return Ok();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,6 @@
|
||||
using Thermo.Active.Model.DatabaseModels;
|
||||
using Thermo.Active.Model.DTOModels;
|
||||
using Thermo.Active.Model.DTOModels.AlarmModels;
|
||||
using Thermo.Active.Model.DTOModels.ToolModels;
|
||||
using Thermo.Active.NC;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
@@ -14,71 +13,6 @@ namespace Thermo.Active.Listeners.Database
|
||||
{
|
||||
public static class SignalRDatabaseHandler
|
||||
{
|
||||
public static void UpdateToolsData(object newData)
|
||||
{
|
||||
using (NcToolManagerController controller = new NcToolManagerController())
|
||||
{
|
||||
// Convert input parameter
|
||||
DTONewToolDataModel data = newData as DTONewToolDataModel;
|
||||
if(data == null)
|
||||
return;
|
||||
|
||||
List<DbNcToolModel> updatedTools = new List<DbNcToolModel>();
|
||||
// Check if there are new data
|
||||
if (data.UpdatedLives.Count != 0 || data.UpdatedStatus.Count != 0)
|
||||
{
|
||||
List<DbNcToolModel> dbTools = controller.FindTools();
|
||||
if (dbTools.Count > 0)
|
||||
{
|
||||
// Loop through new data
|
||||
foreach (var live in data.UpdatedLives)
|
||||
{
|
||||
// Find tool and update residual life
|
||||
var tmp = dbTools
|
||||
.Where(x => x.ToolId == live.Key) // Get tool by id
|
||||
?.Select(x =>
|
||||
{
|
||||
x.ResidualLife = (int)live.Value; // Update data
|
||||
return x;
|
||||
})
|
||||
.FirstOrDefault();
|
||||
|
||||
if (tmp != null)
|
||||
updatedTools.Add(tmp);
|
||||
}
|
||||
|
||||
foreach (var status in data.UpdatedStatus)
|
||||
{
|
||||
var tmp = dbTools
|
||||
.Where(x => x.ToolId == status.Key) // Get tool by id
|
||||
?.Select(x =>
|
||||
{
|
||||
x.Status = UpdateStatus(x.Status, status.Value);
|
||||
return x;
|
||||
})
|
||||
.FirstOrDefault();
|
||||
|
||||
if (tmp != null)
|
||||
updatedTools.Add(tmp);
|
||||
}
|
||||
}
|
||||
|
||||
// Update database
|
||||
controller.UpdateToolsData(updatedTools);
|
||||
|
||||
using (NcToolTableAdapter ncAdapter = new NcToolTableAdapter())
|
||||
{
|
||||
ncAdapter.Connect();
|
||||
// Update nc data
|
||||
ncAdapter.UpdateNcTools(controller);
|
||||
}
|
||||
|
||||
// I need to update tool in spindle data
|
||||
// Clean the heads cache, so the heads thread will be sent to the next cycle
|
||||
LastHeadsData = new List<DTOHeadModel>();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static byte UpdateStatus(byte oldValue, byte newValue)
|
||||
{
|
||||
@@ -234,62 +168,5 @@ namespace Thermo.Active.Listeners.Database
|
||||
}
|
||||
}
|
||||
|
||||
public static void ManageAssistedToolingProcedure(object assTool)
|
||||
{
|
||||
DTOAssistedToolingEndValueModel assToolingData = assTool as DTOAssistedToolingEndValueModel;
|
||||
if (!LastToolingData.Equals(assToolingData))
|
||||
{
|
||||
LastToolingData = assToolingData;
|
||||
if (assToolingData != null && assToolingData.IsActive)
|
||||
{
|
||||
using (NcToolManagerController toolManager = new NcToolManagerController())
|
||||
{
|
||||
switch (assToolingData.Action)
|
||||
{
|
||||
case ASSISTED_TOOLING_ACTION.UNLOAD:
|
||||
{
|
||||
// Find shank loaded in the position
|
||||
var shank = toolManager.FindShanksByPositions(assToolingData.MagazineId, assToolingData.PositionId);
|
||||
if (shank != null)
|
||||
{
|
||||
// Unload Tool from magazine
|
||||
var pos = toolManager.UnloadShankInMagazine((byte)assToolingData.MagazineId, (byte)assToolingData.PositionId, shank);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
case ASSISTED_TOOLING_ACTION.EXCHANGE:
|
||||
{
|
||||
// Find shank loaded in the position
|
||||
var shankToUnload = toolManager.FindShanksByPositions(assToolingData.MagazineId, assToolingData.PositionId);
|
||||
if (shankToUnload != null)
|
||||
{
|
||||
// Unload Tool from magazine
|
||||
var pos = toolManager.UnloadShankInMagazine((byte)assToolingData.MagazineId, (byte)assToolingData.PositionId, shankToUnload);
|
||||
}
|
||||
|
||||
// Find shank by toolId
|
||||
var shankToLoad = toolManager.FindShankByToolId(assToolingData.ToolId);
|
||||
if (shankToLoad != null)
|
||||
{
|
||||
// Load shank in magazine
|
||||
var pos = toolManager.LoadShankInMagazine((byte)assToolingData.MagazineId, (byte)assToolingData.PositionId, shankToLoad);
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
using (NcToolTableAdapter ncAdapter = new NcToolTableAdapter())
|
||||
{
|
||||
ncAdapter.Connect();
|
||||
// Close procedure
|
||||
ncAdapter.TerminateAssistedProcedure(assToolingData.MagazineId,
|
||||
assToolingData.Action != ASSISTED_TOOLING_ACTION.NONE
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -69,18 +69,10 @@ namespace Thermo.Active.Listeners
|
||||
{
|
||||
SignalRListener.SendAxesToClient(a);
|
||||
}));
|
||||
infos.Add(MessageServices.Current.Subscribe(SEND_MAGAZINES_STATUS, (a, b) =>
|
||||
{
|
||||
SignalRListener.SendMagazinesStatus(a);
|
||||
}));
|
||||
infos.Add(MessageServices.Current.Subscribe(SEND_ACTIVE_PROGRAM_DATA, (a, b) =>
|
||||
{
|
||||
SignalRListener.SendActiveProgramData(a);
|
||||
}));
|
||||
infos.Add(MessageServices.Current.Subscribe(NC_MAGAZINE_IS_ACTIVE, (a, b) =>
|
||||
{
|
||||
SignalRListener.SendNcMagazineIsActive(a);
|
||||
}));
|
||||
|
||||
infos.Add(MessageServices.Current.Subscribe(SEND_QUEUE_DATA, (a, b) =>
|
||||
{
|
||||
@@ -101,14 +93,7 @@ namespace Thermo.Active.Listeners
|
||||
}));
|
||||
|
||||
//////////////////////////// Database
|
||||
infos.Add(MessageServices.Current.Subscribe(UPDATE_TOOLS_DATA, (a, b) =>
|
||||
{
|
||||
SignalRDatabaseHandler.UpdateToolsData(a);
|
||||
}));
|
||||
infos.Add(MessageServices.Current.Subscribe(ASSISTED_TOOLING_DATA, (a, b) =>
|
||||
{
|
||||
SignalRDatabaseHandler.ManageAssistedToolingProcedure(a);
|
||||
}));
|
||||
///// erano tooling...
|
||||
|
||||
// Broadcast
|
||||
infos.Add(MessageServices.Current.Subscribe(BROADCAST_DATA, (a, b) =>
|
||||
|
||||
@@ -5,7 +5,6 @@ using Thermo.Active.Database.Controllers;
|
||||
using Thermo.Active.Model.DTOModels;
|
||||
using Thermo.Active.Model.DTOModels.AlarmModels;
|
||||
using Thermo.Active.Model.DTOModels.Scada;
|
||||
using Thermo.Active.Model.DTOModels.ToolModels;
|
||||
using Thermo.Active.Utils;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@@ -164,37 +163,6 @@ namespace Thermo.Active.Listeners.SignalR
|
||||
{
|
||||
LastHeadsData = newData;
|
||||
|
||||
using(NcToolManagerController controller = new NcToolManagerController())
|
||||
{
|
||||
foreach(var head in LastHeadsData)
|
||||
{
|
||||
// Check if head is a spindle
|
||||
if (head.Type == HEAD_TYPE.SPINDLE.ToString())
|
||||
{
|
||||
if (NcConfig.NcVendor.ToUpper() != NC_VENDOR.SIEMENS)
|
||||
{
|
||||
// Convert head into child model
|
||||
var spindle = (head as DTOSpindleModel);
|
||||
// Get tool data
|
||||
var tool = controller.FindToolWithDependencies(spindle.MountedTool);
|
||||
if (tool != null)
|
||||
spindle.ToolData = new DTOToolInSpindleModel()
|
||||
{
|
||||
FamilyId = tool.FamilyId,
|
||||
ShankId = tool.ShankId ?? 0,
|
||||
Broken = ((DTONcToolModel)tool).Broken,
|
||||
Disabled = ((DTONcToolModel)tool).Disabled,
|
||||
Measured = ((DTONcToolModel)tool).Measured,
|
||||
MaxLoad = tool.Family.MaxLoad,
|
||||
MaxSpeed = tool.Family.MaxSpeed,
|
||||
ResidualLife = tool.ResidualLife
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
// Send data to clients
|
||||
context.Clients.Group("ncData").headsData(heads);
|
||||
}
|
||||
@@ -214,17 +182,6 @@ namespace Thermo.Active.Listeners.SignalR
|
||||
}
|
||||
}
|
||||
|
||||
public static void SendMagazinesStatus(object magazinesStatus)
|
||||
{
|
||||
var context = GlobalHost.ConnectionManager.GetHubContext<NcHub>();
|
||||
if (!LastMagazineStatus.Equals(magazinesStatus))
|
||||
{
|
||||
LastMagazineStatus = magazinesStatus as DTOMagazineActionModel;
|
||||
|
||||
context.Clients.Group("ncData").magazinesStatus(magazinesStatus);
|
||||
}
|
||||
}
|
||||
|
||||
public static void SendActiveProgramData(object programData)
|
||||
{
|
||||
var context = GlobalHost.ConnectionManager.GetHubContext<NcHub>();
|
||||
@@ -343,8 +300,6 @@ namespace Thermo.Active.Listeners.SignalR
|
||||
context.Clients.Group("ncData").headsData(LastHeadsData);
|
||||
// Send axesNames data
|
||||
context.Clients.Group("ncData").axesNames(LastAxesNamesData);
|
||||
// Send magazine status
|
||||
context.Clients.Group("ncData").magazinesStatus(LastMagazineStatus);
|
||||
// Send positions
|
||||
context.Clients.Group("ncData").axesPositions(LastAxesPositions);
|
||||
// Send active program data
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
using Thermo.Active.Model.DTOModels;
|
||||
using Thermo.Active.Model.DTOModels.AlarmModels;
|
||||
using Thermo.Active.Model.DTOModels.Scada;
|
||||
using Thermo.Active.Model.DTOModels.ToolModels;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Thermo.Active.Listeners
|
||||
@@ -20,14 +19,15 @@ namespace Thermo.Active.Listeners
|
||||
public static List<DTOHeadModel> LastHeadsData = new List<DTOHeadModel>();
|
||||
public static DTOAxesModel LastAxesPositions = new DTOAxesModel();
|
||||
public static List<DTOAxisNameModel> LastAxesNamesData = new List<DTOAxisNameModel>();
|
||||
public static DTOMagazineActionModel LastMagazineStatus = new DTOMagazineActionModel();
|
||||
public static DTOActiveProgramDataModel LastProgramData = new DTOActiveProgramDataModel();
|
||||
public static Dictionary<int, bool> LastNcMagazineIsActive = new Dictionary<int, bool>();
|
||||
public static List<DTOQueueModel> LastPartProgramQueue = new List<DTOQueueModel>();
|
||||
public static List<DTOM155InputModel> LastM155Data = new List<DTOM155InputModel>();
|
||||
public static List<DTOScadaModel> LastScadaData = new List<DTOScadaModel>();
|
||||
public static DTOAssistedToolingEndValueModel LastToolingData = new DTOAssistedToolingEndValueModel();
|
||||
public static List<DTOScadaModel> LastScadaData = new List<DTOScadaModel>();
|
||||
|
||||
public static bool LastIsNcConnected = false;
|
||||
|
||||
|
||||
// aggiugere oggetti nuovi e levare quelli che non servono +...
|
||||
}
|
||||
}
|
||||
@@ -225,10 +225,8 @@
|
||||
<Compile Include="Controllers\WebApi\LanguageController.cs" />
|
||||
<Compile Include="Controllers\WebApi\ApiMaintenanceController.cs" />
|
||||
<Compile Include="Controllers\WebApi\NcFileController.cs" />
|
||||
<Compile Include="Controllers\WebApi\NcToolManagerController.cs" />
|
||||
<Compile Include="Controllers\WebApi\ReportController.cs" />
|
||||
<Compile Include="Controllers\WebApi\ScadaController.cs" />
|
||||
<Compile Include="Controllers\WebApi\SiemensToolManagerController.cs" />
|
||||
<Compile Include="Controllers\WebApi\UserController.cs" />
|
||||
<Compile Include="Controllers\WebApi\NcApiController.cs" />
|
||||
<Compile Include="Listeners\Database\SignalRDatabaseHandler.cs" />
|
||||
|
||||
Reference in New Issue
Block a user