Compare commits

...

238 Commits

Author SHA1 Message Date
daniele.nicoli d8cd917aaf Merge remote-tracking branch 'origin/master' into develop 2026-04-24 11:30:18 +02:00
andrea.villa ba63901305 Allineamento con common ver. 3.1d2 2026-04-22 16:29:17 +02:00
daniele.nicoli 507e75121f Merge branch 'master' into develop 2026-04-22 13:08:39 +02:00
andrea.villa 6d937b7e88 Allineamento a common ver. 3.1d1 2026-04-14 15:15:46 +02:00
andrea.villa 656982ca9c Allineamento con common ver. 3.1c2 2026-03-30 18:33:39 +02:00
andrea.villa d3c62ee5a9 Merge branch 'develop' 2026-03-27 15:24:52 +01:00
andrea.villa 89e2c495d1 Allineamento con common ver. 3.1c1
Cambio versione per rilascio a cliente
2026-03-27 15:24:34 +01:00
andrea.villa a58ed6015f Merge branch 'NewClampRepos' into develop 2026-03-27 14:44:40 +01:00
andrea.villa f4f94827d5 Modifiche a funzione riposizionemanto carrelli 2026-03-27 14:43:32 +01:00
daniele.nicoli 948df5b056 Aggiunta funzione calcolo Home C per ChainSaw da valore A. Funziona con Common post 26/03/2026. Ticket#2866 2026-03-26 15:35:54 +01:00
daniele.nicoli 16510ed17f Merge branch 'master' into develop 2026-03-26 15:33:18 +01:00
andrea.villa 27bb16b3b7 Cambio nome variabili, per essere più chiaro quale è riferita alla paratia lato carico e quale allo scarico 2026-03-16 12:44:33 +01:00
andrea.villa 43166831e8 Merge branch 'develop' 2026-03-16 12:20:02 +01:00
andrea.villa c509cefe08 - Cambio versione per rilascio a cliente
- Cambio nome per distanza di collisione con paratie cabina
2026-03-16 12:19:49 +01:00
daniele.nicoli c520f90a5b Spostamento della faccia interna dei solidi di collisione dell'interno della cabina impostando la distanza da centro mandrino a carter nel TS3Data, sempre in positivo. Ticket#2852 2026-03-10 11:47:18 +01:00
andrea.villa 35d573cc20 Aggiunto info "PreviewShow" per anteprima utensile/testa nel MACH 2026-03-06 15:15:53 +01:00
andrea.villa 69054d2c90 Merge branch 'master' into develop 2026-03-06 15:15:06 +01:00
andrea.villa cddc5abcc1 Aggiunto in BeamData il parametro MAX_ANGLE_DRILL_CUT 2026-03-05 08:44:06 +01:00
andrea.villa 0324b24222 - Nuova strategia di pinzaggio attivo di default
- modificato distanza per collisione carro C a 403mm
- Lunghezza utensile lungo impostata a 218.5
2026-02-23 08:20:05 +01:00
andrea.villa a845258a81 Cambio versione per rilascio a cliente 2026-02-06 13:31:27 +01:00
andrea.villa 5486fab487 Merge branch 'develop' 2026-02-06 13:30:47 +01:00
Dario Sassi d2f093772d MachNotes modificato per nuovi parametri lavorazioni 5 assi. 2026-01-29 18:25:01 +01:00
daniele.nicoli a362c59c6f corretta visualizzazione elementi nel file nge 2026-01-28 08:59:49 +01:00
daniele.nicoli 69de0b9cc5 - Mosso nell' .nge il solido di collisione tra utensile e asse C superiore per essere portato al livello del solido reale.
- Implementati nell' .mlde un nuovo parametro (DistRotCenterBToTopC), reso impostabile LONG_TOOL_MINLEN e il movimento del solido di collisione sopracitato e della faccia della flangia dell'asse C superiore per regolare l'ingombro per ogni macchina. I parametri sono impostabili da Ts3Data.lua.
2026-01-27 17:09:17 +01:00
daniele.nicoli dc14d46bbc Merge branch 'master' into develop 2026-01-27 09:41:49 +01:00
andrea.villa c4270df480 Allineamento a common ver. 3.1a2 2026-01-26 15:57:20 +01:00
andrea.villa 096d04f640 - Nome macchina ricavato con funzione EGT dedicata
- HOTFIX: DeltaTol spostato in MLDE
2026-01-08 12:36:07 +01:00
andrea.villa 2d8d5a38a6 Merge branch 'develop' 2026-01-08 08:47:57 +01:00
andrea.villa 4fcf50951b Allineamento a common ver. 3.1a1 2026-01-08 08:47:48 +01:00
daniele.nicoli 4b2827f2cd Merge branch 'master' into develop 2026-01-07 10:44:33 +01:00
andrea.villa 29dddf0d52 Rimosse funzioni riportare da PF1250 2025-12-23 08:16:22 +01:00
andrea.villa 45148ee0c5 Merge remote-tracking branch 'origin/develop' 2025-12-22 10:10:01 +01:00
andrea.villa bc7fa48823 Cambio versione per rilascio a cliente 2025-12-22 10:09:22 +01:00
andrea.villa 05ebbc9221 Merge branch 'CheckPinzaggioVMILL' into develop 2025-12-22 10:08:42 +01:00
andrea.villa ae772c6f74 Allineamento con common ver. 2.7l3 2025-12-22 10:08:25 +01:00
daniele.nicoli 164ad6fca4 - Eliminata MinJoin
- Utilizzata al suo posto funzione già esistente UpdateMinJoin
- Spostata in mlde assieme alle sue variabili che diventano globali
- Modificata formula calcolo Area minima
2025-12-19 12:00:49 +01:00
daniele.nicoli a97c8673f4 Versione con aggiornamento di test a Common.mlpe:
- mlpe, aggiunta funzione ClampCheck e tutto quello che serve per farla funzionare
- BeamData, aggiunta funzione MinJoin e quello che serve per farla funzionare
- nge, aggiunta geometria
- mlde, aggiunte variabili, geometria e spostamento. Il coefficente è impostato a nil e modificabile da TS3Data.
2025-12-12 13:28:27 +01:00
andrea.villa a909f2460c Corretto disegno porta utensile 2025-12-11 09:05:30 +01:00
daniele.nicoli ff8044959a Merge branch 'master' into develop 2025-12-10 14:40:27 +01:00
andrea.villa 4454b1f069 Aggiunto tipo di lavorazione con aggregato flottante 2025-12-10 12:18:12 +01:00
andrea.villa 00b67bd918 - Allineamento a common ver. 2.7l1
- Nuovo porta-utensile
2025-12-10 09:58:32 +01:00
luca.mazzoleni b00d600839 - corrette versioni common (erroneamente modificata) e macchina 2025-12-04 11:54:02 +01:00
luca.mazzoleni aad4c3cfd7 - aggiunto BeamDataNew per nuovo automatismo (temporaneo) 2025-12-04 11:52:08 +01:00
luca.mazzoleni c26ba36f6d - in BeamData modificata GetCollisionData per nuovo automatismo 2025-12-02 13:10:41 +01:00
luca.mazzoleni ba2f6b46f3 update versione 2025-11-28 12:50:05 +01:00
luca.mazzoleni bc541ddd24 Merge branch 'master' of https://gitlab.steamware.net/egalware-machines/essetre/Essetre-FAST 2025-11-28 12:48:00 +01:00
luca.mazzoleni a64e4bd840 - in BeamData aggiunte per precollisione nuovo automatismo 2025-11-28 12:47:55 +01:00
andrea.villa 30b8fc08bd Solido di collisione asse C spostato 3mm più in alto perchè con lama diametro 621mm ci passava talmente vicino che dava errore. 2025-11-20 14:53:18 +01:00
andrea.villa bbfff9f9c2 Allineamento con common per modifica a calcolo stima tempi, da testare 2025-11-19 16:42:22 +01:00
andrea.villa 12ffc06055 Merge remote-tracking branch 'origin/master' into develop 2025-11-19 16:39:25 +01:00
andrea.villa 34f5f655d1 In NGE mancava manina portautensile in posizione T11 quando c'era aggregato BH 2025-11-18 16:07:09 +01:00
andrea.villa e08d54b436 Merge branch 'develop' 2025-11-18 15:53:52 +01:00
andrea.villa e2bf7b4cd1 Cambio versione per rilascio a Essetre dopo aggiunta gestione aggregato a T 2025-11-18 15:53:24 +01:00
andrea.villa 7d5eb3ab3e Merge branch 'AggreT_TC2' into develop 2025-11-18 15:52:25 +01:00
andrea.villa 74a79b9767 Corretto tipo dato in MachNotes e ToolNotes 2025-11-14 12:05:52 +01:00
daniele.nicoli d82e8876d0 Aggiunta gestione CUT_SIC impostabile da TS3Data.lua 2025-11-13 10:28:36 +01:00
Daniele Nicoli bea64cd05f Merge branch 'master' into develop 2025-11-13 09:40:28 +01:00
andrea.villa 0ebd4ca860 Aggiornati tipi dai parametri settabili nei TOOLS 2025-11-12 10:45:38 +01:00
andrea.villa 36d6ad355f Aggiunto caricamento Aggregato a T in caso di presenza secondo magazzino verticale. 2025-11-12 10:36:05 +01:00
andrea.villa eac1d9b636 Merge branch 'master' of https://gitlab.steamware.net/egalware-machines/essetre/Essetre-FAST 2025-11-12 09:42:23 +01:00
andrea.villa e38c1d5c02 Merge branch 'NewTopColl' 2025-11-12 09:39:23 +01:00
luca.mazzoleni ca08fa89b3 - in BeamData update GetMinNzTopHead 2025-11-11 11:11:49 +01:00
andrea.villa 61b81d07e0 Allineamento a common ver. 2.7k1 2025-11-10 16:17:33 +01:00
luca.mazzoleni 7c32cf62c7 - migliorata GetMinNzDownUp in BeamData 2025-10-16 18:52:37 +02:00
andrea.villa 9af3f82691 Aggiornato .gitIgnore 2025-10-14 11:51:02 +02:00
andrea.villa 87b6fad2d9 Aggiornata versione macchina 2025-10-08 16:12:47 +02:00
andrea.villa ea0abe4368 Allineamento con common ver. 2.7j2 2025-10-08 16:12:25 +02:00
andrea.villa eca719326b Allineamento con common ver. 2.7j1 2025-10-06 15:58:47 +02:00
andrea.villa 39d4b1053f Controllo collisione tra utensile e TOP testa C. Rilasciare dopo che è stata pubblicata nuova versioen CAM5 27j1 2025-09-25 12:31:50 +02:00
andrea.villa 898df3626f Aggiunta lettura parametro MAX_HEIGHT_ROT_B_ABOVE da TS3 2025-09-23 14:39:58 +02:00
andrea.villa 7caf93246b Allineamento con common ver. 2.7i3 2025-09-23 11:31:12 +02:00
andrea.villa 110b9f66cf Allineamento con common ver. 2.7i2 2025-09-17 09:23:46 +02:00
andrea.villa 8fd55f9c29 Cambio versione macchina 2025-09-08 08:47:22 +02:00
andrea.villa e6e1863ed9 Merge branch 'master' of https://gitlab.steamware.net/egalware-machines/essetre/Essetre-FAST 2025-09-08 08:46:57 +02:00
andrea.villa 4ae1f93e9e - Allineamento con common ver. 2.7i1
- Aggiunto tipo di alvorazione per automatismo
2025-09-08 08:46:53 +02:00
luca.mazzoleni 1260407fec - update versione 2025-07-14 10:24:31 +02:00
luca.mazzoleni 6cabd0eb44 Merge branch 'master' of https://gitlab.steamware.net/egalware-machines/essetre/Essetre-FAST 2025-07-14 10:23:24 +02:00
luca.mazzoleni 8561a31e3e - in BeamData migliorata GetMinNzDownUp 2025-07-14 10:22:36 +02:00
andrea.villa ab037d28c2 Aggiunto lettura accelerazioni 2025-07-01 08:45:48 +02:00
andrea.villa 66070d5572 Allineamento a common ver. 2.7g1 2025-07-01 08:13:36 +02:00
andrea.villa 3ff5eff1c4 Allineamento con common ver. 2.7f3 2025-06-26 08:50:18 +02:00
andrea.villa 44c99bb9c0 Allineamento con common ver. 2.7f2 2025-06-19 16:51:11 +02:00
andrea.villa a20def92b8 Allineamento con common ver. 2.7f1 2025-06-18 17:57:48 +02:00
andrea.villa d53ee46d01 Allineamento con common ver. 2.7e1 2025-05-26 09:51:29 +02:00
andrea.villa a4428dfc7e Allineamento con common ver. 2.7d1 2025-04-14 08:44:43 +02:00
Dario Sassi dee48eaa84 Merge branch 'master' of https://gitlab.steamware.net/egalware-machines/Essetre/Essetre-FAST 2025-04-07 12:21:57 +02:00
Dario Sassi 0c98a3b342 Essetre-FAST :
- altre migliorie a configurazione Note Utente in Lavorazioni.
2025-04-07 12:21:25 +02:00
andrea.villa 4663adcc5c Merge branch 'master' of https://gitlab.steamware.net/egalware-machines/essetre/Essetre-FAST 2025-04-07 12:08:17 +02:00
andrea.villa dace2e7321 Aggiunto STRATEGIES_SCRIPT in BeamData 2025-04-07 12:08:12 +02:00
Dario Sassi c7c9d4be20 Essetre-FAST :
- sistemazione configurazione NoteUtente.
2025-04-07 12:05:32 +02:00
luca.mazzoleni 632c28c667 update versione in mlde 2025-04-02 15:14:04 +02:00
luca.mazzoleni feb0f12b61 Merge branch 'develop' 2025-04-02 15:08:43 +02:00
luca.mazzoleni e6fb6380cb - in BeamData modificata GetNzLimDownUp
- in MachData aggiunta MIN_JOIN_VV
2025-04-02 15:08:29 +02:00
andrea.villa f7c241163c Allineamento con common ver. 2.7c1
Aggiunte info per lavorazioni a 5 assi
2025-03-26 12:17:49 +01:00
luca.mazzoleni e42381e231 Merge branch 'develop' 2025-03-13 10:45:58 +01:00
luca.mazzoleni 5636d35be5 update versione 2025-03-13 10:45:29 +01:00
luca.mazzoleni 562416f232 Merge branch 'temp' into develop 2025-03-13 10:44:25 +01:00
luca.mazzoleni 5a584431cb Merge remote-tracking branch 'origin/master' into temp 2025-03-13 10:44:01 +01:00
luca.mazzoleni 07a004f18d - in BeamData aggiunti angoli limite per nuovo automatismo 2025-03-13 10:43:56 +01:00
andrea.villa c332eccef2 Cambio versione 2025-03-10 08:28:26 +01:00
andrea.villa cdcfb0b053 Aggiunto parametro MAX_DIM_HTCUT_HBEAM a BeamData 2025-03-10 08:27:58 +01:00
andrea.villa 09efa2d462 Merge branch 'master' of https://gitlab.steamware.net/egalware-machines/essetre/Essetre-FAST 2025-03-05 11:42:24 +01:00
andrea.villa 6a0d00e10b - in BeamData corretta GetChainsaWInitAngs. La funzione è adesso corretta, diversa dalla FASTrl. 2025-03-05 11:40:02 +01:00
luca.mazzoleni 4d773f5bfa - modificata GetSetupInfo 2025-02-28 09:21:59 +01:00
luca.mazzoleni cb0c293fd7 - in BeamData GetSetupInfo aggiornate informazioni teste 2025-02-25 17:48:20 +01:00
andrea.villa b4235bcc9b - Tolta vecchia testa H8
- Tolto chiamata debug
2025-02-20 17:03:24 +01:00
andrea.villa c5e0c1124d Merge remote-tracking branch 'origin/develop' 2025-02-20 16:46:32 +01:00
andrea.villa 52e9ec6286 Allineamento con common ver. 2.7b1 2025-02-20 16:46:20 +01:00
andrea.villa 36f393ab79 - in BeamData riportata GetChainsaWInitAngs a versione precedente 2025-02-20 15:39:00 +01:00
andrea.villa ad8091e168 Merge branch 'Modification_HCING-TCING' into develop 2025-02-20 12:21:03 +01:00
andrea.villa d738334a57 Tolto testa H8 (non più utilizzata) da script SetUp. 2025-02-03 10:17:53 +01:00
andrea.villa 3100e615f7 Cambio di versione per i test da parte di Essetre 2025-01-23 15:56:41 +01:00
andrea.villa a6d54ac40d Merge branch 'NewFloatingAggregate' into develop 2025-01-23 15:55:43 +01:00
andrea.villa 785e4490ea Gestione aggregato flottante completata 2025-01-23 15:52:58 +01:00
andrea.villa 3bf7c1587f Versione con gestione parametri HCING e TCING settabili su tutte le lavorazioni 2025-01-15 16:21:55 +01:00
andrea.villa 971fcc0c07 Cambio nome parametro creazione utensile 2025-01-14 09:50:49 +01:00
andrea.villa db7cb8c1b1 - Gestione HCING/TCING da riportare nei prossimi common
- Piccola modifica ad aggregato flottante
2025-01-14 08:49:32 +01:00
andrea.villa a71ba0ee9a Allineamento con common ver. 2.7a3 2025-01-08 16:03:21 +01:00
andrea.villa 7b2f9815d4 Allineamento con common ver. 2.7a2 2025-01-08 12:02:53 +01:00
andrea.villa 80fdaf23f4 Corretta simulazione del cambio utensile in caso di magazzino 2 2025-01-08 11:51:55 +01:00
andrea.villa b832df5767 Merge remote-tracking branch 'origin/master' into NewFloatingAggregate 2025-01-08 08:31:24 +01:00
andrea.villa 2b167ea927 Hotfix - Rimosso forzatura presenza aggregato per BlockHaus 2025-01-07 16:25:11 +01:00
andrea.villa deaac78103 Commit per cambio versione 2025-01-07 14:47:53 +01:00
andrea.villa 5f95d9821e Merge branch 'develop' 2025-01-07 14:47:06 +01:00
andrea.villa 8d7a29dd38 Allineamento con common ver. 2.7a1 2025-01-07 14:45:32 +01:00
andrea.villa 793fe00cc9 Prima versione aggregato flottante 2025-01-07 14:43:07 +01:00
Dario Sassi e3107c9c30 Essetre-FAST :
- piccola modifica a nuovo calcolo step per Vmill.
2024-12-30 13:28:34 +01:00
Dario Sassi 33e5254ba4 Essetre-FAST 2.6l2 :
- riportate modifiche per Vmill e lavorazioni 5assi.
2024-12-23 08:25:33 +01:00
andrea.villa 3aceb8783d Merge branch 'NewAggregateBlockHaus' into develop 2024-12-12 14:58:25 +01:00
andrea.villa dabb95858e Prima versione funzionante gestione aggregato tipo BlockHaus 2024-12-05 12:47:04 +01:00
andrea.villa 636ce9eb01 Allineamento con common ver. 2.6l1 2024-12-02 08:29:06 +01:00
andrea.villa 306bef076c Allineamento con common ver. 2.6k1 2024-11-12 08:26:27 +01:00
andrea.villa 9499cdb2c4 - Allineamento con Common ver. 2.6j10 2024-10-25 14:37:19 +02:00
andrea.villa a14a637ec1 - Allineamento con Common ver. 2.6j9 2024-10-22 11:21:41 +02:00
andrea.villa b1486a762e - Allineamento con Common ver. 2.6j8
- Aggiunto LEN_SHORT_PART tra i parametri configurabili da TS3
2024-10-21 08:46:47 +02:00
andrea.villa 0ce94917c4 Allineamento con Common ver. 2.6j7 2024-10-18 10:23:37 +02:00
andrea.villa 3149c70b9c Allineamento con common versione 2.6j6 2024-10-17 16:11:34 +02:00
andrea.villa 6ad6bc5e7f - Allineamento con common ver. 2.6j5
- Tolti i commenti iniziali da quando è stato creato progetto GIT
2024-10-17 09:38:44 +02:00
andrea.villa 3757642127 Aggiunta lettura alcune variabili impostabili da TS3 2024-10-15 10:28:14 +02:00
andrea.villa a133ab3514 - Allineamento con common ver. 2.6j4 2024-10-15 09:15:29 +02:00
andrea.villa 910ad63d34 - Allineamento con common ver. 2.6j3 2024-10-11 15:01:57 +02:00
luca.mazzoleni 3b7ac164a1 #critical# in BeamData corretta lettura ROT90 da TS3 2024-10-04 09:24:24 +02:00
andrea.villa daf84e06b3 - Allineamento con common ver. 2.6j2
- Aggiunta lettura parametro ROT90 da TS3 in BeamData
2024-10-03 10:32:37 +02:00
andrea.villa ff1c51f68b Aggiornamento versione 2024-10-01 08:16:51 +02:00
andrea.villa f164c8a046 Merge remote-tracking branch 'origin/develop' 2024-10-01 08:14:41 +02:00
andrea.villa d1f5219be9 Aggiornamento con common ver. 2.6j1 2024-10-01 08:14:27 +02:00
andrea.villa e08a18811f Piccola modifica nuovo pinzaggio 2024-09-26 18:07:03 +02:00
andrea.villa 758082ad22 Merge branch 'master' into develop 2024-09-25 13:24:50 +02:00
andrea.villa 745e6092b7 Merge remote-tracking branch 'origin/develop' 2024-09-25 13:24:44 +02:00
andrea.villa 10db138855 - Allineamento con common ver. 2.6i6 2024-09-25 13:24:28 +02:00
andrea.villa c2177f36bf Merge remote-tracking branch 'origin/master' into develop 2024-09-25 13:23:03 +02:00
luca.mazzoleni 76f6ed3346 update gitignore e YAML 2024-09-25 13:10:51 +02:00
andrea.villa a89bf46837 Cambio versione 2024-09-25 11:22:49 +02:00
andrea.villa 688ec6e221 Test miglioramento movimenti in sicurezza pezzi alti 2024-09-25 11:22:18 +02:00
andrea.villa 13a69fea58 Merge remote-tracking branch 'origin/master' into develop 2024-09-25 11:19:35 +02:00
andrea.villa 75355f60f1 - Allineamento con common ver. 2.6i5
- Aggiunta parametri NEWCLAMPING, FASTCLAMPING e GAIN_RECLAMPING
2024-09-24 17:44:17 +02:00
luca.mazzoleni 7922a3bb17 update gitignore e YAML 2024-09-24 13:08:11 +02:00
luca.mazzoleni 46665cf1fc modificato YAML 2024-09-24 11:17:47 +02:00
andrea.villa f50132446b - Allineamento con common ver. 2.6i3 2024-09-23 12:58:32 +02:00
luca.mazzoleni be5d362383 update YAML per cambio percorsi 2024-09-23 11:41:53 +02:00
luca.mazzoleni 2acf712f28 - in YAML PP_VER e PP_NVER si cercano solo all'inizio della riga 2024-09-18 14:41:17 +02:00
luca.mazzoleni c7e7afd93a - YAML mofiche per calcolo versione numerica 2024-09-18 14:37:30 +02:00
luca.mazzoleni 6cf09ac6a5 - YAML modifiche per calcolo versione numerica 2024-09-18 14:34:26 +02:00
luca.mazzoleni 6a68e0484a - Modificato YAML per comunicazione versioni a LiMan.
- Aggiunta PP_NVER, versione macchina in formato numerico.
2024-09-18 12:59:46 +02:00
andrea.villa 37952d64d4 - Allineamento con common ver. 2.6i2 2024-09-16 10:42:36 +02:00
luca.mazzoleni ab82e63af3 In BeamData aggiunte costanti MIN_HEIGHT_ADDED_CUTS, PRECUT_HEAD, PRECUT_TAIL, configurabili da offsets Ts3v7 2024-09-06 10:06:32 +02:00
luca.mazzoleni ed92ae901e In BeamData aggiunte costanti MIN_HEIGHT_ADDED_CUTS, PRECUT_HEAD, PRECUT_TAIL 2024-09-05 12:23:39 +02:00
andrea.villa a3c8c97c56 - Corretto file YML per compilare file "Common_"
- Aggiunta file note utensili e lavorazioni
2024-09-02 14:52:53 +02:00
andrea.villa 0a792883ad - Allineamento con common ver. 2.6i1, Rimossi file "Common-" 2024-09-02 10:01:05 +02:00
luca.mazzoleni 548fdb7647 update versione 2024-07-04 15:20:43 +02:00
luca.mazzoleni 54b3402785 - aggiunto NestingData.ini per magazzino online travi
- in MachData.ini aggiunto MIN_JOIN_SS
2024-07-04 15:18:14 +02:00
andrea.villa cca7f64f51 Merge branch 'develop' 2024-07-03 10:09:32 +02:00
andrea.villa 391e33d176 Commit per versione 2024-07-03 10:09:22 +02:00
andrea.villa 5aae40068c Per controllo NUM, se arco maggiore di 99999mm, si approssima con una retta. IN TEST 2024-06-26 16:41:28 +02:00
andrea.villa 0cf16eae0e Merge branch 'develop' of https://gitlab.steamware.net/egalware-machines/essetre/Essetre-FAST into develop 2024-06-26 16:36:27 +02:00
andrea.villa 63916ec50f Merge remote-tracking branch 'origin/master' into develop 2024-06-26 16:36:23 +02:00
luca.mazzoleni d53ebb1da6 Aggiunta lettura NewTopC da offset Ts3 2024-06-13 09:29:26 +02:00
andrea.villa 51924f71ea - Aggiunta funzione GetSetupInfo a BeamData per nuovo automatismo 2024-06-03 12:52:36 +02:00
andrea.villa 2a44fc8635 - Allineamento con common ver. 2.6e3
- Aggiunte variabili MinJoin(xx) per gestione MIN_JOIN_(xx)
2024-05-06 16:43:11 +02:00
andrea.villa 5e7c3d7681 - Allineamento con common ver. 2.6e2 2024-05-06 14:55:14 +02:00
andrea.villa 3f4feabbd9 - Allineamento con common ver. 2.6e1
- Aggiunta variabile WoodDensity per gestione WOOD_DENSITY
2024-04-30 16:57:22 +02:00
andrea.villa 90d7c59e97 - Allineamento con common ver. 2.6d2 2024-04-18 10:51:03 +02:00
luca.mazzoleni 2b3d65fd56 Merge branch 'develop' 2024-04-16 16:57:09 +02:00
luca.mazzoleni 0ea9ef4266 Merge branch 'master' 2024-04-16 16:31:09 +02:00
luca.mazzoleni 2510bf8379 Merge branch 'develop' 2024-04-16 16:22:59 +02:00
luca.mazzoleni 6c6e883a4c update yaml 2024-04-16 16:22:24 +02:00
luca.mazzoleni 2be44e3499 update yaml 2024-04-16 16:16:28 +02:00
luca.mazzoleni db4f901e2b update yaml 2024-04-16 16:11:31 +02:00
luca.mazzoleni 99300bbb53 update yaml 2024-04-16 16:09:49 +02:00
luca.mazzoleni a9134f502d in yaml modifica compilazione per dev 2024-04-16 16:08:37 +02:00
luca.mazzoleni d226d1a5c1 in yaml aggiunta compilazione in R anche per develop 2024-04-16 16:01:46 +02:00
luca.mazzoleni 5ea1bd718d Merge branch 'develop' 2024-04-16 15:05:14 +02:00
luca.mazzoleni 5146f304b6 yaml lanciato solo per master 2024-04-16 15:05:01 +02:00
luca.mazzoleni 313a621eab update yaml 2024-04-16 13:15:17 +02:00
luca.mazzoleni 34d1b6ea9c update yaml 2024-04-16 13:07:13 +02:00
luca.mazzoleni 5c55da537e update yaml 2024-04-16 12:16:29 +02:00
luca.mazzoleni 123c1d57fa Merge branch 'develop' 2024-04-16 11:53:29 +02:00
luca.mazzoleni 6f52a41cb0 modifica yaml e test 2024-04-16 11:34:59 +02:00
luca.mazzoleni cb1f97ba3b modifica yaml e test 2024-04-16 11:25:16 +02:00
luca.mazzoleni b660adc8e8 modifica yaml e test 2024-04-16 11:01:04 +02:00
luca.mazzoleni f0b2ce3720 yaml:
- copia sorgenti e zip compilati in percorso di prova in S, ordinati per versione
- copia sorgenti in R, in percorso di prova, ultima versione macchina e macchina di test
2024-04-16 10:56:55 +02:00
andrea.villa 975bc40d2b Merge remote-tracking branch 'origin/develop' 2024-04-15 15:53:28 +02:00
andrea.villa 01105a8c6a Allineamento con common ver. 2.6d1 2024-04-15 15:53:15 +02:00
andrea.villa 3c1a1e5407 In MyAdjustLinearAxes corretta compensazione aggregato in X-Y 2024-04-15 12:21:34 +02:00
andrea.villa e5ae54cc98 - Corretto calcolo piano con aggregato da sotto
- lista iniziale con N2xx
2024-04-15 11:28:48 +02:00
andrea.villa 09e2dd991d Per NUM_PLUS, in G114 per aggregato 2 uscite si scrive solo la sua lunghezza, senza pivot (come per TPA) 2024-04-15 09:26:39 +02:00
andrea.villa 66c94aece6 Da testare: aggiunta gestione aggregato doppia uscita per controllo NUM_PLUS. 2024-04-15 09:01:46 +02:00
andrea.villa 9f2e302d32 Merge remote-tracking branch 'origin/master' into develop 2024-04-15 08:59:56 +02:00
luca.mazzoleni a1f053e1d8 - aggiunto YAML con compilazione in S 2024-04-12 16:04:10 +02:00
andrea.villa 48105a3f4f Allineamento con common ver. 2.6c8 2024-03-28 16:53:00 +01:00
Dario Sassi 45ab9ee317 Essetre-FAST 2.6c9 :
- modificato disegno e mlde per reale posizione supporto di rinvio H5
- modifica a mlse per dare possibilità di lavorare da X- tra le pinze, con abilitazione da flag (User.ENABLE_TOOL_BETWEEN_VICES == 1).
2024-03-28 15:33:44 +01:00
andrea.villa 011de630f7 Allineamento con common ver. 2.6c7 2024-03-12 13:17:16 +01:00
Dario Sassi 326de943b7 Essetre-FAST 2.6c7 :
- migliorie alla geometria macchina e suo caricamento.
2024-03-09 12:51:04 +01:00
luca.mazzoleni b52feb5fd2 Merge branch 'develop' 2024-03-08 18:11:59 +01:00
luca.mazzoleni 81ae21d006 Merge branch 'master' into develop 2024-03-08 18:11:04 +01:00
luca.mazzoleni 7948ed102e - aggiunti utensili custom 2024-03-08 18:10:31 +01:00
andrea.villa 60f987b23f - Modificato log con nome macchina
- Allineamento con common ver. 2.6c6
2024-03-04 10:49:43 +01:00
luca.mazzoleni e647919eaa - in compilazione rimossi i simboli di debug 2024-02-29 18:22:38 +01:00
andrea.villa 0bc8997ae2 Merge remote-tracking branch 'origin/develop' 2024-02-29 08:26:55 +01:00
andrea.villa 408fb467d1 Gestione rimozione VMILL per tagli a cubetti a zig-zag 2024-02-29 08:26:39 +01:00
andrea.villa 7ce5c020fc Piccola correzione calcolo accelerazione pinze 2024-02-28 14:33:59 +01:00
andrea.villa 23a5b99a90 Gestione accelerazioni pinze in M115 ( solo per TPA) 2024-02-28 12:54:05 +01:00
andrea.villa 9acba47f91 Allineamento con common ver. 2.6c5 2024-02-28 12:07:32 +01:00
andrea.villa 3c327abd4d Merge branch 'master' into develop 2024-02-27 15:07:34 +01:00
andrea.villa 4709c55227 Allineamento con common ver. 2.6c4. Aggiunto parametro 'SafeXRotAxes' per rotazione motosega con pezzi alti 2024-02-27 15:06:44 +01:00
luca.mazzoleni b01a097fb2 Merge branch 'master' into develop 2024-02-27 12:12:15 +01:00
andrea.villa 672cc5ff90 Allineamento con common ver. 2.6c3 2024-02-23 11:58:21 +01:00
andrea.villa 5de2fd1b45 - Rimossa chiamata funzione EgtGetSourceDir
- Allineamento con common ver. 2.6c2
2024-02-23 10:47:04 +01:00
andrea.villa 264c78d8df 2.6c1 : Prima versione post-proc comune FAST e FASTrl 2024-02-23 10:22:56 +01:00
luca.mazzoleni 8e39bc08a8 update compile 2024-02-22 18:00:52 +01:00
luca.mazzoleni e3082d52c4 update compile 2024-02-22 17:51:22 +01:00
luca.mazzoleni 3810893c36 aggiunti file per compilazione 2024-02-22 11:01:45 +01:00
luca.mazzoleni 55fde8526a Merge branch 'develop' 2024-02-09 17:22:13 +01:00
luca.mazzoleni ae7e96aa7c In BeamData aggiunta funzione GetBlockedAxis che sostituisce la GetChainSawBlockedAxis. 2024-02-09 17:21:49 +01:00
luca.mazzoleni 3db37e9c19 Merge branch 'master' into develop 2024-02-09 17:15:11 +01:00
Dario Sassi 86ca749635 Essetre-FAST 2.6a2 :
- aggiunti ingombri portautensili per mortase e seghe a catena.
2024-01-30 09:13:17 +01:00
Dario Sassi 19ae66b5bd Essetre-FAST 2.6a1 :
- piccola modifica per direzione preferenziale rinvio da sotto (per evitare di accedere dal lato della barra).
2024-01-19 09:01:44 +01:00
luca.mazzoleni 758893afdb Merge branch 'master' into develop 2023-12-15 10:50:11 +01:00
30 changed files with 4084 additions and 848 deletions
+1
View File
@@ -1,6 +1,7 @@
/Tools
/Machinings
/SetUp
/Beam/AISetup
/Beam/Ts3Data.bak
/Beam/CutData.lua
/Beam/DrillData.lua
+318
View File
@@ -0,0 +1,318 @@
variables:
VERS_MAIN: '1.0'
MACH_NAME: ''
MACH_NAME_TEST: ''
MANUFACTURER: ''
NEW_REL: ''
NET_SHARE_X: '\\10.74.82.201\EgwTech'
NET_SHARE_Z: '\\10.74.82.201\Artifacts'
NET_SHARE_S: '\\10.74.82.201\Scambio'
NET_SHARE_R: '\\10.74.82.201\EgwTech'
NET_SHARE_H: '\\10.74.82.252\team drives'
NET_USERQ: 'steamw\egalware'
NET_USER_SERVICES: 'steamw\services'
MACH_VERS: '0.0.0.0'
TEMP_PATH: 'C:\MachinesDeploy'
MACHINES_PATH_R: 'R:\EgtData\Machines_GIT'
DEST_MACHINES_PATH_H: 'H:'
SRC_PATH: ''
BASE_PATH: ''
TEST_PATH: ''
URL_VERSIONS_LOG: "https://liman.egalware.com/ELM.API/api/release/save"
MACH_VERS_NUM: '0.0.0.0'
CRITICAL_STRING: "#critical#"
TOOLS_MACHINE_PATH: ""
#Note compilazione LUA:
# lua54 -o bin\$FileName -s $FileName: -o = output, -s = NON include i debug symbols
# helper copia script verso cartella di rete S:\ delle cartelle bin
.ReplicaS: &ReplicaS
- |
net use S: /delete
SLEEP 2
net use S: $env:NET_SHARE_S /u:$env:NET_USERQ $SDRIVE_PASSWD
ROBOCOPY /MIR $env:BASE_PATH S:\LucaM\MachinesDeploy\$env:MACH_NAME\$env:MACH_VERS\ /XD "bin" /XD "$env:MACH_NAME_TEST"
SLEEP 2
net use S: /delete
# helper copia script verso cartella di rete R:\
.ReplicaR: &ReplicaR
- |
net use R: /delete
SLEEP 2
net use R: $env:NET_SHARE_R /u:$env:NET_USERQ $ZDRIVE_PASSWD
echo "-----------------------"
echo " Copia macchina su R"
echo "-----------------------"
$customerPathR = $env:MACHINES_PATH_R + "\" + $env:MANUFACTURER
ROBOCOPY /MIR "$env:SRC_PATH" "$customerPathR\$env:MACH_NAME\" /XD "bin"
ROBOCOPY "$env:TEST_PATH" "$customerPathR\_TestMachines\$env:MACH_NAME_TEST\" /E /XD "bin"
ROBOCOPY /MIR "$env:BASE_PATH" "$customerPathR\_Deploy\$env:MACH_NAME\$env:MACH_VERS\" /XD "bin" /XD "$env:MACH_NAME_TEST"
SLEEP 2
net use R: /delete
# helper copia script verso drive condiviso
.ReplicaStor01: &ReplicaStor01
- |
net use H: /delete
SLEEP 2
net use H: $env:NET_SHARE_H /u:$env:NET_USER_SERVICES $SRVCS_PASSWD
echo "-----------------------"
echo " Copia macchina su stor01"
echo "-----------------------"
SLEEP 2
$customerPathH = $env:DEST_MACHINES_PATH_H + "\" + $env:MANUFACTURER + "\test"
$destinationPath = "$customerPathH\$env:MACH_NAME" + "\"
ROBOCOPY "$env:BASE_PATH" "$destinationPath\" *.zip
SLEEP 2
net use H: /delete
# helper copia script verso cartella di rete R:\ per develop
.ReplicaR_DEV: &ReplicaR_DEV
- |
net use R: /delete
SLEEP 2
net use R: $env:NET_SHARE_R /u:$env:NET_USERQ $ZDRIVE_PASSWD
echo "-----------------------"
echo " Copia macchina su R - DEV"
echo "-----------------------"
$customerPathR = $env:MACHINES_PATH_R + "\" + $env:MANUFACTURER
ROBOCOPY /MIR "$env:BASE_PATH" "$customerPathR\_Deploy\$env:MACH_NAME\_DEV\$env:MACH_VERS\" /XD "bin" /XD "$env:MACH_NAME_TEST"
SLEEP 2
net use R: /delete
#helper copia sorgenti da R a percorso temporaneo
.CreateBaseFolder: &CreateBaseFolder
- |
net use R: /delete
SLEEP 2
net use R: $env:NET_SHARE_R /u:$env:NET_USERQ $ZDRIVE_PASSWD
echo "-----------------------"
echo " Recupero file non git da R e copia su macchina virtuale"
echo "-----------------------"
# test se la cartella con gli utensili esiste per questa macchina
if (!(Test-Path -Path $env:TOOLS_MACHINE_PATH)) {
echo "-----------------------"
echo "CANNOT FIND TOOLS FOR THIS MACHINE!!"
echo "-----------------------"
Exit 1}
ROBOCOPY "$env:TOOLS_MACHINE_PATH" "$env:SRC_PATH" /E /XF "*.bat" /XF "*.yml" /XF ".gitignore" /XD ".git" /XF "UpdateLog.txt" /XD ".vscode"
ROBOCOPY "$env:TOOLS_MACHINE_PATH" "$env:TEST_PATH" /E /XF "*.bat" /XF "*.yml" /XF ".gitignore" /XD ".git" /XF "UpdateLog.txt" /XD ".vscode"
ROBOCOPY "$env:TOOLS_MACHINE_PATH" "$env:SRC_PATH\bin\$env:MACH_NAME\" /E /XF "*.bat" /XF "*.yml" /XF ".gitignore" /XD ".git" /XF "UpdateLog.txt" /XD ".vscode"
SLEEP 2
net use R: /delete
# helper compilazione LUA a 32 e 64 bit
.LuaCompile: &LuaCompile
- |
Set-Alias lua54 C:\Tools\Lua32\luac54
echo "-----------------------"
echo " Copia file su macchina virtuale"
echo "-----------------------"
ROBOCOPY . "$env:SRC_PATH" /E /XF "*.bat" /XF "*.yml" /XF ".gitignore" /XD ".git" /XF "UpdateLog.txt" /XD ".vscode"
ROBOCOPY . "$env:TEST_PATH" /E /XF "*.bat" /XF "*.yml" /XF ".gitignore" /XD ".git" /XF "UpdateLog.txt" /XD ".vscode"
Rename-Item -Path "$env:TEST_PATH\$env:MACH_NAME.mlde" -NewName "$env:MACH_NAME_TEST.mlde"
Rename-Item -Path "$env:TEST_PATH\$env:MACH_NAME.ini" -NewName "$env:MACH_NAME_TEST.ini"
ROBOCOPY . "$env:SRC_PATH\bin\$env:MACH_NAME\" /E /XF "*.bat" /XF "*.yml" /XF ".gitignore" /XD ".git" /XF "UpdateLog.txt" /XD ".vscode"
echo "-----------------------"
echo " Compilazione file *.lua 32/64bit"
echo "-----------------------"
$FileList = Get-ChildItem * -Include( "*.mlpe", "*.mlse")
ForEach ($File in $FileList) {
$FileName = Split-Path $File -leaf
lua54 -o $env:SRC_PATH\bin\$env:MACH_NAME\$FileName -s $FileName
echo "lua54 -o bin\$FileName -s $FileName"
}
# helper recupero nome macchina e costruttore
.machName-fix: &machName-fix
- |
echo "-----------------------"
echo " Recupero nome macchina e costruttore"
echo "-----------------------"
$fileName = dir *.mlde
$env:MACH_NAME = $fileName.BaseName
$env:MACH_NAME_TEST = $env:MACH_NAME + ".TEST"
$comp = $fileName.BaseName -split "-"
$env:MANUFACTURER = $comp[0]
Write-Output $env:MANUFACTURER
# helper calcolo versione
.version-fix: &version-fix
- |
echo "-----------------------"
echo " Calcolo versione"
echo "-----------------------"
# calcolo versione formato stringa
$fPath = "$env:MACH_NAME.mlde";
$vLine = Select-String -path $fPath -Pattern '^PP_VER';
$comp = $vLine -split "=";
$env:MACH_VERS = $comp[1].Replace("'","").Trim()
# display versione formato stringa
Write-Output $env:MACH_VERS
# calcolo versione formato numerico
$fPath = "$env:MACH_NAME.mlde";
$vLine = Select-String -path $fPath -Pattern '^PP_NVER';
$comp = $vLine -split "=";
$env:MACH_VERS_NUM = $comp[1].Replace("'","").Trim()
# display versione formato numerico
Write-Output $env:MACH_VERS_NUM
# helper calcolo versione se develop
.version-fix_DEV: &version-fix_DEV
- |
echo "-----------------------"
echo " Calcolo versione - DEV"
echo "-----------------------"
$commitAuthor = $CI_COMMIT_AUTHOR -split " "
$commitAuthor = $commitAuthor[0].Trim()
$env:MACH_VERS = $commitAuthor
# display versione
Write-Output $env:MACH_VERS
# helper creazione folders
.folder-fix: &folder-fix
- |
echo "-----------------------"
echo " Creazione cartelle su macchina virtuale"
echo "-----------------------"
$env:TOOLS_MACHINE_PATH = "$env:MACHINES_PATH_R\$env:MANUFACTURER\_DefaultMachineSetup\$env:MACH_NAME"
Write-Output $env:TOOLS_MACHINE_PATH
$env:SRC_PATH = "$env:TEMP_PATH\$env:MACH_NAME\$env:MACH_VERS\$env:MACH_NAME";
$env:BASE_PATH = "$env:TEMP_PATH\$env:MACH_NAME\$env:MACH_VERS";
$env:TEST_PATH = "$env:TEMP_PATH\$env:MACH_NAME\$env:MACH_VERS\$env:MACH_NAME_TEST";
Write-Output $env:BASE_PATH;
if (Test-Path $env:BASE_PATH) { Remove-Item -Path "$env:BASE_PATH\*" -R -Force };
Write-Output $env:TEST_PATH;
# helper compressione e pulizia folders
.ZipClean: &ZipClean
- |
" Compressione file su macchina virtuale"
$7zipPath = $env:ProgramFiles+"\7-Zip\7z.exe";
if (-not (Test-Path -Path $7zipPath -PathType Leaf)) {
throw "7 zip file '$7zipPath' not found"
}
Set-Alias 7zip $7zipPath
$Target = "$env:BASE_PATH\$env:MACH_NAME.zip"
cd "$env:SRC_PATH\bin\"
$Source = "*"
7zip a -tzip $Target $Source
Write-Output "called ZIP $Source --> $Target"
# helper invio notifica a log versioni online (LiMan)
.SendToVersionsLog: &SendToVersionsLog
- |
echo "-----------------------"
echo " Invio versione a log online"
echo "-----------------------"
$tags = ""
$date = ""
# se critico scrive tag
if ( $CI_COMMIT_MESSAGE | Select-String -Pattern $env:CRITICAL_STRING) {
$tags = "CRITICAL"
$date = (Get-Date).AddDays(1).toString("yyyy-MM-ddTHH:mm:ss.fffZ")
}
else
{
$date = (Get-Date).AddDays(3).toString("yyyy-MM-ddTHH:mm:ss.fffZ")
}
$body =
@{
codInst = "EgalWare"
codApp = $env:MACH_NAME
uplAppId = "UpdateManager"
masterKey = $LiMan_Key
tipo = "Machine"
versNum = $env:MACH_VERS_NUM
versText = $env:MACH_VERS
releaseDate = $date
relTags = $tags
}
$jsonBody = ConvertTo-Json -InputObject $body
echo $jsonBody
Invoke-WebRequest -Method Post -URI $env:URL_VERSIONS_LOG -ContentType "application/json" -Body $jsonBody -UseBasicParsing
# helper esecuzione test
.RunTest: &RunTest
- |
Write-Output "Test done!"
stages:
- build
# - test
# - deploy
LuaCompile:build:
stage: build
only:
- main
- master
tags:
- win
before_script:
- *machName-fix
- *version-fix
- *folder-fix
script:
- *CreateBaseFolder
- *LuaCompile
- *ZipClean
- *ReplicaR
- *ReplicaStor01
- *SendToVersionsLog
LuaCompileDev:build:
stage: build
only:
- develop
tags:
- win
before_script:
- *machName-fix
- *version-fix_DEV
- *folder-fix
script:
- *CreateBaseFolder
- *LuaCompile
- *ZipClean
- *ReplicaR_DEV
# LuaCompile:test:
# stage: test
# needs: ["LuaCompile:build"]
# only:
# - main
# - master
# - develop
# tags:
# - win
# before_script:
# - *version-fix
# - *folder-fix
# script:
# - *LuaCompile
# - *RunTest
# LuaCompile:deploy:
# stage: deploy
# needs: ["LuaCompile:test"]
# only:
# - main
# - master
# tags:
# - win
# before_script:
# - *version-fix
# - *folder-fix
# script:
# - *LuaCompile
# - *ZipClean
# - *ReplicaR
+257 -24
View File
@@ -1,4 +1,4 @@
-- BeamData.lua by Egaltech s.r.l. 2022/03/20
-- BeamData.lua by Egaltech s.r.l. 2024/03/28
-- Raccolta dati generali per Travi
EgtOutLog( ' FAST-BeamData started', 1)
@@ -6,7 +6,11 @@ EgtOutLog( ' FAST-BeamData started', 1)
-- Tabella per definizione modulo
local BeamData = {
GO_FAST = 0, -- flag abilitazione modalità veloce (0=no, 1=carrelli, 2=anche cambio utensili)
RIGHT_LOAD = false, -- flag carico da destra
ROT90 = false, -- flag abilitazione rotazione 90 gradi
ROT180 = true, -- flag abilitazione rotazione 180 gradi
NEWCLAMPING = true, -- flag abilitazione nuovo metodo riposizionamento carrelli
FASTCLAMPING= false, -- flag abilitazione riduzione numero riposizionamenti al carico e durante grande trascinamento
MIN_WIDTH = 40, -- larghezza minima del grezzo
MIN_HEIGHT = 40, -- altezza minima del grezzo
MAX_WIDTH = 240, -- larghezza massima del grezzo
@@ -38,11 +42,12 @@ local BeamData = {
DRILL_VZ_MIN = -0.51, -- componente limite in Z del versore di un foro
DRILL_VX_MAX = 0.867, -- componente limite in X del versore di un foro sulle facce laterali
DRILL_OVERLAP = 5, -- sovrapposizione tra due mezze forature
MAX_ANGLE_DRILL_CUT = 10, -- angolo massimo tra la foratura e il taglio che la attraversa
MILL_OVERLAP = 5, -- sovrapposizione tra due mezze fresature
MAX_DIST_HTFEA = 50.0, -- massima distanza di feature da testa o coda per essere considerata tale
MAX_LEN_HTFEA = 2000.0, -- massima lunghezza di feature di testa o coda
LONGCUT_ENDLEN = 600, -- lunghezza lavoro estremi iniziale e finale (std=600)
LONGCUT_MAXLEN = 1200, -- lunghezza massima sezione di taglio longitudinale (std=1200)
LONGCUT_MAXLEN = 1200, -- lunghezza massima sezione di taglio longitudinale
MAX_LEN_RIDGELAP_FROM_BOTTOM = 141, -- massima lunghezza ridgelap lavorabile da sotto
MAX_LEN_RIDGELAP_FROM_BOTTOM_HBEAM = 96, -- massima lunghezza ridgelap lavorabile da sotto con trave alta
DIM_TO_CENTER_STRIP = 0, -- larghezza minima trave per inseriemento codolo nel centro del trave; 0 = automatico
@@ -51,6 +56,8 @@ local BeamData = {
RAWCOL = { 255, 160, 32, 30}, -- colore del grezzo
RAW_OFFSET = 2000, -- spostamento grezzo rimanente dopo split
VICE_MINH = 110, -- altezza minima della morsa
VICE_MAXH = 370, -- altezza massima zona pinzaggio orizzontale
ENABLE_TOOL_BETWEEN_VICES = false, -- abilita calcolo pinze permettendo di avere l'utensile tra di esse (ovviamente lontano da bordi in Y)
OFFSET_DRILL_TENON = 0, -- offset fori su tenoni verso base degli stessi (0=non fare)
USER_HOLE_DIAM = 0, -- diametro foro per L20
MAX_TOOL_LEN_FOR_HOR_MACH = 311, -- massima lunghezza utensile per poter fare forature (fresature) oltre i 10 gradi dalla verticale
@@ -65,12 +72,19 @@ local BeamData = {
MAX_LEN_BH_FROM_BOTTOM = 195, -- massima lunghezza lavorabile da un lato di block haus da sotto
MAX_DIST_BH_FROM_BOTTOM = 395, -- massima distanza tra naso mandrino e sopra della trave senza collisione
BH_MACHINE = false, -- flag che indica la tipologia di macchina configurata BlockHaus
ANG_TRASM = false -- presenza rinvio angolare per lavorazioni da sotto
ANG_TRASM = false, -- presenza rinvio angolare per lavorazioni da sotto
PRECUT_HEAD = true, -- flag abilitazione pretaglio grezzo a zero in testa
PRECUT_TAIL = true, -- flag abilitazione pretaglio grezzo a zero in coda
MIN_HEIGHT_ADDED_CUTS = 400, -- altezza minima pezzo per effettuare tagli orizzontali aggiuntivi in testa e coda
GAIN_RECLAMPING = 1000, -- in caso di scarso pinzaggio, mm da recuperare con pinzaggio ulteriore prima di spostare
NEWTOPC = true,
STRATEGIES_SCRIPT = 'Essetre',
STRATEGIES_CONFIG_FILE = 'Std1.json'
}
-- Aggiornamento con dati da TechnoEssetre7
local sTs3Data = EgtGetStringFromIni( 'Beam', 'DATA_DIR', "C:\\TechnoEssetre7\\EgtData", EgtGetIniFile()).."\\Essetre-Fast.data"
local sData = EgtGetSourceDir().."\\Ts3Data.lua"
local sData = EgtGetCurrMachineDir().."\\Beam\\Ts3Data.lua"
if EgtExistsFile( sTs3Data) then
EgtCopyFile( sTs3Data, sData)
local sTs3DataOld = sTs3Data..'.old'
@@ -81,15 +95,33 @@ if EgtExistsFile( sData) then
local Machine = dofile( sData)
if Machine then
if Machine.Offsets then
BeamData.ANG_TRASM = ( Machine.Offsets.SECSUP and Machine.Offsets.SECSUP >= 3)
BeamData.BH_MACHINE = ( Machine.Offsets.BLOCKHAUS == 1)
BeamData.MINRAW_S = max( BeamData.MINRAW_S, Machine.Offsets.MINRAW_S or BeamData.MINRAW_S)
BeamData.MINRAW_L = max( BeamData.MINRAW_L, Machine.Offsets.MINRAW_L or BeamData.MINRAW_L)
BeamData.CUT_EXTRA = Machine.Offsets.CUT_EXTRA or BeamData.CUT_EXTRA
BeamData.CUT_EXTRA_MIN = Machine.Offsets.CUT_EXTRA_MIN or BeamData.CUT_EXTRA_MIN
BeamData.DIM_STRIP_SMALL = Machine.Offsets.DIM_STRIP_SMALL or BeamData.DIM_STRIP_SMALL
BeamData.DIM_TO_CENTER_STRIP = Machine.Offsets.DIM_TO_CENTER_STRIP or BeamData.DIM_TO_CENTER_STRIP
BeamData.MAXDIAM_POCK_CORNER = Machine.Offsets.MAXDIAM_POCK_CORNER or BeamData.MAXDIAM_POCK_CORNER
BeamData.ANG_TRASM = ( Machine.Offsets.SECSUP and Machine.Offsets.SECSUP >= 3)
BeamData.BH_MACHINE = ( Machine.Offsets.BLOCKHAUS == 1)
BeamData.MINRAW_S = max( BeamData.MINRAW_S, Machine.Offsets.MINRAW_S or BeamData.MINRAW_S)
BeamData.MINRAW_L = max( BeamData.MINRAW_L, Machine.Offsets.MINRAW_L or BeamData.MINRAW_L)
BeamData.CUT_EXTRA = Machine.Offsets.CUT_EXTRA or BeamData.CUT_EXTRA
BeamData.CUT_EXTRA_MIN = Machine.Offsets.CUT_EXTRA_MIN or BeamData.CUT_EXTRA_MIN
BeamData.DIM_STRIP_SMALL = Machine.Offsets.DIM_STRIP_SMALL or BeamData.DIM_STRIP_SMALL
BeamData.DIM_TO_CENTER_STRIP = Machine.Offsets.DIM_TO_CENTER_STRIP or BeamData.DIM_TO_CENTER_STRIP
BeamData.MAXDIAM_POCK_CORNER = Machine.Offsets.MAXDIAM_POCK_CORNER or BeamData.MAXDIAM_POCK_CORNER
BeamData.LONGCUT_ENDLEN = Machine.Offsets.LONGCUT_ENDLEN or BeamData.LONGCUT_ENDLEN
BeamData.LONGCUT_MAXLEN = Machine.Offsets.LONGCUT_MAXLEN or BeamData.LONGCUT_MAXLEN
if Machine.Offsets.MAX_ANGLE_DRILL_CUT then BeamData.MAX_ANGLE_DRILL_CUT = EgtClamp( Machine.Offsets.MAX_ANGLE_DRILL_CUT, 1, 89) end
BeamData.ADVANCE_TAIL_OFFS = Machine.Offsets.ADVANCE_TAIL_OFFS or BeamData.ADVANCE_TAIL_OFFS
BeamData.LEN_VERY_SHORT_PART = Machine.Offsets.LEN_VERY_SHORT_PART or BeamData.LEN_VERY_SHORT_PART
BeamData.LEN_SHORT_PART = Machine.Offsets.LEN_SHORT_PART or BeamData.LEN_SHORT_PART
BeamData.MAX_DIM_HTCUT_HBEAM = Machine.Offsets.MAX_DIM_HTCUT_HBEAM or BeamData.MAX_DIM_HTCUT_HBEAM
BeamData.MAX_HEIGHT2 = Machine.Offsets.MAX_HEIGHT2 or BeamData.MAX_HEIGHT2
BeamData.OVM_MID = Machine.Offsets.OVM_MID or BeamData.OVM_MID
if Machine.Offsets.PRECUT_HEAD_DISABLE then BeamData.PRECUT_HEAD = ( Machine.Offsets.PRECUT_HEAD_DISABLE == 0) end
if Machine.Offsets.PRECUT_TAIL_DISABLE then BeamData.PRECUT_TAIL = ( Machine.Offsets.PRECUT_TAIL_DISABLE == 0) end
if Machine.Offsets.MIN_HEIGHT_ADDED_CUTS then BeamData.MIN_HEIGHT_ADDED_CUTS = min( Machine.Offsets.MIN_HEIGHT_ADDED_CUTS, BeamData.MIN_HEIGHT_ADDED_CUTS) end
if Machine.Offsets.NEWCLAMPING ~= nil then BeamData.NEWCLAMPING = ( Machine.Offsets.NEWCLAMPING == 1) end
if Machine.Offsets.FASTCLAMPING ~= nil then BeamData.FASTCLAMPING = ( Machine.Offsets.FASTCLAMPING == 1) end
if Machine.Offsets.ROT90 ~= nil then BeamData.ROT90 = ( Machine.Offsets.ROT90 == 1) end
if Machine.Offsets.ROT180 ~= nil then BeamData.ROT180 = ( Machine.Offsets.ROT180 == 1) end
if Machine.Offsets.CUT_SIC then BeamData.CUT_SIC = EgtClamp( Machine.Offsets.CUT_SIC, 15, 50) end
if Machine.Offsets.NEWTOPC then BeamData.NEWTOPC = ( Machine.Offsets.NEWTOPC == 1) end
end
if Machine.Trave then
BeamData.MIN_WIDTH = Machine.Trave.XMIN or BeamData.MIN_WIDTH
@@ -110,20 +142,10 @@ if EgtExistsFile( sData) then
BeamData.MAX_LEN_SCRAP_START = 100000
end
BeamData.USER_HOLE_DIAM = Machine.User.L020_DIAM_HOLE or BeamData.USER_HOLE_DIAM
BeamData.ENABLE_TOOL_BETWEEN_VICES = ( Machine.User.ENABLE_TOOL_BETWEEN_VICES == 1) or BeamData.ENABLE_TOOL_BETWEEN_VICES
end
end
end
---------------------------------------------------------------------
local function GetChainSawBlockedAxis( nInd)
if nInd == 1 then
return 'A=90'
else
return 'A=0'
end
end
BeamData.GetChainSawBlockedAxis = GetChainSawBlockedAxis
---------------------------------------------------------------------
local function GetMaxLenRidgeLapFromBottom( dHRaw)
if dHRaw < BeamData.MIN_DIM_HBEAM then
@@ -134,5 +156,216 @@ local function GetMaxLenRidgeLapFromBottom( dHRaw)
end
BeamData.GetMaxLenRidgeLapFromBottom = GetMaxLenRidgeLapFromBottom
---------------------------------------------------------------------
local function GetBlockedAxis( sHead, nToolType, sBlockedAxis)
-- lama
if nToolType == MCH_TY.SAW_STD or nToolType == MCH_TY.SAW_FLAT then
return ''
-- sega a catena
elseif nToolType == MCH_TY.MORTISE_STD then
if sHead == 'H3' then
if sBlockedAxis == 'parallel' then
return 'A=0'
elseif sBlockedAxis == 'perpendicular' then
return 'A=90'
end
else
return ''
end
-- fresa
elseif nToolType == MCH_TY.MILL_STD or nToolType == MCH_TY.MILL_NOTIP then
return ''
-- punta
elseif nToolType == MCH_TY.DRILL_STD or nToolType == MCH_TY.DRILL_LONG then
return ''
else
return ''
end
end
BeamData.GetBlockedAxis = GetBlockedAxis
---------------------------------------------------------------------
local function GetChainSawInitAngs( vtN, vtO, nInd)
if nInd == 1 then
return ''
else
return EgtIf( vtN:getY() > 0, 'C=180', 'C=-180')
end
end
BeamData.GetChainSawInitAngs = GetChainSawInitAngs
---------------------------------------------------------------------
local function GetSCC( vtToolDirection, vtEdgeDirection, vtNFace)
local nSCC = MCH_SCC.NONE
if abs( vtToolDirection:getX()) > abs( vtToolDirection:getY()) - GEO.EPS_SMALL then
-- se il taglio è orizzontale, si gira aggregato lama per facilitare caduta del legno
if abs( vtEdgeDirection:getZ()) < 10 * GEO.EPS_SMALL and not AreSameOrOppositeVectorApprox( vtNFace, Z_AX()) then
nSCC = EgtIf( ( vtToolDirection:getX() > -GEO.EPS_SMALL), MCH_SCC.ADIR_XM, MCH_SCC.ADIR_XP)
else
nSCC = EgtIf( ( vtToolDirection:getX() > -GEO.EPS_SMALL), MCH_SCC.ADIR_XP, MCH_SCC.ADIR_XM)
end
else
-- se il taglio è orizzontale, si gira aggregato lama per facilitare caduta del legno
if abs( vtEdgeDirection:getZ()) < 10 * GEO.EPS_SMALL and not AreSameOrOppositeVectorApprox( vtNFace, Z_AX()) then
nSCC = EgtIf( ( vtToolDirection:getY() > -GEO.EPS_SMALL), MCH_SCC.ADIR_YM, MCH_SCC.ADIR_YP)
else
nSCC = EgtIf( ( vtToolDirection:getY() > -GEO.EPS_SMALL), MCH_SCC.ADIR_YP, MCH_SCC.ADIR_YM)
end
end
return nSCC
end
---------------------------------------------------------------------
-- sAxis può essere AB, C, Z; restituisce direzioni, profondità di estrusione e punti per il controllo precollisione
local function GetPreCollisionData( sAxis, vtC, vtHead)
local PreCollisionData = {}
-- Pivot uguale per tutti; non c'è aggregato quindi non dipende da SCC
-- riferimento vtPivot
-- - vtHead (Z): asse rotazione utensile, guarda il mandrino
-- - vtToolSCC (X): direzione asse C o aggregato
-- - vtEdge (Y): direzione lato, verso in base a X e Z
-- - punto di applicazione: naso mandrino o aggregato
PreCollisionData.vtMovePivot = Vector3d( 0, 0, 242.55)
-- carro Z
if sAxis == 'Z' then
PreCollisionData.Directions = { vtDirectionX = X_AX(), vtDirectionY = Z_AX(), vtDirectionZ = -Y_AX()}
PreCollisionData.bSurfTmByRevolve = true
PreCollisionData.Points = {
Point3d( 0, 523, 0),
Point3d( 109.556, 523, 0),
Point3d( 109.556, 583, 0),
Point3d( 143.113, 583, 0),
Point3d( 143.113, 2533, 0),
Point3d( 0, 2533, 0)
}
-- motore (asse A o B)
elseif sAxis == 'AB' then
PreCollisionData.Directions = { vtDirectionX = vtC, vtDirectionY = -vtHead, vtDirectionZ = vtC ^ -vtHead}
PreCollisionData.dExtrusionDepth = 180
PreCollisionData.Points = {
Point3d( 100,-122,0),
Point3d( 100, -232.5, 0),
Point3d( -90, -232.5, 0),
Point3d( -90, 204.505, 0),
Point3d( -77.5, 216.55, 0),
Point3d( -89, 234.05, 0),
Point3d( -89, 242.55, 0),
Point3d( 89, 242.55, 0),
Point3d( 89, 234.05, 0),
Point3d( 77.5, 216.55, 0),
Point3d( 90, 204.505, 0),
Point3d( 90, 93, 0),
Point3d( 125, 93, 0),
Point3d( 125, -122, 0),
Point3d( 100, -122, 0)
}
-- asse C
elseif sAxis == 'C' then
PreCollisionData.Directions = { vtDirectionX = vtC, vtDirectionY = Z_AX(), vtDirectionZ = vtC ^ Z_AX()}
PreCollisionData.dExtrusionDepth = 200
PreCollisionData.Points = {
Point3d( 125, -92.752, 0),
Point3d( 203.5, -92.752, 0),
Point3d( 203.5, -100, 0),
Point3d( 400, -100, 0),
Point3d( 450, -50, 0),
Point3d( 450, 400, 0),
Point3d( 360, 490, 0),
Point3d( 170, 490, 0),
Point3d( 170, 523, 0),
Point3d( EgtIf( BeamData.NEWTOPC, -110, -175), 523, 0),
Point3d( EgtIf( BeamData.NEWTOPC, -110, -175), 400, 0),
Point3d( 230.858, 400, 0),
Point3d( 325, 305.858, 0),
Point3d( 325, 146, 0),
Point3d( 203.5, 146, 0),
Point3d( 203.5, 93, 0),
Point3d( 125, 93, 0),
Point3d( 125, -92.752, 0)
}
end
return PreCollisionData
end
---------------------------------------------------------------------
local function GetSetupInfo( sHead)
local SetupInfo = {}
-- dati comuni
SetupInfo.bIsCSymmetrical = false
SetupInfo.dCAxisEncumbrance = 180
SetupInfo.dCAxisSideEncumbrance = 200
SetupInfo.dPivot = 175 -- per uscita fresa, diverso da uscita lama
SetupInfo.bToolOnAggregate = false
SetupInfo.vtRotationAxisC = Z_AX()
SetupInfo.vtRotationAxisAB = X_AX()
-- testa 5 assi da sopra
if sHead == 'H1' then
SetupInfo.HeadType = { bTop = true, bBottom = false}
SetupInfo.PreferredSide = {}
SetupInfo.GetMinNz = function() return sin( -45) end
-- lama su testa 5 assi da sopra
elseif sHead == 'H2' then
SetupInfo.HeadType = { bTop = true, bBottom = false}
SetupInfo.PreferredSide = {}
SetupInfo.GetMinNz = function() return sin( -45) end
SetupInfo.GetPreCollisionData = GetPreCollisionData
SetupInfo.GetSCC = GetSCC
-- motosega
elseif sHead == 'H3' then
SetupInfo.HeadType = { bTop = true, bBottom = false}
SetupInfo.PreferredSide = {}
SetupInfo.GetMinNz = function() return 0 end
-- rinvio angolare 90° (considerato come fosse una testa da sotto)
elseif sHead == 'H5' then
SetupInfo.bToolOnAggregate = true
SetupInfo.HeadType = { bTop = false, bBottom = true}
SetupInfo.PreferredSide = {}
SetupInfo.GetMaxNz = function() return 0 end
end
return SetupInfo
end
BeamData.GetSetupInfo = GetSetupInfo
---------------------------------------------------------------------
local function GetMaxMatReductionBladeCut( sHead, vtDir)
local MaxMatReductionBladeCut = 0
-- la lama è montata solo su H2, non si controllano altre teste
if sHead == 'H2' then
if BeamData.NEWTOPC == nil or BeamData.NEWTOPC then
MaxMatReductionBladeCut = -65
end
if AreSameVectorApprox( vtDir, X_AX()) then
MaxMatReductionBladeCut = MaxMatReductionBladeCut + 175
elseif AreSameVectorApprox( vtDir, -X_AX()) then
MaxMatReductionBladeCut = MaxMatReductionBladeCut + 175
elseif AreSameVectorApprox( vtDir, Y_AX()) then
MaxMatReductionBladeCut = MaxMatReductionBladeCut + 175
elseif AreSameVectorApprox( vtDir, -Y_AX()) then
MaxMatReductionBladeCut = MaxMatReductionBladeCut + 175
elseif AreSameVectorApprox( vtDir, Z_AX()) then
MaxMatReductionBladeCut = 80
elseif AreSameVectorApprox( vtDir, -Z_AX()) then
MaxMatReductionBladeCut = 80
end
MaxMatReductionBladeCut = MaxMatReductionBladeCut + BeamData.COLL_SIC
end
return MaxMatReductionBladeCut + BeamData.COLL_SIC
end
BeamData.GetMaxMatReductionBladeCut = GetMaxMatReductionBladeCut
---------------------------------------------------------------------
return BeamData
+302
View File
@@ -0,0 +1,302 @@
-- BeamData.lua by Egalware s.r.l. 2025/12/03
-- Raccolta dati generali per Travi
EgtOutLog( ' FAST-BeamData started', 1)
-- Tabella per definizione modulo
local BeamData = {
RIGHT_LOAD = false, -- flag carico da destra
ROT90 = false, -- flag abilitazione rotazione 90 gradi
ROT180 = true, -- flag abilitazione rotazione 180 gradi
MIN_WIDTH = 40, -- larghezza minima del grezzo
MIN_HEIGHT = 40, -- altezza minima del grezzo
MAX_WIDTH = 240, -- larghezza massima del grezzo
MAX_HEIGHT = 625, -- altezza massima del grezzo
MAX_WIDTH2 = 305, -- seconda larghezza massima del grezzo
MAX_HEIGHT2 = 625, -- altezza massima per seconda larghezza massima del grezzo
LEN_SHORT_PART = 1200, -- RENAME lunghezza massima pezzo corto
LEN_VERY_SHORT_PART = 400, -- RENAME lunghezza massima pezzo molto corto (molto probabile lo scarico a caduta)
MAX_RAW = 30000, -- massima lunghezza grezzo (deve essere minore di LenTable - RAW_OFFSET)
STD_RAW = 14000, -- lunghezza standard della barra di grezzo
OVM_HEAD = 10, -- sovramateriale testa
OVM_MID = 5.4, -- sovramateriale intermedio (spessore lama)
MINRAW_S = 750, -- minimo grezzo in coda scaricabile per sezioni piccole
MINRAW_L = 1070, -- minimo grezzo in coda scaricabile per sezioni grandi
MAX_DIM_HTCUT = 200, -- SOLO DICE larghezza massima taglio di testa o coda
MIN_DIM_HBEAM = 380, -- SOLO DICE altezza minima di trave alta
MAX_DIM_DICE = 155, -- dimensione trasversale massima cubetto
MAX_LEN_DICE = 400, -- SOLO DICE lunghezza massima cubetto
COLL_SIC = 5, -- distanza di sicurezza per collisioni
CUT_SIC = 20, -- distanza di sicurezza per tagli
CUT_EXTRA = 5, -- affondamento extra standard per tagli di lama e fresature
CUT_EXTRA_MIN = 1, -- affondamento extra ridotto per tagli di lama e fresature
MILL_OVERLAP = 5, -- sovrapposizione tra due mezze fresature
LONGCUT_ENDLEN = 600, -- RENAME??lunghezza lavoro estremi iniziale e finale (std=600)
LONGCUT_MAXLEN = 1200, -- RENAME??lunghezza massima sezione di taglio longitudinale
DIM_STRIP = -1, -- dimensione codolo sostegno parti lasciate su contorno libero o archi (-1 = da Q...)
DIM_STRIP_SMALL = 1, -- dimensione codolo piccolo (quando le parti sostenute sono sicuramente sulla parte sopra del pezzo)
RAWCOL = { 255, 160, 32, 30}, -- colore del grezzo
RAW_OFFSET = 2000, -- spostamento grezzo rimanente dopo split
VICE_MINH = 110, -- altezza minima della morsa
VICE_MAXH = 370, -- altezza massima zona pinzaggio orizzontale
USER_HOLE_DIAM = 0, -- diametro foro per L20
STRATEGIES_SCRIPT = 'Essetre',
STRATEGIES_CONFIG_FILE = 'Std1.json'
}
-- costanti riportate da mlde non necessarie per automatismo (sostituire con GetParameters o simile)
local MldeParameters = {}
MldeParameters.NumericalControl = 'TPA' -- NUM o TPA o NUM_PLUS
MldeParameters.MinX = 0
MldeParameters.MaxX = 1350
MldeParameters.MinZ = -1350
MldeParameters.MaxZ = 0
MldeParameters.MillOffs = 177.35
MldeParameters.SawOffs = -242.68
MldeParameters.DeltaTabY = 898.0
MldeParameters.DeltaTabZ = -1017.8 + MldeParameters.MillOffs -- per TPA : -1013.3 + MillOffs -- per NUM : -838.4
MldeParameters.NewTopC = true
-- Aggiornamento con dati macchina personalizzati
-- TODO sostituire con GetParameters o simile
local sTs3Data = EgtGetStringFromIni( 'Beam', 'DATA_DIR', "C:\\TechnoEssetre7\\EgtData", EgtGetIniFile()).."\\Essetre-Fast.data"
local sData = EgtGetCurrMachineDir().."\\Beam\\Ts3Data.lua"
if EgtExistsFile( sTs3Data) then
EgtCopyFile( sTs3Data, sData)
local sTs3DataOld = sTs3Data..'.old'
EgtEraseFile( sTs3DataOld)
EgtRenameFile( sTs3Data, sTs3DataOld)
end
if EgtExistsFile( sData) then
local Machine = dofile( sData)
if Machine then
if Machine.Offsets then
if Machine.Offsets.TIPO_CN == 0 then
MldeParameters.NumericalControl = 'NUM'
elseif Machine.Offsets.TIPO_CN == 2 then
MldeParameters.NumericalControl = 'NUM_PLUS'
else
MldeParameters.NumericalControl = 'TPA'
end
if Machine.Offsets.MAX_X then MldeParameters.MinX = - Machine.Offsets.MAX_X end
if Machine.Offsets.MIN_X then MldeParameters.MaxX = - Machine.Offsets.MIN_X end
if Machine.Offsets.MIN_Z then MldeParameters.MinZ = Machine.Offsets.MIN_Z end
if Machine.Offsets.MAX_Z then MldeParameters.MaxZ = Machine.Offsets.MAX_Z end
if Machine.Offsets.PIVOTFRESA then MldeParameters.MillOffs = - Machine.Offsets.PIVOTFRESA end
if Machine.Offsets.PIVOTLAMA then MldeParameters.SawOffs = - Machine.Offsets.PIVOTLAMA end
if Machine.Offsets.OFFSETX then MldeParameters.DeltaTabY = - Machine.Offsets.OFFSETX end
if Machine.Offsets.OFFSETZ then MldeParameters.DeltaTabZ = Machine.Offsets.OFFSETZ + EgtIf( MldeParameters.NumericalControl == 'TPA', MldeParameters.MillOffs, 0) end
if Machine.Offsets.NEWTOPC then MldeParameters.NewTopC = ( Machine.Offsets.NEWTOPC == 1) end
BeamData.MINRAW_S = max( BeamData.MINRAW_S, Machine.Offsets.MINRAW_S or BeamData.MINRAW_S)
BeamData.MINRAW_L = max( BeamData.MINRAW_L, Machine.Offsets.MINRAW_L or BeamData.MINRAW_L)
BeamData.CUT_EXTRA = Machine.Offsets.CUT_EXTRA or BeamData.CUT_EXTRA
BeamData.CUT_EXTRA_MIN = Machine.Offsets.CUT_EXTRA_MIN or BeamData.CUT_EXTRA_MIN
BeamData.DIM_STRIP_SMALL = Machine.Offsets.DIM_STRIP_SMALL or BeamData.DIM_STRIP_SMALL
BeamData.LONGCUT_ENDLEN = Machine.Offsets.LONGCUT_ENDLEN or BeamData.LONGCUT_ENDLEN
BeamData.LONGCUT_MAXLEN = Machine.Offsets.LONGCUT_MAXLEN or BeamData.LONGCUT_MAXLEN
BeamData.LEN_VERY_SHORT_PART = Machine.Offsets.LEN_VERY_SHORT_PART or BeamData.LEN_VERY_SHORT_PART
BeamData.LEN_SHORT_PART = Machine.Offsets.LEN_SHORT_PART or BeamData.LEN_SHORT_PART
BeamData.MAX_HEIGHT2 = Machine.Offsets.MAX_HEIGHT2 or BeamData.MAX_HEIGHT2
BeamData.OVM_MID = Machine.Offsets.OVM_MID or BeamData.OVM_MID
if Machine.Offsets.ROT90 ~= nil then BeamData.ROT90 = ( Machine.Offsets.ROT90 == 1) end
if Machine.Offsets.ROT180 ~= nil then BeamData.ROT180 = ( Machine.Offsets.ROT180 == 1) end
if Machine.Offsets.CUT_SIC then BeamData.CUT_SIC = EgtClamp( Machine.Offsets.CUT_SIC, 15, 50) end
end
if Machine.Trave then
BeamData.MIN_WIDTH = Machine.Trave.XMIN or BeamData.MIN_WIDTH
BeamData.MIN_HEIGHT = Machine.Trave.ZMIN or BeamData.MIN_HEIGHT
BeamData.MAX_WIDTH = Machine.Trave.XMAX or BeamData.MAX_WIDTH
BeamData.MAX_HEIGHT = Machine.Trave.ZMAX or BeamData.MAX_HEIGHT
end
if Machine.User then
BeamData.USER_HOLE_DIAM = Machine.User.L020_DIAM_HOLE or BeamData.USER_HOLE_DIAM
end
end
end
---------------------------------------------------------------------
local function GetBlockedAxis( sHead, nToolType, sBlockedAxis)
-- lama
if nToolType == MCH_TY.SAW_STD or nToolType == MCH_TY.SAW_FLAT then
return ''
-- sega a catena
elseif nToolType == MCH_TY.MORTISE_STD then
if sHead == 'H3' then
if sBlockedAxis == 'parallel' then
return 'A=0'
elseif sBlockedAxis == 'perpendicular' then
return 'A=90'
end
else
return ''
end
-- fresa
elseif nToolType == MCH_TY.MILL_STD or nToolType == MCH_TY.MILL_NOTIP then
return ''
-- punta
elseif nToolType == MCH_TY.DRILL_STD or nToolType == MCH_TY.DRILL_LONG then
return ''
else
return ''
end
end
BeamData.GetBlockedAxis = GetBlockedAxis
---------------------------------------------------------------------
local function GetChainSawInitAngs( vtN, vtO, nInd)
if nInd == 1 then
return ''
else
return EgtIf( vtN:getY() > 0, 'C=180', 'C=-180')
end
end
BeamData.GetChainSawInitAngs = GetChainSawInitAngs
---------------------------------------------------------------------
local function GetSCC( vtToolDirection, vtEdgeDirection, vtNFace)
local nSCC = MCH_SCC.NONE
if abs( vtToolDirection:getX()) > abs( vtToolDirection:getY()) - GEO.EPS_SMALL then
-- se il taglio è orizzontale, si gira aggregato lama per facilitare caduta del legno
if abs( vtEdgeDirection:getZ()) < 10 * GEO.EPS_SMALL and not AreSameOrOppositeVectorApprox( vtNFace, Z_AX()) then
nSCC = EgtIf( ( vtToolDirection:getX() > -GEO.EPS_SMALL), MCH_SCC.ADIR_XM, MCH_SCC.ADIR_XP)
else
nSCC = EgtIf( ( vtToolDirection:getX() > -GEO.EPS_SMALL), MCH_SCC.ADIR_XP, MCH_SCC.ADIR_XM)
end
else
-- se il taglio è orizzontale, si gira aggregato lama per facilitare caduta del legno
if abs( vtEdgeDirection:getZ()) < 10 * GEO.EPS_SMALL and not AreSameOrOppositeVectorApprox( vtNFace, Z_AX()) then
nSCC = EgtIf( ( vtToolDirection:getY() > -GEO.EPS_SMALL), MCH_SCC.ADIR_YM, MCH_SCC.ADIR_YP)
else
nSCC = EgtIf( ( vtToolDirection:getY() > -GEO.EPS_SMALL), MCH_SCC.ADIR_YP, MCH_SCC.ADIR_YM)
end
end
return nSCC
end
---------------------------------------------------------------------
-- sAxis può essere AB, C, Z; restituisce direzioni, profondità di estrusione e punti per il controllo precollisione
local function GetPreCollisionData( sAxis, vtC, vtHead)
local PreCollisionData = {}
-- Pivot uguale per tutti; non c'è aggregato quindi non dipende da SCC
-- riferimento vtPivot
-- - vtHead (Z): asse rotazione utensile, guarda il mandrino
-- - vtToolSCC (X): direzione asse C o aggregato
-- - vtEdge (Y): direzione lato, verso in base a X e Z
-- - punto di applicazione: naso mandrino o aggregato
PreCollisionData.vtMovePivot = Vector3d( 0, 0, -MldeParameters.SawOffs)
-- carro Z
if sAxis == 'Z' then
PreCollisionData.Directions = { vtDirectionX = X_AX(), vtDirectionY = Z_AX(), vtDirectionZ = -Y_AX()}
PreCollisionData.bSurfTmByRevolve = true
PreCollisionData.Points = {
Point3d( 0, 523, 0),
Point3d( 109.556, 523, 0),
Point3d( 109.556, 583, 0),
Point3d( 143.113, 583, 0),
Point3d( 143.113, 2533, 0),
Point3d( 0, 2533, 0)
}
-- motore (asse A o B)
elseif sAxis == 'AB' then
PreCollisionData.Directions = { vtDirectionX = vtC, vtDirectionY = -vtHead, vtDirectionZ = vtC ^ -vtHead}
PreCollisionData.dExtrusionDepth = 180
PreCollisionData.Points = {
Point3d( 100,-122,0),
Point3d( 100, -232.5, 0),
Point3d( -90, -232.5, 0),
Point3d( -90, 204.505, 0),
Point3d( -77.5, 216.55, 0),
Point3d( -89, 234.05, 0),
Point3d( -89, 242.55, 0),
Point3d( 89, 242.55, 0),
Point3d( 89, 234.05, 0),
Point3d( 77.5, 216.55, 0),
Point3d( 90, 204.505, 0),
Point3d( 90, 93, 0),
Point3d( 125, 93, 0),
Point3d( 125, -122, 0),
Point3d( 100, -122, 0)
}
-- asse C
elseif sAxis == 'C' then
PreCollisionData.Directions = { vtDirectionX = vtC, vtDirectionY = Z_AX(), vtDirectionZ = vtC ^ Z_AX()}
PreCollisionData.dExtrusionDepth = 200
PreCollisionData.Points = {
Point3d( 125, -92.752, 0),
Point3d( 203.5, -92.752, 0),
Point3d( 203.5, -100, 0),
Point3d( 400, -100, 0),
Point3d( 450, -50, 0),
Point3d( 450, 400, 0),
Point3d( 360, 490, 0),
Point3d( 170, 490, 0),
Point3d( 170, 523, 0),
Point3d( EgtIf( MldeParameters.NewTopC, -110, -175), 523, 0),
Point3d( EgtIf( MldeParameters.NewTopC, -110, -175), 400, 0),
Point3d( 230.858, 400, 0),
Point3d( 325, 305.858, 0),
Point3d( 325, 146, 0),
Point3d( 203.5, 146, 0),
Point3d( 203.5, 93, 0),
Point3d( 125, 93, 0),
Point3d( 125, -92.752, 0)
}
end
return PreCollisionData
end
---------------------------------------------------------------------
local function GetSetupInfo( sHead)
local SetupInfo = {}
-- dati comuni
SetupInfo.bIsCSymmetrical = false
SetupInfo.dCAxisEncumbrance = 180
SetupInfo.dCAxisSideEncumbrance = 200
SetupInfo.bToolOnAggregate = false
SetupInfo.vtRotationAxisC = EgtGetAxisDir( 'C')
SetupInfo.vtRotationAxisAB = EgtGetAxisDir( 'B')
-- testa 5 assi da sopra
if sHead == 'H1' then
SetupInfo.HeadType = { bTop = true, bBottom = false}
SetupInfo.PreferredSide = {}
SetupInfo.dPivot = MldeParameters.MillOffs -- per uscita fresa, diverso da uscita lama
SetupInfo.GetMinNz = function() return sin( -45) end
-- lama su testa 5 assi da sopra
elseif sHead == 'H2' then
SetupInfo.HeadType = { bTop = true, bBottom = false}
SetupInfo.PreferredSide = {}
SetupInfo.GetMinNz = function() return sin( -45) end
SetupInfo.GetPreCollisionData = GetPreCollisionData
SetupInfo.GetSCC = GetSCC
-- motosega
elseif sHead == 'H3' then
SetupInfo.HeadType = { bTop = true, bBottom = false}
SetupInfo.PreferredSide = {}
SetupInfo.GetMinNz = function() return 0 end
-- rinvio angolare 90° (considerato come fosse una testa da sotto)
elseif sHead == 'H5' then
SetupInfo.bToolOnAggregate = true
SetupInfo.HeadType = { bTop = false, bBottom = true}
SetupInfo.PreferredSide = {}
SetupInfo.GetMaxNz = function() return 0 end
end
return SetupInfo
end
BeamData.GetSetupInfo = GetSetupInfo
---------------------------------------------------------------------
return BeamData
+3
View File
@@ -35,6 +35,8 @@ Name=Offsets
30=l,OFFSETZ_RINV_1,347,OFFSETZ_RINV_1
31=l,OFFSETX_RINV_2,150,OFFSETX_RINV_2
32=l,OFFSETZ_RINV_2,347,OFFSETZ_RINV_2
33=l,MIN_JOIN_SS,100,MIN_JOIN_SS
34=l,MIN_JOIN_VV,75,MIN_JOIN_VV
[2]
Name=Trave
@@ -50,3 +52,4 @@ Name=User
3=d,OPTIMIZATIONS_LENGTH_SLICES,100,SLICES_LENGTH
4=l,L020_DIAM_HOLE,20,L020_HOLE_DIAM
5=l,L040_OFFSET_P1,0,L040_ON_TENON_OFFSET
6=d,ENABLE_TOOL_BETWEEN_VICES,0,ENABLE_TOOL_BETWEEN_VICES
+4
View File
@@ -8,6 +8,7 @@
3=Pocket
4=Pocket_AT
5=AngleDrill
6=Predrill
[Milling]
1=Prof
@@ -31,6 +32,9 @@
19=Long2CutSide
20=SmallToolContour
21=AntiSplintMillCut
22=Prof_end
23=SideMillAsBlade
24=FloatingAggregate
[Pocketing]
1=Pocket
+3
View File
@@ -0,0 +1,3 @@
[BEAM]
StartOffset=10
Offset=5.4
+190 -51
View File
@@ -1,21 +1,13 @@
-- Processore macchina Essetre-FAST by EgalTech s.r.l. 2023/10/18
-- Processore standard macchine FAST by EgalWare s.r.l. 2024/02/23
-- Con controllo numerico NUM
-- 2021/04/23 DS ver 2.3d3 Se non c'è BtlInfo cerco il gruppo di lavoro corrente.
-- 2021/07/21 DS ver 2.3g5 Modifiche varie da TPA.
-- 2021/07/23 DS ver 2.3g6 Corretta gestione LOAD90.
-- 2021/07/23 DS ver 2.3g7 Completamento allineamento con TPA.
-- 2021/07/27 DS ver 2.3g8 Corretto carico senza taglio di testa per salto G79 N9.
-- 2021/07/27 DS ver 2.3g9 Nome in testa a CN (%NNNN.0) da PATTID di BtlInfo.
-- 2021/07/29 DS ver 2.3g10 Con testa H2 (lama) non si emettono assi rotanti nel corso della lavorazione.
-- 2021/08/03 DS ver 2.3h2 Nei commenti le parentesi sono sostituite con il carattere -.
-- 2021/08/05 DS ver 2.3h4 Nel rapido se non bHeadFirst ritardo anche l'emissione di G101 a dopo G112.
-- 2021/11/17 DS ver 2.3k1 Correzioni di Nicola su rotazioni verificate da GCT.
-- 2021/12/28 DS ver 2.3l2 Correzioni a G101 (ora sempre con EE ed ET).
-- 2021/12/29 DS ver 2.3l3 Altre correzioni a G101 (se già in alto EE3 e sempre ES).
-- 2023/04/19 DS ver 2.5d1 Al carico dopo rotazione su linea con EA75 messo EB110 invece di 112.
-- carico librerie
local INFO_STD_PP = require( 'Version')
local BD = require( 'BeamData')
-- Variabili di modulo
local MLE_INFO = 'Essetre-FAST.NUM.mlpe ver.'..PP_VER..' by EgalTech s.r.l.'
local CSP_INFO = INFO_STD_PP.NAME..'_'..NumericalControl..' ver.'..INFO_STD_PP.VERSION..' by EgalWare s.r.l.'
local MACHINE_INFO = MACH_NAME..' ver.'..PP_VER
local TEST_USE = false
---------------------------------------------------------------------
@@ -35,7 +27,9 @@ function OnStart()
--EMT.LINEINC = 1 -- incremento numerazione linee
--EMT.Ft = 'F' -- token per feed
--EMT.St = 'S' -- token per speed
EMT.FMAXPINZE = 154000 -- feed massima pinze
EMT.FMAXPINZE = EgtClamp( MaxFeedPinze or 154000, 20000, 160000) -- feed massima pinze
EMT.MAXACC = MaxAcc or ( EMT.FMAXPINZE / ( 60 * 0.3)) -- accelerazione massima pinze
EMT.MINACC = MinAcc or ( EMT.FMAXPINZE / ( 60 * 4)) -- accelerazione minima pinze
end
---------------------------------------------------------------------
@@ -50,12 +44,18 @@ function OnProgramStart()
local BtlInfoId = EgtGetFirstNameInGroup( GDB_ID.ROOT, 'BtlInfo') or EgtGetCurrMachGroup() or GDB_ID.NULL
local nPatt = EgtGetInfo( BtlInfoId, 'PATTID', 'i') or 40
EmtOutput( '%'..EgtNumToString( nPatt, 0)..'.0')
-- 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
if EMT.INFO then
EmtOutput( '('..EMT.INFO..')')
EmtOutput( sPrefixCommentLine..'('..EMT.INFO..')')
else
EmtOutput( '(Program Start)')
end
EmtOutput( '('.. MLE_INFO..')\n')
EmtOutput( sPrefixCommentLine..'('.. CSP_INFO..')')
EmtOutput( sPrefixCommentLine..'('.. MACHINE_INFO..')\n')
EmtOutput( '(HEADER)')
-- Se modalità test, aggiungo linee per muovere tappeto e alzare la testa (in automatico viene fatto dal main residente)
if TEST_USE then
EmtOutput( 'M28')
@@ -107,6 +107,7 @@ function OnProgramEnd()
EMT.FALL = nil
EMT.RELOAD = nil
EMT.RELOAD2 = nil
EmtOutput( '(FOOTER)')
-- Se modalità test, termino il programma
if TEST_USE then
EmtOutput( 'M02')
@@ -184,16 +185,12 @@ function OnDispositionEnd()
local STrave = EMT.ST
local HOverM = EMT.HOVM
-- calcolo dati pinze
local MinAccPinze = 0.3
local MaxAccPinze = 4
local KgMtCubo= 550 -- densità legno in Kg / metro cubo
local KgMtCubo= WoodDensity or 550 -- densità legno in Kg / metro cubo
local Massa = ( HTrave * STrave * LBarra * KgMtCubo ) / 1000000000
local FMaxPinze = EMT.FMAXPINZE
local ForzaAtrito = 700 / 2 -- Serve per regolare P32 (700 valore reale pistone)
local TempoAcc = ( ( Massa * FMaxPinze) / ( 60 * ForzaAtrito) / 1000)
if ( TempoAcc < MinAccPinze) then TempoAcc = MinAccPinze end
if ( TempoAcc > MaxAccPinze) then TempoAcc = MaxAccPinze end
local AccPinze = FMaxPinze / ( 60 * TempoAcc)
local AccPinze = EgtClamp( FMaxPinze / ( 60 * TempoAcc), EMT.MINACC, EMT.MAXACC)
local RidFeed = 100 / Massa * 100
if ( RidFeed > 100) then RidFeed = 100 end
if IdTrave >= 0 then
@@ -253,9 +250,9 @@ function OnDispositionEnd()
EmtOutput( sOut)
-- altrimenti recupero rimanenza
else
EmtOutput( 'G112 EC1'..' Y'..EmtLenToString( LoadT, 3).. ' EY'..EmtLenToString( EMT.YPOS, 3)..' EV'..EmtLenToString( ParkV, 3) ..' EF'..GetFmaxClamp())
EmtOutput( 'G112 EC1'..' Y'..EmtLenToString( EMT.TPOS, 3).. ' EY'..EmtLenToString( EMT.YPOS, 3)..' EV'..EmtLenToString( ParkV, 3) ..' EF'..GetFmaxClamp())
-- aggiorno dati aggancio carrelli alla trave
EMT.YDELTA = EMT.YPOS - LoadT
EMT.YDELTA = EMT.YPOS - EMT.TPOS
EMT.VDELTA = nil
end
-- eventuale preparazione per rotazione immediata
@@ -498,6 +495,8 @@ function OnMachiningEnd()
EMT.AUXTYPE = nil
EMT.U_STD = nil
EMT.PREVTOOL = EMT.TOOL
EMT.PREVHEAD = EMT.HEAD
EMT.PREVET = GetET( EMT.HEAD, EMT.TCPOS, EMT.R3)
end
---------------------------------------------------------------------
@@ -507,6 +506,12 @@ function OnPathStart()
-- primo posizionamento sempre in globale
EMT.REFLOC = nil
EMT.IPLGL = false
-- salvo precedenti rotanti
EMT.R1pp = EMT.R1p
EMT.R2pp = EMT.R2p
EMT.R3pp = EMT.R3p
-- reset valori precedenti (per forzare emissione di tutti gli assi del 1° movimento)
EmtResetPrev()
EMT.AUXCMD = {}
@@ -600,9 +605,14 @@ end
---------------------------------------------------------------------
function OnRapid()
-- recupero prossimo utensile
EMT.NEXTTOOL, EMT.NEXTHEAD, EMT.NEXTTCPOS = FindNextTool()
MyBackupAxes()
-- se primo movimento della lavorazione, gestione speciale
if EMT.MCHFIRST and not EMT.OPEISDISP then
-- primo posizionamento
local MyZHome = EgtGetAxisHomePos( 'Z')
local bZmax = ( #EMT.AUXSTR > 0 or EMT.TOOL ~= EMT.PREVTOOL or EMT.L3 > -1)
-- decido se muovere prima testa o carrelli (standard prima testa)
local bHeadFirst = true
local sLateG101
@@ -617,25 +627,80 @@ function OnRapid()
if not EMT.ZMAX and #EMT.AUXSTR > 0 then
EmitZmax()
EMT.ZMAX = true
bHeadFirst = false
end
end
local sET = GetET( EMT.HEAD, EMT.TCPOS, EMT.R3)
local bGoToHome = false
-- se gli assi rotanti cambiano parecchio, con motosega si va in parcheggio
if EMT.PREVHEAD == 'H3' and EMT.HEAD == 'H3' and ( sET ~= EMT.PREVET or abs( EMT.R2pp - EMT.R2) > 25 or abs( EMT.R1pp - EMT.R1) > 25) then
bGoToHome = true
end
-- ricavo i dati per la lavorazione
local sEE = ' EE' .. EgtIf( bZmax, '3', '4')
local sEL = ' EL' .. EmtLenToString( EgtIf( EMT.HEAD ~= 'H3', EMT.TLEN, ( EMT.TDIST or ChSawLen)), 3)
local sER = ' ER' .. EmtLenToString( EgtIf( EMT.HEAD ~= 'H3', EMT.TDIAM / 2, EMT.TLEN), 3)
local sES = ' ES'..EgtNumToString( EMT.S, 0)
-- se avevo motosega, torno in zona sicura senza ruotare assi rotanti
if not EMT.LOAD and EMT.PREVHEAD == 'H3' and EMT.FLAG2 == 1 then
-- se ho ancora motosega, si setta già asse C, altrimenti asse C per andare in home
local sOutPreMove = 'G101' .. ' X' .. EmtLenToString( -SafeXRotAxes, 3) .. ' Z' .. EmtLenToString( MyZHome, 3) ..
' B' .. EmtLenToString( EMT.R2pp, 3) .. ' C' .. EmtLenToString( EMT.R1pp, 3) ..
' EE' .. EgtIf( bZmax, '3', '4') .. EMT.PREVsEL .. EMT.PREVsER .. EMT.PREVsET .. EMT.PREVsES
EmtOutput( sOutPreMove)
sOutPreMove = 'G101' .. ' X' .. EmtLenToString( -SafeXRotAxes, 3) .. ' Z' .. EmtLenToString( MyZHome, 3) ..
' B' .. EmtLenToString( 0, 3) .. ' C' .. EmtLenToString( EMT.R1pp, 3) ..
' EE' .. EgtIf( bZmax, '3', '4') .. EMT.PREVsEL .. EMT.PREVsER .. EMT.PREVsET .. EMT.PREVsES
EmtOutput( sOutPreMove)
EmtOutput( 'G101 ET1001')
EmtOutput( 'G101 ET2001')
end
if not EMT.LOAD then
local sOut = string.gsub( string.gsub( EMT.MCHNAME..'/'..EMT.TOOL, '%(', '-'), '%)', '-')
EmtOutput( '( *** ' .. sOut .. ' *** )')
end
-- primo posizionamento
EmtResetPrev()
local bZmax = ( #EMT.AUXSTR > 0 or EMT.TOOL ~= EMT.PREVTOOL or EMT.L3 > -1)
local sEE = ' EE' .. EgtIf( bZmax, '3', '4')
local sEL = ' EL' .. EmtLenToString( EgtIf( EMT.HEAD ~= 'H3', EMT.TLEN, ( EMT.TDIST or ChSawLen)), 3)
local sER = ' ER' .. EmtLenToString( EgtIf( EMT.HEAD ~= 'H3', EMT.TDIAM / 2, EMT.TLEN), 3)
local sET = GetET( EMT.HEAD, EMT.TCPOS, EMT.R3)
local sES = ' ES'..EgtNumToString( EMT.S, 0)
local sOut = 'G101' .. EmtGetAxis( 'L2') .. EmtGetAxis( 'L3') ..
EmtGetAxis( 'R2') .. EmtGetAxis( 'R1') .. sEE .. sEL .. sER .. sET .. sES
if EMT.ST > BeamHeightForFixRot and EMT.FLAG2 == 1 then
sOut = sOut .. ' EH1'
-- se carico motosega, ruoto in zona sicura prima di approcciare la lavorazione
if EMT.HEAD == 'H3' and EMT.PREVHEAD ~= 'H3' then
local sOutPreMove = 'G101' .. ' X' .. EmtLenToString( -SafeXRotAxes, 3) .. ' Z' .. EmtLenToString( MyZHome, 3) ..
' B' .. EgtNumToString( 0, 3) .. ' C' .. EgtNumToString( EMT.R1, 3) .. sEE .. sEL .. sER .. sET .. sES
EmtOutput( sOutPreMove)
sOutPreMove = 'G101' .. ' X' .. EmtLenToString( -SafeXRotAxes, 3) .. ' Z' .. EmtLenToString( MyZHome, 3) ..
' B' .. EgtNumToString( EMT.R2, 3) .. ' C' .. EgtNumToString( EMT.R1, 3) .. sEE .. sEL .. sER .. sET .. sES
EmtOutput( sOutPreMove)
EmtOutput( 'G101 ET1001')
EmtOutput( 'G101 ET2001')
-- se carico motosega, ruoto in zona sicura prima di approcciare la lavorazione
elseif not EMT.LOAD and ( EMT.HEAD == 'H3' or ( bZmax and EMT.TTOTLEN > 200)) and
( EMT.ST > BeamHeightForFixRot or ( EMT.HEAD == 'H1' and EMT.TTOTLEN > 350) or bGoToHome) and EMT.FLAG2 == 1 then
local sOutPreMove
if EMT.HEAD == 'H3' and bGoToHome then
sOutPreMove = 'G101' .. ' X' .. EmtLenToString( -SafeXRotAxes, 3) .. ' Z' .. EmtLenToString( MyZHome, 3) ..
' B' .. EgtNumToString( 0, 3) .. ' C' .. EgtNumToString( EMT.R1, 3) .. sEE .. sEL .. sER .. sET .. sES
EmtOutput( sOutPreMove)
end
sOutPreMove = 'G101' .. ' X' .. EmtLenToString( -SafeXRotAxes, 3) .. ' Z' .. EmtLenToString( MyZHome, 3) ..
' B' .. EgtNumToString( EMT.R2, 3) .. ' C' .. EgtNumToString( EMT.R1, 3) .. sEE .. sEL .. sER .. sET .. sES
EmtOutput( sOutPreMove)
EmtOutput( 'G101 ET1001')
EmtOutput( 'G101 ET2001')
end
EmtResetPrev()
-- se sono su pezzi alti e movimento da emettere, per sicurezza a Z massima
local MyZPos = EMT.L3
if EMT.ST > BeamHeightForFixRot and EMT.FLAG2 == 1 then
MyZPos = MyZHome
end
local sOut = 'G101' .. EmtGetAxis( 'L2') .. ' Z' .. EmtLenToString( MyZPos, 3) ..
EmtGetAxis( 'R2') .. EmtGetAxis( 'R1') .. sEE .. sEL .. sER .. sET .. sES
-- faccio backup dati in caso mi servano per lavorazione successiva
EMT.PREVsEE = sEE ; EMT.PREVsEL = sEL ; EMT.PREVsER = sER ; EMT.PREVsET = sET ; EMT.PREVsES = sES
if EMT.LOAD or bHeadFirst then
sOut = sOut..' L0=0'
EmtOutput( sOut)
@@ -801,12 +866,47 @@ function OnRapid()
EmtAdjustRotaryAxes()
EmitZmax()
EMT.ZMAX = true
-- se pezzi alti e devo cambiare utensile su testa con CU, porto la testa vicino al cambio utensile
if EMT.ST > BeamHeightForFixRot and EMT.HEAD == 'H1' and EMT.TOOL ~= EMT.NEXTTOOL and EMT.NEXTHEAD ~= 'H2' then
local dBAxis = 90
local dCAxis = EgtIf( BD.RIGHT_LOAD, 90, -90)
local sEE = ' EE3'
local sEL = ' EL' .. EmtLenToString( EgtIf( EMT.HEAD ~= 'H3', EMT.TLEN, ( EMT.TDIST or ChSawLen)), 3)
local sER = ' ER' .. EmtLenToString( EgtIf( EMT.HEAD ~= 'H3', EMT.TDIAM / 2, EMT.TLEN), 3)
local sET = GetET( EMT.HEAD, EMT.TCPOS, EMT.R3)
local sES = ' ES'..EgtNumToString( EMT.S, 0)
local sOut = 'G101' .. EmtGetAxis( 'L2') .. EmtGetAxis( 'L3') ..' B' .. EgtNumToString( dBAxis, 3) ..
' C' .. EgtNumToString( dCAxis, 3) .. sEE .. sEL .. sER .. sET .. sES
EmtOutput( sOut)
EmtOutput( 'G101 ET1001')
EmtOutput( 'G101 ET2001')
sOut = 'G101' .. ' X' .. EmtLenToString( -SafeXRotAxes, 3) .. EmtGetAxis( 'L3') ..' B' .. EgtNumToString( dBAxis, 3) ..
' C' .. EgtNumToString( dCAxis, 3) .. sEE .. sEL .. sER .. sET .. sES
EmtOutput( sOut)
EmtOutput( 'G101 ET1001')
EmtOutput( 'G101 ET2001')
end
-- se altrimenti movimento in Home
elseif EMT.FLAG == 4 then
-- non previsto
-- se altrimenti rotazione a Z max
-- se altrimenti rotazione a Z max per lavorazione successiva
elseif EMT.FLAG == 5 then
-- viene gestito all'inizio della lavorazione successiva
EMT.REFLOC = nil
EMT.IPLGL = false
MyAdjustLinearAxes()
EmtAdjustRotaryAxes()
EmtResetPrev()
-- ricavo i dati per la lavorazione
local sEE = ' EE3'
local sEL = ' EL' .. EmtLenToString( EgtIf( EMT.HEAD ~= 'H3', EMT.TLEN, ( EMT.TDIST or ChSawLen)), 3)
local sER = ' ER' .. EmtLenToString( EgtIf( EMT.HEAD ~= 'H3', EMT.TDIAM / 2, EMT.TLEN), 3)
local sET = GetET( EMT.HEAD, EMT.TCPOS, EMT.R3)
local sES = ' ES'..EgtNumToString( EMT.S, 0)
local sOut = 'G101' .. EmtGetAxis( 'L2') .. EmtGetAxis( 'L3') ..
EmtGetAxis( 'R2') .. EmtGetAxis( 'R1') .. sEE .. sEL .. sER .. sET .. sES
EmtOutput( sOut)
EmtOutput( 'G101 ET1001')
EmtOutput( 'G101 ET2001')
-- altrimenti errore
else
EmtSetLastError( 1212, "Unknown Rapid flag")
@@ -898,13 +998,46 @@ function OnArc()
local sFeed = EmtGetFeed()
-- tipo arco
local sArc = 'G' .. EgtNumToString(EMT.MOVE,0)
-- emetto arco
EmtOutput( sArc..sAxes..sRad..sFeed)
-- se arco molto grande, approssimo con una retta
if EMT.RR > 99999 then
EmtOutput( "G1"..sAxes..sFeed)
else
EmtOutput( sArc..sAxes..sRad..sFeed)
end
-- aggiorno valori come precedenti
EmtUpdatePrev()
end
---------------------------------------------------------------------
function FindNextTool()
-- salvo stato iniziale
local CurrMachId = EgtGetCurrMachining()
local CurrTool = EgtTdbGetCurrToolParam( MCH_TP.NAME)
-- cerco lavorazione con utensile su gruppo testa indicato
local sTool, sHead, sTcPos
local OpId = EgtGetNextActiveOperation( CurrMachId or EMT.MCHID)
while OpId do
local nType = EgtGetOperationType( OpId)
if nType ~= MCH_OY.NONE and nType ~= MCH_OY.DISP then
if EgtSetCurrMachining( OpId) then
sTool = EgtGetMachiningParam( MCH_MP.TOOL)
if EgtTdbSetCurrTool( sTool) then
sHead = EgtTdbGetCurrToolParam( MCH_TP.HEAD)
sTcPos = EgtTdbGetCurrToolParam( MCH_TP.TCPOS)
break
end
end
end
OpId = EgtGetNextActiveOperation( OpId)
end
-- ripristino stato iniziale
EgtSetCurrMachining( CurrMachId or GDB_ID.NULL)
EgtTdbSetCurrTool( CurrTool or '')
-- restituisco risultato
return sTool, sHead, sTcPos
end
---------------------------------------------------------------------
function CalcCharStatus( sCmd, bSkipPress)
-- aperto
@@ -1215,7 +1348,7 @@ function PrepareUnload( sCmd)
table.insert( EMT.AUXCMD, sMsg)
if Cmd[2] == 'V' then
-- se non è ultima fase c'è una barra sulla pinza Y (1)
local sEE = EgtIf( EMT.PHASE == EgtGetPhaseCount(), '0', '1')
local sEE = EgtIf( EMT.PHASE == EgtGetPhaseCount() or IsEnd2Phase( EMT.PHASE), '0', '1')
local sOut = 'G111 '..Cmd[2]..Cmd[3]..' EC141 ED83 EE'..sEE..' EF'..GetFmaxClamp()
table.insert( EMT.AUXSTR, sOut)
end
@@ -1224,7 +1357,7 @@ function PrepareUnload( sCmd)
table.insert( EMT.AUXCMD, sMsg)
if Cmd[4] == 'V' then
-- se non è ultima fase c'è una barra sulla pinza Y (1)
local sEAB = EgtIf( EMT.PHASE == EgtGetPhaseCount(), '111', '112')
local sEAB = EgtIf( EMT.PHASE == EgtGetPhaseCount() or IsEnd2Phase( EMT.PHASE), '111', '112')
local sOut = 'G111 '..Cmd[4]..Cmd[5]..' EA'..sEAB..' EB'..sEAB..' EC142 ED141 EE2 EF'..GetFmaxClamp()
table.insert( EMT.AUXSTR, sOut)
EMT.U_STD = true
@@ -1384,10 +1517,13 @@ function PreparePostRotation( sCmd)
elseif nVDelta > 0 then
EMT.YDELTA = nil
EMT.VDELTA = nVDelta
end
local sYLoad = ' Y'..EmtLenToString( LoadT)
local sOut = 'G111'..sYLoad..' EA76'..EMT.SB..' EE0 EF'..EmtLenToString( EMT.FMAXPINZE,0)..' ET1'
table.insert( EMT.AUXSTR, sOut)
end
local sYLoad = ' Y'..EmtLenToString( LoadT)
local sOut = 'G111'..sYLoad..' EA76'..EMT.SB..' EE0 EF'..EmtLenToString( EMT.FMAXPINZE,0)..' ET1'
table.insert( EMT.AUXSTR, sOut)
-- setto parametri di pinzaggio reali
EMT.SA = ' EA110'
EMT.SE = ' EE1'
end
end
@@ -1429,10 +1565,13 @@ function MyAdjustLinearAxes()
if EMT.REFLOC then
local vtE
if EMT.HEAD ~= 'H3' then
-- su NUM aggregati non gestiti
if EMT.HEAD == 'H5' or EMT.HEAD == 'H6' or EMT.HEAD == 'H7' then
EmtSetLastError( 1211, "Aggregates not managed")
elseif EMT.HEAD ~= 'H3' then
local Len = EMT.TLEN + EgtIf( EMT.HEAD == 'H1', MillOffs, abs( SawOffs))
local LenRef = MillOffs
vtE = Vector3d( EMT.EXTR) * Len - Z_AX() * LenRef
vtE = Vector3d( EMT.TDIR) * Len - Z_AX() * LenRef
else
local LenAux = ( EMT.TDIST or ChSawLen) + MillOffs
local LenRef = MillOffs
@@ -1544,7 +1683,7 @@ end
---------------------------------------------------------------------
function GetET( sHead, sTcPos, dAxR3)
if sHead == 'H1' then
if sHead == 'H1' or sHead == 'H5' or sHead == 'H6' or sHead == 'H7' then
return ' E'..sTcPos
elseif sHead == 'H2' then
return ' ET42'
@@ -1,10 +1,13 @@
-- Processore macchina Essetre-FAST by EgalTech s.r.l. 2023/10/18
-- Processore standard macchine FAST by EgalWare s.r.l. 2024/02/23
-- Con controllo numerico NUM FlexiumPlus
-- 2022/09/20 DS ver 2.4i1 Prima versione.
-- 2023/04/19 DS ver 2.5d1 Al carico dopo rotazione su linea con EA75 messo EB110 invece di 112.
-- carico librerie
local INFO_STD_PP = require( 'Version')
local BD = require( 'BeamData')
-- Variabili di modulo
local MLE_INFO = 'Essetre-FAST.NUM_PLUS.mlpe ver.'..PP_VER..' by EgalTech s.r.l.'
local CSP_INFO = INFO_STD_PP.NAME..'_'..NumericalControl..' ver.'..INFO_STD_PP.VERSION..' by EgalWare s.r.l.'
local MACHINE_INFO = MACH_NAME..' ver.'..PP_VER
local TEST_USE = false
---------------------------------------------------------------------
@@ -24,7 +27,9 @@ function OnStart()
--EMT.LINEINC = 1 -- incremento numerazione linee
--EMT.Ft = 'F' -- token per feed
--EMT.St = 'S' -- token per speed
EMT.FMAXPINZE = 154000 -- feed massima pinze
EMT.FMAXPINZE = EgtClamp( MaxFeedPinze or 154000, 20000, 160000) -- feed massima pinze
EMT.MAXACC = MaxAcc or ( EMT.FMAXPINZE / ( 60 * 0.3)) -- accelerazione massima pinze
EMT.MINACC = MinAcc or ( EMT.FMAXPINZE / ( 60 * 4)) -- accelerazione minima pinze
end
---------------------------------------------------------------------
@@ -39,12 +44,18 @@ function OnProgramStart()
local BtlInfoId = EgtGetFirstNameInGroup( GDB_ID.ROOT, 'BtlInfo') or EgtGetCurrMachGroup() or GDB_ID.NULL
local nPatt = EgtGetInfo( BtlInfoId, 'PATTID', 'i') or 40
EmtOutput( '%'..EgtNumToString( nPatt, 0)..'.0')
-- 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
if EMT.INFO then
EmtOutput( '('..EMT.INFO..')')
EmtOutput( sPrefixCommentLine..'('..EMT.INFO..')')
else
EmtOutput( '(Program Start)')
end
EmtOutput( '('.. MLE_INFO..')\n')
EmtOutput( sPrefixCommentLine..'('.. CSP_INFO..')')
EmtOutput( sPrefixCommentLine..'('.. MACHINE_INFO..')\n')
EmtOutput( '(HEADER)')
-- Se modalità test, aggiungo linee per muovere tappeto e alzare la testa (in automatico viene fatto dal main residente)
if TEST_USE then
EmtOutput( 'M28')
@@ -100,6 +111,7 @@ function OnProgramEnd()
EMT.FALL = nil
EMT.RELOAD = nil
EMT.RELOAD2 = nil
EmtOutput( '(FOOTER)')
-- Se modalità test, termino il programma
if TEST_USE then
EmtOutput( 'M02')
@@ -130,6 +142,18 @@ function OnToolData()
if EMT.TDIST and abs( EMT.TDIST) < 0.1 then EMT.TDIST = nil end
local sOut = 'L11='..EgtNumToString( EMT.SMAX, 0)..' L12='..EmtLenToString( ( EMT.TDIST or ChSawLen), 1)..' G76H9998.1N301N304'
EmtOutput( sOut)
-- emissione dati rinvio
elseif EMT.HEAD == 'H5' or EMT.HEAD == 'H6' then
local nPos = EgtIf( EMT.HEAD == 'H5', 91, 93)
if EMT.EXIT == 2 then nPos = nPos + 1 end
local sPos = 'N2' .. tostring(nPos)
local sOut = 'L11=' .. EmtLenToString( EMT.SMAX, 3) .. ' L12=' .. EmtLenToString( AngTr1Offs, 1)..' G76H9998.1'..sPos..sPos
EmtOutput( sOut)
-- emissione dati sega a catena
elseif EMT.HEAD == 'H7' then
local sOut = 'L11='..EgtNumToString( EMT.SMAX, 0)..' L12='..EmtLenToString( ( 154.5), 1)..' G76H9998.1N121N121'
EmtOutput( sOut)
-- altro non previsto
end
end
@@ -148,7 +172,7 @@ function OnDispositionStart()
' EG'..EmtLenToString( SawOffs, 2)..' EI'..EmtLenToString( ParkY, 2)..' EL'..EmtLenToString( ParkV, 2)..
' EM'..EmtLenToString( TurnerOffs, 2)..' EN'..EmtLenToString( -DeltaTabY, 2)..' EO'..EmtLenToString( DeltaTabZ, 2)
if SecondSupport >= 3 then
sOut = sOut ..' EP'..EmtLenToString( AngTr1Len, 2) ..' EQ'..EmtLenToString( AngTr1Offs + MillOffs,2)
sOut = sOut ..' EP'..EmtLenToString( AngTr1Len, 2) ..' EQ'..EmtLenToString( AngTr1Offs,2)
end
EmtOutput( '\n' .. sOut .. '\n')
-- carico barra
@@ -183,9 +207,9 @@ function OnDispositionEnd()
local BtlInfoId = EgtGetFirstNameInGroup( GDB_ID.ROOT, 'BtlInfo') or EgtGetCurrMachGroup() or GDB_ID.NULL
local nLoad90 = EgtGetInfo( BtlInfoId, 'LOAD90', 'i') or 0
-- calcolo dati pinze
local AccPinze, AccMaxPinze, RidFeed, TempoAcc = CalcDinamicaPinze( HTrave, STrave, LBarra)
local AccPinz1, AccMaxPinz1, RidFeed1, TempoAcc1 = CalcDinamicaPinze( HTrave, STrave, LBarra - LTrave)
local AccPinz2, AccMaxPinz2, RidFeed2, TempoAcc2 = CalcDinamicaPinze( HTrave, STrave, LTrave)
local AccPinze, AccMaxPinze, RidFeed, TempoAcc = CalcDinamicaPinze_NUM( HTrave, STrave, LBarra)
local AccPinz1, AccMaxPinz1, RidFeed1, TempoAcc1 = CalcDinamicaPinze_NUM( HTrave, STrave, LBarra - LTrave)
local AccPinz2, AccMaxPinz2, RidFeed2, TempoAcc2 = CalcDinamicaPinze_NUM( HTrave, STrave, LTrave)
if IdTrave >= 0 then
local sOut = '( SN='..IdTrave..' LBarra='..EmtLenToString( LBarra, 3)..' L='..EmtLenToString( LTrave, 3)..
' H='..EmtLenToString( HTrave, 3)..' S='..EmtLenToString( STrave, 3)..' Acc='..EgtNumToString( TempoAcc, 1)..
@@ -249,9 +273,9 @@ function OnDispositionEnd()
EmtOutput( sOut)
-- altrimenti recupero rimanenza
else
EmtOutput( 'G112 EC1'..' Y'..EmtLenToString( LoadT, 3).. ' EY'..EmtLenToString( EMT.YPOS, 3)..' EV'..EmtLenToString( ParkV, 3) ..' EF'..GetFmaxClamp())
EmtOutput( 'G112 EC1'..' Y'..EmtLenToString( EMT.TPOS, 3).. ' EY'..EmtLenToString( EMT.YPOS, 3)..' EV'..EmtLenToString( ParkV, 3) ..' EF'..GetFmaxClamp())
-- aggiorno dati aggancio carrelli alla trave
EMT.YDELTA = EMT.YPOS - LoadT
EMT.YDELTA = EMT.YPOS - EMT.TPOS
EMT.VDELTA = nil
end
-- eventuale preparazione per rotazione immediata
@@ -415,6 +439,10 @@ function OnMachiningStart()
-- sistemazione speed
if EMT.HEAD == 'H2' then
EMT.S = EMT.S * 6
elseif EMT.HEAD == 'H5' and EMT.EXIT == 1 then
EMT.S = -EMT.S
elseif EMT.HEAD == 'H6' and EMT.EXIT == 1 then
EMT.S = -EMT.S
end
-- determino subito se taglio di separazione di pezzo a caduta
EMT.PREFALLCUT = nil
@@ -469,7 +497,7 @@ function OnMachiningEnd()
end
for i = 1, #EMT.AUXSTR do
local sOut = EMT.AUXSTR[i]
if EMT.AUXTYPE == 'S' then
if EMT.AUXTYPE == 'S' and sOut:find( 'G101 ') then
sOut = sOut .. ' EH1'
elseif EMT.AUXTYPE == 'U' and not EMT.CHY_ON and not sOut:find( 'ET') then
sOut = sOut .. ' ET2'
@@ -514,7 +542,9 @@ function OnMachiningEnd()
EMT.AUXTYPE = nil
EMT.U_STD = nil
EMT.PREVTOOL = EMT.TOOL
EMT.PREVHEAD = EMT.HEAD
EMT.PREVR3 = EMT.R3
EMT.PREVET = GetET( EMT.HEAD, EMT.TCPOS, EMT.R3)
end
---------------------------------------------------------------------
@@ -524,6 +554,12 @@ function OnPathStart()
-- primo posizionamento sempre in globale
EMT.REFLOC = nil
EMT.IPLGL = false
-- salvo precedenti rotanti
EMT.R1pp = EMT.R1p
EMT.R2pp = EMT.R2p
EMT.R3pp = EMT.R3p
-- reset valori precedenti (per forzare emissione di tutti gli assi del 1° movimento)
EmtResetPrev()
EMT.AUXCMD = {}
@@ -617,9 +653,14 @@ end
---------------------------------------------------------------------
function OnRapid()
-- recupero prossimo utensile
EMT.NEXTTOOL, EMT.NEXTHEAD, EMT.NEXTTCPOS = FindNextTool()
MyBackupAxes()
-- se primo movimento della lavorazione, gestione speciale
if EMT.MCHFIRST and not EMT.OPEISDISP then
-- primo posizionamento
local MyZHome = EgtGetAxisHomePos( 'Z')
local bZmax = ( #EMT.AUXSTR > 0 or EMT.TOOL ~= EMT.PREVTOOL or EMT.L3 > -1)
-- decido se muovere prima testa o carrelli (standard prima testa)
local bHeadFirst = true
local sLateG101
@@ -635,25 +676,103 @@ function OnRapid()
EmitZmax( EMT.TOOL ~= EMT.PREVTOOL)
EMT.ZMAX = true
EMT.PREVTOOL = EMT.TOOL
bHeadFirst = false
end
end
local sET = GetET( EMT.HEAD, EMT.TCPOS, EMT.R3)
local bGoToHome = false
-- se gli assi rotanti cambiano parecchio, con motosega si va in parcheggio
if EMT.PREVHEAD == 'H3' and EMT.HEAD == 'H3' and ( sET ~= EMT.PREVET or abs( EMT.R2pp - EMT.R2) > 25 or abs( EMT.R1pp - EMT.R1) > 25) then
bGoToHome = true
end
-- ricavo i dati per la lavorazione
local sEE = ' EE' .. EgtIf( bZmax, '3', '4')
local sEL = ' EL'
-- se motosega
if EMT.HEAD == 'H3' then
sEL = sEL..EmtLenToString( ( EMT.TDIST or ChSawLen), 3)
-- se aggregato
elseif EMT.HEAD == 'H5' or EMT.HEAD == 'H6' or EMT.HEAD == 'H7' then
sEL = sEL..EmtLenToString( AngTr1Offs, 3)
-- se testa normale ( H1 or H2)
else
sEL = sEL..EmtLenToString( EMT.TLEN, 3)
end
local sER = ' ER'
-- se motosega
if EMT.HEAD == 'H3' then
sER = sER..EmtLenToString( EMT.TLEN, 3)
-- se aggregato
elseif EMT.HEAD == 'H5' or EMT.HEAD == 'H6' or EMT.HEAD == 'H7' then
sER = sER..EmtLenToString( EMT.TLEN + AngTr1Len, 3)
-- se testa normale ( H1 or H2)
else
sER = sER..EmtLenToString( EMT.TDIAM / 2, 3)
end
local sES = ' ES'..EgtNumToString( EMT.S, 0)
-- se avevo motosega, torno in zona sicura senza ruotare assi rotanti
if not EMT.LOAD and EMT.PREVHEAD == 'H3' and EMT.FLAG2 == 1 then
-- se ho ancora motosega, si setta già asse C, altrimenti asse C per andare in home
local sOutPreMove = 'G101' .. ' X' .. EmtLenToString( -SafeXRotAxes, 3) .. ' Z' .. EmtLenToString( MyZHome, 3) ..
' B' .. EmtLenToString( EMT.R2pp, 3) .. ' C' .. EmtLenToString( EMT.R1pp, 3) ..
' EE' .. EgtIf( bZmax, '3', '4') .. EMT.PREVsEL .. EMT.PREVsER .. EMT.PREVsET .. EMT.PREVsES
EmtOutput( sOutPreMove)
sOutPreMove = 'G101' .. ' X' .. EmtLenToString( -SafeXRotAxes, 3) .. ' Z' .. EmtLenToString( MyZHome, 3) ..
' B' .. EmtLenToString( 0, 3) .. ' C' .. EmtLenToString( EMT.R1pp, 3) ..
' EE' .. EgtIf( bZmax, '3', '4') .. EMT.PREVsEL .. EMT.PREVsER .. EMT.PREVsET .. EMT.PREVsES
EmtOutput( sOutPreMove)
EmtOutput( 'G101 ET1001')
EmtOutput( 'G101 ET2001')
end
if not EMT.LOAD then
local sOut = string.gsub( string.gsub( EMT.MCHNAME..'/'..EMT.TOOL, '%(', '-'), '%)', '-')
EmtOutput( '( *** ' .. sOut .. ' *** )')
end
-- primo posizionamento
EmtResetPrev()
local bZmax = ( #EMT.AUXSTR > 0 or EMT.TOOL ~= EMT.PREVTOOL or EMT.L3 > -1)
local sEE = ' EE' .. EgtIf( bZmax, '3', '4')
local sEL = ' EL' .. EmtLenToString( EgtIf( EMT.HEAD ~= 'H3', EMT.TLEN, ( EMT.TDIST or ChSawLen)), 3)
local sER = ' ER' .. EmtLenToString( EgtIf( EMT.HEAD ~= 'H3', EMT.TDIAM / 2, EMT.TLEN), 3)
local sET = GetET( EMT.HEAD, EMT.TCPOS, EMT.R3)
local sES = ' ES'..EgtNumToString( EMT.S, 0)
local sOut = 'G101' .. EmtGetAxis( 'L2') .. EmtGetAxis( 'L3') ..
EmtGetAxis( 'R2') .. EmtGetAxis( 'R1') .. sEE .. sEL .. sER .. sET .. sES
if EMT.ST > BeamHeightForFixRot and EMT.FLAG2 == 1 then
sOut = sOut .. ' EH1'
-- se carico motosega, ruoto in zona sicura prima di approcciare la lavorazione
if EMT.HEAD == 'H3' and EMT.PREVHEAD ~= 'H3' then
local sOutPreMove = 'G101' .. ' X' .. EmtLenToString( -SafeXRotAxes, 3) .. ' Z' .. EmtLenToString( MyZHome, 3) ..
' B' .. EgtNumToString( 0, 3) .. ' C' .. EgtNumToString( EMT.R1, 3) .. sEE .. sEL .. sER .. sET .. sES
EmtOutput( sOutPreMove)
sOutPreMove = 'G101' .. ' X' .. EmtLenToString( -SafeXRotAxes, 3) .. ' Z' .. EmtLenToString( MyZHome, 3) ..
' B' .. EgtNumToString( EMT.R2, 3) .. ' C' .. EgtNumToString( EMT.R1, 3) .. sEE .. sEL .. sER .. sET .. sES
EmtOutput( sOutPreMove)
EmtOutput( 'G101 ET1001')
EmtOutput( 'G101 ET2001')
-- ruoto in zona sicura prima di approcciare la lavorazione
elseif not EMT.LOAD and ( EMT.HEAD == 'H3' or ( bZmax and EMT.TTOTLEN > 200)) and
( EMT.ST > BeamHeightForFixRot or ( EMT.HEAD == 'H1' and EMT.TTOTLEN > 350) or bGoToHome) and EMT.FLAG2 == 1 then
local sOutPreMove
if EMT.HEAD == 'H3' and bGoToHome then
sOutPreMove = 'G101' .. ' X' .. EmtLenToString( -SafeXRotAxes, 3) .. ' Z' .. EmtLenToString( MyZHome, 3) ..
' B' .. EgtNumToString( 0, 3) .. ' C' .. EgtNumToString( EMT.R1, 3) .. sEE .. sEL .. sER .. sET .. sES
EmtOutput( sOutPreMove)
end
sOutPreMove = 'G101' .. ' X' .. EmtLenToString( -SafeXRotAxes, 3) .. ' Z' .. EmtLenToString( MyZHome, 3) ..
' B' .. EgtNumToString( EMT.R2, 3) .. ' C' .. EgtNumToString( EMT.R1, 3) .. sEE .. sEL .. sER .. sET .. sES
EmtOutput( sOutPreMove)
EmtOutput( 'G101 ET1001')
EmtOutput( 'G101 ET2001')
end
EmtResetPrev()
-- se sono su pezzi alti e movimento da emettere, per sicurezza a Z massima
local MyZPos = EMT.L3
if EMT.ST > BeamHeightForFixRot and EMT.FLAG2 == 1 then
MyZPos = MyZHome
end
local sOut = 'G101' .. EmtGetAxis( 'L2') .. ' Z' .. EmtLenToString( MyZPos, 3) ..
EmtGetAxis( 'R2') .. EmtGetAxis( 'R1') .. sEE .. sEL .. sER .. sET .. sES
-- faccio backup dati in caso mi servano per lavorazione successiva
EMT.PREVsEE = sEE ; EMT.PREVsEL = sEL ; EMT.PREVsER = sER ; EMT.PREVsET = sET ; EMT.PREVsES = sES
if EMT.LOAD or bHeadFirst then
sOut = sOut .. ' L0=0'
if EMT.LOAD or #EMT.AUXSTR > 0 then
@@ -765,7 +884,7 @@ function OnRapid()
sOut = 'G112 EA'..sA..' EB'..sB..EmtGetAxis('L1')..' EY'..sY..' EV'..sV..' EF'..GetFmaxClamp()
EmtOutput( sOut)
-- se taglio di coda senza residuo da scaricare, emetto M175 per accelerare il carico della barra successiva
if EMT.MCHUSERNOTES and EMT.MCHUSERNOTES:find( 'Cut') then
if EMT.MCHUSERNOTES and EMT.MCHUSERNOTES:find( 'Cut') and ( IsEndPhase( EMT.PHASE+1) or IsEnd2Phase( EMT.PHASE+1)) then
EmtOutput( '(M175)')
end
if not bHeadFirst then
@@ -829,12 +948,47 @@ function OnRapid()
EmtAdjustRotaryAxes()
EmitZmax( false)
EMT.ZMAX = true
-- se pezzi alti e devo cambiare utensile su testa con CU, porto la testa vicino al cambio utensile
if EMT.ST > BeamHeightForFixRot and EMT.HEAD == 'H1' and EMT.TOOL ~= EMT.NEXTTOOL and EMT.NEXTHEAD ~= 'H2' then
local dBAxis = 90
local dCAxis = EgtIf( BD.RIGHT_LOAD, 90, -90)
local sEE = ' EE3'
local sEL = ' EL' .. EmtLenToString( EgtIf( EMT.HEAD ~= 'H3', EMT.TLEN, ( EMT.TDIST or ChSawLen)), 3)
local sER = ' ER' .. EmtLenToString( EgtIf( EMT.HEAD ~= 'H3', EMT.TDIAM / 2, EMT.TLEN), 3)
local sET = GetET( EMT.HEAD, EMT.TCPOS, EMT.R3)
local sES = ' ES'..EgtNumToString( EMT.S, 0)
local sOut = 'G101' .. EmtGetAxis( 'L2') .. EmtGetAxis( 'L3') ..' B' .. EgtNumToString( dBAxis, 3) ..
' C' .. EgtNumToString( dCAxis, 3) .. sEE .. sEL .. sER .. sET .. sES
EmtOutput( sOut)
EmtOutput( 'G101 ET1001')
EmtOutput( 'G101 ET2001')
sOut = 'G101' .. ' X' .. EmtLenToString( -SafeXRotAxes, 3) .. EmtGetAxis( 'L3') ..' B' .. EgtNumToString( dBAxis, 3) ..
' C' .. EgtNumToString( dCAxis, 3) .. sEE .. sEL .. sER .. sET .. sES
EmtOutput( sOut)
EmtOutput( 'G101 ET1001')
EmtOutput( 'G101 ET2001')
end
-- se altrimenti movimento in Home
elseif EMT.FLAG == 4 then
-- non previsto
-- se altrimenti rotazione a Z max
-- se altrimenti rotazione a Z max per lavorazione successiva
elseif EMT.FLAG == 5 then
-- viene gestito all'inizio della lavorazione successiva
EMT.REFLOC = nil
EMT.IPLGL = false
MyAdjustLinearAxes()
EmtAdjustRotaryAxes()
EmtResetPrev()
-- ricavo i dati per la lavorazione
local sEE = ' EE3'
local sEL = ' EL' .. EmtLenToString( EgtIf( EMT.HEAD ~= 'H3', EMT.TLEN, ( EMT.TDIST or ChSawLen)), 3)
local sER = ' ER' .. EmtLenToString( EgtIf( EMT.HEAD ~= 'H3', EMT.TDIAM / 2, EMT.TLEN), 3)
local sET = GetET( EMT.HEAD, EMT.TCPOS, EMT.R3)
local sES = ' ES'..EgtNumToString( EMT.S, 0)
local sOut = 'G101' .. EmtGetAxis( 'L2') .. EmtGetAxis( 'L3') ..
EmtGetAxis( 'R2') .. EmtGetAxis( 'R1') .. sEE .. sEL .. sER .. sET .. sES
EmtOutput( sOut)
EmtOutput( 'G101 ET1001')
EmtOutput( 'G101 ET2001')
-- altrimenti errore
else
EmtSetLastError( 1212, "Unknown Rapid flag")
@@ -900,6 +1054,11 @@ end
---------------------------------------------------------------------
function OnArc()
-- con aggregato non si possono fare archi. Deve essere tutto spezzato
if EMT.HEAD == 'H5' or EMT.HEAD == 'H6' or EMT.HEAD == 'H7' then
EmtSetLastError( 1211, "With aggregate, the arcs must be splitted")
end
MyBackupAxes()
EMT.TLAST = EMT.L1
-- non modale su archi
@@ -926,33 +1085,44 @@ function OnArc()
local sFeed = EmtGetFeed()
-- tipo arco
local sArc = 'G' .. EgtNumToString(EMT.MOVE,0)
-- emetto arco
EmtOutput( sArc..sAxes..sRad..sFeed)
-- se arco molto grande, approssimo con una retta
if EMT.RR > 99999 then
EmtOutput( "G1"..sAxes..sFeed)
else
EmtOutput( sArc..sAxes..sRad..sFeed)
end
-- aggiorno valori come precedenti
EmtUpdatePrev()
end
---------------------------------------------------------------------
function CalcDinamicaPinze( dH, dS, dL)
local MinTempoAcc = 0.3 -- [s]
local MaxTempoAcc = 4.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
function FindNextTool()
-- salvo stato iniziale
local CurrMachId = EgtGetCurrMachining()
local CurrTool = EgtTdbGetCurrToolParam( MCH_TP.NAME)
-- cerco lavorazione con utensile su gruppo testa indicato
local sTool, sHead, sTcPos
local OpId = EgtGetNextActiveOperation( CurrMachId or EMT.MCHID)
while OpId do
local nType = EgtGetOperationType( OpId)
if nType ~= MCH_OY.NONE and nType ~= MCH_OY.DISP then
if EgtSetCurrMachining( OpId) then
sTool = EgtGetMachiningParam( MCH_MP.TOOL)
if EgtTdbSetCurrTool( sTool) then
sHead = EgtTdbGetCurrToolParam( MCH_TP.HEAD)
sTcPos = EgtTdbGetCurrToolParam( MCH_TP.TCPOS)
break
end
end
end
OpId = EgtGetNextActiveOperation( OpId)
end
return AccPinze, AccMaxPinze, RidFeed, TempoAcc
-- ripristino stato iniziale
EgtSetCurrMachining( CurrMachId or GDB_ID.NULL)
EgtTdbSetCurrTool( CurrTool or '')
-- restituisco risultato
return sTool, sHead, sTcPos
end
---------------------------------------------------------------------
@@ -1265,7 +1435,7 @@ function PrepareUnload( sCmd)
table.insert( EMT.AUXCMD, sMsg)
if Cmd[2] == 'V' then
-- se non è ultima fase c'è una barra sulla pinza Y (1)
local sEE = EgtIf( EMT.PHASE == EgtGetPhaseCount(), '0', '1')
local sEE = EgtIf( EMT.PHASE == EgtGetPhaseCount() or IsEnd2Phase( EMT.PHASE), '0', '1')
local sOut = 'G111 '..Cmd[2]..Cmd[3]..' EC141 ED83 EE'..sEE..' EF'..GetFmaxClamp()
table.insert( EMT.AUXSTR, sOut)
end
@@ -1274,7 +1444,7 @@ function PrepareUnload( sCmd)
table.insert( EMT.AUXCMD, sMsg)
if Cmd[4] == 'V' then
-- se non è ultima fase c'è una barra sulla pinza Y (1)
local sEAB = EgtIf( EMT.PHASE == EgtGetPhaseCount(), '111', '112')
local sEAB = EgtIf( EMT.PHASE == EgtGetPhaseCount() or IsEnd2Phase( EMT.PHASE), '111', '112')
local sOut = 'G111 '..Cmd[4]..Cmd[5]..' EA'..sEAB..' EB'..sEAB..' EC142 ED141 EE2 EF'..GetFmaxClamp()
table.insert( EMT.AUXSTR, sOut)
EMT.U_STD = true
@@ -1434,10 +1604,13 @@ function PreparePostRotation( sCmd)
elseif nVDelta > 0 then
EMT.YDELTA = nil
EMT.VDELTA = nVDelta
end
local sYLoad = ' Y'..EmtLenToString( LoadT)
local sOut = 'G111'..sYLoad..' EA76'..EMT.SB..' EE0 EF'..EmtLenToString( EMT.FMAXPINZE,0)..' ET1'
table.insert( EMT.AUXSTR, sOut)
end
local sYLoad = ' Y'..EmtLenToString( LoadT)
local sOut = 'G111'..sYLoad..' EA76'..EMT.SB..' EE0 EF'..EmtLenToString( EMT.FMAXPINZE,0)..' ET1'
table.insert( EMT.AUXSTR, sOut)
-- setto parametri di pinzaggio reali
EMT.SA = ' EA110'
EMT.SE = ' EE1'
end
end
@@ -1479,16 +1652,29 @@ function MyAdjustLinearAxes()
if EMT.REFLOC then
local vtE
if EMT.HEAD ~= 'H3' then
if EMT.HEAD == 'H1' or EMT.HEAD == 'H2' then
local Len = EMT.TLEN + EgtIf( EMT.HEAD == 'H1', MillOffs, abs( SawOffs))
local LenRef = MillOffs
vtE = Vector3d( EMT.EXTR) * Len - Z_AX() * LenRef
else
vtE = Vector3d( EMT.TDIR) * Len - Z_AX() * LenRef
elseif EMT.HEAD == 'H3' then
local LenAux = ( EMT.TDIST or ChSawLen) + MillOffs
local LenRef = MillOffs
local vtAux = EgtGetCalcAuxDirFromAngles( EMT.R1, EMT.R2, EMT.R3)
vtE = vtAux * LenAux - Z_AX() * LenRef
elseif EMT.HEAD == 'H5' or EMT.HEAD == 'H6' then
local LenAux = AngTr1Offs + MillOffs
local LenRef = MillOffs
local vtAux = EgtGetCalcAuxDirFromAngles( EMT.R1, EMT.R2, EMT.R3)
vtE = vtAux * LenAux - Z_AX() * LenRef
elseif EMT.HEAD == 'H7' then
local LenAux = AngTrBHOffs + MillOffs
local LenRef = MillOffs
local vtAux = EgtGetCalcAuxDirFromAngles( EMT.R1, EMT.R2, EMT.R3)
vtE = vtAux * LenAux - Z_AX() * LenRef
else
EmtSetLastError( 1211, 'Head not allowed ' .. EMT.HEAD)
end
EMT.L1 = EMT.L1 - vtE:getX()
EMT.L2 = EMT.L2 - DeltaTabY - vtE:getY()
EMT.L3 = EMT.L3 - DeltaTabZ - vtE:getZ()
@@ -1528,7 +1714,7 @@ function CalcInterpPlane()
local ptS = Point3d( xS, 0, 0)
-- calcolo per piano generico
local vtE
if EMT.HEAD ~= 'H3' then
if EMT.HEAD == 'H1' or EMT.HEAD == 'H2' then
vtE = Vector3d( EMT.EXTR)
else
vtE = EgtGetCalcAuxDirFromAngles( EMT.R1, EMT.R2, EMT.R3)
@@ -1579,7 +1765,7 @@ end
---------------------------------------------------------------------
function GetET( sHead, sTcPos, dAxR3)
if sHead == 'H1' then
if sHead == 'H1' or sHead == 'H5' or sHead == 'H6' or sHead == 'H7' then
return ' E'..sTcPos
elseif sHead == 'H2' then
return ' ET42'
+242 -84
View File
@@ -1,29 +1,13 @@
-- Processore macchina Essetre-FAST by EgalTech s.r.l. 2023/10/18
-- Processore standard macchine FAST by EgalWare s.r.l. 2024/02/23
-- Con controllo numerico TPA
-- 2020/03/23 DS ver.2.2c3 Nei movimenti interpolati si usano 5 decimali, nei G24 6 decimali.
-- 2020/04/27 DS ver.2.2d3 Aggiunta gestione scarico speciale senza spostamento finale pezzo.
-- 2020/04/30 DS ver.2.2d5 Modifiche a scarico manuale.
-- 2020/05/19 DS ver.2.2e2 Modifiche per rotazione 90 gradi.
-- 2020/05/27 DS ver.2.2e6 Aggiunta gestione ordine posizionamento iniziale testa e carrelli quando non è Zmax.
-- 2020/06/10 DS ver.2.2f1 Aggiunta emissione di pezzo finito (M113..) dopo pezzo caduto (M155).
-- 2020/06/11 DS ver 2.2f2 Nel contenuto dei commenti si sostituiscono le parentesi tonde con le quadre.
-- 2020/09/03 DS ver 2.2i1 A M114 aggiunti P11 e P12. Modificato M102 P1=. Modificati commenti.
-- 2020/09/16 DS ver 2.2i2 OFFSETX e OFFSETZ da TS3v7 ora devono contenere tutto lo spiazzamento non più solo il delta dal nominale.
-- 2020/09/17 DS ver 2.2i3 Correzione per il segno di OFFSETX.
-- 2021/01/08 DS ver 2.3a1 M115 esteso con P6 e usato per ogni pezzo. Eliminati 0 inutili.
-- 2021/04/07 DS ver 2.3d2 Gestione risalita Zmax (M116) anche allo scarico.
-- 2021/04/23 DS ver 2.3d3 Se non c'è BtlInfo cerco il gruppo di lavoro corrente.
-- 2021/05/25 DS ver 2.3e3 Aggiunta gestione rapido con Flag=5.
-- 2021/06/04 DS ver 2.3f2 Gestione parametro P12=1 su M101 per ruotare in alto quando necessario.
-- 2021/07/21 DS ver 2.3g5 Si imposta LOAD90 su tutti i pezzi di una barra tramite M115. Aggiunto M29 prima di taglio di pezzo a caduta.
-- 2021/08/03 DS ver 2.3h3 Aggiunto arresto preciso negli angoli (G9) in fresature con utensili di piccolo diametro.
-- 2022/01/21 DS ver 2.4a1 In V07 si imposta nLoad90.
-- 2022/04/14 DS ver 2.4d2 Si programma G9 (arresto preciso) in fondo al foro.
-- 2023/03/20 DS ver 2.5c1 Modifiche a AdjustTcPos per utensile BH su T42 e lama su T111.
-- 2023/04/19 DS ver 2.5d1 Al carico dopo rotazione su linea con P4=75 messo P5=110 invece di 112.
-- carico librerie
local INFO_STD_PP = require( 'Version')
local BD = require( 'BeamData')
-- Variabili di modulo
local MLE_INFO = 'Essetre-FAST.TPA.mlpe ver.'..PP_VER..' by EgalTech s.r.l.'
local CSP_INFO = INFO_STD_PP.NAME..'_'..NumericalControl..' ver.'..INFO_STD_PP.VERSION..' by EgalWare s.r.l.'
local MACHINE_INFO = MACH_NAME..' ver.'..PP_VER
local TEST_USE = false
---------------------------------------------------------------------
@@ -37,14 +21,19 @@ function OnStart()
EMT.USETO1 = false -- abilitazione uso origine tavola
EMT.MODAL = true -- abilitazione emissione modale
EMT.INCHES = false -- unità di misura mm/inches
EMT.DECNUM = 5 -- numero di decimali dopo la virgola
EMT.DECNUM = 4 -- numero di decimali dopo la virgola
EMT.DECVERS = 6 -- numero di decimali dopo la virgola per versori
EMT.DECRAD = 4 -- numero di decimali dopo la virgola per raggio
EMT.DECMACRO = 3 -- numero di decimali dopo la virgola per macro
EMT.NUM = false -- abilitazione numerazione linee
--EMT.Nt = 'N' -- token per la numerazione di linea
--EMT.LINENBR = 0 -- numero di linea
--EMT.LINEINC = 1 -- incremento numerazione linee
--EMT.Ft = 'F' -- token per feed
--EMT.St = 'S' -- token per speed
EMT.FMAXPINZE = 154000 -- feed massima pinze
--EMT.Nt = 'N' -- token per la numerazione di linea
--EMT.LINENBR = 0 -- numero di linea
--EMT.LINEINC = 1 -- incremento numerazione linee
--EMT.Ft = 'F' -- token per feed
--EMT.St = 'S' -- token per speed
EMT.FMAXPINZE = EgtClamp( MaxFeedPinze or 154000, 20000, 160000) -- feed massima pinze
EMT.MAXACC = MaxAcc or 4000 -- accelerazione massima pinze. In realtà è il tempo in millisecondi, quindi MAXACC corrisponde al tempo massimo per raggiungere la velocità desiderata
EMT.MINACC = MinAcc or 300 -- accelerazione minima pinze. In realtà è il tempo in millisecondi, quindi MINACC corrisponde al tempo massimo per raggiungere la velocità desiderata
end
---------------------------------------------------------------------
@@ -55,13 +44,20 @@ 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
ParkLine( '('..EMT.INFO..')')
ParkLine( sPrefixCommentLine..'('..EMT.INFO..')')
else
ParkLine( '(Program Start)')
end
ParkLine( '('.. MLE_INFO..')')
ParkLine( sPrefixCommentLine..'('.. CSP_INFO..')')
ParkLine( sPrefixCommentLine..'('.. MACHINE_INFO..')')
ParkLine( '(HEADER)')
-- Se modalità test, aggiungo linee per muovere tappeto e alzare la testa (in automatico viene fatto dal main residente)
if TEST_USE then
ParkLine( 'M199')
@@ -118,6 +114,7 @@ function OnProgramEnd()
EMT.FALL = nil
EMT.RELOAD = nil
EMT.RELOAD2 = nil
EmtOutput( '(FOOTER)')
-- Termino il programma
EmtOutput( 'M02')
end
@@ -126,8 +123,8 @@ end
function OnToolData()
-- emissione dati utensili
if EMT.HEAD == 'H1' then
local sOut = 'M992 P1=' .. EMT.TCPOS:gsub( 'T', '') .. ' P2=' .. EmtLenToString( EMT.TLEN, 3) .. ' P3=' .. EmtLenToString( EMT.TDIAM, 3) ..
' P4=' .. EmtLenToString( EMT.SMAX, 3) .. ' P5=' .. EmtLenToString( EMT.TTOTLEN, 3)
local sOut = 'M992 P1=' .. EMT.TCPOS:gsub( 'T', '') .. ' P2=' .. EmtLenToString( EMT.TLEN, EMT.DECMACRO) .. ' P3=' .. EmtLenToString( EMT.TDIAM, EMT.DECMACRO) ..
' P4=' .. EmtLenToString( EMT.SMAX, EMT.DECMACRO) .. ' P5=' .. EmtLenToString( EMT.TTOTLEN, EMT.DECMACRO)
ParkLine( sOut)
-- cerco posizione di attrezzaggio del primo utensile di lavorazione
if EMT.TOOL == EMT.TOOL_1 and EMT.TLEN_1 < LONG_TOOL_MINLEN then
@@ -135,14 +132,14 @@ function OnToolData()
end
-- emissione dati lama
elseif EMT.HEAD == 'H2' then
local sOut = 'M992 P1=' .. EMT.TCPOS:gsub( 'T', '') .. ' P2=' .. EmtLenToString( EMT.TLEN, 3) .. ' P3=' .. EmtLenToString( EMT.TDIAM, 3) ..
' P4=' .. EmtLenToString( EMT.SMAX, 3) .. ' P5=' .. EmtLenToString( EMT.TTOTLEN, 3)
local sOut = 'M992 P1=' .. EMT.TCPOS:gsub( 'T', '') .. ' P2=' .. EmtLenToString( EMT.TLEN, EMT.DECMACRO) .. ' P3=' .. EmtLenToString( EMT.TDIAM, EMT.DECMACRO) ..
' P4=' .. EmtLenToString( EMT.SMAX, EMT.DECMACRO) .. ' P5=' .. EmtLenToString( EMT.TTOTLEN, EMT.DECMACRO)
ParkLine( sOut)
-- emissione dati sega a catena
elseif EMT.HEAD == 'H3' then
if EMT.TDIST and abs( EMT.TDIST) < 0.1 then EMT.TDIST = nil end
local sData = ' P2=' .. EmtLenToString( ( EMT.TDIST or ChSawLen), 3) .. ' P3=' .. EmtLenToString( EMT.TLEN, 3) ..
' P4=' .. EmtLenToString( EMT.SMAX, 3) .. ' P5=' .. EmtLenToString( ( EMT.TDIST or ChSawLen), 3)
local sData = ' P2=' .. EmtLenToString( ( EMT.TDIST or ChSawLen), EMT.DECMACRO) .. ' P3=' .. EmtLenToString( EMT.TLEN, EMT.DECMACRO) ..
' P4=' .. EmtLenToString( EMT.SMAX, EMT.DECMACRO) .. ' P5=' .. EmtLenToString( ( EMT.TDIST or ChSawLen), EMT.DECMACRO)
if EMT.TCPOS == 'T101' then
ParkLine( 'M992 P1=101' .. sData)
ParkLine( 'M992 P1=102' .. sData)
@@ -158,9 +155,17 @@ function OnToolData()
elseif EMT.HEAD == 'H5' or EMT.HEAD == 'H6' then
local nPos = EgtIf( EMT.HEAD == 'H5', 91, 93)
if EMT.EXIT == 2 then nPos = nPos + 1 end
local sOut = 'M992 P1=' .. EgtNumToString( nPos, 0) .. ' P2=' .. EmtLenToString( EMT.TLEN, 3) .. ' P3=' .. EmtLenToString( EMT.TDIAM, 3) ..
' P4=' .. EmtLenToString( EMT.SMAX, 3) .. ' P5=' .. EmtLenToString( EMT.TTOTLEN, 3)
local sOut = 'M992 P1=' .. EgtNumToString( nPos, 0) .. ' P2=' .. EmtLenToString( EMT.TLEN, EMT.DECMACRO) .. ' P3=' .. EmtLenToString( EMT.TDIAM, EMT.DECMACRO) ..
' P4=' .. EmtLenToString( EMT.SMAX, EMT.DECMACRO) .. ' P5=' .. EmtLenToString( EMT.TTOTLEN, EMT.DECMACRO)
ParkLine( sOut)
-- emissione dati sega a catena
elseif EMT.HEAD == 'H7' then
local sOut = 'M992 P1=' .. EMT.TCPOS:gsub( 'T', '') .. ' P2=' .. EmtLenToString( EMT.TLEN, EMT.DECMACRO) .. ' P3=' .. EmtLenToString( EMT.TDIAM, EMT.DECMACRO) ..
' P4=' .. EmtLenToString( EMT.SMAX, EMT.DECMACRO) .. ' P5=' .. EmtLenToString( EMT.TTOTLEN, EMT.DECMACRO)
ParkLine( sOut)
-- altro non previsto
else
EmtSetLastError( 1211, 'Head not allowed ' .. EMT.HEAD)
end
end
@@ -218,23 +223,16 @@ function OnDispositionEnd()
local HTrave = EMT.HT
local STrave = EMT.ST
local HOverM = EMT.HOVM
-- calcolo dati pinze
local MinAccPinze = 0.3
local MaxAccPinze = 4
local KgMtCubo= 550 -- densità legno in Kg / metro cubo
local Massa = ( HTrave * STrave * LBarra * KgMtCubo ) / 1000000000
local FMaxPinze = EMT.FMAXPINZE
local ForzaAtrito = 700 / 2 -- Serve per regolare P32 (700 valore reale pistone)
local TempoAcc = ( ( Massa * FMaxPinze) / ( 60 * ForzaAtrito) / 1000)
if ( TempoAcc < MinAccPinze) then TempoAcc = MinAccPinze end
if ( TempoAcc > MaxAccPinze) then TempoAcc = MaxAccPinze end
local AccPinze = FMaxPinze / ( 60 * TempoAcc)
local RidFeed = 100 / Massa * 100
if ( RidFeed > 100) then RidFeed = 100 end
local TempAccPinze, TempMinAccPinze, RidFeed = CalcDinamicaPinze_TPA( HTrave, STrave, LBarra)
local TempAccPinz1, TempMinAccPinz1, RidFeed1 = CalcDinamicaPinze_TPA( HTrave, STrave, LBarra - LTrave)
local TempAccPinz2, TempMinAccPinz2, RidFeed2 = CalcDinamicaPinze_TPA( HTrave, STrave, LTrave)
if IdTrave >= 0 then
local sPrt = '( *** Part '.. EgtNumToString( IdTrave, 0) ..' ***)'
local sOut = '( SN=' .. IdTrave .. ' LBarra=' .. EmtLenToString( LBarra, 3) .. ' L='..EmtLenToString( LTrave, 3) ..
' H=' .. EmtLenToString( HTrave, 3) .. ' S=' .. EmtLenToString( STrave, 3) .. ' )'
local sOut = '( SN=' .. IdTrave .. ' LBarra=' .. EmtLenToString( LBarra, EMT.DECMACRO) .. ' L='..EmtLenToString( LTrave, EMT.DECMACRO) ..
' H=' .. EmtLenToString( HTrave, EMT.DECMACRO) .. ' S=' .. EmtLenToString( STrave, EMT.DECMACRO) .. ' )'
EMT.PRODID = EgtGetInfo( BtlInfoId, 'PRODID', 'i') or 0
EMT.PATTID = EgtGetInfo( BtlInfoId, 'PATTID', 'i') or 0
EMT.CUTID = EgtGetInfo( EMT.IDT, 'CUTID', 'i') or 0
@@ -259,7 +257,8 @@ function OnDispositionEnd()
-- se carico barra
if EMT.LOAD or EMT.RELOAD then
sOut = 'M115 P1=' .. EmtLenToString( LBarra, 2) .. ' P2=' .. EmtLenToString( HTrave, 2) .. ' P3=' .. EmtLenToString( STrave, 2) ..
' P4=' .. EmtLenToString( HOverM, 2) .. ' P5=' .. tostring( nLoad90) .. ' P6=' .. EmtLenToString( LTrave, 2)
' P4=' .. EmtLenToString( HOverM, 2) .. ' P5=' .. tostring( nLoad90) .. ' P6=' .. EmtLenToString( LTrave, 2) ..
' P7=' .. EgtNumToString( TempAccPinze, 2) .. ' P8=' .. EgtNumToString( TempAccPinz2, 2) .. ' P9=' .. EgtNumToString( TempAccPinz1, 2)
if EMT.LOAD then
ParkLine( sOut)
SetStartValue( 1, LBarra)
@@ -273,11 +272,12 @@ function OnDispositionEnd()
-- altrimenti recupero rimanenza
else
sOut = 'M115 P1=' .. EmtLenToString( LBarra, 2) .. ' P2=' .. EmtLenToString( HTrave, 2) .. ' P3=' .. EmtLenToString( STrave, 2) ..
' P4=' .. EmtLenToString( HOverM, 2) .. ' P5=' .. tostring( nLoad90) .. ' P6=' .. EmtLenToString( EgtIf( IdTrave >= 0, LTrave, LBarra), 2)
' P4=' .. EmtLenToString( HOverM, 2) .. ' P5=' .. tostring( nLoad90) .. ' P6=' .. EmtLenToString( EgtIf( IdTrave >= 0, LTrave, LBarra), 2) ..
' P7=' .. EgtNumToString( TempAccPinze, 2) .. ' P8=' .. EgtNumToString( TempAccPinz2, 2) .. ' P9=' .. EgtNumToString( TempAccPinz1, 2)
EmtOutput( sOut)
EmtOutput( 'M112'..' P1='..EmtLenToString( LoadT, 3).. ' P5=1 P6='..EmtLenToString( EMT.YPOS, 3)..' P7='..EmtLenToString( ParkV, 3) ..' P9='..GetFmaxClamp())
EmtOutput( 'M112'..' P1='..EmtLenToString( EMT.TPOS, 3).. ' P5=1 P6='..EmtLenToString( EMT.YPOS, 3)..' P7='..EmtLenToString( ParkV, 3) ..' P9='..GetFmaxClamp())
-- aggiorno dati aggancio carrelli alla trave
EMT.YDELTA = EMT.YPOS - LoadT
EMT.YDELTA = EMT.YPOS - EMT.TPOS
EMT.VDELTA = nil
end
-- eventuale preparazione per rotazione immediata
@@ -432,7 +432,7 @@ function OnMachiningStart()
EMT.MCHNAME = EgtGetOperationName( EMT.MCHID)
EMT.MCHTYPE = EgtGetMachiningParam( MCH_MP.TYPE)
EMT.MCHUSERNOTES = EgtGetMachiningParam( MCH_MP.USERNOTES)
-- sistemazione speed
-- sistemazione speed (la speed della lama va moltiplicata per 6)
if EMT.HEAD == 'H2' then
EMT.S = EMT.S * 6
elseif EMT.HEAD == 'H5' and EMT.EXIT == 1 then
@@ -523,6 +523,11 @@ function OnMachiningEnd()
EMT.AUXTYPE = nil
EMT.U_STD = nil
EMT.PREVTOOL = EMT.TOOL
EMT.PREVHEAD = EMT.HEAD
EMT.PREVS = EMT.S
-- salvo posizione
EMT.PREVTCPOS = AdjustTcPos( false)
end
---------------------------------------------------------------------
@@ -533,6 +538,12 @@ function OnPathStart()
-- primo posizionamento sempre in globale
EMT.REFLOC = nil
EMT.IPLGL = false
-- salvo precedenti rotanti
EMT.R1pp = EMT.R1p
EMT.R2pp = EMT.R2p
EMT.R3pp = EMT.R3p
-- reset valori precedenti (per forzare emissione di tutti gli assi del 1° movimento)
EmtResetPrev()
EMT.AUXCMD = {}
@@ -631,6 +642,8 @@ end
---------------------------------------------------------------------
function OnRapid()
-- recupero prossimo utensile
EMT.NEXTTOOL, EMT.NEXTHEAD, EMT.NEXTTCPOS = FindNextTool()
MyBackupAxes()
-- se primo movimento della lavorazione, gestione speciale
if EMT.MCHFIRST and not EMT.OPEISDISP then
@@ -646,22 +659,95 @@ function OnRapid()
if not ( EMT.LOAD or EMT.RELOAD) then
if not EMT.ZMAX and #EMT.AUXSTR > 0 then
EmitZmax()
bHeadFirst = false
end
end
local sTcPosReal = AdjustTcPos( false)
local bGoToHome = false
-- se gli assi rotanti cambiano parecchio, con motosega si va in parcheggio
if EMT.PREVHEAD == 'H3' and EMT.HEAD == 'H3' and ( sTcPosReal ~= EMT.PREVTCPOS or abs( EMT.R2pp - EMT.R2) > 25 or abs( EMT.R1pp - EMT.R1) > 25) then
bGoToHome = true
end
-- primo posizionamento
local MyZHome = EgtGetAxisHomePos( 'Z')
local bZmax = ( #EMT.AUXSTR > 0 or EMT.TOOL ~= EMT.PREVTOOL or EMT.L3 > -1)
-- se avevo motosega, torno in zona sicura senza ruotare assi rotanti
if not EMT.LOAD and EMT.PREVHEAD == 'H3' and EMT.FLAG2 == 1 then
local sOutPreMove = 'M101 P1=1' .. ' P2=' .. EmtLenToString( -SafeXRotAxes, EMT.DECMACRO) .. ' P3=' .. EmtLenToString( MyZHome, EMT.DECMACRO) ..
' P4=' .. EgtNumToString( EMT.R2pp, EMT.DECMACRO) .. ' P5=' .. EgtNumToString( EMT.R1pp, EMT.DECMACRO) ..
' P6=' .. EgtNumToString( EMT.PREVTCPOS, EMT.DECMACRO) .. ' P7=' .. EgtNumToString( EMT.PREVS, 0) ..
' P8=0' .. ' P9=0' .. ' P10=' .. EgtIf( bZmax, '3', '4')
EmtOutput( sOutPreMove)
sOutPreMove = 'M101 P1=1' .. ' P2=' .. EmtLenToString( -SafeXRotAxes, EMT.DECMACRO) .. ' P3=' .. EmtLenToString( MyZHome, EMT.DECMACRO) ..
' P4=' .. EgtNumToString( 0, EMT.DECMACRO) .. ' P5=' .. EgtNumToString( EMT.R1pp, EMT.DECMACRO) ..
' P6=' .. EgtNumToString( EMT.PREVTCPOS, EMT.DECMACRO) .. ' P7=' .. EgtNumToString( EMT.PREVS, 0) ..
' P8=0' .. ' P9=0' .. ' P10=' .. EgtIf( bZmax, '3', '4')
EmtOutput( sOutPreMove)
EmtOutput( 'M101 P1=2')
EmtOutput( 'M101 P1=3')
end
if not EMT.LOAD then
local sOut = string.gsub( string.gsub( EMT.MCHNAME..'/'..EMT.TOOL, '%(', '['), '%)', ']')
EmtOutput( '( * ' .. sOut .. ' * )')
end
-- primo posizionamento
-- se carico motosega, ruoto in zona sicura prima di approcciare la lavorazione
if EMT.HEAD == 'H3' and EMT.PREVHEAD ~= 'H3' then
local sOutPreMove = 'M101 P1=1' .. ' P2=' .. EmtLenToString( -SafeXRotAxes, EMT.DECMACRO) .. ' P3=' .. EmtLenToString( MyZHome, EMT.DECMACRO) ..
' P4=' .. EgtNumToString( 0, EMT.DECMACRO) .. ' P5=' .. EgtNumToString( EMT.R1, EMT.DECMACRO) ..
' P6=' .. AdjustTcPos( false) .. ' P7=' .. EgtNumToString( EMT.S, 0) ..
' P8=0' .. ' P9=0' .. ' P10=' .. EgtIf( bZmax, '3', '4')
if EMT.LOAD then
ParkLine( sOutPreMove)
else
EmtOutput( sOutPreMove)
end
sOutPreMove = 'M101 P1=1' .. ' P2=' .. EmtLenToString( -SafeXRotAxes, EMT.DECMACRO) .. ' P3=' .. EmtLenToString( MyZHome, EMT.DECMACRO) ..
' P4=' .. EgtNumToString( EMT.R2, EMT.DECMACRO) .. ' P5=' .. EgtNumToString( EMT.R1, EMT.DECMACRO) ..
' P6=' .. AdjustTcPos( false) .. ' P7=' .. EgtNumToString( EMT.S, 0) ..
' P8=0' .. ' P9=0' .. ' P10=' .. EgtIf( bZmax, '3', '4')
if EMT.LOAD then
ParkLine( sOutPreMove)
ParkLine( 'M101 P1=2')
ParkLine( 'M101 P1=3')
else
EmtOutput( sOutPreMove)
EmtOutput( 'M101 P1=2')
EmtOutput( 'M101 P1=3')
end
elseif not EMT.LOAD and ( EMT.HEAD == 'H3' or ( bZmax and EMT.TTOTLEN > 200)) and
( EMT.ST > BeamHeightForFixRot or ( EMT.HEAD == 'H1' and EMT.TTOTLEN > 350) or bGoToHome) and EMT.FLAG2 == 1 then
local sOutPreMove
if EMT.HEAD == 'H3' and bGoToHome then
sOutPreMove = 'M101 P1=1' .. ' P2=' .. EmtLenToString( -SafeXRotAxes, EMT.DECMACRO) .. ' P3=' .. EmtLenToString( MyZHome, EMT.DECMACRO) ..
' P4=' .. EgtNumToString( 0, EMT.DECMACRO) .. ' P5=' .. EgtNumToString( EMT.R1, EMT.DECMACRO) ..
' P6=' .. AdjustTcPos( false) .. ' P7=' .. EgtNumToString( EMT.S, 0) ..
' P8=0' .. ' P9=0' .. ' P10=' .. EgtIf( bZmax, '3', '4')
EmtOutput( sOutPreMove)
end
sOutPreMove = 'M101 P1=1' .. ' P2=' .. EmtLenToString( -SafeXRotAxes, EMT.DECMACRO) .. ' P3=' .. EmtLenToString( MyZHome, EMT.DECMACRO) ..
' P4=' .. EgtNumToString( EMT.R2, EMT.DECMACRO) .. ' P5=' .. EgtNumToString( EMT.R1, EMT.DECMACRO) ..
' P6=' .. AdjustTcPos( false) .. ' P7=' .. EgtNumToString( EMT.S, 0) ..
' P8=0' .. ' P9=0' .. ' P10=' .. EgtIf( bZmax, '3', '4')
EmtOutput( sOutPreMove)
EmtOutput( 'M101 P1=2')
EmtOutput( 'M101 P1=3')
end
-- resetto valori precedenti
EmtResetPrev()
local bZmax = ( #EMT.AUXSTR > 0 or EMT.TOOL ~= EMT.PREVTOOL or EMT.L3 > -1)
local sOut = 'M101 P1=1' .. ' P2=' .. EmtLenToString( EMT.L2, 3) .. ' P3=' .. EmtLenToString( EMT.L3, 3) ..
' P4=' .. EgtNumToString( EMT.R2, 3) .. ' P5=' .. EgtNumToString( EMT.R1, 3) ..
local MyZPos = EMT.L3
-- se sono su pezzi alti e movimento da emettere, per sicurezza a Z massima
if EMT.ST > BeamHeightForFixRot and EMT.FLAG2 == 1 then
MyZPos = MyZHome
end
local sOut = 'M101 P1=1' .. ' P2=' .. EmtLenToString( EMT.L2, EMT.DECMACRO) .. ' P3=' .. EmtLenToString( MyZPos, EMT.DECMACRO) ..
' P4=' .. EgtNumToString( EMT.R2, EMT.DECMACRO) .. ' P5=' .. EgtNumToString( EMT.R1, EMT.DECMACRO) ..
' P6=' .. AdjustTcPos( false) .. ' P7=' .. EgtNumToString( EMT.S, 0) ..
' P8=0' .. ' P9=0' .. ' P10=' .. EgtIf( bZmax, '3', '4')
if EMT.ST > BeamHeightForFixRot and EMT.FLAG2 == 1 then
sOut = sOut .. ' P12=1'
end
if EMT.LOAD then
ParkLine( sOut)
else
@@ -709,7 +795,7 @@ function OnRapid()
sV = EmtLenToString( ParkV)
sB = '2'
end
sOut = 'M112 P1='..EmtLenToString( EMT.L1, 3)..' P3='..sA..' P4='..sB..' P5=0 P6='..sY..' P7='..sV..' P9='..GetFmaxClamp()
sOut = 'M112 P1='..EmtLenToString( EMT.L1, EMT.DECMACRO)..' P3='..sA..' P4='..sB..' P5=0 P6='..sY..' P7='..sV..' P9='..GetFmaxClamp()
ParkLine( sOut)
EMT.LOAD = false
-- emissione prime linee speciali e linee parcheggiate
@@ -753,14 +839,14 @@ function OnRapid()
sB = '2'
end
-- se taglio di coda senza residuo da scaricare, emetto M175 per accelerare il carico della barra successiva
if EMT.MCHUSERNOTES and EMT.MCHUSERNOTES:find( 'Cut') then
if EMT.MCHUSERNOTES and EMT.MCHUSERNOTES:find( 'Cut') and ( IsEndPhase( EMT.PHASE+1) or IsEnd2Phase( EMT.PHASE+1)) then
EmtOutput( 'M175')
end
if bHeadFirst then
sOut = 'M101 P1=3'
EmtOutput( sOut)
end
sOut = 'M112 P1=' .. EmtLenToString( EMT.L1, 3) ..' P3='..sA..' P4='..sB..' P6='..sY..' P7='..sV..' P9=' .. GetFmaxClamp()
sOut = 'M112 P1=' .. EmtLenToString( EMT.L1, EMT.DECMACRO) ..' P3='..sA..' P4='..sB..' P6='..sY..' P7='..sV..' P9=' .. GetFmaxClamp()
EmtOutput( sOut)
if not bHeadFirst then
sOut = 'M101 P1=2'
@@ -828,12 +914,42 @@ function OnRapid()
EmtAdjustRotaryAxes()
EmitZmax( true)
EMT.ZMAX = true
-- se pezzi alti e devo cambiare utensile su testa con CU, porto la testa vicino al cambio utensile
if EMT.ST > BeamHeightForFixRot and EMT.HEAD == 'H1' and EMT.TOOL ~= EMT.NEXTTOOL and EMT.NEXTHEAD ~= 'H2' then
local dBAxis = 90
local dCAxis = EgtIf( BD.RIGHT_LOAD, 90, -90)
local sOut = 'M101 P1=1' .. ' P2=' .. EmtLenToString( EMT.L2, EMT.DECMACRO) .. ' P3=' .. EmtLenToString( EMT.L3, EMT.DECMACRO) ..
' P4=' .. EgtNumToString( dBAxis, EMT.DECMACRO) .. ' P5=' .. EgtNumToString( dCAxis, EMT.DECMACRO) ..
' P6=' .. AdjustTcPos( false) .. ' P7=' .. EgtNumToString( EMT.S, 0) ..
' P8=0' .. ' P9=0' .. ' P10=3'
EmtOutput( sOut)
EmtOutput( 'M101 P1=2')
EmtOutput( 'M101 P1=3')
sOut = 'M101 P1=1' .. ' P2=' .. EmtLenToString( -SafeXRotAxes, EMT.DECMACRO) .. ' P3=' .. EmtLenToString( EMT.L3, EMT.DECMACRO) ..
' P4=' .. EgtNumToString( dBAxis, EMT.DECMACRO) .. ' P5=' .. EgtNumToString( dCAxis, EMT.DECMACRO) ..
' P6=' .. AdjustTcPos( false) .. ' P7=' .. EgtNumToString( EMT.S, 0) ..
' P8=0' .. ' P9=0' .. ' P10=3'
EmtOutput( sOut)
EmtOutput( 'M101 P1=2')
EmtOutput( 'M101 P1=3')
end
-- se altrimenti movimento in Home
elseif EMT.FLAG == 4 then
-- non previsto
-- se altrimenti rotazione a Z max
-- se altrimenti rotazione a Z max per lavorazione successiva
elseif EMT.FLAG == 5 then
-- viene gestito all'inizio della lavorazione successiva
EMT.REFLOC = nil
EMT.IPLGL = false
MyAdjustLinearAxes()
EmtAdjustRotaryAxes()
EmtResetPrev()
local sOut = 'M101 P1=1' .. ' P2=' .. EmtLenToString( EMT.L2, EMT.DECMACRO) .. ' P3=' .. EmtLenToString( EMT.L3, EMT.DECMACRO) ..
' P4=' .. EgtNumToString( EMT.R2, EMT.DECMACRO) .. ' P5=' .. EgtNumToString( EMT.R1, EMT.DECMACRO) ..
' P6=' .. AdjustTcPos( false) .. ' P7=' .. EgtNumToString( EMT.S, 0) ..
' P8=0' .. ' P9=0' .. ' P10=3'
EmtOutput( sOut)
EmtOutput( 'M101 P1=2')
EmtOutput( 'M101 P1=3')
-- altrimenti errore
else
error( "Unknown Rapid flag")
@@ -948,7 +1064,7 @@ function OnArc()
--local sCen = ' ' .. EMT.C1t .. EmtLenToString(EMT.C1,3) ..
-- ' ' .. EMT.C2t .. EmtLenToString(EMT.C2,3)
-- raggio
local sRad = ' ' .. EMT.RRt .. EmtLenToString( EMT.RR, EMT.DECNUM)
local sRad = ' ' .. EMT.RRt .. EmtLenToString( EMT.RR, EMT.DECRAD)
-- aggiungo feed
local sFeed = EmtGetFeed()
-- tipo arco
@@ -960,6 +1076,35 @@ function OnArc()
EmtUpdatePrev()
end
---------------------------------------------------------------------
function FindNextTool()
-- salvo stato iniziale
local CurrMachId = EgtGetCurrMachining()
local CurrTool = EgtTdbGetCurrToolParam( MCH_TP.NAME)
-- cerco lavorazione con utensile su gruppo testa indicato
local sTool, sHead, sTcPos
local OpId = EgtGetNextActiveOperation( CurrMachId or EMT.MCHID)
while OpId do
local nType = EgtGetOperationType( OpId)
if nType ~= MCH_OY.NONE and nType ~= MCH_OY.DISP then
if EgtSetCurrMachining( OpId) then
sTool = EgtGetMachiningParam( MCH_MP.TOOL)
if EgtTdbSetCurrTool( sTool) then
sHead = EgtTdbGetCurrToolParam( MCH_TP.HEAD)
sTcPos = EgtTdbGetCurrToolParam( MCH_TP.TCPOS)
break
end
end
end
OpId = EgtGetNextActiveOperation( OpId)
end
-- ripristino stato iniziale
EgtSetCurrMachining( CurrMachId or GDB_ID.NULL)
EgtTdbSetCurrTool( CurrTool or '')
-- restituisco risultato
return sTool, sHead, sTcPos
end
---------------------------------------------------------------------
function CalcCharStatus( sCmd, bSkipPress)
-- aperto
@@ -1481,10 +1626,13 @@ function PreparePostRotation( sCmd)
elseif nVDelta > 0 then
EMT.YDELTA = nil
EMT.VDELTA = nVDelta
end
local sYLoad = ' P2='..EmtLenToString( LoadT)
local sOut = 'M111 P1=11'..sYLoad..' P4=76'..EMT.SB..' P8=0 P9='..GetFmaxClamp()
table.insert( EMT.AUXSTR, sOut)
end
local sYLoad = ' P2='..EmtLenToString( LoadT)
local sOut = 'M111 P1=11'..sYLoad..' P4=76'..EMT.SB..' P8=0 P9='..GetFmaxClamp()
table.insert( EMT.AUXSTR, sOut)
-- setto parametri di pinzaggio reali
EMT.SA = ' P4=110'
EMT.SE = ' P8=1'
end
end
@@ -1529,18 +1677,26 @@ function MyAdjustLinearAxes()
if EMT.HEAD == 'H1' or EMT.HEAD == 'H2' then
local Len = EMT.TLEN + EgtIf( EMT.HEAD == 'H1', MillOffs, abs( SawOffs))
local LenRef = MillOffs
vtE = Vector3d( EMT.EXTR) * Len - Z_AX() * LenRef
vtE = Vector3d( EMT.TDIR) * Len - Z_AX() * LenRef
elseif EMT.HEAD == 'H3' then
local LenAux = ( EMT.TDIST or ChSawLen) + MillOffs
local LenRef = MillOffs
local vtAux = EgtGetCalcAuxDirFromAngles( EMT.R1, EMT.R2, EMT.R3)
vtE = vtAux * LenAux - Z_AX() * LenRef
else -- 'H5'
elseif EMT.HEAD == 'H5' or EMT.HEAD == 'H6' then
local Len = EMT.TLEN + AngTr1Len
local LenAux = MillOffs + AngTr1Offs
local LenRef = MillOffs
local vtAux = EgtGetCalcAuxDirFromAngles( EMT.R1, EMT.R2)
vtE = Vector3d( EMT.EXTR) * Len + vtAux * LenAux - Z_AX() * LenRef
vtE = Vector3d( EMT.TDIR) * Len + vtAux * LenAux - Z_AX() * LenRef
elseif EMT.HEAD == 'H7' then
local Len = EMT.TLEN + AngTrBHLen
local LenAux = MillOffs + AngTrBHOffs
local LenRef = MillOffs
local vtAux = EgtGetCalcAuxDirFromAngles( EMT.R1, EMT.R2)
vtE = Vector3d( EMT.TDIR) * Len + vtAux * LenAux - Z_AX() * LenRef
else
EmtSetLastError( 1211, 'Head not allowed ' .. EMT.HEAD)
end
EMT.L1 = EMT.L1 - vtE:getX()
EMT.L2 = EMT.L2 - DeltaTabY - vtE:getY()
@@ -1556,7 +1712,7 @@ function MyAdjustLinearAxes()
EMT.L3o = MyL3o
if not EMT.REFLOC then
EMT.L2 = - EMT.L2
EMT.L2 = -EMT.L2
EMT.L1t = 'Y'
EMT.L2t = 'X'
else
@@ -1575,8 +1731,10 @@ function AdjustToolKinematic()
return EgtIf( EMT.EXIT == 1, '11', '12')
elseif EMT.HEAD == 'H6' then
return EgtIf( EMT.EXIT == 1, '21', '22')
elseif EMT.HEAD == 'H7' then
return '31'
else
EmtSetLastError( 1211, 'Head not allowed')
EmtSetLastError( 1211, 'Head not allowed ' .. EMT.HEAD)
end
end
@@ -1645,9 +1803,9 @@ function CalcInterpPlane()
local vtY = EMT.IPLGLFR:getVersY()
local vtZ = EMT.IPLGLFR:getVersZ()
EMT.IPLGLSTR = ' X0 Y' .. EmtLenToString( xS, EMT.DECNUM) .. ' Z0' ..
' A' .. EgtNumToString( - vtX:getY(), 6) .. ' B' .. EgtNumToString( vtX:getX(), 6) .. ' C' .. EgtNumToString( vtX:getZ(), 6) ..
' I' .. EgtNumToString( - vtY:getY(), 6) .. ' J' .. EgtNumToString( vtY:getX(), 6) .. ' K' .. EgtNumToString( vtY:getZ(), 6) ..
' P' .. EgtNumToString( - vtZ:getY(), 6) .. ' Q' .. EgtNumToString( vtZ:getX(), 6) .. ' R' .. EgtNumToString( vtZ:getZ(), 6)
' A' .. EgtNumToString( - vtX:getY(), EMT.DECVERS) .. ' B' .. EgtNumToString( vtX:getX(), EMT.DECVERS) .. ' C' .. EgtNumToString( vtX:getZ(), EMT.DECVERS) ..
' I' .. EgtNumToString( - vtY:getY(), EMT.DECVERS) .. ' J' .. EgtNumToString( vtY:getX(), EMT.DECVERS) .. ' K' .. EgtNumToString( vtY:getZ(), EMT.DECVERS) ..
' P' .. EgtNumToString( - vtZ:getY(), EMT.DECVERS) .. ' Q' .. EgtNumToString( vtZ:getX(), EMT.DECVERS) .. ' R' .. EgtNumToString( vtZ:getZ(), EMT.DECVERS)
EMT.IPLGL = true
end
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+38
View File
@@ -0,0 +1,38 @@
REM Compilazione degli script macchina Egaltech 2024.02.22
REM Per togliere info di debug aggiungere flag -s prima del nome del file di input
REM Compilazione 32 bit e copia file da non compilare
@echo off
REM chiedo all'utente la versione da assegnare alla macchina da compilare
set /p "machineVersion=Inserisci versione: "
REM variabili per costruire i percorsi delle cartelle
set "machineName=Essetre-FAST"
set "deployFolder=C:\MachinesDeploy"
set "machinePath=%deployFolder%\%machineName%\"
set "fullPathSource=%deployFolder%\%machineName%\%machineVersion%\%machineName%"
set "fullPathZip=%deployFolder%\%machineName%\%machineVersion%"
REM elimino eventuale cartella esistente
rmdir /s /Q %fullPathZip%
REM copio i sorgenti nel percorso di destinazione
ROBOCOPY . %fullPathSource%\ /E /XF "Compile.bat" /XF ".gitignore" /XD ".git" /XF "UpdateLog.txt"
REM copio i sorgenti nel percorso temporaneo per i compilati
ROBOCOPY . %fullPathSource%\bin\%machineName%\ /E /XF "Compile.bat" /XF ".gitignore" /XD ".git" /XF "UpdateLog.txt"
REM copio i file compilati nel percorso temporaneo per i compilati
\EgtProg\Dll32\luac54 -o %fullPathSource%\bin\%machineName%\Common-FAST.mlpe -s Common-FAST.mlpe
\EgtProg\Dll32\luac54 -o %fullPathSource%\bin\%machineName%\Common-FAST.mlse -s Common-FAST.mlse
\EgtProg\Dll32\luac54 -o %fullPathSource%\bin\%machineName%\Common-FAST.NUM.mlpe -s Common-FAST.NUM.mlpe
\EgtProg\Dll32\luac54 -o %fullPathSource%\bin\%machineName%\Common-FAST.NUM_PLUS.mlpe -s Common-FAST.NUM_PLUS.mlpe
\EgtProg\Dll32\luac54 -o %fullPathSource%\bin\%machineName%\Common-FAST.TPA.mlpe -s Common-FAST.TPA.mlpe
REM comprimo i file compilati in uno zip pronto per essere distribuito
tar.exe acvf %fullPathZip%\%machineName%.zip -C %fullPathSource%\bin\ %machineName%\*.*
REM elimino il percorso temporaneo
rmdir /s /Q %fullPathSource%\bin\
+13 -3
View File
@@ -59,6 +59,7 @@ H5.1=AngTransm.nge
H5.2=AngTransm.nge
H6.1=AngTransm.nge
H6.2=AngTransm.nge
H7.1=AngTransmBH.nge
[Machinings]
Drilling=1
@@ -67,10 +68,15 @@ Milling=1
Pocketing=1
Mortising=1
Chiseling=0
SawRoughing=0
SawFinishing=0
GenMachining=0
SurfFinishing=0
SurfRoughing=1
SurfFinishing=1
5AxMilling=1
[5AxMilling]
5AxScript1=5AxProject
5AxScript2=5AxPocketProject
5AxScript3=5AxCylProject
[Machining]
InitScript=InitMach.lua
@@ -88,6 +94,10 @@ H2=6615
H3=6616
; Angular transmission
H5=6603
; Angular transmission
H6=6603
; Angular transmission
H7=6617
[SetUp]
Default=Standard
+412 -116
View File
@@ -1,4 +1,4 @@
-- Descrizione macchina Essetre-FAST by EgalTech s.r.l. 2023/11/04
-- Descrizione macchina Essetre-FAST by EgalTech s.r.l. 2024/12/23
-- 2021/12/29 DS ver 2.3l4 Per NUM non va considerato MillOffs negli offset in Z.
-- 2022/01/27 DS ver 2.4a2 Modifiche per tagli testa/coda su pezzi alti.
-- 2022/02/10 DS ver 2.4a3 Ridotto di 10mm pinzaggio con pezzi alti ma sottili.
@@ -17,29 +17,36 @@
-- 2022/12/05 DS ver 2.4l1 In OnLinear di genera CN per Num e NumPlus eliminato recupero sovramateriale di testa EMT.X_OFF dopo riutilizzo EMT.L1o.
-- 2023/01/23 DS Ver.2.5a2 In simulazione corretta visualizzazione Sega a catena.
-- 2023/02/09 DS Ver.2.5b1 Correzioni NumPlus per parametri G115 e EG2/EG3 al cambio orientazione sega a catena.
-- 2023/03/20 DS Ver.2.5c1 Inserita gestione fresa BH al posto della lama.
-- 2023/07/26 DS ver.2.5g1 Per NUM e NUM_PLUS aggiunta gestione rotazione in alto su pezzi alti (G101 EH1) come per TPA in versione 2.3f2.
-- 2023/07/26 DS ver.2.5g2 Per NUM e NUM_PLUS tolta segnalazione errore rotazione a Zmax per pezzi alti non gestita (era su EMT.FLAG == 5).
-- 2023/07/27 DS ver.2.5g3 Il parametro di cui alle modifiche precedenti ora viene emesso solo se anche EMT.FLAG2==1.
-- 2023/08/17 DS ver 2.5h2 Possibilità di nuova gestione SawCOffs e SawBOffs con flag NewBCOffs.
-- 2023/08/22 DS ver 2.5h3 Eliminata nuova gestione di 2.5h2 perchè inclinando la direzione utensile rispetto al primo rotante limitava le direzioni raggiungibili.
-- 2023/09/29 ver 2.5i1 In BeamData e mlde aggiunta la lettura di alcuni parametri da Ts3Data.
-- 2023/10/18 DS ver 2.5j1 Con SpliRot ora si assegna da primo movimento di M111/G111 a EE/P8 il corretto valore 2.
-- 2023/10/19 DS ver 2.5j2 Per NUM_PLUS correzione per scarico con pezzo dopo oppure passando da Y a V per eliminare ET2 e scommentare ET2004.
-- 2023/10/21 DS ver 2.5j3 Gestione caso speciale di rotazione dopo separazione senza lavorazioni sul posizionamento finale.
-- 2023/11/04 DS ver 2.5k1 Eliminata testa H4. Aggiunta visualizzazione rinvio su TC.Aggiunta gestione MIN_MACH_VER per simulazione e generazione.
-- 2023/12/13 AV ver.2.5l1 Piccola correzione per errore digitazione variabile in calcolo riposizionamento carrelli (SpecAdjustCarrB3)
-- Corretto segno di una variabile in calcolo posizionamento carrelli
-- 2023/12/15 AV ver.2.5l2 Migliorato calcolo stima tempi di lavorazione
-------------------------------------
-- NOTE VERSIONI SUCCESSIVE IN GIT --
-------------------------------------
require( 'EmtGenerator')
EgtEnableDebug( false)
PP_VER = '2.5l2'
MIN_MACH_VER = '2.5k1'
PP_VER = '3.1d2'
PP_NVER = '3.1.4.2'
MIN_MACH_VER = '2.7j1'
MACH_NAME = EgtGetCurrMachineName()
-- Carico i dati globali
local sMachDir = EgtGetCurrMachineDir()
-- Elimino direttori altre macchine e imposto direttorio macchina corrente per ricerca librerie
EgtRemoveBaseMachineDirFromPackagePath()
EgtAddToPackagePath( sMachDir .. '\\Beam\\?.lua')
EgtAddToPackagePath( sMachDir .. '\\?.lua')
local BD = require( 'BeamData')
local INFO_STD_PP = require( 'Version')
-- prendo la versione kernel minima necessaria più nuova tra macchina e script comuni
if INFO_STD_PP.MIN_MACH_VER_PP_COMMON > MIN_MACH_VER then
MIN_MACH_VER = INFO_STD_PP.MIN_MACH_VER_PP_COMMON
end
EgtOutLog ( '** ' .. MACH_NAME..' '..PP_VER..' ** ( '..INFO_STD_PP.NAME..': '..INFO_STD_PP.VERSION..' - MinMach: '.. MIN_MACH_VER ..') **', 1)
-- Parametri macchina
NumericalControl = 'TPA' -- NUM o TPA o NUM_PLUS
NumericalControl = 'TPA' -- NUM o TPA o NUM_PLUS
MinX = 0
MaxX = 1350
MinZ = -1350
@@ -58,15 +65,18 @@ LoadT = 1454.2
UnloadT = -1700
MaxOpen = 305
MillOffs = 177.35
DistRotCenterBToTopC = 403 -- distanza tra il centro di rotazione del mandrino B e la mensola C
SawOffs = -242.68
SawBOffs = 0
SawCOffs = 0
ChSawLen = 90.0
AngTr1Offs = 170
AngTr1Len = 150
AngTrBHOffs = 154.5
AngTrBHLen = 90
TurnerOffs = 200.0
DeltaTabY = 898.0
DeltaTabZ = -1017.8 + MillOffs -- per TPA : -1013.3 + MillOffs -- per NUM : -838.4
DeltaTabZ = -1017.8 + MillOffs -- per TPA : -1013.3 + MillOffs -- per NUM : -838.4
DimTabY = 400
DimTabX = 34000
LenToPress = 900
@@ -77,22 +87,34 @@ DefTcPos = 'T2'
SecondSupport = 0
SpecialBH = false
MaxUnloadLen = 0
BeamHeightForFixRot = 9999 -- per abilitare assegnare 500
CoeffVM = 0.5
BeamHeightForFixRot = 9999 -- per abilitare assegnare 500
NewTopC = true
SafeXRotAxes = 150
AggreBlockHaus = false
SecondToolChanger = false
EstimationRapidMultiplier = 1
DistZClampToTable = 5 -- distanza tra la tavola e il punto più basso della morsa
ClampingCoeffMin = nil -- coefficiente di fissaggio, se 0 o nil non fa controllo, per il momento da inizializzare da Ts3Data
MinJoinVV = 75
MinJoinSS = 100
MinJoinLS = 290
MinJoinSL = 100
MinJoinLL = 400
DistHeadToCabinUnload = nil -- distanza tra la paratia al carico e la testa macchina (Y) in valore assoluto
DistHeadToCabinLoad = nil -- distanza tra la paratia allo scarico e la testa macchina (Y) in valore assoluto
-- Aggiornamento con dati da BeamData.lua
local sBeamData = EgtGetSourceDir().."\\Beam\\BeamData.lua"
if EgtExistsFile( sBeamData) then
local BD = dofile( sBeamData)
if BD then
BeamHeightForFixRot = BD.MAX_HEIGHT_ROT_B_ABOVE or BeamHeightForFixRot
end
-- costanti dimensioni utensili
LONG_TOOL_MINLEN = 218.5
BIG_TOOL_DIAM = 300
-- leggo e aggiorno con parametri da BeamData
if BD then
BeamHeightForFixRot = BD.MAX_HEIGHT_ROT_B_ABOVE or BeamHeightForFixRot
end
-- Aggiornamento con dati da TechnoEssetre7
local sTs3Data = EgtGetStringFromIni( 'Beam', 'DATA_DIR', "C:\\TechnoEssetre7\\EgtData", EgtGetIniFile()).."\\Essetre-Fast.data"
local sData = EgtGetSourceDir().."\\Beam\\Ts3Data.lua"
local sData = sMachDir .. "\\Beam\\Ts3Data.lua"
if EgtExistsFile( sTs3Data) then
EgtCopyFile( sTs3Data, sData)
local sTs3DataOld = sTs3Data..'.old'
@@ -134,6 +156,8 @@ if EgtExistsFile( sData) then
AngTr1Len = Machine.Offsets.OFFSETX_RINV_1 or AngTr1Len
--if Machine.Offsets.OFFSETZ_RINV_2 then AngTr2Offs = Machine.Offsets.OFFSETZ_RINV_2 - EgtIf( NumericalControl == 'TPA', MillOffs, 0) end
--AngTr2Len = Machine.Offsets.OFFSETX_RINV_2 or AngTr2Len
if Machine.Offsets.OFFSETZ_RINV_BH then AngTrBHOffs = Machine.Offsets.OFFSETZ_RINV_BH - EgtIf( NumericalControl == 'TPA', MillOffs, 0) end
AngTrBHLen = Machine.Offsets.OFFSETX_RINV_BH or AngTrBHLen
TurnerOffs = Machine.Offsets.OFFSETRIB or TurnerOffs
if Machine.Offsets.OFFSETX then DeltaTabY = - Machine.Offsets.OFFSETX end
if Machine.Offsets.OFFSETZ then DeltaTabZ = Machine.Offsets.OFFSETZ + EgtIf( NumericalControl == 'TPA', MillOffs, 0) end
@@ -142,10 +166,37 @@ if EgtExistsFile( sData) then
if Machine.Offsets.RIB_AUTO then AutomaticRotation = ( Machine.Offsets.RIB_AUTO == 1) end
if Machine.Offsets.NOULOAD then MaxUnloadLen = Machine.Offsets.NOULOAD end
if Machine.Offsets.DEFTCPOS then DefTcPos = ( 'T' .. Machine.Offsets.DEFTCPOS) end
if Machine.Offsets.WOOD_DENSITY then WoodDensity = Machine.Offsets.WOOD_DENSITY end
if Machine.Offsets.MIN_JOIN_VV then MinJoinVV = EgtClamp( Machine.Offsets.MIN_JOIN_VV, 60, 150) end
if Machine.Offsets.MIN_JOIN_SS then MinJoinSS = EgtClamp( Machine.Offsets.MIN_JOIN_SS, 80, 275) end
if Machine.Offsets.MIN_JOIN_LS then MinJoinLS = EgtClamp( Machine.Offsets.MIN_JOIN_LS, 250, 400) end
if Machine.Offsets.MIN_JOIN_SL then MinJoinSL = EgtClamp( Machine.Offsets.MIN_JOIN_SL, 80, 400) end
if Machine.Offsets.MIN_JOIN_LL then MinJoinLL = EgtClamp( Machine.Offsets.MIN_JOIN_LL, 300, 600) end
if Machine.Offsets.MAXFEEDPINZE then MaxFeedPinze = Machine.Offsets.MAXFEEDPINZE end
if Machine.Offsets.MAXACC then MaxAcc = Machine.Offsets.MAXACC end
if Machine.Offsets.MINACC then MinAcc = Machine.Offsets.MINACC end
if Machine.Offsets.NEWTOPC then NewTopC = ( Machine.Offsets.NEWTOPC == 1) end
if Machine.Offsets.AGGRE_BH then AggreBlockHaus = ( Machine.Offsets.AGGRE_BH == 1) end
if Machine.Offsets.SEC_TC then SecondToolChanger = ( Machine.Offsets.SEC_TC == 1) end
if Machine.Offsets.COEFF_STIMATEMPI and Machine.Offsets.COEFF_STIMATEMPI > 0 then EstimationRapidMultiplier = Machine.Offsets.COEFF_STIMATEMPI end
if Machine.Offsets.MAX_HEIGHT_ROT_B_ABOVE then BeamHeightForFixRot = Machine.Offsets.MAX_HEIGHT_ROT_B_ABOVE end
if Machine.Offsets.COEFF_CLAMP_CHECK then ClampingCoeffMin = Machine.Offsets.COEFF_CLAMP_CHECK end
if Machine.Offsets.DIST_ROT_CENTER_B_TO_TOP_C then DistRotCenterBToTopC = EgtClamp( Machine.Offsets.DIST_ROT_CENTER_B_TO_TOP_C, 395, 410) end
if Machine.Offsets.LONG_TOOL_MINLEN then LONG_TOOL_MINLEN = EgtClamp( Machine.Offsets.LONG_TOOL_MINLEN, 216, 226.1) end
if Machine.Offsets.DIST_HEAD_TO_CABIN_UNLOAD then DistHeadToCabinUnload = Machine.Offsets.DIST_HEAD_TO_CABIN_UNLOAD end
if Machine.Offsets.DIST_HEAD_TO_CABIN_LOAD then DistHeadToCabinLoad = Machine.Offsets.DIST_HEAD_TO_CABIN_LOAD end
end
end
end
if SpecialBH then SecondSupport = 0 end
-- Aggiorno valori MinJoin
MinJoin = MinJoinSS
MinOther = abs( MinY) + abs( MaxV) + MinJoin
DeltaTol = 210
-- compongo i gruppi appartenenti alla base
local sBaseAux = {'BASE/SOLID', 'BASE/TC', 'BASE/SIGN', 'BASE/COLLISION'}
if SecondToolChanger then table.insert( sBaseAux, 5, 'BASE/TC2') end
EmtGeneral {
File='Essetre-FAST.nge',
@@ -155,12 +206,25 @@ EmtGeneral {
ExitMaxAdjust = 30,
ExitMaxRotAdj = 0.5,
AngDeltaMinForHome = 165,
Special = 'Essetre-FAST.mlse',
Processor = 'Essetre-FAST.mlpe'}
Special = 'Common_FAST.mlse',
Processor = 'Common_FAST.mlpe'}
local BaseId = EmtBase {
Name = 'Base',
Geo='BASE/GEO',
Aux={'BASE/SOLID', 'BASE/TC', 'BASE/SIGN', 'BASE/COLLISION'}}
Aux = sBaseAux}
-- Sposta la faccia interna alla cabina dei solidi di collisione se sono impostati nel TS3Data, valori positivi
if DistHeadToCabinLoad then
local nSide1Id = EgtGetFirstNameInGroup( EgtGetFirstNameInGroup( BaseId, 'COLLISION'), 'SIDE1')
local b3Collision = EgtGetBBox( nSide1Id, GDB_BB.STANDARD)
local vtMove = Vector3d( -abs( DistHeadToCabinLoad) - b3Collision:getMax()[1], 0, 0)
EgtSurfTmMoveFacet( nSide1Id, 3, vtMove, GDB_RT.GLOB)
end
if DistHeadToCabinUnload then
local nSide2Id = EgtGetFirstNameInGroup( EgtGetFirstNameInGroup( BaseId, 'COLLISION'), 'SIDE2')
local b3Collision = EgtGetBBox( nSide2Id, GDB_BB.STANDARD)
local vtMove = Vector3d( abs( DistHeadToCabinUnload) - b3Collision:getMin()[1], 0, 0)
EgtSurfTmMoveFacet( nSide2Id, 3, vtMove, GDB_RT.GLOB)
end
local XId = EmtAxis {
Name = 'X',
Parent = 'Base',
@@ -191,16 +255,29 @@ local CId = EmtAxis {
Stroke = {MinC, MaxC},
Home = 0,
Geo = 'C_AXIS/GEO',
Aux = {'C_AXIS/SOLID', 'C_AXIS/COLLISION'}}
if NewTopC then
local SolidTopId = EgtGetFirstNameInGroup( EgtGetFirstNameInGroup( CId, 'SOLID'), 'TOP')
local CollTopId = EgtGetFirstNameInGroup( EgtGetFirstNameInGroup( CId, 'COLLISION'), 'TOP')
EgtMove( { SolidTopId, CollTopId}, Vector3d( 65,0,0), GDB_RT.GLOB)
EgtSetName( CollTopId, 'BOX')
else
local CollTopId = EgtGetFirstNameInGroup( EgtGetFirstNameInGroup( CId, 'COLLISION'), 'TOP')
EgtSetName( CollTopId, 'BOX')
end
Aux = {'C_AXIS/SOLID', 'C_AXIS/COLLISION', 'C_AXIS/COLLISION2'}}
-- Imposto i vettori di movimento separatamente se sono presenti le variabili di riferimento
local vtXMove = Vector3d( EgtIf( NewTopC, 65, 0), 0, 0)
-- si prende la minima distanza tra DistRotCenterBToTopC e LONG_TOOL_MINLEN + pivot (comunque distanza minima 403)
local dZMove = max( 403, min( ( MillOffs + LONG_TOOL_MINLEN + 5), DistRotCenterBToTopC)) - 400
local vtZMove = Vector3d( 0, 0, dZMove)
-- Muove le facce in X e Z del solido principale
local SolidArmId = EgtGetFirstNameInGroup( EgtGetFirstNameInGroup( CId, 'SOLID'), 'ARM')
EgtSurfTmMoveFacet( SolidArmId, 14, vtZMove, GDB_RT.GLOB)
EgtSurfTmMoveFacet( SolidArmId, 11, vtXMove, GDB_RT.GLOB)
-- Muove il solido di collisione denominato "TOP" in X e muove la sua faccia inferiore per portarla al pari del solido principale
local CollTopId = EgtGetFirstNameInGroup( EgtGetFirstNameInGroup( CId, 'COLLISION'), 'TOP')
EgtMove( CollTopId, vtXMove, GDB_RT.GLOB)
EgtSurfTmMoveFacet( CollTopId, 4, vtZMove, GDB_RT.GLOB)
EgtSetName( CollTopId, 'BOX')
-- Imposta nel Frame di riferimento l'info "CollSkip"
local RefId = CollTopId + EgtGetInfo( CollTopId, 'Frame', 'i')
EgtSetInfo( RefId, 'CollSkip', 'C_TOP')
-- Muove il solido di collisione C_TOP
local CollUtTopId = EgtGetFirstNameInGroup( EgtGetFirstNameInGroup( CId, 'COLLISION2'), 'C_TOP')
EgtMove( CollUtTopId, vtZMove, GDB_RT.GLOB)
EmtAxis {
Name = 'B',
Parent = 'C',
@@ -273,28 +350,45 @@ end
-- Eventuale rinvio angolare
if SecondSupport >= 3 then
local H5Id = EmtHead {
Name = 'H5',
Parent = 'B',
HSet = 'H1',
Type = MCH_HT.MULTI,
ExitNbr = 2,
Pos1 = Point3d( 0, -AngTr1Len, -AngTr1Offs),
TDir1 = Y_AX(),
Pos2 = Point3d( 0, AngTr1Len, -AngTr1Offs),
TDir2 = -Y_AX(),
ADir = Z_AX(),
Rot1W = 0.2,
Rot2Stroke = { -120, 120},
OthColl = { 'H2', 'B/SOLID', 'C/SOLID'},
Geo = 'H5_HEAD/GEO',
Aux = {'H5_HEAD/SOLID', 'H5_HEAD/COLLISION'}}
Name = 'H5',
Parent = 'B',
HSet = 'H1',
Type = MCH_HT.MULTI,
ExitNbr = 2,
Pos1 = Point3d( 0, -AngTr1Len, -AngTr1Offs),
TDir1 = Y_AX(),
Pos2 = Point3d( 0, AngTr1Len, -AngTr1Offs),
TDir2 = -Y_AX(),
ADir = Z_AX(),
Rot1W = 0.2,
Rot2Stroke = { -120, 120},
OthColl = { 'H2', 'B/SOLID', 'C/SOLID'},
Geo = 'H5_HEAD/GEO',
Aux = {'H5_HEAD/SOLID', 'H5_HEAD/COLLISION'}}
EgtSetInfo( H5Id, 'AGB_TYPE', 2)
EgtSetInfo( H5Id, 'AGB_DMAX', 240)
EgtSetInfo( H5Id, 'AGB_ENCH', 44)
EgtSetInfo( H5Id, 'AGB_ENCV', 380)
EgtSetInfo( H5Id, 'AGB_MDIR', -Y_AX())
EgtSetInfo( H5Id, 'AGB_MDIR', X_AX())
EgtSetInfo( H5Id, 'ZMAXONROT', '1,15')
end
-- Eventuale aggregato per lavorazioni BlockHaus
if AggreBlockHaus then
local H7Id = EmtHead {
Name = 'H7',
Parent = 'B',
HSet = 'H1',
Type = MCH_HT.STD,
Pos = Point3d( AngTrBHLen, 0, -AngTrBHOffs),
TDir = -X_AX(),
ADir = X_AX(),
Rot1W = 0.2,
SolCh = MCH_SCC.ADIR_NEAR,
OthColl = {'H2', 'B/SOLID', 'C/SOLID'},
Geo = 'H7_HEAD/GEO',
Aux = {'H7_HEAD/SOLID', 'H7_HEAD/COLLISION'}}
end
-- Morse
local YId = EmtAxis {
Name = 'Y',
@@ -315,7 +409,7 @@ local PYId = EmtAxis {
Stroke = { 0, MaxOpen},
Home = MaxOpen,
Geo = 'PY_AXIS/GEO',
Aux = {'PY_AXIS/SOLID', 'PY_AXIS/COLLISION'}}
Aux = {'PY_AXIS/SOLID', 'PY_AXIS/COLLISION', 'PY_AXIS/CLAMP_CHECK'}}
local VId = EmtAxis {
Name = 'V',
Parent = 'Base',
@@ -335,7 +429,7 @@ local PVId = EmtAxis {
Stroke = { 0, MaxOpen},
Home = MaxOpen,
Geo = 'PV_AXIS/GEO',
Aux = {'PV_AXIS/SOLID', 'PV_AXIS/COLLISION'}}
Aux = {'PV_AXIS/SOLID', 'PV_AXIS/COLLISION', 'PV_AXIS/CLAMP_CHECK'}}
EmtAxis {
Name = 'T',
Parent = 'Base',
@@ -425,71 +519,153 @@ EmtTcPos {
TDir = -X_AX(),
ADir = -Y_AX(),
Geo = 'BASE/T10'}
EmtTcPos {
Name = 'T11',
Parent = 'Base',
Pos = Point3d( 523.8, 88.0, -877.5),
TDir = -X_AX(),
ADir = -Y_AX(),
Geo = 'BASE/T11'}
if not SpecialBH then
EmtTcPos {
Name = 'T101',
if AggreBlockHaus then
local TcpSsId = EmtTcPos {
Name = 'T11',
Parent = 'Base',
Pos = Point3d( -510.4, 113.2, -160.8),
TDir = X_AX(),
ADir = Z_AX(),
Geo = 'BASE/T101'}
Pos = Point3d( 678.3, -1.963, -877.5),
TDir = Y_AX(),
ADir = -X_AX(),
Geo = 'BASE/T121',
Aux = 'BASE/T121_HS'}
else
EmtTcPos {
Name = 'T101',
Name = 'T11',
Parent = 'Base',
Pos = Point3d( -510.4, 113.2, -1160.8),
TDir = X_AX(),
ADir = Z_AX(),
Geo = 'BASE/T101S'}
Pos = Point3d( 523.8, 88.0, -877.5),
TDir = -X_AX(),
ADir = -Y_AX(),
Geo = 'BASE/T11'}
end
if SecondSupport == 1 then
-- supporto per punta
-- ToolChanger 2
if SecondToolChanger then
EmtTcPos {
Name = 'T111',
Name = 'T21',
Parent = 'Base',
Pos = Point3d( -510.4, 113.2, -329.8),
TDir = Z_AX(),
ADir = X_AX(),
Geo = 'BASE/T111'}
elseif SecondSupport == 2 then
-- supporto per mortasatrice
Pos = Point3d( -503.2, 88.0, 172.5),
TDir = X_AX(),
ADir = -Y_AX(),
Geo = 'BASE/T21'}
EmtTcPos {
Name = 'T22',
Parent = 'Base',
Pos = Point3d( -503.2, 88.0, 67.5),
TDir = X_AX(),
ADir = -Y_AX(),
Geo = 'BASE/T22'}
EmtTcPos {
Name = 'T23',
Parent = 'Base',
Pos = Point3d( -503.2, 88.0, -37.5),
TDir = X_AX(),
ADir = -Y_AX(),
Geo = 'BASE/T23'}
EmtTcPos {
Name = 'T24',
Parent = 'Base',
Pos = Point3d( -503.2, 88.0, -142.5),
TDir = X_AX(),
ADir = -Y_AX(),
Geo = 'BASE/T24'}
EmtTcPos {
Name = 'T25',
Parent = 'Base',
Pos = Point3d( -503.2, 88.0, -247.5),
TDir = X_AX(),
ADir = -Y_AX(),
Geo = 'BASE/T25'}
EmtTcPos {
Name = 'T26',
Parent = 'Base',
Pos = Point3d( -503.2, 88.0, -352.5),
TDir = X_AX(),
ADir = -Y_AX(),
Geo = 'BASE/T26'}
EmtTcPos {
Name = 'T27',
Parent = 'Base',
Pos = Point3d( -503.2, 88.0, -457.5),
TDir = X_AX(),
ADir = -Y_AX(),
Geo = 'BASE/T27'}
EmtTcPos {
Name = 'T28',
Parent = 'Base',
Pos = Point3d( -503.2, 88.0, -562.5),
TDir = X_AX(),
ADir = -Y_AX(),
Geo = 'BASE/T28'}
else
if not SpecialBH then
EmtTcPos {
Name = 'T101',
Parent = 'Base',
Pos = Point3d( -510.4, 113.2, -160.8),
TDir = X_AX(),
ADir = Z_AX(),
Geo = 'BASE/T101'}
end
if SecondSupport == 1 then
-- supporto per punta
EmtTcPos {
Name = 'T111',
Parent = 'Base',
Pos = Point3d( -510.4, 113.2, -329.8),
TDir = Z_AX(),
ADir = X_AX(),
Geo = 'BASE/T111'}
elseif SecondSupport == 2 then
-- supporto per mortasatrice
local TcpSsId = EmtTcPos {
Name = 'T111',
Parent = 'Base',
Pos = Point3d( -510.4, 113.2, -430.8),
TDir = X_AX(),
ADir = Z_AX(),
Geo = 'BASE/T111M'}
EgtSetInfo( TcpSsId, 'Mortiser', true)
end
if SpecialBH then
EmtTcPos {
Name = 'T111',
Parent = 'Base',
Pos = Point3d( -810.4, 113.2, -329.8),
TDir = Y_AX(),
ADir = X_AX(),
Geo = 'BASE/T111S'}
end
end
-- motosega in caso di magazzino 2 o SpecialBH
if SpecialBH or SecondToolChanger then
local TcpSsId = EmtTcPos {
Name = 'T111',
Name = 'T101',
Parent = 'Base',
Pos = Point3d( -510.4, 113.2, -430.8),
Pos = Point3d( -510.4, 113.2, -1160.8),
TDir = X_AX(),
ADir = Z_AX(),
Geo = 'BASE/T111M'}
EgtSetInfo( TcpSsId, 'Mortiser', true)
elseif SecondSupport == 3 then
Geo = 'BASE/T101S'}
-- spostamento in caso di magazzino 2
if SecondToolChanger then
EgtMove( TcpSsId, Vector3d( 0, 0, 140), GDB_RT.GLOB)
end
end
if SecondSupport == 3 then
-- supporto per rinvio angolare
local TcpSsId = EmtTcPos {
Name = 'T91',
Parent = 'Base',
ExitNbr = 2,
Pos1 = Point3d( -510.4-150, 113.2, -329.8-170),
Pos1 = Point3d( -710.4-150, 113.2, -329.8-170),
TDir1 = X_AX(),
Pos2 = Point3d( -510.4+150, 113.2, -329.8-170),
Pos2 = Point3d( -710.4+150, 113.2, -329.8-170),
TDir2 = -X_AX(),
ADir = Z_AX(),
Geo = 'BASE/T91',
Aux = 'BASE/T91_HS'}
end
if SpecialBH then
EmtTcPos {
Name = 'T111',
Parent = 'Base',
Pos = Point3d( -810.4, 113.2, -329.8),
TDir = Y_AX(),
ADir = X_AX(),
Geo = 'BASE/T111S'}
if SecondToolChanger then
EgtMove( TcpSsId, Vector3d( 0, 0, -900), GDB_RT.GLOB)
end
end
-- Aggiusto posizioni geometriche
@@ -503,10 +679,12 @@ EgtMove( EgtGetFirstNameInGroup( YId, 'SOLID'), vtMove, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( YId, 'COLLISION'), vtMove, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( PYId, 'SOLID'), vtMove, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( PYId, 'COLLISION'), vtMove, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( PYId, 'CLAMP_CHECK'), vtMove + Vector3d(0,0,DistZClampToTable), GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( VId, 'SOLID'), vtMove, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( VId, 'COLLISION'), vtMove, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( PVId, 'SOLID'), vtMove, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( PVId, 'COLLISION'), vtMove, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( PVId, 'CLAMP_CHECK'), vtMove + Vector3d(0,0,DistZClampToTable), GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( XId, 'SOLID'), vtMoveX, GDB_RT.GLOB)
-- Assegno identificativi alle spie delle morse
@@ -521,28 +699,49 @@ PVLightId = EgtGetFirstNameInGroup( EgtGetFirstNameInGroup( PVId, 'SOLID') or GD
---------------------------------------------------------------------
function OnSetHead()
-- se testa lama
if EMC.HEAD == 'H2' then
EmtModifyAxisDirection( 'B', VectorFromRotated( X_AX(), Z_AX(), -SawCOffs))
-- altrimenti
if EMC.HEAD == 'H1' then
if EMC.TOTLEN and EMC.TOTLEN < LONG_TOOL_MINLEN then
EmtModifyAxisStroke( 'B', {MinB, MaxB})
else
EmtModifyAxisStroke( 'B', {-140, 140})
end
else
EmtModifyAxisDirection( 'B', X_AX())
if EMC.HEAD == 'H3' then
local dDist = EgtIf( EMC.DIST and abs( EMC.DIST) > 1, EMC.DIST, ChSawLen)
EmtModifyExitPosition( EMC.HEAD, EMC.EXIT, Point3d( 0, 0, -dDist))
if not EMC.VER or EMC.VER < '2.5h2' then
local vtMove = Point3d( 0, 0, -dDist) - Point3d( EMC.EXITPOS)
local ExitId = EgtGetFirstNameInGroup( EgtGetHeadId( EMC.HEAD), 'T'..tostring( EMC.EXIT))
EgtMove( ExitId, vtMove)
EmtModifyAxisStroke( 'B', {MinB, MaxB})
if EMC.HEAD == 'H2' then
EmtModifyAxisDirection( 'B', VectorFromRotated( X_AX(), Z_AX(), -SawCOffs))
-- altrimenti
else
EmtModifyAxisDirection( 'B', X_AX())
if EMC.HEAD == 'H3' then
local dDist = EgtIf( EMC.DIST and abs( EMC.DIST) > 1, EMC.DIST, ChSawLen)
EmtModifyExitPosition( EMC.HEAD, EMC.EXIT, Point3d( 0, 0, -dDist))
if not EMC.VER or EMC.VER < '2.5h2' then
local vtMove = Point3d( 0, 0, -dDist) - Point3d( EMC.EXITPOS)
local ExitId = EgtGetFirstNameInGroup( EgtGetHeadId( EMC.HEAD), 'T'..tostring( EMC.EXIT))
EgtMove( ExitId, vtMove)
end
end
end
end
end
---------------------------------------------------------------------
-- Funzione che calcola l'angolo Home di C per la sega a catena dal valore dell'asse virtuale
function GetChainSawCHomeFromVirtualAxis( dPosA)
-- se A=0 -> T111 -> HomeC = 0
if abs( dPosA) < 0.1 then
return EgtIf( BD.RIGHT_LOAD, -180, 0)
-- altrimenti A=90 -> T114 -> HomeC = -90
else
return EgtIf( BD.RIGHT_LOAD, 90, 270)
end
end
---------------------------------------------------------------------
-- Funzione per impostare spia stato morsa carrello Y
function SetPYLight( bClosed)
if not PYLightId then return end
EgtSetColor( PYLightId, EgtIf( bClosed, 'RED', 'LIME'))
EgtSetColor( PYLightId, EgtIf( bClosed, 'RED', 'LIME'))
if bClosed then
EgtSetInfo( PYLightId, 'On', '1')
else
@@ -576,6 +775,52 @@ function GetPVLight()
return ( EgtGetInfo( PVLightId, 'On') == '1')
end
---------------------------------------------------------------------
---------------------------- Cambio Utensile ------------------------
function GetTCSet( sTcPos)
-- TC 1
if sTcPos == 'T1' or sTcPos == 'T2' or sTcPos == 'T3' or sTcPos == 'T4' or sTcPos == 'T5' or
sTcPos == 'T6' or sTcPos == 'T7' or sTcPos == 'T8' or sTcPos == 'T9' or sTcPos == 'T10' or sTcPos == 'T11' then
return 1
-- TC 2
elseif sTcPos == 'T21' or sTcPos == 'T22' or sTcPos == 'T23' or sTcPos == 'T24' or
sTcPos == 'T25' or sTcPos == 'T26' or sTcPos == 'T27' or sTcPos == 'T28' then
return 2
end
end
---------------------------------------------------------------------
-- Funzione per impostare la posizione del rinvio flottante
function SetFloatPos( sHead, dPos)
-- recupero Id testa
local nHeadId = EgtGetHeadId( sHead)
if not nHeadId then return false end
-- se ci sono entità flottanti nel ToolHolder
local nRefId = EgtGetFirstNameInGroup( nHeadId, '_T1')
local vtTool = EgtFR( nRefId, GDB_ID.ROOT):getVersZ()
local nObjId = EgtGetFirstGroupInGroup( EgtGetFirstNameInGroup( nHeadId, 'T1'))
local FloatEntities = EgtGetInfoInGroup( nObjId, 'Float')
if FloatEntities and #FloatEntities > 0 then
-- il porta-utensile flottante non può comprimersi più di 10mm
if dPos > 10 then
local sErr = 'Floating Ring compressed more than 10mm'
EmtSetLastError( 1222, sErr)
EgtOutLog( 'Error : ' .. sErr, 1)
end
local dFloat = EgtGetInfo( FloatEntities[1], 'Float', 'd')
if abs( dPos - dFloat) > 10 * GEO.EPS_SMALL then
local vtMove = ( dPos - dFloat) * vtTool
-- sposto tutte le entità flottanti
for i = 1, #FloatEntities do
EgtMove( FloatEntities[i], vtMove, GDB_RT.GLOB)
EgtSetInfo( FloatEntities[i], 'Float', dPos)
end
end
return true
end
return false
end
---------------------------------------------------------------------
-- Funzione per resettare tutte le attivazioni della macchina
function OnResetMachine()
@@ -583,6 +828,7 @@ function OnResetMachine()
EmtUnlinkAllFixturesFromGroups()
SetPYLight( false)
SetPVLight( false)
SetFloatPos( 'H1', 0)
-- nascondo Vmill
local nRawId = EgtGetFirstRawPart()
while nRawId do
@@ -596,3 +842,53 @@ function OnResetMachine()
end
EgtSetStatus( EgtGetFirstNameInGroup( GDB_ID.ROOT, 'VMill') or GDB_ID.NULL, GDB_ST.OFF)
end
---------------------------------------------------------------------
function UpdateMinJoinDeltaTol( SB, HB, LB)
local L_SMALL = 800
local H_V = 90
local H_S = 200
local H_L = 400
local W_V = 90
local W_S = 150
local W_L = 250
local DELTA_TOL_S = 210
local DELTA_TOL_V = 110
local DELTA_TOL_L = 410
if SB <= W_V and HB <= H_V then
MinJoin = MinJoinVV
DeltaTol = DELTA_TOL_V
elseif LB <= L_SMALL then
MinJoin = MinJoinSS
DeltaTol = DELTA_TOL_S
else
local dMinJoinS
local dMinJoinL
if SB <= W_S then
dMinJoinS = MinJoinSS
dMinJoinL = MinJoinLS
elseif SB <= W_L then
local Coeff = ( SB - W_S) / ( W_L - W_S)
dMinJoinS = ( 1 - Coeff) * MinJoinSS + Coeff * MinJoinSL
dMinJoinL = ( 1 - Coeff) * MinJoinLS + Coeff * MinJoinLL
else
dMinJoinS = MinJoinSL
dMinJoinL = MinJoinLL
end
if HB <= H_S then
MinJoin = dMinJoinS
DeltaTol = DELTA_TOL_S
elseif HB <= H_L then
local Coeff = ( HB - H_S) / ( H_L - H_S)
MinJoin = ( 1 - Coeff) * dMinJoinS + Coeff * dMinJoinL
DeltaTol = ( 1 - Coeff) * DELTA_TOL_S + Coeff * DELTA_TOL_L
else
MinJoin = dMinJoinL
DeltaTol = DELTA_TOL_L
end
if SB < W_V then
DeltaTol = DELTA_TOL_V
end
end
MinOther = abs( MinY) + abs( MaxV) + MinJoin
end
BIN
View File
Binary file not shown.
+67
View File
@@ -0,0 +1,67 @@
; Commento per evitare BOM con UTF-8
;Index = Type, Description, Default Value
; Type : b=boolean, d=double, l=lenght, s=string
[Drilling]
[Sawing]
[Milling]
0=l,MaxElev,0
1=d,OutRaw,0
2=l,SideElev,0
3=d,TrimExt,0
4=s,VtFaceUse,0,0,0
5=s,EdgesFaceUse,0
[Pocketing]
0=l,MaxElev,0
1=b,Open,0
2=d,OpenMinSafe,0
3=d,OpenOutRaw,0
4=l,MaxOptSize,0
5=b,AdjustFeed,1
[Mortising]
0=l,MaxElev,0
[Chiseling]
[SawRoughing]
[SawFinishing]
[GenMachining]
[SurfRoughing]
0=l,MaxElev,0
1=b,PlaneZ,0
2=i,Order,[0=ByPlane;1=ByDepth]
[SurfFinishing]
0=b,SkipMaxDown,1
1=i,OptimalType,[0=ZigZag;2=SpiralIn;3=SpiralOut]
2=d,SplitAngle,45
3=d,AngleTol,5
[5AxMilling]
0=s,VtAuxDir,0,1,0
1=l,LinTol,0.01
2=l,MaxLen,10
3=i,ProjType,[0=MinDist;1=FixedDir;2=Guide]
4=i,PocketType,[0=ZigZag;2=SpiralIn;3=SpiralOut]
5=d,PocketAng,0
6=d,SideAng,90
7=d,LeadAng,0
8=l,Step,10
9=d,AngIni,-90
10=d,AngFin,90
11=l,LiTang,0
12=l,LiOrth,0
13=l,LiElev,0
14=l,LoTang,0
15=l,LoOrth,0
16=l,LoElev,0
17=b,DirFromGuide,0
18=b,SurfAvoid,0
19=d,SingConeAng,0.1
+29 -12
View File
@@ -24,7 +24,7 @@ local INVALIDPOS = ""
local POS = "Pos"
-- Geom Set
local GS = {}
local GS = {{"H1", "H7"}}
-- Configurazione posizioni
local PositionTable={{Pos = "Pos1", TcPos = "T1", Head = "H1", Group = "G1"},
@@ -40,20 +40,37 @@ local PositionTable={{Pos = "Pos1", TcPos = "T1", Head = "H1", Group = "G1"},
{Pos = "Pos11", TcPos = "T11", Head = "H1", Group = "G1"},
{Pos = "Pos12", TcPos = "T42", Head = "H2", Group = "G1"},
{Pos = "Pos13", TcPos = "T101", Head = "H3", Group = "G2"}}
local SecSuppId = EgtGetTcPosId( 'T111')
if SecSuppId then
local bMortiser = EgtGetInfo( SecSuppId, 'Mortiser', 'b')
if bMortiser then
table.insert( PositionTable, {Pos = "Pos14", TcPos = "T111", Head = "H3", Group = "G2"})
else
table.insert( PositionTable, {Pos = "Pos14", TcPos = "T111", Head = "H1", Group = "G2"})
local IsTC2Active = ( EgtGetFirstNameInGroup( EgtGetBaseId( 'Base'), 'TC2') ~= nil)
if IsTC2Active then
local PositionTableTC2={{Pos = "Pos14", TcPos = "T21", Head = "H1", Group = "G3"},
{Pos = "Pos15", TcPos = "T22", Head = "H1", Group = "G3"},
{Pos = "Pos16", TcPos = "T23", Head = "H1", Group = "G3"},
{Pos = "Pos17", TcPos = "T24", Head = "H1", Group = "G3"},
{Pos = "Pos18", TcPos = "T25", Head = "H1", Group = "G3"},
{Pos = "Pos19", TcPos = "T26", Head = "H1", Group = "G3"},
{Pos = "Pos20", TcPos = "T27", Head = "H1", Group = "G3"},
{Pos = "Pos21", TcPos = "T28", Head = "H1", Group = "G3"}}
if EgtGetHeadId( 'H5') then
table.insert( PositionTableTC2, {Pos = "Pos22", TcPos = "T91", Head = "H5", Group = "G2"})
end
EgtJoinTables( PositionTable, PositionTableTC2)
else
local SecSuppId = EgtGetTcPosId( 'T111')
if SecSuppId then
local bMortiser = EgtGetInfo( SecSuppId, 'Mortiser', 'b')
if bMortiser then
table.insert( PositionTable, {Pos = "Pos14", TcPos = "T111", Head = "H3", Group = "G2"})
else
table.insert( PositionTable, {Pos = "Pos14", TcPos = "T111", Head = "H1", Group = "G2"})
end
end
if EgtGetHeadId( 'H5') then
table.insert( PositionTable, {Pos = "Pos14", TcPos = "T91", Head = "H5", Group = "G2"})
end
end
if EgtGetHeadId( 'H5') then
table.insert( PositionTable, {Pos = "Pos14", TcPos = "T91", Head = "H5", Group = "G2"})
end
local UsePositionHead = true
local UsePositionHead = false
local function IsInGeomSet( ToolHead, PosHead)
for GsIndex = 1, #GS do
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+43
View File
@@ -0,0 +1,43 @@
; Commento per evitare BOM con UTF-8
; Index, Type, Description, Value
; Index = 0,1,..,n
; Type : d=double, l=lenght, s=string, b=boolean, dr=double recalc, sr= string recalc, lr=lenght recalc, br=boolean recalc, th=toolholder
; Description : STEP, SIDESTEP, ...
[DRILL_STD]
0=th,TH,
1=l,STEP
2=tl,DOUBLE
[SAW_STD]
0=th,TH,
1=l,STEP
2=l,SIDESTEP
3=b,LONGCUT
[SAW_FLAT]
0=th,TH,
1=l,STEP
2=l,SIDESTEP
3=b,LONGCUT
[MILL_STD]
0=th,TH,
1=l,STEP
2=l,SIDESTEP
3=l,SIDEDEPTH
4=tl,DOUBLE
5=lr,TOOL_OVERHANG
[MILL_NOTIP]
0=th,TH,
1=l,STEP
2=l,SIDESTEP
3=l,SIDEDEPTH
4=tl,DOUBLE
5=lr,TOOL_OVERHANG
[MORTISE_STD]
0=b,MORTISE
1=l,STEP
2=l,SIDESTEP
+221
View File
@@ -0,0 +1,221 @@
==== Common_FAST Update Log ====
Versione 3.1d2 (22/04/2026)
- (GEN) Corretta generazione del PreparePostRotation (in tutti i CN) ora salva lo stato della pinza per lo spostamento successivo. Ticket#2933
- (SIM-GEN) Corretto pinzaggio in caso di passo del pellegrino con recupero completo di una sola pinza
Versione 3.1d1 (14/04/2026)
- (SIM-GEN) Aggiorna lo step totale del PilgrimStep e lo step Y con il valore di MyMinY, di modo che tenga conto del AGG_LOAD quando c'è. Ticket#2919
- (GEN) Per NUM, si lascia aperta la pinza di carico in caso di END2. TPA era già corretto. Ticket#2869
Versione 3.1c2 (30/03/2026)
- (SIM-GEN) Corretti moviemnti con motosega. Ora si ruota la C con B sempre a zero, anche alla posizione X di sicurezza. Ticket#2866
Versione 3.1c1 (27/03/2026)
- (SIM-GEN) FASTCLAMPING = true : si suddivide il movimento metà tirando e metà spingendo con altra pinza. Così si aumenta la velocità.
- FASTCLAMPING = false : una pinza resta ferma e si fa il movimento tutto con una pinza. Così si limita lo scivolamento del pezzo.
- (GEN) In caso di motosega prelevata, si ruota in home. Ticket#2866
Versione 3.1a2 (26/01/2026)
- (GEN) Nella G101 il parametro EE era sempre a 4 perchè la variabile veniva settata dopo. Ticket#2796
Versione 3.1a1 (08/01/2026)
- (SIM) Ottimizzata scrittura funzione ClampCheck post aggiornamento dll
- (SIM) Corretto problema della funzione OnSimulDispositionStart in caso di fase finale.
- (MLDE-SIM-GEN) Variabile DeltaTol deve essere spostata in MLDE
Versione 2.7l3 (22/12/2025)
- (SIM) Eliminata MinJoin, utilizzata al suo posto funzione già esistente UpdateMinJoin nell'mlde
- (SIM) Modificata formula calcolo Area minima
Versione 2.7l2 (18/12/2025)
- (SIM) Aggiunta funzione CheckClamping
Versione 2.7l1 (10/12/2025)
- (SIM) Aggiornata risoluzione VMillTol in funzione dello spessore lama
- (EST) Modifiche a calcolo stima tempi, da verificare.
- (SIM) Corretto movimento in simulazione che non rispettava movimento generato.
- (GEN) Con controllo NUM/NUM_PLUS nella scrittura della coordinata tolto il simbolo '='
- (SIM) Aggiunto controllo C in base a carico Dx o Sx durante il cambio utensile
Versione 2.7k1 (10/11/2025)
- (GEN) Corretto set variabili info utensile prima del movimento in home in caso di pezzi alti per NUM/NUM_PLUS.
Versione 2.7j2 (08/10/2025)
- (SIM-GEN) Quando si scarica motosega, si raddrizza prima l'asse B e poi si muove il C. Ora sempre e non solo se pezzo alto.
Versione 2.7j1 (06/10/2025)
- (SIM-GEN) Quando si scarica motosega, si raddrizza prima l'asse B e poi si muove il C.
- (MLDE-SIM) Controllo collisione tra utensile e TOP testa C. Serve CAM5 2.7j1
Versione 2.7i3 (23/09/2025)
- (MLDE-ALL) Spostate costanti dimensioni utensili in MLDE.
Versione 2.7i2 (17/09/2025)
- (EST) Stima tempi considerando accelerazioni
- (SIM) Prelievo e deposito motosega con gli angoli comunicati da Essetre
Versione 2.7i1 (08/09/2025)
- (SIM-GEN) Se lavorazione precedente e successiva con motosega e si cambiano assi rotanti, vado in parcheggio per ruotare. Ticket#1844
- (SIM-GEN) Per NEWCLAMPING, corretto un caso di riposizionemento allo scarico dove la pinza V poteva andare in posizione direttamente, ma cercava di fare passo pellegrino. Ticket#2572
Versione 2.7g1 (01/07/2025)
- (GEN) Aggiunti parametri FMAXPINZE, MAXACC, MINACC configurabili da TS3. Ticket#2052
Versione 2.7f3 (26/06/2025)
- (SIM-GEN) Aggiunti 10mm di sicurezza in caso di primo pinzaggio per stare oltre tolleranza riqualifica laser di 50mm. Ticket#2504
Versione 2.7f2 (19/06/2025)
- (GEN) Se in separazione il pezzo è andato più lontano della posizione standard, viene riletta. Ticket#2498
Versione 2.7f1 (18/06/2025)
- (SIM-GEN) Se utensile più lungo di 350mm, si va in posizione sicurezza come per la motosega. Ticket#2438
Versione 2.7e1 (26/05/2025)
- (SIM) Aumentata dimensione massima per la quale si rimuove uno scarto dal VMILL. Ticket#1438
- (SIM) In simulazione, corretto selezione utensile per punte lunghe. Ticket#2438
Versione 2.7d1 (14/04/2025)
- (GEN) Corretto movimento iniziale in caso di motosega, si controlla solo se non è il carico. Ticket#2385
Versione 2.7c1 (26/03/2025)
- (GEN) All'inizio del codice ISO si scrive nel commento anche il controllo numerico utilizzato per la generazione.
- (GEN) Aggiunta commenti HEADER e FOOTER per comunicazione con linea o altre macchine, da parte di Essetre.
- (GEN) In MyAdjustLinearAxes si utilizza TDIR per calcolarsi gli offset per compatibilità con lavorazioni a 5 assi.
Versione 2.7b1 (20/02/2025)
- (SIM-GEN) Aggiunta possibilità di settare HCING/TCING nelle note di ogni singola lavorazione per gestire parte non pinzabile del pezzo. Funziona solo con nuovo pinzaggio.
- (SIM-GEN) Piccola correzione calcolo posizione carrelli con nuova strategia di pinzaggio.
- (SIM-GEN) Caricamento libreria EmtGenMachining. Si fa una require con PCALL perchè la libreria è opzionale e non è detto che ci sia. In installazione CAM5 dalla 2.7a1
- (GEN) Per controllo TPA, modifica al numero di decimali.
- (SIM) Aggiunta gestione per ToolHolder flottante
Versione 2.7a3 (08/01/2025)
- (GEN) Dopo separazione, in NUM_PLUS, si srive EH1 solo se macro G101, perchè altrimenti non è prevista. Ticket#2239
Versione 2.7a2 (08/01/2025)
- (MLDE-SIM) Aggiunta gestione FACOLTATIVA 'EstimationRapidMultiplier' in MLDE per regolare il tempo stimato. Se non presente in MLDE, default 1.
- (SIM) Aggiunta gestione qualità VMILL da impostazioni macchina
Versione 2.7a1 (07/01/2025)
- (MLDE-SIM-GEN) Nuovo aggregato 90° (H7) per fresa tipo BlockHaus. Ticket#2142
- (SIM-GEN) Aumentati limiti massimi di pinzaggio minimo
Versione 2.6l1 (02/12/2024)
- (SIM) Corretto movimento VMILL durante scarico pezzo piccolo a caduta
- (SIM-GEN) Per decidere posizione parcheggio barra dopo separazione, si considera lunghezza coda del pezzo in lavoro per evitare collisioni. Ticket#2168
Versione 2.6k1 (11/11/2024)
- (GEN) Aggiunta gestione aggregato a T per NUM
- (SIM) Tolta gestione testa dummy H4
- (SIM-GEN) Aggiustato parametro in calcolo ingombro lavorazione. Ticket#2163
Versione 2.6j10 (25/10/2024)
- (SIM-GEN) Miglioria 2.6j9. Si ribadisce pinza in presa sempre, all'inizio, in base a quella attiva
Versione 2.6j9 (22/10/2024)
- (SIM-GEN) Miglioria 2.6j6. Oltre al passo pellegrino si ribadisce anche quando è scambio diretto
Versione 2.6j8 (21/10/2024)
- (SIM-GEN) Corretto problema tolleranza aggiunto con versione 2.6j7
Versione 2.6j7 (18/10/2024)
- (SIM-GEN) In nuova disposizione carrelli, aggiunta tolleranza di 100 EPS quando si calcola minimo posizionamento
Versione 2.6j6 (17/10/2024)
- (GEN) Si ribadisce che la pinza era in presa, prima di cominciare con lo scambio del passo del pellegrino. Ticket#2121
Versione 2.6j5 (17/10/2024)
- (SIM-GEN) Piccola correzione nuovo riposizionamento. Nel taglio dello scarto finale riposizionava nel vuoto. Ticket#2115
Versione 2.6j4 (15/10/2024)
- (SIM-GEN) Piccola correzione nuovo riposizionamento. Non considerava i 50mm di tolleranza su primo pinzaggio dopo ribaltamento
- (SIM-GEN) Gestione attivazione pressore verticale in nuovo riposizionamento
Versione 2.6j3 (11/10/2024)
- (GEN) Corretta scrittura macro start/attesa movimenti per NUM. Veniva scritto codice per TPA.
Versione 2.6j2 (03/10/2024)
- (SIM-GEN) Piccola correzione calcolo posizione carrello durante riposizionamento, nuova gestione
Versione 2.6j1 (01/10/2024)
- (SIM-GEN) Sistemato calcolo in nuova disposzione carrelli
Versione 2.6i6 (25/09/2024)
- (GEN) Migliorata gestione movimenti per portare testa vicino a cambio utensile se trave alta. Ticket#2066
Versione 2.6i5 (24/09/2024)
- (SIM-GEN) Tolto controllo su lunghezza maggiore di 200mm introdotto con 2.6i2 perchè non completamente funzionante
- (GEN) Gestione in OnRapid() di EMT.FLAG=5 (rotazione a Z max per lavorazione successiva). Ora allineata alla simulazione
Versione 2.6i4 (24/09/2024)
- (SIM-GEN) Aggiunto ripinzaggio extra in caso servisse un grande spostamento e si sta pinzando poco.
L'aggiunta del ripinzaggio dipende da FASTCLAMPING (che deve essere disattiva). Viene aggiunta GAIN_RECLAMPING per decidere il guadagno in mm del ripinzaggio.
Versione 2.6i3 (23/09/2024)
- (SIM-GEN) Aggiunta nuova strategia riposizionamento morse
- (SIM-GEN) Aggiunta lettura flag NEWCLAMPING in BeamData, per abilitare nuova strategia riposizionamento. Se false o nil, funziona con metodo vecchio.
- (SIM-GEN) Aggiunta lettura flag FASTCLAMPING. Se false, al carico prende al massimo 1000mm, per evitare collisioni durante ciclo di lettura laser e prima lavorazione.
Versione 2.6i2 (16/09/2024)
- (SIM-GEN) Se utensili più lunghi di 200mm, si ruota in home e poi si approccia il pezzo. Ticket#2038
- (SIM-GEN) Aumentata distanza ingombro da 650mm a 660mm. In casi di utensile abbastanza lungo poteva andare in colisione. Ticket#2041
Versione 2.6i1 (02/09/2024)
- (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.6g1 (03/07/2024)
- (GEN) Corretto chiamata macro precarico in caso di taglio finale, ma con ribaltamento successivo. Ora si chiama solo se la fase successiva è una "END". Ticket#1881
- (GEN) Per controllo NUM, se arco maggiore di 99999mm, si approssima con una retta. Ticket#1888
Versione 2.6e3 (06/05/2024)
- (MLDE-SIM-GEN) Gestione facoltativa parametri MIN_JOIN_xx settabili in Ts3. Ticket#1794
Versione 2.6e2 (06/05/2024)
- (SIM-GEN) Modificata tolleranza calcolo ingombri lavorazioni per posizionamento pinze. Ticket#1790
Versione 2.6e1 (30/04/2024)
- (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 (18/04/2024)
- (SIM-GEN) In MLSE, quando c'è una rotazione, viene settato EMT.CNT=1 per considerare i 50mm di compensazione laser.
- (SIM) Nel file di log dove c'è stampa gruppi di collisione, viene scritto anche ID del gruppo
Versione 2.6d1 (15/04/2024)
- (GEN) Aggiunta gestione aggregato doppia uscita per controllo NUM_PLUS
- (GEN) Con aggregato con si possono fare archi, se OnArc con aggregato, dà errore.
- (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)
Versione 2.6c8 (28/03/2024)
- (MLSE) Possibilità di lavorazione da X- tra le pinze, se abilitata da flag (User.ENABLE_TOOL_BETWEEN_VICES == 1).
- (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
Versione 2.6c7 (12/03/2024)
- (SIM) Miglioramento visualizzazione spigoli VMILL alla fine della simulazione. Funzione: EgtVolZmapSetShowEdges. N.B.= serve CAM5 2.6c2 NON OBBLIGATORIO
- (GEN) Corretto problema di movimento pinze assieme a discesa asse Z (Ticket #1710)
Versione 2.6c6 (04/03/2024)
- (MLDE-GEN) Aggiunta variabile 'MACH_NAME' in MLDE con nome macchina
Versione 2.6c5 (29/02/2024)
- (GEN) Aggiunto comando di wait fine M101/G101 in caso di movimento in zona sicurezza per motosega
- (GEN) Gestione accelerazioni pinze in M115 ( solo per TPA)
- (SIM) Gestione rimozione VMILL per tagli a cubetti a zig-zag
Versione 2.6c4 (27/02/2024)
- (MLDE-SIM-GEN) Con pezzi molto alti '> BeamHeightForFixRot', aggiunto parametro 'SafeXRotAxes' per ruotare motosega in zona sicura lontano dal pezzo
- (SIM) Nelle funzioni movimentaizone assi, utilizzate costanti 'MCH_SIM_STEP'
Versione 2.6c3 (23/02/2024)
- (SIM) Corretta lettura parametro RIGHT_LOAD
- (SIM-GEN) Rimossa chiamata funzione EgtGetSourceDir rimasta in MLPE
Versione 2.6c2 (23/02/2024)
- (SIM-GEN) Rimossa chiamata funzione EgtGetSourceDir
Versione 2.6c1 (23/02/2024)
- (SIM-GEN) Prima versione post-proc comune FAST e FASTrl
- (SIM-GEN) "BeamData" caricato come libreria con 'require' anziché come file con 'dofile'
- (SIM) Aggiunta funzioni "OnSimulInit" e "OnSimulExit" per orientare vista corretta in caso di macchina con carico destro. N.B.= serve CAM5 2.6b4
- (SIM-GEN) In BeamData aggiunto flag per direzione carico RIGHT_LOAD
- (SIM-GEN) Aggiornamento 'Compile.bat' con nuovi nomi file
+10
View File
@@ -0,0 +1,10 @@
-- Version.lua by EgalWare s.r.l. 2024/03/28
-- Gestione della versione dei file comuni post-processori macchine FAST e FASTrl di Essetre
local InfoCommon_STD_PP = {
NAME = 'Common_FAST', -- nome script PP standard
VERSION = '3.1d2', -- versione script
MIN_MACH_VER_PP_COMMON = '2.5k1' -- versione minima kernel
}
return InfoCommon_STD_PP