Compare commits

..

7 Commits

Author SHA1 Message Date
andrea.villa 1bb49c8cd2 Cambio versione 2025-06-03 17:21:11 +02:00
andrea.villa b8f693a820 Abilitazione parametri per tastatura valida su più lavorazioni 2025-06-03 17:20:30 +02:00
andrea.villa 7ef5beedd1 Rimosso chiamata per Debug 2025-06-03 15:20:25 +02:00
andrea.villa 237bbf989f Cambio versione per rilascio a Essetre 2025-06-03 15:19:22 +02:00
andrea.villa 3f291cc6b5 Scrittura macro tastatura G145 e faccia opportuna in base a direzione utensile 2025-06-03 15:18:46 +02:00
andrea.villa 99459b36d0 Merge remote-tracking branch 'origin/master' into Probing 2025-05-28 12:36:50 +02:00
andrea.villa c3a535de71 - Prima modifiche per gestione Probing
- Aggiunta variabile configurabile da Essetre
- Aggiunto tastatore in modello 3D
- Aggiunta nota su lavorazione per attivazione tastatore
2025-05-28 12:31:30 +02:00
5 changed files with 71 additions and 4 deletions
+34
View File
@@ -442,6 +442,14 @@ function OnMachiningStart()
local MyParkCSawC2 = GetChainSawCHomeFromVirtualAxis( dPosA)
EmtModifyAxisHome( 'C2', MyParkCSawC2)
end
-- gestione eventuale tastatura
local bProbing = EgtGetValInNotes( EMT.MCHUSERNOTES, 'PROBE', 'b') or EgtGetValInNotes( EMT.MCHUSERNOTES, 'START-PROBE', 'b')
if bProbing then
if VerifyToolProbeCompatibility() then
EMT.PROBE = true
EMT.EXECPROBE = true
end
end
-- gestione eventuale lavorazione in doppio
local nDouType = EgtGetValInNotes( EMT.MCHUSERNOTES, 'DOUBLE', 'i')
if nDouType == 2 or nDouType == 3 then
@@ -605,6 +613,16 @@ function OnMachiningEnd()
EMT.PREVTOOL = EMT.TOOL
EMT.PREVHEAD = EMT.HEAD
EMT.PREVTCPOS = EMT.TCPOS
-- se tastatura attiva, si disabilita la tastatura
if EMT.PROBE then
-- gestione eventuale tastatura
local bStopProbing = EgtGetValInNotes( EMT.MCHUSERNOTES, 'PROBE', 'b') or EgtGetValInNotes( EMT.MCHUSERNOTES, 'END-PROBE', 'b')
if bStopProbing then
EmtOutput( 'G145 Z-10 EF7')
EMT.PROBE = nil
end
end
-- se taglio finale, aggiorno lunghezza barra
if EMT.MCHCUT then
EMT.LB = EMT.LT + ( EMT.X_OFF or 0)
@@ -1508,6 +1526,22 @@ function OnRapid()
EMT.RELOAD = false
EMT.RELOAD2 = nil
end
-- se bisogna fare tastatura
if EMT.EXECPROBE then
EMT.EXECPROBE = nil
local vtE = Vector3d( EMT.EXTR)
local sFace
if AreSameVectorApprox( vtE, Y_AX()) then
sFace = 2
elseif AreSameVectorApprox( vtE, -Y_AX()) then
sFace = 4
elseif AreSameVectorApprox( vtE, Z_AX()) then
sFace = 3
else
error( "PROBING DIRECTION NOT MANAGED")
end
EmtOutput( 'G145 Z-10 EF'..sFace)
end
-- se taglio di coda senza residuo da scaricare, emetto M175 per accelerare il carico della barra successiva
if EMT.MCHUSERNOTES and EMT.MCHUSERNOTES:find( 'Cut', 1, true) then
EmtOutput( 'M175')
+15
View File
@@ -773,6 +773,12 @@ function OnSimulMachiningStart()
else
EMT.TASKID = 0
end
-- gestione eventuale tastatura
EMT.PROBE = nil
local bProbing = EgtGetValInNotes( EMT.MCHUSERNOTES, 'PROBE', 'b')
if bProbing then
EMT.PROBE = true
end
-- gestione eventuale lavorazione in doppio
local nDouType = EgtGetValInNotes( EMT.MCHUSERNOTES, 'DOUBLE', 'i')
if nDouType == 2 then
@@ -2276,6 +2282,15 @@ function LoadNextTool( nHSet, sTcPosDef, bFirst)
return sTool
end
---------------------------------------------------------------------
function VerifyToolProbeCompatibility()
local bToolIsCompatible = false
if EMT.TTOTLEN < 200 and EMT.TTOTDIAM < 80 then
bToolIsCompatible = true
end
return bToolIsCompatible
end
---------------------------------------------------------------------
-- *** ESTIMATION T&L ***
---------------------------------------------------------------------
+19 -4
View File
@@ -32,8 +32,8 @@
require( 'EmtGenerator')
EgtEnableDebug( false)
PP_VER = '2.7e1'
PP_NVER = '2.7.5.1'
PP_VER = '2.7f1_DEV2'
PP_NVER = '2.7.6.1'
MIN_MACH_VER = '2.5k1'
MACH_NAME = 'Essetre-PF'
@@ -166,6 +166,7 @@ AutoRotMinLen = 0
CoeffVM = 0.5
EstimationRapidMultiplier = 1
ForceToCloseRollersGate = false
Probe = true
-- Aggiornamento con dati da TechnoEssetre7
local sTs3Data = EgtGetStringFromIni( 'Beam', 'DATA_DIR', "C:\\TechnoEssetre7\\EgtData", EgtGetIniFile()).."\\Essetre-PF.data"
@@ -252,6 +253,7 @@ if EgtExistsFile( sData) then
if Machine.Offsets.COEFF_STIMATEMPI and Machine.Offsets.COEFF_STIMATEMPI > 0 then EstimationRapidMultiplier = Machine.Offsets.COEFF_STIMATEMPI end
if Machine.Offsets.CHIUDI_PINZE_2_3_SCAMBIO then ForceToCloseRollersGate = Machine.Offsets.CHIUDI_PINZE_2_3_SCAMBIO == 1 end
if Machine.Offsets.WOOD_DENSITY then WoodDensity = Machine.Offsets.WOOD_DENSITY end
--if Machine.Offsets.PROBE then Probe = ( Machine.Offsets.PROBE == 1) end
-- aggiustamenti
MinY1 = MinV1 + MinDeltaYV
MaxY1 = MaxMchY1
@@ -323,6 +325,13 @@ EmtAxis {
Home = ParkC1,
Geo = 'C1_AXIS/GEO',
Aux = {'C1_AXIS/SOLID', 'C1_AXIS/COLLISION'}}
-- se tastatore presente
local sBAxisAuxGeom
if Probe then
sBAxisAuxGeom = {'B1_AXIS/SOLID', 'B1_AXIS/COLLISION', 'PROBE_B1/SOLID_PROBE', 'PROBE_B1/COLLISION_PROBE'}
else
sBAxisAuxGeom = {'B1_AXIS/SOLID', 'B1_AXIS/COLLISION'}
end
EmtAxis {
Name = 'B1',
Parent = 'C1',
@@ -333,7 +342,7 @@ EmtAxis {
Stroke = {MinB1, MaxB1},
Home = ParkB1,
Geo = 'B1_AXIS/GEO',
Aux = {'B1_AXIS/SOLID', 'B1_AXIS/COLLISION'}}
Aux = sBAxisAuxGeom }
-- Frese
local H11Id = EmtHead {
Name = 'H11',
@@ -396,6 +405,12 @@ local C2Id = EmtAxis {
Home = ParkC2,
Geo = 'C2_AXIS/GEO',
Aux = {'C2_AXIS/SOLID', 'C2_AXIS/COLLISION'}}
-- se presente tastatore
if Probe then
sBAxisAuxGeom = {'B2_AXIS/SOLID', 'B2_AXIS/COLLISION', 'PROBE_B2/SOLID_PROBE', 'PROBE_B2/COLLISION_PROBE'}
else
sBAxisAuxGeom = {'B2_AXIS/SOLID', 'B2_AXIS/COLLISION'}
end
local B2Id = EmtAxis {
Name = 'B2',
Parent = 'C2',
@@ -406,7 +421,7 @@ local B2Id = EmtAxis {
Stroke = {MinB2, MaxB2},
Home = ParkB2,
Geo = 'B2_AXIS/GEO',
Aux = {'B2_AXIS/SOLID', 'B2_AXIS/COLLISION'}}
Aux = sBAxisAuxGeom}
local vtMove2 = Vector3d( 0, Head2Y, Head2Z)
EgtMove( EgtGetFirstNameInGroup( X2Id, 'SOLID'), vtMove2, GDB_RT.GLOB)
EgtMove( EgtGetFirstNameInGroup( X2Id, 'COLLISION'), vtMove2, GDB_RT.GLOB)
BIN
View File
Binary file not shown.
+3
View File
@@ -13,6 +13,9 @@
3=d,TrimExt,0
4=s,VtFaceUse,0,0,0
5=s,EdgesFaceUse,0
6=b,PROBE,0
7=b,START-PROBE,0
8=b,END-PROBE,0
[Pocketing]
0=l,MaxElev,0