DataBeam :
modifiche al filling travi per aggiunta identificativi.
This commit is contained in:
+12
-9
@@ -154,9 +154,9 @@ local Parts = {}
|
||||
-- ciclo su pezzi per aggiungerli al nesting
|
||||
for nPartId, nCount in pairs( PART) do
|
||||
-- recupero lunghezza pezzo
|
||||
local Len = EgtGetInfo(nPartId, "L", 'd')
|
||||
local DispLen = EgtIf(Len < 1000, 2000, 0)
|
||||
table.insert(Parts, {Id = nPartId, Len = Len, DispLen = DispLen, Cnt = nCount})
|
||||
local Len = EgtGetInfo( nPartId, "L", 'd')
|
||||
local DispLen = EgtIf( Len < 1000, 2000, 0)
|
||||
table.insert( Parts, {Id = nPartId, Len = Len, DispLen = DispLen, Cnt = nCount})
|
||||
end
|
||||
|
||||
-- Ciclo fino ad esaurimento pezzi o barre
|
||||
@@ -166,9 +166,12 @@ while Raws.Count > 0 and PartsToFill( Parts) > 0 do
|
||||
local Res = ExecMaximumFilling( Raws, Parts)
|
||||
-- creo gruppo di lavorazione
|
||||
local MachGroupName = NewMachGroupName()
|
||||
nMachGroup = EgtAddMachGroup(MachGroupName, sCurrMachName)
|
||||
EgtSetInfo(nMachGroup, "BARLEN", Raws.LenToFill)
|
||||
EgtSetInfo(nMachGroup, "AUTONEST", 1)
|
||||
nMachGroup = EgtAddMachGroup( MachGroupName, sCurrMachName)
|
||||
EgtSetInfo( nMachGroup, "BARLEN", Raws.LenToFill)
|
||||
EgtSetInfo( nMachGroup, "AUTONEST", 1)
|
||||
-- scrivo dati per variabili P di comunicazione con la macchina in gruppo di lavorazione
|
||||
EgtSetInfo( nMachGroup, "PRODID", NEST.PRODID)
|
||||
EgtSetInfo( nMachGroup, "PATTID", nMachGroup)
|
||||
-- Disegno i pezzi
|
||||
local CurrX = Raws.StartGap
|
||||
local nInfoIndex = 1
|
||||
@@ -178,8 +181,8 @@ while Raws.Count > 0 and PartsToFill( Parts) > 0 do
|
||||
local dLen = Parts[PartIndex].Len
|
||||
for j = 1, Res.Data[i].Count do
|
||||
-- creo pezzo copia
|
||||
local nPartDuploId = EgtDuploNew(PartId)
|
||||
EgtSetInfo(nMachGroup, "PART" .. nInfoIndex, nPartDuploId .. "," .. CurrX)
|
||||
local nPartDuploId = EgtDuploNew( PartId)
|
||||
EgtSetInfo( nMachGroup, "PART" .. nInfoIndex, nPartDuploId .. "," .. CurrX)
|
||||
CurrX = CurrX + dLen + Raws.MidGap
|
||||
nInfoIndex = nInfoIndex + 1
|
||||
end
|
||||
@@ -201,7 +204,7 @@ BEAM.FLAG = 6 -- CREATE_PANEL
|
||||
nMachGroup = EgtGetFirstMachGroup()
|
||||
while nMachGroup do
|
||||
local nNextMachGroup = EgtGetNextMachGroup( nMachGroup)
|
||||
EgtSetCurrMachGroup(nMachGroup)
|
||||
EgtSetCurrMachGroup( nMachGroup)
|
||||
if EgtGetInfo( nMachGroup, "AUTONEST",'i') == 1 then
|
||||
EgtRemoveInfo( nMachGroup, "AUTONEST")
|
||||
EgtSetInfo( nMachGroup, "UPDATEUI", 1)
|
||||
|
||||
Reference in New Issue
Block a user