© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 2 Siemens Industry Software – Março/2013
Post Builder
NX
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 3 Siemens Industry Software – Março/2013
Descrição
NX
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 4 Siemens Industry Software – Março/2013
Referência Adicional
NX
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 5 Siemens Industry Software – Março/2013
Agenda
NX
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 6 Siemens Industry Software – Março/2013
NX/Post - Produtos
NX
NX/Post Execute
Usado para pós-processar um programa
Post Builder
Usado para criar ou editar um pós-processador
NX/Post Advanced Kinematics
Biblioteca para máquinas especiais (até V3.0)
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 7 Siemens Industry Software – Março/2013
NX/Post - Arquitetura
NX
OS
Event Name
variable
NX Part Event
Generator variable NX/Post
variable
Event:
Movimento linear/circular
Avanço/Rotação
Ciclos de furação, etc. Output File
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 8 Siemens Industry Software – Março/2013
Pós-processando …
NX
tcl cls
def
cnc
Elementos necessários :
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 9 Siemens Industry Software – Março/2013
NX/Post – Como funciona?
NX
Evento:
Movimento Linear
NX Part Event
mom_pos(0)
mom_pos(1)
Generator
mom_pos(2)
NX/Post
Variáveis
Event Handler “.tcl”
Definition File .def
proc MOM_linear_move {} {
#_____________________________________________________________________ BLOCK_TEMPLATE linear {
# This procedure is executed for each linear move. It gets called after cutcom_g[$mom_sys_cutcom_code($mom_cutcom_status)]\opt
# the positioning varables, position and tool axis (X,Y,Z,TAX,TAY,TAZ) are loaded. plane_g[$mom_sys_cutcom_plane_code($mom_cutcom_plane)]\opt
#_____________________________________________________________________ motion_g[$mom_sys_linear_code]
global mom_cutcom_mode X[$mom_pos(0)]
global mom_cutcom_status Y[$mom_pos(1)]
global anchor_flag fator_av Z[$mom_pos(2)]
F[$feed * $fator_av]
set anchor_flag 1 D[$mom_cutcom_adjust_register]\opt
}
if {$mom_cutcom_status == "ON"} {
set mom_cutcom_status $mom_cutcom_mode
} elseif {$mom_cutcom_status == "OFF"} {
MOM_suppress once cutcom_g
}
}
MOM_do_template linear
Output File
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 10 Siemens Industry Software – Março/2013
Manufacturing Output Manager
NX (MOM)
Criar/Editar
procedures
Post Builder
Criar/Editar
blocos
template
Testar Não
Saída
OK Testar Não
Saída
Casos Especiais
Tipo da
Máquina OK
(Advanced Kinematics /
New IKS)
Pós-Processador
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Finalizado
Page 12 Siemens Industry Software – Março/2013
Preparando o Ambiente
NX de teste
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 13 Siemens Industry Software – Março/2013
Iniciando o
NX PostBuilder
Iniciar através de :
“Start All Programs Siemens NX 8.0
Manufacturing Post Builder ”
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 14 Siemens Industry Software – Março/2013
Criando um novo
NX Pós-processador
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 15 Siemens Industry Software – Março/2013
Criando um novo
NX Pós-processador
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 16 Siemens Industry Software – Março/2013
Criando um novo
NX Pós-processador
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 17 Siemens Industry Software – Março/2013
Criando um novo
NX Pós-processador
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 18 Siemens Industry Software – Março/2013
Instalando um novo
NX Pós-processador
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 19 Siemens Industry Software – Março/2013
Instalando um novo
NX Pós-processador
Local e arquivo
“template_post.dat”
que está sendo
editado.
2) Apertar o botão
“New”.
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 20 Siemens Industry Software – Março/2013
Instalando um novo
NX Pós-processador
Localize e selecione o
arquivo
“Disc1250_S802d_3e.pui”
a ser inserido.
Depois teclar (apertar) o
botão “OPEN”.
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 21 Siemens Industry Software – Março/2013
Instalando um novo
NX Pós-processador
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 22 Siemens Industry Software – Março/2013
Instalando um novo
NX Pós-processador
Alterar o titulo,
conforme desejar.
Por exemplo: Alterar a
palavra
“Disc1250_S802d_3e”
por “Discovery_1250”.
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 23 Siemens Industry Software – Março/2013
Instalando um novo
NX Pós-processador
Aperte os botões
“OK” e “Save”
para salvar as
alterações.
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 24 Siemens Industry Software – Março/2013
Instalando um novo
NX Pós-processador
Aperte o botão
“Yes” para
Substituir o
arquivo anterior.
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 25 Siemens Industry Software – Março/2013
Exercício 1
NX
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 26 Siemens Industry Software – Março/2013
Configurando Pós Processsador
NX 03 eixos
Define posição do
HOME
Define limite do
avanço programado
Define número de
casas decimais do
arquivo CN
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 27 Siemens Industry Software – Março/2013
Configurando Pós Processsador
NX 03 eixos
Define se as coordenadas
devem ser multiplicadas por
“2” para representar o valor
do DIÂMETRO
Define o ESPELHAMENTO
dos eixos de coordenadas
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 28 Siemens Industry Software – Março/2013
Configurando Pós Processsador
NX 03 eixos
Retorna os valores
previamente digitados,
mesmo que ainda não
tenham sido salvos.
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 29 Siemens Industry Software – Março/2013
Configurando Pós Processsador
NX 03 eixos
Resumo dos registradores utilizados ...
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 30 Siemens Industry Software – Março/2013
Terminologias
NX dos registradores
Atividade : Sumário
(Word summary)
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 32 Siemens Industry Software – Março/2013
Configurando Pós Processsador
NX 03 eixos
Program Start Sequence:
Determina quais informações ocorrerão entre o início do programa e
a primeira operação.
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 33 Siemens Industry Software – Março/2013
Configurando Pós Processsador
NX 03 eixos
Program Start Sequence:
• Mão: comando
customizado ou MOM
• Página: mensagem
para o operador
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 35 Siemens Industry Software – Março/2013
Configurando Pós Processsador
NX 03 eixos
Tool Path Sequence:
Contém eventos e ações relativos ao controle da máquina, aos
movimentos da ferramenta e aos ciclos fixos.
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 36 Siemens Industry Software – Março/2013
Configurando Pós Processsador
NX 03 eixos
Tool Path Sequence:
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 37 Siemens Industry Software – Março/2013
Configurando Pós Processsador
NX 03 eixos
Operation End Sequence:
Contém eventos e ações que ocorrerão entre o último RETRACT e
o final de cada operação.
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 38 Siemens Industry Software – Março/2013
Configurando Pós Processsador
NX 03 eixos
Program End Sequence:
Contém eventos e ações que ocorrerão entre o fim da última
operação e o fim do programa.
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 39 Siemens Industry Software – Março/2013
Configurando Pós Processsador
NX 03 eixos
Tabela de códigos “G” e “M” ...
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 40 Siemens Industry Software – Março/2013
Configurando Pós Processsador
NX 03 eixos
Definição da sequência de códigos de máquina ...
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 41 Siemens Industry Software – Março/2013
Exercício 3
NX
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 42 Siemens Industry Software – Março/2013
Configurando Pós Processsador
NX 03 eixos
Bloco:
Define quais os dados serão exibidos em uma linha de comando.
São formados por “palavras”.
Saída opcional
Sem separador
Força a saída
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 43 Siemens Industry Software – Março/2013
Configurando Pós Processsador
NX 03 eixos
Palavra (ou Registrador):
Define o registrador, o formato de saída e as características do
registrador
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 44 Siemens Industry Software – Março/2013
Configurando Pós Processsador
NX 03 eixos
Formato:
Determina se o dado será exibido como numérico real, numérico
inteiro ou string (caracteres).
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 45 Siemens Industry Software – Março/2013
Configurando Pós Processsador
NX 03 eixos
Outros parâmetros ...
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 46 Siemens Industry Software – Março/2013
Exercícios 4 e 5
NX
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 47 Siemens Industry Software – Março/2013
Controle de Arquivos de Saída
NX
Habilita a criação do
Machine Tool Drive
(MTD) para IS&V
Define Informações
contidas na listagem de
saída Habilita a geração de uma
listagem de saída do
programa
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 48 Siemens Industry Software – Março/2013
Controle de Arquivos de Saída
NX
Gera um arquivo para cada
programa (pasta) existente no
Program View
Define extensão do
arquivo pós-processado
Mostra mensagens de
erro na tela
Ativa ferramenta de
análise do pós-
processamento (Debug)
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 49 Siemens Industry Software – Março/2013
Controle de Arquivos de Saída
NX
Activate Review Tool habilitado: “Debug”.
Eventos
gerados
Dados
gerados por
cada evento
Variáveis e endereços
ativos durante o
evento
MOM_initial_move 5
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 50 Siemens Industry Software – Março/2013
Exercício 6
NX
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 51 Siemens Industry Software – Março/2013
Definição e edição
NX units-only subposts
Abrirá uma caixa de diálogo para definir e editar um post processador apresenta o nome
do processador atualmente aberto para edição na sua barra de título.
Valores do post principal são mostrados em caixas azuis que não pode ser alteradas na
caixa de diálogo.
Valores para as unidades da subpost aparecem em caixas brancas que você pode
modificar.
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 52 Siemens Industry Software – Março/2013
Definição e edição
NX units-only subposts
Principais guias a seguir estão disponíveis:
Units Parameters
Padrão de valores para conversões padrão dos valores no post principal.
Se sua máquina e controladores manuais especificarem valores diferentes dos valores automaticamente
convertidos, você pode defini-las nesta tabela.
WORD
Valores para formatos do WORD são padronizados para o mesmo número de dígitos, com uma mudança do
ponto decimal.
Por exemplo, se o formato for 4.4 em polegadas, é representado nesta caixa de diálogo como 9999.9999.
Se seu controlador reconhecer um formato diferente para unidades alternativas, você pode configurá-lo nesta
tabela.
FORMAT
Este tabela possui formatos para coordenadas absolutas e taxas de avanços.
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 53 Siemens Industry Software – Março/2013
Exercício 7
NX
Finalidade
Definir um processo para criar um subpost com unidades que não são as
unidades padrão do pós principal.
Este subpost é chamado automaticamente pelo pós principal quando você
definir a saída em unidades que não sejam as unidades padrão.
Objetivo
Crie um subpost de unidades alternativas.
Link um subpost para um pós principal.
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 54 Siemens Industry Software – Março/2013
Configurando Pós Processsador
NX 04 e 05 eixos
Fresadoras - Opções disponíveis de pós processadores:
duas para 04 Eixos e três para 05 Eixos .
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 55 Siemens Industry Software – Março/2013
Configurando Pós Processsador
NX 05 eixos
(exemplo) Fresadora – 05 eixos giro CABEÇOTE e MESA .
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 56 Siemens Industry Software – Março/2013
Configurando Pós Processsador
NX 05 eixos
(exemplo) Fresadoras - 05 eixos giro MESA e MESA (fig. Esquerda)
- 05 eixos giro CABEÇ. e CABEÇ. (fig. Direita)
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 57 Siemens Industry Software – Março/2013
Configurando Pós Processsador
NX 05 eixos
Configurações dos eixos rotativos
Magnitude Determines Direction
O maior ângulo de rotação é sempre para a
direita e um ângulo menor é sempre no
sentido anti-horário.
Normalmente, os limites de rotação neste
tipo de mesa ou eixo são mais de 360
graus, por exemplo, –9999 a 9999.
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 59 Siemens Industry Software – Março/2013
Configurando Pós Processsador
NX 05 eixos
Planos de Rotação:
XY, YZ e ZX – Máquinas ortogonais
Other - Máquinas não ortogonais
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 60 Siemens Industry Software – Março/2013
Configurando Pós Processsador
NX 05 eixos
New Inverse Kinematics Solver (IKS)
Plano de rotação do eixo B = Other
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 61 Siemens Industry Software – Março/2013
Configurando Pós Processsador
NX 05 eixos
New Inverse Kinematics Solver (IKS)
Plano de rotação do eixo B = Other
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 62 Siemens Industry Software – Março/2013
Exercício 8
NX
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 63 Siemens Industry Software – Março/2013
Configurando Pós Processsador
NX Wire EDM
Angles
Saídas de inclinação (tilt e lead) em
relação à direção do movimento.
Saída típica para controladores Agie.
Coordinates
Saídas de coordenadas relativas a
posição X e Y, entre a guia do fio
superiores e inferior. Saída típica para
controladores Mitsubishi e Charmilles.
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 64 Siemens Industry Software – Março/2013
Exercício 9
NX
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 65 Siemens Industry Software – Março/2013
Configurando Pós Processsador
NX Tornos
Opções disponíveis de pós processadores para tornos.
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 66 Siemens Industry Software – Março/2013
Configurando Pós Processsador
NX Tornos
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 67 Siemens Industry Software – Março/2013
Exercício 10
NX
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 68 Siemens Industry Software – Março/2013
Configurando Pós Processsador
NX para Centro de Torneamento
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 69 Siemens Industry Software – Março/2013
Configurando Pós Processsador
NX para Centro de Torneamento
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 70 Siemens Industry Software – Março/2013
Configurando Pós Processsador
NX para Centro de Torneamento
Parâmetros gerais:
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 72 Siemens Industry Software – Março/2013
Configurando Pós Processsador
NX para Centro de Torneamento
Parâmetros do quarto eixo:
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 73 Siemens Industry Software – Março/2013
Exercício 11 a 13
NX
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 74 Siemens Industry Software – Março/2013
Customizando um Pós
NX Processsador
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 75 Siemens Industry Software – Março/2013
Customizando um Pós
NX Processsador
Importando Comandos customizados
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 76 Siemens Industry Software – Março/2013
Customizando um Pós
NX Processsador
Exportando Comandos customizados
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 77 Siemens Industry Software – Março/2013
Customizando um Pós
NX Processsador
Criando Comandos customizados
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 78 Siemens Industry Software – Março/2013
Customizando um Pós
NX Processsador
Utilizando Comandos customizados
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 79 Siemens Industry Software – Março/2013
MOM
NX (Manufacturing Output Manager)
O que é MOM?
É o mecanismo criado para acessar dados do NX e extraí-los;
O que é EVENTO?
É o conjunto de dados que representam uma ação realizada
no caminho da ferramenta, em um arquivo NX (ex.: troca de
ferramenta, etc...). Esses dados são associados a um grupo
específico de variáveis (MOM (mom) Variables).
Para cada EVENTO deve haver uma “procedure” equivalente
no pós-processador (event handler), responsável por tratar os
dados extraídos.
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 80 Siemens Industry Software – Março/2013
MOM
NX (Manufacturing Output Manager)
Componentes de um Pós-Processador:
Um pós-processador “mill_3ax” gerado no Post Builder é
composto pelos seguintes arquivos:
Arq. de referência do
mill_3ax.pui Post Builder
Arq. de controle de
• mill_3ax.tcl Eventos (Event Handler)
Arq. de definições do
• mill_3ax.def Comando da máquina CNC
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 81 Siemens Industry Software – Março/2013
MOM
NX (Manufacturing Output Manager)
Componentes de um Pós-Processador:
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 82 Siemens Industry Software – Março/2013
MOM
NX (Manufacturing Output Manager)
Como identificar os comandos e variáveis MOM:
1. Na barra principal do Post Builder, menu UTILITIES, selecione opção
“Browse MOM variables”
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 83 Siemens Industry Software – Março/2013
MOM - Review Tool
NX
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 84 Siemens Industry Software – Março/2013
MOM - Review Tool
NX
REVIEW TOOL:
Possibilita analisar os diversos eventos
gerados, suas vaiáveis “MOM” e os blocos
inseridos no arquivo pós-processado.
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 85 Siemens Industry Software – Março/2013
MOM - Pós Processamento
NX
Ordem de execução dos Eventos :
Start of Program
Start of Group
Machine Mode
UDE's inseridos ao programa
UDE's inseridos ao group
Start of Path
First Tool
Start Post UDE's inseridos à operação
Tool Path (Initial Move, Rapid Move, Linear move, etc...)
End Post UDE's inseridos à operação
End of Path
End of Group
End of Program
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 86 Siemens Industry Software – Março/2013
Definindo um Pós Processador
NX
“Procedure” de Inicialização:
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 87 Siemens Industry Software – Março/2013
Definindo um Pós Processador
NX
“Procedure” de Inicialização:
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 88 Siemens Industry Software – Março/2013
Exercícios 14 e 15
NX
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 89 Siemens Industry Software – Março/2013
Criando User Defined Events
NX (UDE)
User Defined Events (UDE) é um
mecanismo de inserir informações na
operação ou em um programa, para que o
pós processador execute ou interprete.
UDE’s vão desde comandos de pós-
processamento “Coolant On ou Off” (obs. a
esquerda), ou até um conjunto de
informações para definir um cabeçalho
especial para o programa (obs. a direita).
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 90 Siemens Industry Software – Março/2013
Criando User Defined Events
NX (UDE)
Sintaxe de um User Defined Event:
Nome do evento
EVENT <name>
{ Nome do evento MOM
PARAM too_text
{
TYPE s
TOGGLE Off
UI_LABEL “Text”
}
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 92 Siemens Industry Software – Março/2013
Criando User Defined Events
NX (UDE)
Suporte de desenvovimento em
11 idiomas.
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 93 Siemens Industry Software – Março/2013
Exercícios 16 a 23
NX
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 94 Siemens Industry Software – Março/2013
Lesson11 -
NX Virtual NC controller
Finalidade:
O módulo integrado de simulação e verificação (IS&V) permite simular uma máquina-
ferramenta, dando-lhe uma visão geral de todos os movimentos da mesma no processo de
usinagem. Conforme funções do controlador e configurações da ferramenta de corte.
Objetivo:
Checagem dos componentes que compõem o módulo integrado de simulação e verificação.
Com o Post Builder se gerar um controlador Virtual NC, usado na simulação de máquina-
ferramentas.
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 95 Siemens Industry Software – Março/2013
Exercícios 24 a 26
NX
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 96 Siemens Industry Software – Março/2013
Lesson 12 -
NX Postprocessing with a Siemens controller
Finalidade:
Os Templates controladores Siemens darão o necessário controle e
flexibilidade para se programar diferentes comandos Siemens.
Objetivo:
Construir e analisar um pós padrão para um comando Siemens 840D.
Torno
• Sinumerik_840D_lathe
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 97 Siemens Industry Software – Março/2013
Exercício 27
NX
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 98 Siemens Industry Software – Março/2013
Definindo Macro
NX
Mascara para criar, editar ou remover modelos de bloco para executar chamadas
de macro, ciclo ou funções no programa NC.
Os códigos de saída são em forma de ciclo ou macro, como CYCLE81(...) para o comando
Sinumerik 840 D ou ciclo DEF 204 A200 =... para comando Heidenhain iTNC530, ou
podendo ser uma outra função de chamadas similar de alto nível.
Adding macros
Post Builder fornece estrutura para
conhecidos ciclos de furação ligados
através de eventos apropriados.
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 99 Siemens Industry Software – Março/2013
Exercício 28
NX
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 100 Siemens Industry Software – Março/2013
NX
Introdução a
Lógica de Programação e TCL
Behind the Scenes
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 101 Siemens Industry Software – Março/2013
Pré-requisitos
NX
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 102 Siemens Industry Software – Março/2013
Tópicos principais
NX
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 103 Siemens Industry Software – Março/2013
Lógica de Programação
NX
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 104 Siemens Industry Software – Março/2013
Lógica de Programação
NX
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 105 Siemens Industry Software – Março/2013
Lógica de Programação
NX
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 106 Siemens Industry Software – Março/2013
Lógica de Programação
NX
Fluxograma
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 107 Siemens Industry Software – Março/2013
Lógica de Programação
NX
Alguns símbolos utilizados em fluxogramas:
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 108 Siemens Industry Software – Março/2013
Lógica de Programação
NX
Estrutura de decisão :
N1 N 2 N 3 media=(N1+N2+N3)/3
Média
3
Média = “[media]”
3. Imprimir Média
Fim
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 110 Siemens Industry Software – Março/2013
Lógica de Programação
NX
Exercício 1:
Fazer um fluxograma para o cálculo do FATORIAL de um
número qualquer ...
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 111 Siemens Industry Software – Março/2013
Lógica de Programação
NX
Exercício 2:
Fazer um fluxograma para que, dada uma sequência de
números não nulos, imprimir o maior deles ...
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 112 Siemens Industry Software – Março/2013
Lógica de Programação
NX
Exercício 1: Solução
Início
Ler N
N=0
Fat = 1
Fat = 1
X=2
V Enquanto N O Fatorial de N
X <= N é “[FAT]”
N = natural?
V
N
Fat = FAT * X
N não é natural, Final
X=X+1
Não existe
Fatorial
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 113 Siemens Industry Software – Março/2013
Lógica de Programação
NX
Exercício 2: Solução
1
Início 2
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 115 Siemens Industry Software – Março/2013
Linguagem TCL
NX
Estrutura de Comando:
Os comandos são compostos por de “palavras” que incluem:
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 116 Siemens Industry Software – Março/2013
Linguagem TCL
NX
TCL Script:
É uma sequência de comandos. Os comentários devem ser
precedidos pelo símbolo “#”.
Variáveis:
São “lugares conhecidos” que servem para guardar
informações. As informações podem ser numéricas ou strings
(conjunto de letras, números e símbolos).
O nome das variáveis têm necessariamente que começar com
uma letra e não podem conter espaços.
Letras maiúsculas e minúsculas são caracteres diferentes,
portanto a variável “T ” é diferente da variável “t ”.
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 117 Siemens Industry Software – Março/2013
Linguagem TCL
NX
Variáveis:
Na linguagem TCL, todos os valores guardados em uma
variável estão no formato de string, independente de seu
conteúdo.
Variáveis Locais: são aquelas usadas dentro de uma sub-
rotina (procedures) e só existem durante a execução da sub-
rotina que a criou.
Variáveis Globais: são aquelas que possibilitam o tráfego de
informações através do programa e suas sub-rotinas, ou seja,
pode ser utilizada a qualquer instante, em qualquer sub-rotina,
desde que declaradas previamente através do comando
“global”.
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 118 Siemens Industry Software – Março/2013
Linguagem TCL
NX
Expressões Matemáticas:
O comando para executar expressões matemáticas é o
“expr”. Os operadores básicos usados são:
+ adição * multiplicação
- subtração / divisão
Exemplo: [expr 3 * 2 + 1]
Definição de Variáveis:
“set” é o comando para definição de variáveis.
Exemplo: set flag 1 ( flag=1 )
set X [expr 2 * 3] ( X=6 )
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 119 Siemens Industry Software – Março/2013
Linguagem TCL
NX
Substituição de Variáveis:
O comando “$” faz com que o programa interpretador
enxergue o conteúdo da variável ao invés do nome da
mesma.
Exemplo:
set flag [expr 2 * 3] ( flag=6 )
set X flag ( X=flag )
set Y $flag ( Y=6 )
set Z [expr $Y * 2] ( Z=12 )
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 120 Siemens Industry Software – Março/2013
Linguagem TCL
NX
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 121 Siemens Industry Software – Março/2013
Linguagem TCL
NX
* Multiplicação || OU lógico( OR )
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 122 Siemens Industry Software – Março/2013
Linguagem TCL
NX
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 123 Siemens Industry Software – Março/2013
Linguagem TCL
NX
Procedures:
É o mesmo que uma sub-rotina, ou seja, é uma seqüência de
comandos com uma finalidade específica, estruturados da
seguinte forma:
proc <nome da procedure> {argumentos} {
seqüência de comandos .....
..........
..........
}
O uso de “procedures” torna-se muito mais fácil criar e
modificar programas.
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 126 Siemens Industry Software – Março/2013
Linguagem TCL
NX
Exercício 3:
Escrever um programa em TCL para o cálculo do FATORIAL
de um número qualquer ...
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 127 Siemens Industry Software – Março/2013
Linguagem TCL
NX
Exercício 4:
Escrever um programa em TCL, para que, dada uma
seqüência de números não nulos, imprimir o maior deles ...
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 128 Siemens Industry Software – Março/2013
Linguagem TCL
NX
Exercício 3: Solução
puts stdout "=> Digite um número qualquer e tecle enter:"
gets stdin N
Set FAT 1
# verifica se N é NATURAL
if {[expr $N - int($N)] == 0 && $N >= 0} {
#é numero NATURAL
if {$N != 0} {
for {set i 2} {$i <= $N} {incr i } {
set FAT [expr $FAT * $i ]
}
}
puts stdout "O fatorial de $N = $FAT"
} else {puts stdout "ERRO: Número N não é NATURAL !!"}
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 129 Siemens Industry Software – Março/2013
Linguagem TCL
NX
Exercício 4: Solução
set lista {1, 5, 2, 65, 6, 34, 4, 3, 58, 0}
set i 0
set maior 0
while {[lindex $lista $i ] != 0} {
if {[lindex $lista $i ] > $maior} {
set maior [lindex $lista $i ]
}
incr i
}
puts stdout “ $maior eh o maior numero dentre: $lista”
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 130 Siemens Industry Software – Março/2013
Configurando um Pós
NX Processador
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 132 Siemens Industry Software – Março/2013
Exercício 02 (exemplo):
NX Program & Tool Path Parameters
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 133 Siemens Industry Software – Março/2013
Exemplo 01 (solução):
NX Registradores X, Y, e Z
1°
2°
Utilize esta
3 3 barra de
3 3 rolagem
vertical
3 3 para
visualizar
outros
registradores
3 1
4 0
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 135 Siemens Industry Software – Março/2013
Exemplo 01 (solução):
NX Registradores D
Selecionar o
endereço
“D” para
abrir o menu
de edição
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 136 Siemens Industry Software – Março/2013
Exemplo 01 (solução):
NX Registradores D
999
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 137 Siemens Industry Software – Março/2013
Exemplo 01 (solução):
NX Registradores N
5
5
Salvar e
testar o PP.
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 138 Siemens Industry Software – Março/2013
Exemplo 02 (solução):
NX Modificar caracter de % para #
Clic duplo
sobre o ítem
com %.
Selecionar este ítem e pressionar
MB3, depois selecionar Change
Element, e então User Defined
Expression.
#
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 139 Siemens Industry Software – Março/2013
Exemplo 02 (solução):
NX Criar bloco com G70G90G40G17G94
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 140 Siemens Industry Software – Março/2013
Exemplo 02 (solução):
NX Suprimir G97, modificar D e H
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 141 Siemens Industry Software – Março/2013
Exemplo 02 (solução):
NX Editar T
MB3 sobre o
bloco T e
selecionar
Edit.
3 999
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 142 Siemens Industry Software – Março/2013
Exemplo 02 (solução):
NX Salvar eTestar o PP
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 143 Siemens Industry Software – Março/2013
Exemplo 03 (extra):
NX Construindo Procedures.
#==================================================
proc CIRCUMFERENCE {} {
#==================================================
# Output the circ. based on the input diameter
#
global diameter
set pi 3.1415926536
# set circ [expr $pi * $diameter]
set circ [format "%5.3f" [expr $pi * $diameter]]
#==================================== #=============================
proc RESULTS {} { proc CIRCLE {} {
#==================================== #=============================
# #
# Output the results # Calculate the area of a circle
# #
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 145 Siemens Industry Software – Março/2013
Exemplo 03 (extra):
NX Controles de Fluxo.
#====================================
proc RECTANGLE {} {
#====================================
# Calculate the area of a rectangle
global area
set in ""
switch $in {
r {RECTANGLE}
c {CIRCLE}
R {RECTANGLE}
C {CIRCLE}
default {puts stdout "Invalidy Entry!"}
}
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 146 Siemens Industry Software – Março/2013
Finish (Fim)
NX
Dúvidas?
Considerações finais!
Etc...
© 2013. Siemens Product Lifecycle Management Software Inc. All rights reserved
Page 147 Indice Siemens Industry Software – Março/2013
Suporte Técnico
NX
ATENÇÃO:
- Para agilizar seu suporte (chamado);
- Favor primeiro entre em contato conosco, para depois executar o envio de arquivo com as dúvidas.