Compare commits

..

165 Commits

Author SHA1 Message Date
andrea.villa 25cb3a93d1 Merge branch 'develop' into EstimateWithAcceleration 2025-08-21 17:46:44 +02:00
andrea.villa b0b0c00227 Merge branch 'main' into develop 2025-08-21 17:46:38 +02:00
andrea.villa b9c6d08038 Corretto movimento in Z massima dopo scarico pezzo 2025-08-21 17:46:24 +02:00
andrea.villa 8720b78821 Merge branch 'develop' into EstimateWithAcceleration 2025-08-21 16:36:50 +02:00
andrea.villa 4c1ff2bf92 Merge branch 'main' into develop 2025-08-21 16:36:38 +02:00
andrea.villa 9b1057ed44 Se la testa rimane bassa, corretto caso di reset del piano generico a fine lavorazione 2025-08-21 16:36:12 +02:00
andrea.villa 86fcc7c9eb Prima versione stima tempi considerando accelerazioni 2025-08-21 15:49:45 +02:00
andrea.villa aae1dc8e33 Merge remote-tracking branch 'origin/main' into develop 2025-08-20 15:35:02 +02:00
andrea.villa 87366bd1d9 Merge remote-tracking branch 'origin/develop' 2025-08-20 15:34:38 +02:00
andrea.villa 8cb74ef922 Aggiunta variabile 'EstimationRapidMultiplier' in mlde per regolare il tempo stimato 2025-08-20 15:34:24 +02:00
andrea.villa d1816c5048 Gestione terzo asse rotante in caso di utensile standard 2025-07-09 10:13:43 +02:00
andrea.villa 77f3e8f084 Merge branch 'main' into develop 2025-07-01 09:35:47 +02:00
andrea.villa 0057704864 Merge commit 'a5d40e4922835f76439eee4d5cd47f9a051438ba' 2025-07-01 09:35:23 +02:00
andrea.villa a5d40e4922 Aggiunta gestione massima lunghezza scarico 2025-07-01 09:34:17 +02:00
andrea.villa 76fe0c0f33 Cambiati limiti minimi e massimi 2025-06-30 12:24:11 +02:00
andrea.villa 9fb97665c2 Piccola correzione agestione accelerazioni 2025-06-10 13:32:44 +02:00
andrea.villa 033577bae9 Lettura e gestione parametri accelerazioni da TS3 2025-06-10 10:18:44 +02:00
andrea.villa f444561df7 Merge remote-tracking branch 'origin/main' into develop 2025-04-28 13:29:42 +02:00
andrea.villa 030aad4781 Merge remote-tracking branch 'origin/develop' 2025-04-24 12:43:22 +02:00
andrea.villa 3a00390416 Commit per versione 2025-04-24 12:43:10 +02:00
andrea.villa afad80d39f Modifica qualità VMILL. Da ora si può impostare da impostazioni CAM5 2025-04-22 09:39:03 +02:00
andrea.villa ddfb887034 Merge remote-tracking branch 'origin/main' into develop 2025-04-01 09:55:11 +02:00
andrea.villa 4e24ac0ed1 Merge remote-tracking branch 'origin/develop' 2025-04-01 09:54:56 +02:00
andrea.villa 231c54b8a9 Commit per versione 2025-04-01 09:54:43 +02:00
andrea.villa 271cdafc62 Aggiunta commenti HEADER e FOOTER per comunicazione con linea o altre macchine, da parte di Essetre. 2025-03-10 09:01:38 +01:00
andrea.villa 9008c7e3ec Merge remote-tracking branch 'origin/main' into develop 2025-02-26 15:25:15 +01:00
andrea.villa 4b92ff97b8 Gestione lettura feed massima pinze da Ts3 2025-02-26 15:24:56 +01:00
andrea.villa 4b875e24d5 Merge remote-tracking branch 'origin/main' into develop 2025-02-21 08:07:52 +01:00
andrea.villa 9b4bae3bb4 Merge branch 'develop' 2025-02-21 08:07:32 +01:00
andrea.villa 136ba65283 Gestione aggregato flottante 2025-02-21 08:07:08 +01:00
andrea.villa 98ac928d62 Ripristinato comportamento precedente calcolo posizione dei rulli di pinzaggio fatto con 2.7b2. 2025-02-06 10:26:03 +01:00
andrea.villa eb667d7cf2 Merge remote-tracking branch 'origin/main' into develop 2025-02-06 08:36:04 +01:00
andrea.villa 3cdb1bf90a Merge remote-tracking branch 'origin/develop' 2025-02-06 08:35:44 +01:00
andrea.villa f28d57cb8a Dopo aver scaricato utensile, si setta nota "HIDDEN" per dichiarare utensile non più sulla testa e non considerare le collisioni. 2025-02-06 08:35:31 +01:00
andrea.villa a428628c92 Merge branch 'main' into develop 2025-02-04 12:27:23 +01:00
andrea.villa 238361859e Merge branch 'develop' 2025-02-04 12:27:08 +01:00
andrea.villa 83613f2fad Piccola modifica nel calcolo posizione dei rulli di pinzaggio. 2025-02-04 12:26:56 +01:00
andrea.villa a28c536971 Merge branch 'main' into develop 2025-02-03 08:46:45 +01:00
andrea.villa 01cb082121 Merge remote-tracking branch 'origin/develop' 2025-02-03 08:46:27 +01:00
andrea.villa 1431cfcee5 Corretta simulazioen che non mandava testa in home in caso di utensile lungo. Generazione era già ok. 2025-02-03 08:46:11 +01:00
andrea.villa 546b3c01ef Merge remote-tracking branch 'origin/main' into develop 2025-01-28 12:01:15 +01:00
andrea.villa d1ac93ff71 Merge commit '15034765ac4542f10b835816dc7d3fd54a24c119' 2025-01-28 12:00:58 +01:00
andrea.villa 15034765ac In MLSE aggiunta piccola correzione quota Z in caso di direzione Z tra 0.5 e 0.707 2025-01-28 12:00:44 +01:00
andrea.villa 9bc55636aa Merge remote-tracking branch 'origin/main' into develop 2025-01-17 09:26:27 +01:00
andrea.villa fd0b0f6093 Merge remote-tracking branch 'origin/develop' 2025-01-17 09:26:06 +01:00
andrea.villa e088be7b1d Corretto primo punto X preselezione utensile 2025-01-17 09:25:57 +01:00
andrea.villa 643188ac75 Piccola correzione posizione X in preselezione utensile 2025-01-15 12:57:35 +01:00
andrea.villa abc95d7b38 Merge branch 'main' into develop 2024-12-19 10:26:38 +01:00
andrea.villa 0310daed48 HOTFIX : corretto posizione Z zero alla selezione dell'utensile in caso di motosega 2024-12-19 10:26:20 +01:00
andrea.villa 67edcfc59b Merge commit '301ff170331694a46aed93badb4169a6bf67d309' into develop 2024-12-18 16:58:54 +01:00
andrea.villa 301ff17033 Merge remote-tracking branch 'origin/develop' 2024-12-18 16:58:40 +01:00
andrea.villa 70cf39d693 Commit per versione 2024-12-18 16:58:17 +01:00
andrea.villa ec0fbde5cc Aggiunta variabile 'SafeX2RotAxis' in sostituzionme della 'ParkMchY2' che era usata impropriamente 2024-12-17 13:33:23 +01:00
andrea.villa 36e3c35e82 Merge remote-tracking branch 'origin/main' into develop 2024-12-17 11:42:43 +01:00
andrea.villa 808456ed60 Merge branch 'develop' 2024-12-17 11:42:23 +01:00
andrea.villa da3f3c0db0 Corretta posizione iniziale testa 2 2024-12-17 11:42:10 +01:00
andrea.villa ad7579e0ae Merge remote-tracking branch 'origin/main' into develop 2024-12-16 13:19:24 +01:00
andrea.villa 0c2b92cd89 HOTFIX : In MLSE ripristinati vecchi valori indici calcolo Z massima 2024-12-16 13:19:06 +01:00
andrea.villa 3c754c329c Merge remote-tracking branch 'origin/main' into develop 2024-12-16 09:50:04 +01:00
andrea.villa f8520a90c3 Merge commit '6e79e47885f2e1c0e1cddf7e237871734f29a6a5' 2024-12-16 09:49:48 +01:00
andrea.villa 6e79e47885 - Corretto scarico utensile se aggregato. Se non presente utensile di default, non seleziona nulla.
- In MLSE ritoccati indici calcolo Z massima. Ticket#2210
2024-12-16 09:49:35 +01:00
andrea.villa eef2b3911f Merge remote-tracking branch 'origin/main' into develop 2024-12-13 17:44:22 +01:00
andrea.villa 2524ba9443 HOTFIX : Corretta chiamata calcolo asse virtuale 2024-12-13 17:44:04 +01:00
andrea.villa ce2887c579 Merge remote-tracking branch 'origin/main' into develop 2024-12-13 17:06:51 +01:00
andrea.villa 77fdc8c12a Merge remote-tracking branch 'origin/develop' 2024-12-13 17:06:33 +01:00
andrea.villa ca86c79672 - Corretto primo movimento in X quando si parte con testa 3. Ticket#2216
- Se su testa 1 c'è un aggregato e si utilizzerà la testa 3, si pscarica aggregato e si prende utensile di default. Ticket#2222
- Durante utilizzo della testa 3, non si preselezionano altre teste. Ticket#2220
- Se lavorazione con testa dedicata lama e su testa 1 c'era aggregato, viene scaricato. Ticket#2216
2024-12-13 17:06:23 +01:00
andrea.villa f8dc3b691a Controllo esistenza terzo asse ausiliario 2024-12-11 17:07:06 +01:00
andrea.villa 2c5a16eeae - Non si fa preselezione se testa 3
- Corretta emissione coordinata rotazione testa 3 in zona sicura
- A fine barra, testa 3 sempre in home
2024-12-11 10:45:31 +01:00
andrea.villa 58b8f07446 Corretta gestione in caso di prima lavorazione con motosega 2024-12-04 08:19:57 +01:00
andrea.villa 4cf4d57d2a Corretto errore di collisione per errata simulazione cambio utensile da lama a motosega 2024-12-03 08:56:55 +01:00
andrea.villa 7e6822b6c6 Gestione aggregato foratore multiplo (H14) 2024-12-02 08:51:59 +01:00
andrea.villa 6920fd4272 Merge branch 'main' into develop 2024-12-02 08:49:49 +01:00
andrea.villa b93a21605d Merge remote-tracking branch 'origin/hotfix/PreselLongToolCorrection' 2024-11-26 15:57:52 +01:00
andrea.villa d22e223017 Corretto controllo preselezione per utensili lunghi 2024-11-26 15:57:39 +01:00
andrea.villa 71875429cd Gestione caricamento utensili in caso di testa con uscita multipla 2024-11-25 16:50:34 +01:00
andrea.villa a005386b7d Merge remote-tracking branch 'origin/main' into develop 2024-11-25 15:59:51 +01:00
andrea.villa 7c208a3c34 Merge branch 'hotfix/PreselLongTools' 2024-11-25 15:59:40 +01:00
andrea.villa 525175586b Se si preseleziona su testa 1 un utensile lungo, non si va alla X successiva di lavoro ma si resta in home. Infatti potrebbe toccare le paratie in caso di scambio pezzo. 2024-11-25 15:59:27 +01:00
andrea.villa 76f2de42d0 Merge remote-tracking branch 'origin/main' into develop 2024-11-04 08:29:47 +01:00
andrea.villa a08cc7ac7e Merge remote-tracking branch 'origin/develop' 2024-11-04 08:29:31 +01:00
andrea.villa a2068fc437 Commit per versione 2024-11-04 08:29:15 +01:00
andrea.villa 46893aed18 Gestione terza testa 5 assi dedicata lama (H38) 2024-10-29 17:24:27 +01:00
andrea.villa dffcc50b34 Merge branch 'main' into develop 2024-10-25 13:01:38 +02:00
andrea.villa 635457269e - Piccola correzione per capire se testa 3 presente
- In caso di lavorazione successiva alla prima, rivisto primo posizionamento alla quota Z di lavoro se precedentemente spostati a quota rotazione assi rotanti
2024-10-25 13:00:57 +02:00
andrea.villa 4fe1fee036 Piccola correzione per capire se testa 3 presente 2024-10-23 10:53:33 +02:00
andrea.villa f51cf52864 Merge branch 'main' into develop 2024-10-23 10:17:07 +02:00
andrea.villa 43b441d069 Merge remote-tracking branch 'origin/develop' 2024-10-23 10:16:56 +02:00
andrea.villa 8a30ac309e - Per movimento a ZMAX si considera utensile attuale o precedente
- Post con gestione 3 testa dedicata lama
2024-10-23 10:16:37 +02:00
andrea.villa 63bba61c19 Aggiunto parametro ParkTc1X1 in MLDE per simulazione quota parcheggio Testa 1 su TC1 2024-10-16 12:01:10 +02:00
andrea.villa 92d983451c Merge remote-tracking branch 'origin/main' into develop 2024-10-01 08:21:58 +02:00
andrea.villa b2ce94eeb3 Merge remote-tracking branch 'origin/develop' 2024-10-01 08:21:32 +02:00
andrea.villa 059e150bb1 Commit per versione 2024-10-01 08:21:18 +02:00
andrea.villa 7c81481da4 Per lavorazione in doppio: messaggio bloccante in caso di extra-corsa durante un movimento standard su piano generico della lavorazione. 2024-09-23 12:42:50 +02:00
andrea.villa 272705acf2 Aggiunta gestione solidi collisione per TC verticali e TC rotante sotto 2024-09-16 12:30:53 +02:00
andrea.villa 709c6ebccf Migliorato calcolo chiusura paratia rulli con aggiornamento lunghezza della barra in caso di ultimo taglio e grezzo residuo in coda 2024-09-12 13:02:26 +02:00
andrea.villa ab03fa02c1 Merge remote-tracking branch 'origin/main' into develop 2024-09-10 10:24:39 +02:00
andrea.villa 4e60812c29 Merge remote-tracking branch 'origin/develop' 2024-09-10 10:24:25 +02:00
andrea.villa 3c8d626277 Commit per versione 2024-09-10 10:24:15 +02:00
andrea.villa f90003d85a se diametro utensile più del truciolatore standard grande, non si preseleziona 2024-09-10 10:23:09 +02:00
andrea.villa 5cc80c6ce7 Merge remote-tracking branch 'origin/main' into develop 2024-08-28 10:00:24 +02:00
andrea.villa 2e2e56b86b Merge branch 'develop' 2024-08-28 10:00:05 +02:00
andrea.villa 344c135410 Primo movimento testa sotto in posizione rotazione assi rotanti dopo eventuale apertura rulli 2024-08-28 09:59:49 +02:00
andrea.villa e4b72f36de Quando si aprono i rulli, se la trave non può seguire i rulli perchè la pinza andrebbe in extra-corsa, si sposta comunque la pinza fino al massimo della sua corsa. 2024-08-07 13:14:34 +02:00
andrea.villa 6cd8cc0aa6 Merge remote-tracking branch 'origin/main' into develop 2024-08-07 09:18:11 +02:00
andrea.villa abeea33183 Corretto chiamata file TPA con nuovo nome 2024-08-07 09:18:00 +02:00
andrea.villa dbc72d38db Merge remote-tracking branch 'origin/main' into develop 2024-08-07 09:09:16 +02:00
andrea.villa 6bef01fec7 Merge remote-tracking branch 'origin/develop' 2024-08-07 09:09:04 +02:00
andrea.villa ae9de373fb Commit per versione 2024-08-07 09:08:49 +02:00
andrea.villa f5d4c8d8b7 - Rinominato file da "Common-" a "Common_" 2024-08-02 09:33:42 +02:00
andrea.villa c577ddf692 Ridotto limite minimo intervallo di pinzaggio 2024-07-30 14:37:49 +02:00
andrea.villa f750918c0e Migliorata gestione riposizionamenti fatta con la 2.6g1 2024-07-30 12:17:11 +02:00
andrea.villa 9fdaeee8d1 Viene ripristinato il tipo di arco corretto 2024-07-29 09:59:21 +02:00
andrea.villa 0041fea1b2 Gestione creazione piano generico in caso il primo movimento della lavorazione sia un arco 2024-07-29 09:18:28 +02:00
andrea.villa c3ca7da19c Merge remote-tracking branch 'origin/main' into develop 2024-07-24 13:05:04 +02:00
andrea.villa aea3cf168f Per OnSetHead chiamata da simulazione, aggiunta lettura TOTDIAM. Serve per limitare corse assi testa sotto 2024-07-24 13:04:46 +02:00
andrea.villa aa20eb6959 Merge branch 'main' into develop 2024-07-23 13:13:09 +02:00
andrea.villa 118298e841 Merge remote-tracking branch 'origin/develop' 2024-07-23 13:12:50 +02:00
andrea.villa ffeedc5fd6 Corretta ultima modifica per controllo collisioni testa non utilizzata. Trovava collisioni in lavorazioni in doppio. 2024-07-23 13:12:38 +02:00
andrea.villa 7686361567 Merge remote-tracking branch 'origin/main' into develop 2024-07-22 15:05:23 +02:00
andrea.villa fd1c2d2a21 Piccola correzione controllo collisione 2024-07-22 15:05:06 +02:00
andrea.villa 6ac9b67b8d Merge branch 'main' into develop 2024-07-22 15:00:54 +02:00
andrea.villa 1c1124ac39 Merge remote-tracking branch 'origin/develop' 2024-07-22 15:00:47 +02:00
andrea.villa ce46627885 In caso di grezzo piuttosto piccolo, concesso pinzaggio fino al massimo possibile, oltre al calcolo con coefficienti 2024-07-22 14:53:37 +02:00
andrea.villa 8755104f2f In calcolo pinzaggio al carico, si aggiunge anche alla quota massima l'offset aggiuntivo. 2024-07-22 12:52:02 +02:00
andrea.villa f5669d9e62 Si aggiunge al controllo collisioni anche Tool e ToolHolder della testa non utilizzata 2024-07-19 16:36:02 +02:00
andrea.villa 6560c27fed Merge remote-tracking branch 'origin/main' into develop 2024-07-12 16:21:36 +02:00
andrea.villa 962ea6f461 Corretto movimento testa sotto che andava in collisione tra una lavorazione e la successiva se tra le due c'era un riposizionamento pinze. 2024-07-12 16:21:20 +02:00
andrea.villa a4f8a81186 Merge branch 'main' into develop 2024-07-08 12:38:36 +02:00
andrea.villa e4704572da Corretto movimento che pinzava nel vuoto durante riposizionamento 2024-07-08 12:38:25 +02:00
andrea.villa e1c20e5152 Merge branch 'main' into develop 2024-06-06 16:33:43 +02:00
andrea.villa d3684186c7 Merge branch 'develop' 2024-06-06 16:33:27 +02:00
andrea.villa 69e4539fad Quando si va a ZMAX, si azzerano tutte le coordinate ".pp" 2024-06-06 16:33:18 +02:00
andrea.villa 7d563d06ab Merge branch 'main' into develop 2024-06-03 12:22:42 +02:00
andrea.villa e6fe268062 Merge branch 'develop' 2024-06-03 12:22:37 +02:00
andrea.villa 3854c6a24c Versione 2.6f1 2024-06-03 12:22:26 +02:00
andrea.villa 25bcad240a Migliorata gestione approccio al pezzo con lama aggregato da sotto. Va al minimo in X solo se necessario. 2024-05-29 12:17:36 +02:00
andrea.villa db5230a402 Merge branch 'main' into develop 2024-05-28 09:57:54 +02:00
andrea.villa 7ec4bfd76e Corretta versione 2024-05-28 09:57:43 +02:00
andrea.villa 2d97e2cb51 Merge branch 'develop' 2024-05-28 09:56:55 +02:00
andrea.villa d66abca2e7 - Ripristinato controllo extra-corsa per testa 2
- Corretto movimento testa sotto su prima lavorazione
2024-05-28 09:56:44 +02:00
andrea.villa b65e6f805d Aggiunta possibilità di scrivere nome utensile doppio anche in lavorazione con parametro "TOOLDOUBLE". Note sulla lavorazione hanno precedenza su note utensile. 2024-05-24 11:43:39 +02:00
andrea.villa e18023d094 Merge branch 'main' into develop 2024-05-23 14:44:05 +02:00
andrea.villa bd96eb55e2 Merge branch 'develop' 2024-05-23 14:43:57 +02:00
andrea.villa 73cdbd2df5 Se lavorazione con testa 2 e stesso utensile, piccola correzione che manda a parcheggio se cambiano assi rotanti solo se si trova a ZMAX 2024-05-23 14:43:47 +02:00
andrea.villa b28c999198 Corretta lettura e salvataggio coordinala asse L2 con coordinate rispetto origine. Prima erano locali e sbagliava alcuni calcoli 2024-05-16 15:09:21 +02:00
andrea.villa 44def6c43e Controllo extra-corsa per testa 2 in caso di lavorazioni in doppio in Y 2024-05-15 16:19:03 +02:00
andrea.villa d20c149686 Merge branch 'main' into develop 2024-05-15 13:13:28 +02:00
andrea.villa e6033e1f8d Miglioramento gestione lama su aggregato da sotto 2024-05-15 13:13:08 +02:00
andrea.villa f8974da04c Merge remote-tracking branch 'origin/main' into develop 2024-05-09 12:41:43 +02:00
andrea.villa dcb80bec7c Corretto prelievo lama 2 (H16). Prima di visualizzare utensile, si sposta la Z alla quota massima. 2024-05-09 12:41:32 +02:00
andrea.villa fde0489fe7 Merge branch 'main' into develop 2024-05-06 10:08:11 +02:00
andrea.villa d7f4fb0ef3 In parcheggio paratie/pinze, viene considerato sovramateriale di testa 2024-05-06 10:07:58 +02:00
andrea.villa efa56704d7 Merge branch 'main' into develop 2024-04-30 10:47:14 +02:00
andrea.villa 1f388d6b36 Merge branch 'develop' 2024-04-30 10:46:56 +02:00
andrea.villa c3a31403ce Modifica file log 2024-04-30 10:46:46 +02:00
andrea.villa 40cdb9ec93 Gestione parametro WoodDensity (WOOD_DENSITY in Ts3) 2024-04-30 10:37:32 +02:00
andrea.villa 33cb7da920 per macchina a 3 teste, ripristinato posizionamento testa 2 tramite parametro ParkInLavZ2 2024-04-23 16:40:16 +02:00
andrea.villa 0c8b706f9a Merge branch 'main' into develop 2024-04-23 15:49:03 +02:00
andrea.villa 6736907045 Merge branch 'develop' 2024-04-23 15:48:43 +02:00
andrea.villa 3d4e235a23 - Aggiunto parametro MaxZ1Blade per differenziare Z massima aggregato lama e altri utensili.
- Aggiunto controllo con solido di collisione per verificare di non salire oltre il massimo
- Corretta simulazione scambio testa 3 -> testa 1
2024-04-23 15:48:27 +02:00
andrea.villa 557bfcbe74 Ripristinato movimento iniziale testa sopra assieme alle pinze. 2024-04-22 10:25:39 +02:00
andrea.villa 6ac8ad5bfd - Modificato movimenti testa sotto. Prima si muove in quota 'ParkMchY2'.
- Per lavorazioni in doppio, viene subito scritta la quota Z.
2024-04-17 11:02:19 +02:00
andrea.villa b3b4061a07 Chiamando la macchina con un nome che termini con '.TEST' si abilita come macchina per test interni 2024-04-15 12:45:18 +02:00
andrea.villa 7b00a25b15 Aggiunto parametro 'IS_TEST_MACHINE' per test interni 2024-04-12 09:26:46 +02:00
andrea.villa 918ba0f7e5 Merge branch 'main' into develop 2024-04-09 11:48:57 +02:00
5 changed files with 1184 additions and 278 deletions
+442 -144
View File
@@ -28,7 +28,9 @@ function OnStart()
--EMT.LINEINC = 1 -- incremento numerazione linee
--EMT.Ft = 'F' -- token per feed
--EMT.St = 'S' -- token per speed
EMT.FMAXPINZE = 116000 -- feed massima pinze
EMT.FMAXPINZE = EgtClamp( MaxFeedPinze or 116000, 20000, 130000) -- feed massima pinze
EMT.MAXACC = MaxAcc or 6000 -- accelerazione massima pinze. In realtà è il tempo in millisecondi, quindi MAXACC corrisponde al tempo massimo per raggiungere la velocità desiderata
EMT.MINACC = MinAcc or 600 -- accelerazione minima pinze. In realtà è il tempo in millisecondi, quindi MINACC corrisponde al tempo massimo per raggiungere la velocità desiderata
SetToParkLine() -- si inizia con linee da parcheggiare su stack
end
@@ -40,14 +42,18 @@ end
---------------------------------------------------------------------
function OnProgramStart()
-- aggiungo prefisso per commentae commenti iniziali se la macchina è utilizzata per fare i test
local sPrefixCommentLine = '' ; if IS_TEST_MACHINE or EgtEndsWith( EgtGetCurrMachineDir(), '.TEST') then sPrefixCommentLine = '//' end
-- Intestazioni
if EMT.INFO then
MyOutput( '('..EMT.INFO..')')
MyOutput( sPrefixCommentLine..'('..EMT.INFO..')')
else
MyOutput( '(Program Start)')
end
MyOutput( '('.. CSP_INFO..')')
MyOutput( '('.. MACHINE_INFO..')')
MyOutput( sPrefixCommentLine..'('.. CSP_INFO..')')
MyOutput( sPrefixCommentLine..'('.. MACHINE_INFO..')')
MyOutput( '(HEADER)')
-- Se modalità test, aggiungo linee per muovere tappeto e alzare la testa (in automatico viene fatto dal main residente)
if TEST_USE then
@@ -99,6 +105,7 @@ function OnProgramEnd()
EMT.FALL = nil
EMT.RELOAD = nil
EMT.RELOAD2 = nil
MyOutput( '(FOOTER)')
-- Termino il programma
MyOutput( 'M202')
MyOutput( 'M02')
@@ -125,6 +132,8 @@ function OnToolData()
dAddLen = -SawOffsZ
elseif EMT.HEAD == 'H16' then
dAddLen = -Saw2OffsZ
elseif EMT.HEAD == 'H14' then
dAddLen = 206 -- dimensione aggregato
end
local sOut = 'M992 P1=' .. EMT.TCPOS:gsub( 'T', '') .. ' P2=' .. EmtLenToString( dAddLen + EMT.TLEN, 3) .. ' P3=' .. EmtLenToString( EMT.TDIAM, 3) ..
' P4=' .. EmtLenToString( EMT.SMAX, 3) .. ' P5=' .. EmtLenToString( dAddLen + EMT.TTOTLEN, 3)
@@ -163,7 +172,7 @@ function OnDispositionStart()
' P15='..EmtLenToString( -DeltaTabY, 2)..' P16='..EmtLenToString( DeltaTabZ - MillOffs, 2)..
' P17='..EmtLenToString( Delta2TabY, 2)..' P18='..EmtLenToString( -Delta2TabZ - Mill2Offs, 2)
-- se è in configurazione a 3 teste
if EgtGetHeadId( 'H31') then
if IsHeadExisting( 3) then
sOut = sOut .. ' P19='..EmtLenToString( -Delta3TabY, 2)..' P20='..EmtLenToString( Delta3TabZ - Mill3Offs, 2)..
' P21='..EmtLenToString( Mill3Offs, 2).. ' P22='.. EmtLenToString( -ParkInLavZ2, 2)
else
@@ -285,6 +294,8 @@ function OnDispositionEnd()
for i = 1, #EMT.MDCHAR do
EmitMoveDataChars( EMT.MDCHAR[i])
if EMT.MDCHAR[i].Y1 then EMT.CHY_ON = true end
if EMT.MDCHAR[i].V1 then EMT.V1POS = EMT.MDCHAR[i].V1 end
if EMT.MDCHAR[i].V2 then EMT.V2POS = EMT.MDCHAR[i].V2 end
end
if #EMT.MDCHAR > 0 then
local nMoveType = EgtIf( EMT.CHY_ON, 3, 2)
@@ -394,6 +405,8 @@ function OnMachiningStart()
EMT.MCHNAME = EgtGetOperationName( EMT.MCHID)
EMT.MCHTYPE = EgtGetMachiningParam( MCH_MP.TYPE)
EMT.MCHUSERNOTES = EgtGetMachiningParam( MCH_MP.USERNOTES)
EMT.MCHCUT = ( EMT.MCHUSERNOTES:find( 'Cut;', 1, true) ~= nil)
-- se sega a catena, aggiusto subito angolo scelto per asse virtuale A
if EMT.HEAD == 'H13' then
-- valore dell'asse virtuale
@@ -401,19 +414,34 @@ function OnMachiningStart()
-- imposto home dell'asse C1 (A=0 -> T101, A=90 -> T104)
local MyParkCSawC1 = GetChainSawCHomeFromVirtualAxis( dPosA, EMT.TTOTLEN)
EmtModifyAxisHome( 'C1', MyParkCSawC1)
-- aggregato foratura multipla, aggiusto subito angolo scelto per asse virtuale A
elseif EMT.HEAD == 'H14' then
-- valore dell'asse virtuale
dPosA = GetCurrMultiDrillVirtualAxis()
-- imposto home dell'asse C1 (A=0 -> T121, A=90 -> T124)
local MyParkMultiDrillC1 = GetMultiDrillCHomeFromVirtualAxis( dPosA, EMT.TTOTLEN)
EmtModifyAxisHome( 'C1', MyParkMultiDrillC1)
-- se lama su aggregato testa sotto, aggiusto subito angolo scelto per asse virtuale A
elseif EMT.HEAD == 'H22' then
-- valore dell'asse virtuale
local dPrevA = dPosA
dPosA = GetCurrSawingVirtualAxis()
-- imposto home dell'asse C2 (A=0 -> T201, A=90 -> T204)
local MyParkCSawC2 = GetSawCHomeFromVirtualAxis( dPosA)
EmtModifyAxisHome( 'C2', MyParkCSawC2)
-- se lavorazione attuale e precedente con lama su aggregato da sotto con angolo A diverso, devo scaricare e ricaricare
if EMT.HEAD == EMT.PREVHEAD_H2 then
if abs( dPosA - dPrevA) > 1 then
EMT.TO_ZMAX = true
EMT.R3_CHANGED = true
end
end
end
-- gestione eventuale lavorazione in doppio
local nDouType = EgtGetValInNotes( EMT.MCHUSERNOTES, 'DOUBLE', 'i')
if nDouType == 2 or nDouType == 3 then
local sDouTool = EgtGetValInNotes( EMT.TUSERNOTES, 'DOUBLE', 's') or ''
local sDouTool = EgtGetValInNotes( EMT.MCHUSERNOTES, 'TOOLDOUBLE', 's') or EgtGetValInNotes( EMT.TUSERNOTES, 'DOUBLE', 's') or ''
local sOldTool = EgtTdbGetCurrToolParam( MCH_TP.NAME)
if EgtTdbSetCurrTool( sDouTool) and EgtTdbGetCurrToolParam( MCH_TP.ACTIVE) then
-- salvo dati
@@ -462,18 +490,18 @@ function OnMachiningEnd()
EmitRemark( 'PART UNLOAD')
elseif EMT.AUXTYPE == 'P' then
if EMT.PREROT then
EmitZmax( false, true, EMT.R1, EMT.R2)
EmitZmax( false, true, EMT.R1, EMT.R2, false, false, false)
EMT.ZMAX = true
EmitRemark( 'PART ROTATION')
elseif EMT.FALL then
if EMT.TO_ZMAX and not EMT.ZMAX then
EmitZmax( false, true, EMT.R1, EMT.R2)
EmitZmax( false, true, EMT.R1, EMT.R2, false, false, false)
EMT.ZMAX = true
EMT.TO_ZMAX = nil
end
EmitRemark( 'PART FALL')
else
EmitZmax( false, true, EMT.R1, EMT.R2)
EmitZmax( false, true, EMT.R1, EMT.R2, false, false, false)
EMT.ZMAX = true
EmitRemark( 'PART SPLIT 2')
end
@@ -522,7 +550,10 @@ function OnMachiningEnd()
EMT.PREVTOOL = EMT.TOOL
if EMT.DOU_TYPE and not EMT.ZMAX then EMT.DOU_TO_ZMAX = EMT.DOU_TYPE end
EMT.DOU_TYPE = nil
-- se taglio finale, aggiorno lunghezza barra
if EMT.MCHCUT then
EMT.LB = EMT.LT + ( EMT.X_OFF or 0)
end
-- salvo dati utensile
local nSetHead = GetHeadSet( EMT.HEAD)
-- per gruppo testa 1
@@ -553,10 +584,12 @@ function OnPathStart()
--MyOutput( 'CNT='.. tostring( EMT.CNT or 0))
-- se utensile non cambiato, salvo eventuali precedenti rotanti
if EMT.TOOL == EMT.PREVTOOL and not EMT.ZMAX then
EMT.L2pp = EMT.L2op
EMT.L3pp = EMT.L3op
EMT.R1pp = EMT.R1p
EMT.R2pp = EMT.R2p
EMT.R1pp = EMT.R1p or EMT.R1pp
EMT.R2pp = EMT.R2p or EMT.R2pp
else
EMT.L2pp = nil
EMT.L3pp = nil
EMT.R1pp = nil
EMT.R2pp = nil
@@ -572,6 +605,10 @@ function OnPathEnd()
if not EMT.ZMAX then
EmitResetMachining()
end
-- salvo dati precedenti
EMT.L2pp = EMT.L2o
EMT.AUXTYPE = nil
EMT.UNL = nil
EMT.PREROT = nil
@@ -704,7 +741,15 @@ function OnRapid()
-- se testa 1
if nHSet == 1 then
-- selezione testa (posso muovere X solo a Zmax)
local MaxZ1 = EgtGetAxisMax( 'Z1')
local MyMaxZ1 = EgtGetAxisMax( 'Z1')
-- in caso di rotazione della lama lontano dalla posizione di home degli assi rotanti
local bXSpec = EgtIf( BD.RIGHT_LOAD, ( EMT.L2 > -DeltaTabY), ( EMT.L2 < -DeltaTabY))
-- se non è aggregato, posso preselezionare testa e andare in posizione
if EMT.HEAD ~= 'H13' and EMT.HEAD ~= 'H14' then
EmitMoveDataHead( 1, { X=EgtIf( bXSpec, -DeltaTabY, EMT.L2), Z=MyMaxZ1, S=Speed})
EmitMoveStartHead( 1)
EmitMoveWaitHead( 1)
end
EmitMoveWaitChars( EgtIf( bOnlyCharY, 1, 3))
-- se necessario allargo le cabine
if RollerParkingNeeded( EMT.HEAD, PrevR1, PrevR2, EMT.R1, EMT.R2) or
@@ -712,14 +757,12 @@ function OnRapid()
local dPosT = EMT.TPOS or EMT.L1op
EmitParkRoller( dPosT, bSplitCut)
end
-- in caso di rotazione della lama lontano dalla posizione di home degli assi rotanti
local bXSpec = EgtIf( BD.RIGHT_LOAD, ( EMT.L2 > -DeltaTabY), ( EMT.L2 < -DeltaTabY))
if ( EMT.HEAD == 'H12' or EMT.HEAD == 'H16') and ( abs( PrevR1 - EMT.R1) > 1 or abs( PrevR2 - EMT.R2) > 1) and ( abs( HomeR1 - EMT.R1) > 30.1 or abs( HomeR2 - EMT.R2) > 30.1) then
-- se bisogna scrivere tutti gli assi
if WriteAllCoordsOnFirstM101 then
EmitMoveDataHead( 1, { X=EgtIf( bXSpec, -DeltaTabY, EMT.L2), Z=MaxZ1, B=ParkB1, C=ParkC1, S=Speed})
EmitMoveDataHead( 1, { X=EgtIf( bXSpec, -DeltaTabY, EMT.L2), Z=MyMaxZ1, B=ParkB1, C=ParkC1, S=Speed})
else
EmitMoveDataHead( 1, { X=EgtIf( bXSpec, -DeltaTabY, EMT.L2), Z=MaxZ1, S=Speed})
EmitMoveDataHead( 1, { X=EgtIf( bXSpec, -DeltaTabY, EMT.L2), Z=MyMaxZ1, S=Speed})
end
EmitMoveDataHead( 1, { B=0, S=Speed})
EmitMoveDataHead( 1, { C=EMT.R1, S=Speed})
@@ -732,6 +775,9 @@ function OnRapid()
-- se sega a catena
if EMT.HEAD == 'H13' then
EmitMoveDataHead( 1, { X=-ParkCSawX1, Z=HomeZ1, B=HomeR2, C=HomeR1, TRad=dTRad, TLen=dTLen, S=Speed})
-- aggregato foratore multiplo
elseif EMT.HEAD == 'H14' then
EmitMoveDataHead( 1, { X=-ParkMultiDrillX1, Z=HomeZ1, B=HomeR2, C=HomeR1, TRad=dTRad, TLen=dTLen, S=Speed})
-- utensili standard
else
-- utensili lunghi
@@ -799,12 +845,20 @@ function OnRapid()
-- se bisogna scrivere tutti gli assi
if WriteAllCoordsOnFirstM101 then
if EMT.HEAD == 'H22' then
EmitMoveDataHead( 2, { X=MinX2, Z=ParkZ2, B=ParkB2, C=ParkC2, S=Speed})
EmitMoveDataHead( 2, { X=ParkSawX2, Z=ParkZ2, B=0, C=ParkC2, S=Speed})
EMT.L2pp = ParkSawX2
else
EmitMoveDataHead( 2, { X=ParkX2, Z=ParkZ2, B=ParkB2, C=ParkC2, S=Speed})
EMT.L2pp = ParkX2
end
else
EmitMoveDataHead( 2, { X=ParkX2, S=Speed})
if EMT.HEAD == 'H22' then
EmitMoveDataHead( 2, { X=ParkSawX2, S=Speed})
EMT.L2pp = ParkSawX2
else
EmitMoveDataHead( 2, { X=ParkX2, S=Speed})
EMT.L2pp = ParkX2
end
end
EmitMoveStartHead( 2)
EmitMoveWaitHead( 2)
@@ -815,8 +869,19 @@ function OnRapid()
local dPosT = EMT.TPOS or EMT.L1op
EmitParkRoller( dPosT, bSplitCut)
end
EmitMoveDataHead( 2, { X=EMT.L2, Z=EMT.L3, S=Speed})
EmitMoveDataHead( 2, { B=EMT.R2, C=EMT.R1, S=Speed})
-- vado a quota sicurezza in X per permettere rotazione assi rotanti
if ( not EMT.L2pp or ( EMT.L2pp and EMT.L2pp > SafeX2RotAxis)) and ( ParkB2 ~= EMT.R2 or ParkC2 ~= EMT.R1) then
EmitMoveDataHead( 2, { X=SafeX2RotAxis, Z=ParkZ2, B=ParkB2, C=ParkC2, S=Speed})
end
-- scrivo solo se gli assi rotanti sono cambiati
if EMT.HEAD == 'H22' and ( CurrB2 ~= EMT.R2 or CurrC2 ~= EMT.R1) then
EmitMoveDataHead( 2, { B=EMT.R2, C=EMT.R1, S=Speed})
end
if EMT.ZMAX then
EmitMoveDataHead( 2, { X=EMT.L2, B=EMT.R2, C=EMT.R1, S=Speed})
else
EmitMoveDataHead( 2, { X=EMT.L2, Z=EMT.L3, B=EMT.R2, C=EMT.R1, S=Speed})
end
EmitMoveStartHead( 2)
-- eventuale preselezione successiva testa 1
PreselectNextDiffHead( EMT.MCHID, EMT.HEAD)
@@ -826,11 +891,12 @@ function OnRapid()
else
-- selezione testa (posso muovere X solo a Zmax)
local MaxZ3 = EgtGetAxisMax( 'Z3')
local MyParkX3 = EgtGetAxisHomePos( 'X3')
-- se bisogna scrivere tutti gli assi
if WriteAllCoordsOnFirstM101 then
EmitMoveDataHead( 3, { X=EMT.L2, Z=MaxZ3, B=ParkB3, C=0, S=Speed})
EmitMoveDataHead( 3, { X=MyParkX3, Z=MaxZ3, B=ParkB3, C=ParkC3, S=Speed})
else
EmitMoveDataHead( 3, { X=EMT.L2, Z=MaxZ3, S=Speed})
EmitMoveDataHead( 3, { X=MyParkX3, Z=MaxZ3, S=Speed})
end
EmitMoveStartHead( 3)
EmitMoveWaitHead( 3)
@@ -843,13 +909,42 @@ function OnRapid()
end
-- eseguo movimenti
local Speed = EMT.S
EmitMoveDataHead( 3, { Z=EMT.L3, S=Speed})
EmitMoveDataHead( 3, { B=EMT.R2, C=EMT.R1, S=Speed})
EmitMoveStartHead( 3)
-- eventuale preselezione successiva testa 2
PreselectNextDiffHead( EMT.MCHID, EMT.HEAD)
-- aspetto esecuzione movimento testa 3
EmitMoveWaitHead( 3)
-- se è macchina a 3 teste con gruppo truciolatore 4 assi
if EgtGetHeadId( 'H39') then
EmitMoveDataHead( 3, { Z=EMT.L3, S=Speed})
EmitMoveDataHead( 3, { B=EMT.R2, C=EMT.R1, S=Speed})
EmitMoveStartHead( 3)
-- eventuale preselezione successiva testa 2
PreselectNextDiffHead( EMT.MCHID, EMT.HEAD)
-- aspetto esecuzione movimento testa 3
EmitMoveWaitHead( 3)
-- se gruppo lama dedicato, senza cambio utensile
elseif EgtGetHeadId( 'H38') then
local B3Home = EgtGetAxisHomePos( 'B3')
local C3Home = EgtGetAxisHomePos( 'C3')
EmitMoveDataHead( 3, { X=-SafeX3RotAxis, S=Speed})
-- se non sono esattamente in home, devo ruotare in zona sicura
if abs( C3Home - EMT.R1) > 1 or abs( B3Home - EMT.R2) > 1 then
EMT.L3 = min( EMT.L3, SafeZ3RotAxis)
EmitMoveDataHead( 3, { Z=SafeZ3RotAxis, S=Speed})
EmitMoveDataHead( 3, { B=EMT.R2, C=EMT.R1, S=Speed})
if ( EMT.L3 - SafeZ3RotAxis) > 100 * GEO.EPS_SMALL then
EmitMoveDataHead( 3, { Z=EMT.L3, S=Speed})
end
EmitMoveDataHead( 3, { X=EMT.L2, S=Speed})
end
-- muovo in posizione finale
EmitMoveDataHead( 3, { X=EMT.L2, Z=EMT.L3, B=EMT.R2, C=EMT.R1, S=Speed})
EmitMoveStartHead( 3)
-- eventuale preselezione successiva testa 2
PreselectNextDiffHead( EMT.MCHID, EMT.HEAD)
-- aspetto esecuzione movimento testa 3
EmitMoveWaitHead( 3)
-- errore, testa non gestita
else
EmtSetLastError( 1212, "HEAD not managed")
end
end
-- dati aggancio a trave
local BhData = { T=EMT.L1, SetHead=0}
@@ -893,7 +988,7 @@ function OnRapid()
EmitParkedLines()
-- se sfrido grande, emetto comando speciale
if EMT.HOVM > 99 then
if EgtGetHeadId( 'H31') then
if IsHeadExisting( 3) then
MyOutput( 'M107')
else
MyOutput( ';M107')
@@ -903,7 +998,18 @@ function OnRapid()
else
--MyOutput( string.format( 'V1Pos=%.3f V2Pos=%.3f', EMT.V1POS, EMT.V2POS))
if not EMT.RELOAD and not EMT.ZMAX and #EMT.AUXCMD > 0 and EMT.TO_ZMAX then
EmitZmax( false, false, PrevR1, PrevR2)
-- caso speciale in cui bisogna solo cambiare presa aggregato lama sotto
if EMT.R3_CHANGED then
-- EmitZmax è fatta per essere chiamata con utensile attuale. In questo caso l'attuale è già quello con nuova rotazione
-- Allora salvo l'attuale e imposto il vecchio solo momentanemente, per poi ripristinarlo
local sBckTcPos = EMT.TCPOS
EMT.TCPOS = EMT.PREVTCPOSREAL_H2
EmitZmax( false, false, PrevR1, PrevR2, false, false, true)
EMT.TCPOS = sBckTcPos
EMT.R3_CHANGED = nil
else
EmitZmax( false, false, PrevR1, PrevR2, false, false, true)
end
EMT.ZMAX = true
EMT.TO_ZMAX = nil
PrevR1 = EgtGetAxisHomePos( EgtIf( nHSet == 1, 'C1', 'C2'))
@@ -940,7 +1046,7 @@ function OnRapid()
if EMT.MCHUSERNOTES and EMT.MCHUSERNOTES:find( 'Cut', 1, true) then
-- se sfrido grande, emetto comando speciale
if EMT.LB - EMT.LT > 99 then
if EgtGetHeadId( 'H31') then
if IsHeadExisting( 3) then
MyOutput( 'M107')
else
MyOutput( ';M107')
@@ -981,9 +1087,20 @@ function OnRapid()
EmitMoveDataHead( 1, { Z=EMT.L3, B=EMT.R2, S=Speed})
-- caso standard
else
EmitMoveDataHead( 1, { Z=EMT.L3, S=Speed})
EmitMoveDataHead( 1, { B=EMT.R2, S=Speed})
EmitMoveDataHead( 1, { C=EMT.R1, S=Speed})
-- se ero in posizione speciale, prima ruoto poi scendo
if bXSpec then
local dZPos = max( HomeZ1, EMT.L3)
EmitMoveDataHead( 1, { Z=dZPos, S=Speed})
EmitMoveDataHead( 1, { B=EMT.R2, C=EMT.R1, S=Speed})
EmitMoveDataHead( 1, { X=EMT.L2, S=Speed})
if abs( dZPos - EMT.L3) > 1 then
EmitMoveDataHead( 1, { Z=EMT.L3, S=Speed})
end
else
EmitMoveDataHead( 1, { Z=EMT.L3, S=Speed})
EmitMoveDataHead( 1, { B=EMT.R2, S=Speed})
EmitMoveDataHead( 1, { C=EMT.R1, S=Speed})
end
end
-- altrimenti sega a catena
else
@@ -1063,6 +1180,7 @@ function OnRapid()
local CurrC2 = PrevR1
local dSafeZ2 = EgtGetAxisHomePos( 'Z2')
local Speed = EMT.S * EgtIf( EMT.HEAD ~= 'H22', 1, 1.65)
if not EMT.L2pp then EMT.L2pp = EgtGetAxisHomePos( 'X2') end
-- calcolo posizione reale
EMT.TCPOSREAL = 'T' .. AdjustTcPos( false, EMT.TCPOS, EMT.R3)
-- se utensile cambiato (controllo il reale perchè per aggregato dipende come è stato caricato)
@@ -1071,31 +1189,48 @@ function OnRapid()
-- se bisogna scrivere tutti gli assi
if WriteAllCoordsOnFirstM101 then
if EMT.HEAD == 'H22' then
EmitMoveDataHead( 2, { X=MinX2, Z=-CurrZ2, B=CurrB2, C=CurrC2, S=Speed})
EmitMoveDataHead( 2, { X=ParkSawX2, Z=-dSafeZ2, B=0, C=CurrC2, S=Speed})
EMT.L2pp = ParkSawX2
else
EmitMoveDataHead( 2, { X=SafeX2, Z=-CurrZ2, B=CurrB2, C=CurrC2, S=Speed})
EmitMoveDataHead( 2, { X=SafeX2, Z=-dSafeZ2, B=CurrB2, C=CurrC2, S=Speed})
EMT.L2pp = SafeX2
end
else
if EMT.HEAD == 'H22' then
EmitMoveDataHead( 2, { X=ParkSawX2, S=Speed})
EMT.L2pp = ParkSawX2
else
EmitMoveDataHead( 2, { X=SafeX2, S=Speed})
EMT.L2pp = SafeX2
end
end
-- scrivo solo se gli assi rotanti sono cambiati
EmitMoveDataHead( 2, { Z=-dSafeZ2, S=Speed})
EmitMoveDataHead( 2, { X=EMT.L2, S=Speed})
if EMT.L2pp > SafeX2RotAxis and ( CurrB2 ~= EMT.R2 or CurrC2 ~= EMT.R1) then
EmitMoveDataHead( 2, { X=SafeX2RotAxis, Z=-dSafeZ2, B=CurrB2, C=CurrC2, S=Speed})
end
else
-- scrivo solo se gli assi rotanti sono cambiati
if EMT.HEAD == 'H22' and ( CurrB2 ~= EMT.R2 or CurrC2 ~= EMT.R1) then
EmitMoveDataHead( 2, { X=EMT.L2, Z=-dSafeZ2, B=CurrB2, C=CurrC2, S=Speed})
if EMT.L2pp > SafeX2RotAxis and ( CurrB2 ~= EMT.R2 or CurrC2 ~= EMT.R1) then
EmitMoveDataHead( 2, { X=SafeX2RotAxis, Z=-dSafeZ2, B=CurrB2, C=CurrC2, S=Speed})
end
end
-- se stesso utensile vado già alla X di lavoro
else
-- scrivo solo se gli assi rotanti sono cambiati
if EMT.HEAD == 'H22' and ( CurrB2 ~= EMT.R2 or CurrC2 ~= EMT.R1) then
EmitMoveDataHead( 2, { X=EMT.L2, Z=-dSafeZ2, B=CurrB2, C=CurrC2, S=Speed})
if EMT.ZMAX and EMT.L2pp > SafeX2RotAxis and ( CurrB2 ~= EMT.R2 or CurrC2 ~= EMT.R1) then
EmitMoveDataHead( 2, { X=SafeX2RotAxis, Z=-dSafeZ2, B=CurrB2, C=CurrC2, S=Speed})
end
end
-- scrivo solo se gli assi rotanti sono cambiati
if EMT.HEAD == 'H22' and ( CurrB2 ~= EMT.R2 or CurrC2 ~= EMT.R1) then
EmitMoveDataHead( 2, { B=EMT.R2, C=EMT.R1, S=Speed})
end
EmitMoveDataHead( 2, { X=EMT.L2, Z=EMT.L3, B=EMT.R2, C=EMT.R1, S=Speed})
if EMT.ZMAX then
EmitMoveDataHead( 2, { X=EMT.L2, B=EMT.R2, C=EMT.R1, S=Speed})
else
EmitMoveDataHead( 2, { X=EMT.L2, Z=EMT.L3, B=EMT.R2, C=EMT.R1, S=Speed})
end
EmitMoveStartHead( 2)
-- eventuale preselezione successiva testa 1
PreselectNextDiffHead( EMT.MCHID, EMT.HEAD)
@@ -1109,20 +1244,45 @@ function OnRapid()
local HomeC3 = EgtGetAxisHomePos( 'C3')
local HomeB3 = EgtGetAxisHomePos( 'B3')
local Speed = EMT.S
if EMT.ZMAX or ( EMT.FLAG == 2 and EMT.FLAG2 == 1) then
local CurrB3 = PrevR2
local CurrC3 = PrevR1
-- se bisogna scrivere tutti gli assi
if WriteAllCoordsOnFirstM101 then
EmitMoveDataHead( 3, { X=EMT.L2, Z=MyMaxZ3, B=CurrB3, C=CurrC3, S=Speed})
else
EmitMoveDataHead( 3, { X=EMT.L2, Z=MyMaxZ3, S=Speed})
end
-- se è macchina a 3 teste con gruppo truciolatore 4 assi
if EgtGetHeadId( 'H39') then
if EMT.ZMAX or ( EMT.FLAG == 2 and EMT.FLAG2 == 1) then
local CurrB3 = PrevR2
local CurrC3 = PrevR1
-- se bisogna scrivere tutti gli assi
if WriteAllCoordsOnFirstM101 then
EmitMoveDataHead( 3, { X=EMT.L2, Z=MyMaxZ3, B=CurrB3, C=CurrC3, S=Speed})
else
EmitMoveDataHead( 3, { X=EMT.L2, Z=MyMaxZ3, S=Speed})
end
EmitMoveDataHead( 3, { Z=EMT.L3, B=EMT.R2, C=EMT.R1, S=Speed})
else
EmitMoveDataHead( 3, { Z=EMT.L3, B=EMT.R2, C=EMT.R1, S=Speed})
else
EmitMoveDataHead( 3, { X=EMT.L2, Z=EMT.L3, B=EMT.R2, C=EMT.R1, S=Speed})
end
-- se gruppo lama dedicato, senza cambio utensile
elseif EgtGetHeadId( 'H38') then
if EMT.ZMAX or ( EMT.FLAG == 2 and EMT.FLAG2 == 1) then
local B3Home = EgtGetAxisHomePos( 'B3')
local C3Home = EgtGetAxisHomePos( 'C3')
EmitMoveDataHead( 3, { X=-SafeX3RotAxis, S=Speed})
-- se non sono esattamente in home, devo ruotare in zona sicura
if abs( C3Home - EMT.R1) > 1 or abs( B3Home - EMT.R2) > 1 then
EMT.L3 = min( EMT.L3, SafeZ3RotAxis)
EmitMoveDataHead( 3, { Z=SafeZ3RotAxis, S=Speed})
EmitMoveDataHead( 3, { B=EMT.R2, C=EMT.R1, S=Speed})
if ( EMT.L3 - SafeZ3RotAxis) > 100 * GEO.EPS_SMALL then
EmitMoveDataHead( 3, { Z=EMT.L3, S=Speed})
end
EmitMoveDataHead( 3, { X=EMT.L2, S=Speed})
end
end
-- muovo in posizione finale
EmitMoveDataHead( 3, { X=EMT.L2, Z=EMT.L3, B=EMT.R2, C=EMT.R1, S=Speed})
else
EmtSetLastError( 1212, "HEAD not managed")
end
EmitMoveStartHead( 3)
-- eventuale preselezione successiva testa 2
PreselectNextDiffHead( EMT.MCHID, EMT.HEAD)
@@ -1185,6 +1345,10 @@ function OnRapid()
EmitMoveStartHead( 1)
local dX2 = Delta2TabY + EMT.DOU_TLEN - ( -DeltaTabY - EMT.L2 + EMT.TLEN + EgtIf( BD.RIGHT_LOAD, -EMT.HB, EMT.HB))
local dZ2 = -Head2Z + MillOffs + Mill2Offs + EMT.L3
-- dato che la testa 2 è slave, bisogna controllare eventuale extra-corsa da post
if dZ2 > MaxZ2 then
EmtSetLastError( 1220, EMT.MCHNAME..' ==> Out of Stroke: Z2 : '.. EgtNumToString( dZ2-MaxZ2, 2))
end
local dC2 = EMT.R1
local dB2 = EMT.R2
EmitMoveDataHead( 2, { Z=-dZ2, B=dB2, C=dC2, TPos=EMT.DOU_TPOS, S=EMT.DOU_SPEED})
@@ -1228,10 +1392,19 @@ function OnRapid()
MyOutput( 'M98')
MyOutput( 'M6 ' .. GetHeadToolCode() .. AdjustTcPos( true))
MyOutput( 'G24' .. EMT.IPLGLSTR)
EMT.PLANEACTIVE = true
-- forzo successiva emissione assi rotanti
EMT.R1p = nil
EMT.R2p = nil
else
-- se lavorazione in doppio controllo le corse
if EMT.DOU_TYPE == 2 then
local dZ2 = -Head2Z + MillOffs + Mill2Offs + EMT.L3
-- dato che la testa 2 è slave, bisogna controllare eventuale extra-corsa da post
if dZ2 > MaxZ2 then
EmtSetLastError( 1220, EMT.MCHNAME..' ==> Out of Stroke: Z2 : '.. EgtNumToString( dZ2-MaxZ2, 2))
end
end
MyAdjustLinearAxes()
EmtAdjustRotaryAxes()
end
@@ -1256,8 +1429,10 @@ function OnRapid()
local bSplitCut = ( EMT.MCHUSERNOTES:find( 'Split', 1, true) ~= nil)
-- porto in home la testa corrente se lavorazione successiva sopra con testa diversa oppure se punta lunga
local nNextTopHSet = GetNextTopHSet( EMT.MCHID)
local bTopGoHome = ( nHSet ~= 2 and nNextTopHSet ~= 0 and nHSet ~= nNextTopHSet) or ( nHSet == 1 and EMT.TTOTLEN > LongTool)
EmitZmax( true, true, EMT.R1p, EMT.R2p, bSplitCut, bTopGoHome)
-- ricavo prossimo utensile
local sNextTool = GetNextTool( EMT.MCHID)
local bTopGoHome = ( IsLastPath( EMT.PATHID) and not sNextTool and nHSet == 3) or ( nHSet ~= 2 and nNextTopHSet ~= 0 and nHSet ~= nNextTopHSet) or ( nHSet == 1 and EMT.TTOTLEN > LongTool)
EmitZmax( true, true, EMT.R1p, EMT.R2p, bSplitCut, bTopGoHome, false)
-- aggiorno quota finale trave dopo Zmax
EMT.L1o = EMT.TPOS
EMT.ZMAX = true
@@ -1299,6 +1474,7 @@ function OnLinear()
MyOutput( 'M98')
MyOutput( 'M6 ' .. GetHeadToolCode() .. AdjustTcPos( true))
MyOutput( 'G24' .. EMT.IPLGLSTR)
EMT.PLANEACTIVE = true
-- emissione movimento
EMT.R1p = nil
EMT.R2p = nil
@@ -1365,6 +1541,55 @@ end
---------------------------------------------------------------------
function OnArc()
-- se necessario, impostazione riferimento locale
if EMT.REFLOC == 0 then
-- calcolo per piano generico
CalcInterpPlane()
EMT.REFLOC = 1
-- salvo posizione attuale
local OldL1 = EMT.L1
local OldL2 = EMT.L2
local OldL3 = EMT.L3
-- imposto posizione precedente (se presente devo annullare l'offset in X per sovramateriale di testa)
EMT.L1 = EMT.L1o
EMT.L2 = EMT.L2o
EMT.L3 = EMT.L3o
if EMT.X_OFF then EMT.L1 = EMT.L1 - EMT.X_OFF end
-- trasformo i punti nel piano
MyAdjustLinearAxes()
EmtAdjustRotaryAxes()
EMT.L1p = nil
EMT.L2p = nil
EMT.L3p = nil
MyOutput( 'M105 P1=' .. GetFaceCode() .. ' P2='..GetHeadSetCode()..' P3='..EgtIf( EMT.DOU_TYPE, 2, 0))
MyOutput( 'M98')
MyOutput( 'M6 ' .. GetHeadToolCode() .. AdjustTcPos( true))
MyOutput( 'G24' .. EMT.IPLGLSTR)
EMT.PLANEACTIVE = true
-- emissione movimento
EMT.R1p = nil
EMT.R2p = nil
if EmitRapidInG1 then
local sFeed = ' F30000'
sOut = 'G1'..EmtGetAxis('L1')..EmtGetAxis('L2')..EmtGetAxis('L3')..
EmtGetAxis('R2')..EmtGetAxis('R1')..sFeed
else
sOut = 'G0'..EmtGetAxis('L1')..EmtGetAxis('L2')..EmtGetAxis('L3')..
EmtGetAxis('R2')..EmtGetAxis('R1')
end
MyOutput( sOut)
-- aggiorno precedenti
local nOriginalMove = EMT.MOVE
EMT.MOVE = 0
EmtUpdatePrev()
EMT.MOVE = nOriginalMove
-- ripristino posizione attuale
EMT.L1 = OldL1
EMT.L2 = OldL2
EMT.L3 = OldL3
end
-- se primo movimento in feed della lavorazione, dichiaro inizio lavorazione
if EMT.MCHFIRSTFEED then
EMT.MCHFIRSTFEED = nil
@@ -1403,28 +1628,6 @@ function OnArc()
EmtUpdatePrev()
end
---------------------------------------------------------------------
function CalcDinamicaPinze( dH, dS, dL)
local MinTempoAcc = 0.6 -- [s]
local MaxTempoAcc = 6.0 -- [s]
local KgMtCubo= 550 -- densità legno [Kg / metro cubo]
local Massa = ( dH * dS * dL * KgMtCubo ) / 1e9 -- massa [Kg]
local FMaxPinze = EMT.FMAXPINZE -- Feed massima pinze [mm/min]
local ForzaAttrito = 350 * 9.8 * 0.2 -- Forza chiusura pinze [Kgf] * g * Coeff_Attrito -> [N]
local TempoAcc = ( ( Massa * FMaxPinze) / ( 60 * ForzaAttrito) / 1000)
if ( TempoAcc < MinTempoAcc) then TempoAcc = MinTempoAcc end
if ( TempoAcc > MaxTempoAcc) then TempoAcc = MaxTempoAcc end
local AccMaxPinze = FMaxPinze / ( 60 * MinTempoAcc)
local AccPinze = FMaxPinze / ( 60 * TempoAcc)
local RidFeed = 100 / Massa * 100
if RidFeed > 100 then
RidFeed = 100
elseif RidFeed < 10 then
RidFeed = 10
end
return TempoAcc * 1000, MinTempoAcc * 1000, RidFeed
end
---------------------------------------------------------------------
function CalcForzaPinze( dH, dS, dL, dT)
local MassaRef = 1500 -- [Kg]
@@ -1432,7 +1635,7 @@ function CalcForzaPinze( dH, dS, dL, dT)
if dMinJoin < 0.9 * BD.MIN_JOIN_L then
return MinForzaPinze
else
local KgMtCubo= 550 -- densità legno [Kg / metro cubo]
local KgMtCubo= WoodDensity or 550 -- densità legno [Kg / metro cubo]
local Massa = ( dH * dS * dL * KgMtCubo ) / 1e9 -- massa [Kg]
local Forza = Massa / MassaRef * MaxForzaPinze
return EgtClamp( Forza, MinForzaPinze, MaxForzaPinze)
@@ -2091,42 +2294,66 @@ function AdjustTcPos( bLen3, sTcPos, dAxR3)
end
if sPos == '101' then
if not dAxR3 then dAxR3 = EMT.R3 end
if abs( dAxR3 - 0) < 0.1 then
sPos = '101'
elseif abs( dAxR3 - 270) < 0.1 then
sPos = '102'
elseif abs( dAxR3 - 180) < 0.1 then
sPos = '103'
elseif abs( dAxR3 - 90) < 0.1 then
sPos = '104'
else
EmtSetLastError( 1210, 'Chain saw orientation not allowed')
-- controllo che il valore esista. Altrimenti è una testa senza asse ausiliario
if dAxR3 then
if abs( dAxR3 - 0) < 0.1 then
sPos = '101'
elseif abs( dAxR3 - 270) < 0.1 then
sPos = '102'
elseif abs( dAxR3 - 180) < 0.1 then
sPos = '103'
elseif abs( dAxR3 - 90) < 0.1 then
sPos = '104'
else
EmtSetLastError( 1210, 'Tool T101 orientation not allowed')
end
end
end
if sPos == '111' then
if not dAxR3 then dAxR3 = EMT.R3 end
if abs( dAxR3 - 0) < 0.1 then
sPos = '111'
elseif abs( dAxR3 - 270) < 0.1 then
sPos = '112'
elseif abs( dAxR3 - 180) < 0.1 then
sPos = '113'
elseif abs( dAxR3 - 90) < 0.1 then
sPos = '114'
else
EmtSetLastError( 1210, 'Chain saw orientation not allowed')
if not dAxR3 then dAxR3 = EMT.R3 or 0 end
-- controllo che il valore esista. Altrimenti è una testa senza asse ausiliario
if dAxR3 then
if abs( dAxR3 - 0) < 0.1 then
sPos = '111'
elseif abs( dAxR3 - 270) < 0.1 then
sPos = '112'
elseif abs( dAxR3 - 180) < 0.1 then
sPos = '113'
elseif abs( dAxR3 - 90) < 0.1 then
sPos = '114'
else
EmtSetLastError( 1210, 'Tool T111 orientation not allowed')
end
end
end
if sPos == '121' then
if not dAxR3 then dAxR3 = EMT.R3 or 0 end
-- controllo che il valore esista. Altrimenti è una testa senza asse ausiliario
if dAxR3 then
if abs( dAxR3 - 0) < 0.1 then
sPos = '121'
elseif abs( dAxR3 - 270) < 0.1 then
sPos = '122'
elseif abs( dAxR3 - 180) < 0.1 then
sPos = '123'
elseif abs( dAxR3 - 90) < 0.1 then
sPos = '124'
else
EmtSetLastError( 1210, 'Tool T121 orientation not allowed')
end
end
end
if sPos == '201' then
if not dAxR3 then dAxR3 = EMT.R3 end
if abs( dAxR3 - 0) < 0.1 then
sPos = '201'
elseif abs( dAxR3 - 270) < 0.1 then
sPos = '202'
elseif abs( dAxR3 - 180) < 0.1 then
sPos = '203'
elseif abs( dAxR3 - 90) < 0.1 then
sPos = '204'
-- Lama su aggregato da sotto non può essere presa in queste posizioni per problemi di collisione durante parcheggio
--elseif abs( dAxR3 - 270) < 0.1 then
-- sPos = '202'
--elseif abs( dAxR3 - 180) < 0.1 then
-- sPos = '203'
else
EmtSetLastError( 1210, 'Saw orientation not allowed')
end
@@ -2220,11 +2447,12 @@ function GetHeadToolCode()
end
---------------------------------------------------------------------
function EmitZmax( bReset, bEnd, PrevR1, PrevR2, bSplitCut, bTopGoHome)
function EmitZmax( bReset, bEnd, PrevR1, PrevR2, bSplitCut, bTopGoHome, bUsePrevDelta)
if bReset then
EmitResetMachining()
end
local nSetHead = GetHeadSet( EMT.HEAD)
local dXPos = EgtIf( bUsePrevDelta, EMT.L2pp or EMT.L2o, EMT.L2o)
-- se testa 1
if nSetHead == 1 then
-- posizioni sicure
@@ -2245,12 +2473,12 @@ function EmitZmax( bReset, bEnd, PrevR1, PrevR2, bSplitCut, bTopGoHome)
local dZref = dHomeZ1 + GetZExtra( EMT.HEAD, PrevR2)
dZref = min( dZref, dMaxZ1)
local MovH = { Z = EgtIf( dZref > EMT.L3o, dZref, EMT.L3o)}
MovH.X = -EMT.L2o ; MovH.B = EgtClamp( PrevR2, -90, 90) ; MovH.C = PrevR1 ;
MovH.X = -dXPos ; MovH.B = EgtClamp( PrevR2, -90, 90) ; MovH.C = PrevR1 ;
EmitMoveDataHead( 1, MovH)
if ( EMT.HEAD == 'H12' or EMT.HEAD == 'H16') and ( abs( dHomeC1 - PrevR1) > 30.1 or abs( dHomeB1 - PrevR2) > 30.1) then
EmitMoveDataHead( 1, { Z=dMaxZ1, B=0, Fmt=1})
end
if EgtIf( BD.RIGHT_LOAD, ( EMT.L2 > -DeltaTabY), ( EMT.L2 < -DeltaTabY)) then
if EgtIf( BD.RIGHT_LOAD, ( -dXPos > -DeltaTabY), ( -dXPos < -DeltaTabY)) then
EmitMoveDataHead( 1, { X=-DeltaTabY, Fmt=1})
end
EmitMoveDataHead( 1, { C=dHomeC1, Fmt=1})
@@ -2272,7 +2500,17 @@ function EmitZmax( bReset, bEnd, PrevR1, PrevR2, bSplitCut, bTopGoHome)
-- salgo in Z sicurezza raddrizzando la B
local dSafeZ1 = EgtIf( EMT.TTOTLEN < MinLengthLongCSaw, ParkCSawZ1, ParkLongCSawZ1)
EmitMoveDataHead( 1, { Z=dSafeZ1, B=dHomeB1, Fmt=1})
EmitMoveDataHead( 1, { X=-dHomeX1, C=dHomeC1, Fmt=1})
-- lascio la motosega a parcheggio. In caso di utilizzo della testa 3, la motosega viene scaricata automaticamente dalla macro.
EmitMoveDataHead( 1, { X=-ParkCSawX1, C=dHomeC1, Fmt=1})
EmitMoveStartHead( 1)
EmitMoveWaitHead( 1)
end
-- se ho degli aggregati e la prossima è la testa 3, scarico e prendo utensile di default
local nNextTopHSet = GetNextTopHSet( EMT.MCHID)
if IsHeadExisting( 3) and nNextTopHSet == 3 and ( EMT.TCPOS == 'T101' or EMT.TCPOS == 'T111' or EMT.TCPOS == 'T121') then
-- lascio la motosega a parcheggio. In caso di utilizzo della testa 3, la motosega viene scaricata automaticamente dalla macro.
local sDefToolToLoad = AdjustTcPos( false, DefTcPos1)
EmitMoveDataHead( 1, { X=-ParkX1, TPos=sDefToolToLoad, Fmt=1})
EmitMoveStartHead( 1)
EmitMoveWaitHead( 1)
end
@@ -2296,6 +2534,10 @@ function EmitZmax( bReset, bEnd, PrevR1, PrevR2, bSplitCut, bTopGoHome)
else
EmitMoveDataHead( 2, { X=dHomeX2, Fmt=1})
end
-- solo se è macchina a 3 teste con gruppo truciolatore 4 assi, devo stare più alto
if EgtGetHeadId( 'H39') then
EmitMoveDataHead( 2, { Z=-ParkInLavZ2, Fmt=1})
end
EmitMoveStartHead( 2)
EmitMoveWaitHead( 2)
-- altrimenti testa 3
@@ -2304,14 +2546,44 @@ function EmitZmax( bReset, bEnd, PrevR1, PrevR2, bSplitCut, bTopGoHome)
local dMaxZ3 = EgtGetAxisMax( 'Z3')
local dHomeX3 = EgtGetAxisHomePos( 'X3')
local dHomeB3 = EgtGetAxisHomePos( 'B3')
-- eseguo la salita a Z3max
EmitMoveDataHead( 3, { Z=dMaxZ3, Fmt=1})
if bTopGoHome then
EmitMoveDataHead( 3, { X=-dHomeX3, B=dHomeB3, Fmt=1})
-- se è macchina a 3 teste con gruppo truciolatore 4 assi
if EgtGetHeadId( 'H39') then
-- eseguo la salita a Z3max
EmitMoveDataHead( 3, { Z=dMaxZ3, Fmt=1})
if bTopGoHome then
EmitMoveDataHead( 3, { X=-dHomeX3, B=dHomeB3, Fmt=1})
end
-- se gruppo lama dedicato, senza cambio utensile
elseif EgtGetHeadId( 'H38') then
local dHomeC3 = EgtGetAxisHomePos( 'C3')
if RollerParkingNeeded( EMT.HEAD, PrevR1, PrevR2, dHomeC3, dHomeB3) then
local dPosT = EgtIf( bEnd, EMT.L1o, EMT.TPOS or EMT.L1op)
EmitParkRoller( dPosT, bSplitCut)
end
-- se non sono esattamente in home, devo ruotare in zona sicura
if abs( dHomeC3 - PrevR1) > 1 or abs( dHomeB3 - PrevR2) > 1 then
EmitMoveDataHead( 3, { X=-SafeX3RotAxis, Fmt=1})
EmitMoveDataHead( 3, { Z=SafeZ3RotAxis, Fmt=1})
EmitMoveDataHead( 3, { B=dHomeB3, C=dHomeC3, Fmt=1})
end
-- eseguo la salita a Z3max
EmitMoveDataHead( 3, { Z=dMaxZ3, Fmt=1})
if bTopGoHome then
EmitMoveDataHead( 3, { X=-dHomeX3, Fmt=1})
end
else
EmtSetLastError( 1212, "HEAD not managed")
end
EmitMoveStartHead( 3)
EmitMoveWaitHead( 3)
end
-- resetto posizione precedente assi
EMT.L2pp = nil
EMT.L3pp = nil
EMT.R1pp = nil
EMT.R2pp = nil
end
---------------------------------------------------------------------
@@ -2337,15 +2609,19 @@ end
---------------------------------------------------------------------
function EmitResetMachining()
MyOutput( 'G27')
if EMT.PREFALLCUT then
MyOutput( 'M29')
EMT.PREFALLCUT = nil
if EMT.PLANEACTIVE then
MyOutput( 'G27')
if EMT.PREFALLCUT then
MyOutput( 'M29')
EMT.PREFALLCUT = nil
end
local sP12 = ''
if EMT.TOOL ~= GetNextTool( EMT.MCHID) then sP12 = EgtIf( EMT.HEAD ~= 'H21', ' P1=0'..EgtIf( EMT.DOU_TYPE, ' P2=0', ''), ' P2=0') end
local sP4 = EgtIf( EMT.MCHUSERNOTES:find( 'Split', 1, true), ' P4=1', '')
MyOutput( 'M99'..sP12..sP4)
-- piano non più attivo
EMT.PLANEACTIVE = false
end
local sP12 = ''
if EMT.TOOL ~= GetNextTool( EMT.MCHID) then sP12 = EgtIf( EMT.HEAD ~= 'H21', ' P1=0'..EgtIf( EMT.DOU_TYPE, ' P2=0', ''), ' P2=0') end
local sP4 = EgtIf( EMT.MCHUSERNOTES:find( 'Split', 1, true), ' P4=1', '')
MyOutput( 'M99'..sP12..sP4)
end
---------------------------------------------------------------------
@@ -2398,7 +2674,7 @@ function EmitParkRoller( dPosT, bSplitCut)
local dPosY1 = dPosT + EMT.Y1DELTA
local DiffY1 = MyParkY1 - dPosY1
local dMoveY1 = EgtIf( DiffY1 > 0.1, dMoveV1, 0)
local dTryMoveY1 = ParkV1 - dPosT - EgtIf( bSplitCut or EMT.FALL, EMT.LT, 0)
local dTryMoveY1 = min( ParkV1 - dPosT - EgtIf( bSplitCut or EMT.FALL, EMT.LT, 0), MaxY1 - dPosY1 - 10)
if ( dPosT > ParkV2 - ExtraParkV and dPosT < ParkV1 and dPosY1 + dTryMoveY1 < MaxY1) then dMoveY1 = max( dMoveY1, dTryMoveY1) end
--MyOutput( string.format( 'PosT=%.3f PosY1=%.3f V1POS=%.3f Split=%s', dPosT, dPosY1, EMT.V1POS, EgtIf( bSplitCut, '1', '0')))
MDChar.Y1 = dPosY1 + dMoveY1
@@ -2410,8 +2686,8 @@ function EmitParkRoller( dPosT, bSplitCut)
local dPosY2 = dPosT + EMT.Y2DELTA
local DiffY2 = MyParkY2 - dPosY2
local dMoveY2 = EgtIf( DiffY2 < -0.1, dMoveV2, 0)
local dTryMoveY2 = ParkV2 - dPosT - EMT.LT
if ( dPosT + EMT.LT < ParkV1 + ExtraParkV and dPosT + EMT.LT > ParkV2 and dPosY2 + dTryMoveY2 > MinY2) then dMoveY2 = min( dMoveY2, dTryMoveY2) end
local dTryMoveY2 = max( ParkV2 - dPosT - EMT.LT - EMT.HOVM, MinY2 - dPosY2 + 10)
if ( dPosT + EMT.LT + EMT.HOVM < ParkV1 + ExtraParkV and dPosT + EMT.LT + EMT.HOVM > ParkV2 and dPosY2 + dTryMoveY2 > MinY2) then dMoveY2 = min( dMoveY2, dTryMoveY2) end
--MyOutput( string.format( 'PosT=%.3f LT=%.3f PosY2=%.3f V2POS=%.3f', dPosT, EMT.LT, dPosY2, EMT.V2POS))
MDChar.Y2 = dPosY2 + dMoveY2
MDChar.MovType = 2
@@ -2486,6 +2762,8 @@ function PreselectNextDiffHead( nMchId, sHead)
if sNextHead == 'H22' or EMT.PREVHEAD_H2 == 'H22' then return end
-- se la Z di lavoro è più bassa del cambio della minima Z
if EMT.MAXMIN[3] < MinZ1ToChangeH2 then
-- se diametro utensile più del truciolatore standard grande, si rischia di collidere anche con il carro X testa sotto (quindi indipendentemente dalla Y della lavorazione)
if EMT.TTOTDIAM > 201 then return end
-- verifico quota del TC
if BD.RIGHT_LOAD and EMT.MAXMAX[2] > ( DeltaTabY + MaxHoOpen + 200) then return end
if not BD.RIGHT_LOAD and EMT.MAXMAX[2] > ( DeltaTabY + 200) then return end
@@ -2524,38 +2802,56 @@ function PreselectNextDiffHead( nMchId, sHead)
end
-- altrimenti (testa 3)
else
-- se preselezione testa 1
if nNextHSet == 1 then
-- TC su montante destro
if nPrevTc == 1 then return
-- TC su montante sinistro
-- se è macchina a 3 teste con gruppo truciolatore 4 assi
if EgtGetHeadId( 'H39') then
-- se preselezione testa 1
if nNextHSet == 1 then
local nNextTc = GetTcForTopHeadTool( sNextTcPos) -- utensile da caricare
local nPrevTc = GetTcForTopHeadTool( EMT.PREVTCPOS_H1) -- utensile da depositare
-- se devo lasciare o prelevare da TC1 oppure non so cosa c'è montato, non posso preselezionare
if nNextTc == 1 or nPrevTc == 1 or nPrevTc == 0 then return
-- TC su montante sinistro
else
if BD.RIGHT_LOAD and EMT.MAXMAX[2] > ( DeltaTabY + MaxHoOpen + 200) then return end
if not BD.RIGHT_LOAD and EMT.MAXMAX[2] > DeltaTabY then return end
end
-- se preselezione testa 2
else
if BD.RIGHT_LOAD and EMT.MAXMAX[2] > ( DeltaTabY + MaxHoOpen + 200) then return end
if not BD.RIGHT_LOAD and EMT.MAXMAX[2] > DeltaTabY then return end
end
-- se preselezione testa 2
else
-- se agregato lama speciale non preseleziono mai
if sNextHead == 'H22' or EMT.PREVHEAD_H2 == 'H22' then return end
-- se la Z di lavoro è più bassa del cambio utensili, verifico quota X (la nostra Y)
if EMT.MAXMIN[3] < MinZ1ToChangeH2 then
if BD.RIGHT_LOAD and EMT.MAXMAX[2] > ( DeltaTabY + MaxHoOpen + 200) then return end
if not BD.RIGHT_LOAD and EMT.MAXMAX[2] > DeltaTabY then return end
-- se agregato lama speciale non preseleziono mai
if sNextHead == 'H22' or EMT.PREVHEAD_H2 == 'H22' then return end
-- se la Z di lavoro è più bassa del cambio utensili, verifico quota X (la nostra Y)
if EMT.MAXMIN[3] < MinZ1ToChangeH2 then
if BD.RIGHT_LOAD and EMT.MAXMAX[2] > ( DeltaTabY + MaxHoOpen + 200) then return end
if not BD.RIGHT_LOAD and EMT.MAXMAX[2] > DeltaTabY then return end
end
end
-- se gruppo lama dedicato, senza cambio utensile non si preseleziona mai
elseif EgtGetHeadId( 'H38') then
return
end
end
-- faccio preselezione ( se sono arrivato qui, vuol dire che posso preselezionare)
if nNextHSet == 1 then
-- Recupero quota X1 (nostro L2)
local dNextX = GetStartMachiningXaxis( nNextMchId)
local dNextX
-- se sto lavorando con testa 3, la testa 1 preselezionata deve restare in home
if nHSet == 3 then
dNextX = - EgtGetAxisHomePos( 'X1')
-- se il prossimo utensile su testa 1 è utensile lungo, resta in home
elseif sNextHead == 'H11' and dNextTotLen > LongTool then
dNextX = - EgtGetAxisHomePos( 'X1')
-- altrimenti recupero quota X1 (nostro L2)
else
dNextX = GetStartMachiningXaxis( nNextMchId)
end
-- Emetto preselezione
if sNextHead == 'H11' then
if dNextTotLen < LongTool then
EmitMoveDataHead( 1, { X=dNextX, B=ParkB1, C=ParkC1, TPos=AdjustTcPos( false, sNextTcPos), Fmt=2})
else
local nNextTc = GetTcForTopHeadTool( sNextTcPos)
EmitMoveDataHead( 1, { X=dNextX, B=ParkLongB1, C=EgtIf( nPrevTc ~= 2, ParkLongTc1C1, ParkLongTc2C1), TPos=AdjustTcPos( false, sNextTcPos), Fmt=2})
EmitMoveDataHead( 1, { X=dNextX, B=ParkLongB1, C=EgtIf( nNextTc ~= 2, ParkLongTc1C1, ParkLongTc2C1), TPos=AdjustTcPos( false, sNextTcPos), Fmt=2})
end
EmitMoveStartHead( 1)
elseif sNextHead == 'H12' or sNextHead == 'H16' then
@@ -2569,9 +2865,11 @@ function PreselectNextDiffHead( nMchId, sHead)
EmitMoveDataHead( 1, { X=EgtIf( bXSpec, -DeltaTabY, dNextX), B=ParkCSawB1, C=MyParkCSawC1, TPos=AdjustTcPos( false, sNextTcPos, dPosA), Fmt=2})
EmitMoveStartHead( 1)
end
else
elseif nNextHSet == 2 then
EmitMoveDataHead( 2, { B=ParkB2, C=ParkC2, TPos=AdjustTcPos( false, sNextTcPos), Fmt=2})
EmitMoveStartHead( 2)
else
; -- non si preseleziona testa 3
end
end
end
File diff suppressed because it is too large Load Diff
+74 -21
View File
@@ -54,6 +54,9 @@ function OnSpecialGetMaxZ()
elseif nSetHead == 2 then
EMC.R1p = ParkC2
EMC.R2p = ParkB2
elseif nSetHead == 3 then
EMC.R1p = ParkC3
EMC.R2p = ParkB3
end
end
local vtT = Vector3d( EMC.TDIR)
@@ -71,14 +74,16 @@ function OnSpecialGetMaxZ()
elseif EMC.HEAD == 'H12' then
if vtTp:getX() > 0.3 and vtT:getX() > 0.3 then
if bBSameSign and abs( EMC.R1 - EMC.R1p) < 165 then
EMC.MAXZ = MaxZ1 - EgtIf( abs( EMC.R2) < 90.1 and abs( EMC.R2p) < 90.1, 0, 130)
EMC.MAXZ = MaxZ1Blade - EgtIf( abs( EMC.R2) < 90.1 and abs( EMC.R2p) < 90.1, 0, 130)
elseif vtTp:getZ() > 0.707 or vtT:getZ() > 0.707 then
EMC.MAXZ = ParkZ1 + 200
elseif vtTp:getZ() > 0.5 or vtT:getZ() > 0.5 then
EMC.MAXZ = ParkZ1 + 100
else
EMC.MAXZ = ParkZ1 + 1
end
elseif bBSameSign and EMC.R1p > 29.9 and EMC.R1p < 180.1 and EMC.R1 > 29.9 and EMC.R1 < 180.1 and EMC.R2p > -10 and EMC.R2 > -10 then
EMC.MAXZ = MaxZ1 - EgtIf( abs( EMC.R2) < 90.1 and abs( EMC.R2p) < 90.1, 0, 130)
EMC.MAXZ = MaxZ1Blade - EgtIf( abs( EMC.R2) < 90.1 and abs( EMC.R2p) < 90.1, 0, 130)
elseif bBSameSign and EMC.R1p > -0.1 and EMC.R1p < 180.1 and EMC.R1 > -0.1 and EMC.R1 < 180.1 and EMC.R2p > -10 and EMC.R2 > -10 then
local vMZ = {{ Tz=0.85, Ez=440}, { Tz=0.5, Ez=200}, { Tz=-0.01, Ez=5}, { Tz=-0.5, Ez=1}}
EMC.MAXZ = ParkZ1 + CalcExtraZ( vtTpZm, vtT, vMZ)
@@ -89,14 +94,16 @@ function OnSpecialGetMaxZ()
elseif EMC.HEAD == 'H16' then
if vtTp:getX() > 0.3 and vtT:getX() > 0.3 then
if bBSameSign and abs( EMC.R1 - EMC.R1p) < 165 then
EMC.MAXZ = MaxZ1 - EgtIf( abs( EMC.R2) < 90.1 and abs( EMC.R2p) < 90.1, 0, 130)
EMC.MAXZ = MaxZ1Blade - EgtIf( abs( EMC.R2) < 90.1 and abs( EMC.R2p) < 90.1, 0, 130)
elseif vtTp:getZ() > 0.707 or vtT:getZ() > 0.707 then
EMC.MAXZ = ParkZ1 + 200
elseif vtTp:getZ() > 0.5 or vtT:getZ() > 0.5 then
EMC.MAXZ = ParkZ1 + 100
else
EMC.MAXZ = ParkZ1 + 1
end
elseif bBSameSign and EMC.R1p > 29.9 and EMC.R1p < 180.1 and EMC.R1 > 29.9 and EMC.R1 < 180.1 and EMC.R2p > -10 and EMC.R2 > -10 then
EMC.MAXZ = MaxZ1 - EgtIf( abs( EMC.R2) < 90.1 and abs( EMC.R2p) < 90.1, 0, 130)
EMC.MAXZ = MaxZ1Blade - EgtIf( abs( EMC.R2) < 90.1 and abs( EMC.R2p) < 90.1, 0, 130)
elseif bBSameSign and EMC.R1p > -0.1 and EMC.R1p < 180.1 and EMC.R1 > -0.1 and EMC.R1 < 180.1 and EMC.R2p > -10 and EMC.R2 > -10 then
local vMZ = {{ Tz=0.85, Ez=440}, { Tz=0.5, Ez=200}, { Tz=-0.01, Ez=5}, { Tz=-0.5, Ez=1}}
EMC.MAXZ = ParkZ1 + CalcExtraZ( vtTpZm, vtT, vMZ)
@@ -111,14 +118,16 @@ function OnSpecialGetMaxZ()
local vMZ = {{ Tz=0.85, Ez=390}, { Tz=0.5, Ez=280}, { Tz=-0.01, Ez=160}}
EMC.MAXZ = ParkZ2 + CalcExtraZ( vtTpZm, vtT, vMZ)
end
elseif EMC.HEAD == 'H38' then
EMC.MAXZ = SafeZ3RotAxis
end
end
---------------------- OnSpecialMoveZup -----------------------------
function OnSpecialMoveZup()
--EgtOutLog( 'OnSpecialMoveZup : ' .. EMC.HEAD .. '.' .. tostring( EMC.EXIT))
-- Inizializzazioni
EMC.ERR = 0
EMC.MODIF = false
@@ -135,7 +144,7 @@ function OnSpecialMoveZup()
if EMC.HEAD == 'H11' or EMC.HEAD == 'H21' or EMC.HEAD == 'H22' then
;
-- se lama
else
elseif EMC.HEAD == 'H12' or EMC.HEAD == 'H16' then
-- riporto i valori tra -179 e + 180
local dCheckAxR1 = EMC.R1
if dCheckAxR1 < -180 then
@@ -180,6 +189,12 @@ function OnSpecialMoveZup()
end
end
end
elseif EMC.HEAD == 'H38' then
EMC.L3 = SafeZ3RotAxis
-- dichiaro modificato
EMC.MODIF = true
else
; -- non si fa nulla
end
end
@@ -194,7 +209,7 @@ local SIC_V = 50 -- sicurezza da testa
local MIN_ENG_V = 115 -- ingombro asse Z
local MIN_ENG_RACK_V = 161 -- ingombro asse Z con cremagliera
local MIN_ENG_XZ2_V = 180 -- ingombro assi XZ sotto
local MIN_Z2_FOR_ENG_XZ2_V = 270 -- quota Z2 da cui considerare ingombro assi XZ sotto
local MIN_Z2_FOR_ENG_XZ2_V = 250 -- quota Z2 da cui considerare ingombro assi XZ sotto
local AGG_V = MinDeltaYV -- ingombro rulli pressori + sicurezza
local MaxLenSmT = 1500 -- massima lunghezza pezzo scaricato con nastri verdi
local DIST_Y1MAX_LOAD = 100 -- distanza carrello Y1 da massimo asse al carico
@@ -574,7 +589,11 @@ function OnPostApplyMachining()
-- Verifico flag di separazione e fase di scarico
local sNotes = EgtGetMachiningParam( MCH_MP.USERNOTES)
local bPreSplit = ( false and sNotes:find( 'Presplit', 1, true) ~= nil)
-- bPreSplit sempre a falso per obbligare a pinzare il pezzo con 1 morsa anche se iniziato il taglio che dividerà grezzo e finito (in genere per sezioni grandi con 2 tagli di lama)
-- Tra un taglio e l'altro infatti c'e' inversione del braccio e quindi un'apertura delle rulliere. Se pinzano entrambe le pinze, potrebbero esserci problemi di collisone rulli-morse
local bPreSplit = false --( sNotes:find( 'Presplit', 1, true) ~= nil)
local bSplitting = ( sNotes:find( 'Split', 1, true) ~= nil)
local bPreCut = ( sNotes:find( 'Precut', 1, true) ~= nil)
local bCutting = ( sNotes:find( 'Cut', 1, true) ~= nil)
@@ -655,6 +674,14 @@ function SpecApplyPath( bPreSplit, bSplitting, bPreCut, bCutting, bUnload)
-- Verifico se lavorazione pareti
local bWall = ( EgtGetInfo( EgtGetCurrMachGroup() or GDB_ID.NULL, 'Wall', 'd') == 1)
-- mi salvo info lavorazione su una lista
local AuxInfoMach = {}
AuxInfoMach.bPreSplit = bPreSplit
AuxInfoMach.bSplitting = bSplitting
AuxInfoMach.bPreCut = bPreCut
AuxInfoMach.bCutting = bCutting
AuxInfoMach.bUnload = bUnload
-- Assegno flag di pezzo separato dal resto del grezzo
SPLIT = IsEndPhase( EMC.PHASE)
@@ -741,7 +768,7 @@ function SpecApplyPath( bPreSplit, bSplitting, bPreCut, bCutting, bUnload)
local dPosT = LoadT
local vCmd = SpecCalcLoad( dPosT, dDistFront, max( dDistBack, MinJoin, EMC.LB - ( MaxY1 - MinY1) + 6))
EMC.LOAD = true
local vCmd2 = SpecCalcCarriages( dDistFront, dDistBack, dRollFront, dRollBack, dY1DeltaMaxSP, dY2DeltaMinUL, nChar)
local vCmd2 = SpecCalcCarriages( dDistFront, dDistBack, dRollFront, dRollBack, dY1DeltaMaxSP, dY2DeltaMinUL, nChar, AuxInfoMach)
EMC.LOAD = nil
if bSplitting and EMC.ERR == 18 then
table.insert( vCmd, { 22, dRollBack, -dRollFront})
@@ -754,7 +781,7 @@ function SpecApplyPath( bPreSplit, bSplitting, bPreCut, bCutting, bUnload)
-- Se altrimenti non eseguito SPLIT, eseguo calcoli per carrelli
elseif not SPLIT then
local vCmd = SpecCalcCarriages( dDistFront, dDistBack, dRollFront, dRollBack, dY1DeltaMaxSP, dY2DeltaMinUL, nChar)
local vCmd = SpecCalcCarriages( dDistFront, dDistBack, dRollFront, dRollBack, dY1DeltaMaxSP, dY2DeltaMinUL, nChar, AuxInfoMach)
-- Se non ci sono spostamenti, confermo i parametri di aggancio e di posizione roller
if SpecTestOnlyRemarkInCmds( vCmd) then
table.insert( vCmd, { 21, EgtIf( EMC.Y1DELTA, EMC.Y1DELTA, 0), EgtIf( EMC.Y2DELTA, EMC.Y2DELTA, 0)})
@@ -883,7 +910,7 @@ function SpecialCalcMachiningEncumbrance( nMchId, bPreCut)
EgtSetAxisPos( 'A2', vAxMid[6])
end
b3Enc = EgtGetBBoxGlob( EgtGetAxisId( 'C2'), GDB_BB.ONLY_VISIBLE)
else -- 'H31'
else -- testa 3
EgtSetAxisPos( 'C3', vAxMid[4])
EgtSetAxisPos( 'B3', vAxMid[5])
b3Enc = EgtGetBBoxGlob( EgtGetAxisId( 'C3'), GDB_BB.ONLY_VISIBLE)
@@ -991,7 +1018,11 @@ function SpecCalcLoad( dPosT, dDistFront, dDistBack)
local dNewY1min = max( EMC.LB - dDistBack, MinOther + AggLoad + EMC.HCING + EMC.HOVM)
local dNewY1max = min( ( MaxY1 - MinY1) - 5, EMC.LB - MinJoin)
if dNewY1min > dNewY1max then return nil end
local dNewY1Delta = EgtClamp( BD.CHAR_LOAD_DIST or 3000, 0.75 * dNewY1min + 0.25 * dNewY1max, 0.25 * dNewY1min + 0.75 * dNewY1max)
-- minimo posizionamento pinza 1 per permettere scarico del restante
local dMinLengthRestToUnload = abs( MinY1) + abs( MinV1) + abs( MaxV2) + abs( MaxY2) + MinJoin + AggLoad + EMC.LT + 10
-- calcolo posizionamento con i coefficienti, ma verifico che sia tra il minimo e il massimo pinzabile
local dNewY1DeltaMax = EgtClamp( 0.25 * dNewY1min + 0.75 * dNewY1max, dMinLengthRestToUnload, dNewY1max)
local dNewY1Delta = EgtClamp( BD.CHAR_LOAD_DIST or 3000, 0.75 * dNewY1min + 0.25 * dNewY1max, dNewY1DeltaMax)
local dNewY2Delta = nil
local dNewY1 = dPosT + dNewY1Delta
local vCmd = {}
@@ -1035,7 +1066,7 @@ function SpecCalcLoad( dPosT, dDistFront, dDistBack)
end -- SpecAdjustLoad [L]
---------------------------------------------------------------------
function SpecCalcCarriages( dDistFront, dDistBack, dRollFront, dRollBack, dY1DeltaMaxSP, dY2DeltaMinUL, nChar)
function SpecCalcCarriages( dDistFront, dDistBack, dRollFront, dRollBack, dY1DeltaMaxSP, dY2DeltaMinUL, nChar, AuxInfoMach)
local MinFrontJoin = MinJoin + EMC.HCING + EMC.HOVM
local MyMinOther = MinOther + EgtIf( EMC.CNT == 1, AggLoad, 0)
@@ -1069,11 +1100,19 @@ function SpecCalcCarriages( dDistFront, dDistBack, dRollFront, dRollBack, dY1Del
WorkTab.dY1DeltaMaxF = min( EMC.LB - MinJoin, MaxY1 + dDistFront + dRollFront + AGG_V)
WorkTab.dY2DeltaMinF = nil
WorkTab.dY2DeltaMaxF = nil
if dY1DeltaMaxSP then WorkTab.dY1DeltaMaxF = min( WorkTab.dY1DeltaMaxF, dY1DeltaMaxSP) end
WorkTab.dV1PosF = dRollBack
WorkTab.bV1CloseF = false
WorkTab.dV2PosF = -dRollFront
WorkTab.bV2CloseF = false
-- dopo che si è calcolato il minimo e massimo dell'intervallo, verifico che in testa rimanga almeno il minimo per poter fare passaggio pinze e scaricare
if AuxInfoMach and ( AuxInfoMach.bSplitting or AuxInfoMach.bCutting) then
if WorkTab.dY1DeltaMaxF - WorkTab.dY1DeltaMinF > 1.5 * BD.CHAR_EXTRA_DIST and WorkTab.dY1DeltaMaxF > EMC.LT + BD.MINRAW_S + BD.CHAR_EXTRA_DIST then
WorkTab.dY1DeltaMinF = max( min( EMC.LT + BD.MINRAW_S, WorkTab.dY1DeltaMaxF - 1), WorkTab.dY1DeltaMinF)
end
end
-- verifico validità intervallo ammesso per Y1
if WorkTab.dY1DeltaMinF > WorkTab.dY1DeltaMaxF + 10 * GEO.EPS_SMALL then
EMC.ERR = 18
@@ -1110,6 +1149,13 @@ function SpecCalcCarriages( dDistFront, dDistBack, dRollFront, dRollBack, dY1Del
WorkTab.dV2PosF = -dRollFront
WorkTab.bV2CloseF = false
-- dopo che si è calcolato il minimo e massimo dell'intervallo, verifico che in testa rimanga almeno il minimo per poter fare passaggio pinze e scaricare
if AuxInfoMach and ( AuxInfoMach.bSplitting or AuxInfoMach.bCutting) then
if WorkTab.dY1DeltaMaxF - WorkTab.dY1DeltaMinF > 1.5 * BD.CHAR_EXTRA_DIST and WorkTab.dY1DeltaMaxF > EMC.LT + BD.MINRAW_S + BD.CHAR_EXTRA_DIST then
WorkTab.dY1DeltaMinF = max( min( EMC.LT + BD.MINRAW_S, WorkTab.dY1DeltaMaxF - 1), WorkTab.dY1DeltaMinF)
end
end
-- verifico validità intervallo ammesso per Y1
if WorkTab.dY1DeltaMinF > WorkTab.dY1DeltaMaxF + 10 * GEO.EPS_SMALL then
EMC.ERR = 18
@@ -1255,8 +1301,11 @@ function SpecCalcUnload()
EgtOutLog( ' *[U1]', 1)
end
local vCmd = {}
-- Tipo di scarico
local bStdUl = ( not MaxUnloadLen or MaxUnloadLen < 1 or EMC.LB - EMC.HOVM < MaxUnloadLen + 1)
-- Commento
table.insert( vCmd, { 0, 'Unloading'})
table.insert( vCmd, { 0, 'Unloading', EgtIf( bStdUl, 'Unloading', 'Manual Unloading')})
-- posizionamento sicuro teste e rulli (non serve ?)
--table.insert( vCmd, { 4, 0})
-- Se pinza Y chiusa, la apro
@@ -1264,11 +1313,15 @@ function SpecCalcUnload()
table.insert( vCmd, { 11, 0})
EMC.CNT = nil
end
-- Sposto il pezzo in posizione di scarico
local dFinT = EgtIf( EMC.LB < MaxLenSmT, UnloadSmT, UnloadT) - EMC.LB
local dFinY2 = dFinT + EMC.Y2DELTA
table.insert( vCmd, { 2, 'T', dFinT, 'Y2', dFinY2})
EgtOutLog( ' Y2PosF=' .. EgtNumToString( dFinY2), 1)
-- Se non supero la lunghezza massima di scarico, sposto il pezzo in posizione di scarico
if bStdUl then
local dFinT = EgtIf( EMC.LB < MaxLenSmT, UnloadSmT, UnloadT) - EMC.LB
local dFinY2 = dFinT + EMC.Y2DELTA
table.insert( vCmd, { 2, 'T', dFinT, 'Y2', dFinY2})
EgtOutLog( ' Y2PosF=' .. EgtNumToString( dFinY2), 1)
else
table.insert( vCmd, { 1, 'Y2', MaxY2})
end
-- apro la morsa
table.insert( vCmd, { 12, 0})
-- riporto il carrello in home
@@ -1988,7 +2041,7 @@ local function PosY2Y1B( TabI, vCmd)
if TabI.dY2PosI > MinY2 and
TabI.dY2PosI > TabI.dTPosI + MinJoin + EMC.HOVM + EMC.HCING - 10 * GEO.EPS_SMALL then
-- allontanamento morse, trascinamento trave con Y2
MaxDispl( TabI, vCmd, 'M2')
MaxDispl( TabI, vCmd, 'M2')
else
-- accentramento morse, trascinamento trave con Y1
MaxDispl( TabI, vCmd, 'M3')
+164 -1
View File
@@ -1,9 +1,172 @@
==== Common_PF1250 Update Log ====
Versione 2.7h2 (21/08/2025)
- (GEN) Se la testa rimane bassa, corretto caso di reset del piano generico a fine lavorazione
- (GEN) Corretto movimento in Z massima dopo scarico pezzo
Versione 2.7h1 (20/08/2025)
- (GEN) Per posizione T111 e T121, se non è presente asse rotante per presa aggregato (es. se si mette una fresa normale) viene settato a zero.
- (MLDE-SIM) Aggiunta variabile FACOLTATIVA 'EstimationRapidMultiplier' in mlde per regolare il tempo stimato di rapido su macchine vecchie. Se non presente default 1.
Versione 2.7g1 (01/07/2025)
- (GEN) Lettura parametri accelerazioni da TS3. Ticket#2052
- (SIM-GEN) Aggiunta gestione massima lunghezza scarico
Versione 2.7d2 (24/04/2025)
- (SIM) Modifica qualità VMILL. Da ora si può impostare da impostazioni CAM5
Versione 2.7d1 (01/04/2025)
- (GEN) Aggiunta commenti HEADER e FOOTER per comunicazione con linea o altre macchine, da parte di Essetre.
Versione 2.7b5 (26/02/2025)
- (MLDE-GEN) Gestione lettura feed massima pinze da Ts3.
Versione 2.7b4 (21/02/2025)
- (SIM-GEN) Ripristinato comportamento precedente calcolo posizione dei rulli di pinzaggio fatto con 2.7b2.
- (MLDE-SIM) Gestione aggregato flottante. Serve modifica MLDE. Ticket#2297
Versione 2.7b3 (06/02/2025)
- (SIM) Dopo aver scaricato utensile, si setta nota "HIDDEN" per dichiarare utensile non più sulla testa e non considerare le collisioni.
Versione 2.7b2 (04/02/2025)
- (SIM-GEN) Piccola modifica nel calcolo posizione dei rulli di pinzaggio.
Versione 2.7b1 (03/02/2025)
- (SIM) Corretta simulazione che non mandava testa in home in caso di utensile lungo. Generazione era già ok. Ticket#2280
Versione 2.7a2 (28/01/2025)
- (SIM-GEN) In MLSE aggiunta piccola correzione quota Z in caso di direzione Z tra 0.5 e 0.707.
Versione 2.7a1 (17/01/2025)
- (GEN) Piccola correzione posizione X in preselezione utensile
- (GEN) Corretto primo punto X preselezione utensile. Ticket#2183 e #2250
Versione 2.6l7 (19/12/2024)
- (SIM) HOTFIX : corretto posizione Z zero alla selezione dell'utensile in caso di motosega. Ticket#2235
Versione 2.6l6 (18/12/2024)
- (MLDE-SIM-GEN) Aggiunta variabile 'SafeX2RotAxis' in sostituzione della 'ParkMchY2' che era usata impropriamente
Versione 2.6l5 (17/12/2024)
- (SIM) Corretta posizione iniziale testa 2. Ticket#2228
Versione 2.6l4 (16/12/2024)
- (SIM-GEN) In MLSE ripristinati vecchi valori indici calcolo Z massima. In alcuni casi peggioravano la situazione.
Versione 2.6l3 (16/12/2024)
- (SIM) Corretto scarico utensile se aggregato. Se non presente utensile di default, non seleziona nulla.
- (SIM-GEN) In MLSE ritoccati indici calcolo Z massima. Ticket#2210
Versione 2.6l2 (13/12/2024)
- (SIM) Corretta chiamata calcolo asse virtuale
Versione 2.6l1 (13/12/2024)
- (SIM) Gestione caricamento utensili in caso di testa con uscita multipla.
- (SIM) Corretto errore di collisione per errata simulazione cambio utensile da lama a motosega.
- (SIM-GEN) Corretta gestione in caso di prima lavorazione con motosega.
- (GEN) Non si fa preselezione della testa 3
- (GEN) Corretta emissione coordinata rotazione testa 3 in zona sicura
- (SIM-GEN) A fine barra, testa 3 sempre in home
- (GEN) Controllo esistenza terzo asse ausiliario
- (GEN) Corretto primo movimento in X quando si parte con testa 3. Ticket#2216
- (GEN) Se su testa 1 c'è un aggregato e si utilizzerà la testa 3, si scarica aggregato e si prende utensile di default. Ticket#2222
- (GEN) Durante utilizzo della testa 3, non si preselezionano altre teste. Ticket#2220
- (SIM-GEN) Se lavorazione con testa dedicata lama e su testa 1 c'era aggregato, viene scaricato. Ticket#2216
Versione 2.6k3 (26/11/2024)
- (GEN) Corretta modifica fatta in versione 2.6k2. Ticket#2183
Versione 2.6k2 (25/11/2024)
- (GEN) Se si preseleziona su testa 1 un utensile lungo, non si va alla X successiva di lavoro ma si resta in home. Infatti potrebbe toccare le paratie in caso di scambio pezzo. Ticket#2183
Versione 2.6k1 (04/11/2024)
- (SIM-GEN) Gestione terza testa 5 assi dedicata lama (H38)
Versione 2.6j3 (25/10/2024)
- (GEN) Piccola correzione per capire se testa 3 presente
- (SIM-GEN) In caso di lavorazione successiva alla prima, rivisto primo posizionamento alla quota Z di lavoro se precedentemente spostati a quota rotazione assi rotanti.
Versione 2.6j2 (23/10/2024)
- (MLDE-SIM) Aggiunto parametro ParkTc1X1 in MLDE per simulazione quota parcheggio Testa 1 su TC1.
- (SIM-GEN) Per movimento a ZMAX si considera utensile attuale o precedente
- (SIM-GEN) Prima versione con gestione testa 3 dedicata lama
Versione 2.6j1 (01/10/2024)
- (GEN) Migliorato calcolo chiusura paratia rulli con aggiornamento lunghezza della barra in caso di ultimo taglio e grezzo residuo in coda. Ticket#2017
- (NGE-SIM) Aggiunta gestione solidi collisione per TC verticali e TC rotante sotto
- (GEN) Per lavorazione in doppio: messaggio bloccante in caso di extra-corsa durante un movimento standard su piano generico della lavorazione.
Versione 2.6i1 (10/09/2024)
- (GEN) Se diametro utensile più del truciolatore standard grande, non si preseleziona. Ticket#2028
Versione 2.6h2 (28/08/2024)
- (SIM-GEN) Quando si aprono i rulli, se la trave non può seguire i rulli perchè la pinza andrebbe in extra-corsa, si sposta comunque la pinza fino al massimo della sua corsa. Ticket#1949
- (GEN) La testa veniva spostata a quota X sicurezza rotazione assi rotanti prima di aprire le rulliere. Ticket#1991
Versione 2.6h1 (07/08/2024)
- (GEN) Gestione creazione piano generico in caso il primo movimento della lavorazione sia un arco. Ticket#1891
- (SIM-GEN) Migliorata gestione riposizionamenti fatta con la 2.6g1. Ticket#1836
- (MLDE-SIM-GEN) Rinominato file da "Common-" a "Common_" per uniformità con i file common delle altre macchine. Serve modifica a MLDE macchina.
Versione 2.6g5 (24/07/2024)
- (SIM) Per OnSetHead chiamata da simulazione, aggiunta lettura TOTDIAM. Serve per limitare corse assi testa sotto. Ticket#1946
Versione 2.6g4 (23/07/2024)
- (SIM) Corretta ultima modifica per controllo collisioni testa non utilizzata. Trovava collisioni in lavorazioni in doppio.
Versione 2.6g3 (22/07/2024)
- (SIM) Si aggiunge al controllo collisioni anche Tool e ToolHolder della testa non utilizzata. Ticket#1937
- (SIM-GEN) In caso di grezzo piuttosto piccolo, concesso pinzaggio fino al massimo possibile, oltre al calcolo con coefficienti. Ticket#1942
Versione 2.6g2 (12/07/2024)
- (SIM-GEN) Corretto movimento testa sotto che andava in collisione tra una lavorazione e la successiva se tra le due c'era un riposizionamento pinze. Ticket#1925
Versione 2.6g1 (08/07/2024)
- (SIM-GEN) Corretto movimento che pinzava nel vuoto durante riposizionamento. Ticket#1836
Versione 2.6f2 (06/06/2024)
- (GEN) Quando si va a ZMAX, si azzerano tutte le coordinate ".pp". Scriveva una Z bassa quando era a Z massima. Ticket#1839
Versione 2.6f1 (03/06/2024)
- (SIM-GEN) Migliorata gestione approccio al pezzo con lama aggregato da sotto. Va al minimo in X solo se necessario.
Versione 2.6e6 (28/05/2024)
- (GEN) Aggiunta possibilità di scrivere nome utensile doppio anche in lavorazione con parametro "TOOLDOUBLE". Note sulla lavorazione hanno precedenza su note utensile.
- (GEN) Ripristinato controllo extra-corsa per testa 2 in caso di lavorazioni in doppio in Y (si era perso in un vecchio commit)
- (SIM-GEN) Corretto movimento testa sotto su prima lavorazione. Ruotava a parcheggio invece di andare a quota sicurezza rotazione assi.
Versione 2.6e5 (23/05/2024)
- (GEN) Controllo extra-corsa per testa 2 in caso di lavorazioni in doppio in Y
- (GEN) Corretta lettura e salvataggio coordinala asse L2 con coordinate rispetto origine. Prima erano locali e sbagliava alcuni calcoli
- (SIM-GEN) Se lavorazione con testa 2 e stesso utensile, piccola correzione che manda a parcheggio se cambiano assi rotanti solo se si trova a ZMAX
Versione 2.6e4 (15/05/2024)
- (SIM-GEN) Miglioramento gestione lama su aggregato da sotto
Versione 2.6e3 (09/05/2024)
- (SIM) Corretto prelievo lama 2 (H16). Prima di visualizzare utensile, si sposta la Z alla quota massima. Prima trovava collisione in caso utensile precedente non lama (perchè era già oltre la quota massima).
Versione 2.6e2 (06/05/2024)
- (GEN) In parcheggio paratie/pinze, viene considerato sovramateriale di testa. Simulazione era corretta. Ticket#1789
Versione 2.6e1 (30/04/2024)
- (SIM-GEN) Per macchina a 3 teste, ripristinato posizionamento testa 2 tramite parametro ParkInLavZ2. La gestione era stata persa dal common.
- (MLDE-GEN) Gestione facoltativa parametro WOOD_DENSITY settabile in Ts3. In MLDE, mettere il valore di WOOD_DENSITY nella nostra variabile 'WoodDensity'.
Versione 2.6d2 (23/04/2024)
- (MLDE-GEN) Aggiunto parametro 'IS_TEST_MACHINE' FACOLTATIVO. Se non esiste o 'false' è macchina standard, se 'true' è una macchina utilizzata per i test Egalware interni
- (GEN) Chiamando la macchina con un nome che termini con '.TEST' si abilita come macchina per test interni, equivalente a settare 'IS_TEST_MACHINE' (che comunque rimane)
- (SIM-GEN) Modificato movimenti testa sotto. Prima si muove in quota 'ParkMchY2' e poi va alla coordinata di lavoro ruotando gli assi
- (SIM) Per lavorazioni in doppio, viene subito scritta la quota Z. La generazione era già corretta. Ticket#1377
- (GEN) Ripristinato movimento iniziale testa sopra assieme alle pinze. Spostato comando wait dopo primo movimento testa. Ticket#1730
- (MLDE-SIM-GEN) Aggiunto parametro MaxZ1Blade per differenziare Z massima aggregato lama e altri utensili.
- (SIM) Aggiunto controllo con solido di collisione per verificare di non salire oltre il massimo
- (SIM) Corretta simulazione scambio testa 3 -> testa 1
Versione 2.6d1 (09/04/2024)
- (GEN) Corretto impostazione piano G24 con testa da sotto con aggregato
- (SIM-GEN) Corretta posizione prelievo/parcheggio se lama su aggregato da sotto
- (MLDE-SIM-GEN) Aggiunta variabile FACOLTATIVA 'ForceToCloseRollersGate' ( che legge la variabile da TS3 'CHIUDI_RULLI_SCAMBIO') in mlde per forzare chiusura paratie rulli
- (MLDE-SIM-GEN) Aggiunta variabile FACOLTATIVA 'ForceToCloseRollersGate' ( che legge la variabile da TS3 'CHIUDI_PINZE_2_3_SCAMBIO') in mlde per forzare chiusura paratie rulli
durante scambio pinze per facilitare passaggio pezzi molto storti. Se non presente chiude solo se necessario.
- (GEN) Corretta scrittura lista utensili iniziale M992 per doppia motosega e aggregato lama sotto
- (SIM-GEN) Corretto movimento punte lunghe
+1 -1
View File
@@ -3,7 +3,7 @@
local InfoCommon_STD_PP = {
NAME = 'Common_PF1250', -- nome script PP standard
VERSION = '2.6d1', -- versione script
VERSION = '2.7h2', -- versione script
MIN_MACH_VER_PP_COMMON = '2.5k1' -- versione minima kernel
}