Compare commits

...

53 Commits

Author SHA1 Message Date
andrea.villa 785e4490ea Gestione aggregato flottante completata 2025-01-23 15:52:58 +01:00
andrea.villa 971fcc0c07 Cambio nome parametro creazione utensile 2025-01-14 09:50:49 +01:00
andrea.villa db7cb8c1b1 - Gestione HCING/TCING da riportare nei prossimi common
- Piccola modifica ad aggregato flottante
2025-01-14 08:49:32 +01:00
andrea.villa 80fdaf23f4 Corretta simulazione del cambio utensile in caso di magazzino 2 2025-01-08 11:51:55 +01:00
andrea.villa b832df5767 Merge remote-tracking branch 'origin/master' into NewFloatingAggregate 2025-01-08 08:31:24 +01:00
andrea.villa 2b167ea927 Hotfix - Rimosso forzatura presenza aggregato per BlockHaus 2025-01-07 16:25:11 +01:00
andrea.villa deaac78103 Commit per cambio versione 2025-01-07 14:47:53 +01:00
andrea.villa 5f95d9821e Merge branch 'develop' 2025-01-07 14:47:06 +01:00
andrea.villa 8d7a29dd38 Allineamento con common ver. 2.7a1 2025-01-07 14:45:32 +01:00
andrea.villa 793fe00cc9 Prima versione aggregato flottante 2025-01-07 14:43:07 +01:00
Dario Sassi e3107c9c30 Essetre-FAST :
- piccola modifica a nuovo calcolo step per Vmill.
2024-12-30 13:28:34 +01:00
Dario Sassi 33e5254ba4 Essetre-FAST 2.6l2 :
- riportate modifiche per Vmill e lavorazioni 5assi.
2024-12-23 08:25:33 +01:00
andrea.villa 3aceb8783d Merge branch 'NewAggregateBlockHaus' into develop 2024-12-12 14:58:25 +01:00
andrea.villa dabb95858e Prima versione funzionante gestione aggregato tipo BlockHaus 2024-12-05 12:47:04 +01:00
andrea.villa 636ce9eb01 Allineamento con common ver. 2.6l1 2024-12-02 08:29:06 +01:00
andrea.villa 306bef076c Allineamento con common ver. 2.6k1 2024-11-12 08:26:27 +01:00
andrea.villa 9499cdb2c4 - Allineamento con Common ver. 2.6j10 2024-10-25 14:37:19 +02:00
andrea.villa a14a637ec1 - Allineamento con Common ver. 2.6j9 2024-10-22 11:21:41 +02:00
andrea.villa b1486a762e - Allineamento con Common ver. 2.6j8
- Aggiunto LEN_SHORT_PART tra i parametri configurabili da TS3
2024-10-21 08:46:47 +02:00
andrea.villa 0ce94917c4 Allineamento con Common ver. 2.6j7 2024-10-18 10:23:37 +02:00
andrea.villa 3149c70b9c Allineamento con common versione 2.6j6 2024-10-17 16:11:34 +02:00
andrea.villa 6ad6bc5e7f - Allineamento con common ver. 2.6j5
- Tolti i commenti iniziali da quando è stato creato progetto GIT
2024-10-17 09:38:44 +02:00
andrea.villa 3757642127 Aggiunta lettura alcune variabili impostabili da TS3 2024-10-15 10:28:14 +02:00
andrea.villa a133ab3514 - Allineamento con common ver. 2.6j4 2024-10-15 09:15:29 +02:00
andrea.villa 910ad63d34 - Allineamento con common ver. 2.6j3 2024-10-11 15:01:57 +02:00
luca.mazzoleni 3b7ac164a1 #critical# in BeamData corretta lettura ROT90 da TS3 2024-10-04 09:24:24 +02:00
andrea.villa daf84e06b3 - Allineamento con common ver. 2.6j2
- Aggiunta lettura parametro ROT90 da TS3 in BeamData
2024-10-03 10:32:37 +02:00
andrea.villa ff1c51f68b Aggiornamento versione 2024-10-01 08:16:51 +02:00
andrea.villa f164c8a046 Merge remote-tracking branch 'origin/develop' 2024-10-01 08:14:41 +02:00
andrea.villa d1f5219be9 Aggiornamento con common ver. 2.6j1 2024-10-01 08:14:27 +02:00
andrea.villa e08a18811f Piccola modifica nuovo pinzaggio 2024-09-26 18:07:03 +02:00
andrea.villa 758082ad22 Merge branch 'master' into develop 2024-09-25 13:24:50 +02:00
andrea.villa 745e6092b7 Merge remote-tracking branch 'origin/develop' 2024-09-25 13:24:44 +02:00
andrea.villa 10db138855 - Allineamento con common ver. 2.6i6 2024-09-25 13:24:28 +02:00
andrea.villa c2177f36bf Merge remote-tracking branch 'origin/master' into develop 2024-09-25 13:23:03 +02:00
luca.mazzoleni 76f6ed3346 update gitignore e YAML 2024-09-25 13:10:51 +02:00
andrea.villa a89bf46837 Cambio versione 2024-09-25 11:22:49 +02:00
andrea.villa 688ec6e221 Test miglioramento movimenti in sicurezza pezzi alti 2024-09-25 11:22:18 +02:00
andrea.villa 13a69fea58 Merge remote-tracking branch 'origin/master' into develop 2024-09-25 11:19:35 +02:00
andrea.villa 75355f60f1 - Allineamento con common ver. 2.6i5
- Aggiunta parametri NEWCLAMPING, FASTCLAMPING e GAIN_RECLAMPING
2024-09-24 17:44:17 +02:00
luca.mazzoleni 7922a3bb17 update gitignore e YAML 2024-09-24 13:08:11 +02:00
luca.mazzoleni 46665cf1fc modificato YAML 2024-09-24 11:17:47 +02:00
andrea.villa f50132446b - Allineamento con common ver. 2.6i3 2024-09-23 12:58:32 +02:00
luca.mazzoleni be5d362383 update YAML per cambio percorsi 2024-09-23 11:41:53 +02:00
luca.mazzoleni 2acf712f28 - in YAML PP_VER e PP_NVER si cercano solo all'inizio della riga 2024-09-18 14:41:17 +02:00
luca.mazzoleni c7e7afd93a - YAML mofiche per calcolo versione numerica 2024-09-18 14:37:30 +02:00
luca.mazzoleni 6cf09ac6a5 - YAML modifiche per calcolo versione numerica 2024-09-18 14:34:26 +02:00
luca.mazzoleni 6a68e0484a - Modificato YAML per comunicazione versioni a LiMan.
- Aggiunta PP_NVER, versione macchina in formato numerico.
2024-09-18 12:59:46 +02:00
andrea.villa 37952d64d4 - Allineamento con common ver. 2.6i2 2024-09-16 10:42:36 +02:00
luca.mazzoleni ab82e63af3 In BeamData aggiunte costanti MIN_HEIGHT_ADDED_CUTS, PRECUT_HEAD, PRECUT_TAIL, configurabili da offsets Ts3v7 2024-09-06 10:06:32 +02:00
luca.mazzoleni ed92ae901e In BeamData aggiunte costanti MIN_HEIGHT_ADDED_CUTS, PRECUT_HEAD, PRECUT_TAIL 2024-09-05 12:23:39 +02:00
andrea.villa a3c8c97c56 - Corretto file YML per compilare file "Common_"
- Aggiunta file note utensili e lavorazioni
2024-09-02 14:52:53 +02:00
andrea.villa 0a792883ad - Allineamento con common ver. 2.6i1, Rimossi file "Common-" 2024-09-02 10:01:05 +02:00
17 changed files with 1956 additions and 451 deletions
+100 -18
View File
@@ -2,19 +2,27 @@ variables:
VERS_MAIN: '1.0' VERS_MAIN: '1.0'
MACH_NAME: '' MACH_NAME: ''
MACH_NAME_TEST: '' MACH_NAME_TEST: ''
MANUFACTURER: ''
NEW_REL: '' NEW_REL: ''
NET_SHARE_X: '\\10.74.82.201\EgwTech' NET_SHARE_X: '\\10.74.82.201\EgwTech'
NET_SHARE_Z: '\\10.74.82.201\Artifacts' NET_SHARE_Z: '\\10.74.82.201\Artifacts'
NET_SHARE_S: '\\10.74.82.201\Scambio' NET_SHARE_S: '\\10.74.82.201\Scambio'
NET_SHARE_R: '\\10.74.82.201\EgwTech' NET_SHARE_R: '\\10.74.82.201\EgwTech'
NET_SHARE_H: '\\10.74.82.252\team drives'
NET_USERQ: 'steamw\egalware' NET_USERQ: 'steamw\egalware'
NET_USER_SERVICES: 'steamw\services'
MACH_VERS: '0.0.0.0' MACH_VERS: '0.0.0.0'
TEMP_PATH: 'C:\MachinesDeploy' TEMP_PATH: 'C:\MachinesDeploy'
MACHINES_PATH_R: 'R:\EgtData\Machines' MACHINES_PATH_R: 'R:\EgtData\Machines_GIT'
DEST_MACHINES_PATH_R: 'R:\EgtData\Machines\zTestYAML' DEST_MACHINES_PATH_H: 'H:'
SRC_PATH: '' SRC_PATH: ''
BASE_PATH: '' BASE_PATH: ''
TEST_PATH: '' TEST_PATH: ''
URL_VERSIONS_LOG: "https://liman.egalware.com/ELM.API/api/release/save"
MACH_VERS_NUM: '0.0.0.0'
CRITICAL_STRING: "#critical#"
TOOLS_MACHINE_PATH: ""
#Note compilazione LUA: #Note compilazione LUA:
# lua54 -o bin\$FileName -s $FileName: -o = output, -s = NON include i debug symbols # lua54 -o bin\$FileName -s $FileName: -o = output, -s = NON include i debug symbols
@@ -38,12 +46,29 @@ variables:
echo "-----------------------" echo "-----------------------"
echo " Copia macchina su R" echo " Copia macchina su R"
echo "-----------------------" echo "-----------------------"
ROBOCOPY /MIR "$env:SRC_PATH" "$env:DEST_MACHINES_PATH_R\$env:MACH_NAME\" /XD "bin" $customerPathR = $env:MACHINES_PATH_R + "\" + $env:MANUFACTURER
ROBOCOPY "$env:TEST_PATH" "$env:DEST_MACHINES_PATH_R\$env:MACH_NAME_TEST\" /E /XD "bin" ROBOCOPY /MIR "$env:SRC_PATH" "$customerPathR\$env:MACH_NAME\" /XD "bin"
ROBOCOPY /MIR "$env:BASE_PATH" "$env:DEST_MACHINES_PATH_R\Deploy\$env:MACH_NAME\$env:MACH_VERS\" /XD "bin" /XD "$env:MACH_NAME_TEST" ROBOCOPY "$env:TEST_PATH" "$customerPathR\_TestMachines\$env:MACH_NAME_TEST\" /E /XD "bin"
ROBOCOPY /MIR "$env:BASE_PATH" "$customerPathR\_Deploy\$env:MACH_NAME\$env:MACH_VERS\" /XD "bin" /XD "$env:MACH_NAME_TEST"
SLEEP 2 SLEEP 2
net use R: /delete net use R: /delete
# helper copia script verso drive condiviso
.ReplicaStor01: &ReplicaStor01
- |
net use H: /delete
SLEEP 2
net use H: $env:NET_SHARE_H /u:$env:NET_USER_SERVICES $SRVCS_PASSWD
echo "-----------------------"
echo " Copia macchina su stor01"
echo "-----------------------"
SLEEP 2
$customerPathH = $env:DEST_MACHINES_PATH_H + "\" + $env:MANUFACTURER + "\test"
$destinationPath = "$customerPathH\$env:MACH_NAME" + "\"
ROBOCOPY "$env:BASE_PATH" "$destinationPath\" *.zip
SLEEP 2
net use H: /delete
# helper copia script verso cartella di rete R:\ per develop # helper copia script verso cartella di rete R:\ per develop
.ReplicaR_DEV: &ReplicaR_DEV .ReplicaR_DEV: &ReplicaR_DEV
- | - |
@@ -53,7 +78,8 @@ variables:
echo "-----------------------" echo "-----------------------"
echo " Copia macchina su R - DEV" echo " Copia macchina su R - DEV"
echo "-----------------------" echo "-----------------------"
ROBOCOPY /MIR "$env:BASE_PATH" "$env:DEST_MACHINES_PATH_R\Deploy\$env:MACH_NAME\_DEV\$env:MACH_VERS\" /XD "bin" /XD "$env:MACH_NAME_TEST" $customerPathR = $env:MACHINES_PATH_R + "\" + $env:MANUFACTURER
ROBOCOPY /MIR "$env:BASE_PATH" "$customerPathR\_Deploy\$env:MACH_NAME\_DEV\$env:MACH_VERS\" /XD "bin" /XD "$env:MACH_NAME_TEST"
SLEEP 2 SLEEP 2
net use R: /delete net use R: /delete
@@ -66,8 +92,15 @@ variables:
echo "-----------------------" echo "-----------------------"
echo " Recupero file non git da R e copia su macchina virtuale" echo " Recupero file non git da R e copia su macchina virtuale"
echo "-----------------------" echo "-----------------------"
ROBOCOPY "$env:LAST_MACHINE_PATH" "$env:SRC_PATH" /E /XF "*.bat" /XF "*.yml" /XF ".gitignore" /XD ".git" /XF "UpdateLog.txt" /XD ".vscode" # test se la cartella con gli utensili esiste per questa macchina
ROBOCOPY "$env:LAST_MACHINE_PATH" "$env:SRC_PATH\bin\$env:MACH_NAME\" /E /XF "*.bat" /XF "*.yml" /XF ".gitignore" /XD ".git" /XF "UpdateLog.txt" /XD ".vscode" if (!(Test-Path -Path $env:TOOLS_MACHINE_PATH)) {
echo "-----------------------"
echo "CANNOT FIND TOOLS FOR THIS MACHINE!!"
echo "-----------------------"
Exit 1}
ROBOCOPY "$env:TOOLS_MACHINE_PATH" "$env:SRC_PATH" /E /XF "*.bat" /XF "*.yml" /XF ".gitignore" /XD ".git" /XF "UpdateLog.txt" /XD ".vscode"
ROBOCOPY "$env:TOOLS_MACHINE_PATH" "$env:TEST_PATH" /E /XF "*.bat" /XF "*.yml" /XF ".gitignore" /XD ".git" /XF "UpdateLog.txt" /XD ".vscode"
ROBOCOPY "$env:TOOLS_MACHINE_PATH" "$env:SRC_PATH\bin\$env:MACH_NAME\" /E /XF "*.bat" /XF "*.yml" /XF ".gitignore" /XD ".git" /XF "UpdateLog.txt" /XD ".vscode"
SLEEP 2 SLEEP 2
net use R: /delete net use R: /delete
@@ -86,22 +119,25 @@ variables:
echo "-----------------------" echo "-----------------------"
echo " Compilazione file *.lua 32/64bit" echo " Compilazione file *.lua 32/64bit"
echo "-----------------------" echo "-----------------------"
$FileList = Get-ChildItem("Common-*") $FileList = Get-ChildItem * -Include( "*.mlpe", "*.mlse")
ForEach ($File in $FileList) { ForEach ($File in $FileList) {
$FileName = Split-Path $File -leaf $FileName = Split-Path $File -leaf
lua54 -o $env:SRC_PATH\bin\$env:MACH_NAME\$FileName -s $FileName lua54 -o $env:SRC_PATH\bin\$env:MACH_NAME\$FileName -s $FileName
echo "lua54 -o bin\$FileName -s $FileName" echo "lua54 -o bin\$FileName -s $FileName"
} }
# helper recupero nome macchina # helper recupero nome macchina e costruttore
.machName-fix: &machName-fix .machName-fix: &machName-fix
- | - |
echo "-----------------------" echo "-----------------------"
echo " Recupero nome macchina" echo " Recupero nome macchina e costruttore"
echo "-----------------------" echo "-----------------------"
$fileName = dir *.mlde $fileName = dir *.mlde
$env:MACH_NAME = $fileName.BaseName $env:MACH_NAME = $fileName.BaseName
$env:MACH_NAME_TEST = $env:MACH_NAME + ".TEST" $env:MACH_NAME_TEST = $env:MACH_NAME + ".TEST"
$comp = $fileName.BaseName -split "-"
$env:MANUFACTURER = $comp[0]
Write-Output $env:MANUFACTURER
# helper calcolo versione # helper calcolo versione
.version-fix: &version-fix .version-fix: &version-fix
@@ -109,12 +145,22 @@ variables:
echo "-----------------------" echo "-----------------------"
echo " Calcolo versione" echo " Calcolo versione"
echo "-----------------------" echo "-----------------------"
# calcolo versione formato stringa
$fPath = "$env:MACH_NAME.mlde"; $fPath = "$env:MACH_NAME.mlde";
$vLine = Select-String -path $fPath -Pattern 'PP_VER'; $vLine = Select-String -path $fPath -Pattern '^PP_VER';
$comp = $vLine -split "="; $comp = $vLine -split "=";
$env:MACH_VERS = $comp[1].Replace("'","").Trim() $env:MACH_VERS = $comp[1].Replace("'","").Trim()
# display versione # display versione formato stringa
Write-Output $env:MACH_VERS; Write-Output $env:MACH_VERS
# calcolo versione formato numerico
$fPath = "$env:MACH_NAME.mlde";
$vLine = Select-String -path $fPath -Pattern '^PP_NVER';
$comp = $vLine -split "=";
$env:MACH_VERS_NUM = $comp[1].Replace("'","").Trim()
# display versione formato numerico
Write-Output $env:MACH_VERS_NUM
# helper calcolo versione se develop # helper calcolo versione se develop
.version-fix_DEV: &version-fix_DEV .version-fix_DEV: &version-fix_DEV
@@ -126,7 +172,7 @@ variables:
$commitAuthor = $commitAuthor[0].Trim() $commitAuthor = $commitAuthor[0].Trim()
$env:MACH_VERS = $commitAuthor $env:MACH_VERS = $commitAuthor
# display versione # display versione
Write-Output $env:MACH_VERS; Write-Output $env:MACH_VERS
# helper creazione folders # helper creazione folders
.folder-fix: &folder-fix .folder-fix: &folder-fix
@@ -134,8 +180,8 @@ variables:
echo "-----------------------" echo "-----------------------"
echo " Creazione cartelle su macchina virtuale" echo " Creazione cartelle su macchina virtuale"
echo "-----------------------" echo "-----------------------"
$env:LAST_MACHINE_PATH = "$env:MACHINES_PATH_R\$env:MACH_NAME"; $env:TOOLS_MACHINE_PATH = "$env:MACHINES_PATH_R\$env:MANUFACTURER\_DefaultMachineSetup\$env:MACH_NAME"
Write-Output $env:LAST_MACHINE_PATH; Write-Output $env:TOOLS_MACHINE_PATH
$env:SRC_PATH = "$env:TEMP_PATH\$env:MACH_NAME\$env:MACH_VERS\$env:MACH_NAME"; $env:SRC_PATH = "$env:TEMP_PATH\$env:MACH_NAME\$env:MACH_VERS\$env:MACH_NAME";
$env:BASE_PATH = "$env:TEMP_PATH\$env:MACH_NAME\$env:MACH_VERS"; $env:BASE_PATH = "$env:TEMP_PATH\$env:MACH_NAME\$env:MACH_VERS";
$env:TEST_PATH = "$env:TEMP_PATH\$env:MACH_NAME\$env:MACH_VERS\$env:MACH_NAME_TEST"; $env:TEST_PATH = "$env:TEMP_PATH\$env:MACH_NAME\$env:MACH_VERS\$env:MACH_NAME_TEST";
@@ -158,6 +204,39 @@ variables:
7zip a -tzip $Target $Source 7zip a -tzip $Target $Source
Write-Output "called ZIP $Source --> $Target" Write-Output "called ZIP $Source --> $Target"
# helper invio notifica a log versioni online (LiMan)
.SendToVersionsLog: &SendToVersionsLog
- |
echo "-----------------------"
echo " Invio versione a log online"
echo "-----------------------"
$tags = ""
$date = ""
# se critico scrive tag
if ( $CI_COMMIT_MESSAGE | Select-String -Pattern $env:CRITICAL_STRING) {
$tags = "CRITICAL"
$date = (Get-Date).AddDays(1).toString("yyyy-MM-ddTHH:mm:ss.fffZ")
}
else
{
$date = (Get-Date).AddDays(3).toString("yyyy-MM-ddTHH:mm:ss.fffZ")
}
$body =
@{
codInst = "EgalWare"
codApp = $env:MACH_NAME
uplAppId = "UpdateManager"
masterKey = $LiMan_Key
tipo = "Machine"
versNum = $env:MACH_VERS_NUM
versText = $env:MACH_VERS
releaseDate = $date
relTags = $tags
}
$jsonBody = ConvertTo-Json -InputObject $body
echo $jsonBody
Invoke-WebRequest -Method Post -URI $env:URL_VERSIONS_LOG -ContentType "application/json" -Body $jsonBody -UseBasicParsing
# helper esecuzione test # helper esecuzione test
.RunTest: &RunTest .RunTest: &RunTest
@@ -186,6 +265,8 @@ LuaCompile:build:
- *LuaCompile - *LuaCompile
- *ZipClean - *ZipClean
- *ReplicaR - *ReplicaR
- *ReplicaStor01
- *SendToVersionsLog
LuaCompileDev:build: LuaCompileDev:build:
stage: build stage: build
@@ -233,4 +314,5 @@ LuaCompileDev:build:
# script: # script:
# - *LuaCompile # - *LuaCompile
# - *ZipClean # - *ZipClean
# - *ReplicaR # - *ReplicaR
+60 -14
View File
@@ -8,6 +8,9 @@ local BeamData = {
GO_FAST = 0, -- flag abilitazione modalità veloce (0=no, 1=carrelli, 2=anche cambio utensili) GO_FAST = 0, -- flag abilitazione modalità veloce (0=no, 1=carrelli, 2=anche cambio utensili)
RIGHT_LOAD = false, -- flag carico da destra RIGHT_LOAD = false, -- flag carico da destra
ROT90 = false, -- flag abilitazione rotazione 90 gradi ROT90 = false, -- flag abilitazione rotazione 90 gradi
ROT180 = true, -- flag abilitazione rotazione 180 gradi
NEWCLAMPING = false, -- flag abilitazione nuovo metodo riposizionamento carrelli
FASTCLAMPING= true, -- flag abilitazione riduzione numero riposizionamenti al carico e durante grande trascinamento
MIN_WIDTH = 40, -- larghezza minima del grezzo MIN_WIDTH = 40, -- larghezza minima del grezzo
MIN_HEIGHT = 40, -- altezza minima del grezzo MIN_HEIGHT = 40, -- altezza minima del grezzo
MAX_WIDTH = 240, -- larghezza massima del grezzo MAX_WIDTH = 240, -- larghezza massima del grezzo
@@ -68,7 +71,11 @@ local BeamData = {
MAX_LEN_BH_FROM_BOTTOM = 195, -- massima lunghezza lavorabile da un lato di block haus da sotto MAX_LEN_BH_FROM_BOTTOM = 195, -- massima lunghezza lavorabile da un lato di block haus da sotto
MAX_DIST_BH_FROM_BOTTOM = 395, -- massima distanza tra naso mandrino e sopra della trave senza collisione MAX_DIST_BH_FROM_BOTTOM = 395, -- massima distanza tra naso mandrino e sopra della trave senza collisione
BH_MACHINE = false, -- flag che indica la tipologia di macchina configurata BlockHaus BH_MACHINE = false, -- flag che indica la tipologia di macchina configurata BlockHaus
ANG_TRASM = false -- presenza rinvio angolare per lavorazioni da sotto ANG_TRASM = false, -- presenza rinvio angolare per lavorazioni da sotto
PRECUT_HEAD = true, -- flag abilitazione pretaglio grezzo a zero in testa
PRECUT_TAIL = true, -- flag abilitazione pretaglio grezzo a zero in coda
MIN_HEIGHT_ADDED_CUTS = 400, -- altezza minima pezzo per effettuare tagli orizzontali aggiuntivi in testa e coda
GAIN_RECLAMPING = 1000 -- in caso di scarso pinzaggio, mm da recuperare con pinzaggio ulteriore prima di spostare
} }
-- Aggiornamento con dati da TechnoEssetre7 -- Aggiornamento con dati da TechnoEssetre7
@@ -84,15 +91,27 @@ if EgtExistsFile( sData) then
local Machine = dofile( sData) local Machine = dofile( sData)
if Machine then if Machine then
if Machine.Offsets then if Machine.Offsets then
BeamData.ANG_TRASM = ( Machine.Offsets.SECSUP and Machine.Offsets.SECSUP >= 3) BeamData.ANG_TRASM = ( Machine.Offsets.SECSUP and Machine.Offsets.SECSUP >= 3)
BeamData.BH_MACHINE = ( Machine.Offsets.BLOCKHAUS == 1) BeamData.BH_MACHINE = ( Machine.Offsets.BLOCKHAUS == 1)
BeamData.MINRAW_S = max( BeamData.MINRAW_S, Machine.Offsets.MINRAW_S or BeamData.MINRAW_S) BeamData.MINRAW_S = max( BeamData.MINRAW_S, Machine.Offsets.MINRAW_S or BeamData.MINRAW_S)
BeamData.MINRAW_L = max( BeamData.MINRAW_L, Machine.Offsets.MINRAW_L or BeamData.MINRAW_L) BeamData.MINRAW_L = max( BeamData.MINRAW_L, Machine.Offsets.MINRAW_L or BeamData.MINRAW_L)
BeamData.CUT_EXTRA = Machine.Offsets.CUT_EXTRA or BeamData.CUT_EXTRA BeamData.CUT_EXTRA = Machine.Offsets.CUT_EXTRA or BeamData.CUT_EXTRA
BeamData.CUT_EXTRA_MIN = Machine.Offsets.CUT_EXTRA_MIN or BeamData.CUT_EXTRA_MIN BeamData.CUT_EXTRA_MIN = Machine.Offsets.CUT_EXTRA_MIN or BeamData.CUT_EXTRA_MIN
BeamData.DIM_STRIP_SMALL = Machine.Offsets.DIM_STRIP_SMALL or BeamData.DIM_STRIP_SMALL BeamData.DIM_STRIP_SMALL = Machine.Offsets.DIM_STRIP_SMALL or BeamData.DIM_STRIP_SMALL
BeamData.DIM_TO_CENTER_STRIP = Machine.Offsets.DIM_TO_CENTER_STRIP or BeamData.DIM_TO_CENTER_STRIP BeamData.DIM_TO_CENTER_STRIP = Machine.Offsets.DIM_TO_CENTER_STRIP or BeamData.DIM_TO_CENTER_STRIP
BeamData.MAXDIAM_POCK_CORNER = Machine.Offsets.MAXDIAM_POCK_CORNER or BeamData.MAXDIAM_POCK_CORNER BeamData.MAXDIAM_POCK_CORNER = Machine.Offsets.MAXDIAM_POCK_CORNER or BeamData.MAXDIAM_POCK_CORNER
BeamData.LONGCUT_ENDLEN = Machine.Offsets.LONGCUT_ENDLEN or BeamData.LONGCUT_ENDLEN
BeamData.LONGCUT_MAXLEN = Machine.Offsets.LONGCUT_MAXLEN or BeamData.LONGCUT_MAXLEN
BeamData.ADVANCE_TAIL_OFFS = Machine.Offsets.ADVANCE_TAIL_OFFS or BeamData.ADVANCE_TAIL_OFFS
BeamData.LEN_VERY_SHORT_PART = Machine.Offsets.LEN_VERY_SHORT_PART or BeamData.LEN_VERY_SHORT_PART
BeamData.LEN_SHORT_PART = Machine.Offsets.LEN_SHORT_PART or BeamData.LEN_SHORT_PART
if Machine.Offsets.PRECUT_HEAD_DISABLE then BeamData.PRECUT_HEAD = ( Machine.Offsets.PRECUT_HEAD_DISABLE == 0) end
if Machine.Offsets.PRECUT_TAIL_DISABLE then BeamData.PRECUT_TAIL = ( Machine.Offsets.PRECUT_TAIL_DISABLE == 0) end
if Machine.Offsets.MIN_HEIGHT_ADDED_CUTS then BeamData.MIN_HEIGHT_ADDED_CUTS = min( Machine.Offsets.MIN_HEIGHT_ADDED_CUTS, BeamData.MIN_HEIGHT_ADDED_CUTS) end
if Machine.Offsets.NEWCLAMPING ~= nil then BeamData.NEWCLAMPING = ( Machine.Offsets.NEWCLAMPING == 1) end
if Machine.Offsets.FASTCLAMPING ~= nil then BeamData.FASTCLAMPING = ( Machine.Offsets.FASTCLAMPING == 1) end
if Machine.Offsets.ROT90 ~= nil then BeamData.ROT90 = ( Machine.Offsets.ROT90 == 1) end
if Machine.Offsets.ROT180 ~= nil then BeamData.ROT180 = ( Machine.Offsets.ROT180 == 1) end
end end
if Machine.Trave then if Machine.Trave then
BeamData.MIN_WIDTH = Machine.Trave.XMIN or BeamData.MIN_WIDTH BeamData.MIN_WIDTH = Machine.Trave.XMIN or BeamData.MIN_WIDTH
@@ -156,11 +175,11 @@ end
BeamData.GetBlockedAxis = GetBlockedAxis BeamData.GetBlockedAxis = GetBlockedAxis
--------------------------------------------------------------------- ---------------------------------------------------------------------
local function GetChainSawInitAngs( vtN, vtO) local function GetChainSawInitAngs( vtN, vtO, nInd)
if vtN:getY() > 0 and vtO:getX() > 0 then if nInd == 1 then
return 'C=0'
else
return '' return ''
else
return EgtIf( vtN:getY() > 0, 'C=180', 'C=-180')
end end
end end
BeamData.GetChainSawInitAngs = GetChainSawInitAngs BeamData.GetChainSawInitAngs = GetChainSawInitAngs
@@ -201,5 +220,32 @@ local function GetSetupInfo( sHead)
end end
BeamData.GetSetupInfo = GetSetupInfo BeamData.GetSetupInfo = GetSetupInfo
---------------------------------------------------------------------
local function GetMaxMatReductionBladeCut( sHead, vtDir)
local MaxMatReductionBladeCut = 0
-- la lama è montata solo su H2, non si controllano altre teste
if sHead == 'H2' then
if BeamData.NEWTOPC == nil or BeamData.NEWTOPC then
MaxMatReductionBladeCut = -65
end
if AreSameVectorApprox( vtDir, X_AX()) then
MaxMatReductionBladeCut = MaxMatReductionBladeCut + 175
elseif AreSameVectorApprox( vtDir, -X_AX()) then
MaxMatReductionBladeCut = MaxMatReductionBladeCut + 175
elseif AreSameVectorApprox( vtDir, Y_AX()) then
MaxMatReductionBladeCut = MaxMatReductionBladeCut + 175
elseif AreSameVectorApprox( vtDir, -Y_AX()) then
MaxMatReductionBladeCut = MaxMatReductionBladeCut + 175
elseif AreSameVectorApprox( vtDir, Z_AX()) then
MaxMatReductionBladeCut = 80
elseif AreSameVectorApprox( vtDir, -Z_AX()) then
MaxMatReductionBladeCut = 80
end
MaxMatReductionBladeCut = MaxMatReductionBladeCut + BeamData.COLL_SIC
end
return MaxMatReductionBladeCut + BeamData.COLL_SIC
end
BeamData.GetMaxMatReductionBladeCut = GetMaxMatReductionBladeCut
--------------------------------------------------------------------- ---------------------------------------------------------------------
return BeamData return BeamData
+75 -5
View File
@@ -3,6 +3,7 @@
-- carico librerie -- carico librerie
local INFO_STD_PP = require( 'Version') local INFO_STD_PP = require( 'Version')
local BD = require( 'BeamData')
-- Variabili di modulo -- Variabili di modulo
local CSP_INFO = INFO_STD_PP.NAME..' ver.'..INFO_STD_PP.VERSION..' by EgalWare s.r.l.' local CSP_INFO = INFO_STD_PP.NAME..' ver.'..INFO_STD_PP.VERSION..' by EgalWare s.r.l.'
@@ -602,6 +603,8 @@ end
--------------------------------------------------------------------- ---------------------------------------------------------------------
function OnRapid() function OnRapid()
-- recupero prossimo utensile
EMT.NEXTTOOL, EMT.NEXTHEAD, EMT.NEXTTCPOS = FindNextTool()
MyBackupAxes() MyBackupAxes()
-- se primo movimento della lavorazione, gestione speciale -- se primo movimento della lavorazione, gestione speciale
if EMT.MCHFIRST and not EMT.OPEISDISP then if EMT.MCHFIRST and not EMT.OPEISDISP then
@@ -649,7 +652,7 @@ function OnRapid()
local sES = ' ES'..EgtNumToString( EMT.S, 0) local sES = ' ES'..EgtNumToString( EMT.S, 0)
-- se carico motosega, ruoto in zona sicura prima di approcciare la lavorazione -- se carico motosega, ruoto in zona sicura prima di approcciare la lavorazione
if EMT.HEAD == 'H3' and EMT.ST > BeamHeightForFixRot and EMT.FLAG2 == 1 then if ( EMT.HEAD == 'H3' or ( bZmax and EMT.TTOTLEN > 200)) and EMT.ST > BeamHeightForFixRot and EMT.FLAG2 == 1 then
local sEEPreMove = ' EE' .. EgtIf( bZmax, '3', '4') local sEEPreMove = ' EE' .. EgtIf( bZmax, '3', '4')
local sOutPreMove = 'G101' .. ' X' .. EmtLenToString( -SafeXRotAxes, 3) .. ' Z' .. EmtLenToString( MyZHome, 3) .. local sOutPreMove = 'G101' .. ' X' .. EmtLenToString( -SafeXRotAxes, 3) .. ' Z' .. EmtLenToString( MyZHome, 3) ..
EmtGetAxis( 'R2') .. EmtGetAxis( 'R1') .. sEE .. sEL .. sER .. sET .. sES EmtGetAxis( 'R2') .. EmtGetAxis( 'R1') .. sEE .. sEL .. sER .. sET .. sES
@@ -833,12 +836,47 @@ function OnRapid()
EmtAdjustRotaryAxes() EmtAdjustRotaryAxes()
EmitZmax() EmitZmax()
EMT.ZMAX = true EMT.ZMAX = true
-- se pezzi alti e devo cambiare utensile su testa con CU, porto la testa vicino al cambio utensile
if EMT.ST > BeamHeightForFixRot and EMT.HEAD == 'H1' and EMT.TOOL ~= EMT.NEXTTOOL and EMT.NEXTHEAD ~= 'H2' then
local dBAxis = 90
local dCAxis = EgtIf( BD.RIGHT_LOAD, 90, -90)
local sEE = ' EE3'
local sEL = ' EL' .. EmtLenToString( EgtIf( EMT.HEAD ~= 'H3', EMT.TLEN, ( EMT.TDIST or ChSawLen)), 3)
local sER = ' ER' .. EmtLenToString( EgtIf( EMT.HEAD ~= 'H3', EMT.TDIAM / 2, EMT.TLEN), 3)
local sET = GetET( EMT.HEAD, EMT.TCPOS, EMT.R3)
local sES = ' ES'..EgtNumToString( EMT.S, 0)
local sOut = 'G101' .. EmtGetAxis( 'L2') .. EmtGetAxis( 'L3') ..' B=' .. EgtNumToString( dBAxis, 3) ..
' C=' .. EgtNumToString( dCAxis, 3) .. sEE .. sEL .. sER .. sET .. sES
EmtOutput( sOut)
EmtOutput( 'G101 ET1001')
EmtOutput( 'G101 ET2001')
sOut = 'G101' .. ' X' .. EmtLenToString( -SafeXRotAxes, 3) .. EmtGetAxis( 'L3') ..' B=' .. EgtNumToString( dBAxis, 3) ..
' C=' .. EgtNumToString( dCAxis, 3) .. sEE .. sEL .. sER .. sET .. sES
EmtOutput( sOut)
EmtOutput( 'G101 ET1001')
EmtOutput( 'G101 ET2001')
end
-- se altrimenti movimento in Home -- se altrimenti movimento in Home
elseif EMT.FLAG == 4 then elseif EMT.FLAG == 4 then
-- non previsto -- non previsto
-- se altrimenti rotazione a Z max -- se altrimenti rotazione a Z max per lavorazione successiva
elseif EMT.FLAG == 5 then elseif EMT.FLAG == 5 then
-- viene gestito all'inizio della lavorazione successiva EMT.REFLOC = nil
EMT.IPLGL = false
MyAdjustLinearAxes()
EmtAdjustRotaryAxes()
EmtResetPrev()
-- ricavo i dati per la lavorazione
local sEE = ' EE3'
local sEL = ' EL' .. EmtLenToString( EgtIf( EMT.HEAD ~= 'H3', EMT.TLEN, ( EMT.TDIST or ChSawLen)), 3)
local sER = ' ER' .. EmtLenToString( EgtIf( EMT.HEAD ~= 'H3', EMT.TDIAM / 2, EMT.TLEN), 3)
local sET = GetET( EMT.HEAD, EMT.TCPOS, EMT.R3)
local sES = ' ES'..EgtNumToString( EMT.S, 0)
local sOut = 'G101' .. EmtGetAxis( 'L2') .. EmtGetAxis( 'L3') ..
EmtGetAxis( 'R2') .. EmtGetAxis( 'R1') .. sEE .. sEL .. sER .. sET .. sES
EmtOutput( sOut)
EmtOutput( 'G101 ET1001')
EmtOutput( 'G101 ET2001')
-- altrimenti errore -- altrimenti errore
else else
EmtSetLastError( 1212, "Unknown Rapid flag") EmtSetLastError( 1212, "Unknown Rapid flag")
@@ -941,6 +979,35 @@ function OnArc()
EmtUpdatePrev() EmtUpdatePrev()
end end
---------------------------------------------------------------------
function FindNextTool()
-- salvo stato iniziale
local CurrMachId = EgtGetCurrMachining()
local CurrTool = EgtTdbGetCurrToolParam( MCH_TP.NAME)
-- cerco lavorazione con utensile su gruppo testa indicato
local sTool, sHead, sTcPos
local OpId = EgtGetNextActiveOperation( CurrMachId or EMT.MCHID)
while OpId do
local nType = EgtGetOperationType( OpId)
if nType ~= MCH_OY.NONE and nType ~= MCH_OY.DISP then
if EgtSetCurrMachining( OpId) then
sTool = EgtGetMachiningParam( MCH_MP.TOOL)
if EgtTdbSetCurrTool( sTool) then
sHead = EgtTdbGetCurrToolParam( MCH_TP.HEAD)
sTcPos = EgtTdbGetCurrToolParam( MCH_TP.TCPOS)
break
end
end
end
OpId = EgtGetNextActiveOperation( OpId)
end
-- ripristino stato iniziale
EgtSetCurrMachining( CurrMachId or GDB_ID.NULL)
EgtTdbSetCurrTool( CurrTool or '')
-- restituisco risultato
return sTool, sHead, sTcPos
end
--------------------------------------------------------------------- ---------------------------------------------------------------------
function CalcCharStatus( sCmd, bSkipPress) function CalcCharStatus( sCmd, bSkipPress)
-- aperto -- aperto
@@ -1465,7 +1532,10 @@ function MyAdjustLinearAxes()
if EMT.REFLOC then if EMT.REFLOC then
local vtE local vtE
if EMT.HEAD ~= 'H3' then -- su NUM aggregati non gestiti
if EMT.HEAD == 'H5' or EMT.HEAD == 'H6' or EMT.HEAD == 'H7' then
EmtSetLastError( 1211, "Aggregates not managed")
elseif EMT.HEAD ~= 'H3' then
local Len = EMT.TLEN + EgtIf( EMT.HEAD == 'H1', MillOffs, abs( SawOffs)) local Len = EMT.TLEN + EgtIf( EMT.HEAD == 'H1', MillOffs, abs( SawOffs))
local LenRef = MillOffs local LenRef = MillOffs
vtE = Vector3d( EMT.EXTR) * Len - Z_AX() * LenRef vtE = Vector3d( EMT.EXTR) * Len - Z_AX() * LenRef
@@ -1580,7 +1650,7 @@ end
--------------------------------------------------------------------- ---------------------------------------------------------------------
function GetET( sHead, sTcPos, dAxR3) function GetET( sHead, sTcPos, dAxR3)
if sHead == 'H1' then if sHead == 'H1' or sHead == 'H5' or sHead == 'H6' or sHead == 'H7' then
return ' E'..sTcPos return ' E'..sTcPos
elseif sHead == 'H2' then elseif sHead == 'H2' then
return ' ET42' return ' ET42'
@@ -3,6 +3,7 @@
-- carico librerie -- carico librerie
local INFO_STD_PP = require( 'Version') local INFO_STD_PP = require( 'Version')
local BD = require( 'BeamData')
-- Variabili di modulo -- Variabili di modulo
local CSP_INFO = INFO_STD_PP.NAME..' ver.'..INFO_STD_PP.VERSION..' by EgalWare s.r.l.' local CSP_INFO = INFO_STD_PP.NAME..' ver.'..INFO_STD_PP.VERSION..' by EgalWare s.r.l.'
@@ -144,7 +145,11 @@ function OnToolData()
local sPos = 'N2' .. tostring(nPos) local sPos = 'N2' .. tostring(nPos)
local sOut = 'L11=' .. EmtLenToString( EMT.SMAX, 3) .. ' L12=' .. EmtLenToString( AngTr1Offs, 1)..' G76H9998.1'..sPos..sPos local sOut = 'L11=' .. EmtLenToString( EMT.SMAX, 3) .. ' L12=' .. EmtLenToString( AngTr1Offs, 1)..' G76H9998.1'..sPos..sPos
EmtOutput( sOut) EmtOutput( sOut)
-- altro non previsto -- emissione dati sega a catena
elseif EMT.HEAD == 'H7' then
local sOut = 'L11='..EgtNumToString( EMT.SMAX, 0)..' L12='..EmtLenToString( ( 154.5), 1)..' G76H9998.1N121N121'
EmtOutput( sOut)
-- altro non previsto
end end
end end
@@ -642,6 +647,8 @@ end
--------------------------------------------------------------------- ---------------------------------------------------------------------
function OnRapid() function OnRapid()
-- recupero prossimo utensile
EMT.NEXTTOOL, EMT.NEXTHEAD, EMT.NEXTTCPOS = FindNextTool()
MyBackupAxes() MyBackupAxes()
-- se primo movimento della lavorazione, gestione speciale -- se primo movimento della lavorazione, gestione speciale
if EMT.MCHFIRST and not EMT.OPEISDISP then if EMT.MCHFIRST and not EMT.OPEISDISP then
@@ -690,7 +697,7 @@ function OnRapid()
if EMT.HEAD == 'H3' then if EMT.HEAD == 'H3' then
sEL = sEL..EmtLenToString( ( EMT.TDIST or ChSawLen), 3) sEL = sEL..EmtLenToString( ( EMT.TDIST or ChSawLen), 3)
-- se aggregato -- se aggregato
elseif EMT.HEAD == 'H5' or EMT.HEAD == 'H6' then elseif EMT.HEAD == 'H5' or EMT.HEAD == 'H6' or EMT.HEAD == 'H7' then
sEL = sEL..EmtLenToString( AngTr1Offs, 3) sEL = sEL..EmtLenToString( AngTr1Offs, 3)
-- se testa normale ( H1 or H2) -- se testa normale ( H1 or H2)
else else
@@ -702,7 +709,7 @@ function OnRapid()
if EMT.HEAD == 'H3' then if EMT.HEAD == 'H3' then
sER = sER..EmtLenToString( EMT.TLEN, 3) sER = sER..EmtLenToString( EMT.TLEN, 3)
-- se aggregato -- se aggregato
elseif EMT.HEAD == 'H5' or EMT.HEAD == 'H6' then elseif EMT.HEAD == 'H5' or EMT.HEAD == 'H6' or EMT.HEAD == 'H7' then
sER = sER..EmtLenToString( EMT.TLEN + AngTr1Len, 3) sER = sER..EmtLenToString( EMT.TLEN + AngTr1Len, 3)
-- se testa normale ( H1 or H2) -- se testa normale ( H1 or H2)
else else
@@ -713,7 +720,7 @@ function OnRapid()
local sES = ' ES'..EgtNumToString( EMT.S, 0) local sES = ' ES'..EgtNumToString( EMT.S, 0)
-- se carico motosega, ruoto in zona sicura prima di approcciare la lavorazione -- se carico motosega, ruoto in zona sicura prima di approcciare la lavorazione
if EMT.HEAD == 'H3' and EMT.ST > BeamHeightForFixRot and EMT.FLAG2 == 1 then if ( EMT.HEAD == 'H3' or ( bZmax and EMT.TTOTLEN > 200)) and EMT.ST > BeamHeightForFixRot and EMT.FLAG2 == 1 then
local sEEPreMove = ' EE' .. EgtIf( bZmax, '3', '4') local sEEPreMove = ' EE' .. EgtIf( bZmax, '3', '4')
local sOutPreMove = 'G101' .. ' X' .. EmtLenToString( -SafeXRotAxes, 3) .. ' Z' .. EmtLenToString( MyZHome, 3) .. local sOutPreMove = 'G101' .. ' X' .. EmtLenToString( -SafeXRotAxes, 3) .. ' Z' .. EmtLenToString( MyZHome, 3) ..
EmtGetAxis( 'R2') .. EmtGetAxis( 'R1') .. sEE .. sEL .. sER .. sET .. sES EmtGetAxis( 'R2') .. EmtGetAxis( 'R1') .. sEE .. sEL .. sER .. sET .. sES
@@ -907,12 +914,47 @@ function OnRapid()
EmtAdjustRotaryAxes() EmtAdjustRotaryAxes()
EmitZmax( false) EmitZmax( false)
EMT.ZMAX = true EMT.ZMAX = true
-- se pezzi alti e devo cambiare utensile su testa con CU, porto la testa vicino al cambio utensile
if EMT.ST > BeamHeightForFixRot and EMT.HEAD == 'H1' and EMT.TOOL ~= EMT.NEXTTOOL and EMT.NEXTHEAD ~= 'H2' then
local dBAxis = 90
local dCAxis = EgtIf( BD.RIGHT_LOAD, 90, -90)
local sEE = ' EE3'
local sEL = ' EL' .. EmtLenToString( EgtIf( EMT.HEAD ~= 'H3', EMT.TLEN, ( EMT.TDIST or ChSawLen)), 3)
local sER = ' ER' .. EmtLenToString( EgtIf( EMT.HEAD ~= 'H3', EMT.TDIAM / 2, EMT.TLEN), 3)
local sET = GetET( EMT.HEAD, EMT.TCPOS, EMT.R3)
local sES = ' ES'..EgtNumToString( EMT.S, 0)
local sOut = 'G101' .. EmtGetAxis( 'L2') .. EmtGetAxis( 'L3') ..' B=' .. EgtNumToString( dBAxis, 3) ..
' C=' .. EgtNumToString( dCAxis, 3) .. sEE .. sEL .. sER .. sET .. sES
EmtOutput( sOut)
EmtOutput( 'G101 ET1001')
EmtOutput( 'G101 ET2001')
sOut = 'G101' .. ' X' .. EmtLenToString( -SafeXRotAxes, 3) .. EmtGetAxis( 'L3') ..' B=' .. EgtNumToString( dBAxis, 3) ..
' C=' .. EgtNumToString( dCAxis, 3) .. sEE .. sEL .. sER .. sET .. sES
EmtOutput( sOut)
EmtOutput( 'G101 ET1001')
EmtOutput( 'G101 ET2001')
end
-- se altrimenti movimento in Home -- se altrimenti movimento in Home
elseif EMT.FLAG == 4 then elseif EMT.FLAG == 4 then
-- non previsto -- non previsto
-- se altrimenti rotazione a Z max -- se altrimenti rotazione a Z max per lavorazione successiva
elseif EMT.FLAG == 5 then elseif EMT.FLAG == 5 then
-- viene gestito all'inizio della lavorazione successiva EMT.REFLOC = nil
EMT.IPLGL = false
MyAdjustLinearAxes()
EmtAdjustRotaryAxes()
EmtResetPrev()
-- ricavo i dati per la lavorazione
local sEE = ' EE3'
local sEL = ' EL' .. EmtLenToString( EgtIf( EMT.HEAD ~= 'H3', EMT.TLEN, ( EMT.TDIST or ChSawLen)), 3)
local sER = ' ER' .. EmtLenToString( EgtIf( EMT.HEAD ~= 'H3', EMT.TDIAM / 2, EMT.TLEN), 3)
local sET = GetET( EMT.HEAD, EMT.TCPOS, EMT.R3)
local sES = ' ES'..EgtNumToString( EMT.S, 0)
local sOut = 'G101' .. EmtGetAxis( 'L2') .. EmtGetAxis( 'L3') ..
EmtGetAxis( 'R2') .. EmtGetAxis( 'R1') .. sEE .. sEL .. sER .. sET .. sES
EmtOutput( sOut)
EmtOutput( 'G101 ET1001')
EmtOutput( 'G101 ET2001')
-- altrimenti errore -- altrimenti errore
else else
EmtSetLastError( 1212, "Unknown Rapid flag") EmtSetLastError( 1212, "Unknown Rapid flag")
@@ -979,7 +1021,7 @@ end
--------------------------------------------------------------------- ---------------------------------------------------------------------
function OnArc() function OnArc()
-- con aggregato non si possono fare archi. Deve essere tutto spezzato -- con aggregato non si possono fare archi. Deve essere tutto spezzato
if EMT.HEAD == 'H5' or EMT.HEAD == 'H6' then if EMT.HEAD == 'H5' or EMT.HEAD == 'H6' or EMT.HEAD == 'H7' then
EmtSetLastError( 1211, "With aggregate, the arcs must be splitted") EmtSetLastError( 1211, "With aggregate, the arcs must be splitted")
end end
@@ -1020,6 +1062,35 @@ function OnArc()
EmtUpdatePrev() EmtUpdatePrev()
end end
---------------------------------------------------------------------
function FindNextTool()
-- salvo stato iniziale
local CurrMachId = EgtGetCurrMachining()
local CurrTool = EgtTdbGetCurrToolParam( MCH_TP.NAME)
-- cerco lavorazione con utensile su gruppo testa indicato
local sTool, sHead, sTcPos
local OpId = EgtGetNextActiveOperation( CurrMachId or EMT.MCHID)
while OpId do
local nType = EgtGetOperationType( OpId)
if nType ~= MCH_OY.NONE and nType ~= MCH_OY.DISP then
if EgtSetCurrMachining( OpId) then
sTool = EgtGetMachiningParam( MCH_MP.TOOL)
if EgtTdbSetCurrTool( sTool) then
sHead = EgtTdbGetCurrToolParam( MCH_TP.HEAD)
sTcPos = EgtTdbGetCurrToolParam( MCH_TP.TCPOS)
break
end
end
end
OpId = EgtGetNextActiveOperation( OpId)
end
-- ripristino stato iniziale
EgtSetCurrMachining( CurrMachId or GDB_ID.NULL)
EgtTdbSetCurrTool( CurrTool or '')
-- restituisco risultato
return sTool, sHead, sTcPos
end
--------------------------------------------------------------------- ---------------------------------------------------------------------
function CalcDinamicaPinze( dH, dS, dL) function CalcDinamicaPinze( dH, dS, dL)
local MinTempoAcc = 0.3 -- [s] local MinTempoAcc = 0.3 -- [s]
@@ -1575,11 +1646,16 @@ function MyAdjustLinearAxes()
local LenRef = MillOffs local LenRef = MillOffs
local vtAux = EgtGetCalcAuxDirFromAngles( EMT.R1, EMT.R2, EMT.R3) local vtAux = EgtGetCalcAuxDirFromAngles( EMT.R1, EMT.R2, EMT.R3)
vtE = vtAux * LenAux - Z_AX() * LenRef vtE = vtAux * LenAux - Z_AX() * LenRef
elseif EMT.HEAD == 'H5' then elseif EMT.HEAD == 'H5' or EMT.HEAD == 'H6' then
local LenAux = AngTr1Offs + MillOffs local LenAux = AngTr1Offs + MillOffs
local LenRef = MillOffs local LenRef = MillOffs
local vtAux = EgtGetCalcAuxDirFromAngles( EMT.R1, EMT.R2, EMT.R3) local vtAux = EgtGetCalcAuxDirFromAngles( EMT.R1, EMT.R2, EMT.R3)
vtE = vtAux * LenAux - Z_AX() * LenRef vtE = vtAux * LenAux - Z_AX() * LenRef
elseif EMT.HEAD == 'H7' then
local LenAux = AngTrBHOffs + MillOffs
local LenRef = MillOffs
local vtAux = EgtGetCalcAuxDirFromAngles( EMT.R1, EMT.R2, EMT.R3)
vtE = vtAux * LenAux - Z_AX() * LenRef
else else
EmtSetLastError( 1211, 'Head not allowed ' .. EMT.HEAD) EmtSetLastError( 1211, 'Head not allowed ' .. EMT.HEAD)
end end
@@ -1674,7 +1750,7 @@ end
--------------------------------------------------------------------- ---------------------------------------------------------------------
function GetET( sHead, sTcPos, dAxR3) function GetET( sHead, sTcPos, dAxR3)
if sHead == 'H1' or sHead == 'H5' or sHead == 'H6' then if sHead == 'H1' or sHead == 'H5' or sHead == 'H6' or sHead == 'H7' then
return ' E'..sTcPos return ' E'..sTcPos
elseif sHead == 'H2' then elseif sHead == 'H2' then
return ' ET42' return ' ET42'
+80 -5
View File
@@ -3,6 +3,7 @@
-- carico librerie -- carico librerie
local INFO_STD_PP = require( 'Version') local INFO_STD_PP = require( 'Version')
local BD = require( 'BeamData')
-- Variabili di modulo -- Variabili di modulo
local CSP_INFO = INFO_STD_PP.NAME..' ver.'..INFO_STD_PP.VERSION..' by EgalWare s.r.l.' local CSP_INFO = INFO_STD_PP.NAME..' ver.'..INFO_STD_PP.VERSION..' by EgalWare s.r.l.'
@@ -150,7 +151,12 @@ function OnToolData()
local sOut = 'M992 P1=' .. EgtNumToString( nPos, 0) .. ' P2=' .. EmtLenToString( EMT.TLEN, 3) .. ' P3=' .. EmtLenToString( EMT.TDIAM, 3) .. local sOut = 'M992 P1=' .. EgtNumToString( nPos, 0) .. ' P2=' .. EmtLenToString( EMT.TLEN, 3) .. ' P3=' .. EmtLenToString( EMT.TDIAM, 3) ..
' P4=' .. EmtLenToString( EMT.SMAX, 3) .. ' P5=' .. EmtLenToString( EMT.TTOTLEN, 3) ' P4=' .. EmtLenToString( EMT.SMAX, 3) .. ' P5=' .. EmtLenToString( EMT.TTOTLEN, 3)
ParkLine( sOut) ParkLine( sOut)
-- altro non previsto -- emissione dati sega a catena
elseif EMT.HEAD == 'H7' then
local sOut = 'M992 P1=' .. EMT.TCPOS:gsub( 'T', '') .. ' P2=' .. EmtLenToString( EMT.TLEN, 3) .. ' P3=' .. EmtLenToString( EMT.TDIAM, 3) ..
' P4=' .. EmtLenToString( EMT.SMAX, 3) .. ' P5=' .. EmtLenToString( EMT.TTOTLEN, 3)
ParkLine( sOut)
-- altro non previsto
else else
EmtSetLastError( 1211, 'Head not allowed ' .. EMT.HEAD) EmtSetLastError( 1211, 'Head not allowed ' .. EMT.HEAD)
end end
@@ -625,6 +631,8 @@ end
--------------------------------------------------------------------- ---------------------------------------------------------------------
function OnRapid() function OnRapid()
-- recupero prossimo utensile
EMT.NEXTTOOL, EMT.NEXTHEAD, EMT.NEXTTCPOS = FindNextTool()
MyBackupAxes() MyBackupAxes()
-- se primo movimento della lavorazione, gestione speciale -- se primo movimento della lavorazione, gestione speciale
if EMT.MCHFIRST and not EMT.OPEISDISP then if EMT.MCHFIRST and not EMT.OPEISDISP then
@@ -663,7 +671,7 @@ function OnRapid()
end end
-- se carico motosega, ruoto in zona sicura prima di approcciare la lavorazione -- se carico motosega, ruoto in zona sicura prima di approcciare la lavorazione
if EMT.HEAD == 'H3' and EMT.ST > BeamHeightForFixRot and EMT.FLAG2 == 1 then if ( EMT.HEAD == 'H3' or ( bZmax and EMT.TTOTLEN > 200)) and EMT.ST > BeamHeightForFixRot and EMT.FLAG2 == 1 then
local sOutPreMove = 'M101 P1=1' .. ' P2=' .. EmtLenToString( -SafeXRotAxes, 3) .. ' P3=' .. EmtLenToString( MyZHome, 3) .. local sOutPreMove = 'M101 P1=1' .. ' P2=' .. EmtLenToString( -SafeXRotAxes, 3) .. ' P3=' .. EmtLenToString( MyZHome, 3) ..
' P4=' .. EgtNumToString( EMT.R2, 3) .. ' P5=' .. EgtNumToString( EMT.R1, 3) .. ' P4=' .. EgtNumToString( EMT.R2, 3) .. ' P5=' .. EgtNumToString( EMT.R1, 3) ..
' P6=' .. AdjustTcPos( false) .. ' P7=' .. EgtNumToString( EMT.S, 0) .. ' P6=' .. AdjustTcPos( false) .. ' P7=' .. EgtNumToString( EMT.S, 0) ..
@@ -849,12 +857,42 @@ function OnRapid()
EmtAdjustRotaryAxes() EmtAdjustRotaryAxes()
EmitZmax( true) EmitZmax( true)
EMT.ZMAX = true EMT.ZMAX = true
-- se pezzi alti e devo cambiare utensile su testa con CU, porto la testa vicino al cambio utensile
if EMT.ST > BeamHeightForFixRot and EMT.HEAD == 'H1' and EMT.TOOL ~= EMT.NEXTTOOL and EMT.NEXTHEAD ~= 'H2' then
local dBAxis = 90
local dCAxis = EgtIf( BD.RIGHT_LOAD, 90, -90)
local sOut = 'M101 P1=1' .. ' P2=' .. EmtLenToString( EMT.L2, 3) .. ' P3=' .. EmtLenToString( EMT.L3, 3) ..
' P4=' .. EgtNumToString( dBAxis, 3) .. ' P5=' .. EgtNumToString( dCAxis, 3) ..
' P6=' .. AdjustTcPos( false) .. ' P7=' .. EgtNumToString( EMT.S, 0) ..
' P8=0' .. ' P9=0' .. ' P10=3'
EmtOutput( sOut)
EmtOutput( 'M101 P1=2')
EmtOutput( 'M101 P1=3')
sOut = 'M101 P1=1' .. ' P2=' .. EmtLenToString( -SafeXRotAxes, 3) .. ' P3=' .. EmtLenToString( EMT.L3, 3) ..
' P4=' .. EgtNumToString( dBAxis, 3) .. ' P5=' .. EgtNumToString( dCAxis, 3) ..
' P6=' .. AdjustTcPos( false) .. ' P7=' .. EgtNumToString( EMT.S, 0) ..
' P8=0' .. ' P9=0' .. ' P10=3'
EmtOutput( sOut)
EmtOutput( 'M101 P1=2')
EmtOutput( 'M101 P1=3')
end
-- se altrimenti movimento in Home -- se altrimenti movimento in Home
elseif EMT.FLAG == 4 then elseif EMT.FLAG == 4 then
-- non previsto -- non previsto
-- se altrimenti rotazione a Z max -- se altrimenti rotazione a Z max per lavorazione successiva
elseif EMT.FLAG == 5 then elseif EMT.FLAG == 5 then
-- viene gestito all'inizio della lavorazione successiva EMT.REFLOC = nil
EMT.IPLGL = false
MyAdjustLinearAxes()
EmtAdjustRotaryAxes()
EmtResetPrev()
local sOut = 'M101 P1=1' .. ' P2=' .. EmtLenToString( EMT.L2, 3) .. ' P3=' .. EmtLenToString( EMT.L3, 3) ..
' P4=' .. EgtNumToString( EMT.R2, 3) .. ' P5=' .. EgtNumToString( EMT.R1, 3) ..
' P6=' .. AdjustTcPos( false) .. ' P7=' .. EgtNumToString( EMT.S, 0) ..
' P8=0' .. ' P9=0' .. ' P10=3'
EmtOutput( sOut)
EmtOutput( 'M101 P1=2')
EmtOutput( 'M101 P1=3')
-- altrimenti errore -- altrimenti errore
else else
error( "Unknown Rapid flag") error( "Unknown Rapid flag")
@@ -981,6 +1019,35 @@ function OnArc()
EmtUpdatePrev() EmtUpdatePrev()
end end
---------------------------------------------------------------------
function FindNextTool()
-- salvo stato iniziale
local CurrMachId = EgtGetCurrMachining()
local CurrTool = EgtTdbGetCurrToolParam( MCH_TP.NAME)
-- cerco lavorazione con utensile su gruppo testa indicato
local sTool, sHead, sTcPos
local OpId = EgtGetNextActiveOperation( CurrMachId or EMT.MCHID)
while OpId do
local nType = EgtGetOperationType( OpId)
if nType ~= MCH_OY.NONE and nType ~= MCH_OY.DISP then
if EgtSetCurrMachining( OpId) then
sTool = EgtGetMachiningParam( MCH_MP.TOOL)
if EgtTdbSetCurrTool( sTool) then
sHead = EgtTdbGetCurrToolParam( MCH_TP.HEAD)
sTcPos = EgtTdbGetCurrToolParam( MCH_TP.TCPOS)
break
end
end
end
OpId = EgtGetNextActiveOperation( OpId)
end
-- ripristino stato iniziale
EgtSetCurrMachining( CurrMachId or GDB_ID.NULL)
EgtTdbSetCurrTool( CurrTool or '')
-- restituisco risultato
return sTool, sHead, sTcPos
end
--------------------------------------------------------------------- ---------------------------------------------------------------------
function CalcDinamicaPinze( dH, dS, dL) function CalcDinamicaPinze( dH, dS, dL)
local MinTempoAcc = 0.3 -- [s] local MinTempoAcc = 0.3 -- [s]
@@ -1578,12 +1645,18 @@ function MyAdjustLinearAxes()
local LenRef = MillOffs local LenRef = MillOffs
local vtAux = EgtGetCalcAuxDirFromAngles( EMT.R1, EMT.R2, EMT.R3) local vtAux = EgtGetCalcAuxDirFromAngles( EMT.R1, EMT.R2, EMT.R3)
vtE = vtAux * LenAux - Z_AX() * LenRef vtE = vtAux * LenAux - Z_AX() * LenRef
elseif EMT.HEAD == 'H5' then elseif EMT.HEAD == 'H5' or EMT.HEAD == 'H6' then
local Len = EMT.TLEN + AngTr1Len local Len = EMT.TLEN + AngTr1Len
local LenAux = MillOffs + AngTr1Offs local LenAux = MillOffs + AngTr1Offs
local LenRef = MillOffs local LenRef = MillOffs
local vtAux = EgtGetCalcAuxDirFromAngles( EMT.R1, EMT.R2) local vtAux = EgtGetCalcAuxDirFromAngles( EMT.R1, EMT.R2)
vtE = Vector3d( EMT.EXTR) * Len + vtAux * LenAux - Z_AX() * LenRef vtE = Vector3d( EMT.EXTR) * Len + vtAux * LenAux - Z_AX() * LenRef
elseif EMT.HEAD == 'H7' then
local Len = EMT.TLEN + AngTrBHLen
local LenAux = MillOffs + AngTrBHOffs
local LenRef = MillOffs
local vtAux = EgtGetCalcAuxDirFromAngles( EMT.R1, EMT.R2)
vtE = Vector3d( EMT.EXTR) * Len + vtAux * LenAux - Z_AX() * LenRef
else else
EmtSetLastError( 1211, 'Head not allowed ' .. EMT.HEAD) EmtSetLastError( 1211, 'Head not allowed ' .. EMT.HEAD)
end end
@@ -1620,6 +1693,8 @@ function AdjustToolKinematic()
return EgtIf( EMT.EXIT == 1, '11', '12') return EgtIf( EMT.EXIT == 1, '11', '12')
elseif EMT.HEAD == 'H6' then elseif EMT.HEAD == 'H6' then
return EgtIf( EMT.EXIT == 1, '21', '22') return EgtIf( EMT.EXIT == 1, '21', '22')
elseif EMT.HEAD == 'H7' then
return '31'
else else
EmtSetLastError( 1211, 'Head not allowed ' .. EMT.HEAD) EmtSetLastError( 1211, 'Head not allowed ' .. EMT.HEAD)
end end
+124 -37
View File
@@ -15,11 +15,11 @@ BIG_TOOL_DIAM = 300
--------------------------------------------------------------------- ---------------------------------------------------------------------
local sBaseDir = EgtGetCurrMachineDir() local sBaseDir = EgtGetCurrMachineDir()
if NumericalControl == 'NUM' then if NumericalControl == 'NUM' then
dofile( sBaseDir .. '\\Common-FAST.NUM.mlpe') dofile( sBaseDir .. '\\Common_FAST.NUM.mlpe')
elseif NumericalControl == 'TPA' then elseif NumericalControl == 'TPA' then
dofile( sBaseDir .. '\\Common-FAST.TPA.mlpe') dofile( sBaseDir .. '\\Common_FAST.TPA.mlpe')
elseif NumericalControl == 'NUM_PLUS' then elseif NumericalControl == 'NUM_PLUS' then
dofile( sBaseDir .. '\\Common-FAST.NUM_PLUS.mlpe') dofile( sBaseDir .. '\\Common_FAST.NUM_PLUS.mlpe')
else else
EmtSetLastError( 1201, 'Numerical Control error : unkwnown type') EmtSetLastError( 1201, 'Numerical Control error : unkwnown type')
end end
@@ -105,6 +105,7 @@ function OnSimulStart()
AddToCollisionCheck( 'B', 'COLLISION', EMT.COLLOBJ) AddToCollisionCheck( 'B', 'COLLISION', EMT.COLLOBJ)
AddToCollisionCheck( 'C', 'COLLISION', EMT.COLLOBJ) AddToCollisionCheck( 'C', 'COLLISION', EMT.COLLOBJ)
AddToCollisionCheck( 'H5', 'COLLISION', EMT.COLLOBJ) AddToCollisionCheck( 'H5', 'COLLISION', EMT.COLLOBJ)
AddToCollisionCheck( 'H6', 'COLLISION', EMT.COLLOBJ)
AddToolToCollisionCheck( 'H2', 1, EMT.COLLOBJ) AddToolToCollisionCheck( 'H2', 1, EMT.COLLOBJ)
AddToolHolderToCollisionCheck( 'H2', 1, EMT.COLLOBJ) AddToolHolderToCollisionCheck( 'H2', 1, EMT.COLLOBJ)
DumpCollisionCheck( EMT.COLLOBJ, 'Collision Objects :', 4) DumpCollisionCheck( EMT.COLLOBJ, 'Collision Objects :', 4)
@@ -152,7 +153,8 @@ function OnSimulDispositionStarting()
EmtUnlinkAllRawPartsFromGroups() EmtUnlinkAllRawPartsFromGroups()
if EMT.PHASE > 1 then if EMT.PHASE > 1 then
if IsStartOrRestPhase( EMT.PHASE) then if IsStartOrRestPhase( EMT.PHASE) then
EgtSetAxisPos( 'T', LoadT) local ParkT = GetParkT()
EgtSetAxisPos( 'T', ParkT)
end end
end end
end end
@@ -179,7 +181,7 @@ function OnSimulDispositionStart()
if sTool and nTlen < LONG_TOOL_MINLEN then if sTool and nTlen < LONG_TOOL_MINLEN then
EMT.TOOL_1 = sTool EMT.TOOL_1 = sTool
else else
EMT.TOOL_1 = GetDefaultToolName() EMT.TOOL_1 = GetDefaultToolName()
end end
EgtLoadTool( 'H1', 1, EMT.TOOL_1) EgtLoadTool( 'H1', 1, EMT.TOOL_1)
EMT.TCPOS_1 = GetToolTcPos( EMT.TOOL_1) EMT.TCPOS_1 = GetToolTcPos( EMT.TOOL_1)
@@ -189,7 +191,7 @@ function OnSimulDispositionStart()
EMT.VMILL = {} EMT.VMILL = {}
if not EMT.SIM1ST and EgtGetInfo( EgtGetCurrMachGroup(), 'Vm', 'b') then if not EMT.SIM1ST and EgtGetInfo( EgtGetCurrMachGroup(), 'Vm', 'b') then
local nLastOrd = GetPhaseOrd( EgtGetPhaseCount()) local nLastOrd = GetPhaseOrd( EgtGetPhaseCount())
local nPartRawId = EgtGetFirstRawPart() local nPartRawId = EgtGetFirstRawPart()
while nPartRawId do while nPartRawId do
-- se è lo scarto finale tagliato a pezzi, esco -- se è lo scarto finale tagliato a pezzi, esco
local nRawOrd = EgtGetInfo( nPartRawId, 'ORD', 'i') local nRawOrd = EgtGetInfo( nPartRawId, 'ORD', 'i')
@@ -211,20 +213,24 @@ function OnSimulDispositionStart()
end end
end end
-- determino la risoluzione dello Zmap -- determino la risoluzione dello Zmap
local dArea = b3Raw:getDimX() * b3Raw:getDimY() + b3Raw:getDimX() * b3Raw:getDimZ() + b3Raw:getDimY() * b3Raw:getDimZ()
local dTol = 4.71 local dTol = 4.71
if dArea < CoeffVM * 0.15e6 then if EmtGetVMillStep then
dTol = 0.71 dTol = EmtGetVMillStep( b3Raw:getDimX(), b3Raw:getDimY(), b3Raw:getDimZ(), 4.71)
elseif dArea < CoeffVM * 0.3e6 then else
dTol = 1.01 local dArea = b3Raw:getDimX() * b3Raw:getDimY() + b3Raw:getDimX() * b3Raw:getDimZ() + b3Raw:getDimY() * b3Raw:getDimZ()
elseif dArea < CoeffVM * 0.6e6 then if dArea < 0.075e6 then
dTol = 1.51 dTol = 0.71
elseif dArea < CoeffVM * 1.2e6 then elseif dArea < 0.15e6 then
dTol = 1.97 dTol = 1.01
elseif dArea < CoeffVM * 2.4e6 then elseif dArea < 0.3e6 then
dTol = 2.81 dTol = 1.51
elseif dArea < CoeffVM * 4.8e6 then elseif dArea < 0.6e6 then
dTol = 3.77 dTol = 1.97
elseif dArea < 1.2e6 then
dTol = 2.81
elseif dArea < 2.4e6 then
dTol = 3.77
end
end end
-- creo lo Zmap -- creo lo Zmap
local VMillId = EgtVolZmapBox( nPartRawId, b3Raw:getMin(), b3Raw:getDimX(), b3Raw:getDimY(), b3Raw:getDimZ(), dTol, true, GDB_RT.GLOB) local VMillId = EgtVolZmapBox( nPartRawId, b3Raw:getMin(), b3Raw:getDimX(), b3Raw:getDimY(), b3Raw:getDimZ(), dTol, true, GDB_RT.GLOB)
@@ -358,6 +364,8 @@ function OnSimulDispositionStart()
EgtOutText( 'Barra non ruotata') EgtOutText( 'Barra non ruotata')
end end
end end
-- verifico posizione di carico
local ParkT = GetParkT()
-- indice primo grezzo della fase -- indice primo grezzo della fase
local nOrd = GetPhaseOrd( EMT.PHASE) local nOrd = GetPhaseOrd( EMT.PHASE)
-- ricerco vettore movimento per i successivi -- ricerco vettore movimento per i successivi
@@ -365,7 +373,7 @@ function OnSimulDispositionStart()
local nRawId = EgtGetFirstRawPart() local nRawId = EgtGetFirstRawPart()
while nRawId do while nRawId do
if EgtGetInfo( nRawId, 'ORD', 'i') == nOrd + 1 then if EgtGetInfo( nRawId, 'ORD', 'i') == nOrd + 1 then
vtMove = Vector3d( - LoadT - EgtGetRawPartBBox( nRawId):getMax():getX(), 0, 0) vtMove = Vector3d( - ParkT - EgtGetRawPartBBox( nRawId):getMax():getX(), 0, 0)
break break
end end
nRawId = EgtGetNextRawPart( nRawId) nRawId = EgtGetNextRawPart( nRawId)
@@ -386,6 +394,8 @@ function OnSimulDispositionStart()
end end
-- altrimenti fase finale, aggancio primo grezzo alla tavola e gli altri in posizione carico al carro Y -- altrimenti fase finale, aggancio primo grezzo alla tavola e gli altri in posizione carico al carro Y
else else
-- verifico posizione di carico
local ParkT = GetParkT()
-- indice primo grezzo della fase -- indice primo grezzo della fase
local nOrd = GetPhaseOrd( EMT.PHASE) local nOrd = GetPhaseOrd( EMT.PHASE)
-- ricerco vettore movimento per i successivi -- ricerco vettore movimento per i successivi
@@ -393,7 +403,7 @@ function OnSimulDispositionStart()
local nRawId = EgtGetFirstRawPart() local nRawId = EgtGetFirstRawPart()
while nRawId do while nRawId do
if EgtGetInfo( nRawId, 'ORD', 'i') == nOrd + 1 then if EgtGetInfo( nRawId, 'ORD', 'i') == nOrd + 1 then
vtMove = Vector3d( - LoadT - EgtGetRawPartBBox( nRawId):getMax():getX(), 0, 0) vtMove = Vector3d( - ParkT - EgtGetRawPartBBox( nRawId):getMax():getX(), 0, 0)
break break
end end
nRawId = EgtGetNextRawPart( nRawId) nRawId = EgtGetNextRawPart( nRawId)
@@ -456,8 +466,10 @@ function OnSimulToolSelect( dPosA)
EMT.TOTDIAM = EgtTdbGetCurrToolParam( MCH_TP.TOTDIAM) EMT.TOTDIAM = EgtTdbGetCurrToolParam( MCH_TP.TOTDIAM)
-- se non è chiamato da altro script (non c'è parametro) -- se non è chiamato da altro script (non c'è parametro)
if not dPosA then if not dPosA then
-- se attivo Vmill -- se utensile non flottante, abilito per Vmill
SetToolForVmill( EMT.TOOL, EMT.HEAD, EMT.EXIT, EMT.VMILL) if not EMT.TFLOAT then
EmtSetToolForVmill( EMT.TOOL, EMT.HEAD, EMT.EXIT, EMT.VMILL)
end
-- se attivo Collision Check -- se attivo Collision Check
EMT.SAFEDIST = COLL_SAFE_DIST EMT.SAFEDIST = COLL_SAFE_DIST
if EMT.COLLOBJ then if EMT.COLLOBJ then
@@ -477,8 +489,8 @@ function OnSimulToolSelect( dPosA)
EMT.A1n = 'Y' EMT.A1n = 'Y'
EMT.A2n = 'V' EMT.A2n = 'V'
end end
-- carico utensile se non lama su sua testa o dummy -- carico utensile se non lama
if EMT.HEAD ~= 'H2' and EMT.HEAD ~= 'H4' then if EMT.HEAD ~= 'H2' then
-- se sega a catena, imposto subito angolo scelto per asse virtuale A -- se sega a catena, imposto subito angolo scelto per asse virtuale A
if EMT.HEAD == 'H3' then if EMT.HEAD == 'H3' then
if not dPosA then if not dPosA then
@@ -506,6 +518,9 @@ function OnSimulToolSelect( dPosA)
EgtSetAxisPos( 'C', EgtIf( BD.RIGHT_LOAD, 180, 0)) EgtSetAxisPos( 'C', EgtIf( BD.RIGHT_LOAD, 180, 0))
end end
EgtSetAxisPos( 'B', 0) EgtSetAxisPos( 'B', 0)
-- se aggregato per fresa tipo blockhaus
elseif EMT.HEAD == 'H7' then
EgtSetAxisPos( 'C', EgtIf( BD.RIGHT_LOAD, 180, 0))
end end
-- se punta lunga -- se punta lunga
if EMT.TOTLEN > LONG_TOOL_MINLEN then if EMT.TOTLEN > LONG_TOOL_MINLEN then
@@ -514,6 +529,12 @@ function OnSimulToolSelect( dPosA)
EgtSetAxisPos( 'B', 0) EgtSetAxisPos( 'B', 0)
end end
end end
-- se TC 1
if GetTCSet( EMT.TCPOS) == 1 then
EgtSetAxisPos( 'B', 90)
else
EgtSetAxisPos( 'B', -90)
end
-- breve pausa -- breve pausa
EgtPause( 100) EgtPause( 100)
EgtOutText( '') EgtOutText( '')
@@ -529,9 +550,9 @@ function OnSimulToolDeselect()
-- se prossimo utensile non definito, è disposizione ed esco -- se prossimo utensile non definito, è disposizione ed esco
if EMT.NEXTTOOL == '' then return end if EMT.NEXTTOOL == '' then return end
-- se cambia uscita su rinvio non devo fare alcunché -- se cambia uscita su rinvio non devo fare alcunché
if EMT.HEAD == 'H5' and EMT.NEXTHEAD == 'H5' then return end if ( EMT.HEAD == 'H5' and EMT.NEXTHEAD == 'H5') or ( EMT.HEAD == 'H6' and EMT.NEXTHEAD == 'H6') then return end
-- se sega a catena o rinvio o punta lunga o utensile di grosso diametro, devo cambiare -- se sega a catena o rinvio o punta lunga o utensile di grosso diametro, devo cambiare
if EMT.HEAD == 'H3' or EMT.HEAD == 'H5' or ( EMT.HEAD == 'H1' and ( EMT.TOTLEN > LONG_TOOL_MINLEN or EMT.TOTDIAM > BIG_TOOL_DIAM)) then if EMT.HEAD == 'H3' or EMT.HEAD == 'H5' or EMT.HEAD == 'H6' or EMT.HEAD == 'H7' or ( EMT.HEAD == 'H1' and ( EMT.TOTLEN > LONG_TOOL_MINLEN or EMT.TOTDIAM > BIG_TOOL_DIAM)) then
EgtOutText( 'Tool change in progress...') EgtOutText( 'Tool change in progress...')
-- movimento scarico sega a catena -- movimento scarico sega a catena
if EMT.HEAD == 'H3' then if EMT.HEAD == 'H3' then
@@ -547,9 +568,13 @@ function OnSimulToolDeselect()
end end
SimulMoveAxis( 'X', 0, MCH_SIM_STEP.RAPID) SimulMoveAxis( 'X', 0, MCH_SIM_STEP.RAPID)
-- movimento scarico rinvio -- movimento scarico rinvio
elseif EMT.HEAD == 'H5' then elseif EMT.HEAD == 'H5' or EMT.HEAD == 'H6' then
SimulMoveAxes( 'B', 0, MCH_SIM_STEP.COLLROT, 'C', -90, MCH_SIM_STEP.COLLROT) SimulMoveAxes( 'B', 0, MCH_SIM_STEP.COLLROT, 'C', -90, MCH_SIM_STEP.COLLROT)
SimulMoveAxis( 'X', 0, MCH_SIM_STEP.RAPID) SimulMoveAxis( 'X', 0, MCH_SIM_STEP.RAPID)
-- movimento scarico aggregato BlockHaus
elseif EMT.HEAD == 'H7' then
SimulMoveAxis( 'X', 0, MCH_SIM_STEP.RAPID)
SimulMoveAxes( 'B', 90, MCH_SIM_STEP.COLLROT, 'C', -90, MCH_SIM_STEP.COLLROT)
-- movimento scarico punta lunga su T111 -- movimento scarico punta lunga su T111
elseif EMT.TOTLEN > LONG_TOOL_MINLEN then elseif EMT.TOTLEN > LONG_TOOL_MINLEN then
-- se su cambio utensile T111 -- se su cambio utensile T111
@@ -559,7 +584,11 @@ function OnSimulToolDeselect()
-- altrimenti posizioni standard rastrelliera -- altrimenti posizioni standard rastrelliera
else else
SimulMoveAxis( 'X', 0, MCH_SIM_STEP.RAPID) SimulMoveAxis( 'X', 0, MCH_SIM_STEP.RAPID)
SimulMoveAxes( 'B', 90, MCH_SIM_STEP.COLLROT, 'C', -90, MCH_SIM_STEP.COLLROT) if GetTCSet( EMT.TCPOS) == 1 then
SimulMoveAxes( 'B', 90, MCH_SIM_STEP.COLLROT, 'C', -90, MCH_SIM_STEP.COLLROT)
else
SimulMoveAxes( 'B', -90, MCH_SIM_STEP.COLLROT, 'C', -90, MCH_SIM_STEP.COLLROT)
end
end end
-- movimento scarico utensile di grosso diametro (su T111) -- movimento scarico utensile di grosso diametro (su T111)
else else
@@ -573,24 +602,31 @@ function OnSimulToolDeselect()
-- nascondo utensile su testa e lo visualizzo su TcPos -- nascondo utensile su testa e lo visualizzo su TcPos
EgtSetMode( EgtGetHeadId( EMT.HEAD), GDB_MD.HIDDEN) EgtSetMode( EgtGetHeadId( EMT.HEAD), GDB_MD.HIDDEN)
ShowToolInTcPos( EMT.TCPOS_1, true) ShowToolInTcPos( EMT.TCPOS_1, true)
-- movimento per carico utensile -- movimento per carico utensile
if EMT.NEXTHEAD ~= 'H3' and EMT.NEXTHEAD ~= 'H5' then if EMT.NEXTHEAD ~= 'H3' and EMT.NEXTHEAD ~= 'H5' and EMT.NEXTHEAD ~= 'H6' then
SimulMoveAxes( 'B', 90, MCH_SIM_STEP.RAPROT, 'C', EgtIf( BD.RIGHT_LOAD, 90, -90), MCH_SIM_STEP.RAPROT) SimulMoveAxes( 'B', EgtIf( GetTCSet( EMT.TCPOS) == 1, 90, -90), MCH_SIM_STEP.RAPROT, 'C', EgtIf( BD.RIGHT_LOAD, 90, -90), MCH_SIM_STEP.RAPROT)
else else
SimulMoveAxes( 'B', 0, MCH_SIM_STEP.RAPROT, 'C', EgtIf( BD.RIGHT_LOAD, 90, -90), MCH_SIM_STEP.RAPROT) SimulMoveAxes( 'B', 0, MCH_SIM_STEP.RAPROT, 'C', EgtIf( BD.RIGHT_LOAD, 90, -90), MCH_SIM_STEP.RAPROT)
end end
-- se segue lama, carico utensile di default -- se segue lama, carico utensile di default
if EMT.NEXTHEAD == 'H2' then if EMT.NEXTHEAD == 'H2' then
local sDefTool = GetDefaultToolName() local sDefTool = GetDefaultToolName()
EgtLoadTool( 'H1', 1, sDefTool)
EMT.TOOL_1 = sDefTool EMT.TOOL_1 = sDefTool
EMT.TCPOS_1 = GetToolTcPos( EMT.TOOL_1) EMT.TCPOS_1 = GetToolTcPos( EMT.TOOL_1)
-- se TC 1
if GetTCSet( EMT.TCPOS_1) == 1 then
EgtSetAxisPos( 'B', 90)
else
EgtSetAxisPos( 'B', -90)
end
EgtLoadTool( 'H1', 1, sDefTool)
-- lo nascondo sul portautensili -- lo nascondo sul portautensili
ShowToolInTcPos( EMT.TCPOS_1, false) ShowToolInTcPos( EMT.TCPOS_1, false)
end end
EgtOutText( '') EgtOutText( '')
-- deposito utensile se prossimo non lama su sua testa o dummy -- deposito utensile se prossimo non lama su sua testa
elseif EMT.NEXTHEAD ~= 'H2' and EMT.NEXTHEAD ~= 'H4' then elseif EMT.NEXTHEAD ~= 'H2' then
if EMT.NEXTTOOL ~= EMT.TOOL_1 then if EMT.NEXTTOOL ~= EMT.TOOL_1 then
EgtOutText( 'Tool change in progress...') EgtOutText( 'Tool change in progress...')
-- simulo movimento -- simulo movimento
@@ -600,7 +636,7 @@ function OnSimulToolDeselect()
EgtPause( 100) EgtPause( 100)
ShowToolInTcPos( EMT.TCPOS_1, true) ShowToolInTcPos( EMT.TCPOS_1, true)
-- se segue sega a catena -- se segue sega a catena
if EMT.NEXTHEAD == 'H3' or EMT.NEXTHEAD == 'H5' then if EMT.NEXTHEAD == 'H3' or EMT.NEXTHEAD == 'H5' or EMT.NEXTHEAD == 'H6' then
-- se non lama, nascondo l'utensile corrente -- se non lama, nascondo l'utensile corrente
if EMT.HEAD ~= 'H2' then if EMT.HEAD ~= 'H2' then
EgtSetStatus( EgtGetHeadId( EMT.HEAD), GDB_ST.OFF) EgtSetStatus( EgtGetHeadId( EMT.HEAD), GDB_ST.OFF)
@@ -662,6 +698,7 @@ function OnSimulMachiningEnd()
EMT.FALL = false EMT.FALL = false
end end
EMT.PREVHEAD = EMT.HEAD EMT.PREVHEAD = EMT.HEAD
EMT.PREVTOOL = EMT.TOOL
EMT.PREVEXIT = EMT.EXIT EMT.PREVEXIT = EMT.EXIT
end end
@@ -749,29 +786,69 @@ function OnSimulMoveStart()
if EMT.MCHFIRST then if EMT.MCHFIRST then
EgtOutText( '') EgtOutText( '')
EMT.MCHFIRST = false EMT.MCHFIRST = false
local bZmax = ( EMT.TOOL ~= EMT.PREVTOOL or EMT.L3 > -1)
-- con pezzi alti aggiorno gli assi rotanti prima di muovermi sopra il pezzo -- con pezzi alti aggiorno gli assi rotanti prima di muovermi sopra il pezzo
if not EMT.LOAD and EMT.MOVE == 0 and EMT.HB > BeamHeightForFixRot and EMT.FLAG2 == 1 then if not EMT.LOAD and EMT.MOVE == 0 and EMT.HB > BeamHeightForFixRot and EMT.FLAG2 == 1 then
-- se motosega mi muovo a X di sicurezza per ruotare -- se motosega mi muovo a X di sicurezza per ruotare
if EMT.HEAD == 'H3'then if ( EMT.HEAD == 'H3' or ( bZmax and EMT.TOTLEN > 200)) then
SimulMoveAxes( 'X', SafeXRotAxes, MCH_SIM_STEP.RAPID, 'C', EMT.R1, MCH_SIM_STEP.COLLROT, 'B', EMT.R2, MCH_SIM_STEP.COLLROT) SimulMoveAxes( 'X', SafeXRotAxes, MCH_SIM_STEP.RAPID, 'C', EMT.R1, MCH_SIM_STEP.COLLROT, 'B', EMT.R2, MCH_SIM_STEP.COLLROT)
end end
end end
EMT.POSTROT = nil EMT.POSTROT = nil
end end
-- se aggregato flottante su inizio attacco va compresso
if EMT.TFLOAT and not EMT.TFLOAT_CMP and EMT.MOVE == 1 and EgtGetName( EMT.MOVEID) == 'LI' then
-- recupero lunghezza
local dOffsL = - EgtGetMachiningParam( MCH_MP.OFFSL)
-- imposto compressione della parte flottante
SetFloatPos( EMT.HEAD, dOffsL)
-- imposto dati utensile in posizione compressa
EmtSetToolForVmill( EMT.TOOL, EMT.HEAD, EMT.EXIT, EMT.VMILL, 2, -dOffsL)
-- dichiaro che è compresso (assegnando Id entità di movimento)
EMT.TFLOAT_CMP = EMT.MOVEID
end
end end
--------------------------------------------------------------------- ---------------------------------------------------------------------
function OnSimulMoveEnd() function OnSimulMoveEnd()
-- se termine di passata con lama
if EMT.FLAG == 301 then if EMT.FLAG == 301 then
-- rimozione eventuali sfridi -- rimozione eventuali sfridi
ExecRemoveScraps() ExecRemoveScraps()
end end
-- se utensile flottante e movimento di compressione
if EMT.TFLOAT and EMT.MOVEID == EMT.TFLOAT_CMP then
-- verifico ci sia stata collisione tra ghiera flottante (portautensile e pezzo)
if not EMT.TFLOAT_TH_COMPR_COLL then
local sErr = 'CUTID='..tostring( EMT.CUTID)..'; TASKID='..tostring( EMT.TASKID)..'; Mach='..EMT.MCHNAME..'; Floating Ring not compressed on approach'
EmtSetLastError( 1222, sErr)
EgtOutLog( 'Error : ' .. sErr, 1)
else
EgtOutLog( 'Floating Ring compressed on approach (MOVEID='..EgtNumToString( EMT.MOVEID)..')', 1)
end
EMT.TFLOAT_TH_COMPR_COLL = nil
end
-- se aggregato flottante su fine uscita va rilasciato
if EMT.TFLOAT and EMT.TFLOAT_CMP and EMT.MOVE == 1 and EgtGetName( EMT.MOVEID) == 'LO' and EgtGetName( EgtGetNext( EMT.MOVEID) or GDB_ID.NULL) ~= 'LO' then
-- reset compressione della parte flottante
SetFloatPos( EMT.HEAD, 0)
-- dichiaro che è rilasciato
EMT.TFLOAT_CMP = nil
end
end end
--------------------------------------------------------------------- ---------------------------------------------------------------------
function OnSimulCollision() function OnSimulCollision()
-- se prima collisione della lavorazione, la segnalo -- se prima collisione della lavorazione, la segnalo
if EMT.MCHNAME ~= EMT.LAST_MCHNAME_COLLIDE then if EMT.MCHNAME ~= EMT.LAST_MCHNAME_COLLIDE then
-- speciale per utensile flottante (suo holder contro il grezzo)
if EMT.TFLOAT and EMT.TFLOAT_CMP and EMT.SIMCOBIND == 1002 and EMT.SIMVMID == EMT.VMILL[1] then
if EMT.MOVEID == EMT.TFLOAT_CMP then
EMT.TFLOAT_TH_COMPR_COLL = true
end
return
end
-- standard
local Class = '' local Class = ''
if EMT.SIMCOBIND == 1001 then if EMT.SIMCOBIND == 1001 then
Class = 'T_H1' Class = 'T_H1'
@@ -919,7 +996,7 @@ function ExecUnloading()
local nLayId = EgtGroup( nVmGrpId, EgtGetGlobFrame( vMillId)) local nLayId = EgtGroup( nVmGrpId, EgtGetGlobFrame( vMillId))
EgtRelocate( vMillId, nLayId) EgtRelocate( vMillId, nLayId)
local vtMove = Vector3d( 0, EgtIf( BD.RIGHT_LOAD, 450, -450), 0) local vtMove = Vector3d( 0, EgtIf( BD.RIGHT_LOAD, 450, -450), 0)
if EMT.FALL then vtMove = Vector3d( -500, 0, EgtIf( BD.RIGHT_LOAD, 750, -750)) end if EMT.FALL then vtMove = Vector3d( 0, EgtIf( BD.RIGHT_LOAD, 500, -500), -750) end
EgtMove( nLayId, vtMove, GDB_RT.GLOB) EgtMove( nLayId, vtMove, GDB_RT.GLOB)
EgtSetLevel( vMillId, GDB_LV.USER) EgtSetLevel( vMillId, GDB_LV.USER)
-- aggiungo gli spigoli -- aggiungo gli spigoli
@@ -1563,6 +1640,16 @@ function GetPhaseRot( nPhase)
return ( EgtGetInfo( EgtGetPhaseDisposition( nPhase) or GDB_ID.NULL, 'ROT', 'i') or 0) return ( EgtGetInfo( EgtGetPhaseDisposition( nPhase) or GDB_ID.NULL, 'ROT', 'i') or 0)
end end
---------------------------------------------------------------------
function GetParkT()
local dTmp = EgtGetInfo( EMT.DISPID, 'TPOS', 'd') or EgtGetInfo( EMT.DISPID, 'TPARK', 'd')
if dTmp then
return dTmp
else
return LoadT
end
end
--------------------------------------------------------------------- ---------------------------------------------------------------------
-- *** END GENERAL *** -- *** END GENERAL ***
--------------------------------------------------------------------- ---------------------------------------------------------------------
File diff suppressed because it is too large Load Diff
+14 -3
View File
@@ -59,6 +59,7 @@ H5.1=AngTransm.nge
H5.2=AngTransm.nge H5.2=AngTransm.nge
H6.1=AngTransm.nge H6.1=AngTransm.nge
H6.2=AngTransm.nge H6.2=AngTransm.nge
H7.1=AngTransmBH.nge
[Machinings] [Machinings]
Drilling=1 Drilling=1
@@ -67,10 +68,14 @@ Milling=1
Pocketing=1 Pocketing=1
Mortising=1 Mortising=1
Chiseling=0 Chiseling=0
SawRoughing=0
SawFinishing=0
GenMachining=0 GenMachining=0
SurfFinishing=0 SurfRoughing=1
SurfFinishing=1
5AxMilling=1
[5AxMilling]
5AxScript1=5AxProject
5AxScript2=5AxPocketProject
[Machining] [Machining]
InitScript=InitMach.lua InitScript=InitMach.lua
@@ -88,6 +93,12 @@ H2=6615
H3=6616 H3=6616
; Angular transmission ; Angular transmission
H5=6603 H5=6603
; Angular transmission
H6=6603
; Angular transmission
H7=6617
; Floating Aggregate
H8=6619
[SetUp] [SetUp]
Default=Standard Default=Standard
+238 -121
View File
@@ -1,4 +1,4 @@
-- Descrizione macchina Essetre-FAST by EgalTech s.r.l. 2024/03/28 -- Descrizione macchina Essetre-FAST by EgalTech s.r.l. 2024/12/23
-- 2021/12/29 DS ver 2.3l4 Per NUM non va considerato MillOffs negli offset in Z. -- 2021/12/29 DS ver 2.3l4 Per NUM non va considerato MillOffs negli offset in Z.
-- 2022/01/27 DS ver 2.4a2 Modifiche per tagli testa/coda su pezzi alti. -- 2022/01/27 DS ver 2.4a2 Modifiche per tagli testa/coda su pezzi alti.
-- 2022/02/10 DS ver 2.4a3 Ridotto di 10mm pinzaggio con pezzi alti ma sottili. -- 2022/02/10 DS ver 2.4a3 Ridotto di 10mm pinzaggio con pezzi alti ma sottili.
@@ -17,53 +17,15 @@
-- 2022/12/05 DS ver 2.4l1 In OnLinear di genera CN per Num e NumPlus eliminato recupero sovramateriale di testa EMT.X_OFF dopo riutilizzo EMT.L1o. -- 2022/12/05 DS ver 2.4l1 In OnLinear di genera CN per Num e NumPlus eliminato recupero sovramateriale di testa EMT.X_OFF dopo riutilizzo EMT.L1o.
-- 2023/01/23 DS Ver.2.5a2 In simulazione corretta visualizzazione Sega a catena. -- 2023/01/23 DS Ver.2.5a2 In simulazione corretta visualizzazione Sega a catena.
-- 2023/02/09 DS Ver.2.5b1 Correzioni NumPlus per parametri G115 e EG2/EG3 al cambio orientazione sega a catena. -- 2023/02/09 DS Ver.2.5b1 Correzioni NumPlus per parametri G115 e EG2/EG3 al cambio orientazione sega a catena.
-- 2023/03/20 DS Ver.2.5c1 Inserita gestione fresa BH al posto della lama. -------------------------------------
-- 2023/07/26 DS ver.2.5g1 Per NUM e NUM_PLUS aggiunta gestione rotazione in alto su pezzi alti (G101 EH1) come per TPA in versione 2.3f2. -- NOTE VERSIONI SUCCESSIVE IN GIT --
-- 2023/07/26 DS ver.2.5g2 Per NUM e NUM_PLUS tolta segnalazione errore rotazione a Zmax per pezzi alti non gestita (era su EMT.FLAG == 5). -------------------------------------
-- 2023/07/27 DS ver.2.5g3 Il parametro di cui alle modifiche precedenti ora viene emesso solo se anche EMT.FLAG2==1.
-- 2023/08/17 DS ver 2.5h2 Possibilità di nuova gestione SawCOffs e SawBOffs con flag NewBCOffs.
-- 2023/08/22 DS ver 2.5h3 Eliminata nuova gestione di 2.5h2 perchè inclinando la direzione utensile rispetto al primo rotante limitava le direzioni raggiungibili.
-- 2023/09/29 ver 2.5i1 In BeamData e mlde aggiunta la lettura di alcuni parametri da Ts3Data.
-- 2023/10/18 DS ver 2.5j1 Con SpliRot ora si assegna da primo movimento di M111/G111 a EE/P8 il corretto valore 2.
-- 2023/10/19 DS ver 2.5j2 Per NUM_PLUS correzione per scarico con pezzo dopo oppure passando da Y a V per eliminare ET2 e scommentare ET2004.
-- 2023/10/21 DS ver 2.5j3 Gestione caso speciale di rotazione dopo separazione senza lavorazioni sul posizionamento finale.
-- 2023/11/04 DS ver 2.5k1 Eliminata testa H4. Aggiunta visualizzazione rinvio su TC.Aggiunta gestione MIN_MACH_VER per simulazione e generazione.
-- 2023/12/13 AV ver.2.5l1 Piccola correzione per errore digitazione variabile in calcolo riposizionamento carrelli (SpecAdjustCarrB3)
-- Corretto segno di una variabile in calcolo posizionamento carrelli
-- 2023/12/15 AV ver.2.5l2 Migliorato calcolo stima tempi di lavorazione
-- 2024/01/19 DS ver 2.6a1 Piccola modifica per direzione preferenziale rinvio da sotto (per evitare di accedere dal lato della barra).
-- 2024/01/29 DS ver 2.6a2 In portautensili per mortasa e sega a catena aggiunti ingombri dello stesso.
-- 2024/02/09 LM ver 2.6b1 In BeamData aggiunta funzione GetBlockedAxis che sostituisce la GetChainSawBlockedAxis.
-- 2024/02/23 AV ver 2.6c1 Prima versione con post-processore common
-- Allineamento con common ver. 2.6c1
-- 2024/02/23 AV ver 2.6c2 Rimossa chiamata funzione EgtGetSourceDir
-- Allineamento con common ver. 2.6c2
-- 2024/02/23 AV ver 2.6c3 Allineamento con common ver. 2.6c3
-- 2024/02/27 AV ver 2.6c4 Allineamento con common ver. 2.6c4. Aggiunto parametro 'SafeXRotAxes' per rotazione motosega con pezzi alti
-- 2024/02/29 AV ver 2.6c5 Allineamento con common ver. 2.6c5
-- 2024/03/04 AV ver 2.6c6 Modificato log con nome macchina
-- Allineamento con common ver. 2.6c6
-- 2024/03/09 DS ver 2.6c7 Migliorie alla geometria macchina e suo caricamento.
-- 2024/03/12 AV ver 2.6c8 Allineamento con common ver. 2.6c7.
-- 2024/03/28 DS ver 2.6c9 Modificata posizione supporto rinvio.
-- 2024/03/28 AV ver 2.6d1 Allineamento con common ver. 2.6c8
-- 2024/04/15 AV ver 2.6d2 Allineamento con common ver. 2.6d1
-- 2024/04/18 AV ver 2.6d3 Allineamento con common ver. 2.6d2
-- 2024/04/30 AV ver 2.6e1 Allineamento con common ver. 2.6e1
-- Aggiunta variabile WoodDensity per gestione WOOD_DENSITY
-- 2024/05/06 AV ver 2.6e2 Allineamento con common ver. 2.6e2
-- 2024/05/06 AV ver 2.6e3 Allineamento con common ver. 2.6e3
-- Aggiunte variabili MinJoin(xx) per gestione MIN_JOIN_(xx)
-- 2024/06/03 AV ver 2.6f1 Aggiunta funzione GetSetupInfo a BeamData per nuovo automatismo
-- 2024/06/13 LM ver 2.6f2 Aggiunta lettura NewTopC da offset Ts3
-- 2024/06/13 AV ver 2.6f3_Dev Per controllo NUM, se arco maggiore di 99999mm, si approssima con una retta.
-- 2024/07/03 AV ver 2.6g1 Allineamento con common ver. 2.6g1
-- 2024/07/04 LM ver 2.6g2 In MachData.ini aggiunto MIN_JOIN_SS
require( 'EmtGenerator') require( 'EmtGenerator')
EgtEnableDebug( false) EgtEnableDebug( true)
PP_VER = '2.6g2' PP_VER = '2.7a1'
PP_NVER = '2.7.1.1'
MIN_MACH_VER = '2.5k1' MIN_MACH_VER = '2.5k1'
MACH_NAME = 'Essetre-FAST' MACH_NAME = 'Essetre-FAST'
@@ -109,6 +71,8 @@ SawCOffs = 0
ChSawLen = 90.0 ChSawLen = 90.0
AngTr1Offs = 170 AngTr1Offs = 170
AngTr1Len = 150 AngTr1Len = 150
AngTrBHOffs = 154.5
AngTrBHLen = 90
TurnerOffs = 200.0 TurnerOffs = 200.0
DeltaTabY = 898.0 DeltaTabY = 898.0
DeltaTabZ = -1017.8 + MillOffs -- per TPA : -1013.3 + MillOffs -- per NUM : -838.4 DeltaTabZ = -1017.8 + MillOffs -- per TPA : -1013.3 + MillOffs -- per NUM : -838.4
@@ -123,9 +87,10 @@ SecondSupport = 0
SpecialBH = false SpecialBH = false
MaxUnloadLen = 0 MaxUnloadLen = 0
BeamHeightForFixRot = 9999 -- per abilitare assegnare 500 BeamHeightForFixRot = 9999 -- per abilitare assegnare 500
CoeffVM = 0.5
NewTopC = true NewTopC = true
SafeXRotAxes = 150 SafeXRotAxes = 150
AggreBlockHaus = true
SecondToolChanger = true
-- leggo e aggiorno con parametri da BeamData -- leggo e aggiorno con parametri da BeamData
if BD then if BD then
@@ -176,6 +141,8 @@ if EgtExistsFile( sData) then
AngTr1Len = Machine.Offsets.OFFSETX_RINV_1 or AngTr1Len AngTr1Len = Machine.Offsets.OFFSETX_RINV_1 or AngTr1Len
--if Machine.Offsets.OFFSETZ_RINV_2 then AngTr2Offs = Machine.Offsets.OFFSETZ_RINV_2 - EgtIf( NumericalControl == 'TPA', MillOffs, 0) end --if Machine.Offsets.OFFSETZ_RINV_2 then AngTr2Offs = Machine.Offsets.OFFSETZ_RINV_2 - EgtIf( NumericalControl == 'TPA', MillOffs, 0) end
--AngTr2Len = Machine.Offsets.OFFSETX_RINV_2 or AngTr2Len --AngTr2Len = Machine.Offsets.OFFSETX_RINV_2 or AngTr2Len
if Machine.Offsets.OFFSETZ_RINV_BH then AngTrBHOffs = Machine.Offsets.OFFSETZ_RINV_BH - EgtIf( NumericalControl == 'TPA', MillOffs, 0) end
AngTrBHLen = Machine.Offsets.OFFSETX_RINV_BH or AngTrBHLen
TurnerOffs = Machine.Offsets.OFFSETRIB or TurnerOffs TurnerOffs = Machine.Offsets.OFFSETRIB or TurnerOffs
if Machine.Offsets.OFFSETX then DeltaTabY = - Machine.Offsets.OFFSETX end if Machine.Offsets.OFFSETX then DeltaTabY = - Machine.Offsets.OFFSETX end
if Machine.Offsets.OFFSETZ then DeltaTabZ = Machine.Offsets.OFFSETZ + EgtIf( NumericalControl == 'TPA', MillOffs, 0) end if Machine.Offsets.OFFSETZ then DeltaTabZ = Machine.Offsets.OFFSETZ + EgtIf( NumericalControl == 'TPA', MillOffs, 0) end
@@ -191,11 +158,17 @@ if EgtExistsFile( sData) then
if Machine.Offsets.MIN_JOIN_SL then MinJoinSL = Machine.Offsets.MIN_JOIN_SL end if Machine.Offsets.MIN_JOIN_SL then MinJoinSL = Machine.Offsets.MIN_JOIN_SL end
if Machine.Offsets.MIN_JOIN_LL then MinJoinLL = Machine.Offsets.MIN_JOIN_LL end if Machine.Offsets.MIN_JOIN_LL then MinJoinLL = Machine.Offsets.MIN_JOIN_LL end
if Machine.Offsets.NEWTOPC then NewTopC = ( Machine.Offsets.NEWTOPC == 1) end if Machine.Offsets.NEWTOPC then NewTopC = ( Machine.Offsets.NEWTOPC == 1) end
if Machine.Offsets.AGGRE_BH then AggreBlockHaus = ( Machine.Offsets.AGGRE_BH == 1) end
if Machine.Offsets.SEC_TC then SecondToolChanger = ( Machine.Offsets.SEC_TC == 1) end
end end
end end
end end
if SpecialBH then SecondSupport = 0 end if SpecialBH then SecondSupport = 0 end
-- compongo i gruppi appartenenti alla base
local sBaseAux = {'BASE/SOLID', 'BASE/TC', 'BASE/SIGN', 'BASE/COLLISION'}
if SecondToolChanger then table.insert( sBaseAux, 5, 'BASE/TC2') end
EmtGeneral { EmtGeneral {
File='Essetre-FAST.nge', File='Essetre-FAST.nge',
Offset = Vector3d( 0, 1150.16, -1500.0), Offset = Vector3d( 0, 1150.16, -1500.0),
@@ -204,12 +177,13 @@ EmtGeneral {
ExitMaxAdjust = 30, ExitMaxAdjust = 30,
ExitMaxRotAdj = 0.5, ExitMaxRotAdj = 0.5,
AngDeltaMinForHome = 165, AngDeltaMinForHome = 165,
Special = 'Common-FAST.mlse', Special = 'Common_FAST.mlse',
Processor = 'Common-FAST.mlpe'} Processor = 'Common_FAST.mlpe'}
local BaseId = EmtBase { local BaseId = EmtBase {
Name = 'Base', Name = 'Base',
Geo='BASE/GEO', Geo='BASE/GEO',
Aux={'BASE/SOLID', 'BASE/TC', 'BASE/SIGN', 'BASE/COLLISION'}} Aux = sBaseAux}
local XId = EmtAxis { local XId = EmtAxis {
Name = 'X', Name = 'X',
Parent = 'Base', Parent = 'Base',
@@ -331,21 +305,21 @@ end
-- Eventuale rinvio angolare -- Eventuale rinvio angolare
if SecondSupport >= 3 then if SecondSupport >= 3 then
local H5Id = EmtHead { local H5Id = EmtHead {
Name = 'H5', Name = 'H5',
Parent = 'B', Parent = 'B',
HSet = 'H1', HSet = 'H1',
Type = MCH_HT.MULTI, Type = MCH_HT.MULTI,
ExitNbr = 2, ExitNbr = 2,
Pos1 = Point3d( 0, -AngTr1Len, -AngTr1Offs), Pos1 = Point3d( 0, -AngTr1Len, -AngTr1Offs),
TDir1 = Y_AX(), TDir1 = Y_AX(),
Pos2 = Point3d( 0, AngTr1Len, -AngTr1Offs), Pos2 = Point3d( 0, AngTr1Len, -AngTr1Offs),
TDir2 = -Y_AX(), TDir2 = -Y_AX(),
ADir = Z_AX(), ADir = Z_AX(),
Rot1W = 0.2, Rot1W = 0.2,
Rot2Stroke = { -120, 120}, Rot2Stroke = { -120, 120},
OthColl = { 'H2', 'B/SOLID', 'C/SOLID'}, OthColl = { 'H2', 'B/SOLID', 'C/SOLID'},
Geo = 'H5_HEAD/GEO', Geo = 'H5_HEAD/GEO',
Aux = {'H5_HEAD/SOLID', 'H5_HEAD/COLLISION'}} Aux = {'H5_HEAD/SOLID', 'H5_HEAD/COLLISION'}}
EgtSetInfo( H5Id, 'AGB_TYPE', 2) EgtSetInfo( H5Id, 'AGB_TYPE', 2)
EgtSetInfo( H5Id, 'AGB_DMAX', 240) EgtSetInfo( H5Id, 'AGB_DMAX', 240)
EgtSetInfo( H5Id, 'AGB_ENCH', 44) EgtSetInfo( H5Id, 'AGB_ENCH', 44)
@@ -353,6 +327,23 @@ if SecondSupport >= 3 then
EgtSetInfo( H5Id, 'AGB_MDIR', X_AX()) EgtSetInfo( H5Id, 'AGB_MDIR', X_AX())
EgtSetInfo( H5Id, 'ZMAXONROT', '1,15') EgtSetInfo( H5Id, 'ZMAXONROT', '1,15')
end end
-- Eventuale aggregato per lavorazioni BlockHaus
if AggreBlockHaus then
local H7Id = EmtHead {
Name = 'H7',
Parent = 'B',
HSet = 'H1',
Type = MCH_HT.STD,
Pos = Point3d( AngTrBHLen, 0, -AngTrBHOffs),
TDir = -X_AX(),
ADir = X_AX(),
Rot1W = 0.2,
SolCh = MCH_SCC.ADIR_NEAR,
OthColl = {'H2', 'B/SOLID', 'C/SOLID'},
Geo = 'H7_HEAD/GEO',
Aux = {'H7_HEAD/SOLID', 'H7_HEAD/COLLISION'}}
end
-- Morse -- Morse
local YId = EmtAxis { local YId = EmtAxis {
Name = 'Y', Name = 'Y',
@@ -483,22 +474,83 @@ EmtTcPos {
TDir = -X_AX(), TDir = -X_AX(),
ADir = -Y_AX(), ADir = -Y_AX(),
Geo = 'BASE/T10'} Geo = 'BASE/T10'}
EmtTcPos { if AggreBlockHaus then
Name = 'T11', local TcpSsId = EmtTcPos {
Parent = 'Base', Name = 'T11',
Pos = Point3d( 523.8, 88.0, -877.5),
TDir = -X_AX(),
ADir = -Y_AX(),
Geo = 'BASE/T11'}
if not SpecialBH then
EmtTcPos {
Name = 'T101',
Parent = 'Base', Parent = 'Base',
Pos = Point3d( -510.4, 113.2, -160.8), Pos = Point3d( 678.3, -1.963, -877.5),
TDir = X_AX(), TDir = Y_AX(),
ADir = Z_AX(), ADir = -X_AX(),
Geo = 'BASE/T101'} Geo = 'BASE/T121',
Aux = 'BASE/T121_HS'}
else else
EmtTcPos {
Name = 'T11',
Parent = 'Base',
Pos = Point3d( 523.8, 88.0, -877.5),
TDir = -X_AX(),
ADir = -Y_AX(),
Geo = 'BASE/T11'}
end
-- ToolChanger 2
if SecondToolChanger then
EmtTcPos {
Name = 'T21',
Parent = 'Base',
Pos = Point3d( -503.2, 88.0, 172.5),
TDir = X_AX(),
ADir = -Y_AX(),
Geo = 'BASE/T21'}
EmtTcPos {
Name = 'T22',
Parent = 'Base',
Pos = Point3d( -503.2, 88.0, 67.5),
TDir = X_AX(),
ADir = -Y_AX(),
Geo = 'BASE/T22'}
EmtTcPos {
Name = 'T23',
Parent = 'Base',
Pos = Point3d( -503.2, 88.0, -37.5),
TDir = X_AX(),
ADir = -Y_AX(),
Geo = 'BASE/T23'}
EmtTcPos {
Name = 'T24',
Parent = 'Base',
Pos = Point3d( -503.2, 88.0, -142.5),
TDir = X_AX(),
ADir = -Y_AX(),
Geo = 'BASE/T24'}
EmtTcPos {
Name = 'T25',
Parent = 'Base',
Pos = Point3d( -503.2, 88.0, -247.5),
TDir = X_AX(),
ADir = -Y_AX(),
Geo = 'BASE/T25'}
EmtTcPos {
Name = 'T26',
Parent = 'Base',
Pos = Point3d( -503.2, 88.0, -352.5),
TDir = X_AX(),
ADir = -Y_AX(),
Geo = 'BASE/T26'}
EmtTcPos {
Name = 'T27',
Parent = 'Base',
Pos = Point3d( -503.2, 88.0, -457.5),
TDir = X_AX(),
ADir = -Y_AX(),
Geo = 'BASE/T27'}
EmtTcPos {
Name = 'T28',
Parent = 'Base',
Pos = Point3d( -503.2, 88.0, -562.5),
TDir = X_AX(),
ADir = -Y_AX(),
Geo = 'BASE/T28'}
EmtTcPos { EmtTcPos {
Name = 'T101', Name = 'T101',
Parent = 'Base', Parent = 'Base',
@@ -506,48 +558,66 @@ else
TDir = X_AX(), TDir = X_AX(),
ADir = Z_AX(), ADir = Z_AX(),
Geo = 'BASE/T101S'} Geo = 'BASE/T101S'}
end else
if SecondSupport == 1 then if not SpecialBH then
-- supporto per punta EmtTcPos {
EmtTcPos { Name = 'T101',
Name = 'T111', Parent = 'Base',
Parent = 'Base', Pos = Point3d( -510.4, 113.2, -160.8),
Pos = Point3d( -510.4, 113.2, -329.8), TDir = X_AX(),
TDir = Z_AX(), ADir = Z_AX(),
ADir = X_AX(), Geo = 'BASE/T101'}
Geo = 'BASE/T111'} else
elseif SecondSupport == 2 then EmtTcPos {
-- supporto per mortasatrice Name = 'T101',
local TcpSsId = EmtTcPos { Parent = 'Base',
Name = 'T111', Pos = Point3d( -510.4, 113.2, -1160.8),
Parent = 'Base', TDir = X_AX(),
Pos = Point3d( -510.4, 113.2, -430.8), ADir = Z_AX(),
TDir = X_AX(), Geo = 'BASE/T101S'}
ADir = Z_AX(), end
Geo = 'BASE/T111M'} if SecondSupport == 1 then
EgtSetInfo( TcpSsId, 'Mortiser', true) -- supporto per punta
elseif SecondSupport == 3 then EmtTcPos {
-- supporto per rinvio angolare Name = 'T111',
local TcpSsId = EmtTcPos { Parent = 'Base',
Name = 'T91', Pos = Point3d( -510.4, 113.2, -329.8),
Parent = 'Base', TDir = Z_AX(),
ExitNbr = 2, ADir = X_AX(),
Pos1 = Point3d( -710.4-150, 113.2, -329.8-170), Geo = 'BASE/T111'}
TDir1 = X_AX(), elseif SecondSupport == 2 then
Pos2 = Point3d( -710.4+150, 113.2, -329.8-170), -- supporto per mortasatrice
TDir2 = -X_AX(), local TcpSsId = EmtTcPos {
ADir = Z_AX(), Name = 'T111',
Geo = 'BASE/T91', Parent = 'Base',
Aux = 'BASE/T91_HS'} Pos = Point3d( -510.4, 113.2, -430.8),
end TDir = X_AX(),
if SpecialBH then ADir = Z_AX(),
EmtTcPos { Geo = 'BASE/T111M'}
Name = 'T111', EgtSetInfo( TcpSsId, 'Mortiser', true)
Parent = 'Base', elseif SecondSupport == 3 then
Pos = Point3d( -810.4, 113.2, -329.8), -- supporto per rinvio angolare
TDir = Y_AX(), local TcpSsId = EmtTcPos {
ADir = X_AX(), Name = 'T91',
Geo = 'BASE/T111S'} Parent = 'Base',
ExitNbr = 2,
Pos1 = Point3d( -710.4-150, 113.2, -329.8-170),
TDir1 = X_AX(),
Pos2 = Point3d( -710.4+150, 113.2, -329.8-170),
TDir2 = -X_AX(),
ADir = Z_AX(),
Geo = 'BASE/T91',
Aux = 'BASE/T91_HS'}
end
if SpecialBH then
EmtTcPos {
Name = 'T111',
Parent = 'Base',
Pos = Point3d( -810.4, 113.2, -329.8),
TDir = Y_AX(),
ADir = X_AX(),
Geo = 'BASE/T111S'}
end
end end
-- Aggiusto posizioni geometriche -- Aggiusto posizioni geometriche
@@ -600,7 +670,7 @@ end
-- Funzione per impostare spia stato morsa carrello Y -- Funzione per impostare spia stato morsa carrello Y
function SetPYLight( bClosed) function SetPYLight( bClosed)
if not PYLightId then return end if not PYLightId then return end
EgtSetColor( PYLightId, EgtIf( bClosed, 'RED', 'LIME')) EgtSetColor( PYLightId, EgtIf( bClosed, 'RED', 'LIME'))
if bClosed then if bClosed then
EgtSetInfo( PYLightId, 'On', '1') EgtSetInfo( PYLightId, 'On', '1')
else else
@@ -634,6 +704,52 @@ function GetPVLight()
return ( EgtGetInfo( PVLightId, 'On') == '1') return ( EgtGetInfo( PVLightId, 'On') == '1')
end end
---------------------------------------------------------------------
---------------------------- Cambio Utensile ------------------------
function GetTCSet( sTcPos)
-- TC 1
if sTcPos == 'T1' or sTcPos == 'T2' or sTcPos == 'T3' or sTcPos == 'T4' or sTcPos == 'T5' or
sTcPos == 'T6' or sTcPos == 'T7' or sTcPos == 'T8' or sTcPos == 'T9' or sTcPos == 'T10' or sTcPos == 'T11' then
return 1
-- TC 2
elseif sTcPos == 'T21' or sTcPos == 'T22' or sTcPos == 'T23' or sTcPos == 'T24' or
sTcPos == 'T25' or sTcPos == 'T26' or sTcPos == 'T27' or sTcPos == 'T28' then
return 2
end
end
---------------------------------------------------------------------
-- Funzione per impostare la posizione del rinvio flottante
function SetFloatPos( sHead, dPos)
-- recupero Id testa
local nHeadId = EgtGetHeadId( sHead)
if not nHeadId then return false end
-- se ci sono entità flottanti nel ToolHolder
local nRefId = EgtGetFirstNameInGroup( nHeadId, '_T1')
local vtTool = EgtFR( nRefId, GDB_ID.ROOT):getVersZ()
local nObjId = EgtGetFirstGroupInGroup( EgtGetFirstNameInGroup( nHeadId, 'T1'))
local FloatEntities = EgtGetInfoInGroup( nObjId, 'Float')
if FloatEntities and #FloatEntities > 0 then
-- il porta-utensile flottante non può comprimersi più di 10mm
if dPos > 10 then
local sErr = 'Floating Ring compressed more than 10mm'
EmtSetLastError( 1222, sErr)
EgtOutLog( 'Error : ' .. sErr, 1)
end
local dFloat = EgtGetInfo( FloatEntities[1], 'Float', 'd')
if abs( dPos - dFloat) > 10 * GEO.EPS_SMALL then
local vtMove = ( dPos - dFloat) * vtTool
-- sposto tutte le entità flottanti
for i = 1, #FloatEntities do
EgtMove( FloatEntities[i], vtMove, GDB_RT.GLOB)
EgtSetInfo( FloatEntities[i], 'Float', dPos)
end
end
return true
end
return false
end
--------------------------------------------------------------------- ---------------------------------------------------------------------
-- Funzione per resettare tutte le attivazioni della macchina -- Funzione per resettare tutte le attivazioni della macchina
function OnResetMachine() function OnResetMachine()
@@ -641,6 +757,7 @@ function OnResetMachine()
EmtUnlinkAllFixturesFromGroups() EmtUnlinkAllFixturesFromGroups()
SetPYLight( false) SetPYLight( false)
SetPVLight( false) SetPVLight( false)
SetFloatPos( 'H1', 0)
-- nascondo Vmill -- nascondo Vmill
local nRawId = EgtGetFirstRawPart() local nRawId = EgtGetFirstRawPart()
while nRawId do while nRawId do
BIN
View File
Binary file not shown.
+48
View File
@@ -0,0 +1,48 @@
; Commento per evitare BOM con UTF-8
;Index = Type, Description, Default Value
; Type : b=boolean, d=double, l=lenght, s=string
[Drilling]
[Sawing]
[Milling]
0=d,MaxElev,0
1=d,OutRaw,0
2=d,SideElev,0
3=d,TrimExt,0
4=sr,VtFaceUse,0,0,0
[Pocketing]
0=d,MaxElev,0
1=b,Open,0
2=d,OpenMinSave,0
3=d,OpenOutRaw,0
4=d,MaxOptSize,0
[Mortising]
0=d,MaxElev,0
[Chiseling]
[GenMachining]
[SurfRoughing]
[SurfFinishing]
0=b,SkipMaxDown,1
[5AxMilling]
0=l,LinTol,0.01
1=l,MaxLen,10
2=s,Type,ZigZag
3=d,SideAng,90
4=l,Step,10
5=l,OffsProj,0
6=l,LiTang,0
7=l,LiOrth,0
8=l,LiElev,0
9=l,LoTang,0
10=l,LoOrth,0
11=l,LoElev,0
12=b,DirFromGuide,1
+26 -12
View File
@@ -24,7 +24,7 @@ local INVALIDPOS = ""
local POS = "Pos" local POS = "Pos"
-- Geom Set -- Geom Set
local GS = {} local GS = {{"H1", "H7", "H8"}}
-- Configurazione posizioni -- Configurazione posizioni
local PositionTable={{Pos = "Pos1", TcPos = "T1", Head = "H1", Group = "G1"}, local PositionTable={{Pos = "Pos1", TcPos = "T1", Head = "H1", Group = "G1"},
@@ -40,20 +40,34 @@ local PositionTable={{Pos = "Pos1", TcPos = "T1", Head = "H1", Group = "G1"},
{Pos = "Pos11", TcPos = "T11", Head = "H1", Group = "G1"}, {Pos = "Pos11", TcPos = "T11", Head = "H1", Group = "G1"},
{Pos = "Pos12", TcPos = "T42", Head = "H2", Group = "G1"}, {Pos = "Pos12", TcPos = "T42", Head = "H2", Group = "G1"},
{Pos = "Pos13", TcPos = "T101", Head = "H3", Group = "G2"}} {Pos = "Pos13", TcPos = "T101", Head = "H3", Group = "G2"}}
local SecSuppId = EgtGetTcPosId( 'T111')
if SecSuppId then local IsTC2Active = ( EgtGetFirstNameInGroup( EgtGetBaseId( 'Base'), 'TC2') ~= nil)
local bMortiser = EgtGetInfo( SecSuppId, 'Mortiser', 'b') if IsTC2Active then
if bMortiser then local PositionTableTC2={{Pos = "Pos14", TcPos = "T21", Head = "H1", Group = "G3"},
table.insert( PositionTable, {Pos = "Pos14", TcPos = "T111", Head = "H3", Group = "G2"}) {Pos = "Pos15", TcPos = "T22", Head = "H1", Group = "G3"},
else {Pos = "Pos16", TcPos = "T23", Head = "H1", Group = "G3"},
table.insert( PositionTable, {Pos = "Pos14", TcPos = "T111", Head = "H1", Group = "G2"}) {Pos = "Pos17", TcPos = "T24", Head = "H1", Group = "G3"},
{Pos = "Pos18", TcPos = "T25", Head = "H1", Group = "G3"},
{Pos = "Pos19", TcPos = "T26", Head = "H1", Group = "G3"},
{Pos = "Pos20", TcPos = "T27", Head = "H1", Group = "G3"},
{Pos = "Pos21", TcPos = "T28", Head = "H1", Group = "G3"}}
EgtJoinTables( PositionTable, PositionTableTC2)
else
local SecSuppId = EgtGetTcPosId( 'T111')
if SecSuppId then
local bMortiser = EgtGetInfo( SecSuppId, 'Mortiser', 'b')
if bMortiser then
table.insert( PositionTable, {Pos = "Pos14", TcPos = "T111", Head = "H3", Group = "G2"})
else
table.insert( PositionTable, {Pos = "Pos14", TcPos = "T111", Head = "H1", Group = "G2"})
end
end
if EgtGetHeadId( 'H5') then
table.insert( PositionTable, {Pos = "Pos14", TcPos = "T91", Head = "H5", Group = "G2"})
end end
end end
if EgtGetHeadId( 'H5') then
table.insert( PositionTable, {Pos = "Pos14", TcPos = "T91", Head = "H5", Group = "G2"})
end
local UsePositionHead = true local UsePositionHead = false
local function IsInGeomSet( ToolHead, PosHead) local function IsInGeomSet( ToolHead, PosHead)
for GsIndex = 1, #GS do for GsIndex = 1, #GS do
Binary file not shown.
Binary file not shown.
+43
View File
@@ -0,0 +1,43 @@
; Commento per evitare BOM con UTF-8
; Index, Type, Description, Value
; Index = 0,1,..,n
; Type : d=double, l=lenght, s=string, b=boolean, dr=double recalc, sr= string recalc, lr=lenght recalc, br=boolean recalc, th=toolholder
; Description : STEP, SIDESTEP, ...
[DRILL_STD]
0=th,TH,
1=d,STEP
2=s,DOUBLE
[SAW_STD]
0=th,TH,
1=d,STEP
2=d,SIDESTEP
3=b,LONGCUT
[SAW_FLAT]
0=th,TH,
1=d,STEP
2=d,SIDESTEP
3=b,LONGCUT
[MILL_STD]
0=th,TH,
1=d,STEP
2=d,SIDESTEP
3=d,SIDEDEPTH
4=s,DOUBLE
5=dr,TOOL_OVERHANG
[MILL_NOTIP]
0=th,TH,
1=d,STEP
2=d,SIDESTEP
3=d,SIDEDEPTH
4=s,DOUBLE
5=dr,TOOL_OVERHANG
[MORTISE_STD]
0=b,MORTISE
1=d,STEP
2=d,SIDESTEP
+68 -1
View File
@@ -1,7 +1,74 @@
==== Common_FAST Update Log ==== ==== Common_FAST Update Log ====
Versione 2.7a1 (07/01/2024)
- (MLDE-SIM-GEN) Nuovo aggregato 90° (H7) per fresa tipo BlockHaus. Ticket#2142
- (SIM-GEN) Aumentati limiti massimi di pinzaggio minimo
Versione 2.6l1 (02/12/2024)
- (SIM) Corretto movimento VMILL durante scarico pezzo piccolo a caduta
- (SIM-GEN) Per decidere posizione parcheggio barra dopo separazione, si considera lunghezza coda del pezzo in lavoro per evitare collisioni. Ticket#2168
Versione 2.6k1 (11/11/2024)
- (GEN) Aggiunta gestione aggregato a T per NUM
- (SIM) Tolta gestione testa dummy H4
- (SIM-GEN) Aggiustato parametro in calcolo ingombro lavorazione. Ticket#2163
Versione 2.6j10 (25/10/2024)
- (SIM-GEN) Miglioria 2.6j9. Si ribadisce pinza in presa sempre, all'inizio, in base a quella attiva
Versione 2.6j9 (22/10/2024)
- (SIM-GEN) Miglioria 2.6j6. Oltre al passo pellegrino si ribadisce anche quando è scambio diretto
Versione 2.6j8 (21/10/2024)
- (SIM-GEN) Corretto problema tolleranza aggiunto con versione 2.6j7
Versione 2.6j7 (18/10/2024)
- (SIM-GEN) In nuova disposizione carrelli, aggiunta tolleranza di 100 EPS quando si calcola minimo posizionamento
Versione 2.6j6 (17/10/2024)
- (GEN) Si ribadisce che la pinza era in presa, prima di cominciare con lo scambio del passo del pellegrino. Ticket#2121
Versione 2.6j5 (17/10/2024)
- (SIM-GEN) Piccola correzione nuovo riposizionamento. Nel taglio dello scarto finale riposizionava nel vuoto. Ticket#2115
Versione 2.6j4 (15/10/2024)
- (SIM-GEN) Piccola correzione nuovo riposizionamento. Non considerava i 50mm di tolleranza su primo pinzaggio dopo ribaltamento
- (SIM-GEN) Gestione attivazione pressore verticale in nuovo riposizionamento
Versione 2.6j3 (11/10/2024)
- (GEN) Corretta scrittura macro start/attesa movimenti per NUM. Veniva scritto codice per TPA.
Versione 2.6j2 (03/10/2024)
- (SIM-GEN) Piccola correzione calcolo posizione carrello durante riposizionamento, nuova gestione
Versione 2.6j1 (01/10/2024)
- (SIM-GEN) Sistemato calcolo in nuova disposzione carrelli
Versione 2.6i6 (25/09/2024)
- (GEN) Migliorata gestione movimenti per portare testa vicino a cambio utensile se trave alta. Ticket#2066
Versione 2.6i5 (24/09/2024)
- (SIM-GEN) Tolto controllo su lunghezza maggiore di 200mm introdotto con 2.6i2 perchè non completamente funzionante
- (GEN) Gestione in OnRapid() di EMT.FLAG=5 (rotazione a Z max per lavorazione successiva). Ora allineata alla simulazione
Versione 2.6i4 (24/09/2024)
- (SIM-GEN) Aggiunto ripinzaggio extra in caso servisse un grande spostamento e si sta pinzando poco.
L'aggiunta del ripinzaggio dipende da FASTCLAMPING (che deve essere disattiva). Viene aggiunta GAIN_RECLAMPING per decidere il guadagno in mm del ripinzaggio.
Versione 2.6i3 (23/09/2024)
- (SIM-GEN) Aggiunta nuova strategia riposizionamento morse
- (SIM-GEN) Aggiunta lettura flag NEWCLAMPING in BeamData, per abilitare nuova strategia riposizionamento. Se false o nil, funziona con metodo vecchio.
- (SIM-GEN) Aggiunta lettura flag FASTCLAMPING. Se false, al carico prende al massimo 1000mm, per evitare collisioni durante ciclo di lettura laser e prima lavorazione.
Versione 2.6i2 (16/09/2024)
- (SIM-GEN) Se utensili più lunghi di 200mm, si ruota in home e poi si approccia il pezzo. Ticket#2038
- (SIM-GEN) Aumentata distanza ingombro da 650mm a 660mm. In casi di utensile abbastanza lungo poteva andare in colisione. Ticket#2041
Versione 2.6i1 (02/09/2024)
- (MLDE-SIM-GEN) Rinominato file da "Common-" a "Common_" per uniformità con i file common delle altre macchine. Serve modifica a MLDE macchina.
Versione 2.6g1 (03/07/2024) Versione 2.6g1 (03/07/2024)
- (GEN) Corretto chiamata macro precarico in caso di taglio finale, ma con ribaltaemnto successivo. Ora si chiama solo se la fase successiva è una "END". Ticket#1881 - (GEN) Corretto chiamata macro precarico in caso di taglio finale, ma con ribaltamento successivo. Ora si chiama solo se la fase successiva è una "END". Ticket#1881
- (GEN) Per controllo NUM, se arco maggiore di 99999mm, si approssima con una retta. Ticket#1888 - (GEN) Per controllo NUM, se arco maggiore di 99999mm, si approssima con una retta. Ticket#1888
Versione 2.6e3 (06/05/2024) Versione 2.6e3 (06/05/2024)
+3 -3
View File
@@ -1,9 +1,9 @@
-- Version.lua by EgalWare s.r.l. 2024/03/28 -- Version.lua by EgalWare s.r.l. 2024/12/23
-- Gestione della versione dei file comuni post-processori macchine FAST e FASTrl di Essetre -- Gestione della versione dei file comuni post-processori macchine FAST e FASTrl di Essetre
local InfoCommon_STD_PP = { local InfoCommon_STD_PP = {
NAME = 'Common-FAST', -- nome script PP standard NAME = 'Common_FAST', -- nome script PP standard
VERSION = '2.6g1', -- versione script VERSION = '2.7a1', -- versione script
MIN_MACH_VER_PP_COMMON = '2.5k1' -- versione minima kernel MIN_MACH_VER_PP_COMMON = '2.5k1' -- versione minima kernel
} }