- correzzione per lavorazioni su macchina offline

- aggiunta gestione mutex per evitare lanci multipli dello script
This commit is contained in:
Emmanuele Sassi
2025-06-30 10:32:37 +02:00
parent 708307d345
commit 42a4479df7
2 changed files with 9 additions and 3 deletions
+7 -1
View File
@@ -1090,6 +1090,12 @@ function ExtendedEstimate(readBatch)
end
--
-- verifico che non ci siano istanze gia' in corso
if not EgtCreateMutex('Global\\MainNKCLuaScript') then
EgtOutLog( 'Impossible starting script! Script already in execution!')
EgtOutBox( 'Script already running! Impossible running another instance at the same time!!', 'Error' , 'ERROR', 'OK')
EgtCloseExe()
end
-- ciclo principale
while true do
EgtNewFile()
@@ -1115,5 +1121,5 @@ while true do
end
end
end
end
EgtReleaseMutex()
+2 -2
View File
@@ -2703,8 +2703,8 @@ function NestingLib.ManageMachine(CurrIsOffline)
table.insert(OutlineMachining, 2, Config.NWOutlineMachTools)
table.insert(HoleMachining, 2, Config.NWHoleMachTools)
table.insert(RampMachining, 2, Config.NWRampMachTools[1])
table.insert(CountersinkMachining, 2, Config.NWCountersinkMachTools)
table.insert(OutsideChamferMachining, 2, Config.MXOutsideChamferMachTools)
table.insert(CountersinkMachining, 2, Config.NWCountersinkMachTools[1])
table.insert(OutsideChamferMachining, 2, Config.MXOutsideChamferMachTools[1])
table.insert(InsideChamferMachining, 2, Config.NWInsideChamferMachTools[1])
Pocketing = Config.NWPocketingTools
IsOffline = true