Introducao Tc3 (v2.1)
Introducao Tc3 (v2.1)
Introducao Tc3 (v2.1)
Introdução ao TwinCAT 3
1
Apresentação
2
AVEIRO (sede)
Quinta do Simão
EN109 - Esgueira
3800-230 Aveiro
PORTUGAL
bresimar@bresimar.pt
LISBOA (filial)
CONTACTOS TagusPark
Núcleo Central, 308
2740-122 Oeiras
PORTUGAL
bresimarlis@bresimar.pt
3
Objetivos
OBJETIVOS
4
Beckhoff
BECKHOFF
• IPC
• Automation
• I/O
• Motion
5
Industrial PCs
IPC
6
Componentes fieldbus
I/O
7
Automation
AUTOMATION
8
Motion
MOTION
9
TwinCAT 3 XAE
TWINCAT XAE
10
TwinCAT 3 XAE
TWINCAT XAE
11
Software
SOFTWARE
12
TwinCAT 3 XAE
Operating systems
•Windows 7 Service Pack 1
•Windows 8
•Windows Server 2008 R2 SP1
•Windows Server 2012 (R2)
•Windows 10
•Windows XP (with pre-installed Visual Studio 2010, Shell if necessary)
Hardware requirements
TWINCAT 3 •Processor clock rate of 1.6 GHz or faster
XAE •x86: 1GB RAM, x64: 2 GB RAM
•2 GB free memory space if the Visual Studio 2013 Shell has not yet been installed
•Graphics card that supports DirectX9, with a minimum resolution of 1024 x 768
Depending on the project size the TwinCAT 3 XAE additionally requires at least:
•2 GB free memory space
•1 GB RAM
13
TwinCAT 3 XAR
14
TwinCAT 3 XAR
Operating systems
•Windows XP with SP3
•Windows Embedded Standard 2009
•Windows 7
•Windows Embedded Standard 7
•Windows 10
•Windows 10 LTSB
On Beckhoff controllers and with a TwinCAT 3 Image provided:
•Windows Embedded Compact 7 - WEC7
Hardware requirements
•500 MB free memory space
TWINCAT 3 •RAM depends on the activated configuration
XAR
Notes:
•In the case of 64-bit operating systems the VT-x CPU function is absolutely necessary. (Must
be activated in BIOS and available).
•Further system requirements are available in the respective product description of the
TwinCAT components.
•The real-time behavior depends on a large number of parameters of the actual computer and
the installed components.
•It is recommended to use controllers and components from Beckhoff with the operating system
images provided.
15
TwinCAT 3 - Plataformas
TWINCAT 3
PLATFORMS
16
TwinCAT 3 - Overview
OVERVIEW
17
TwinCAT 3 - Overview
OVERVIEW
18
INFOSYS
INFOSYS
19
Atalho
ATALHO
20
XAE – VS2013 Shell
XAE – VS2013
SHELL
21
New project
NEW PROJECT
22
Ligação ao PLC
Ligação a um PLC
LIGAÇÃO AO
PLC
23
Registo dos PLC(s) no Router
REGISTO DOS
PLC(S) NO
ROUTER
24
Broadcast Search/Registo do PLC
Procura
UDP/ADS
BROADCAST
SEARCH/
REGISTO DO
PLC
25
Broadcast Search/Registo do PLC
Atenção ao
IP atribuído
na placa
BROADCAST
SEARCH/
REGISTO DO
PLC
26
Add Route
ADD ROUTE
Opção recomendada
Especialmente quando
A CPU tem o Sistema
27
Operativo CE
Config Mode
CONFIG MODE
28
Scan Hardware
SCAN
HARDWARE
29
Scan Hardware
Confirmar OK
SCAN
HARDWARE
30
Testar IO – Free Run
O comando Free Run permite testar os IOs no campo no modo Config (boa alternativa se
ainda não tiver programa e queira testar sinais).
TESTAR IO –
FREE RUN
31
Adicionar PLC
ADICIONAR
PLC
32
Adicionar PLC
ADICIONAR
PLC
33
Parâmetros PLC
PARÂMETROS
PLC
34
Parâmetros PLC
PARÂMETROS
PLC
35
Parâmetros PLC
PARÂMETROS
PLC
36
Parâmetros PLC
PARÂMETROS
PLC
37
Parâmetros PLC
PARÂMETROS
PLC
38
Login PLC
Login
LOGIN PLC
39
Login PLC
LOGIN PLC
40
Login PLC
LOGIN PLC
41
Login PLC
LOGIN PLC
42
Login PLC
LOGIN PLC
43
Login PLC
LOGIN PLC
44
Login PLC
Login with online change: Opção por defeito. São realizadas as alterações e
LOGIN PLC imediatamente depois é possível ver o programa em Online.
Login with download: Se for esta opção selecionada o programa será alterado,
inicializado e colocado em STOP.
Login without any change: Se for esta opção selecionada não é realizada
alteração ao código.
45
Declarar variáveis
• Nome
• Tamanho
• Valor
• Tipo de memória
• Endereço PLC
DECLARAR
VARIÁVEIS
46
Declarar variáveis
• De acordo com a IEC 61131-3, um nome de variável deve aderir às seguintes regras
1. A variável deve começar com uma letra ou um Underscore
2. A variável pode ser seguida por Cartas, Underscore ou números
• Nenhuma distinção é feita entre Maiúsculas e Letras minúsculas
Não é permitido
• Caracteres especiais não podem ser usados (! @ # $% ^ & *)
DECLARAR • Espaços não são permitidos
VARIÁVEIS • Underscores repetidos ou sequenciais não são permitidos
47
Exercícios
• IEC61113-3
• ST – Structured Text
• FBD – Function Block Diagram
• LD – Ladder Diagram
• SFC – Sequencial Function Chart
• IL – Instruction List
EXERCÍCIOS
48
Exercícios
Primeiro exercício prático tem por base fazer um exercício muito simples como um pisca-
pisca com quatro liguagens diferentes:
1. LD (encravamento com Input 1, associas ao Output 1)
2. FBD (encravamento com Input 2, associas ao Output 2)
3. ST (encravamento com Input 3, associas ao Output 3)
4. SFC (encravamento com Input 4, associas ao Output 4)
EXERCÍCIO 1
49
Exercícios
Melhor abordagem de duas linguagens, com um exercício muito utilizado na área dos
automatismos, tal como um arranque sequencial (iremos associar este arranque a quatro
saídas):
• ST – Structured Text
• manusear uma linguagem em texto, com a instrução
“CASE”.
50
Exercícios
Fazer uma Function Block que traduza o valor adimensional (neste caso da carta EL3062),
num valor dimensional.
EXERCÍCIO 3
51
www.bresimar.pt
52