Compare commits
5 Commits
3.1a2_DEV4
...
3.1a2_DEV8
| Author | SHA1 | Date | |
|---|---|---|---|
| 4f43b42149 | |||
| e6e0c3118e | |||
| b1103550fa | |||
| 9be7a2c081 | |||
| 084bf57416 |
+16
-3
@@ -32,6 +32,10 @@ function OnStart()
|
||||
EMT.MAXACC = MaxAcc or 6000 -- accelerazione massima pinze. In realtà è il tempo in millisecondi, quindi MAXACC corrisponde al tempo massimo per raggiungere la velocità desiderata
|
||||
EMT.MINACC = MinAcc or 600 -- accelerazione minima pinze. In realtà è il tempo in millisecondi, quindi MINACC corrisponde al tempo massimo per raggiungere la velocità desiderata
|
||||
SetToParkLine() -- si inizia con linee da parcheggiare su stack
|
||||
|
||||
-- se il pezzo dev'essere scaricato al carico
|
||||
local dUnloadType = EgtGetInfo( EgtGetFirstNameInGroup( GDB_ID.ROOT, 'BtlInfo') or GDB_ID.NULL, 'UNLOAD', 'd')
|
||||
EMT.UNLOAD = dUnloadType == 1 or dUnloadType == -1
|
||||
end
|
||||
|
||||
---------------------------------------------------------------------
|
||||
@@ -289,7 +293,7 @@ function OnDispositionEnd()
|
||||
-- altrimenti disposizione finale, eventuale scarico pezzo lavorato se non ci sono lavorazioni
|
||||
else
|
||||
if #EMT.MDCHAR > 0 then
|
||||
if EMT.AUXTYPE == 'R' and UnloadOnLoadPos then
|
||||
if EMT.AUXTYPE == 'R' and EMT.UNLOAD then
|
||||
EmitRemark( 'PART UNLOAD ON LOAD POSITION')
|
||||
else
|
||||
EmitRemark( 'PART UNLOAD')
|
||||
@@ -320,7 +324,7 @@ function OnDispositionEnd()
|
||||
local sEnd= 'M113 P1='..tostring( EMT.PRODID)..' P2='..tostring( EMT.PATTID)..' P3='..tostring( EMT.CUTID)..' P4=2'
|
||||
MyOutput( sEnd)
|
||||
end
|
||||
if UnloadOnLoadPos then
|
||||
if EMT.UNLOAD then
|
||||
MyOutput('M77')
|
||||
end
|
||||
end
|
||||
@@ -516,7 +520,7 @@ function OnMachiningEnd()
|
||||
EMT.TO_ZMAX = nil
|
||||
end
|
||||
EmitRemark( 'PART FALL')
|
||||
elseif UnloadOnLoadPos and not nNextPathId and not nNextMchId then
|
||||
elseif EMT.UNLOAD and not nNextPathId and not nNextMchId then
|
||||
EmitZmax( false, true, EMT.R1, EMT.R2, false, false, false)
|
||||
EMT.ZMAX = true
|
||||
EmitRemark( 'PART UNLOAD ON LOAD POSITION')
|
||||
@@ -1980,9 +1984,18 @@ function PrepareResidue( sCmd, nInd)
|
||||
else
|
||||
EMT.UNL = true
|
||||
end
|
||||
-- se è scarico al carico
|
||||
if Cmd[2] == 'Unload-On-Load' then
|
||||
EMT.UNL2 = true
|
||||
end
|
||||
elseif Cmd[1] == '1' then
|
||||
if Cmd[2] ~= 'Z' then
|
||||
local MDChar
|
||||
-- se scarico al carico parcheggio per sicurezza morsa e paratia lato scarico
|
||||
if EMT.UNL2 then
|
||||
MDChar = { Y2=ParkY2, V2=ParkV2, IniStatY2=1, FinStatY2=1, BeamVise=0}
|
||||
table.insert( EMT.MDCHAR, MDChar)
|
||||
end
|
||||
if not EMT.UNL then
|
||||
MDChar = { [Cmd[2]]=tonumber(Cmd[3]), IniStatY1=EMT.ISY1, FinStatY1=EMT.FSY1, IniStatY2=EMT.ISY2, FinStatY2=EMT.FSY2, BeamVise=EMT.BV}
|
||||
else
|
||||
|
||||
+22
-8
@@ -276,7 +276,6 @@ local DIST_Y1MAX_LOAD = 100 -- distanza carrello Y1 da massimo asse al ca
|
||||
----------------------- Variabili -----------------------------------
|
||||
local Test = false
|
||||
local SPLIT
|
||||
UnloadOnLoadPos = EgtGetInfo( EgtGetFirstNameInGroup( GDB_ID.ROOT, 'BtlInfo'), 'Output', 'b') == 1 -- se il pezzo dev'essere scaricato al carico
|
||||
|
||||
---------------------------------------------------------------------
|
||||
local function PrepareClGroup( nParentId)
|
||||
@@ -382,7 +381,7 @@ local function GetNextRawInOrd( nCurrRawId)
|
||||
end
|
||||
|
||||
-----------------------------------------------------------------------
|
||||
local function EnsureZmax( bCloseV, vCmd)
|
||||
local function EnsureZmax( bCloseV, vCmd, nInd)
|
||||
-- verifico non sia già inserito nella lista dei comandi
|
||||
for i = 1, #vCmd do
|
||||
if vCmd[i][1] == 4 then
|
||||
@@ -394,7 +393,11 @@ local function EnsureZmax( bCloseV, vCmd)
|
||||
end
|
||||
end
|
||||
-- posizionamento sicuro teste e rulli
|
||||
table.insert( vCmd, { 4, EgtIf( bCloseV, 1, 0)})
|
||||
if not nInd then
|
||||
table.insert( vCmd, { 4, EgtIf( bCloseV, 1, 0)})
|
||||
else
|
||||
table.insert( vCmd, nInd, { 4, EgtIf( bCloseV, 1, 0)})
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
@@ -570,8 +573,12 @@ function OnSpecialApplyDisposition()
|
||||
SpecSetCarrPosFromCmds( vCmd2)
|
||||
-- determino posizione testa trave
|
||||
local nLastEntId = EgtGetLastInGroup( EgtGetLastInGroup( EgtGetFirstNameInGroup( EgtGetPrev( EMC.DISPID), 'CL')))
|
||||
local vAxes = EmtGetAxesPos( nLastEntId)
|
||||
if #vAxes > 0 then EMC.TPOS = vAxes[1] end
|
||||
if nLastEntId then
|
||||
local vAxes = EmtGetAxesPos( nLastEntId)
|
||||
if #vAxes > 0 then EMC.TPOS = vAxes[1] end
|
||||
else
|
||||
EMC.TPOS = EgtGetInfo( EMC.DISPID, 'TPOS', 'd')
|
||||
end
|
||||
local vCmd3 = SpecCalcUnload()
|
||||
-- unisco ed emetto i comandi
|
||||
vCmd = EgtJoinTables( vCmd, vCmd2)
|
||||
@@ -737,6 +744,9 @@ function SpecApplyPath( bPreSplit, bSplitting, bPreCut, bCutting, bUnload)
|
||||
|
||||
-- Verifico se lavorazione pareti
|
||||
local bWall = ( EgtGetInfo( EgtGetCurrMachGroup() or GDB_ID.NULL, 'Wall', 'd') == 1)
|
||||
-- se il pezzo dev'essere scaricato al carico
|
||||
local dUnloadType = EgtGetInfo( EgtGetFirstNameInGroup( GDB_ID.ROOT, 'BtlInfo') or GDB_ID.NULL, 'UNLOAD', 'd')
|
||||
local bUnloadOnLoadPos = dUnloadType == 1 or dUnloadType == -1
|
||||
|
||||
-- mi salvo info lavorazione su una lista
|
||||
local AuxInfoMach = {}
|
||||
@@ -754,7 +764,7 @@ function SpecApplyPath( bPreSplit, bSplitting, bPreCut, bCutting, bUnload)
|
||||
local b3Raw = BBox3d()
|
||||
local nNextOddPhase = GetNextStartOrRestPhase( EMC.PHASE)
|
||||
-- se esistono più grezzi toglie l'impostazione di scarico al carico
|
||||
if UnloadOnLoadPos and ( nNextOddPhase and nNextOddPhase <= EgtGetPhaseCount()) then UnloadOnLoadPos = false end
|
||||
if bUnloadOnLoadPos and ( nNextOddPhase and nNextOddPhase <= EgtGetPhaseCount()) then bUnloadOnLoadPos = false end
|
||||
local nRawId = EgtGetFirstRawPart()
|
||||
local nCurrRawId = GDB_ID.NULL
|
||||
while nRawId do
|
||||
@@ -806,7 +816,7 @@ function SpecApplyPath( bPreSplit, bSplitting, bPreCut, bCutting, bUnload)
|
||||
local dDistF, dDistB, dRollF, dRollB = SpecialCalcPhaseEncumbrance( EMC.PHASE + 1)
|
||||
dDistFront = min( dDistFront, dDistF)
|
||||
-- Se è previsto lo scarico al carico aumenta l'ingombro dell'area di lavoro
|
||||
if UnloadOnLoadPos then
|
||||
if bUnloadOnLoadPos then
|
||||
dDistFront = dDistFront -( MinDeltaYV*2 + AGG_V)
|
||||
end
|
||||
dDistBack = min( dDistBack, dDistB)
|
||||
@@ -1391,8 +1401,12 @@ function SpecCalcUnload()
|
||||
local nNextMchId
|
||||
if EMC.PATHID then nNextPathId = EgtGetNextActiveOperation( EMC.PATHID) end
|
||||
if EMC.MCHID then nNextMchId = EgtGetNextActiveOperation( EMC.MCHID) end
|
||||
-- se il pezzo dev'essere scaricato al carico
|
||||
local dUnloadType = EgtGetInfo( EgtGetFirstNameInGroup( GDB_ID.ROOT, 'BtlInfo') or GDB_ID.NULL, 'UNLOAD', 'd')
|
||||
local bUnloadOnLoadPos = dUnloadType == 1 or dUnloadType == -1
|
||||
|
||||
-- Opzione attiva, è l'ultimo path, è l'ultima lavorazione e non c'è rimanenza
|
||||
if UnloadOnLoadPos and not nNextPathId and not nNextMchId and not IsStartOrRestPhase(EMC.PHASE) then
|
||||
if bUnloadOnLoadPos and not nNextPathId and not nNextMchId and not IsStartOrRestPhase(EMC.PHASE) then
|
||||
local vCmd = SpecCalcUnloadOnLoadPos()
|
||||
return vCmd
|
||||
end
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
require( 'EmtGenerator')
|
||||
EgtEnableDebug( false)
|
||||
|
||||
PP_VER = '3.1a2_DEV4'
|
||||
PP_VER = '3.1a2_DEV8'
|
||||
PP_NVER = '3.1.1.2'
|
||||
MIN_MACH_VER = '2.7d2'
|
||||
MACH_NAME = EgtGetCurrMachineName()
|
||||
@@ -173,7 +173,6 @@ 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
|
||||
MinBeamLenUnloadInLine = 2400 -- se lo scarico è su una linea deve scaricare il pezzo al massimo e deve essere maggiore del valore della variabile
|
||||
UnloadOnLoadPos = nil
|
||||
|
||||
-- Aggiornamento con dati da TechnoEssetre7
|
||||
local sTs3Data = EgtGetStringFromIni( 'Beam', 'DATA_DIR', "C:\\TechnoEssetre7\\EgtData", EgtGetIniFile()).."\\Essetre-PF1250-3T_5Ax.data"
|
||||
|
||||
Reference in New Issue
Block a user