Compare commits

...

12 Commits

Author SHA1 Message Date
andrea.villa c4dccb3581 Gestione nuova funzionalità per abilitare/disabilitare visualizzazione VMILL durante lavorazione 2026-08-17 11:35:19 +02:00
andrea.villa e4a9896c70 Merge remote-tracking branch 'origin/main' into develop 2026-08-17 11:08:15 +02:00
andrea.villa d3c09cb4d3 Merge remote-tracking branch 'origin/develop' 2026-04-22 16:26:59 +02:00
andrea.villa 211b59c79b Cambio versione 2026-04-22 16:26:46 +02:00
andrea.villa f8464fa0de - Corretto pinzaggio in caso di passo del pellegrino con recupero completo di una sola pinza
- Semplificato salvataggio stato in PreparePostRotation
- Cambio versione per rilasci oa cliente
2026-04-22 16:26:15 +02:00
daniele.nicoli 7a6bdaf637 Corretta generazione del PreparePostRotation (in tutti i CN) ora salva lo stato della pinza per lo spostamento successivo 2026-04-22 13:12:29 +02:00
andrea.villa 73881f4042 Merge remote-tracking branch 'origin/main' into develop 2026-04-14 15:13:56 +02:00
andrea.villa 92ab99cde9 Merge branch 'develop' 2026-04-14 15:13:37 +02:00
andrea.villa 4496302ec3 Cambio versione per rilascio a cliente 2026-04-14 15:13:14 +02:00
daniele.nicoli c85df70b61 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'è 2026-04-14 09:28:02 +02:00
andrea.villa a8f142e8d7 Per NUM, si lascia aperta la pinza di carico in caso di END2. TPA era già corretto 2026-04-02 09:57:16 +02:00
andrea.villa 9bebdcc4e7 Merge remote-tracking branch 'origin/main' into develop 2026-04-02 09:53:39 +02:00
7 changed files with 74 additions and 37 deletions
+9 -6
View File
@@ -1348,7 +1348,7 @@ function PrepareUnload( sCmd)
table.insert( EMT.AUXCMD, sMsg)
if Cmd[2] == 'V' then
-- se non è ultima fase c'è una barra sulla pinza Y (1)
local sEE = EgtIf( EMT.PHASE == EgtGetPhaseCount(), '0', '1')
local sEE = EgtIf( EMT.PHASE == EgtGetPhaseCount() or IsEnd2Phase( EMT.PHASE), '0', '1')
local sOut = 'G111 '..Cmd[2]..Cmd[3]..' EC141 ED83 EE'..sEE..' EF'..GetFmaxClamp()
table.insert( EMT.AUXSTR, sOut)
end
@@ -1357,7 +1357,7 @@ function PrepareUnload( sCmd)
table.insert( EMT.AUXCMD, sMsg)
if Cmd[4] == 'V' then
-- se non è ultima fase c'è una barra sulla pinza Y (1)
local sEAB = EgtIf( EMT.PHASE == EgtGetPhaseCount(), '111', '112')
local sEAB = EgtIf( EMT.PHASE == EgtGetPhaseCount() or IsEnd2Phase( EMT.PHASE), '111', '112')
local sOut = 'G111 '..Cmd[4]..Cmd[5]..' EA'..sEAB..' EB'..sEAB..' EC142 ED141 EE2 EF'..GetFmaxClamp()
table.insert( EMT.AUXSTR, sOut)
EMT.U_STD = true
@@ -1517,10 +1517,13 @@ function PreparePostRotation( sCmd)
elseif nVDelta > 0 then
EMT.YDELTA = nil
EMT.VDELTA = nVDelta
end
local sYLoad = ' Y'..EmtLenToString( LoadT)
local sOut = 'G111'..sYLoad..' EA76'..EMT.SB..' EE0 EF'..EmtLenToString( EMT.FMAXPINZE,0)..' ET1'
table.insert( EMT.AUXSTR, sOut)
end
local sYLoad = ' Y'..EmtLenToString( LoadT)
local sOut = 'G111'..sYLoad..' EA76'..EMT.SB..' EE0 EF'..EmtLenToString( EMT.FMAXPINZE,0)..' ET1'
table.insert( EMT.AUXSTR, sOut)
-- setto parametri di pinzaggio reali
EMT.SA = ' EA110'
EMT.SE = ' EE1'
end
end
+9 -6
View File
@@ -1435,7 +1435,7 @@ function PrepareUnload( sCmd)
table.insert( EMT.AUXCMD, sMsg)
if Cmd[2] == 'V' then
-- se non è ultima fase c'è una barra sulla pinza Y (1)
local sEE = EgtIf( EMT.PHASE == EgtGetPhaseCount(), '0', '1')
local sEE = EgtIf( EMT.PHASE == EgtGetPhaseCount() or IsEnd2Phase( EMT.PHASE), '0', '1')
local sOut = 'G111 '..Cmd[2]..Cmd[3]..' EC141 ED83 EE'..sEE..' EF'..GetFmaxClamp()
table.insert( EMT.AUXSTR, sOut)
end
@@ -1444,7 +1444,7 @@ function PrepareUnload( sCmd)
table.insert( EMT.AUXCMD, sMsg)
if Cmd[4] == 'V' then
-- se non è ultima fase c'è una barra sulla pinza Y (1)
local sEAB = EgtIf( EMT.PHASE == EgtGetPhaseCount(), '111', '112')
local sEAB = EgtIf( EMT.PHASE == EgtGetPhaseCount() or IsEnd2Phase( EMT.PHASE), '111', '112')
local sOut = 'G111 '..Cmd[4]..Cmd[5]..' EA'..sEAB..' EB'..sEAB..' EC142 ED141 EE2 EF'..GetFmaxClamp()
table.insert( EMT.AUXSTR, sOut)
EMT.U_STD = true
@@ -1604,10 +1604,13 @@ function PreparePostRotation( sCmd)
elseif nVDelta > 0 then
EMT.YDELTA = nil
EMT.VDELTA = nVDelta
end
local sYLoad = ' Y'..EmtLenToString( LoadT)
local sOut = 'G111'..sYLoad..' EA76'..EMT.SB..' EE0 EF'..EmtLenToString( EMT.FMAXPINZE,0)..' ET1'
table.insert( EMT.AUXSTR, sOut)
end
local sYLoad = ' Y'..EmtLenToString( LoadT)
local sOut = 'G111'..sYLoad..' EA76'..EMT.SB..' EE0 EF'..EmtLenToString( EMT.FMAXPINZE,0)..' ET1'
table.insert( EMT.AUXSTR, sOut)
-- setto parametri di pinzaggio reali
EMT.SA = ' EA110'
EMT.SE = ' EE1'
end
end
+7 -4
View File
@@ -1626,10 +1626,13 @@ function PreparePostRotation( sCmd)
elseif nVDelta > 0 then
EMT.YDELTA = nil
EMT.VDELTA = nVDelta
end
local sYLoad = ' P2='..EmtLenToString( LoadT)
local sOut = 'M111 P1=11'..sYLoad..' P4=76'..EMT.SB..' P8=0 P9='..GetFmaxClamp()
table.insert( EMT.AUXSTR, sOut)
end
local sYLoad = ' P2='..EmtLenToString( LoadT)
local sOut = 'M111 P1=11'..sYLoad..' P4=76'..EMT.SB..' P8=0 P9='..GetFmaxClamp()
table.insert( EMT.AUXSTR, sOut)
-- setto parametri di pinzaggio reali
EMT.SA = ' P4=110'
EMT.SE = ' P8=1'
end
end
+26 -10
View File
@@ -219,7 +219,8 @@ function OnSimulDispositionStart()
EMT.LOAD = true
-- Se vero inizio e abilitato creo gli Zmap
EMT.VMILL = {}
if not EMT.SIM1ST and EgtGetInfo( EgtGetCurrMachGroup(), 'Vm', 'b') then
if not EMT.SIM1ST then
local bShowVMill = EgtGetInfo( EgtGetCurrMachGroup(), 'Vm', 'b')
local nLastOrd = GetPhaseOrd( EgtGetPhaseCount())
local nPartRawId = EgtGetFirstRawPart()
while nPartRawId do
@@ -245,7 +246,7 @@ function OnSimulDispositionStart()
-- determino la risoluzione dello Zmap
local dTol = 4.71
if EmtGetVMillStep then
dTol = EmtGetVMillStep( b3Raw:getDimX(), b3Raw:getDimY(), b3Raw:getDimZ(), dTol)
dTol = EmtGetVMillStep( b3Raw:getDimX(), b3Raw:getDimY(), b3Raw:getDimZ(), EMT.VMILLTOL or dTol)
else
local dArea = b3Raw:getDimX() * b3Raw:getDimY() + b3Raw:getDimX() * b3Raw:getDimZ() + b3Raw:getDimY() * b3Raw:getDimZ()
if dArea < 0.075e6 then
@@ -261,21 +262,25 @@ function OnSimulDispositionStart()
elseif dArea < 2.4e6 then
dTol = 3.77
end
dTol = min( dTol, EMT.VMILLTOL or dTol) -- imposto dTol al valore minore tra quello per volume e quello per spessore lama
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
local VMillId = EgtVolZmapBox( nPartRawId, b3Raw:getMin(), b3Raw:getDimX(), b3Raw:getDimY(), b3Raw:getDimZ(), dTol, true, GDB_RT.GLOB)
if VMillId then
EgtSetName( VMillId, 'VMill')
EgtSetLevel( VMillId, GDB_LV.TEMP)
EgtSetColor( VMillId, EgtGetColor( nSolId), false)
-- nascondo le altre geometrie
local nId = EgtGetFirstInGroup( nPartRawId)
while nId do
if nId ~= VMillId then
EgtSetStatus( nId, GDB_ST.OFF)
if bShowVMill then
-- nascondo le altre geometrie
local nId = EgtGetFirstInGroup( nPartRawId)
while nId do
if nId ~= VMillId then
EgtSetStatus( nId, GDB_ST.OFF)
end
nId = EgtGetNext( nId)
end
nId = EgtGetNext( nId)
else
EgtSetStatus( VMillId, GDB_ST.OFF)
end
table.insert( EMT.VMILL, VMillId)
end
@@ -347,7 +352,9 @@ function OnSimulDispositionStart()
-- gestione eventuale scarto affettato successivo
if EMT.VMILL and #EMT.VMILL > 0 then
EMT.SCRAP = nScrapRawId
EgtSetStatus( EMT.SCRAP or GDB_ID.NULL, GDB_ST.OFF)
if EgtGetInfo( EgtGetCurrMachGroup(), 'Vm', 'b') then
EgtSetStatus( EMT.SCRAP or GDB_ID.NULL, GDB_ST.OFF)
end
else
EMT.SCRAP = nil
end
@@ -1039,6 +1046,8 @@ end
function ExecUnloading()
if EMT.VMILL and #EMT.VMILL > 0 then
local vMillId = EMT.VMILL[1]
-- grezzo di appartenenza
local nPartRawId = EgtGetParent( vMillId)
-- gruppo dei Vmill
local nVmGrpId = EgtGetFirstNameInGroup( GDB_ID.ROOT, 'VMill')
-- li sposto per lasciare spazio al nuovo pezzo
@@ -1053,6 +1062,7 @@ function ExecUnloading()
local vtMove = Vector3d( 0, EgtIf( BD.RIGHT_LOAD, 450, -450), 0)
if EMT.FALL then vtMove = Vector3d( 0, EgtIf( BD.RIGHT_LOAD, 500, -500), -750) end
EgtMove( nLayId, vtMove, GDB_RT.GLOB)
EgtSetStatus( vMillId, GDB_ST.ON)
EgtSetLevel( vMillId, GDB_LV.USER)
-- aggiungo gli spigoli
if EgtVolZmapSetShowEdges then
@@ -1071,6 +1081,12 @@ function ExecUnloading()
EgtDraw()
-- se finito
if EMT.PHASE == EgtGetPhaseCount() then
-- in ogni caso, nascondo ultimo pezzo
local nId = EgtGetFirstInGroup( nPartRawId)
while nId do
EgtSetStatus( nId, GDB_ST.OFF)
nId = EgtGetNext( nId)
end
-- se impostato di salvare i Vmill, lo faccio
local sMachIni = EgtGetCurrMachineDir() .. '\\' .. EgtGetCurrMachineName() .. '.ini'
if EgtGetStringFromIni( 'VMill', 'Save', '', sMachIni) == '1' then
+10 -10
View File
@@ -1572,8 +1572,8 @@ function SpecAdjustCarriages( vCmd, dTPosI, dYDeltaI, dVDeltaI, dTPosF, dYDeltaF
dMaxMovePilgrimStepSingleClampY = MaxY - dYPosI
dMaxMovePilgrimStepSingleClampV = - MinV + dVPosI
else
dMaxMovePilgrimStepDoubleClamp = MaxY - MinY - MinV + MaxV
dMaxMovePilgrimStepSingleClampY = MaxY - MinY
dMaxMovePilgrimStepDoubleClamp = MaxY - MyMinY - MinV + MaxV
dMaxMovePilgrimStepSingleClampY = MaxY - MyMinY
dMaxMovePilgrimStepSingleClampV = - MinV + MaxV
end
@@ -1863,8 +1863,8 @@ function SpecAdjustCarriages( vCmd, dTPosI, dYDeltaI, dVDeltaI, dTPosF, dYDeltaF
dTPosI = dTPosA
dYPosI = dYPosA
dVPosI = dVPosA
dMaxMovePilgrimStepDoubleClamp = MaxY - MinY - MinV + MaxV
dMaxMovePilgrimStepSingleClampY = MaxY - MinY
dMaxMovePilgrimStepDoubleClamp = MaxY - MyMinY - MinV + MaxV
dMaxMovePilgrimStepSingleClampY = MaxY - MyMinY
dMaxMovePilgrimStepSingleClampV = - MinV + MaxV
end
@@ -1917,10 +1917,10 @@ function SpecAdjustCarriages( vCmd, dTPosI, dYDeltaI, dVDeltaI, dTPosF, dYDeltaF
-- recupero una corsa massima e l'altra solo di quello che serve
elseif abs( dYDeltaI - dYDeltaF) > dMaxMovePilgrimStepSingleClampV then
-- suddivido il movimento su entrambe le morse
local dTotMove = ( dYDeltaF - dYDeltaI) / 2
local dTotMove = ( ( dYDeltaF + dVDeltaF) / 2 + ( dYDeltaI + dVDeltaI) / 2) / 2
-- morsa Y arriva in posizione finale
dVPosA = MaxV - dTotMove
dTPosA = dTPosI - dVPosI + MaxV - dTotMove
dVPosA = EgtClamp( MaxV - dTotMove, MaxV, MinV)
dTPosA = dTPosI - dVPosI + dVPosA
dYPosA = dYDeltaF + dTPosA
table.insert( vCmd, { 3, 'Y', dYPosA , 'T', dTPosA, 'V', dVPosA})
table.insert( vCmd, { 11, CalcCharStatus( 'Y', dYDeltaF)})
@@ -2024,10 +2024,10 @@ function SpecAdjustCarriages( vCmd, dTPosI, dYDeltaI, dVDeltaI, dTPosF, dYDeltaF
-- recupero una corsa massima e l'altra solo di quello che serve
elseif abs( dVDeltaI - dVDeltaF) > dMaxMovePilgrimStepSingleClampY then
-- suddivido il movimento su entrambe le morse
local dTotMove = ( dVDeltaI - dVDeltaF) / 2
local dTotMove = ( ( dYDeltaF + dVDeltaF) / 2 + ( dYDeltaI + dVDeltaI) / 2) / 2
-- morsa V arriva in posizione finale
dYPosA = MinY + dTotMove
dTPosA = dTPosI + ( MinY - dYPosI) + dTotMove
dYPosA = EgtClamp( MinY + dTotMove, MinY, MaxY)
dTPosA = dTPosI - dYPosI + dYPosA
dVPosA = dVDeltaF + dTPosA
table.insert( vCmd, { 3, 'Y', dYPosA , 'T', dTPosA, 'V', dVPosA})
table.insert( vCmd, { 12, CalcCharStatus( 'V', dVDeltaF)})
+12
View File
@@ -1,5 +1,17 @@
==== Common_FAST Update Log ====
Versione 3.1-- (--/--/2026)
- (SIM-INI) Con CAM5 v.3.1h2 è possibile abilitare/disabilitare VMILL durante lavorazione. Serve Modifica INI macchina "Enable=2" in sezione "[VMill]".
Il flag non è più di creazione, ma di visualizzazione, e il controllo collisioni è comunque garantito.
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
+1 -1
View File
@@ -3,7 +3,7 @@
local InfoCommon_STD_PP = {
NAME = 'Common_FAST', -- nome script PP standard
VERSION = '3.1c2', -- versione script
VERSION = '3.1--', -- versione script
MIN_MACH_VER_PP_COMMON = '2.5k1' -- versione minima kernel
}