Compare commits

...

119 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 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 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 793fe00cc9 Prima versione aggregato flottante 2025-01-07 14:43:07 +01:00
21 changed files with 1742 additions and 495 deletions
+1
View File
@@ -1,6 +1,7 @@
/Tools /Tools
/Machinings /Machinings
/SetUp /SetUp
/Beam/AISetup
/Beam/Ts3Data.bak /Beam/Ts3Data.bak
/Beam/CutData.lua /Beam/CutData.lua
/Beam/DrillData.lua /Beam/DrillData.lua
+136 -16
View File
@@ -9,8 +9,8 @@ local BeamData = {
RIGHT_LOAD = false, -- flag carico da destra RIGHT_LOAD = false, -- flag carico da destra
ROT90 = false, -- flag abilitazione rotazione 90 gradi ROT90 = false, -- flag abilitazione rotazione 90 gradi
ROT180 = true, -- flag abilitazione rotazione 180 gradi ROT180 = true, -- flag abilitazione rotazione 180 gradi
NEWCLAMPING = false, -- flag abilitazione nuovo metodo riposizionamento carrelli NEWCLAMPING = true, -- flag abilitazione nuovo metodo riposizionamento carrelli
FASTCLAMPING= true, -- flag abilitazione riduzione numero riposizionamenti al carico e durante grande trascinamento FASTCLAMPING= false, -- flag abilitazione riduzione numero riposizionamenti al carico e durante grande trascinamento
MIN_WIDTH = 40, -- larghezza minima del grezzo MIN_WIDTH = 40, -- larghezza minima del grezzo
MIN_HEIGHT = 40, -- altezza minima del grezzo MIN_HEIGHT = 40, -- altezza minima del grezzo
MAX_WIDTH = 240, -- larghezza massima del grezzo MAX_WIDTH = 240, -- larghezza massima del grezzo
@@ -42,6 +42,7 @@ local BeamData = {
DRILL_VZ_MIN = -0.51, -- componente limite in Z del versore di un foro 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_VX_MAX = 0.867, -- componente limite in X del versore di un foro sulle facce laterali
DRILL_OVERLAP = 5, -- sovrapposizione tra due mezze forature 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 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_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 MAX_LEN_HTFEA = 2000.0, -- massima lunghezza di feature di testa o coda
@@ -75,7 +76,10 @@ local BeamData = {
PRECUT_HEAD = true, -- flag abilitazione pretaglio grezzo a zero in testa PRECUT_HEAD = true, -- flag abilitazione pretaglio grezzo a zero in testa
PRECUT_TAIL = true, -- flag abilitazione pretaglio grezzo a zero in coda 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 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 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 -- Aggiornamento con dati da TechnoEssetre7
@@ -102,9 +106,13 @@ if EgtExistsFile( sData) then
BeamData.MAXDIAM_POCK_CORNER = Machine.Offsets.MAXDIAM_POCK_CORNER or BeamData.MAXDIAM_POCK_CORNER 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_ENDLEN = Machine.Offsets.LONGCUT_ENDLEN or BeamData.LONGCUT_ENDLEN
BeamData.LONGCUT_MAXLEN = Machine.Offsets.LONGCUT_MAXLEN or BeamData.LONGCUT_MAXLEN 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.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_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.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_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.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.MIN_HEIGHT_ADDED_CUTS then BeamData.MIN_HEIGHT_ADDED_CUTS = min( Machine.Offsets.MIN_HEIGHT_ADDED_CUTS, BeamData.MIN_HEIGHT_ADDED_CUTS) end
@@ -112,6 +120,8 @@ if EgtExistsFile( sData) then
if Machine.Offsets.FASTCLAMPING ~= nil then BeamData.FASTCLAMPING = ( Machine.Offsets.FASTCLAMPING == 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.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.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 end
if Machine.Trave then if Machine.Trave then
BeamData.MIN_WIDTH = Machine.Trave.XMIN or BeamData.MIN_WIDTH BeamData.MIN_WIDTH = Machine.Trave.XMIN or BeamData.MIN_WIDTH
@@ -184,36 +194,146 @@ local function GetChainSawInitAngs( vtN, vtO, nInd)
end end
BeamData.GetChainSawInitAngs = GetChainSawInitAngs 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 function GetSetupInfo( sHead)
local SetupInfo = {} local SetupInfo = {}
-- dati comuni -- dati comuni
SetupInfo.bIsCSymmetric = false SetupInfo.bIsCSymmetrical = false
SetupInfo.dCAxisEncumbrance = 180 SetupInfo.dCAxisEncumbrance = 180
SetupInfo.dCAxisSideEncumbrance = 200
SetupInfo.dPivot = 175 -- per uscita fresa, diverso da uscita lama
SetupInfo.bToolOnAggregate = false SetupInfo.bToolOnAggregate = false
SetupInfo.vtRotationAxisC = Z_AX()
SetupInfo.vtRotationAxisAB = X_AX()
-- testa 5 assi da sopra -- testa 5 assi da sopra
if sHead == 'H1' then if sHead == 'H1' then
SetupInfo.bIsTopHead = true SetupInfo.HeadType = { bTop = true, bBottom = false}
SetupInfo.bIsBottomHead = not SetupInfo.bIsTopHead SetupInfo.PreferredSide = {}
SetupInfo.dMaxNegativeAngle = sin( -45) SetupInfo.GetMinNz = function() return sin( -45) end
-- lama su testa 5 assi da sopra -- lama su testa 5 assi da sopra
elseif sHead == 'H2' then elseif sHead == 'H2' then
SetupInfo.bIsTopHead = true SetupInfo.HeadType = { bTop = true, bBottom = false}
SetupInfo.bIsBottomHead = not SetupInfo.bIsTopHead SetupInfo.PreferredSide = {}
SetupInfo.dMaxNegativeAngle = sin( -45) SetupInfo.GetMinNz = function() return sin( -45) end
SetupInfo.GetPreCollisionData = GetPreCollisionData
SetupInfo.GetSCC = GetSCC
-- motosega -- motosega
elseif sHead == 'H3' then elseif sHead == 'H3' then
SetupInfo.bIsTopHead = true SetupInfo.HeadType = { bTop = true, bBottom = false}
SetupInfo.bIsBottomHead = not SetupInfo.bIsTopHead SetupInfo.PreferredSide = {}
SetupInfo.dMaxNegativeAngle = 0 SetupInfo.GetMinNz = function() return 0 end
-- rinvio angolare 90° (considerato come fosse una testa da sotto) -- rinvio angolare 90° (considerato come fosse una testa da sotto)
elseif sHead == 'H5' then elseif sHead == 'H5' then
SetupInfo.bToolOnAggregate = true SetupInfo.bToolOnAggregate = true
SetupInfo.bIsBottomHead = true SetupInfo.HeadType = { bTop = false, bBottom = true}
SetupInfo.bIsTopHead = not SetupInfo.bIsBottomHead SetupInfo.PreferredSide = {}
SetupInfo.dMaxPositiveAngle = 0 SetupInfo.GetMaxNz = function() return 0 end
end end
return SetupInfo return SetupInfo
+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
+1
View File
@@ -36,6 +36,7 @@ Name=Offsets
31=l,OFFSETX_RINV_2,150,OFFSETX_RINV_2 31=l,OFFSETX_RINV_2,150,OFFSETX_RINV_2
32=l,OFFSETZ_RINV_2,347,OFFSETZ_RINV_2 32=l,OFFSETZ_RINV_2,347,OFFSETZ_RINV_2
33=l,MIN_JOIN_SS,100,MIN_JOIN_SS 33=l,MIN_JOIN_SS,100,MIN_JOIN_SS
34=l,MIN_JOIN_VV,75,MIN_JOIN_VV
[2] [2]
Name=Trave Name=Trave
+3
View File
@@ -32,6 +32,9 @@
19=Long2CutSide 19=Long2CutSide
20=SmallToolContour 20=SmallToolContour
21=AntiSplintMillCut 21=AntiSplintMillCut
22=Prof_end
23=SideMillAsBlade
24=FloatingAggregate
[Pocketing] [Pocketing]
1=Pocket 1=Pocket
+67 -34
View File
@@ -6,7 +6,7 @@ local INFO_STD_PP = require( 'Version')
local BD = require( 'BeamData') local BD = require( 'BeamData')
-- Variabili di modulo -- Variabili di modulo
local CSP_INFO = INFO_STD_PP.NAME..' ver.'..INFO_STD_PP.VERSION..' by EgalWare 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 MACHINE_INFO = MACH_NAME..' ver.'..PP_VER
local TEST_USE = false local TEST_USE = false
@@ -27,7 +27,9 @@ function OnStart()
--EMT.LINEINC = 1 -- incremento numerazione linee --EMT.LINEINC = 1 -- incremento numerazione linee
--EMT.Ft = 'F' -- token per feed --EMT.Ft = 'F' -- token per feed
--EMT.St = 'S' -- token per speed --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 end
--------------------------------------------------------------------- ---------------------------------------------------------------------
@@ -53,6 +55,7 @@ function OnProgramStart()
end end
EmtOutput( sPrefixCommentLine..'('.. CSP_INFO..')') EmtOutput( sPrefixCommentLine..'('.. CSP_INFO..')')
EmtOutput( sPrefixCommentLine..'('.. MACHINE_INFO..')\n') 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) -- Se modalità test, aggiungo linee per muovere tappeto e alzare la testa (in automatico viene fatto dal main residente)
if TEST_USE then if TEST_USE then
EmtOutput( 'M28') EmtOutput( 'M28')
@@ -104,6 +107,7 @@ function OnProgramEnd()
EMT.FALL = nil EMT.FALL = nil
EMT.RELOAD = nil EMT.RELOAD = nil
EMT.RELOAD2 = nil EMT.RELOAD2 = nil
EmtOutput( '(FOOTER)')
-- Se modalità test, termino il programma -- Se modalità test, termino il programma
if TEST_USE then if TEST_USE then
EmtOutput( 'M02') EmtOutput( 'M02')
@@ -181,16 +185,12 @@ function OnDispositionEnd()
local STrave = EMT.ST local STrave = EMT.ST
local HOverM = EMT.HOVM local HOverM = EMT.HOVM
-- calcolo dati pinze -- calcolo dati pinze
local MinAccPinze = 0.3
local MaxAccPinze = 4
local KgMtCubo= WoodDensity or 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 Massa = ( HTrave * STrave * LBarra * KgMtCubo ) / 1000000000
local FMaxPinze = EMT.FMAXPINZE local FMaxPinze = EMT.FMAXPINZE
local ForzaAtrito = 700 / 2 -- Serve per regolare P32 (700 valore reale pistone) local ForzaAtrito = 700 / 2 -- Serve per regolare P32 (700 valore reale pistone)
local TempoAcc = ( ( Massa * FMaxPinze) / ( 60 * ForzaAtrito) / 1000) local TempoAcc = ( ( Massa * FMaxPinze) / ( 60 * ForzaAtrito) / 1000)
if ( TempoAcc < MinAccPinze) then TempoAcc = MinAccPinze end local AccPinze = EgtClamp( FMaxPinze / ( 60 * TempoAcc), EMT.MINACC, EMT.MAXACC)
if ( TempoAcc > MaxAccPinze) then TempoAcc = MaxAccPinze end
local AccPinze = FMaxPinze / ( 60 * TempoAcc)
local RidFeed = 100 / Massa * 100 local RidFeed = 100 / Massa * 100
if ( RidFeed > 100) then RidFeed = 100 end if ( RidFeed > 100) then RidFeed = 100 end
if IdTrave >= 0 then if IdTrave >= 0 then
@@ -250,9 +250,9 @@ function OnDispositionEnd()
EmtOutput( sOut) EmtOutput( sOut)
-- altrimenti recupero rimanenza -- altrimenti recupero rimanenza
else 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 -- aggiorno dati aggancio carrelli alla trave
EMT.YDELTA = EMT.YPOS - LoadT EMT.YDELTA = EMT.YPOS - EMT.TPOS
EMT.VDELTA = nil EMT.VDELTA = nil
end end
-- eventuale preparazione per rotazione immediata -- eventuale preparazione per rotazione immediata
@@ -496,6 +496,7 @@ function OnMachiningEnd()
EMT.U_STD = nil EMT.U_STD = nil
EMT.PREVTOOL = EMT.TOOL EMT.PREVTOOL = EMT.TOOL
EMT.PREVHEAD = EMT.HEAD EMT.PREVHEAD = EMT.HEAD
EMT.PREVET = GetET( EMT.HEAD, EMT.TCPOS, EMT.R3)
end end
--------------------------------------------------------------------- ---------------------------------------------------------------------
@@ -509,6 +510,7 @@ function OnPathStart()
-- salvo precedenti rotanti -- salvo precedenti rotanti
EMT.R1pp = EMT.R1p EMT.R1pp = EMT.R1p
EMT.R2pp = EMT.R2p EMT.R2pp = EMT.R2p
EMT.R3pp = EMT.R3p
-- reset valori precedenti (per forzare emissione di tutti gli assi del 1° movimento) -- reset valori precedenti (per forzare emissione di tutti gli assi del 1° movimento)
EmtResetPrev() EmtResetPrev()
@@ -608,6 +610,9 @@ function OnRapid()
MyBackupAxes() MyBackupAxes()
-- se primo movimento della lavorazione, gestione speciale -- se primo movimento della lavorazione, gestione speciale
if EMT.MCHFIRST and not EMT.OPEISDISP then 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) -- decido se muovere prima testa o carrelli (standard prima testa)
local bHeadFirst = true local bHeadFirst = true
local sLateG101 local sLateG101
@@ -626,15 +631,31 @@ function OnRapid()
end end
end end
-- primo posizionamento local sET = GetET( EMT.HEAD, EMT.TCPOS, EMT.R3)
local MyZHome = EgtGetAxisHomePos( 'Z')
local bZmax = ( #EMT.AUXSTR > 0 or EMT.TOOL ~= EMT.PREVTOOL or EMT.L3 > -1) 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 -- se avevo motosega, torno in zona sicura senza ruotare assi rotanti
if EMT.PREVHEAD == 'H3' and EMT.ST > BeamHeightForFixRot and EMT.FLAG2 == 1 then 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) .. local sOutPreMove = 'G101' .. ' X' .. EmtLenToString( -SafeXRotAxes, 3) .. ' Z' .. EmtLenToString( MyZHome, 3) ..
' B' .. EmtLenToString( EMT.R2pp, 3) .. ' C' .. EmtLenToString( EMT.R1pp, 3) .. ' B' .. EmtLenToString( EMT.R2pp, 3) .. ' C' .. EmtLenToString( EMT.R1pp, 3) ..
' EE' .. EgtIf( bZmax, '3', '4') .. EMT.PREVsEL .. EMT.PREVsER .. EMT.PREVsET .. EMT.PREVsES ' EE' .. EgtIf( bZmax, '3', '4') .. EMT.PREVsEL .. EMT.PREVsER .. EMT.PREVsET .. EMT.PREVsES
EmtOutput( sOutPreMove) 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 ET1001')
EmtOutput( 'G101 ET2001') EmtOutput( 'G101 ET2001')
end end
@@ -644,18 +665,27 @@ function OnRapid()
EmtOutput( '( *** ' .. sOut .. ' *** )') EmtOutput( '( *** ' .. sOut .. ' *** )')
end 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 sET = GetET( EMT.HEAD, EMT.TCPOS, EMT.R3)
local sES = ' ES'..EgtNumToString( EMT.S, 0)
-- se carico motosega, ruoto in zona sicura prima di approcciare la lavorazione -- se carico motosega, ruoto in zona sicura prima di approcciare la lavorazione
if ( EMT.HEAD == 'H3' or ( bZmax and EMT.TTOTLEN > 200)) and EMT.ST > BeamHeightForFixRot and EMT.FLAG2 == 1 then if EMT.HEAD == 'H3' and EMT.PREVHEAD ~= 'H3' then
local sEEPreMove = ' EE' .. EgtIf( bZmax, '3', '4')
local sOutPreMove = 'G101' .. ' X' .. EmtLenToString( -SafeXRotAxes, 3) .. ' Z' .. EmtLenToString( MyZHome, 3) .. local sOutPreMove = 'G101' .. ' X' .. EmtLenToString( -SafeXRotAxes, 3) .. ' Z' .. EmtLenToString( MyZHome, 3) ..
EmtGetAxis( 'R2') .. EmtGetAxis( 'R1') .. sEE .. sEL .. sER .. sET .. sES ' 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( sOutPreMove)
EmtOutput( 'G101 ET1001') EmtOutput( 'G101 ET1001')
EmtOutput( 'G101 ET2001') EmtOutput( 'G101 ET2001')
@@ -845,13 +875,13 @@ function OnRapid()
local sER = ' ER' .. EmtLenToString( EgtIf( EMT.HEAD ~= 'H3', EMT.TDIAM / 2, EMT.TLEN), 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 sET = GetET( EMT.HEAD, EMT.TCPOS, EMT.R3)
local sES = ' ES'..EgtNumToString( EMT.S, 0) local sES = ' ES'..EgtNumToString( EMT.S, 0)
local sOut = 'G101' .. EmtGetAxis( 'L2') .. EmtGetAxis( 'L3') ..' B=' .. EgtNumToString( dBAxis, 3) .. local sOut = 'G101' .. EmtGetAxis( 'L2') .. EmtGetAxis( 'L3') ..' B' .. EgtNumToString( dBAxis, 3) ..
' C=' .. EgtNumToString( dCAxis, 3) .. sEE .. sEL .. sER .. sET .. sES ' C' .. EgtNumToString( dCAxis, 3) .. sEE .. sEL .. sER .. sET .. sES
EmtOutput( sOut) EmtOutput( sOut)
EmtOutput( 'G101 ET1001') EmtOutput( 'G101 ET1001')
EmtOutput( 'G101 ET2001') EmtOutput( 'G101 ET2001')
sOut = 'G101' .. ' X' .. EmtLenToString( -SafeXRotAxes, 3) .. EmtGetAxis( 'L3') ..' B=' .. EgtNumToString( dBAxis, 3) .. sOut = 'G101' .. ' X' .. EmtLenToString( -SafeXRotAxes, 3) .. EmtGetAxis( 'L3') ..' B' .. EgtNumToString( dBAxis, 3) ..
' C=' .. EgtNumToString( dCAxis, 3) .. sEE .. sEL .. sER .. sET .. sES ' C' .. EgtNumToString( dCAxis, 3) .. sEE .. sEL .. sER .. sET .. sES
EmtOutput( sOut) EmtOutput( sOut)
EmtOutput( 'G101 ET1001') EmtOutput( 'G101 ET1001')
EmtOutput( 'G101 ET2001') EmtOutput( 'G101 ET2001')
@@ -1318,7 +1348,7 @@ function PrepareUnload( sCmd)
table.insert( EMT.AUXCMD, sMsg) table.insert( EMT.AUXCMD, sMsg)
if Cmd[2] == 'V' then if Cmd[2] == 'V' then
-- se non è ultima fase c'è una barra sulla pinza Y (1) -- 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() local sOut = 'G111 '..Cmd[2]..Cmd[3]..' EC141 ED83 EE'..sEE..' EF'..GetFmaxClamp()
table.insert( EMT.AUXSTR, sOut) table.insert( EMT.AUXSTR, sOut)
end end
@@ -1327,7 +1357,7 @@ function PrepareUnload( sCmd)
table.insert( EMT.AUXCMD, sMsg) table.insert( EMT.AUXCMD, sMsg)
if Cmd[4] == 'V' then if Cmd[4] == 'V' then
-- se non è ultima fase c'è una barra sulla pinza Y (1) -- 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() local sOut = 'G111 '..Cmd[4]..Cmd[5]..' EA'..sEAB..' EB'..sEAB..' EC142 ED141 EE2 EF'..GetFmaxClamp()
table.insert( EMT.AUXSTR, sOut) table.insert( EMT.AUXSTR, sOut)
EMT.U_STD = true EMT.U_STD = true
@@ -1487,10 +1517,13 @@ function PreparePostRotation( sCmd)
elseif nVDelta > 0 then elseif nVDelta > 0 then
EMT.YDELTA = nil EMT.YDELTA = nil
EMT.VDELTA = nVDelta EMT.VDELTA = nVDelta
end end
local sYLoad = ' Y'..EmtLenToString( LoadT) local sYLoad = ' Y'..EmtLenToString( LoadT)
local sOut = 'G111'..sYLoad..' EA76'..EMT.SB..' EE0 EF'..EmtLenToString( EMT.FMAXPINZE,0)..' ET1' local sOut = 'G111'..sYLoad..' EA76'..EMT.SB..' EE0 EF'..EmtLenToString( EMT.FMAXPINZE,0)..' ET1'
table.insert( EMT.AUXSTR, sOut) table.insert( EMT.AUXSTR, sOut)
-- setto parametri di pinzaggio reali
EMT.SA = ' EA110'
EMT.SE = ' EE1'
end end
end end
@@ -1538,7 +1571,7 @@ function MyAdjustLinearAxes()
elseif EMT.HEAD ~= 'H3' then elseif EMT.HEAD ~= 'H3' then
local Len = EMT.TLEN + EgtIf( EMT.HEAD == 'H1', MillOffs, abs( SawOffs)) local Len = EMT.TLEN + EgtIf( EMT.HEAD == 'H1', MillOffs, abs( SawOffs))
local LenRef = MillOffs local LenRef = MillOffs
vtE = Vector3d( EMT.EXTR) * Len - Z_AX() * LenRef vtE = Vector3d( EMT.TDIR) * Len - Z_AX() * LenRef
else else
local LenAux = ( EMT.TDIST or ChSawLen) + MillOffs local LenAux = ( EMT.TDIST or ChSawLen) + MillOffs
local LenRef = MillOffs local LenRef = MillOffs
+75 -60
View File
@@ -6,7 +6,7 @@ local INFO_STD_PP = require( 'Version')
local BD = require( 'BeamData') local BD = require( 'BeamData')
-- Variabili di modulo -- Variabili di modulo
local CSP_INFO = INFO_STD_PP.NAME..' ver.'..INFO_STD_PP.VERSION..' by EgalWare 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 MACHINE_INFO = MACH_NAME..' ver.'..PP_VER
local TEST_USE = false local TEST_USE = false
@@ -27,7 +27,9 @@ function OnStart()
--EMT.LINEINC = 1 -- incremento numerazione linee --EMT.LINEINC = 1 -- incremento numerazione linee
--EMT.Ft = 'F' -- token per feed --EMT.Ft = 'F' -- token per feed
--EMT.St = 'S' -- token per speed --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 end
--------------------------------------------------------------------- ---------------------------------------------------------------------
@@ -53,6 +55,7 @@ function OnProgramStart()
end end
EmtOutput( sPrefixCommentLine..'('.. CSP_INFO..')') EmtOutput( sPrefixCommentLine..'('.. CSP_INFO..')')
EmtOutput( sPrefixCommentLine..'('.. MACHINE_INFO..')\n') 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) -- Se modalità test, aggiungo linee per muovere tappeto e alzare la testa (in automatico viene fatto dal main residente)
if TEST_USE then if TEST_USE then
EmtOutput( 'M28') EmtOutput( 'M28')
@@ -108,6 +111,7 @@ function OnProgramEnd()
EMT.FALL = nil EMT.FALL = nil
EMT.RELOAD = nil EMT.RELOAD = nil
EMT.RELOAD2 = nil EMT.RELOAD2 = nil
EmtOutput( '(FOOTER)')
-- Se modalità test, termino il programma -- Se modalità test, termino il programma
if TEST_USE then if TEST_USE then
EmtOutput( 'M02') EmtOutput( 'M02')
@@ -203,9 +207,9 @@ function OnDispositionEnd()
local BtlInfoId = EgtGetFirstNameInGroup( GDB_ID.ROOT, 'BtlInfo') or EgtGetCurrMachGroup() or GDB_ID.NULL local BtlInfoId = EgtGetFirstNameInGroup( GDB_ID.ROOT, 'BtlInfo') or EgtGetCurrMachGroup() or GDB_ID.NULL
local nLoad90 = EgtGetInfo( BtlInfoId, 'LOAD90', 'i') or 0 local nLoad90 = EgtGetInfo( BtlInfoId, 'LOAD90', 'i') or 0
-- calcolo dati pinze -- calcolo dati pinze
local AccPinze, AccMaxPinze, RidFeed, TempoAcc = CalcDinamicaPinze( HTrave, STrave, LBarra) local AccPinze, AccMaxPinze, RidFeed, TempoAcc = CalcDinamicaPinze_NUM( HTrave, STrave, LBarra)
local AccPinz1, AccMaxPinz1, RidFeed1, TempoAcc1 = CalcDinamicaPinze( HTrave, STrave, LBarra - LTrave) local AccPinz1, AccMaxPinz1, RidFeed1, TempoAcc1 = CalcDinamicaPinze_NUM( HTrave, STrave, LBarra - LTrave)
local AccPinz2, AccMaxPinz2, RidFeed2, TempoAcc2 = CalcDinamicaPinze( HTrave, STrave, LTrave) local AccPinz2, AccMaxPinz2, RidFeed2, TempoAcc2 = CalcDinamicaPinze_NUM( HTrave, STrave, LTrave)
if IdTrave >= 0 then if IdTrave >= 0 then
local sOut = '( SN='..IdTrave..' LBarra='..EmtLenToString( LBarra, 3)..' L='..EmtLenToString( LTrave, 3).. local sOut = '( SN='..IdTrave..' LBarra='..EmtLenToString( LBarra, 3)..' L='..EmtLenToString( LTrave, 3)..
' H='..EmtLenToString( HTrave, 3)..' S='..EmtLenToString( STrave, 3)..' Acc='..EgtNumToString( TempoAcc, 1).. ' H='..EmtLenToString( HTrave, 3)..' S='..EmtLenToString( STrave, 3)..' Acc='..EgtNumToString( TempoAcc, 1)..
@@ -269,9 +273,9 @@ function OnDispositionEnd()
EmtOutput( sOut) EmtOutput( sOut)
-- altrimenti recupero rimanenza -- altrimenti recupero rimanenza
else 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 -- aggiorno dati aggancio carrelli alla trave
EMT.YDELTA = EMT.YPOS - LoadT EMT.YDELTA = EMT.YPOS - EMT.TPOS
EMT.VDELTA = nil EMT.VDELTA = nil
end end
-- eventuale preparazione per rotazione immediata -- eventuale preparazione per rotazione immediata
@@ -540,6 +544,7 @@ function OnMachiningEnd()
EMT.PREVTOOL = EMT.TOOL EMT.PREVTOOL = EMT.TOOL
EMT.PREVHEAD = EMT.HEAD EMT.PREVHEAD = EMT.HEAD
EMT.PREVR3 = EMT.R3 EMT.PREVR3 = EMT.R3
EMT.PREVET = GetET( EMT.HEAD, EMT.TCPOS, EMT.R3)
end end
--------------------------------------------------------------------- ---------------------------------------------------------------------
@@ -553,6 +558,7 @@ function OnPathStart()
-- salvo precedenti rotanti -- salvo precedenti rotanti
EMT.R1pp = EMT.R1p EMT.R1pp = EMT.R1p
EMT.R2pp = EMT.R2p EMT.R2pp = EMT.R2p
EMT.R3pp = EMT.R3p
-- reset valori precedenti (per forzare emissione di tutti gli assi del 1° movimento) -- reset valori precedenti (per forzare emissione di tutti gli assi del 1° movimento)
EmtResetPrev() EmtResetPrev()
@@ -652,6 +658,9 @@ function OnRapid()
MyBackupAxes() MyBackupAxes()
-- se primo movimento della lavorazione, gestione speciale -- se primo movimento della lavorazione, gestione speciale
if EMT.MCHFIRST and not EMT.OPEISDISP then 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) -- decido se muovere prima testa o carrelli (standard prima testa)
local bHeadFirst = true local bHeadFirst = true
local sLateG101 local sLateG101
@@ -671,22 +680,12 @@ function OnRapid()
end end
end end
-- primo posizionamento local sET = GetET( EMT.HEAD, EMT.TCPOS, EMT.R3)
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 EMT.PREVHEAD == 'H3' and EMT.ST > BeamHeightForFixRot and EMT.FLAG2 == 1 then
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)
EmtOutput( 'G101 ET1001')
EmtOutput( 'G101 ET2001')
end
if not EMT.LOAD then local bGoToHome = false
local sOut = string.gsub( string.gsub( EMT.MCHNAME..'/'..EMT.TOOL, '%(', '-'), '%)', '-') -- se gli assi rotanti cambiano parecchio, con motosega si va in parcheggio
EmtOutput( '( *** ' .. sOut .. ' *** )') 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 end
-- ricavo i dati per la lavorazione -- ricavo i dati per la lavorazione
@@ -716,14 +715,49 @@ function OnRapid()
sER = sER..EmtLenToString( EMT.TDIAM / 2, 3) sER = sER..EmtLenToString( EMT.TDIAM / 2, 3)
end end
local sET = GetET( EMT.HEAD, EMT.TCPOS, EMT.R3)
local sES = ' ES'..EgtNumToString( EMT.S, 0) local sES = ' ES'..EgtNumToString( EMT.S, 0)
-- se carico motosega, ruoto in zona sicura prima di approcciare la lavorazione -- se avevo motosega, torno in zona sicura senza ruotare assi rotanti
if ( EMT.HEAD == 'H3' or ( bZmax and EMT.TTOTLEN > 200)) and EMT.ST > BeamHeightForFixRot and EMT.FLAG2 == 1 then if not EMT.LOAD and EMT.PREVHEAD == 'H3' and EMT.FLAG2 == 1 then
local sEEPreMove = ' EE' .. EgtIf( bZmax, '3', '4') -- 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) .. local sOutPreMove = 'G101' .. ' X' .. EmtLenToString( -SafeXRotAxes, 3) .. ' Z' .. EmtLenToString( MyZHome, 3) ..
EmtGetAxis( 'R2') .. EmtGetAxis( 'R1') .. sEE .. sEL .. sER .. sET .. sES ' 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
-- 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( sOutPreMove)
EmtOutput( 'G101 ET1001') EmtOutput( 'G101 ET1001')
EmtOutput( 'G101 ET2001') EmtOutput( 'G101 ET2001')
@@ -923,13 +957,13 @@ function OnRapid()
local sER = ' ER' .. EmtLenToString( EgtIf( EMT.HEAD ~= 'H3', EMT.TDIAM / 2, EMT.TLEN), 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 sET = GetET( EMT.HEAD, EMT.TCPOS, EMT.R3)
local sES = ' ES'..EgtNumToString( EMT.S, 0) local sES = ' ES'..EgtNumToString( EMT.S, 0)
local sOut = 'G101' .. EmtGetAxis( 'L2') .. EmtGetAxis( 'L3') ..' B=' .. EgtNumToString( dBAxis, 3) .. local sOut = 'G101' .. EmtGetAxis( 'L2') .. EmtGetAxis( 'L3') ..' B' .. EgtNumToString( dBAxis, 3) ..
' C=' .. EgtNumToString( dCAxis, 3) .. sEE .. sEL .. sER .. sET .. sES ' C' .. EgtNumToString( dCAxis, 3) .. sEE .. sEL .. sER .. sET .. sES
EmtOutput( sOut) EmtOutput( sOut)
EmtOutput( 'G101 ET1001') EmtOutput( 'G101 ET1001')
EmtOutput( 'G101 ET2001') EmtOutput( 'G101 ET2001')
sOut = 'G101' .. ' X' .. EmtLenToString( -SafeXRotAxes, 3) .. EmtGetAxis( 'L3') ..' B=' .. EgtNumToString( dBAxis, 3) .. sOut = 'G101' .. ' X' .. EmtLenToString( -SafeXRotAxes, 3) .. EmtGetAxis( 'L3') ..' B' .. EgtNumToString( dBAxis, 3) ..
' C=' .. EgtNumToString( dCAxis, 3) .. sEE .. sEL .. sER .. sET .. sES ' C' .. EgtNumToString( dCAxis, 3) .. sEE .. sEL .. sER .. sET .. sES
EmtOutput( sOut) EmtOutput( sOut)
EmtOutput( 'G101 ET1001') EmtOutput( 'G101 ET1001')
EmtOutput( 'G101 ET2001') EmtOutput( 'G101 ET2001')
@@ -1091,28 +1125,6 @@ function FindNextTool()
return sTool, sHead, sTcPos return sTool, sHead, sTcPos
end end
---------------------------------------------------------------------
function CalcDinamicaPinze( dH, dS, dL)
local MinTempoAcc = 0.3 -- [s]
local MaxTempoAcc = 4.0 -- [s]
local KgMtCubo= WoodDensity or 550 -- densità legno [Kg / metro cubo]
local Massa = ( dH * dS * dL * KgMtCubo ) / 1e9 -- massa [Kg]
local FMaxPinze = EMT.FMAXPINZE -- Feed massima pinze [mm/min]
local ForzaAttrito = 350 * 9.8 * 0.2 -- Forza chiusura pinze [Kgf] * g * Coeff_Attrito -> [N]
local TempoAcc = ( ( Massa * FMaxPinze) / ( 60 * ForzaAttrito) / 1000)
if ( TempoAcc < MinTempoAcc) then TempoAcc = MinTempoAcc end
if ( TempoAcc > MaxTempoAcc) then TempoAcc = MaxTempoAcc end
local AccMaxPinze = FMaxPinze / ( 60 * MinTempoAcc)
local AccPinze = FMaxPinze / ( 60 * TempoAcc)
local RidFeed = 100 / Massa * 100
if RidFeed > 100 then
RidFeed = 100
elseif RidFeed < 10 then
RidFeed = 10
end
return AccPinze, AccMaxPinze, RidFeed, TempoAcc
end
--------------------------------------------------------------------- ---------------------------------------------------------------------
function CalcCharStatus( sCmd, bSkipPress) function CalcCharStatus( sCmd, bSkipPress)
-- aperto -- aperto
@@ -1423,7 +1435,7 @@ function PrepareUnload( sCmd)
table.insert( EMT.AUXCMD, sMsg) table.insert( EMT.AUXCMD, sMsg)
if Cmd[2] == 'V' then if Cmd[2] == 'V' then
-- se non è ultima fase c'è una barra sulla pinza Y (1) -- 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() local sOut = 'G111 '..Cmd[2]..Cmd[3]..' EC141 ED83 EE'..sEE..' EF'..GetFmaxClamp()
table.insert( EMT.AUXSTR, sOut) table.insert( EMT.AUXSTR, sOut)
end end
@@ -1432,7 +1444,7 @@ function PrepareUnload( sCmd)
table.insert( EMT.AUXCMD, sMsg) table.insert( EMT.AUXCMD, sMsg)
if Cmd[4] == 'V' then if Cmd[4] == 'V' then
-- se non è ultima fase c'è una barra sulla pinza Y (1) -- 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() local sOut = 'G111 '..Cmd[4]..Cmd[5]..' EA'..sEAB..' EB'..sEAB..' EC142 ED141 EE2 EF'..GetFmaxClamp()
table.insert( EMT.AUXSTR, sOut) table.insert( EMT.AUXSTR, sOut)
EMT.U_STD = true EMT.U_STD = true
@@ -1592,10 +1604,13 @@ function PreparePostRotation( sCmd)
elseif nVDelta > 0 then elseif nVDelta > 0 then
EMT.YDELTA = nil EMT.YDELTA = nil
EMT.VDELTA = nVDelta EMT.VDELTA = nVDelta
end end
local sYLoad = ' Y'..EmtLenToString( LoadT) local sYLoad = ' Y'..EmtLenToString( LoadT)
local sOut = 'G111'..sYLoad..' EA76'..EMT.SB..' EE0 EF'..EmtLenToString( EMT.FMAXPINZE,0)..' ET1' local sOut = 'G111'..sYLoad..' EA76'..EMT.SB..' EE0 EF'..EmtLenToString( EMT.FMAXPINZE,0)..' ET1'
table.insert( EMT.AUXSTR, sOut) table.insert( EMT.AUXSTR, sOut)
-- setto parametri di pinzaggio reali
EMT.SA = ' EA110'
EMT.SE = ' EE1'
end end
end end
@@ -1640,7 +1655,7 @@ function MyAdjustLinearAxes()
if EMT.HEAD == 'H1' or EMT.HEAD == 'H2' then if EMT.HEAD == 'H1' or EMT.HEAD == 'H2' then
local Len = EMT.TLEN + EgtIf( EMT.HEAD == 'H1', MillOffs, abs( SawOffs)) local Len = EMT.TLEN + EgtIf( EMT.HEAD == 'H1', MillOffs, abs( SawOffs))
local LenRef = MillOffs local LenRef = MillOffs
vtE = Vector3d( EMT.EXTR) * Len - Z_AX() * LenRef vtE = Vector3d( EMT.TDIR) * Len - Z_AX() * LenRef
elseif EMT.HEAD == 'H3' then elseif EMT.HEAD == 'H3' then
local LenAux = ( EMT.TDIST or ChSawLen) + MillOffs local LenAux = ( EMT.TDIST or ChSawLen) + MillOffs
local LenRef = MillOffs local LenRef = MillOffs
+113 -77
View File
@@ -6,7 +6,7 @@ local INFO_STD_PP = require( 'Version')
local BD = require( 'BeamData') local BD = require( 'BeamData')
-- Variabili di modulo -- Variabili di modulo
local CSP_INFO = INFO_STD_PP.NAME..' ver.'..INFO_STD_PP.VERSION..' by EgalWare 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 MACHINE_INFO = MACH_NAME..' ver.'..PP_VER
local TEST_USE = false local TEST_USE = false
@@ -21,14 +21,19 @@ function OnStart()
EMT.USETO1 = false -- abilitazione uso origine tavola EMT.USETO1 = false -- abilitazione uso origine tavola
EMT.MODAL = true -- abilitazione emissione modale EMT.MODAL = true -- abilitazione emissione modale
EMT.INCHES = false -- unità di misura mm/inches 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.NUM = false -- abilitazione numerazione linee
--EMT.Nt = 'N' -- token per la numerazione di linea --EMT.Nt = 'N' -- token per la numerazione di linea
--EMT.LINENBR = 0 -- numero di linea --EMT.LINENBR = 0 -- numero di linea
--EMT.LINEINC = 1 -- incremento numerazione linee --EMT.LINEINC = 1 -- incremento numerazione linee
--EMT.Ft = 'F' -- token per feed --EMT.Ft = 'F' -- token per feed
--EMT.St = 'S' -- token per speed --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 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 end
--------------------------------------------------------------------- ---------------------------------------------------------------------
@@ -51,6 +56,7 @@ function OnProgramStart()
end end
ParkLine( sPrefixCommentLine..'('.. CSP_INFO..')') ParkLine( sPrefixCommentLine..'('.. CSP_INFO..')')
ParkLine( sPrefixCommentLine..'('.. MACHINE_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) -- Se modalità test, aggiungo linee per muovere tappeto e alzare la testa (in automatico viene fatto dal main residente)
if TEST_USE then if TEST_USE then
@@ -108,6 +114,7 @@ function OnProgramEnd()
EMT.FALL = nil EMT.FALL = nil
EMT.RELOAD = nil EMT.RELOAD = nil
EMT.RELOAD2 = nil EMT.RELOAD2 = nil
EmtOutput( '(FOOTER)')
-- Termino il programma -- Termino il programma
EmtOutput( 'M02') EmtOutput( 'M02')
end end
@@ -116,8 +123,8 @@ end
function OnToolData() function OnToolData()
-- emissione dati utensili -- emissione dati utensili
if EMT.HEAD == 'H1' then if EMT.HEAD == 'H1' then
local sOut = 'M992 P1=' .. EMT.TCPOS:gsub( 'T', '') .. ' P2=' .. EmtLenToString( EMT.TLEN, 3) .. ' P3=' .. EmtLenToString( EMT.TDIAM, 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, 3) .. ' P5=' .. EmtLenToString( EMT.TTOTLEN, 3) ' P4=' .. EmtLenToString( EMT.SMAX, EMT.DECMACRO) .. ' P5=' .. EmtLenToString( EMT.TTOTLEN, EMT.DECMACRO)
ParkLine( sOut) ParkLine( sOut)
-- cerco posizione di attrezzaggio del primo utensile di lavorazione -- cerco posizione di attrezzaggio del primo utensile di lavorazione
if EMT.TOOL == EMT.TOOL_1 and EMT.TLEN_1 < LONG_TOOL_MINLEN then if EMT.TOOL == EMT.TOOL_1 and EMT.TLEN_1 < LONG_TOOL_MINLEN then
@@ -125,14 +132,14 @@ function OnToolData()
end end
-- emissione dati lama -- emissione dati lama
elseif EMT.HEAD == 'H2' then elseif EMT.HEAD == 'H2' then
local sOut = 'M992 P1=' .. EMT.TCPOS:gsub( 'T', '') .. ' P2=' .. EmtLenToString( EMT.TLEN, 3) .. ' P3=' .. EmtLenToString( EMT.TDIAM, 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, 3) .. ' P5=' .. EmtLenToString( EMT.TTOTLEN, 3) ' P4=' .. EmtLenToString( EMT.SMAX, EMT.DECMACRO) .. ' P5=' .. EmtLenToString( EMT.TTOTLEN, EMT.DECMACRO)
ParkLine( sOut) ParkLine( sOut)
-- emissione dati sega a catena -- emissione dati sega a catena
elseif EMT.HEAD == 'H3' then elseif EMT.HEAD == 'H3' then
if EMT.TDIST and abs( EMT.TDIST) < 0.1 then EMT.TDIST = nil end 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) .. local sData = ' P2=' .. EmtLenToString( ( EMT.TDIST or ChSawLen), EMT.DECMACRO) .. ' P3=' .. EmtLenToString( EMT.TLEN, EMT.DECMACRO) ..
' P4=' .. EmtLenToString( EMT.SMAX, 3) .. ' P5=' .. EmtLenToString( ( EMT.TDIST or ChSawLen), 3) ' P4=' .. EmtLenToString( EMT.SMAX, EMT.DECMACRO) .. ' P5=' .. EmtLenToString( ( EMT.TDIST or ChSawLen), EMT.DECMACRO)
if EMT.TCPOS == 'T101' then if EMT.TCPOS == 'T101' then
ParkLine( 'M992 P1=101' .. sData) ParkLine( 'M992 P1=101' .. sData)
ParkLine( 'M992 P1=102' .. sData) ParkLine( 'M992 P1=102' .. sData)
@@ -148,13 +155,13 @@ function OnToolData()
elseif EMT.HEAD == 'H5' or EMT.HEAD == 'H6' then elseif EMT.HEAD == 'H5' or EMT.HEAD == 'H6' then
local nPos = EgtIf( EMT.HEAD == 'H5', 91, 93) local nPos = EgtIf( EMT.HEAD == 'H5', 91, 93)
if EMT.EXIT == 2 then nPos = nPos + 1 end 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) .. local sOut = 'M992 P1=' .. EgtNumToString( nPos, 0) .. ' P2=' .. EmtLenToString( EMT.TLEN, EMT.DECMACRO) .. ' P3=' .. EmtLenToString( EMT.TDIAM, EMT.DECMACRO) ..
' P4=' .. EmtLenToString( EMT.SMAX, 3) .. ' P5=' .. EmtLenToString( EMT.TTOTLEN, 3) ' P4=' .. EmtLenToString( EMT.SMAX, EMT.DECMACRO) .. ' P5=' .. EmtLenToString( EMT.TTOTLEN, EMT.DECMACRO)
ParkLine( sOut) ParkLine( sOut)
-- emissione dati sega a catena -- emissione dati sega a catena
elseif EMT.HEAD == 'H7' then elseif EMT.HEAD == 'H7' then
local sOut = 'M992 P1=' .. EMT.TCPOS:gsub( 'T', '') .. ' P2=' .. EmtLenToString( EMT.TLEN, 3) .. ' P3=' .. EmtLenToString( EMT.TDIAM, 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, 3) .. ' P5=' .. EmtLenToString( EMT.TTOTLEN, 3) ' P4=' .. EmtLenToString( EMT.SMAX, EMT.DECMACRO) .. ' P5=' .. EmtLenToString( EMT.TTOTLEN, EMT.DECMACRO)
ParkLine( sOut) ParkLine( sOut)
-- altro non previsto -- altro non previsto
else else
@@ -218,14 +225,14 @@ function OnDispositionEnd()
local HOverM = EMT.HOVM local HOverM = EMT.HOVM
-- calcolo dati pinze -- calcolo dati pinze
local TempAccPinze, TempMinAccPinze, RidFeed = CalcDinamicaPinze( HTrave, STrave, LBarra) local TempAccPinze, TempMinAccPinze, RidFeed = CalcDinamicaPinze_TPA( HTrave, STrave, LBarra)
local TempAccPinz1, TempMinAccPinz1, RidFeed1 = CalcDinamicaPinze( HTrave, STrave, LBarra - LTrave) local TempAccPinz1, TempMinAccPinz1, RidFeed1 = CalcDinamicaPinze_TPA( HTrave, STrave, LBarra - LTrave)
local TempAccPinz2, TempMinAccPinz2, RidFeed2 = CalcDinamicaPinze( HTrave, STrave, LTrave) local TempAccPinz2, TempMinAccPinz2, RidFeed2 = CalcDinamicaPinze_TPA( HTrave, STrave, LTrave)
if IdTrave >= 0 then if IdTrave >= 0 then
local sPrt = '( *** Part '.. EgtNumToString( IdTrave, 0) ..' ***)' local sPrt = '( *** Part '.. EgtNumToString( IdTrave, 0) ..' ***)'
local sOut = '( SN=' .. IdTrave .. ' LBarra=' .. EmtLenToString( LBarra, 3) .. ' L='..EmtLenToString( LTrave, 3) .. local sOut = '( SN=' .. IdTrave .. ' LBarra=' .. EmtLenToString( LBarra, EMT.DECMACRO) .. ' L='..EmtLenToString( LTrave, EMT.DECMACRO) ..
' H=' .. EmtLenToString( HTrave, 3) .. ' S=' .. EmtLenToString( STrave, 3) .. ' )' ' H=' .. EmtLenToString( HTrave, EMT.DECMACRO) .. ' S=' .. EmtLenToString( STrave, EMT.DECMACRO) .. ' )'
EMT.PRODID = EgtGetInfo( BtlInfoId, 'PRODID', 'i') or 0 EMT.PRODID = EgtGetInfo( BtlInfoId, 'PRODID', 'i') or 0
EMT.PATTID = EgtGetInfo( BtlInfoId, 'PATTID', 'i') or 0 EMT.PATTID = EgtGetInfo( BtlInfoId, 'PATTID', 'i') or 0
EMT.CUTID = EgtGetInfo( EMT.IDT, 'CUTID', 'i') or 0 EMT.CUTID = EgtGetInfo( EMT.IDT, 'CUTID', 'i') or 0
@@ -268,9 +275,9 @@ function OnDispositionEnd()
' 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) ' P7=' .. EgtNumToString( TempAccPinze, 2) .. ' P8=' .. EgtNumToString( TempAccPinz2, 2) .. ' P9=' .. EgtNumToString( TempAccPinz1, 2)
EmtOutput( sOut) 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 -- aggiorno dati aggancio carrelli alla trave
EMT.YDELTA = EMT.YPOS - LoadT EMT.YDELTA = EMT.YPOS - EMT.TPOS
EMT.VDELTA = nil EMT.VDELTA = nil
end end
-- eventuale preparazione per rotazione immediata -- eventuale preparazione per rotazione immediata
@@ -518,6 +525,9 @@ function OnMachiningEnd()
EMT.PREVTOOL = EMT.TOOL EMT.PREVTOOL = EMT.TOOL
EMT.PREVHEAD = EMT.HEAD EMT.PREVHEAD = EMT.HEAD
EMT.PREVS = EMT.S EMT.PREVS = EMT.S
-- salvo posizione
EMT.PREVTCPOS = AdjustTcPos( false)
end end
--------------------------------------------------------------------- ---------------------------------------------------------------------
@@ -532,6 +542,7 @@ function OnPathStart()
-- salvo precedenti rotanti -- salvo precedenti rotanti
EMT.R1pp = EMT.R1p EMT.R1pp = EMT.R1p
EMT.R2pp = EMT.R2p EMT.R2pp = EMT.R2p
EMT.R3pp = EMT.R3p
-- reset valori precedenti (per forzare emissione di tutti gli assi del 1° movimento) -- reset valori precedenti (per forzare emissione di tutti gli assi del 1° movimento)
EmtResetPrev() EmtResetPrev()
@@ -651,16 +662,30 @@ function OnRapid()
bHeadFirst = false bHeadFirst = false
end end
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 -- primo posizionamento
local MyZHome = EgtGetAxisHomePos( 'Z') local MyZHome = EgtGetAxisHomePos( 'Z')
local bZmax = ( #EMT.AUXSTR > 0 or EMT.TOOL ~= EMT.PREVTOOL or EMT.L3 > -1) 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 -- se avevo motosega, torno in zona sicura senza ruotare assi rotanti
if EMT.PREVHEAD == 'H3' and EMT.ST > BeamHeightForFixRot and EMT.FLAG2 == 1 then if not EMT.LOAD and EMT.PREVHEAD == 'H3' and EMT.FLAG2 == 1 then
local sOutPreMove = 'M101 P1=1' .. ' P2=' .. EmtLenToString( -SafeXRotAxes, 3) .. ' P3=' .. EmtLenToString( MyZHome, 3) .. local sOutPreMove = 'M101 P1=1' .. ' P2=' .. EmtLenToString( -SafeXRotAxes, EMT.DECMACRO) .. ' P3=' .. EmtLenToString( MyZHome, EMT.DECMACRO) ..
' P4=' .. EgtNumToString( EMT.R2pp, 3) .. ' P5=' .. EgtNumToString( EMT.R1pp, 3) .. ' P4=' .. EgtNumToString( EMT.R2pp, EMT.DECMACRO) .. ' P5=' .. EgtNumToString( EMT.R1pp, EMT.DECMACRO) ..
' P6=' .. EgtNumToString( EMT.PREVTCPOS, 3) .. ' P7=' .. EgtNumToString( EMT.PREVS, 0) .. ' P6=' .. EgtNumToString( EMT.PREVTCPOS, EMT.DECMACRO) .. ' P7=' .. EgtNumToString( EMT.PREVS, 0) ..
' P8=0' .. ' P9=0' .. ' P10=' .. EgtIf( bZmax, '3', '4') ' P8=0' .. ' P9=0' .. ' P10=' .. EgtIf( bZmax, '3', '4')
EmtOutput( sOutPreMove) 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=2')
EmtOutput( 'M101 P1=3') EmtOutput( 'M101 P1=3')
end end
@@ -671,9 +696,41 @@ function OnRapid()
end end
-- se carico motosega, ruoto in zona sicura prima di approcciare la lavorazione -- se carico motosega, ruoto in zona sicura prima di approcciare la lavorazione
if ( EMT.HEAD == 'H3' or ( bZmax and EMT.TTOTLEN > 200)) and EMT.ST > BeamHeightForFixRot and EMT.FLAG2 == 1 then if EMT.HEAD == 'H3' and EMT.PREVHEAD ~= 'H3' then
local sOutPreMove = 'M101 P1=1' .. ' P2=' .. EmtLenToString( -SafeXRotAxes, 3) .. ' P3=' .. EmtLenToString( MyZHome, 3) .. local sOutPreMove = 'M101 P1=1' .. ' P2=' .. EmtLenToString( -SafeXRotAxes, EMT.DECMACRO) .. ' P3=' .. EmtLenToString( MyZHome, EMT.DECMACRO) ..
' P4=' .. EgtNumToString( EMT.R2, 3) .. ' P5=' .. EgtNumToString( EMT.R1, 3) .. ' 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) .. ' P6=' .. AdjustTcPos( false) .. ' P7=' .. EgtNumToString( EMT.S, 0) ..
' P8=0' .. ' P9=0' .. ' P10=' .. EgtIf( bZmax, '3', '4') ' P8=0' .. ' P9=0' .. ' P10=' .. EgtIf( bZmax, '3', '4')
EmtOutput( sOutPreMove) EmtOutput( sOutPreMove)
@@ -687,8 +744,8 @@ function OnRapid()
if EMT.ST > BeamHeightForFixRot and EMT.FLAG2 == 1 then if EMT.ST > BeamHeightForFixRot and EMT.FLAG2 == 1 then
MyZPos = MyZHome MyZPos = MyZHome
end end
local sOut = 'M101 P1=1' .. ' P2=' .. EmtLenToString( EMT.L2, 3) .. ' P3=' .. EmtLenToString( MyZPos, 3) .. local sOut = 'M101 P1=1' .. ' P2=' .. EmtLenToString( EMT.L2, EMT.DECMACRO) .. ' P3=' .. EmtLenToString( MyZPos, EMT.DECMACRO) ..
' P4=' .. EgtNumToString( EMT.R2, 3) .. ' P5=' .. EgtNumToString( EMT.R1, 3) .. ' P4=' .. EgtNumToString( EMT.R2, EMT.DECMACRO) .. ' P5=' .. EgtNumToString( EMT.R1, EMT.DECMACRO) ..
' P6=' .. AdjustTcPos( false) .. ' P7=' .. EgtNumToString( EMT.S, 0) .. ' P6=' .. AdjustTcPos( false) .. ' P7=' .. EgtNumToString( EMT.S, 0) ..
' P8=0' .. ' P9=0' .. ' P10=' .. EgtIf( bZmax, '3', '4') ' P8=0' .. ' P9=0' .. ' P10=' .. EgtIf( bZmax, '3', '4')
if EMT.LOAD then if EMT.LOAD then
@@ -738,7 +795,7 @@ function OnRapid()
sV = EmtLenToString( ParkV) sV = EmtLenToString( ParkV)
sB = '2' sB = '2'
end 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) ParkLine( sOut)
EMT.LOAD = false EMT.LOAD = false
-- emissione prime linee speciali e linee parcheggiate -- emissione prime linee speciali e linee parcheggiate
@@ -789,7 +846,7 @@ function OnRapid()
sOut = 'M101 P1=3' sOut = 'M101 P1=3'
EmtOutput( sOut) EmtOutput( sOut)
end 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) EmtOutput( sOut)
if not bHeadFirst then if not bHeadFirst then
sOut = 'M101 P1=2' sOut = 'M101 P1=2'
@@ -861,15 +918,15 @@ function OnRapid()
if EMT.ST > BeamHeightForFixRot and EMT.HEAD == 'H1' and EMT.TOOL ~= EMT.NEXTTOOL and EMT.NEXTHEAD ~= 'H2' then if EMT.ST > BeamHeightForFixRot and EMT.HEAD == 'H1' and EMT.TOOL ~= EMT.NEXTTOOL and EMT.NEXTHEAD ~= 'H2' then
local dBAxis = 90 local dBAxis = 90
local dCAxis = EgtIf( BD.RIGHT_LOAD, 90, -90) local dCAxis = EgtIf( BD.RIGHT_LOAD, 90, -90)
local sOut = 'M101 P1=1' .. ' P2=' .. EmtLenToString( EMT.L2, 3) .. ' P3=' .. EmtLenToString( EMT.L3, 3) .. local sOut = 'M101 P1=1' .. ' P2=' .. EmtLenToString( EMT.L2, EMT.DECMACRO) .. ' P3=' .. EmtLenToString( EMT.L3, EMT.DECMACRO) ..
' P4=' .. EgtNumToString( dBAxis, 3) .. ' P5=' .. EgtNumToString( dCAxis, 3) .. ' P4=' .. EgtNumToString( dBAxis, EMT.DECMACRO) .. ' P5=' .. EgtNumToString( dCAxis, EMT.DECMACRO) ..
' P6=' .. AdjustTcPos( false) .. ' P7=' .. EgtNumToString( EMT.S, 0) .. ' P6=' .. AdjustTcPos( false) .. ' P7=' .. EgtNumToString( EMT.S, 0) ..
' P8=0' .. ' P9=0' .. ' P10=3' ' P8=0' .. ' P9=0' .. ' P10=3'
EmtOutput( sOut) EmtOutput( sOut)
EmtOutput( 'M101 P1=2') EmtOutput( 'M101 P1=2')
EmtOutput( 'M101 P1=3') EmtOutput( 'M101 P1=3')
sOut = 'M101 P1=1' .. ' P2=' .. EmtLenToString( -SafeXRotAxes, 3) .. ' P3=' .. EmtLenToString( EMT.L3, 3) .. sOut = 'M101 P1=1' .. ' P2=' .. EmtLenToString( -SafeXRotAxes, EMT.DECMACRO) .. ' P3=' .. EmtLenToString( EMT.L3, EMT.DECMACRO) ..
' P4=' .. EgtNumToString( dBAxis, 3) .. ' P5=' .. EgtNumToString( dCAxis, 3) .. ' P4=' .. EgtNumToString( dBAxis, EMT.DECMACRO) .. ' P5=' .. EgtNumToString( dCAxis, EMT.DECMACRO) ..
' P6=' .. AdjustTcPos( false) .. ' P7=' .. EgtNumToString( EMT.S, 0) .. ' P6=' .. AdjustTcPos( false) .. ' P7=' .. EgtNumToString( EMT.S, 0) ..
' P8=0' .. ' P9=0' .. ' P10=3' ' P8=0' .. ' P9=0' .. ' P10=3'
EmtOutput( sOut) EmtOutput( sOut)
@@ -886,8 +943,8 @@ function OnRapid()
MyAdjustLinearAxes() MyAdjustLinearAxes()
EmtAdjustRotaryAxes() EmtAdjustRotaryAxes()
EmtResetPrev() EmtResetPrev()
local sOut = 'M101 P1=1' .. ' P2=' .. EmtLenToString( EMT.L2, 3) .. ' P3=' .. EmtLenToString( EMT.L3, 3) .. local sOut = 'M101 P1=1' .. ' P2=' .. EmtLenToString( EMT.L2, EMT.DECMACRO) .. ' P3=' .. EmtLenToString( EMT.L3, EMT.DECMACRO) ..
' P4=' .. EgtNumToString( EMT.R2, 3) .. ' P5=' .. EgtNumToString( EMT.R1, 3) .. ' P4=' .. EgtNumToString( EMT.R2, EMT.DECMACRO) .. ' P5=' .. EgtNumToString( EMT.R1, EMT.DECMACRO) ..
' P6=' .. AdjustTcPos( false) .. ' P7=' .. EgtNumToString( EMT.S, 0) .. ' P6=' .. AdjustTcPos( false) .. ' P7=' .. EgtNumToString( EMT.S, 0) ..
' P8=0' .. ' P9=0' .. ' P10=3' ' P8=0' .. ' P9=0' .. ' P10=3'
EmtOutput( sOut) EmtOutput( sOut)
@@ -1007,7 +1064,7 @@ function OnArc()
--local sCen = ' ' .. EMT.C1t .. EmtLenToString(EMT.C1,3) .. --local sCen = ' ' .. EMT.C1t .. EmtLenToString(EMT.C1,3) ..
-- ' ' .. EMT.C2t .. EmtLenToString(EMT.C2,3) -- ' ' .. EMT.C2t .. EmtLenToString(EMT.C2,3)
-- raggio -- raggio
local sRad = ' ' .. EMT.RRt .. EmtLenToString( EMT.RR, EMT.DECNUM) local sRad = ' ' .. EMT.RRt .. EmtLenToString( EMT.RR, EMT.DECRAD)
-- aggiungo feed -- aggiungo feed
local sFeed = EmtGetFeed() local sFeed = EmtGetFeed()
-- tipo arco -- tipo arco
@@ -1048,28 +1105,6 @@ function FindNextTool()
return sTool, sHead, sTcPos return sTool, sHead, sTcPos
end end
---------------------------------------------------------------------
function CalcDinamicaPinze( dH, dS, dL)
local MinTempoAcc = 0.3 -- [s]
local MaxTempoAcc = 4.0 -- [s]
local KgMtCubo= WoodDensity or 550 -- densità legno [Kg / metro cubo]
local Massa = ( dH * dS * dL * KgMtCubo ) / 1e9 -- massa [Kg]
local FMaxPinze = EMT.FMAXPINZE -- Feed massima pinze [mm/min]
local ForzaAttrito = 350 * 9.8 * 0.2 -- Forza chiusura pinze [Kgf] * g * Coeff_Attrito -> [N]
local TempoAcc = ( ( Massa * FMaxPinze) / ( 60 * ForzaAttrito) / 1000)
if ( TempoAcc < MinTempoAcc) then TempoAcc = MinTempoAcc end
if ( TempoAcc > MaxTempoAcc) then TempoAcc = MaxTempoAcc end
local AccMaxPinze = FMaxPinze / ( 60 * MinTempoAcc)
local AccPinze = FMaxPinze / ( 60 * TempoAcc)
local RidFeed = 100 / Massa * 100
if RidFeed > 100 then
RidFeed = 100
elseif RidFeed < 10 then
RidFeed = 10
end
return TempoAcc * 1000, MinTempoAcc * 1000, RidFeed
end
--------------------------------------------------------------------- ---------------------------------------------------------------------
function CalcCharStatus( sCmd, bSkipPress) function CalcCharStatus( sCmd, bSkipPress)
-- aperto -- aperto
@@ -1591,10 +1626,13 @@ function PreparePostRotation( sCmd)
elseif nVDelta > 0 then elseif nVDelta > 0 then
EMT.YDELTA = nil EMT.YDELTA = nil
EMT.VDELTA = nVDelta EMT.VDELTA = nVDelta
end end
local sYLoad = ' P2='..EmtLenToString( LoadT) local sYLoad = ' P2='..EmtLenToString( LoadT)
local sOut = 'M111 P1=11'..sYLoad..' P4=76'..EMT.SB..' P8=0 P9='..GetFmaxClamp() local sOut = 'M111 P1=11'..sYLoad..' P4=76'..EMT.SB..' P8=0 P9='..GetFmaxClamp()
table.insert( EMT.AUXSTR, sOut) table.insert( EMT.AUXSTR, sOut)
-- setto parametri di pinzaggio reali
EMT.SA = ' P4=110'
EMT.SE = ' P8=1'
end end
end end
@@ -1639,7 +1677,7 @@ function MyAdjustLinearAxes()
if EMT.HEAD == 'H1' or EMT.HEAD == 'H2' then if EMT.HEAD == 'H1' or EMT.HEAD == 'H2' then
local Len = EMT.TLEN + EgtIf( EMT.HEAD == 'H1', MillOffs, abs( SawOffs)) local Len = EMT.TLEN + EgtIf( EMT.HEAD == 'H1', MillOffs, abs( SawOffs))
local LenRef = MillOffs local LenRef = MillOffs
vtE = Vector3d( EMT.EXTR) * Len - Z_AX() * LenRef vtE = Vector3d( EMT.TDIR) * Len - Z_AX() * LenRef
elseif EMT.HEAD == 'H3' then elseif EMT.HEAD == 'H3' then
local LenAux = ( EMT.TDIST or ChSawLen) + MillOffs local LenAux = ( EMT.TDIST or ChSawLen) + MillOffs
local LenRef = MillOffs local LenRef = MillOffs
@@ -1650,13 +1688,13 @@ function MyAdjustLinearAxes()
local LenAux = MillOffs + AngTr1Offs local LenAux = MillOffs + AngTr1Offs
local LenRef = MillOffs local LenRef = MillOffs
local vtAux = EgtGetCalcAuxDirFromAngles( EMT.R1, EMT.R2) 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 elseif EMT.HEAD == 'H7' then
local Len = EMT.TLEN + AngTrBHLen local Len = EMT.TLEN + AngTrBHLen
local LenAux = MillOffs + AngTrBHOffs local LenAux = MillOffs + AngTrBHOffs
local LenRef = MillOffs local LenRef = MillOffs
local vtAux = EgtGetCalcAuxDirFromAngles( EMT.R1, EMT.R2) 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
else else
EmtSetLastError( 1211, 'Head not allowed ' .. EMT.HEAD) EmtSetLastError( 1211, 'Head not allowed ' .. EMT.HEAD)
end end
@@ -1743,8 +1781,6 @@ function AdjustTcPos( bLen3)
sPos = '0' .. sPos sPos = '0' .. sPos
end end
end end
-- salvo posizione
EMT.PREVTCPOS = sPos
return sPos return sPos
end end
@@ -1767,9 +1803,9 @@ function CalcInterpPlane()
local vtY = EMT.IPLGLFR:getVersY() local vtY = EMT.IPLGLFR:getVersY()
local vtZ = EMT.IPLGLFR:getVersZ() local vtZ = EMT.IPLGLFR:getVersZ()
EMT.IPLGLSTR = ' X0 Y' .. EmtLenToString( xS, EMT.DECNUM) .. ' Z0' .. EMT.IPLGLSTR = ' X0 Y' .. EmtLenToString( xS, EMT.DECNUM) .. ' Z0' ..
' A' .. EgtNumToString( - vtX:getY(), 6) .. ' B' .. EgtNumToString( vtX:getX(), 6) .. ' C' .. EgtNumToString( vtX:getZ(), 6) .. ' A' .. EgtNumToString( - vtX:getY(), EMT.DECVERS) .. ' B' .. EgtNumToString( vtX:getX(), EMT.DECVERS) .. ' C' .. EgtNumToString( vtX:getZ(), EMT.DECVERS) ..
' I' .. EgtNumToString( - vtY:getY(), 6) .. ' J' .. EgtNumToString( vtY:getX(), 6) .. ' K' .. EgtNumToString( vtY:getZ(), 6) .. ' I' .. EgtNumToString( - vtY:getY(), EMT.DECVERS) .. ' J' .. EgtNumToString( vtY:getX(), EMT.DECVERS) .. ' K' .. EgtNumToString( vtY:getZ(), EMT.DECVERS) ..
' P' .. EgtNumToString( - vtZ:getY(), 6) .. ' Q' .. EgtNumToString( vtZ:getX(), 6) .. ' R' .. EgtNumToString( vtZ:getZ(), 6) ' P' .. EgtNumToString( - vtZ:getY(), EMT.DECVERS) .. ' Q' .. EgtNumToString( vtZ:getX(), EMT.DECVERS) .. ' R' .. EgtNumToString( vtZ:getZ(), EMT.DECVERS)
EMT.IPLGL = true EMT.IPLGL = true
end end
+448 -67
View File
@@ -7,9 +7,6 @@ EgtEnableDebug( false)
-- carico librerie -- carico librerie
local BD = require( 'BeamData') local BD = require( 'BeamData')
LONG_TOOL_MINLEN = 221
BIG_TOOL_DIAM = 300
--------------------------------------------------------------------- ---------------------------------------------------------------------
-- *** GENERATION *** -- *** GENERATION ***
--------------------------------------------------------------------- ---------------------------------------------------------------------
@@ -82,6 +79,14 @@ function OnSimulStart()
for j = 1, #( vTools or {}) do for j = 1, #( vTools or {}) do
if vTools[j] ~= '' then if vTools[j] ~= '' then
EgtLoadTool( vTcPos[i], j, vTools[j]) EgtLoadTool( vTcPos[i], j, vTools[j])
-- Aggiunto controllo lunghezza lama minima * 0.9 per ricavare la tolleranza del VMILL
if EgtTdbSetCurrTool(vTools[j]) then -- set utensile corrente
if EgtTdbGetCurrToolParam( MCH_TP.TYPE) == MCH_TY.SAW_STD or EgtTdbGetCurrToolParam( MCH_TP.TYPE) == MCH_TY.SAW_FLAT then -- controllo tipo utensile sega
local dCurrSawLen = EgtTdbGetCurrToolParam( MCH_TP.LEN) * 0.9
-- se non definito o minore del valore precedente aggiorna la tolleranza
EMT.VMILLTOL = EgtIf( not EMT.VMILLTOL or dCurrSawLen < EMT.VMILLTOL, dCurrSawLen, EMT.VMILLTOL)
end
end
end end
end end
ShowToolInTcPos( vTcPos[i], true) ShowToolInTcPos( vTcPos[i], true)
@@ -118,7 +123,8 @@ function OnSimulStart()
{ Grp = 'V', Sub = 'COLLISION', Name = 'VOL2'}, { Grp = 'V', Sub = 'COLLISION', Name = 'VOL2'},
{ Grp = 'PV', Sub = 'COLLISION', Name = 'VOL'}, { Grp = 'PV', Sub = 'COLLISION', Name = 'VOL'},
{ Grp = 'Base', Sub = 'COLLISION', Name = 'SIDE1'}, { Grp = 'Base', Sub = 'COLLISION', Name = 'SIDE1'},
{ Grp = 'Base', Sub = 'COLLISION', Name = 'SIDE2'}} { Grp = 'Base', Sub = 'COLLISION', Name = 'SIDE2'},
{ Grp = 'C', Sub = 'COLLISION2', Name = 'C_TOP'}}
EgtOutLog( 'MCODET Objects :', 4) EgtOutLog( 'MCODET Objects :', 4)
local nMcdNullCnt = 0 local nMcdNullCnt = 0
for i = 1, #McdData do for i = 1, #McdData do
@@ -142,6 +148,30 @@ function OnSimulStart()
end end
-- Preparo lista collisioni vuota -- Preparo lista collisioni vuota
EMT.COLLIDE = {} EMT.COLLIDE = {}
-- si crea gruppo temporaneo appoggio controllo clamping
CLAMP_CHECK_GROUP = EgtGetFirstNameInGroup( GDB_ID.ROOT, 'CLAMP_CHECK')
CLAMP_CHECK_INTERS = EgtGetFirstNameInGroup( GDB_ID.ROOT, 'CLAMP_INTERS')
if CLAMP_CHECK_GROUP then
EgtEmptyGroup( CLAMP_CHECK_GROUP)
else
local frClampCheckGroup = Frame3d( ORIG(), GDB_FR.FRONT)
CLAMP_CHECK_GROUP = EgtGroup( GDB_ID.ROOT, frClampCheckGroup)
EgtSetName( CLAMP_CHECK_GROUP, 'CLAMP_CHECK')
EgtSetLevel( CLAMP_CHECK_GROUP, GDB_LV.TEMP)
EgtSetStatus( CLAMP_CHECK_GROUP, GDB_ST.OFF)
end
if CLAMP_CHECK_INTERS then
EgtEmptyGroup( CLAMP_CHECK_INTERS)
else
CLAMP_CHECK_INTERS = EgtGroup( GDB_ID.ROOT)
EgtSetName( CLAMP_CHECK_INTERS, 'CLAMP_INTERS')
EgtSetLevel( CLAMP_CHECK_INTERS, GDB_LV.TEMP)
EgtSetStatus( CLAMP_CHECK_INTERS, GDB_ST.OFF)
end
end end
--------------------------------------------------------------------- ---------------------------------------------------------------------
@@ -168,13 +198,13 @@ function OnSimulDispositionStart()
-- Determino dimensioni del grezzo -- Determino dimensioni del grezzo
local nSolId = EgtGetFirstNameInGroup( EgtGetFirstRawPart() or GDB_ID.NULL, 'RawSolid') or GDB_ID.NULL local nSolId = EgtGetFirstNameInGroup( EgtGetFirstRawPart() or GDB_ID.NULL, 'RawSolid') or GDB_ID.NULL
local b3Sol = EgtGetBBoxGlob( nSolId, GDB_BB.STANDARD) local b3Sol = EgtGetBBoxGlob( nSolId, GDB_BB.STANDARD)
EMT.LB = 0 EMT.LT = 0
EMT.SB = 0 EMT.ST = 0
EMT.HB = 0 EMT.HT = 0
if b3Sol then if b3Sol then
EMT.LB = b3Sol:getDimX() EMT.LT = b3Sol:getDimX()
EMT.SB = b3Sol:getDimY() EMT.ST = b3Sol:getDimY()
EMT.HB = b3Sol:getDimZ() EMT.HT = b3Sol:getDimZ()
end end
-- Carico primo utensile sulla testa 1 -- Carico primo utensile sulla testa 1
local sTool, nTlen = FindFirstToolOnHead( 'H1') local sTool, nTlen = FindFirstToolOnHead( 'H1')
@@ -215,7 +245,7 @@ function OnSimulDispositionStart()
-- determino la risoluzione dello Zmap -- determino la risoluzione dello Zmap
local dTol = 4.71 local dTol = 4.71
if EmtGetVMillStep then if EmtGetVMillStep then
dTol = EmtGetVMillStep( b3Raw:getDimX(), b3Raw:getDimY(), b3Raw:getDimZ(), 4.71) dTol = EmtGetVMillStep( b3Raw:getDimX(), b3Raw:getDimY(), b3Raw:getDimZ(), dTol)
else else
local dArea = b3Raw:getDimX() * b3Raw:getDimY() + b3Raw:getDimX() * b3Raw:getDimZ() + b3Raw:getDimY() * b3Raw:getDimZ() local dArea = b3Raw:getDimX() * b3Raw:getDimY() + b3Raw:getDimX() * b3Raw:getDimZ() + b3Raw:getDimY() * b3Raw:getDimZ()
if dArea < 0.075e6 then if dArea < 0.075e6 then
@@ -232,6 +262,7 @@ function OnSimulDispositionStart()
dTol = 3.77 dTol = 3.77
end end
end end
dTol = min( dTol, EMT.VMILLTOL or dTol) -- imposto dTol al valore minore tra quello per volume e quello per spessore lama
-- creo lo Zmap -- creo lo Zmap
local VMillId = EgtVolZmapBox( nPartRawId, b3Raw:getMin(), b3Raw:getDimX(), b3Raw:getDimY(), b3Raw:getDimZ(), dTol, true, GDB_RT.GLOB) local VMillId = EgtVolZmapBox( nPartRawId, b3Raw:getMin(), b3Raw:getDimX(), b3Raw:getDimY(), b3Raw:getDimZ(), dTol, true, GDB_RT.GLOB)
if VMillId then if VMillId then
@@ -289,18 +320,24 @@ function OnSimulDispositionStart()
local nOrd = GetPhaseOrd( EMT.PHASE) local nOrd = GetPhaseOrd( EMT.PHASE)
local nScrapOrd = GetPhaseOrd( EgtGetPhaseCount()) + 1 local nScrapOrd = GetPhaseOrd( EgtGetPhaseCount()) + 1
local b3Raw = BBox3d() local b3Raw = BBox3d()
local b3Bar = BBox3d()
local b3Part = BBox3d()
local nPartRawId, nScrapRawId local nPartRawId, nScrapRawId
local nRawId = EgtGetFirstRawPart() local nRawId = EgtGetFirstRawPart()
while nRawId do while nRawId do
local nNextRawId = EgtGetNextRawPart( nRawId) local nNextRawId = EgtGetNextRawPart( nRawId)
if EgtVerifyRawPartPhase( nRawId, EMT.PHASE) then if EgtVerifyRawPartPhase( nRawId, EMT.PHASE) then
EmtLinkRawPartToGroup( nRawId, 'Tab') EmtLinkRawPartToGroup( nRawId, 'Tab')
local b3Tmp = EgtGetRawPartBBox( nRawId)
b3Bar:Add( b3Tmp)
local nRawOrd = EgtGetInfo( nRawId, 'ORD', 'i') local nRawOrd = EgtGetInfo( nRawId, 'ORD', 'i')
if nRawOrd == nOrd then if nRawOrd == nOrd then
b3Raw = EgtGetRawPartBBox( nRawId) --b3Raw = EgtGetRawPartBBox( nRawId)
b3Raw:Add( b3Tmp)
b3Part:Add( b3Tmp)
nPartRawId = nRawId nPartRawId = nRawId
elseif nRawOrd == nOrd + 1 and nRawOrd == nScrapOrd then elseif nRawOrd == nOrd + 1 and nRawOrd == nScrapOrd then
local b3Tmp = EgtGetRawPartBBox( nRawId) or BBox3d() --local b3Tmp = EgtGetRawPartBBox( nRawId) or BBox3d()
b3Raw:Add( b3Tmp) b3Raw:Add( b3Tmp)
nScrapRawId = nRawId nScrapRawId = nRawId
end end
@@ -314,6 +351,9 @@ function OnSimulDispositionStart()
else else
EMT.SCRAP = nil EMT.SCRAP = nil
end end
EMT.LB = b3Bar:getDimX()
EMT.LR = b3Raw:getDimX()
EMT.LT = b3Part:getDimX()
-- recupero CutId del pezzo in lavorazione -- recupero CutId del pezzo in lavorazione
EMT.CUTID = EgtGetInfo( EgtGetFirstPartInRawPart( nPartRawId or GDB_ID.NULL) or GDB_ID.NULL, 'CUTID', 'i') or 0 EMT.CUTID = EgtGetInfo( EgtGetFirstPartInRawPart( nPartRawId or GDB_ID.NULL) or GDB_ID.NULL, 'CUTID', 'i') or 0
EMT.YSPEC = nil EMT.YSPEC = nil
@@ -385,6 +425,7 @@ function OnSimulDispositionStart()
if EgtVerifyRawPartPhase( nRawId, EMT.PHASE) then if EgtVerifyRawPartPhase( nRawId, EMT.PHASE) then
if EgtGetInfo( nRawId, 'ORD', 'i') == nOrd then if EgtGetInfo( nRawId, 'ORD', 'i') == nOrd then
EmtLinkRawPartToGroup( nRawId, 'Tab') EmtLinkRawPartToGroup( nRawId, 'Tab')
b3Bar = EgtGetRawPartBBox( nRawId)
else else
EgtMove( nRawId, vtMove, GDB_RT.GLOB) EgtMove( nRawId, vtMove, GDB_RT.GLOB)
EgtSetStatus( nRawId, GDB_ST.OFF) EgtSetStatus( nRawId, GDB_ST.OFF)
@@ -392,6 +433,8 @@ function OnSimulDispositionStart()
end end
nRawId = nNextRawId nRawId = nNextRawId
end end
EMT.LB = b3Bar:getDimX()
-- altrimenti fase finale, aggancio primo grezzo alla tavola e gli altri in posizione carico al carro Y -- altrimenti fase finale, aggancio primo grezzo alla tavola e gli altri in posizione carico al carro Y
else else
-- verifico posizione di carico -- verifico posizione di carico
@@ -409,12 +452,14 @@ function OnSimulDispositionStart()
nRawId = EgtGetNextRawPart( nRawId) nRawId = EgtGetNextRawPart( nRawId)
end end
-- eseguo -- eseguo
local b3Bar = BBox3d()
nRawId = EgtGetFirstRawPart() nRawId = EgtGetFirstRawPart()
while nRawId do while nRawId do
local nNextRawId = EgtGetNextRawPart( nRawId) local nNextRawId = EgtGetNextRawPart( nRawId)
if EgtVerifyRawPartPhase( nRawId, EMT.PHASE) then if EgtVerifyRawPartPhase( nRawId, EMT.PHASE) then
if EgtGetInfo( nRawId, 'ORD', 'i') == nOrd then if EgtGetInfo( nRawId, 'ORD', 'i') == nOrd then
EmtLinkRawPartToGroup( nRawId, 'Tab') EmtLinkRawPartToGroup( nRawId, 'Tab')
b3Bar = EgtGetRawPartBBox( nRawId)
else else
EgtMove( nRawId, vtMove, GDB_RT.GLOB) EgtMove( nRawId, vtMove, GDB_RT.GLOB)
EmtLinkRawPartToGroup( nRawId, 'Y') EmtLinkRawPartToGroup( nRawId, 'Y')
@@ -422,6 +467,7 @@ function OnSimulDispositionStart()
end end
nRawId = nNextRawId nRawId = nNextRawId
end end
EMT.LB = b3Bar:getDimX()
end end
-- Indicazione angolo rotazione pezzo -- Indicazione angolo rotazione pezzo
EMT.ROT = EgtGetInfo( EMT.DISPID, 'ROT', 'i') or 0 EMT.ROT = EgtGetInfo( EMT.DISPID, 'ROT', 'i') or 0
@@ -453,6 +499,7 @@ function OnSimulDispositionEnd()
EMT.POSTROT = true EMT.POSTROT = true
end end
end end
EMT.SPLIT = false
EMT.OPEISDISP = false EMT.OPEISDISP = false
end end
@@ -466,8 +513,10 @@ function OnSimulToolSelect( dPosA)
EMT.TOTDIAM = EgtTdbGetCurrToolParam( MCH_TP.TOTDIAM) EMT.TOTDIAM = EgtTdbGetCurrToolParam( MCH_TP.TOTDIAM)
-- se non è chiamato da altro script (non c'è parametro) -- se non è chiamato da altro script (non c'è parametro)
if not dPosA then if not dPosA then
-- se attivo Vmill -- se utensile non flottante, abilito per Vmill
SetToolForVmill( EMT.TOOL, EMT.HEAD, EMT.EXIT, EMT.VMILL) if not EMT.TFLOAT then
EmtSetToolForVmill( EMT.TOOL, EMT.HEAD, EMT.EXIT, EMT.VMILL)
end
-- se attivo Collision Check -- se attivo Collision Check
EMT.SAFEDIST = COLL_SAFE_DIST EMT.SAFEDIST = COLL_SAFE_DIST
if EMT.COLLOBJ then if EMT.COLLOBJ then
@@ -504,30 +553,35 @@ function OnSimulToolSelect( dPosA)
end end
EgtSetCurrMachining( NextMchId) EgtSetCurrMachining( NextMchId)
-- recupero il valore dell'asse virtuale bloccato A -- recupero il valore dell'asse virtuale bloccato A
local sVal = EgtGetMachiningParam( MCH_MP.BLOCKEDAXIS) dPosA = GetCurrChainSawingVirtualAxis()
dPosA = tonumber( sVal:sub( 3))
else else
-- imposto visualizzazione -- imposto visualizzazione
EgtSetMode( EgtGetHeadId( EMT.HEAD) or GDB_ID.NULL, GDB_MD.STD) EgtSetMode( EgtGetHeadId( EMT.HEAD) or GDB_ID.NULL, GDB_MD.STD)
end end
-- imposto il valore di A -- imposto il valore di A
EgtSetAxisPos( 'A', dPosA) EgtSetAxisPos( 'A', dPosA)
if abs( dPosA) < 0.1 then local dHomeC = GetChainSawCHomeFromVirtualAxis( dPosA)
EgtSetAxisPos( 'C', EgtIf( BD.RIGHT_LOAD, 180, 0)) EgtSetAxisPos( 'C', dHomeC)
end
EgtSetAxisPos( 'B', 0) EgtSetAxisPos( 'B', 0)
-- se aggregato per fresa tipo blockhaus -- se aggregato per fresa tipo blockhaus
elseif EMT.HEAD == 'H7' then elseif EMT.HEAD == 'H7' then
EgtSetAxisPos( 'C', EgtIf( BD.RIGHT_LOAD, 180, 0)) EgtSetAxisPos( 'C', EgtIf( BD.RIGHT_LOAD, 180, 0))
end end
-- se TC 1
if GetTCSet( EMT.TCPOS) == 1 then
EgtSetAxisPos( 'B', 90)
else
if EMT.HEAD ~= 'H3' then
EgtSetAxisPos( 'B', -90)
end
end
-- se punta lunga -- se punta lunga
if EMT.TOTLEN > LONG_TOOL_MINLEN then if EMT.TOTLEN > LONG_TOOL_MINLEN then
-- se su cambio utensile T111 -- se su cambio utensile T111
if EMT.TCPOS == 'T111' then if EMT.TCPOS == 'T111' then
EgtSetAxisPos( 'B', 0) EgtSetAxisPos( 'B', 0)
end end
end end -- breve pausa
-- breve pausa
EgtPause( 100) EgtPause( 100)
EgtOutText( '') EgtOutText( '')
EMT.TOOL_1 = EMT.TOOL EMT.TOOL_1 = EMT.TOOL
@@ -549,24 +603,19 @@ function OnSimulToolDeselect()
-- movimento scarico sega a catena -- movimento scarico sega a catena
if EMT.HEAD == 'H3' then if EMT.HEAD == 'H3' then
-- se avevo motosega, torno in zona sicura senza ruotare assi rotanti -- se avevo motosega, torno in zona sicura senza ruotare assi rotanti
if EMT.HB > BeamHeightForFixRot then SimulMoveAxis( 'X', SafeXRotAxes, MCH_SIM_STEP.RAPID)
SimulMoveAxis( 'X', SafeXRotAxes, MCH_SIM_STEP.RAPID) -- raddrizzo asse B prima di ruotare il C
end SimulMoveAxis( 'B', 0, MCH_SIM_STEP.COLLROT)
local dPosA = EgtGetAxisPos( 'A') SimulMoveAxis( 'C', 0, MCH_SIM_STEP.COLLROT)
if abs( dPosA) < 0.1 then
SimulMoveAxes( 'B', 0, MCH_SIM_STEP.COLLROT, 'C', EgtIf( BD.RIGHT_LOAD, 180, 0), MCH_SIM_STEP.COLLROT)
else
SimulMoveAxes( 'B', 0, MCH_SIM_STEP.COLLROT, 'C', EgtIf( BD.RIGHT_LOAD, 90, -90), MCH_SIM_STEP.COLLROT)
end
SimulMoveAxis( 'X', 0, MCH_SIM_STEP.RAPID) SimulMoveAxis( 'X', 0, MCH_SIM_STEP.RAPID)
-- movimento scarico rinvio -- movimento scarico rinvio
elseif EMT.HEAD == 'H5' or EMT.HEAD == 'H6' then elseif EMT.HEAD == 'H5' or EMT.HEAD == 'H6' then
SimulMoveAxes( 'B', 0, MCH_SIM_STEP.COLLROT, 'C', -90, MCH_SIM_STEP.COLLROT) SimulMoveAxes( 'B', 0, MCH_SIM_STEP.COLLROT, 'C', EgtIf( BD.RIGHT_LOAD, 90, -90), MCH_SIM_STEP.COLLROT)
SimulMoveAxis( 'X', 0, MCH_SIM_STEP.RAPID) SimulMoveAxis( 'X', 0, MCH_SIM_STEP.RAPID)
-- movimento scarico aggregato BlockHaus -- movimento scarico aggregato BlockHaus
elseif EMT.HEAD == 'H7' then elseif EMT.HEAD == 'H7' then
SimulMoveAxis( 'X', 0, MCH_SIM_STEP.RAPID) SimulMoveAxis( 'X', 0, MCH_SIM_STEP.RAPID)
SimulMoveAxes( 'B', 90, MCH_SIM_STEP.COLLROT, 'C', -90, MCH_SIM_STEP.COLLROT) SimulMoveAxes( 'B', 90, MCH_SIM_STEP.COLLROT, 'C', EgtIf( BD.RIGHT_LOAD, 90, -90), MCH_SIM_STEP.COLLROT)
-- movimento scarico punta lunga su T111 -- movimento scarico punta lunga su T111
elseif EMT.TOTLEN > LONG_TOOL_MINLEN then elseif EMT.TOTLEN > LONG_TOOL_MINLEN then
-- se su cambio utensile T111 -- se su cambio utensile T111
@@ -576,7 +625,11 @@ function OnSimulToolDeselect()
-- altrimenti posizioni standard rastrelliera -- altrimenti posizioni standard rastrelliera
else else
SimulMoveAxis( 'X', 0, MCH_SIM_STEP.RAPID) SimulMoveAxis( 'X', 0, MCH_SIM_STEP.RAPID)
SimulMoveAxes( 'B', 90, MCH_SIM_STEP.COLLROT, 'C', -90, MCH_SIM_STEP.COLLROT) if GetTCSet( EMT.TCPOS) == 1 then
SimulMoveAxes( 'B', 90, MCH_SIM_STEP.COLLROT, 'C', EgtIf( BD.RIGHT_LOAD, 90, -90), MCH_SIM_STEP.COLLROT)
else
SimulMoveAxes( 'B', -90, MCH_SIM_STEP.COLLROT, 'C', EgtIf( BD.RIGHT_LOAD, 90, -90), MCH_SIM_STEP.COLLROT)
end
end end
-- movimento scarico utensile di grosso diametro (su T111) -- movimento scarico utensile di grosso diametro (su T111)
else else
@@ -590,18 +643,29 @@ function OnSimulToolDeselect()
-- nascondo utensile su testa e lo visualizzo su TcPos -- nascondo utensile su testa e lo visualizzo su TcPos
EgtSetMode( EgtGetHeadId( EMT.HEAD), GDB_MD.HIDDEN) EgtSetMode( EgtGetHeadId( EMT.HEAD), GDB_MD.HIDDEN)
ShowToolInTcPos( EMT.TCPOS_1, true) ShowToolInTcPos( EMT.TCPOS_1, true)
-- movimento per carico utensile -- movimento per carico utensile
if EMT.NEXTHEAD ~= 'H3' and EMT.NEXTHEAD ~= 'H5' and EMT.NEXTHEAD ~= 'H6' then if EMT.NEXTHEAD ~= 'H3' and EMT.NEXTHEAD ~= 'H5' and EMT.NEXTHEAD ~= 'H6' then
SimulMoveAxes( 'B', 90, MCH_SIM_STEP.RAPROT, 'C', EgtIf( BD.RIGHT_LOAD, 90, -90), MCH_SIM_STEP.RAPROT) SimulMoveAxes( 'B', EgtIf( GetTCSet( EMT.TCPOS) == 1, 90, -90), MCH_SIM_STEP.RAPROT, 'C', EgtIf( BD.RIGHT_LOAD, 90, -90), MCH_SIM_STEP.RAPROT)
else else
SimulMoveAxes( 'B', 0, MCH_SIM_STEP.RAPROT, 'C', EgtIf( BD.RIGHT_LOAD, 90, -90), MCH_SIM_STEP.RAPROT) if EMT.NEXTHEAD == 'H3' then
SimulMoveAxes( 'B', 0, MCH_SIM_STEP.RAPROT, 'C', 0, MCH_SIM_STEP.RAPROT)
else
SimulMoveAxes( 'B', 0, MCH_SIM_STEP.RAPROT, 'C', EgtIf( BD.RIGHT_LOAD, 90, -90), MCH_SIM_STEP.RAPROT)
end
end end
-- se segue lama, carico utensile di default -- se segue lama, carico utensile di default
if EMT.NEXTHEAD == 'H2' then if EMT.NEXTHEAD == 'H2' then
local sDefTool = GetDefaultToolName() local sDefTool = GetDefaultToolName()
EgtLoadTool( 'H1', 1, sDefTool)
EMT.TOOL_1 = sDefTool EMT.TOOL_1 = sDefTool
EMT.TCPOS_1 = GetToolTcPos( EMT.TOOL_1) EMT.TCPOS_1 = GetToolTcPos( EMT.TOOL_1)
-- se TC 1
if GetTCSet( EMT.TCPOS_1) == 1 then
EgtSetAxisPos( 'B', 90)
else
EgtSetAxisPos( 'B', -90)
end
EgtLoadTool( 'H1', 1, sDefTool)
-- lo nascondo sul portautensili -- lo nascondo sul portautensili
ShowToolInTcPos( EMT.TCPOS_1, false) ShowToolInTcPos( EMT.TCPOS_1, false)
end end
@@ -645,8 +709,7 @@ function OnSimulMachiningStart()
-- se lavorazione attuale e precedente con sega a catena con angolo A diverso, devo scaricare e ricaricare -- se lavorazione attuale e precedente con sega a catena con angolo A diverso, devo scaricare e ricaricare
if EMT.HEAD == 'H3' and EMT.HEAD == EMT.PREVHEAD then if EMT.HEAD == 'H3' and EMT.HEAD == EMT.PREVHEAD then
local dPrevA = EgtGetAxisPos( 'A') local dPrevA = EgtGetAxisPos( 'A')
local sVal = EgtGetMachiningParam( MCH_MP.BLOCKEDAXIS) local dPosA = GetCurrChainSawingVirtualAxis()
local dPosA = tonumber( sVal:sub( 3))
if abs( dPosA - dPrevA) > 1 then if abs( dPosA - dPrevA) > 1 then
OnSimulToolDeselect() OnSimulToolDeselect()
EgtSetStatus( EgtGetHeadId( EMT.HEAD), GDB_ST.ON) EgtSetStatus( EgtGetHeadId( EMT.HEAD), GDB_ST.ON)
@@ -678,6 +741,7 @@ function OnSimulMachiningEnd()
EMT.UNLOADING = false EMT.UNLOADING = false
EMT.FALL = false EMT.FALL = false
end end
EMT.SPLIT = nil
EMT.PREVHEAD = EMT.HEAD EMT.PREVHEAD = EMT.HEAD
EMT.PREVTOOL = EMT.TOOL EMT.PREVTOOL = EMT.TOOL
EMT.PREVEXIT = EMT.EXIT EMT.PREVEXIT = EMT.EXIT
@@ -765,33 +829,89 @@ function OnSimulMoveStart()
VerifyVStroke( EMT.A2) VerifyVStroke( EMT.A2)
-- se inizio lavorazione -- se inizio lavorazione
if EMT.MCHFIRST then if EMT.MCHFIRST then
local bGoToHome = false
-- se gli assi rotanti cambiano parecchio, con motosega si va in parcheggio
if EMT.PREVHEAD == 'H3' and EMT.HEAD == 'H3' and EMT.TOOL == EMT.PREVTOOL and abs( EMT.R3p - EMT.R3) < 100 * GEO.EPS_SMALL and ( abs( EMT.R2p - EMT.R2) > 25 or abs( EMT.R1p - EMT.R1) > 25) then
bGoToHome = true
end
EgtOutText( '') EgtOutText( '')
EMT.MCHFIRST = false EMT.MCHFIRST = false
local bZmax = ( EMT.TOOL ~= EMT.PREVTOOL or EMT.L3 > -1) local bZmax = ( EMT.TOOL ~= EMT.PREVTOOL or EMT.L3 > -1)
-- con pezzi alti aggiorno gli assi rotanti prima di muovermi sopra il pezzo -- con pezzi alti aggiorno gli assi rotanti prima di muovermi sopra il pezzo
if not EMT.LOAD and EMT.MOVE == 0 and EMT.HB > BeamHeightForFixRot and EMT.FLAG2 == 1 then if EMT.HEAD == 'H3' and EMT.PREVHEAD ~= 'H3' then
-- se motosega mi muovo a X di sicurezza per ruotare SimulMoveAxis( 'X', SafeXRotAxes, MCH_SIM_STEP.RAPID)
if ( EMT.HEAD == 'H3' or ( bZmax and EMT.TOTLEN > 200)) then SimulMoveAxis( 'B', 0, MCH_SIM_STEP.COLLROT)
SimulMoveAxis( 'C', EMT.R1, MCH_SIM_STEP.COLLROT)
SimulMoveAxis( 'B', EMT.R2, MCH_SIM_STEP.COLLROT)
elseif not EMT.LOAD and EMT.MOVE == 0 and ( EMT.HEAD == 'H3' or ( bZmax and EMT.TOTLEN > 200)) and
( EMT.HT > BeamHeightForFixRot or ( EMT.HEAD == 'H1' and EMT.TOTLEN > 350) or bGoToHome) and EMT.FLAG2 == 1 then
-- se motosega mi muovo a X di sicurezza per ruotare, prima si raddrizza B e poi C in posizione
if EMT.HEAD == 'H3' and bGoToHome then
SimulMoveAxis( 'X', SafeXRotAxes, MCH_SIM_STEP.RAPID)
SimulMoveAxis( 'B', 0, MCH_SIM_STEP.COLLROT)
SimulMoveAxis( 'C', EMT.R1, MCH_SIM_STEP.COLLROT)
SimulMoveAxis( 'B', EMT.R2, MCH_SIM_STEP.COLLROT)
elseif ( bZmax and EMT.TOTLEN > 200) then
SimulMoveAxes( 'X', SafeXRotAxes, MCH_SIM_STEP.RAPID, 'C', EMT.R1, MCH_SIM_STEP.COLLROT, 'B', EMT.R2, MCH_SIM_STEP.COLLROT) SimulMoveAxes( 'X', SafeXRotAxes, MCH_SIM_STEP.RAPID, 'C', EMT.R1, MCH_SIM_STEP.COLLROT, 'B', EMT.R2, MCH_SIM_STEP.COLLROT)
end end
end end
EMT.POSTROT = nil EMT.POSTROT = nil
end end
-- se aggregato flottante su inizio attacco va compresso
if EMT.TFLOAT and not EMT.TFLOAT_CMP and EMT.MOVE == 1 and EgtGetName( EMT.MOVEID) == 'LI' then
-- recupero lunghezza
local dOffsL = - EgtGetMachiningParam( MCH_MP.OFFSL)
-- imposto compressione della parte flottante
SetFloatPos( EMT.HEAD, dOffsL)
-- imposto dati utensile in posizione compressa
EmtSetToolForVmill( EMT.TOOL, EMT.HEAD, EMT.EXIT, EMT.VMILL, 2, -dOffsL)
-- dichiaro che è compresso (assegnando Id entità di movimento)
EMT.TFLOAT_CMP = EMT.MOVEID
end
end end
--------------------------------------------------------------------- ---------------------------------------------------------------------
function OnSimulMoveEnd() function OnSimulMoveEnd()
-- se termine di passata con lama
if EMT.FLAG == 301 then if EMT.FLAG == 301 then
-- rimozione eventuali sfridi -- rimozione eventuali sfridi
ExecRemoveScraps() ExecRemoveScraps()
end end
-- se utensile flottante e movimento di compressione
if EMT.TFLOAT and EMT.MOVEID == EMT.TFLOAT_CMP then
-- verifico ci sia stata collisione tra ghiera flottante (portautensile e pezzo)
if not EMT.TFLOAT_TH_COMPR_COLL then
local sErr = 'CUTID='..tostring( EMT.CUTID)..'; TASKID='..tostring( EMT.TASKID)..'; Mach='..EMT.MCHNAME..'; Floating Ring not compressed on approach'
EmtSetLastError( 1222, sErr)
EgtOutLog( 'Error : ' .. sErr, 1)
else
EgtOutLog( 'Floating Ring compressed on approach (MOVEID='..EgtNumToString( EMT.MOVEID)..')', 1)
end
EMT.TFLOAT_TH_COMPR_COLL = nil
end
-- se aggregato flottante su fine uscita va rilasciato
if EMT.TFLOAT and EMT.TFLOAT_CMP and EMT.MOVE == 1 and EgtGetName( EMT.MOVEID) == 'LO' and EgtGetName( EgtGetNext( EMT.MOVEID) or GDB_ID.NULL) ~= 'LO' then
-- reset compressione della parte flottante
SetFloatPos( EMT.HEAD, 0)
-- dichiaro che è rilasciato
EMT.TFLOAT_CMP = nil
end
end end
--------------------------------------------------------------------- ---------------------------------------------------------------------
function OnSimulCollision() function OnSimulCollision()
-- se prima collisione della lavorazione, la segnalo -- se prima collisione della lavorazione, la segnalo
if EMT.MCHNAME ~= EMT.LAST_MCHNAME_COLLIDE then if EMT.MCHNAME ~= EMT.LAST_MCHNAME_COLLIDE then
-- speciale per utensile flottante (suo holder contro il grezzo)
if EMT.TFLOAT and EMT.TFLOAT_CMP and EMT.SIMCOBIND == 1002 and EMT.SIMVMID == EMT.VMILL[1] then
if EMT.MOVEID == EMT.TFLOAT_CMP then
EMT.TFLOAT_TH_COMPR_COLL = true
end
return
end
-- standard
local Class = '' local Class = ''
if EMT.SIMCOBIND == 1001 then if EMT.SIMCOBIND == 1001 then
Class = 'T_H1' Class = 'T_H1'
@@ -815,6 +935,8 @@ function ExecAuxCmd( sCmd)
if Cmd[1] == '0' then if Cmd[1] == '0' then
if Cmd[2] == 'Unloading' then if Cmd[2] == 'Unloading' then
EMT.UNLOADING = true EMT.UNLOADING = true
elseif Cmd[2] == 'Split' then
EMT.SPLIT = true
elseif Cmd[2] == 'Fall' then elseif Cmd[2] == 'Fall' then
EMT.FALL = true EMT.FALL = true
end end
@@ -856,19 +978,9 @@ function ExecAuxCmd( sCmd)
end end
end end
elseif Cmd[1] == '11' then elseif Cmd[1] == '11' then
local dPY = MaxOpen ExecMovePY( Cmd[2] ~= '0')
if Cmd[2] ~= '0' then
dPY = EgtIf( EMT.ROT == -1, EMT.HB, EMT.SB)
end
SimulMoveAxis( 'PY', dPY, MCH_SIM_STEP.RAPID)
SetPYLight( Cmd[2] ~= '0')
elseif Cmd[1] == '12' then elseif Cmd[1] == '12' then
local dPV = MaxOpen ExecMovePV( Cmd[2] ~= '0')
if Cmd[2] ~= '0' then
dPV = EgtIf( EMT.ROT == -1, EMT.HB, EMT.SB)
end
SimulMoveAxis( 'PV', dPV, MCH_SIM_STEP.RAPID)
SetPVLight( Cmd[2] ~= '0')
elseif Cmd[1] == '21' then elseif Cmd[1] == '21' then
local nYDelta = tonumber( Cmd[2]) local nYDelta = tonumber( Cmd[2])
local nVDelta = tonumber( Cmd[3]) local nVDelta = tonumber( Cmd[3])
@@ -912,7 +1024,7 @@ function ExecRemoveScraps()
for i = nPart, 1, -1 do for i = nPart, 1, -1 do
if i ~= nPartMax then if i ~= nPartMax then
local b3Vmill = EgtVolZmapGetPartBBoxGlob( vMillId, i - 1, GDB_BB.STANDARD) local b3Vmill = EgtVolZmapGetPartBBoxGlob( vMillId, i - 1, GDB_BB.STANDARD)
if b3Vmill:getDimX() < 1200 then if b3Vmill:getDimX() < 1250 then
EgtRemoveVolZmapPart( vMillId, i - 1) EgtRemoveVolZmapPart( vMillId, i - 1)
end end
end end
@@ -932,7 +1044,7 @@ function ExecUnloading()
-- li sposto per lasciare spazio al nuovo pezzo -- li sposto per lasciare spazio al nuovo pezzo
local nId = EgtGetFirstInGroup( nVmGrpId) local nId = EgtGetFirstInGroup( nVmGrpId)
while nId do while nId do
EgtMove( nId, Vector3d( 0, EgtIf( BD.RIGHT_LOAD, ( EMT.SB + 50.0), -( EMT.SB + 50.0)), 0), GDB_RT.GLOB) EgtMove( nId, Vector3d( 0, EgtIf( BD.RIGHT_LOAD, ( EMT.ST + 50.0), -( EMT.ST + 50.0)), 0), GDB_RT.GLOB)
nId = EgtGetNext( nId) nId = EgtGetNext( nId)
end end
-- creo un nuovo layer e vi inserisco il nuovo pezzo -- creo un nuovo layer e vi inserisco il nuovo pezzo
@@ -977,6 +1089,176 @@ function ExecUnloading()
end end
end end
---------------------------------------------------------------------
function CheckClamping( sClampName)
local nClampId = EgtGetAxisId( sClampName) or GDB_ID.NULL
local nClampPathId = EgtGetFirstInGroup( EgtGetFirstNameInGroup( nClampId, 'CLAMP_CHECK') or GDB_ID.NULL)
local b3ClampingArea = EgtGetBBoxGlob( nClampPathId or GDB_ID.NULL, GDB_BB.STANDARD)
-- se non trovo percorso area di clamping, esco subito
if not nClampPathId or not EMT.VMILL or not ClampingCoeffMin then
return
end
local function GetCurveListFromIntersection( sPosIntersPlane, sIntersPlane, dDepth)
local vCurveListId = {}
local vtIntersPlane
-- piano di interpolazione
if sIntersPlane == 'X' then
vtIntersPlane = X_AX()
elseif sIntersPlane == 'Y' then
vtIntersPlane = Y_AX()
elseif sIntersPlane == 'Z' then
vtIntersPlane = Z_AX()
end
for i = 1, #EMT.VMILL do
local b3VMill = EgtGetBBoxGlob( EMT.VMILL[i], GDB_BB.EXACT)
local ptPosIntersPlane
if sPosIntersPlane == 'MIN' then
ptPosIntersPlane = b3VMill:getMin() + dDepth * vtIntersPlane
elseif sPosIntersPlane == 'MAX' then
ptPosIntersPlane = b3VMill:getMax() - dDepth * vtIntersPlane
end
local nLoopId, nLoopCnt = EgtPlaneVolZmapInters( ptPosIntersPlane, vtIntersPlane, EMT.VMILL[i], CLAMP_CHECK_INTERS, GDB_RT.GLOB)
vCurveListId = EgtTableAdd( vCurveListId, nLoopId, nLoopCnt)
end
return vCurveListId
end
local function CalculateIntersectionArea( sPosIntersPlane, sIntersPlane, dDepth)
-- test piano frontale
local vCurveListId = GetCurveListFromIntersection( sPosIntersPlane, sIntersPlane, dDepth)
-- si copia curva intersezione e curva pinza in gruppo di confronto
local nFlatSurfId, nFlatSurfCnt = EgtSurfFlatRegion( CLAMP_CHECK_GROUP, vCurveListId)
local vFlatSurfId = EgtTableFill( nFlatSurfId, nFlatSurfCnt) or {}
local nClampSurfId = EgtSurfFlatRegion( CLAMP_CHECK_GROUP, nClampPathId)
local dTotalArea = 0
local dTotalXLenght = 0
for i = 1, #vFlatSurfId do
local nTempSurfId = vFlatSurfId[i]
EgtSurfFrIntersect( nTempSurfId, nClampSurfId)
if nTempSurfId then
dTotalArea = dTotalArea + ceil( EgtSurfArea( nTempSurfId) or 0)
local b3BoxIntersectionBox = EgtGetBBoxGlob( nTempSurfId, GDB_BB.STANDARD)
if b3BoxIntersectionBox then
dTotalXLenght = dTotalXLenght + ceil( b3BoxIntersectionBox:getDimX()) -- somma lunghezze (x) delle aree pinzate
end
end
end
return dTotalArea, dTotalXLenght
end
-- minima area considerata per un corretto pinzaggio
DistZClampToTable = DistZClampToTable or 0
--local MinJoin = BD.GetMinJoin( EMT.ST, EMT.HT, EgtIf( EMT.SPLIT, EMT.LT, EMT.LB))
UpdateMinJoinDeltaTol( EMT.ST, EMT.HT, EgtIf( EMT.SPLIT, EMT.LT, EMT.LB))
local MinZClamping = min( b3ClampingArea:getDimZ() + DistZClampToTable, EMT.HT) - DistZClampToTable
local dMinClamping = ( MinJoin * MinZClamping)
-- si moltiplica per un coefficiente minimo sotto al quale si da l'errore di pinzaggio
ClampingCoeffMin = EgtClamp( ClampingCoeffMin, 0.01, 1)
if MinZClamping > 116 then
dMinClamping = MinJoin * 116 + ( pow( MinJoin, 2) / 2)
if MinJoin > 280 then
dMinClamping = MinJoin * 116 + ( pow( 280, 2) / 2) + ( pow( MinJoin - 280, 2))
end
end
local dMinClampingAreaWarn = dMinClamping * ClampingCoeffMin
local dMinClampingAreaErr = dMinClamping * ( ClampingCoeffMin / 3)
local bError = true
local sWrn, sErr
local bWriteWarnMessage = false
local bWriteErrMessage = false
-- controllo faccia frontale
local dArea, dXClampedLenght = CalculateIntersectionArea( 'MIN', 'Y', 3)
-- ERRORE: pinza troppo poco (meno di 1/3 del minimo richiesto)
if dArea and dArea < dMinClampingAreaErr then
-- solo se pinza almeno 1cm2, e la somma della lunghezza pinzata è maggiore della lunghezza minima pinzabile da Warning e non errore
if dXClampedLenght >= MinJoin * ClampingCoeffMin and dArea > 1000 then
bError = false
end
-- pinzaggio non fattibile, errore
if bError then
sErr = 'ERROR CLAMPING ' .. sClampName .. ' : '..tostring( ceil( ( dArea / dMinClampingAreaWarn) * 100))..'% ( '.. tostring( dArea/1000)..'cm2)'
bWriteErrMessage = true
end
end
-- WARNING: pinza meno del minimo richiesto
if dArea and dArea < dMinClampingAreaWarn and not bWriteErrMessage then
sWrn = 'WARNING CLAMPING ' .. sClampName .. ' : '..tostring( ceil( ( dArea / dMinClampingAreaWarn) * 100))..'% ( '.. tostring( dArea/1000)..'cm2)'
bWriteWarnMessage = true
end
EgtEmptyGroup( CLAMP_CHECK_GROUP)
EgtEmptyGroup( CLAMP_CHECK_INTERS)
-- controllo altro lato solo se non sono già in errore
if not bWriteErrMessage then
-- controllo faccia posteriore
dArea, dXClampedLenght = CalculateIntersectionArea( 'MAX', 'Y', 3)
-- ERRORE: pinza troppo poco (meno di 1/3 del minimo richiesto)
if dArea and dArea < dMinClampingAreaErr then
-- solo se pinza almeno 1cm2, e la somma della lunghezza pinzata è maggiore della lunghezza minima pinzabile da Warning e non errore
if dXClampedLenght >= MinJoin * ClampingCoeffMin and dArea > 1000 then
bError = false
end
-- pinzaggio non fattibile, errore
if bError then
sErr = 'ERROR CLAMPING ' .. sClampName .. ' : '..tostring( ceil( ( dArea / dMinClampingAreaWarn) * 100))..'% ( '.. tostring( dArea/1000)..'cm2)'
bWriteErrMessage = true
end
end
-- WARNING: pinza meno del minimo richiesto
if dArea and dArea < dMinClampingAreaWarn and not bWriteWarnMessage and not bWriteErrMessage then
sWrn = 'WARNING CLAMPING ' .. sClampName .. ' : '..tostring( ceil( ( dArea / dMinClampingAreaWarn) * 100))..'% ( '.. tostring( dArea/1000)..'cm2)'
bWriteWarnMessage = true
end
EgtEmptyGroup( CLAMP_CHECK_GROUP)
EgtEmptyGroup( CLAMP_CHECK_INTERS)
end
if bWriteErrMessage then
EmtSetLastError( 1213, sErr, EgtGetEnableUI())
EgtOutBox( sErr, 'CLAMPING', 'ERROR', 'OK')
EmtSetSimulPause()
elseif bWriteWarnMessage then
EgtOutLog( sWrn)
EgtOutBox( sWrn, 'CLAMPING', 'WARNING', 'OK')
EmtSetSimulPause()
end
end
---------------------------------------------------------------------
function ExecMovePY( bClose)
--SimulMoveAxes( 'PY', EgtIf( not bClose, MaxHoOpen, EMT.HB), MCH_SIM_STEP.RAPID)
local dPY = MaxOpen
if bClose then
dPY = EgtIf( EMT.ROT == -1, EMT.HT, EMT.ST)
end
SimulMoveAxis( 'PY', dPY, MCH_SIM_STEP.RAPID)
SetPYLight( bClose)
if bClose then
CheckClamping( 'PY')
end
end
---------------------------------------------------------------------
function ExecMovePV( bClose)
--EgtIf( not bClose, MaxHoOpen, EMT.HB), MCH_SIM_STEP.RAPID)
local dPV = MaxOpen
if bClose then
dPV = EgtIf( EMT.ROT == -1, EMT.HT, EMT.ST)
end
SimulMoveAxis( 'PV', dPV, MCH_SIM_STEP.RAPID)
SetPVLight( bClose)
if bClose then
CheckClamping( 'PV')
end
end
--------------------------------------------------------------------- ---------------------------------------------------------------------
function VerifyYSlide( sName1, dVal1, sName2, dVal2) function VerifyYSlide( sName1, dVal1, sName2, dVal2)
-- Se movimento trave agganciata con carrello Y -- Se movimento trave agganciata con carrello Y
@@ -1134,11 +1416,11 @@ end
-- *** ESTIMATION T&L *** -- *** ESTIMATION T&L ***
--------------------------------------------------------------------- ---------------------------------------------------------------------
local ESTIMATION_RAPID_COEFF = EstimationRapidMultiplier or 1 local ESTIMATION_RAPID_COEFF = EstimationRapidMultiplier or 1
local RAPID_X_FEED = 75000 / ESTIMATION_RAPID_COEFF -- mm/min local RAPID_X_FEED = 100000 / ESTIMATION_RAPID_COEFF -- mm/min
local RAPID_Y_FEED = 100000 / ESTIMATION_RAPID_COEFF -- mm/min local RAPID_Y_FEED = 100000 / ESTIMATION_RAPID_COEFF -- mm/min
local RAPID_Z_FEED = 50000 / ESTIMATION_RAPID_COEFF -- mm/min local RAPID_Z_FEED = 100000 / ESTIMATION_RAPID_COEFF -- mm/min
local RAPID_C_FEED = 15000 / ESTIMATION_RAPID_COEFF -- deg/min local RAPID_C_FEED = 12000 / ESTIMATION_RAPID_COEFF -- deg/min
local RAPID_B_FEED = 15000 / ESTIMATION_RAPID_COEFF -- deg/min local RAPID_B_FEED = 12000 / ESTIMATION_RAPID_COEFF -- deg/min
local RAPID_MIN_T = 0.1 * ESTIMATION_RAPID_COEFF -- s local RAPID_MIN_T = 0.1 * ESTIMATION_RAPID_COEFF -- s
local LOAD_T = 2 * ESTIMATION_RAPID_COEFF -- s local LOAD_T = 2 * ESTIMATION_RAPID_COEFF -- s
local CHAR_ONE_MOVE_T = 1 * ESTIMATION_RAPID_COEFF -- s local CHAR_ONE_MOVE_T = 1 * ESTIMATION_RAPID_COEFF -- s
@@ -1150,6 +1432,18 @@ local FALL_T = 2 * ESTIMATION_RAPID_COEFF -- s
--------------------------------------------------------------------- ---------------------------------------------------------------------
function OnEstimStart() function OnEstimStart()
EMT.INCHES = not EgtUiUnitsAreMM() -- unità di misura mm/inches EMT.INCHES = not EgtUiUnitsAreMM() -- unità di misura mm/inches
-- TPA
if NumericalControl == 'TPA' then
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
-- NUM_PLUS e NUM
else
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
end end
--------------------------------------------------------------------- ---------------------------------------------------------------------
@@ -1235,6 +1529,15 @@ function OnEstimDispositionEnd()
EMT.OPEISDISP = false EMT.OPEISDISP = false
end end
---------------------------------------------------------------------
function OnEstimRawMoveData()
-- se start del pezzo
if IsStartOrRestPhase( EMT.PHASE) then
EMT.SPLIT = false
end
OnRawMoveData()
end
--------------------------------------------------------------------- ---------------------------------------------------------------------
function OnEstimToolSelect() function OnEstimToolSelect()
-- reset indice utensile in tabella lunghezze -- reset indice utensile in tabella lunghezze
@@ -1291,6 +1594,12 @@ function OnEstimMachiningEnd()
EMT.TLE_NAME = nil EMT.TLE_NAME = nil
EMT.TLE_TIME = nil EMT.TLE_TIME = nil
end end
EMT.MCHUSERNOTES = EgtGetMachiningParam( MCH_MP.USERNOTES) or ''
EMT.MCHSPLIT = ( EMT.MCHUSERNOTES:find( 'Split;', 1, true) ~= nil)
if EMT.MCHSPLIT then
EMT.SPLIT = true
end
end end
--------------------------------------------------------------------- ---------------------------------------------------------------------
@@ -1421,15 +1730,15 @@ function OnEstimRapid()
EMT.MCHEXTLEN = EMT.MCHEXTLEN + dLen EMT.MCHEXTLEN = EMT.MCHEXTLEN + dLen
-- calcolo tempo -- calcolo tempo
local dTime = RAPID_MIN_T local dTime = RAPID_MIN_T
local dT1 = abs( dL1) / RAPID_X_FEED * 60 local dT1 = CalcMoveTime( abs( dL1), EMT.FMAXPINZE, EMT.SPLIT)
if dT1 > dTime then dTime = dT1 end if dT1 > dTime then dTime = dT1 end
local dT2 = abs( dL2) / RAPID_Y_FEED * 60 local dT2 = abs( dL2) / ( RAPID_X_FEED / 60) -- CalcMoveTime( abs( dL2), RAPID_X_FEED, EMT.SPLIT)
if dT2 > dTime then dTime = dT2 end if dT2 > dTime then dTime = dT2 end
local dT3 = abs( dL3) / RAPID_Z_FEED * 60 local dT3 = abs( dL3) / ( RAPID_Z_FEED * 60) -- CalcMoveTime( abs( dL3), RAPID_Z_FEED, EMT.SPLIT)
if dT3 > dTime then dTime = dT3 end if dT3 > dTime then dTime = dT3 end
local dT4 = abs( dR1) / RAPID_C_FEED * 60 local dT4 = abs( dR1) / ( RAPID_C_FEED / 60)
if dT4 > dTime then dTime = dT4 end if dT4 > dTime then dTime = dT4 end
local dT5 = abs( dR2) / RAPID_B_FEED * 60 local dT5 = abs( dR2) / ( RAPID_B_FEED / 60)
if dT5 > dTime then dTime = dT5 end if dT5 > dTime then dTime = dT5 end
EMT.MCHEXTTIME = EMT.MCHEXTTIME + dTime EMT.MCHEXTTIME = EMT.MCHEXTTIME + dTime
EgtOutLog( string.format( ' G0 Len=%.0f Rot=%.0f° Time=%.2f', dLen, abs( dR1) + abs( dR2), dTime), 5) EgtOutLog( string.format( ' G0 Len=%.0f Rot=%.0f° Time=%.2f', dLen, abs( dR1) + abs( dR2), dTime), 5)
@@ -1447,7 +1756,7 @@ function OnEstimLinear()
local dLen = sqrt( dL1 * dL1 + dL2 * dL2 + dL3 * dL3) local dLen = sqrt( dL1 * dL1 + dL2 * dL2 + dL3 * dL3)
EMT.MCHCUTLEN = EMT.MCHCUTLEN + dLen EMT.MCHCUTLEN = EMT.MCHCUTLEN + dLen
-- calcolo tempo -- calcolo tempo
local dTime = dLen / EMT.F * 60 local dTime = dLen / ( EMT.F / 60) -- CalcMoveTime( dLen, EMT.F, EMT.SPLIT)
EMT.MCHCUTTIME = EMT.MCHCUTTIME + dTime EMT.MCHCUTTIME = EMT.MCHCUTTIME + dTime
EgtOutLog( string.format( ' G1 Len=%.0f Time=%.2f', dLen, dTime), 5) EgtOutLog( string.format( ' G1 Len=%.0f Time=%.2f', dLen, dTime), 5)
-- aggiorno valori come precedenti -- aggiorno valori come precedenti
@@ -1594,6 +1903,78 @@ function GetParkT()
end end
end end
---------------------------------------------------------------------
function GetCurrChainSawingVirtualAxis()
-- recupero il valore dell'asse virtuale bloccato A
local sVal = EgtGetMachiningParam( MCH_MP.BLOCKEDAXIS) or 'A=0'
local dPosA = tonumber( sVal:sub( 3)) or 0
return dPosA
end
---------------------------------------------------------------------
function CalcDinamicaPinze_TPA( dH, dS, dL)
local MinTempoAcc = EMT.MINACC -- [ms] ~300
local MaxTempoAcc = EMT.MAXACC -- [ms] ~4000
local KgMtCubo= WoodDensity or 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 = EgtClamp( ( Massa * FMaxPinze) / ( 60 * ForzaAttrito), MinTempoAcc, MaxTempoAcc)
local RidFeed = 100 / Massa * 100
if RidFeed > 100 then
RidFeed = 100
elseif RidFeed < 10 then
RidFeed = 10
end
return TempoAcc, MinTempoAcc, RidFeed
end
---------------------------------------------------------------------
function CalcDinamicaPinze_NUM( dH, dS, dL)
local KgMtCubo= WoodDensity or 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)
local AccMaxPinze = EMT.MAXACC
local AccPinze = EgtClamp( FMaxPinze / ( 60 * TempoAcc), EMT.MINACC, EMT.MAXACC)
local RidFeed = 100 / Massa * 100
if RidFeed > 100 then
RidFeed = 100
elseif RidFeed < 10 then
RidFeed = 10
end
return AccPinze, AccMaxPinze, RidFeed, TempoAcc
end
---------------------------------------------------------------------
function CalcMoveTime( dPathLen, dFeed, bIsSplitted)
local dTime
local dFeedInSec = dFeed / 60
if NumericalControl == 'TPA' then
local dTempoAcc, _, _ = CalcDinamicaPinze_TPA( EMT.HT, EMT.ST, EgtIf( bIsSplitted, EMT.LT, EMT.LB))
dTempoAcc = dTempoAcc / 1000
-- se si raggiunge la velocità massima
if dPathLen >= dFeedInSec * dTempoAcc then
dTime = dTempoAcc * 2 + ( ( dPathLen - dFeedInSec * dTempoAcc) / dFeedInSec)
else
dTime = 2 * sqrt( (dPathLen * dTempoAcc) / dFeedInSec)
end
else
local dAcc, _, _, _ = CalcDinamicaPinze_NUM( EMT.HT, EMT.ST, EgtIf( bIsSplitted, EMT.LT, EMT.LB))
-- Caso 1: dFeed raggiunta
if dPathLen >= ( dFeedInSec ^ 2) / dAcc then
dTime = ( dFeedInSec / dAcc) + ( dPathLen / dFeedInSec)
-- Caso 2: dFeed non raggiunta
else
dTime = 2 * sqrt( dPathLen / dAcc)
end
end
return dTime
end
--------------------------------------------------------------------- ---------------------------------------------------------------------
-- *** END GENERAL *** -- *** END GENERAL ***
--------------------------------------------------------------------- ---------------------------------------------------------------------
+73 -87
View File
@@ -7,6 +7,12 @@ EgtEnableDebug( false)
-- carico librerie -- carico librerie
local BD = require( 'BeamData') local BD = require( 'BeamData')
---------------------------------------------------------------------
-- *** Generic Machinings ***
---------------------------------------------------------------------
pcall( require, 'EmtGenMachining') -- si fa una require con PCALL perchè la libreria è opzionale
---------------------- OnSpecialMoveZup ----------------------------- ---------------------- OnSpecialMoveZup -----------------------------
--------------------------------------------------------------------- ---------------------------------------------------------------------
function OnSpecialMoveZup() function OnSpecialMoveZup()
@@ -25,20 +31,9 @@ end
---------- OnSpecialApplyDisposition & OnPostApplyMachining --------- ---------- OnSpecialApplyDisposition & OnPostApplyMachining ---------
----------------------- Costanti ------------------------------------ ----------------------- Costanti ------------------------------------
local DELTA_TOL_V = 110
local DELTA_TOL_S = 210
local DELTA_TOL_L = 410
local DELTA_TOL_FIXED = 50 local DELTA_TOL_FIXED = 50
local DeltaTol = DELTA_TOL_S
local DELTA_SIC = 1 local DELTA_SIC = 1
local AGG_LOAD = 50 local AGG_LOAD = 50
local MIN_JOIN_VV = EgtClamp( MinJoinVV or 75, 60, 150)
local MIN_JOIN_SS = EgtClamp( MinJoinSS or 100, 80, 275)
local MIN_JOIN_LS = EgtClamp( MinJoinLS or 290, 250, 400)
local MIN_JOIN_SL = EgtClamp( MinJoinSL or 100, 80, 400)
local MIN_JOIN_LL = EgtClamp( MinJoinLL or 400, 300, 600)
local MinJoin = MIN_JOIN_SS
local MinOther = abs( MinY) + abs( MaxV) + MinJoin
----------------------- Variabili ----------------------------------- ----------------------- Variabili -----------------------------------
local Test = false local Test = false
@@ -147,53 +142,6 @@ local function IsFirstMachiningAfterRotation( nMchId)
return ( nRot ~= nPrevRot) return ( nRot ~= nPrevRot)
end end
---------------------------------------------------------------------
local function UpdateMinJoinDeltaTol()
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
if EMC.SB <= W_V and EMC.HB <= H_V then
MinJoin = MIN_JOIN_VV
DeltaTol = DELTA_TOL_V
elseif EMC.LB <= L_SMALL then
MinJoin = MIN_JOIN_SS
DeltaTol = DELTA_TOL_S
else
local dMinJoinS
local dMinJoinL
if EMC.SB <= W_S then
dMinJoinS = MIN_JOIN_SS
dMinJoinL = MIN_JOIN_LS
elseif EMC.SB <= W_L then
local Coeff = ( EMC.SB - W_S) / ( W_L - W_S)
dMinJoinS = ( 1 - Coeff) * MIN_JOIN_SS + Coeff * MIN_JOIN_SL
dMinJoinL = ( 1 - Coeff) * MIN_JOIN_LS + Coeff * MIN_JOIN_LL
else
dMinJoinS = MIN_JOIN_SL
dMinJoinL = MIN_JOIN_LL
end
if EMC.HB <= H_S then
MinJoin = dMinJoinS
DeltaTol = DELTA_TOL_S
elseif EMC.HB <= H_L then
local Coeff = ( EMC.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 EMC.SB < W_V then
DeltaTol = DELTA_TOL_V
end
end
MinOther = abs( MinY) + abs( MaxV) + MinJoin
end
--------------------------------------------------------------------- ---------------------------------------------------------------------
local function GetCUTID() local function GetCUTID()
-- recupero CUTID del pezzo in lavoro -- recupero CUTID del pezzo in lavoro
@@ -361,7 +309,7 @@ function OnSpecialApplyDisposition()
EMC.ZMIN = b3Raw:getMin():getZ() EMC.ZMIN = b3Raw:getMin():getZ()
-- Aggiorno limiti di presa e tolleranza -- Aggiorno limiti di presa e tolleranza
UpdateMinJoinDeltaTol() UpdateMinJoinDeltaTol( EMC.SB, EMC.HB, EMC.LB)
-- Assegno sovramateriale di testa e ingombro tagli di testa e di coda -- Assegno sovramateriale di testa e ingombro tagli di testa e di coda
EMC.HOVM = EgtGetInfo( nCurrRawId, 'HOVM', 'd') or 0 EMC.HOVM = EgtGetInfo( nCurrRawId, 'HOVM', 'd') or 0
@@ -650,7 +598,7 @@ function SpecApplyPath( bPreSplit, bSplitting, bPreCut, bCutting, bUnload, bPreR
EMC.ZMIN = b3Raw:getMin():getZ() EMC.ZMIN = b3Raw:getMin():getZ()
-- Aggiorno limiti di presa e tolleranza -- Aggiorno limiti di presa e tolleranza
UpdateMinJoinDeltaTol() UpdateMinJoinDeltaTol( EMC.SB, EMC.HB, EMC.LB)
-- Recupero sovramateriale di testa e ingombro tagli di testa e di coda -- Recupero sovramateriale di testa e ingombro tagli di testa e di coda
EMC.HOVM = EgtGetInfo( nCurrRawId, 'HOVM', 'd') or 0 EMC.HOVM = EgtGetInfo( nCurrRawId, 'HOVM', 'd') or 0
@@ -925,7 +873,7 @@ function SpecCalcEncumbrance( vtTool, vtArm, ptMin, ptMax, bSaw, bChain, dTLen,
local dHeadBack = 350 local dHeadBack = 350
if bSaw then if bSaw then
if vtTool:getX() > 0 and abs( vtTool:getY()) < 0.088 and abs( vtTool:getZ()) < 0.088 then if vtTool:getX() > 0 and abs( vtTool:getY()) < 0.088 and abs( vtTool:getZ()) < 0.088 then
dHeadBack = 50 + 0.5 * dTDiam * sqrt( 1 - vtTool:getX() * vtTool:getX()) dHeadBack = 50 + 0.5 * dTDiam * sqrt( 1 - vtTool:getX() * vtTool:getX()) + EgtIf( EMC.CNT == 1, 10, 0)
elseif abs( vtTool:getZ()) < 0.26 and abs( vtTool:getX()) < 0.35 then elseif abs( vtTool:getZ()) < 0.26 and abs( vtTool:getX()) < 0.35 then
dHeadBack = EgtIf( vtArm:getX() < 0, 540, 350) dHeadBack = EgtIf( vtArm:getX() < 0, 540, 350)
elseif abs( vtTool:getZ()) < 0.26 and abs( vtTool:getX()) < 0.71 then elseif abs( vtTool:getZ()) < 0.26 and abs( vtTool:getX()) < 0.71 then
@@ -1016,7 +964,7 @@ function SpecCalcEncumbrance( vtTool, vtArm, ptMin, ptMax, bSaw, bChain, dTLen,
local dHeadFront = 350 local dHeadFront = 350
if bSaw then if bSaw then
if vtTool:getX() < 0 and abs( vtTool:getY()) < 0.088 and abs( vtTool:getZ()) < 0.088 then if vtTool:getX() < 0 and abs( vtTool:getY()) < 0.088 and abs( vtTool:getZ()) < 0.088 then
dHeadFront = 50 + 0.5 * dTDiam * sqrt( 1 - vtTool:getX() * vtTool:getX()) dHeadFront = 50 + 0.5 * dTDiam * sqrt( 1 - vtTool:getX() * vtTool:getX()) + EgtIf( EMC.CNT == 1, 10, 0)
elseif abs( vtTool:getZ()) < 0.26 and abs( vtTool:getX()) < 0.35 then elseif abs( vtTool:getZ()) < 0.26 and abs( vtTool:getX()) < 0.35 then
dHeadFront = EgtIf( vtArm:getX() > 0, 540, 350) dHeadFront = EgtIf( vtArm:getX() > 0, 540, 350)
elseif abs( vtTool:getZ()) < 0.26 and abs( vtTool:getX()) < 0.71 then elseif abs( vtTool:getZ()) < 0.26 and abs( vtTool:getX()) < 0.71 then
@@ -1588,9 +1536,12 @@ function SpecAdjustCarriages( vCmd, dTPosI, dYDeltaI, dVDeltaI, dTPosF, dYDeltaF
dTPosF = MaxV - dVDeltaF dTPosF = MaxV - dVDeltaF
end end
-- se il pinzaggio deve essere invertito forzo entrata nei riposizionamenti
-- altrimenti posizioni iniziali e finali sono coincidenti dato che la pinza non in presa viene posizionata alla distanza minima a quella in presa
local bInvertClamping = not EMC.PILGRIMSTEP and EMC.YDELTA ~= EMC.YDELTANEXT and EMC.VDELTA ~= EMC.VDELTANEXT
-- verifico che le morse non sono in posizione -- verifico che le morse non sono in posizione
if abs( dYDeltaF - dYDeltaI) > 10 * GEO.EPS_SMALL or abs( dVDeltaF - dVDeltaI) > 10 * GEO.EPS_SMALL or if ( abs( dYDeltaF - dYDeltaI) > 10 * GEO.EPS_SMALL or abs( dVDeltaF - dVDeltaI) > 10 * GEO.EPS_SMALL or bInvertClamping) and
EMC.YDELTA ~= EMC.YDELTANEXT or EMC.VDELTA ~= EMC.VDELTANEXT then ( EMC.YDELTA ~= EMC.YDELTANEXT or EMC.VDELTA ~= EMC.VDELTANEXT) then
if #vCmd == 0 then if #vCmd == 0 then
table.insert( vCmd, { 0, 'Clamp repositioning'}) table.insert( vCmd, { 0, 'Clamp repositioning'})
-- risalita testa a Zmax -- risalita testa a Zmax
@@ -1621,8 +1572,8 @@ function SpecAdjustCarriages( vCmd, dTPosI, dYDeltaI, dVDeltaI, dTPosF, dYDeltaF
dMaxMovePilgrimStepSingleClampY = MaxY - dYPosI dMaxMovePilgrimStepSingleClampY = MaxY - dYPosI
dMaxMovePilgrimStepSingleClampV = - MinV + dVPosI dMaxMovePilgrimStepSingleClampV = - MinV + dVPosI
else else
dMaxMovePilgrimStepDoubleClamp = MaxY - MinY - MinV + MaxV dMaxMovePilgrimStepDoubleClamp = MaxY - MyMinY - MinV + MaxV
dMaxMovePilgrimStepSingleClampY = MaxY - MinY dMaxMovePilgrimStepSingleClampY = MaxY - MyMinY
dMaxMovePilgrimStepSingleClampV = - MinV + MaxV dMaxMovePilgrimStepSingleClampV = - MinV + MaxV
end end
@@ -1636,7 +1587,9 @@ function SpecAdjustCarriages( vCmd, dTPosI, dYDeltaI, dVDeltaI, dTPosF, dYDeltaF
-- * deve effettivamente spostarsi -- * deve effettivamente spostarsi
-- * non si arriva da gestione passo del pellegrino -- * non si arriva da gestione passo del pellegrino
-- * se riesce a raggiungere la posizione con le corse a disposizione per come sono posizionate le morse attualmente -- * se riesce a raggiungere la posizione con le corse a disposizione per come sono posizionate le morse attualmente
if ( dYDeltaI - dVDeltaF) + 10 * GEO.EPS_SMALL >= MyMinY - MaxV and abs( dVDeltaF - dVDeltaI) > 10 * GEO.EPS_SMALL and not EMC.PILGRIMSTEP and if ( dYDeltaI - dVDeltaF) + 10 * GEO.EPS_SMALL >= MyMinY - MaxV and
( abs( dVDeltaF - dVDeltaI) > 10 * GEO.EPS_SMALL or not EMC.VDELTA) and
not EMC.PILGRIMSTEP and
( dVDeltaF - dVDeltaI > MinV - dVPosI + MyMinY - dYPosI) then ( dVDeltaF - dVDeltaI > MinV - dVPosI + MyMinY - dYPosI) then
table.insert( vCmd, { 0, 'Direct-V-Y'}) table.insert( vCmd, { 0, 'Direct-V-Y'})
-- se l'altra morsa non era in presa, vado a pinzare il pezzo -- se l'altra morsa non era in presa, vado a pinzare il pezzo
@@ -1660,6 +1613,18 @@ function SpecAdjustCarriages( vCmd, dTPosI, dYDeltaI, dVDeltaI, dTPosF, dYDeltaF
-- se spostamento verso il carico -- se spostamento verso il carico
elseif ( dVPosI + ( dVDeltaF - dVDeltaI)) > MaxV then elseif ( dVPosI + ( dVDeltaF - dVDeltaI)) > MaxV then
dBeamMove = dVPosI + ( dVDeltaF - dVDeltaI) - MaxV dBeamMove = dVPosI + ( dVDeltaF - dVDeltaI) - MaxV
-- se è FASTCLAMPING attivo, si suddivide il movimento
elseif BD.FASTCLAMPING then
-- se la trave si sposta dal carico verso lo scarico
if dTPosI - dTPosF > 0 then
dBeamMove = min( -( dTPosF - dTPosI), -( MyMinY - dYPosI), -( dVDeltaI - dVDeltaF))
else
dBeamMove = max( -( dTPosF - dTPosI), -( MyMinY - dYPosI))
end
dBeamMove = dBeamMove / 2
-- altrimenti la trave resta ferma e la pinza 1 va in presa (si limita lo scivolamento del pezzo)
else
;
end end
-- se serve un grande spostamento e si sta pinzando poco. Y trascinatore pinza poco e V si sposta per prima per recuperare -- se serve un grande spostamento e si sta pinzando poco. Y trascinatore pinza poco e V si sposta per prima per recuperare
@@ -1734,6 +1699,8 @@ function SpecAdjustCarriages( vCmd, dTPosI, dYDeltaI, dVDeltaI, dTPosF, dYDeltaF
-- movimento terminato -- movimento terminato
dTPosI, dYDeltaI, dVDeltaI = dTPosF, dYDeltaF, dVDeltaF dTPosI, dYDeltaI, dVDeltaI = dTPosF, dYDeltaF, dVDeltaF
EMC.YDELTA = EMC.YDELTANEXT
EMC.VDELTA = EMC.VDELTANEXT
-- SECONDO CASO -> SCAMBIO DIRETTO : Y IN POSIZIONE FINALE -- SECONDO CASO -> SCAMBIO DIRETTO : Y IN POSIZIONE FINALE
-- Y può andare in posizione direttamente se : -- Y può andare in posizione direttamente se :
@@ -1741,7 +1708,9 @@ function SpecAdjustCarriages( vCmd, dTPosI, dYDeltaI, dVDeltaI, dTPosF, dYDeltaF
-- * deve effettivamente spostarsi -- * deve effettivamente spostarsi
-- * non si arriva da gestione passo del pellegrino -- * non si arriva da gestione passo del pellegrino
-- * se riesce a raggiungere la posizione con le corse a disposizione per come sono posizionate le morse attualmente -- * se riesce a raggiungere la posizione con le corse a disposizione per come sono posizionate le morse attualmente
elseif ( dYDeltaF - dVDeltaI) + 10 * GEO.EPS_SMALL >= MyMinY - MaxV and abs( dYDeltaF - dYDeltaI) > 10 * GEO.EPS_SMALL and not EMC.PILGRIMSTEP and elseif ( dYDeltaF - dVDeltaI) + 10 * GEO.EPS_SMALL >= MyMinY - MaxV and
( abs( dYDeltaF - dYDeltaI) > 10 * GEO.EPS_SMALL or not EMC.YDELTA) and
not EMC.PILGRIMSTEP and
( dYDeltaF - dYDeltaI < MaxY - dYPosI + MaxV - dVPosI) then ( dYDeltaF - dYDeltaI < MaxY - dYPosI + MaxV - dVPosI) then
table.insert( vCmd, { 0, 'Direct-Y-V'}) table.insert( vCmd, { 0, 'Direct-Y-V'})
-- se l'altra morsa non era in presa, vado a pinzare il pezzo -- se l'altra morsa non era in presa, vado a pinzare il pezzo
@@ -1768,6 +1737,18 @@ function SpecAdjustCarriages( vCmd, dTPosI, dYDeltaI, dVDeltaI, dTPosF, dYDeltaF
-- se spostamento verso il carico -- se spostamento verso il carico
elseif ( dYPosI + ( dYDeltaF - dYDeltaI)) > MaxY then elseif ( dYPosI + ( dYDeltaF - dYDeltaI)) > MaxY then
dBeamMove = -( dYPosI + ( dYDeltaF - dYDeltaI) - MaxY) dBeamMove = -( dYPosI + ( dYDeltaF - dYDeltaI) - MaxY)
-- se è FASTCLAMPING attivo, si suddivide il movimento
elseif BD.FASTCLAMPING then
-- se la trave si sposta dal carico verso lo scarico
if dTPosI - dTPosF > 0 then
dBeamMove = max( ( dTPosF - dTPosI), ( MinV - dVPosI), ( dYDeltaI - dYDeltaF))
else
dBeamMove = min( ( dTPosF - dTPosI), ( MaxV - dVPosI))
end
dBeamMove = dBeamMove / 2
-- altrimenti la trave resta ferma e la pinza 1 va in presa (si limita lo scivolamento del pezzo)
else
;
end end
-- se serve un grande spostamento e si sta pinzando poco. V trascinatore pinza poco e Y si sposta per prima per recuperare -- se serve un grande spostamento e si sta pinzando poco. V trascinatore pinza poco e Y si sposta per prima per recuperare
@@ -1841,6 +1822,8 @@ function SpecAdjustCarriages( vCmd, dTPosI, dYDeltaI, dVDeltaI, dTPosF, dYDeltaF
end end
-- movimento terminato -- movimento terminato
dTPosI, dYDeltaI, dVDeltaI = dTPosF, dYDeltaF, dVDeltaF dTPosI, dYDeltaI, dVDeltaI = dTPosF, dYDeltaF, dVDeltaF
EMC.YDELTA = EMC.YDELTANEXT
EMC.VDELTA = EMC.VDELTANEXT
-- TERZO CASO -> PASSO DEL PELLEGRINO -- TERZO CASO -> PASSO DEL PELLEGRINO
-- non è possibile fare scambio diretto. -- non è possibile fare scambio diretto.
@@ -1880,8 +1863,8 @@ function SpecAdjustCarriages( vCmd, dTPosI, dYDeltaI, dVDeltaI, dTPosF, dYDeltaF
dTPosI = dTPosA dTPosI = dTPosA
dYPosI = dYPosA dYPosI = dYPosA
dVPosI = dVPosA dVPosI = dVPosA
dMaxMovePilgrimStepDoubleClamp = MaxY - MinY - MinV + MaxV dMaxMovePilgrimStepDoubleClamp = MaxY - MyMinY - MinV + MaxV
dMaxMovePilgrimStepSingleClampY = MaxY - MinY dMaxMovePilgrimStepSingleClampY = MaxY - MyMinY
dMaxMovePilgrimStepSingleClampV = - MinV + MaxV dMaxMovePilgrimStepSingleClampV = - MinV + MaxV
end end
@@ -1889,6 +1872,7 @@ function SpecAdjustCarriages( vCmd, dTPosI, dYDeltaI, dVDeltaI, dTPosF, dYDeltaF
dDeltaBeam = dTPosI - dTPosF dDeltaBeam = dTPosI - dTPosF
-- a questo punto entrambe le pinze sono in presa sul pezzo. -- a questo punto entrambe le pinze sono in presa sul pezzo.
-- trave si muove dal carico allo scarico
-- Il trascinatore si decide in base alla direzione di movimento trave -- Il trascinatore si decide in base alla direzione di movimento trave
-- trascino con morsa allo scarico. Obiettivo mandare Y in posizione per prima -- trascino con morsa allo scarico. Obiettivo mandare Y in posizione per prima
if dDeltaBeam > 0 then if dDeltaBeam > 0 then
@@ -1931,18 +1915,20 @@ function SpecAdjustCarriages( vCmd, dTPosI, dYDeltaI, dVDeltaI, dTPosF, dYDeltaF
-- mi serve riposizonare di nuovo, quindi richiamo funzione in modo ricorsivo -- mi serve riposizonare di nuovo, quindi richiamo funzione in modo ricorsivo
SpecAdjustCarriages( vCmd, dTPosI, dYDeltaI, dVDeltaI, dTPosF, dYDeltaF, dVDeltaF, bFixedDelta, bFixedPos) SpecAdjustCarriages( vCmd, dTPosI, dYDeltaI, dVDeltaI, dTPosF, dYDeltaF, dVDeltaF, bFixedDelta, bFixedPos)
-- recupero una corsa massima e l'altra solo di quello che serve -- recupero una corsa massima e l'altra solo di quello che serve
elseif abs( dYDeltaI - dYDeltaF) > dMaxMovePilgrimStepSingleClampY then elseif abs( dYDeltaI - dYDeltaF) > dMaxMovePilgrimStepSingleClampV then
-- suddivido il movimento su entrambe le morse
local dTotMove = ( ( dYDeltaF + dVDeltaF) / 2 + ( dYDeltaI + dVDeltaI) / 2) / 2
-- morsa Y arriva in posizione finale -- morsa Y arriva in posizione finale
dYDeltaI = dYDeltaF dVPosA = EgtClamp( MaxV - dTotMove, MaxV, MinV)
dVPosA = MinV dTPosA = dTPosI - dVPosI + dVPosA
dTPosA = dTPosI - dVPosI + MinV
dYPosA = dYDeltaF + dTPosA dYPosA = dYDeltaF + dTPosA
table.insert( vCmd, { 3, 'Y', dYPosA , 'T', dTPosA, 'V', dVPosA}) table.insert( vCmd, { 3, 'Y', dYPosA , 'T', dTPosA, 'V', dVPosA})
table.insert( vCmd, { 11, CalcCharStatus( 'Y', dYDeltaF)}) table.insert( vCmd, { 11, CalcCharStatus( 'Y', dYDeltaF)})
table.insert( vCmd, { 12, 0}) table.insert( vCmd, { 12, 0})
dYDeltaI = dYDeltaF
dTPosI = dTPosA dTPosI = dTPosA
EMC.YDELTA = dYDeltaF EMC.YDELTA = dYDeltaF
EMC.VDELTA = dVDeltaI EMC.VDELTA = nil
-- mi serve riposizonare di nuovo, quindi richiamo funzione in modo ricorsivo -- mi serve riposizonare di nuovo, quindi richiamo funzione in modo ricorsivo
SpecAdjustCarriages( vCmd, dTPosI, dYDeltaI, dVDeltaI, dTPosF, dYDeltaF, dVDeltaF, bFixedDelta, bFixedPos) SpecAdjustCarriages( vCmd, dTPosI, dYDeltaI, dVDeltaI, dTPosF, dYDeltaF, dVDeltaF, bFixedDelta, bFixedPos)
-- non serve recuperare al massimo della corsa, suddivido movimento in due -- non serve recuperare al massimo della corsa, suddivido movimento in due
@@ -1976,9 +1962,8 @@ function SpecAdjustCarriages( vCmd, dTPosI, dYDeltaI, dVDeltaI, dTPosF, dYDeltaF
end end
table.insert( vCmd, { 3, 'Y', dYPosA , 'T', dTPosA, 'V', dVPosA}) table.insert( vCmd, { 3, 'Y', dYPosA , 'T', dTPosA, 'V', dVPosA})
dTPosI, dYDeltaI, dVDeltaI = dTPosF, dYDeltaF, dVDeltaF dTPosI, dYDeltaI, dVDeltaI = dTPosF, dYDeltaF, dVDeltaF
EMC.YDELTA = EMC.YDELTANEXT
-- aggiorno nuova posizione della morsa allo scarico dopo riposizionamento EMC.VDELTA = EMC.VDELTANEXT
dVDeltaI = dVDeltaF
end end
-- imposto i nuovi parametri di aggancio -- imposto i nuovi parametri di aggancio
@@ -2037,17 +2022,19 @@ function SpecAdjustCarriages( vCmd, dTPosI, dYDeltaI, dVDeltaI, dTPosF, dYDeltaF
-- mi serve riposizonare di nuovo, quindi richiamo funzione in modo ricorsivo -- mi serve riposizonare di nuovo, quindi richiamo funzione in modo ricorsivo
SpecAdjustCarriages( vCmd, dTPosI, dYDeltaI, dVDeltaI, dTPosF, dYDeltaF, dVDeltaF, bFixedDelta, bFixedPos) SpecAdjustCarriages( vCmd, dTPosI, dYDeltaI, dVDeltaI, dTPosF, dYDeltaF, dVDeltaF, bFixedDelta, bFixedPos)
-- recupero una corsa massima e l'altra solo di quello che serve -- recupero una corsa massima e l'altra solo di quello che serve
elseif abs( dVDeltaI - dVDeltaF) > dMaxMovePilgrimStepSingleClampV then elseif abs( dVDeltaI - dVDeltaF) > dMaxMovePilgrimStepSingleClampY then
-- aggiorno nuova posizione della morsa al carico dopo riposizionamento -- suddivido il movimento su entrambe le morse
dVDeltaI = dVDeltaF local dTotMove = ( ( dYDeltaF + dVDeltaF) / 2 + ( dYDeltaI + dVDeltaI) / 2) / 2
dYPosA = MaxY -- morsa V arriva in posizione finale
dTPosA = dTPosI + ( MaxY - dYPosI) dYPosA = EgtClamp( MinY + dTotMove, MinY, MaxY)
dTPosA = dTPosI - dYPosI + dYPosA
dVPosA = dVDeltaF + dTPosA dVPosA = dVDeltaF + dTPosA
table.insert( vCmd, { 3, 'Y', dYPosA , 'T', dTPosA, 'V', dVPosA}) table.insert( vCmd, { 3, 'Y', dYPosA , 'T', dTPosA, 'V', dVPosA})
table.insert( vCmd, { 12, CalcCharStatus( 'V', dVDeltaF)}) table.insert( vCmd, { 12, CalcCharStatus( 'V', dVDeltaF)})
table.insert( vCmd, { 11, 0}) table.insert( vCmd, { 11, 0})
dVDeltaI = dVDeltaF
dTPosI = dTPosA dTPosI = dTPosA
EMC.YDELTA = dYDeltaI EMC.YDELTA = nil
EMC.VDELTA = dVDeltaF EMC.VDELTA = dVDeltaF
-- mi serve riposizonare di nuovo, quindi richiamo funzione in modo ricorsivo -- mi serve riposizonare di nuovo, quindi richiamo funzione in modo ricorsivo
SpecAdjustCarriages( vCmd, dTPosI, dYDeltaI, dVDeltaI, dTPosF, dYDeltaF, dVDeltaF, bFixedDelta, bFixedPos) SpecAdjustCarriages( vCmd, dTPosI, dYDeltaI, dVDeltaI, dTPosF, dYDeltaF, dVDeltaF, bFixedDelta, bFixedPos)
@@ -2082,9 +2069,8 @@ function SpecAdjustCarriages( vCmd, dTPosI, dYDeltaI, dVDeltaI, dTPosF, dYDeltaF
end end
table.insert( vCmd, { 3, 'Y', dYPosA , 'T', dTPosA, 'V', dVPosA}) table.insert( vCmd, { 3, 'Y', dYPosA , 'T', dTPosA, 'V', dVPosA})
dTPosI, dYDeltaI, dVDeltaI = dTPosF, dYDeltaF, dVDeltaF dTPosI, dYDeltaI, dVDeltaI = dTPosF, dYDeltaF, dVDeltaF
EMC.YDELTA = EMC.YDELTANEXT
-- aggiorno nuova posizione della morsa al carico dopo riposizionamento EMC.VDELTA = EMC.VDELTANEXT
dYDeltaI = dYDeltaF
end end
-- imposto i nuovi parametri di aggancio -- imposto i nuovi parametri di aggancio
+1
View File
@@ -76,6 +76,7 @@ SurfFinishing=1
[5AxMilling] [5AxMilling]
5AxScript1=5AxProject 5AxScript1=5AxProject
5AxScript2=5AxPocketProject 5AxScript2=5AxPocketProject
5AxScript3=5AxCylProject
[Machining] [Machining]
InitScript=InitMach.lua InitScript=InitMach.lua
+341 -99
View File
@@ -24,10 +24,10 @@
require( 'EmtGenerator') require( 'EmtGenerator')
EgtEnableDebug( false) EgtEnableDebug( false)
PP_VER = '2.7a3_DEV1' PP_VER = '3.1d2'
PP_NVER = '2.7.1.3' PP_NVER = '3.1.4.2'
MIN_MACH_VER = '2.5k1' MIN_MACH_VER = '2.7j1'
MACH_NAME = 'Essetre-FAST' MACH_NAME = EgtGetCurrMachineName()
-- Carico i dati globali -- Carico i dati globali
local sMachDir = EgtGetCurrMachineDir() local sMachDir = EgtGetCurrMachineDir()
@@ -46,7 +46,7 @@ end
EgtOutLog ( '** ' .. MACH_NAME..' '..PP_VER..' ** ( '..INFO_STD_PP.NAME..': '..INFO_STD_PP.VERSION..' - MinMach: '.. MIN_MACH_VER ..') **', 1) EgtOutLog ( '** ' .. MACH_NAME..' '..PP_VER..' ** ( '..INFO_STD_PP.NAME..': '..INFO_STD_PP.VERSION..' - MinMach: '.. MIN_MACH_VER ..') **', 1)
-- Parametri macchina -- Parametri macchina
NumericalControl = 'TPA' -- NUM o TPA o NUM_PLUS NumericalControl = 'TPA' -- NUM o TPA o NUM_PLUS
MinX = 0 MinX = 0
MaxX = 1350 MaxX = 1350
MinZ = -1350 MinZ = -1350
@@ -65,6 +65,7 @@ LoadT = 1454.2
UnloadT = -1700 UnloadT = -1700
MaxOpen = 305 MaxOpen = 305
MillOffs = 177.35 MillOffs = 177.35
DistRotCenterBToTopC = 403 -- distanza tra il centro di rotazione del mandrino B e la mensola C
SawOffs = -242.68 SawOffs = -242.68
SawBOffs = 0 SawBOffs = 0
SawCOffs = 0 SawCOffs = 0
@@ -75,7 +76,7 @@ AngTrBHOffs = 154.5
AngTrBHLen = 90 AngTrBHLen = 90
TurnerOffs = 200.0 TurnerOffs = 200.0
DeltaTabY = 898.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 DimTabY = 400
DimTabX = 34000 DimTabX = 34000
LenToPress = 900 LenToPress = 900
@@ -86,11 +87,25 @@ DefTcPos = 'T2'
SecondSupport = 0 SecondSupport = 0
SpecialBH = false SpecialBH = false
MaxUnloadLen = 0 MaxUnloadLen = 0
BeamHeightForFixRot = 9999 -- per abilitare assegnare 500 BeamHeightForFixRot = 9999 -- per abilitare assegnare 500
NewTopC = true NewTopC = true
SafeXRotAxes = 150 SafeXRotAxes = 150
AggreBlockHaus = false AggreBlockHaus = false
SecondToolChanger = false
EstimationRapidMultiplier = 1 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
-- costanti dimensioni utensili
LONG_TOOL_MINLEN = 218.5
BIG_TOOL_DIAM = 300
-- leggo e aggiorno con parametri da BeamData -- leggo e aggiorno con parametri da BeamData
if BD then if BD then
@@ -152,18 +167,36 @@ if EgtExistsFile( sData) then
if Machine.Offsets.NOULOAD then MaxUnloadLen = Machine.Offsets.NOULOAD 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.DEFTCPOS then DefTcPos = ( 'T' .. Machine.Offsets.DEFTCPOS) end
if Machine.Offsets.WOOD_DENSITY then WoodDensity = Machine.Offsets.WOOD_DENSITY end if Machine.Offsets.WOOD_DENSITY then WoodDensity = Machine.Offsets.WOOD_DENSITY end
if Machine.Offsets.MIN_JOIN_VV then MinJoinVV = Machine.Offsets.MIN_JOIN_VV 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 = Machine.Offsets.MIN_JOIN_SS 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 = Machine.Offsets.MIN_JOIN_LS 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 = Machine.Offsets.MIN_JOIN_SL 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 = Machine.Offsets.MIN_JOIN_LL 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.NEWTOPC then NewTopC = ( Machine.Offsets.NEWTOPC == 1) end
if Machine.Offsets.AGGRE_BH then AggreBlockHaus = ( Machine.Offsets.AGGRE_BH == 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.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 end
end end
if SpecialBH then SecondSupport = 0 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 { EmtGeneral {
File='Essetre-FAST.nge', File='Essetre-FAST.nge',
@@ -178,7 +211,20 @@ EmtGeneral {
local BaseId = EmtBase { local BaseId = EmtBase {
Name = 'Base', Name = 'Base',
Geo='BASE/GEO', 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 { local XId = EmtAxis {
Name = 'X', Name = 'X',
Parent = 'Base', Parent = 'Base',
@@ -209,25 +255,29 @@ local CId = EmtAxis {
Stroke = {MinC, MaxC}, Stroke = {MinC, MaxC},
Home = 0, Home = 0,
Geo = 'C_AXIS/GEO', Geo = 'C_AXIS/GEO',
Aux = {'C_AXIS/SOLID', 'C_AXIS/COLLISION'}} Aux = {'C_AXIS/SOLID', 'C_AXIS/COLLISION', 'C_AXIS/COLLISION2'}}
if NewTopC then
local vtMove = Vector3d( 65,0,0) -- Imposto i vettori di movimento separatamente se sono presenti le variabili di riferimento
local SolidArmId = EgtGetFirstNameInGroup( EgtGetFirstNameInGroup( CId, 'SOLID'), 'ARM') local vtXMove = Vector3d( EgtIf( NewTopC, 65, 0), 0, 0)
if EgtSurfTmMoveFacet then -- si prende la minima distanza tra DistRotCenterBToTopC e LONG_TOOL_MINLEN + pivot (comunque distanza minima 403)
EgtSurfTmMoveFacet( SolidArmId, 11, vtMove, GDB_RT.GLOB) local dZMove = max( 403, min( ( MillOffs + LONG_TOOL_MINLEN + 5), DistRotCenterBToTopC)) - 400
else local vtZMove = Vector3d( 0, 0, dZMove)
EgtSurfTmMoveVertex( SolidArmId, 23, EgtSurfTmGetVertex( SolidArmId, 23, GDB_RT.GLOB) + vtMove, GDB_RT.GLOB) -- Muove le facce in X e Z del solido principale
EgtSurfTmMoveVertex( SolidArmId, 25, EgtSurfTmGetVertex( SolidArmId, 25, GDB_RT.GLOB) + vtMove, GDB_RT.GLOB) local SolidArmId = EgtGetFirstNameInGroup( EgtGetFirstNameInGroup( CId, 'SOLID'), 'ARM')
EgtSurfTmMoveVertex( SolidArmId, 35, EgtSurfTmGetVertex( SolidArmId, 35, GDB_RT.GLOB) + vtMove, GDB_RT.GLOB) EgtSurfTmMoveFacet( SolidArmId, 14, vtZMove, GDB_RT.GLOB)
EgtSurfTmMoveVertex( SolidArmId, 36, EgtSurfTmGetVertex( SolidArmId, 36, GDB_RT.GLOB) + vtMove, GDB_RT.GLOB) EgtSurfTmMoveFacet( SolidArmId, 11, vtXMove, GDB_RT.GLOB)
end -- 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') local CollTopId = EgtGetFirstNameInGroup( EgtGetFirstNameInGroup( CId, 'COLLISION'), 'TOP')
EgtMove( CollTopId, vtMove, GDB_RT.GLOB) EgtMove( CollTopId, vtXMove, GDB_RT.GLOB)
EgtSetName( CollTopId, 'BOX') EgtSurfTmMoveFacet( CollTopId, 4, vtZMove, GDB_RT.GLOB)
else EgtSetName( CollTopId, 'BOX')
local CollTopId = EgtGetFirstNameInGroup( EgtGetFirstNameInGroup( CId, 'COLLISION'), 'TOP') -- Imposta nel Frame di riferimento l'info "CollSkip"
EgtSetName( CollTopId, 'BOX') local RefId = CollTopId + EgtGetInfo( CollTopId, 'Frame', 'i')
end 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 { EmtAxis {
Name = 'B', Name = 'B',
Parent = 'C', Parent = 'C',
@@ -338,6 +388,7 @@ if AggreBlockHaus then
Geo = 'H7_HEAD/GEO', Geo = 'H7_HEAD/GEO',
Aux = {'H7_HEAD/SOLID', 'H7_HEAD/COLLISION'}} Aux = {'H7_HEAD/SOLID', 'H7_HEAD/COLLISION'}}
end end
-- Morse -- Morse
local YId = EmtAxis { local YId = EmtAxis {
Name = 'Y', Name = 'Y',
@@ -358,7 +409,7 @@ local PYId = EmtAxis {
Stroke = { 0, MaxOpen}, Stroke = { 0, MaxOpen},
Home = MaxOpen, Home = MaxOpen,
Geo = 'PY_AXIS/GEO', 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 { local VId = EmtAxis {
Name = 'V', Name = 'V',
Parent = 'Base', Parent = 'Base',
@@ -378,7 +429,7 @@ local PVId = EmtAxis {
Stroke = { 0, MaxOpen}, Stroke = { 0, MaxOpen},
Home = MaxOpen, Home = MaxOpen,
Geo = 'PV_AXIS/GEO', Geo = 'PV_AXIS/GEO',
Aux = {'PV_AXIS/SOLID', 'PV_AXIS/COLLISION'}} Aux = {'PV_AXIS/SOLID', 'PV_AXIS/COLLISION', 'PV_AXIS/CLAMP_CHECK'}}
EmtAxis { EmtAxis {
Name = 'T', Name = 'T',
Parent = 'Base', Parent = 'Base',
@@ -468,50 +519,138 @@ EmtTcPos {
TDir = -X_AX(), TDir = -X_AX(),
ADir = -Y_AX(), ADir = -Y_AX(),
Geo = 'BASE/T10'} Geo = 'BASE/T10'}
EmtTcPos { if AggreBlockHaus then
Name = 'T11', local TcpSsId = EmtTcPos {
Parent = 'Base', Name = 'T11',
Pos = Point3d( 523.8, 88.0, -877.5),
TDir = -X_AX(),
ADir = -Y_AX(),
Geo = 'BASE/T11'}
if not SpecialBH then
EmtTcPos {
Name = 'T101',
Parent = 'Base', Parent = 'Base',
Pos = Point3d( -510.4, 113.2, -160.8), Pos = Point3d( 678.3, -1.963, -877.5),
TDir = X_AX(), TDir = Y_AX(),
ADir = Z_AX(), ADir = -X_AX(),
Geo = 'BASE/T101'} Geo = 'BASE/T121',
Aux = 'BASE/T121_HS'}
else else
EmtTcPos { EmtTcPos {
Name = 'T101', Name = 'T11',
Parent = 'Base', Parent = 'Base',
Pos = Point3d( -510.4, 113.2, -1160.8), Pos = Point3d( 523.8, 88.0, -877.5),
TDir = X_AX(), TDir = -X_AX(),
ADir = Z_AX(), ADir = -Y_AX(),
Geo = 'BASE/T101S'} Geo = 'BASE/T11'}
end end
if SecondSupport == 1 then
-- supporto per punta -- ToolChanger 2
if SecondToolChanger then
EmtTcPos { EmtTcPos {
Name = 'T111', Name = 'T21',
Parent = 'Base', Parent = 'Base',
Pos = Point3d( -510.4, 113.2, -329.8), Pos = Point3d( -503.2, 88.0, 172.5),
TDir = Z_AX(), TDir = X_AX(),
ADir = X_AX(), ADir = -Y_AX(),
Geo = 'BASE/T111'} Geo = 'BASE/T21'}
elseif SecondSupport == 2 then EmtTcPos {
-- supporto per mortasatrice 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 { local TcpSsId = EmtTcPos {
Name = 'T111', Name = 'T101',
Parent = 'Base', Parent = 'Base',
Pos = Point3d( -510.4, 113.2, -430.8), Pos = Point3d( -510.4, 113.2, -1160.8),
TDir = X_AX(), TDir = X_AX(),
ADir = Z_AX(), ADir = Z_AX(),
Geo = 'BASE/T111M'} Geo = 'BASE/T101S'}
EgtSetInfo( TcpSsId, 'Mortiser', true) -- spostamento in caso di magazzino 2
elseif SecondSupport == 3 then if SecondToolChanger then
EgtMove( TcpSsId, Vector3d( 0, 0, 140), GDB_RT.GLOB)
end
end
if SecondSupport == 3 then
-- supporto per rinvio angolare -- supporto per rinvio angolare
local TcpSsId = EmtTcPos { local TcpSsId = EmtTcPos {
Name = 'T91', Name = 'T91',
@@ -524,26 +663,9 @@ elseif SecondSupport == 3 then
ADir = Z_AX(), ADir = Z_AX(),
Geo = 'BASE/T91', Geo = 'BASE/T91',
Aux = 'BASE/T91_HS'} Aux = 'BASE/T91_HS'}
end if SecondToolChanger then
if SpecialBH then EgtMove( TcpSsId, Vector3d( 0, 0, -900), GDB_RT.GLOB)
EmtTcPos { end
Name = 'T111',
Parent = 'Base',
Pos = Point3d( -810.4, 113.2, -329.8),
TDir = Y_AX(),
ADir = X_AX(),
Geo = 'BASE/T111S'}
end
if AggreBlockHaus then
local TcpSsId = EmtTcPos {
Name = 'T121',
Parent = 'Base',
Pos = Point3d( 678.3, -1.963, -877.5),
TDir = Y_AX(),
ADir = -X_AX(),
Geo = 'BASE/T121',
Aux = 'BASE/T121_HS'}
end end
-- Aggiusto posizioni geometriche -- Aggiusto posizioni geometriche
@@ -557,10 +679,12 @@ EgtMove( EgtGetFirstNameInGroup( YId, 'SOLID'), vtMove, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( YId, 'COLLISION'), vtMove, GDB_RT.GLOB) EgtMove( EgtGetFirstNameInGroup( YId, 'COLLISION'), vtMove, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( PYId, 'SOLID'), vtMove, GDB_RT.GLOB) EgtMove( EgtGetFirstNameInGroup( PYId, 'SOLID'), vtMove, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( PYId, 'COLLISION'), 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, 'SOLID'), vtMove, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( VId, 'COLLISION'), vtMove, GDB_RT.GLOB) EgtMove( EgtGetFirstNameInGroup( VId, 'COLLISION'), vtMove, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( PVId, 'SOLID'), vtMove, GDB_RT.GLOB) EgtMove( EgtGetFirstNameInGroup( PVId, 'SOLID'), vtMove, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( PVId, 'COLLISION'), 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) EgtMove( EgtGetFirstNameInGroup( XId, 'SOLID'), vtMoveX, GDB_RT.GLOB)
-- Assegno identificativi alle spie delle morse -- Assegno identificativi alle spie delle morse
@@ -575,28 +699,49 @@ PVLightId = EgtGetFirstNameInGroup( EgtGetFirstNameInGroup( PVId, 'SOLID') or GD
--------------------------------------------------------------------- ---------------------------------------------------------------------
function OnSetHead() function OnSetHead()
-- se testa lama -- se testa lama
if EMC.HEAD == 'H2' then if EMC.HEAD == 'H1' then
EmtModifyAxisDirection( 'B', VectorFromRotated( X_AX(), Z_AX(), -SawCOffs)) if EMC.TOTLEN and EMC.TOTLEN < LONG_TOOL_MINLEN then
-- altrimenti EmtModifyAxisStroke( 'B', {MinB, MaxB})
else
EmtModifyAxisStroke( 'B', {-140, 140})
end
else else
EmtModifyAxisDirection( 'B', X_AX()) EmtModifyAxisStroke( 'B', {MinB, MaxB})
if EMC.HEAD == 'H3' then if EMC.HEAD == 'H2' then
local dDist = EgtIf( EMC.DIST and abs( EMC.DIST) > 1, EMC.DIST, ChSawLen) EmtModifyAxisDirection( 'B', VectorFromRotated( X_AX(), Z_AX(), -SawCOffs))
EmtModifyExitPosition( EMC.HEAD, EMC.EXIT, Point3d( 0, 0, -dDist)) -- altrimenti
if not EMC.VER or EMC.VER < '2.5h2' then else
local vtMove = Point3d( 0, 0, -dDist) - Point3d( EMC.EXITPOS) EmtModifyAxisDirection( 'B', X_AX())
local ExitId = EgtGetFirstNameInGroup( EgtGetHeadId( EMC.HEAD), 'T'..tostring( EMC.EXIT)) if EMC.HEAD == 'H3' then
EgtMove( ExitId, vtMove) 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
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 -- Funzione per impostare spia stato morsa carrello Y
function SetPYLight( bClosed) function SetPYLight( bClosed)
if not PYLightId then return end if not PYLightId then return end
EgtSetColor( PYLightId, EgtIf( bClosed, 'RED', 'LIME')) EgtSetColor( PYLightId, EgtIf( bClosed, 'RED', 'LIME'))
if bClosed then if bClosed then
EgtSetInfo( PYLightId, 'On', '1') EgtSetInfo( PYLightId, 'On', '1')
else else
@@ -630,6 +775,52 @@ function GetPVLight()
return ( EgtGetInfo( PVLightId, 'On') == '1') return ( EgtGetInfo( PVLightId, 'On') == '1')
end 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 -- Funzione per resettare tutte le attivazioni della macchina
function OnResetMachine() function OnResetMachine()
@@ -637,6 +828,7 @@ function OnResetMachine()
EmtUnlinkAllFixturesFromGroups() EmtUnlinkAllFixturesFromGroups()
SetPYLight( false) SetPYLight( false)
SetPVLight( false) SetPVLight( false)
SetFloatPos( 'H1', 0)
-- nascondo Vmill -- nascondo Vmill
local nRawId = EgtGetFirstRawPart() local nRawId = EgtGetFirstRawPart()
while nRawId do while nRawId do
@@ -650,3 +842,53 @@ function OnResetMachine()
end end
EgtSetStatus( EgtGetFirstNameInGroup( GDB_ID.ROOT, 'VMill') or GDB_ID.NULL, GDB_ST.OFF) EgtSetStatus( EgtGetFirstNameInGroup( GDB_ID.ROOT, 'VMill') or GDB_ID.NULL, GDB_ST.OFF)
end 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.
+39 -20
View File
@@ -7,42 +7,61 @@
[Sawing] [Sawing]
[Milling] [Milling]
0=d,MaxElev,0 0=l,MaxElev,0
1=d,OutRaw,0 1=d,OutRaw,0
2=d,SideElev,0 2=l,SideElev,0
3=d,TrimExt,0 3=d,TrimExt,0
4=sr,VtFaceUse,0,0,0 4=s,VtFaceUse,0,0,0
5=s,EdgesFaceUse,0
[Pocketing] [Pocketing]
0=d,MaxElev,0 0=l,MaxElev,0
1=b,Open,0 1=b,Open,0
2=d,OpenMinSave,0 2=d,OpenMinSafe,0
3=d,OpenOutRaw,0 3=d,OpenOutRaw,0
4=d,MaxOptSize,0 4=l,MaxOptSize,0
5=b,AdjustFeed,1
[Mortising] [Mortising]
0=d,MaxElev,0 0=l,MaxElev,0
[Chiseling] [Chiseling]
[SawRoughing]
[SawFinishing]
[GenMachining] [GenMachining]
[SurfRoughing] [SurfRoughing]
0=l,MaxElev,0
1=b,PlaneZ,0
2=i,Order,[0=ByPlane;1=ByDepth]
[SurfFinishing] [SurfFinishing]
0=b,SkipMaxDown,1 0=b,SkipMaxDown,1
1=i,OptimalType,[0=ZigZag;2=SpiralIn;3=SpiralOut]
2=d,SplitAngle,45
3=d,AngleTol,5
[5AxMilling] [5AxMilling]
0=l,LinTol,0.01 0=s,VtAuxDir,0,1,0
1=l,MaxLen,10 1=l,LinTol,0.01
2=s,Type,ZigZag 2=l,MaxLen,10
3=d,SideAng,90 3=i,ProjType,[0=MinDist;1=FixedDir;2=Guide]
4=l,Step,10 4=i,PocketType,[0=ZigZag;2=SpiralIn;3=SpiralOut]
5=l,OffsProj,0 5=d,PocketAng,0
6=l,LiTang,0 6=d,SideAng,90
7=l,LiOrth,0 7=d,LeadAng,0
8=l,LiElev,0 8=l,Step,10
9=l,LoTang,0 9=d,AngIni,-90
10=l,LoOrth,0 10=d,AngFin,90
11=l,LoElev,0 11=l,LiTang,0
12=b,DirFromGuide,1 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
+30 -15
View File
@@ -24,9 +24,7 @@ local INVALIDPOS = ""
local POS = "Pos" local POS = "Pos"
-- Geom Set -- Geom Set
local GS = {} local GS = {{"H1", "H7"}}
local bAggreBlockHaus = ( EgtGetHeadId( 'H7') ~= nil)
-- Configurazione posizioni -- Configurazione posizioni
local PositionTable={{Pos = "Pos1", TcPos = "T1", Head = "H1", Group = "G1"}, local PositionTable={{Pos = "Pos1", TcPos = "T1", Head = "H1", Group = "G1"},
@@ -39,23 +37,40 @@ local PositionTable={{Pos = "Pos1", TcPos = "T1", Head = "H1", Group = "G1"},
{Pos = "Pos8", TcPos = "T8", Head = "H1", Group = "G1"}, {Pos = "Pos8", TcPos = "T8", Head = "H1", Group = "G1"},
{Pos = "Pos9", TcPos = "T9", Head = "H1", Group = "G1"}, {Pos = "Pos9", TcPos = "T9", Head = "H1", Group = "G1"},
{Pos = "Pos10", TcPos = "T10", Head = "H1", Group = "G1"}, {Pos = "Pos10", TcPos = "T10", Head = "H1", Group = "G1"},
{Pos = "Pos11", TcPos = EgtIf( bAggreBlockHaus, "T121", "T11"), Head = EgtIf( bAggreBlockHaus, "H7", "H1"), Group = "G1"}, {Pos = "Pos11", TcPos = "T11", Head = "H1", Group = "G1"},
{Pos = "Pos12", TcPos = "T42", Head = "H2", Group = "G1"}, {Pos = "Pos12", TcPos = "T42", Head = "H2", Group = "G1"},
{Pos = "Pos13", TcPos = "T101", Head = "H3", Group = "G2"}} {Pos = "Pos13", TcPos = "T101", Head = "H3", Group = "G2"}}
local SecSuppId = EgtGetTcPosId( 'T111')
if SecSuppId then local IsTC2Active = ( EgtGetFirstNameInGroup( EgtGetBaseId( 'Base'), 'TC2') ~= nil)
local bMortiser = EgtGetInfo( SecSuppId, 'Mortiser', 'b') if IsTC2Active then
if bMortiser then local PositionTableTC2={{Pos = "Pos14", TcPos = "T21", Head = "H1", Group = "G3"},
table.insert( PositionTable, {Pos = "Pos14", TcPos = "T111", Head = "H3", Group = "G2"}) {Pos = "Pos15", TcPos = "T22", Head = "H1", Group = "G3"},
else {Pos = "Pos16", TcPos = "T23", Head = "H1", Group = "G3"},
table.insert( PositionTable, {Pos = "Pos14", TcPos = "T111", Head = "H1", Group = "G2"}) {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
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) local function IsInGeomSet( ToolHead, PosHead)
for GsIndex = 1, #GS do for GsIndex = 1, #GS do
Binary file not shown.
Binary file not shown.
Binary file not shown.
+18 -16
View File
@@ -6,36 +6,38 @@
[DRILL_STD] [DRILL_STD]
0=th,TH, 0=th,TH,
1=d,STEP 1=l,STEP
2=s,DOUBLE 2=tl,DOUBLE
[SAW_STD] [SAW_STD]
0=th,TH, 0=th,TH,
1=d,STEP 1=l,STEP
2=d,SIDESTEP 2=l,SIDESTEP
3=b,LONGCUT 3=b,LONGCUT
[SAW_FLAT] [SAW_FLAT]
0=th,TH, 0=th,TH,
1=d,STEP 1=l,STEP
2=d,SIDESTEP 2=l,SIDESTEP
3=b,LONGCUT 3=b,LONGCUT
[MILL_STD] [MILL_STD]
0=th,TH, 0=th,TH,
1=d,STEP 1=l,STEP
2=d,SIDESTEP 2=l,SIDESTEP
3=d,SIDEDEPTH 3=l,SIDEDEPTH
4=s,DOUBLE 4=tl,DOUBLE
5=lr,TOOL_OVERHANG
[MILL_NOTIP] [MILL_NOTIP]
0=th,TH, 0=th,TH,
1=d,STEP 1=l,STEP
2=d,SIDESTEP 2=l,SIDESTEP
3=d,SIDEDEPTH 3=l,SIDEDEPTH
4=s,DOUBLE 4=tl,DOUBLE
5=lr,TOOL_OVERHANG
[MORTISE_STD] [MORTISE_STD]
0=b,MORTISE 0=b,MORTISE
1=d,STEP 1=l,STEP
2=d,SIDESTEP 2=l,SIDESTEP
+93 -3
View File
@@ -1,13 +1,103 @@
==== Common_FAST Update Log ==== ==== Common_FAST Update Log ====
Versione 2.7a3 (08/01/2024) 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 - (GEN) Dopo separazione, in NUM_PLUS, si srive EH1 solo se macro G101, perchè altrimenti non è prevista. Ticket#2239
Versione 2.7a2 (08/01/2024) 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. - (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 - (SIM) Aggiunta gestione qualità VMILL da impostazioni macchina
Versione 2.7a1 (07/01/2024) Versione 2.7a1 (07/01/2025)
- (MLDE-SIM-GEN) Nuovo aggregato 90° (H7) per fresa tipo BlockHaus. Ticket#2142 - (MLDE-SIM-GEN) Nuovo aggregato 90° (H7) per fresa tipo BlockHaus. Ticket#2142
- (SIM-GEN) Aumentati limiti massimi di pinzaggio minimo - (SIM-GEN) Aumentati limiti massimi di pinzaggio minimo
+1 -1
View File
@@ -3,7 +3,7 @@
local InfoCommon_STD_PP = { local InfoCommon_STD_PP = {
NAME = 'Common_FAST', -- nome script PP standard NAME = 'Common_FAST', -- nome script PP standard
VERSION = '2.7a3', -- versione script VERSION = '3.1d2', -- versione script
MIN_MACH_VER_PP_COMMON = '2.5k1' -- versione minima kernel MIN_MACH_VER_PP_COMMON = '2.5k1' -- versione minima kernel
} }