Você está na página 1de 110

2005-10-19

mpro_twcplc.pdf (v1.0)

Beckhoff TwinCAT
The Windows Control and Automation Technology

Introduo s instrues standard do TwinCAT PLC

NDICE

I TIPO DE DADOS E VARIVEIS I.1 Identificadores (Identifiers) I.2 Prefixos (Prefix) I.3 Tipo de dados (Data type) I.4 Operandos (Operands) I.5 Variveis e endereos II LISTA DE INSTRUES STANDARD II.1 Instrues numricas II.2 Instrues aritmticas II.3 Instrues lgicas II.4 Instrues de deslocao de bit II.5 Instrues de seleco II.6 Instrues de comparao II.7 Instrues de converso II.8 Instrues vrias III FUNES BLOCO STANDARD III.1 Funes bloco Standard - Biestavel III.2 Funes bloco Standard Trigger III.3 Funes bloco Standard - Temporizadores III.4 Funes bloco Standard Contadores IV FUNES STANDARD IV.1 Funes Standard String V EXEMPLOS PRTICOS V.1 Arranque directo de motor trifsico V.2 Inverso de rotao de motor trifsico V.3 Arranque estrela-triangulo de motor trifsico A RESUMO DE INSTRUES E FUNES STANDARD A.1 Resumo de instrues do TwinCAT PLC A.2 Resumo das funes bloco standard A.3 Resumo das funes standard B LISTA DE ERROS DE COMPILAO DE PROGRAMA B.1 Erros de compilao

TWINCAT PLC Tipo de Dados e Variaveis

BECKHOFF New Automation Technology

I TIPO DE DADOS E VARIAVEIS 1 IDENTIFICADORES (Identifiers) 2 PREFIXOS (Prefix) 3 TIPO DE DADOS (Data type) 4 OPERANDOS (Operands) 5 VARIAVEIS E ENDEREOS

BRESIMAR

<j.andril@bresimar.pt>

Cap. I 1 de 9

TWINCAT PLC Tipo de Dados e Variaveis

BECKHOFF New Automation Technology

BRESIMAR

<j.andril@bresimar.pt>

Cap. I 2 de 9

TWINCAT PLC Tipo de Dados e Variaveis

BECKHOFF New Automation Technology

1 IDENTIFICADORES (Identifiers)
Cada identificador de variveis , funes , etc assinalado com um tipo de dados que dita o espao de memoria que ser reservado na CPU . Um identificador um nome que designa uma varivel , funo ou outro tipo de dados e que dever cumprir os seguintes requisitos : y y y Comear por uma letra ou underscore Seguido por nmeros , letras e underscore No existe diferenas entre letras maisculas e minsculas

e no sero permitidos os seguintes caracteres y y y Caracteres especiais (!, ,*,&,$,#, etc) Caracteres em branco Underscore seguidos

2 PREFIXOS (Prefix)
Para uma melhor identificao do tipo de identificador de boa prtica colocar um prefixo no inicio de cada nome , para uma melhor organizao e clarificao do programa , tal como usado nas linguagens de alto nvel ( Visual Basic ,etc. ) . Todavia no obrigatrio para o bom funcionamento do programa . As primeiras letras devero ser o prefixo ( letras minscula ) do identificador seguido do nome da varivel que dever comear por uma letra maisculas . Aqui vo as nossas sugestes para alguns tipos de dados : PREFIXO b by w dw si i di r s t tod dt d pt str TIPO de DADOS BOOL BYTE WORD DWORD SINT INTEGER DINT REAL STRING TIME TIME_OF_DAY DATE_AND_TIME DATE POINTER STRUCT EXEMPLO bNomevariavelbool byNomevariavelbyte wNomevariavelbool dwNomevariavelbool syNomevariavelsinteiro byNomevariavelinteiro dyNomevariaveldinteiro wNomevariavelreal dwNomevariavelstring tNomevariaveltempo todNomevariaveltempodia dtNomevariaveldatatempo dNomevariaveldata ptNomevariavelponteiro strNomevariavelestrutura

BRESIMAR

<j.andril@bresimar.pt>

Cap. I 3 de 9

TWINCAT PLC Tipo de Dados e Variaveis

BECKHOFF New Automation Technology

3 TIPO DE DADOS (Data type)


Conforme o que foi dito inicialmente todos os identificadores sejam variveis ou no tero de ser assinalados com um tipo de dados que definir o tamanho de memoria a ser reservado na CPU . Podemos dividir em dois grupos os tipos de dados : y y Tipo de dados ELEMENTARES . Tipo de dados COMPLEXOS ou ESTRUTURADOS em que o formato dos dados definido pelo programador .

3.1 - DADOS ELEMENTARES Tipo BOOL BYTE WORD DWORD USINT UINT UDINT SINT INT DINT REAL LREAL DATE TOD DT Tamanho 1 bit 8 bit 16 bit 32 bit 8 bit 16 bit 32 bit 8 bit 16 bit 32 bit 32 bit 64 bit 32 bit 32 bit 32 bit Limites TRUE .. FALSE 16#00 .. FF 16#0000 .. FFFF 16#0000_0000 .. FFFF_FFFF 0 .. 255 0 .. 65 535 0 .. 4 294 967 295 -128 .. 127 -32 768 .. 32 767 -2 147 483 648 .. 2 147 483 647

D#1970-01-01 .. 2106-02-06 TOD# 00:00:00 .. 1193:02:47.295 DT#1970-01-01-00:00 .. 2106-02-06-06:28:15

Configurao da representao do tipo de dados <identificao> AT <formato> : <tipo> = <constante> ;

BRESIMAR

<j.andril@bresimar.pt>

Cap. I 4 de 9

TWINCAT PLC Tipo de Dados e Variaveis

BECKHOFF New Automation Technology

3.2 - DADOS COMPLEXOS ou ESTRUTURADOS Tipo ARRAY POINTER SUBRANGE Configurao <identificao>:ARRAY [<Linf1>..<Lsup1>,<Linf2>..<Lsup2>] OF <tipo dado> ; <identificao>: POINTER TO <tipo dado / funo bloco>; TYPE <nome subrange> : <tipo dado> (<limite inf>..<limite sup>); END_TYPE; TYPE <identificao>: <term assinalado>; END_TYPE TYPE <identificao>: (<num0> ,<num1>, ..,<num_n>); END_TYPE TYPE <nome estrutura>: STRUCT <Declarao da varivel 1> ; . <Declarao da varivel n> ; END_STRUCT END_TYPE

ALIAS

ENUM

STRUCT

BRESIMAR

<j.andril@bresimar.pt>

Cap. I 5 de 9

TWINCAT PLC Tipo de Dados e Variaveis

BECKHOFF New Automation Technology

4 OPERANDOS (Operands)
Neste paragrafo iremos apresentar num pequeno resumo , as diversas maneiras de representar dentro do programa , constantes para cada um dos tipos (Types) de dados existentes no TwinCAT PLC . 4.1 - Constantes em BOOL As constantes em BOOL so representadas por FALSE e TRUE . 4.2 - Constantes em BYTE , WORD , DWORD , INT , REAL etc As constantes em BYTE, WORD, DWORD, SINT, USINT, INT, UINT, DINT, UDINT, REAL, podero ser representadas em binrio , octal , decimal ou hexadecimal . Na representao de um numero real a parte decimal separada da parte inteira por um ponto (formato americano) e no uma virgula. As constantes tero a seguinte configuraes : Exemplos em ST : (* Representao em decimal inteiro e real *) byConstante:= -255 iConstante:=-INT#3565 (*n inteiro negativo) diConstante:=DINT#199978 rConstante:=-REAL#123.89 (*n real negativo) rConstante:= 1895.567 rConstantee:= 1.5e+010 (* Representao em binario *) byConstante1:= 2# 1001_1111 wConstante1:= 2# 1001_1111_0000_10101 (* Representao em octal *) byConstante2:= 8# 77 (* Representao em hexadecimal *) byConstante3:= 16# FF wConstante2:= 16# FF_FF dwConstante1:= 16# FF_FF_FF_FF 4.3 - Constantes em TIME No TwinCAT podemos declarar constantes temporais. Geralmente so usadas na definio do tempo nos temporizadores (Funo bloco standard TON , TOF , TP) . A constante ter a seguinte configurao : <touTouTIMEoutime ># diadhorahminutosmsegundossmilisegms Exemplos em ST : (* Valores correctos *) tTempo1:= T#14ms tTempo2:= TIME#100s12ms tTempo3:= t#23d12h45m3s (* Valores incorrectos *) tTempo4:= TIME#100m69s (*Limite excedido em seg.*) tTempo5:= T#100ms12d (*Ordem incorrecta*) 4.4 - Constantes em DATE Geralmente so usadas na definio de datas . A constante ter a seguinte configurao : <douDouDATEoudate># ano-mes-dia Exemplos em ST : (* Valores correctos *) dData1:= d#2005-12-01 dData2:= DATE#2000-06-02

BRESIMAR

<j.andril@bresimar.pt>

Cap. I 6 de 9

TWINCAT PLC Tipo de Dados e Variaveis

BECKHOFF New Automation Technology

4.5 - Constantes em TIME OF DAY Geralmente so usadas na definio do tempo (hora) do dia . A constante ter a seguinte configurao : <todouTODouTIME_OF_DAY># hora:minuto:segundo Exemplos em ST : (* Valores correctos *) todTod1:= tod#15:12:10.250 (* Podemos ter fraco de seg.*) todTod2:= TIME_OF_DAY#23:59:59 4.6 - Constantes em DATE AND TIME Geralmente so usadas na definio da data/hora . A constante ter a seguinte configurao: <dtouDTouDATE_AND_TIME>#ano-mes-dia-hora:minuto:segundo Exemplos em ST : (* Valores correctos *) dtDT1:= dt#1972-03-29-00:00:00 dtDT2:= DATE_AND_TIME#1999-06-19-23:00:15 4.7 - Constantes em STRING Um STRING uma sequncia de caracteres . As constantes em STRING so precedidas e finalizadas com aspas . Podemos por espaos e caracteres especiais e sero tratados como qualquer outro carcter . A combinao do smbolo $ seguido de um numero hexadecimal representa o cdigo de 8 bits da tabela de caracteres standard. Comandos especiais podero ser representados por um $ seguido de outro carcter como podemos ver a seguir . Caracteres comando $$ $ $L ou $l $N ou $n $P ou $p $R ou $r $T ou $t Exemplos em ST : (* Valores correctos *) stTexto1:= BRESIMAR(ASA) Descrio Representar o sinal de dolar($) Representar o sinal de aspas() Line feed New Line Page feed Line break Tab

5 VARIAVEIS E ENDEREOS
Neste paragrafo iremos apresentar num pequeno resumo as diversas maneiras de representar dentro do programa tais como as variveis e os endereos absolutos na memoria do hardware no TwinCAT . 5.1 Variveis As variveis podem ser declaradas tanto localmente , dentro do grupo de declarao dos POUs ou na lista das variveis globais . O identificadores das variveis no devero conter espaos em branco ou caracteres especiais como j anteriormente tnhamos dito . Letras maisculas no sero reconhecidas o que significa que VAR1 , Var1 e var1 so todas a mesma varivel . O sinal de underscore reconhecido nos identificadores ( por exemplo : A_BCD e AB_CD so duas variveis diferentes ) .Um identificador de uma varivel pode ter mais que um carcter underscore numa linha . Podemos identificar uma varivel com o mximo de 32 caracteres . Dentro do editor de programa TwinCAT , tempos acesso as variveis atravs do Input Assistant Local Variables ou Global Variables ( pressionar a tecla funo F2) e se desejarmos declarar novas variveis utilizamos o Auto Declare (pressionar shift+F2). BRESIMAR
<j.andril@bresimar.pt>

Cap. I 7 de 9

TWINCAT PLC Tipo de Dados e Variaveis

BECKHOFF New Automation Technology

Podemos aceder a variveis em ARRAYS , STRUCTURES e POUs utilizando as seguintes configuraes : Varveis em ARRAY ( ex. 2 dimenses) <nome do array>[index1 , index2] Variaveis em STRUCT <nome da structure> . <nome da varivel> Variveis em FUNES BLOCO ou PROGRAMAS <nome da funo bloco> . <nome da varivel>

5.2 Endereos A indicao directa de uma posio individual de memoria ou das entradas ou sadas do hardware utilizado feito atravs de uma sequencia de caracteres especiais.. Esta sequencia tem a seguinte configurao : %<prefixodotipo><prefixodotamanho> Prefixos do tipo de endereo Tipo % % % I O M Descrio Entrada (Input) Saida (Output) Memoria (Memory)

Prefixos do tamanho de endereo Tamanho X B W D Descrio bit Byte (8 bit) Word (16 bit) Dupla word (32 bit)

Exemplos : %QX75.1 %IW215 %QB7 %MD48

(* Bit 1 do byte de sada 75 *) (* Word de entrada 125 *) (* Byte de saida 7 *) (* Dupla Word da posio de memoria 48 *)

Para acedermos a uma dada localizao de memoria podemos utilizar qualquer tamanho ( bit , byte , Word ou duplo Word ) . Por exemplo o endereo %MD48 so os seguintes endereos no formato byte : %MD48 ======= > ( 48 x 4 ) %MB192 %MB193 %MB194 %MB195

No mapeamento da memoria o 1 byte tem o endereo 0 (zero) . BRESIMAR


<j.andril@bresimar.pt>

Cap. I 8 de 9

TWINCAT PLC Tipo de Dados e Variaveis

BECKHOFF New Automation Technology

Podemos no TwinCAT dentro de variveis do tipo SINT, INT, DINT, USINT, UINT, UDINT, BYTE, WORD, DWORD , se desejarmos , aceder a bits individualmente . Para fazermos isto , o ndex do bit a ser endereado colocado como um apndice na varivel e separado por um ponto . O ndex base o 0 ( zero) . Exemplo : (* Campo da declarao das variaveis *) (* No deve ser assinalada no campo VAR_IN_OUT *) a: INT; b:INT; (* Campo no POU - Main *) a.2 := b; (* O 3 bit da varivel a igual ao valor lgico de b *) Se o ndex maior que o tamanho do tipo da varivel escolhido surgir a seguinte mensagem de erro : Index <n> outside the valid range for variable <var> Se o tipo da varivel no permitir este modo de programao surgir a seguinte mensagem de err : Invalid data type <type> for direct indexing

BRESIMAR

<j.andril@bresimar.pt>

Cap. I 9 de 9

TWINCAT PLC - Lista de Instrues

BECKHOFF New Automation Technology

IV LISTA DE INSTRUES 1 - INSTRUES NUMRICAS 2 - INSTRUES ARITMTICAS 3 - INSTRUES LGICAS 4 - INSTRUES de DESLOCAO de BIT 5 - INSTRUES de SELECO 6 - INSTRUES de COMPARAO 7 - INSTRUES de CONVERSO 8 - INSTRUES VRIAS

BRESIMAR

<j.andril@bresimar.pt>

Cap. II 1 de 20

TWINCAT PLC - Lista de Instrues

BECKHOFF New Automation Technology

BRESIMAR

<j.andril@bresimar.pt>

Cap. II 2 de 20

TWINCAT PLC - Lista de Instrues

BECKHOFF New Automation Technology

1 - INSTRUES NUMRICAS
ABS Calcula o valor absoluto do numero . IN e OUT podero ter as seguintes combinaes : IN OUT INT INT, REAL, WORD, DWORD, DINT REAL REAL BYTE INT, REAL, BYTE, WORD, DWORD, DINT WORD INT, REAL, WORD, DWORD, DINT DWORD REAL, DWORD, DINT SINT REAL USINT REAL UINT INT, REAL, WORD, DWORD, DINT, UDINT, UINT DINT REAL, DWORD, DINT UDINT REAL, DWORD, DINT, UDINT Exemplo em ST: Var1:INT; Var1:= ABS(-2); (*Resultado 2) Exemplo em IL: LD -10 ABS ST Var1 (* Resultado 10*)

ACOS
Calcula o arco de co-seno (inverso de co-seno ) do numero . IN pode ser do tipo BYTE WORD DWORD INT DINT REAL SINT USINT UINT UDINT e OUT deve ser do tipo REAL .

ASIN
Calcula o arco de seno (inverso de seno ) do numero . IN pode ser do tipo BYTE WORD DWORD INT DINT REAL SINT USINT UINT UDINT e OUT deve ser do tipo REAL .

ATAN
Calcula o arco de tangente (inverso de tangente ) do numero . IN pode ser do tipo BYTE WORD DWORD INT DINT REAL SINT USINT UINT UDINT , e OUT deve ser do tipo REAL .

COS
Calcula o co-seno do numero . IN pode ser do tipo BYTE WORD DWORD INT DINT REAL SINT USINT UINT UDINT e OUT deve ser do tipo REAL .

EXP
Calcula o exponencial do numero . IN pode ser do tipo BYTE WORD DWORD INT DINT REAL SINT USINT UINT UDINT e OUT deve ser do tipo REAL .

BRESIMAR

<j.andril@bresimar.pt>

Cap. II 3 de 20

TWINCAT PLC - Lista de Instrues

BECKHOFF New Automation Technology

EXPT
Calcula o exponencial de numero levantado a outro numero . IN1 e IN2 pode ser do tipo BYTE WORD DWORD INT DINT REAL SINT USINT UINT UDINT e OUT deve ser do tipo REAL . Exemplo em ST: Var1:REAL; Var1:= EXPT(7,2); (*Resultado 2) Exemplo em IL: LD 7 EXPT 2 ST Var1 (* Resultado 49.0*)

LN
Calcula o logaritmo natural do numero . IN pode ser do tipo BYTE WORD DWORD INT DINT REAL SINT USINT UINT UDINT e OUT deve ser do tipo REAL .

LOG
Calcula o logaritmo de base 10 do numero . IN pode ser do tipo BYTE WORD DWORD INT DINT REAL SINT USINT UINT UDINT e OUT deve ser do tipo REAL .

SIN
Calcula o seno do numero . IN pode ser do tipo BYTE WORD DWORD INT DINT REAL SINT USINT UINT UDINT e OUT deve ser do tipo REAL .

SQRT
Calcula a raiz quadrada do numero . IN pode ser do tipo BYTE WORD DWORD INT DINT REAL SINT USINT UINT UDINT e OUT deve ser do tipo REAL .

TAN
Calcula a tangente do numero . IN pode ser do tipo BYTE WORD DWORD INT DINT REAL SINT USINT UINT UDINT e OUT deve ser do tipo REAL . Notas :

BRESIMAR

<j.andril@bresimar.pt>

Cap. II 4 de 20

TWINCAT PLC - Lista de Instrues

BECKHOFF New Automation Technology

2 - INSTRUES ARITMTICAS ADD


Calcula a soma aritmtica de variveis de diversos tipos : BYTE WORD DWORD SINT USINT INT UINT DINT UDINT REAL e LREAL. Duas variveis TIME podem ser somadas resultando um outro TEMPO (ex. T#45s + T#50s = T#1m35s) . Exemplo em ST: Var1:= 7+2+4+7; (*Resultado 20) Exemplo em IL: LD 7 ADD 2,4,7 ST Var1 (* Resultado 20*) Exemplo em FBD:

MUL
Calcula o produto aritmtico de variveis de diversos tipos : BYTE WORD DWORD SINT USINT INT UINT DINT UDINT REAL e LREAL Exemplo em ST: Var1:= 7*2*4*7; Exemplo em IL: LD 7 MUL 2,4,7 ST Var1 Exemplo em FBD:

SUB
Calcula a subtraco aritmtica de variveis de diversos tipos : BYTE WORD DWORD SINT USINT INT UINT DINT UDINT REAL e LREAL. Duas variveis TIME podem ser subtradas resultando um outro TEMPO . Um valor TIME negativo um valor indefinido. Exemplo em ST: Var1:= 7-2; Exemplo em IL: LD 7 SUB 2 ST Var1 Exemplo em FBD:

BRESIMAR

<j.andril@bresimar.pt>

Cap. II 5 de 20

TWINCAT PLC - Lista de Instrues

BECKHOFF New Automation Technology

DIV
Calcula a diviso aritmtica de variveis de diversos tipos :BYTE WORD DWORD SINT USINT INT UINT DINT UDINT REAL e LREAL . Exemplo em ST: Var1:= 7/2; Exemplo em FBD:

Nota : Usando CheckDivByte ; CheckDivWord ; CheckDivDWord e CheckDivReal podemos verificar o valor do divisor de maneira a evitar a diviso por zero .

MOD
Calcula o modulo de diviso (resto da diviso) de variveis de diversos tipos : BYTE WORD DWORD SINT USINT INT UINT DINT UDINT . Duas variveis TIME podem ser subtradas resultando um outro TEMPO . Um valor TIME negativo um valor indefinido. Exemplo em ST: Var1:= 9 MOD 2; Exemplo em IL: LD 9 MOD 2 ST Var1 (*Resultado 1*) Exemplo em FBD:

Notas :

BRESIMAR

<j.andril@bresimar.pt>

Cap. II 6 de 20

TWINCAT PLC - Lista de Instrues

BECKHOFF New Automation Technology

3 - INSTRUES LOGICAS AND


Calcula o produto lgico ( E) de variveis de diversos tipos : BOOL BYTE WORD DWORD . Exemplo em ST: Var1:= 2#1001_0011 AND 2#1000_1010; Exemplo em IL: Var1:BYTE; LD 2#1001_0011 AND 2#1000_1010 ST Var1 (* Resultado 2#1000_0010*) Exemplo em FBD:

OR
Calcula a soma lgica ( OU) de variveis de diversos tipos : BOOL BYTE WORD DWORD . Exemplo em ST: Var1:= 2#1001_0011 OR 2#1000_1010; Exemplo em IL: Var1:BYTE; LD 2#1001_0011 OR 2#1000_1010 ST Var1 (* Resultado 2#1001_1011*) Exemplo em FBD:

XOR
Calcula a soma lgica exclusiva ( OU-Exclusivo) de variveis de diversos tipos : BOOL BYTE WORD DWORD . Exemplo em ST: Var1:= 2#1001_0011 XOR 2#1000_1010; Exemplo em IL: Var1:BYTE; LD 2#1001_0011 XOR 2#1000_1010 ST Var1 (* Resultado 2#0001_1001*) Exemplo em FBD:

Nota : Usando mais que 2 entradas o resultado feito aos pares .

BRESIMAR

<j.andril@bresimar.pt>

Cap. II 7 de 20

TWINCAT PLC - Lista de Instrues

BECKHOFF New Automation Technology

NOT
Calcula a negao lgica (NO) de variveis de diversos tipos: BOOL BYTE WORD DWORD . Exemplo em ST: Var1:= NOT 2#1000_1010; Exemplo em IL: Var1:BYTE; LD 2#1001_0011 NOT ST Var1 (* Resultado 2#0110_1100*) Exemplo em FBD: Notas :

BRESIMAR

<j.andril@bresimar.pt>

Cap. II 8 de 20

TWINCAT PLC - Lista de Instrues

BECKHOFF New Automation Technology

4 - INSTRUES de DESLOCAO de BIT

SHL
Deslocao de IN em n bits esquerda e preenchendo de zeros os bits direita . A:= SHL(IN, N) . IN e OUT sero do tipo BYTE WORLD ou DWORLD . Exemplo em ST:

Exemplo em IL: LD 1 SHL 1 ST Var1 (* Resultado 2 *)

SHR
Deslocao de IN em n bits direita e preenchendo de zeros os bits esquerda . A:= SHR(IN, N) . IN e OUT sero do tipo BYTE WORLD ou DWORLD . Exemplo em ST:

Exemplo em IL: LD 32 SHR 2 ST Var1 (* Resultado 8 *)

BRESIMAR

<j.andril@bresimar.pt>

Cap. II 9 de 20

TWINCAT PLC - Lista de Instrues

BECKHOFF New Automation Technology

ROL
Deslocao de IN em n bits esquerda e com realimentao direita . A:= ROL(IN, N) . IN e OUT sero do tipo BYTE WORLD ou DWORLD . Exemplo em ST:

Exemplo em IL: Var1: BYTE; LD 2#1001_0011 ROL 3 ST Var1 (* Resultado 2#1001_1100 *)

ROR
Deslocao de IN em n bits direita e com realimentao esquerda . A:= ROR(IN, N) . IN e OUT sero do tipo BYTE WORLD ou DWORLD . Exemplo em ST:

Exemplo em IL: Var1: BYTE; LD 2#1001_0011 ROR 3 ST Var1 (* Resultado 2#0111_0010 *)

BRESIMAR

<j.andril@bresimar.pt>

Cap. II 10 de 20

TWINCAT PLC - Lista de Instrues

BECKHOFF New Automation Technology

5 - INSTRUES de SELECO SEL


Selector binario . OUT := SEL(G, IN0, IN1) . Significa que OUT := IN0 se G=FALSE; OUT := IN1 se G=TRUE. IN0, IN1 e OUT pode ser de qualquer tipo de dados , G deve ser BOOL . O resultado da seleco IN0 se G for FALSE e IN1 se G for TRUE . Exemplo em IL: LD TRUE SEL 3,4 ST Var1 (* Resultado 4 *) ou LD FALSE SEL 3,4 ST Var1 (* Resultado 3 *) Exemplo em FBD:

MAX
Seleco do maior dado . OUT := MAX(IN0, IN1) . IN0, IN1 e OUT pode ter qualquer tipo de dados . Exemplo em IL: LD 90 MAX 30 MAX 40 MAX 77 ST Var1 (* Resultado 90 *) Exemplo em FBD:

MIN
Seleco do menor dado . OUT := MIN(IN0, IN1) . IN0, IN1 e OUT pode ter qualquer tipo de dados . Exemplo em IL: LD 90 MIN 30 MIN 40 MIN 77 ST Var1 (* Resultado 30 *) Exemplo em FBD:

BRESIMAR

<j.andril@bresimar.pt>

Cap. II 11 de 20

TWINCAT PLC - Lista de Instrues

BECKHOFF New Automation Technology

LIMIT
Seleco de limites . OUT := LIMIT(Min, IN , Max). Significa que MAX o limite superior e MIN o limite inferior . Se o valor em IN ultrapassar o MAX o valor na sada OUT ser o MAX . Se o valor inferior a MIN o valor na sada OUT ser MIN. MIN, MAX, IN e OUT pode ser de qualquer tipo de dados . Exemplo em IL: LD 90 LIMIT 30,80 ST Var1 (* Resultado 80 *)

MUX
Multiplexador . OUT := MUX(K, IN0,...,INn) . Significa que o numero colocado em K indicar que o valor da entrada correspondente IN(K) ser colocada na saida OUT . IN0, IN1, INn, OUT pode ser de qualquer tipo de dados . K deve ser BYTE, WORD, DWORD, SINT, USINT, INT, UINT, DINT ou UDINT. Exemplo em IL: LD 0 MUX 30,40,50,60,70,80 ST Var1 (* Resultado 30 *) Notas :

BRESIMAR

<j.andril@bresimar.pt>

Cap. II 12 de 20

TWINCAT PLC - Lista de Instrues

BECKHOFF New Automation Technology

6 - INSTRUES de COMPARAO GT
Comparao maior que (>) . OUT:= IN1 GT IN2 . O valor do resultado OUT ser TRUE quando o 1 operando for maior que o 2 operando . Os operandos podem ser do tipo BOOL, BYTE, WORD, DWORLD, SINT, USINT, INT, UINT, DINT, UDINT, REAL, LREAL, TIME, TIME_OF_DAY, DATE_AND_TIME e STRING. Exemplo em ST: Var1:= 20 > 30 > 40; Exemplo em IL: LD 20 GT 30 ST Var1 (* Resultado FALSE *) Exemplo em FBD:

LT
Comparao menor que (<) . OUT:= IN1 LT IN2 . O valor do resultado OUT ser TRUE quando o 1 operando for menor que o 2 operando . Os operandos podem ser do tipo BOOL, BYTE, WORD, DWORLD, SINT, USINT, INT, UINT, DINT, UDINT, REAL, LREAL, TIME, TIME_OF_DAY, DATE_AND_TIME e STRING. Exemplo em ST: Var1:= 20 < 30 < 40; Exemplo em IL: LD 20 LT 30 ST Var1 (* Resultado TRUE *) Exemplo em FBD:

GE
Comparao maior ou igual a (>=) . OUT:= IN1 GE IN2 . O valor do resultado OUT ser TRUE quando o 1 operando for maior ou igual ao 2 operando . Os operandos podem ser do tipo BOOL, BYTE, WORD, DWORLD, SINT, USINT, INT, UINT, DINT, UDINT, REAL, LREAL, TIME, TIME_OF_DAY, DATE_AND_TIME e STRING. Exemplo em ST: Var1:= 20 > =20; Exemplo em IL: LD 20 GE 20 ST Var1 (* Resultado TRUE *) Exemplo em FBD:

BRESIMAR

<j.andril@bresimar.pt>

Cap. II 13 de 20

TWINCAT PLC - Lista de Instrues

BECKHOFF New Automation Technology

LE
Comparao menor ou igual a (<=) . OUT:= IN1 LE IN2 . O valor do resultado OUT ser TRUE quando o 1 operando for menor ou igual ao 2 operando . Os operandos podem se r do tipo BOOL, BYTE, WORD, DWORLD, SINT, USINT, INT, UINT, DINT, UDINT, REAL, LREAL, TIME, TIME_OF_DAY, DATE_AND_TIME e STRING. Exemplo em ST: Var1:= 20 > 30 > 40; Exemplo em IL: LD 20 LE 30 ST Var1 (* Resultado TRUE *)

EQ
Comparao igual (=) . OUT:= IN1 EQ IN2 . O valor do resultado OUT ser TRUE quando o 1 operando for igual ao 2 operando . Os operandos podem ser do tipo BOOL, BYTE, WORD, DWORLD, SINT, USINT, INT, UINT, DINT, UDINT, REAL, LREAL, TIME, TIME_OF_DAY, DATE_AND_TIME e STRING. Exemplo em ST: Var1:= 20 ; Exemplo em IL: LD 20 EQ 20 ST Var1 (* Resultado TRUE *) Exemplo em FBD:

NE
Comparao no igual (<>) . OUT:= IN1 <> IN2 . O valor do resultado OUT ser TRUE quando o 1 operando for diferente do 2 operando . Os operandos podem ser do tipo BOOL, BYTE, WORD, DWORLD, SINT, USINT, INT, UINT, DINT, UDINT, REAL, LREAL, TIME, TIME_OF_DAY, DATE_AND_TIME e STRING. Exemplo em ST: Var1:= 40 <> 40 ; Exemplo em IL: LD 40 NE 40 ST Var1 (* Resultado FALSE *) Exemplo em FBD:

BRESIMAR

<j.andril@bresimar.pt>

Cap. II 14 de 20

TWINCAT PLC - Lista de Instrues

BECKHOFF New Automation Technology

7 - INSTRUES de CONVERSO BOOL_TO converso


Converte uma varivel BOOL para qualquer outro tipo . Para variveis numricas o resultado 1 quando o operando TRUE e 0 quando o operando FALSE. O resultado TRUE ou FALSE respectivamente para variveis STRING. Exemplo em ST: i:=BOOL_TO_INT(TRUE); (* Resultado 1 *) str:=BOOL_TO_STRING(TRUE); (* Resultado 'TRUE' *) t:=BOOL_TO_TIME(TRUE); (* Resultado T#1ms *) tof:=BOOL_TO_TOD(TRUE); (* Resultado TOD#00:00:00.001 *) dat:=BOOL_TO_DATE(FALSE); (* Resultado D#1970-01-01 *) dandt:=BOOL_TO_DT(TRUE); (* Resultado DT#1970-01-01-00:00:01 *)

Converso TO BOOL
Converte qualquer tipo de varivel para o tipo BOOL . O resultado TRUE quando o operando no 0 . O resultado FALSE quando o operando igual a 0 . O resultado TRUE no tipo de varivel STRING quando o operando TRUE , caso contrrio o resultado FALSE . Exemplo em ST: b := BYTE_TO_BOOL(2#11010101); (* Resultado TRUE *) b := INT_TO_BOOL(0); (* Resultado FALSE *) b := TIME_TO_BOOL(T#5ms); (* Resultado TRUE *) b := STRING_TO_BOOL('TRUE'); (* Resultado TRUE *)

STRING_TO converso
Converte uma varivel STRING para qualquer outro tipo . O operando da varivel do tipo STRING deve conter um valor que seja valido no tipo de varivel que se deseja converter , caso contrrio o resultado 0 . Exemplo em ST: b :=STRING_TO_BOOL('TRUE'); (* Resultado TRUE *) w :=STRING_TO_WORD('abc34'); (* Resultado 0 *) t :=STRING_TO_TIME('T#127ms'); (* Resultado T#127ms *)

Converso TO STRING
Converte qualquer tipo de varivel para o tipo STRING . Exemplo em ST: str :=TIME_TO_STRING(T#12ms); (* Resultado 'T#12ms' *) str :=DATE_TO_STRING(D#2002-08-18); (* Resultado 'D#2002-08-18' *) str:=TOD_TO_STRING(TOD#14:01:05.123); (* Resultado 'TOD#14:01:05.123' *) str:=BOOL_TO_STRING(TRUE); (* Resultado 'TRUE' *) str:=DT_TO_STRING(DT#1998-02-13-14:20); (* Resultado 'DT#1998-02-13-14:20' *) k := LREAL_TO_STRING(1.4); (* Resultado is '1.4' *)

TIME_TO converso
Converte uma varivel do tipo TIME para qualquer outro tipo . Os dados sero armazenados internamente numa DWORD em milissegundos . S depois que este valor ser convertido . Quando ocorre uma converso de um valor de um tipo maior para um menor corremos o risco de perda de informao . Para o tipo de STRING o resultado uma constante que corresponde a um tempo. Exemplo em ST: dw:=TIME_TO_DWORD(T#5m); (* Resultado 300000 *) str :=TIME_TO_STRING(T#12ms); (* Resultado 'T#12ms' *)

BRESIMAR

<j.andril@bresimar.pt>

Cap. II 15 de 20

TWINCAT PLC - Lista de Instrues

BECKHOFF New Automation Technology

DATE_TO converso
Converte uma varivel do tipo DATE para qualquer outro tipo . Os dados sero armazenados internamente numa DWORD em segundos a contar a partir do dia 1 de Janeiro de 1970. S depois que este valor ser convertido . Quando ocorre uma converso de um valor de um tipo maior para um menor corremos o risco de perda de informao . Para o tipo de STRING o resultado uma constante que corresponde a uma data. Exemplo em ST: b :=DATE_TO_BOOL(D#1970-01-01); (* Resultado FALSE *) i :=DATE_TO_INT(D#1970-01-15); (* Resultado 29952 *) str :=DATE_TO_STRING(D#2002-08-18); (* Resultado 'D#2002-08-18' *) vdt:=DATE_TO_DT(D#2002-08-18); (* Resultado DT#2002-08-18-00:00 *) udw:=DATE_TO_DWORD(D#2002-08-18); (* Resultado 16#3D5EE380 *)

TOD_TO converso
Converte uma varivel do tipo TIME_OF_DATE para qualquer outro tipo . Os dados sero armazenados internamente numa DWORD em milissegundos a contar a partir das 12:00 AM. S depois que este valor ser convertido . Quando ocorre uma converso de um valor de um tipo maior para um menor corremos o risco de perda de informao . Para o tipo de STRING o resultado uma constante que corresponde a uma constante de tempo. Exemplo em ST: si:=TOD_TO_SINT(TOD#00:00:00.012); (* Resultado 12 *) str:=TOD_TO_STRING(TOD#14:01:05.123); (* Resultado 'TOD#14:01:05.123' *) tm:= TOD_TO_TIME(TOD#14:01:05.123); (* Resultado T#841m5s123ms *) udi:= TOD_TO_UDINT(TOD#14:01:05.123); (* Resultado 16#03020963 *)

DT_TO converso
Converte uma varivel do tipo DATE_AND_TIME para qualquer outro tipo . Os dados sero armazenados internamente numa DWORD em segundos a contar a partir do dia 1 de Janeiro de 1970. S depois que este valor ser convertido . Quando ocorre uma converso de um valor de um tipo maior para um menor corremos o risco de perda de informao . Para o tipo de STRING o resultado uma constante que corresponde a uma data e tempo. Exemplo em ST: byt :=DT_TO_BYTE(DT#1970-01-15-05:05:05); (* Resultado 129 *) str:=DT_TO_STRING(DT#1998-02-13-14:20); (* Resultado 'DT#1998-02-13-14:20' *) vtod:=DT_TO_TOD(DT#1998-02-13-14:20); (* Resultado TOD#14:20 *) vdate:=DT_TO_DATE(DT#1998-02-13-14:20); (* Resultado D#1998-02-13 *) vdw:=DT_TO_DWORD(DT#1998-02-13-14:20); (* Resultado 16#34E45690 *)

REAL_TO / LREAL_TO converso


Converte uma varivel do tipo REAL ou LREAL para qualquer outro tipo . Os dados sero arredondados para cima ou para baixo conforme o valor decimal e convertidos em um novo tipo de varivel excepto para as variveis de tipo STRING, BOOL, REAL e LREAL. Quando ocorre uma converso de um valor de um tipo maior para um menor corremos o risco de perda de informao . Para o tipo de STRING o numero total de dgitos limitado a 16 . Se o numero (L)REAL tem mais dgitos o 16 digito ser arredondado . Se o comprimento do STRING definido curto ele ser truncado comeando no fim do lado direito . Exemplo em ST: i := REAL_TO_INT(1.5); (* Resultado 2 *) j := REAL_TO_INT(1.4); (* Resultado 1 *) k := LREAL_TO_STRING(1.4); (* Resultado '1.4' *)

BRESIMAR

<j.andril@bresimar.pt>

Cap. II 16 de 20

TWINCAT PLC - Lista de Instrues

BECKHOFF New Automation Technology

BYTE TO converso WORD TO converso DWORD TO converso

USINT TO converso UINT TO converso UDINT TO converso

SINT TO converso INT TO converso DINT TO converso

Quando ocorre uma converso de um valor de um tipo maior para um menor corremos o risco de perda de informao . Se o numero convertido excede o limite mximo, o primeiro byte ser ignorado . Exemplo em ST: si := INT_TO_SINT (4223); (* Resultado 127 . Como o numero inteiro 4223 em Hex 16#107F em SINT ( 1 byte) s ser representado o byte menos significativo 16#7F que representa 127 *) Exemplo em IL: LD 5 INT_TO_REAL MUL 3.5 ST Var1 (* Resultado REAL , 17.5*)

TRUNC
Converte uma varivel de tipo REAL para INT . Quando ocorre uma converso de um valor de um tipo maior para um menor corremos o risco de perda de informao . Se o numero convertido excede o limite mximo, o primeiro byte ser ignorado . Exemplo em ST: i:=TRUNC(1.9); (* Result is 1 *) i:=TRUNC(-1.4); (* Result is -1 *) Exemplo em IL: LD 5.5 TRUNC MUL 3.5 ST Var1 (* Resultado REAL , 17.5*) Notas :

BRESIMAR

<j.andril@bresimar.pt>

Cap. II 17 de 20

TWINCAT PLC - Lista de Instrues Notas :

BECKHOFF New Automation Technology

BRESIMAR

<j.andril@bresimar.pt>

Cap. II 18 de 20

TWINCAT PLC - Lista de Instrues

BECKHOFF New Automation Technology

8 - INSTRUES VRIAS INDEXOF


Calcula o ndex (posio de memria) interno do POU (Program Organization Unit) . Exemplo em ST: Var1:= TRUNC (POU2); Exemplo em IL: Var1:DINT; LD POU2 (* Nome da programa , funo ou bloco funcional *) INDEXOF ST Var1

SIZEOF
Calcula o numero de bytes requerido para um dado tipo de dados . Exemplo em ST: arr1:ARRAY [0..5] OF INT; Var1:INT; Var1:= TRUNC (arr1); (* O resultado 12 *) Exemplo em IL: arr1:ARRAY [0..6] OF INT; Var1:INT; LD arr1 SIZEOF ST Var1 (* O resultado 14 *)

ADR
Calcula o endereo absoluto de uma varivel em DWORLD . Esta funo utilizada para ser tratada pelos PONTEIROS . Exemplo em IL: LD var1 ADR ST var2

^
Esta identificao referncia um PONTEIRO . Exemplo em ST: pt:POINTER TO INT var_int1:INT; var_int2:INT; pt:=ADR(var_int1); var_int2:=pt^;

BITADR
Retorna com o endereo do bit d a varivel indicada . Exemplo em IL: var1: AT %IX1.0 : BOOL out : BYTE LD var1 BITADR ST out (*Retorna com 08) Exemplo em ST bOFF AT %QX10.1 : BOOL iBitAdr : BYTE iBit := BITADR (bOFF) ; (*Retorna com 81)

BRESIMAR

<j.andril@bresimar.pt>

Cap. II 19 de 20

TWINCAT PLC - Lista de Instrues

BECKHOFF New Automation Technology

CAL
Chama em IL uma funo bloco . As variveis que servem como entradas esto colocadas entre parnteses direita depois do nome da funo bloco . Exemplo em IL: CAL INST (par1: 0 , par2:= TRUE) Notas :

BRESIMAR

<j.andril@bresimar.pt>

Cap. II 20 de 20

TWINCAT PLC Funes bloco standard

BECKHOFF New Automation Technology

III FUNES BLOCO STANDARD 1 FUNES BLOCO STANDARD BIESTAVEL 2 FUNES BLOCO STANDARD TRIGGER 3 FUNES BLOCO STANDARD TEMPORIZADORES 4 FUNES BLOCO STANDARD CONTADORES

BRESIMAR

<j.andril@bresimar.pt>

Cap. III 1 de 8

TWINCAT PLC Funes bloco standard

BECKHOFF New Automation Technology

BRESIMAR

<j.andril@bresimar.pt>

Cap. III 2 de 8

TWINCAT PLC Funes bloco standard

BECKHOFF New Automation Technology

1 FUNES BLOCO STANDARD - BIESTAVEL

FUNCTION_BLOCK RS Biestavel com RESET prioritrio Q1 = RS (SET, RESET1) . Equao lgica implementada internamente no FB , Q1 = NOT RESET1 AND (Q1 OR SET) . Nome das livrarias : Standard.lb (*Para PC*) e Standard.lb (*Para PC*) VAR_INPUT VAR_INPUT SET : BOOL; RESET1 : BOOL; END_VAR VAR_OUTPUT VAR_OUTPUT Q1 : BOOL; END_VAR

FUNCTION_BLOCK SR Biestavel com SET prioritrio Q1 = SR (SET1, RESET) . Equao lgica implementada internamente no FB , Q1 := (NOT RESET AND Q1) OR SET1 . VAR_INPUT VAR_INPUT SET1 : BOOL; RESET : BOOL; END_VAR VAR_OUTPUT VAR_OUTPUT Q1 : BOOL; END_VAR

FUNCTION_BLOCK SEMA Funo semforo .Equao lgica implementada internamente no FB , a seguinte : BUSY := X; IF CLAIM THEN X:=TRUE; ELSIF RELEASE THEN BUSY := FALSE; X:= FALSE; END_IF VAR_INPUT VAR_INPUT CLAIM : BOOL; REALEASE : BOOL; END_VAR VAR_OUTPUT VAR_OUTPUT Q1 : BOOL; END_VAR

BRESIMAR

<j.andril@bresimar.pt>

Cap. III 3 de 8

TWINCAT PLC Funes bloco standard

BECKHOFF New Automation Technology

2 FUNES BLOCO STANDARD TRIGGER

FUNCTION_BLOCK F_TRIG Accionamento pelo flanco descendente . A sada Q e a varivel interna M manter-se- FALSE enquanto a entrada CLK TRUE . Logo que ocorra a transio de TRUE para FALSE em CLK a sada Q ficar TRUE e M ser posto a TRUE (set) . Isto significa que cada vez que esta funo bloco seja chamada a sada Q mantm-se FALSE at que ocorra uma transio do CLK de TRUE para FALSE . Nome das livrarias : Standard.lb (*Para PC*) e Standard.lb6 (*Para BC*) VAR_INPUT VAR_INPUT CLK : BOOL; (* Sinal a detector*) END_VAR VAR_OUTPUT VAR_OUTPUT Q : BOOL; END_VAR VAR M : BOOL; END_VAR

(* Transio detectada *)

FUNCTION_BLOCK R_TRIG Accionamento pelo flanco ascendente . A sada Q e a varivel interna M manter-se- FALSE enquanto a entrada CLK FALSE . Logo que ocorra a transio de FALSE para TRUE em CLK a sada Q ficar TRUE e M ser posto a TRUE (set) . Isto significa que cada vez que esta funo bloco seja chamada a sada Q mantm-se FALSE at que ocorra uma transio do CLK de FALSE para TRUE . VAR_INPUT VAR_INPUT CLK : BOOL; (* Sinal a detector*) END_VAR VAR_OUTPUT VAR_OUTPUT Q : BOOL; END_VAR VAR M : BOOL; END_VAR

(* Transio detectada *)

BRESIMAR

<j.andril@bresimar.pt>

Cap. III 4 de 8

TWINCAT PLC Funes bloco standard

BECKHOFF New Automation Technology

3 FUNES BLOCO STANDARD TEMPORIZADORES

FUNCTION_BLOCK TOF Temporizador ao atraso . VAR_INPUT VAR_INPUT IN : BOOL;(* Iniciar temporizao quando FALSE*) PT : TIME; (* Temporizao *) END_VAR VAR_OUTPUT VAR_OUTPUT Q : BOOL; (*FALSE passado PT seg depois de PT ter passado T RUE=>FALSE *) PT: TIME; (* Tempo j decorrido *) END_VAR

FUNCTION_BLOCK TON Temporizador ao trabalho . VAR_INPUT VAR_INPUT IN : BOOL;(* Iniciar temporizao quando TRUE *) PT : TIME; (* Temporizao *) END_VAR VAR_OUTPUT VAR_OUTPUT Q : BOOL; (*TRUE passado PT seg depois de PT ter passado FALSE=>TRUE *) PT: TIME; (* Tempo j decorrido *) END_VAR

BRESIMAR

<j.andril@bresimar.pt>

Cap. III 5 de 8

TWINCAT PLC Funes bloco standard

BECKHOFF New Automation Technology

FUNCTION_BLOCK TP Temporizador ao trabalho por impulso . VAR_INPUT VAR_INPUT IN : BOOL;(* Iniciar temporizao na transio de TRUE para FALSE*) PT : TIME; (* Temporizao *) END_VAR VAR_OUTPUT VAR_OUTPUT Q : BOOL; (*TRUE durante PT tempo, impulso *) PT: TIME; (* Tempo j decorrido *) END_VAR

BRESIMAR

<j.andril@bresimar.pt>

Cap. III 6 de 8

TWINCAT PLC Funes bloco standard

BECKHOFF New Automation Technology

4 FUNES BLOCO STANDARD CONTADORES

FUNCTION_BLOCK CTD Contador decrescente . Quando LOAD TRUE a varivel CV ser inicializada com o valor que se encontra na varivel PV . Se CD transitar de FALSE para TRUE , CV decrementa 1. Quando CV for menor ou igual a zero Q ir a TRUE . VAR_INPUT VAR_INPUT IN : BOOL;(* Contar com a transio positiva (FALSE=>TRUE) *) LOAD : BOOL; (* Ordem de carregar valor inicial PV *) PV : WORD; (* Valor inicial *) END_VAR VAR_OUTPUT VAR_OUTPUT Q : BOOL; (* Finalizao de contagem *) CV: WORD; (* Contagem corrente *) END_VAR

FUNCTION_BLOCK CTU Contador crescente . A varivel CV ser inicializada com o RESET a TRUE . Quando ocorre uma transio de FALSE para TRUE o contador incrementa 1 . Quando CV for maior ou igual a PV Q ir a TRUE . VAR_INPUT VAR_INPUT CU : BOOL;(* Contar com a transio positiva (FALSE=>TRUE) *) RESET : BOOL; (* Ordem de por a zero o contador *) PV : WORD; (* Valor final *) END_VAR VAR_OUTPUT VAR_OUTPUT Q : BOOL; (* Finalizao de contagem *) CV: WORD; (* Contagem corrente *)

BRESIMAR

<j.andril@bresimar.pt>

Cap. III 7 de 8

TWINCAT PLC Funes bloco standard

BECKHOFF New Automation Technology

FUNCTION_BLOCK CTUD Contador crescente e decrescente . Combinao das mesmas caractersticas dos blocos funcionais de contagem anteriores .( CTU e CTD ) . VAR_INPUT VAR_INPUT CU : BOOL;(* Contagem crescente *) CU : BOOL;(* Contagem crescente *) RESET : BOOL; (* Ordem de por a zero o contador *) LOAD : BOOL; (* Ordem de carregar valor inicial PV *) PV : WORD; (* Valor final *) END_VAR VAR_OUTPUT VAR_OUTPUT QU : BOOL; (* Finalizao de contagem *) QD : BOOL; (* Finalizao de contagem a zero *) CV: WORD; (* Contagem corrente *) Notas :

BRESIMAR

<j.andril@bresimar.pt>

Cap. III 8 de 8

TWINCAT PLC Funes standard

BECKHOFF New Automation Technology

IV FUNES STANDARD 1 FUNES STANDARD STRING

BRESIMAR

<j.andril@bresimar.pt>

Cap. IV 1 de 7

TWINCAT PLC Funes standard

BECKHOFF New Automation Technology

BRESIMAR

<j.andril@bresimar.pt>

Cap. IV 2 de 7

TWINCAT PLC Funes standard

BECKHOFF New Automation Technology

1 FUNES STANDARD STRING

CONCAT Combina 2 strings . Nome das livrarias : Standard.lb (*Para PC*) e Standard.lb (*Para PC*) FUNCTION CONCAT : STRING(255) VAR_INPUT VAR_INPUT STR1 : STRING(255); STR2 : STRING(255); END_VAR Exemplo em ST: Var1: CONCAT (SUSI , WILLI) ; Exemplo em IL: LD SUSI CONCAT WILLI ST Var1 (* Resultado SUSIWILLI *)

DELETE Apaga uma parte de um STRING a partir de uma dada posio . DELETE (STR, L, P) significa o seguinte : Apaga L caracteres do string STR a partir do carcter n P . FUNCTION DELETE : STRING(255) VAR_INPUT VAR_INPUT STR : STRING(255); LEN : INT; POS : INT; END_VAR Exemplo em ST: Var1: = DELETE (SUXYSI , 2 , 2 ) ; Exemplo em IL: LD SUXYSI DELETE 2,2 ST Var1 (* Resultado SYSI *)

BRESIMAR

<j.andril@bresimar.pt>

Cap. IV 3 de 7

TWINCAT PLC Funes standard

BECKHOFF New Automation Technology

FIND Funo de procura de uma parte (frase) dentro de um STRING . FIND (STR1, STR2) significa o seguinte : Encontra a posio , desde o 1 carcter , da frase STR1 dentro da STR2 . FUNCTION FIND : INT VAR_INPUT VAR_INPUT STR1 : STRING(255); STR2 : STRING(255); END_VAR Exemplo em ST: Var1: = FIND (SUXYSI , XY ) ; Exemplo em IL: LD SUXYSI FIND XY ST Var1 (* Resultado 3 *)

INSERT Funo de insero de uma parte (frase) dentro de um STRING . INSERT (STR1, STR2, POS) significa o seguinte : Insere STR2 depois da posio POS na frase STR1 . FUNCTION INSERT : STRING(255) VAR_INPUT VAR_INPUT STR1 : STRING(255); STR2 : STRING(255); POS : INT; END_VAR Exemplo em ST: Var1: = INSERT (SUSI , XY , 2) ; Exemplo em IL: LD SUSI INSERT XY , 2 ST Var1 (* Resultado SUXYSI *)

BRESIMAR

<j.andril@bresimar.pt>

Cap. IV 4 de 7

TWINCAT PLC Funes standard

BECKHOFF New Automation Technology

LEFT Selecciona um n caracteres de um STRING a comear pela esquerda . LEFT (STR, SIZE) significa o seguinte : Selecciona na frase STR , SIZE caracteres a comear pela esquerda . FUNCTION LEFT : STRING(255) VAR_INPUT VAR_INPUT STR : STRING(255); SIZE : INT; END_VAR Exemplo em ST: Var1: = LEFT (BRESIMAR , 2) ; Exemplo em IL: LD BRESIMAR LEFT 2 ST Var1 (* Resultado BR *)

LEN Calcula o tamanho de um STRING (n de caracteres) . FUNCTION LEN : INT VAR_INPUT VAR_INPUT STR : STRING(255); SIZE : INT; END_VAR Exemplo em ST: Var1: = LEN (BRESIMAR ) ; Exemplo em IL: LD BRESIMAR LEN ST Var1 (* Resultado 8 *)

BRESIMAR

<j.andril@bresimar.pt>

Cap. IV 5 de 7

TWINCAT PLC Funes standard

BECKHOFF New Automation Technology

MID Selecciona um n caracteres de um STRING a partir de uma dada posio . MID (STR, LEN, POS) significa o seguinte : Selecciona na frase STR , LEN caracteres a comear da posio POS (a contar da esquerda). FUNCTION MID : STRING(255) VAR_INPUT VAR_INPUT STR : STRING(255); LEN : INT; POS : INT; END_VAR Exemplo em ST: Var1: = MID (BRESIMAR , 2 , 3) ; Exemplo em IL: LD BRESIMAR MID 2 , 3 ST Var1 (* Resultado ES *)

REPLACE Cola um STRING a partir de uma dada posio de um dado STRING e eliminando um n de caracteres definidos . REPLACE (STR1, STR2, L, P) significa o seguinte : Cola a frase STR2 a partir da posio P da frase STR1 e eliminando em STR1 L caracteres . FUNCTION REPLACE : STRING(255) VAR_INPUT VAR_INPUT STR1 : STRING(255); STR1 : STRING(255); L : INT; P : INT; END_VAR Exemplo em ST: Var1: = REPLACE (BRESIMAR , ASA , 2 , 3) ; Exemplo em IL: LD BRESIMAR REPLACE ASA , 2, 3 ST Var1 (* Resultado BASAIMAR *) BRESIMAR
<j.andril@bresimar.pt>

Cap. IV 6 de 7

TWINCAT PLC Funes standard

BECKHOFF New Automation Technology

RIGTH Selecciona um n caracteres de um STRING a comear pela direita . RIGTH (STR, SIZE) significa o seguinte : Selecciona na frase STR , SIZE caracteres a comear pela direita . FUNCTION RIGTH : STRING(255) VAR_INPUT VAR_INPUT STR : STRING(255); SIZE : INT; END_VAR Exemplo em ST: Var1: = RIGTH (BRESIMAR , 3) ; Exemplo em IL: LD BRESIMAR RIGTH 3 ST Var1 (* Resultado MAR *)

BRESIMAR

<j.andril@bresimar.pt>

Cap. IV 7 de 7

TWINCAT PLC Exemplos prticos

BECKHOFF New Automation Technology

V EXEMPLOS PRTICOS 1 ARRANQUE DIRECTO DE MOTOR TRIFSICO 2 INVERSO DE ROTAO DE MOTOR TRIFSICO 3 ARRANQUE ESTRELA-TRIANGULO DE MOTOR TRIFSICO

Neste capitulo vo ser apresentados exemplos de automatismos e respectivas solues utilizando instrues pertencentes a PLCs Beckhoff . As aplicaes abordam circuitos elctricos simples e comuns nos automatismos electromecnicos industriais . O estudo destes exemplos tem por finalidade aprofundar os conhecimentos adquiridos nos captulos anteriores e , ao mesmo tempo , possibilitar a prtica das instrues base do TwinCAT-PLC . Compreendidos os exemplos propostos , adquirem-se os conhecimentos necessrios para se abordar situaes mais complexas , ou seja , o caminho fica aberto para que se torne possvel enfrentar a concepo , realizao e manuteno de automatismos usando o TwinCAT . Chamo ateno , que os exemplos de programao apresentados foram escritos a titulo didctico . Por isso , podem no estar previstas todas as situaes de funcionamento real . Deste modo , o seu uso em programas de aplicao industrial pode necessitar de adaptaes que assegurem todas as possibilidades de utilizao e o respeito pelas normas de segurana em vigor no sector de actividade onde vo ser utilizadas .

BRESIMAR

<j.andril@bresimar.pt>

Cap. V 1 de 35

TWINCAT PLC Exemplos prticos

BECKHOFF New Automation Technology

BRESIMAR

<j.andril@bresimar.pt>

Cap. V 2 de 35

TWINCAT PLC Exemplos prticos

BECKHOFF New Automation Technology

1 ARRANQUE DIRECTO DE MOTOR TRIFSICO


Com este circuito pretende-se comandar um motor trifsico atravs de duas botoneiras com contactos normalmente abertos (N.A.) S1 e S2 e executado por um algoritmo ( programa de PLC - Beckhoff) . A colocao em marcha do motor feita quando se pressiona S2 e a paragem quando se pressiona S1. A paragem tambm ocorre se a proteco trmica do motor contra sobrecargas for actuada. Se tal acontecer , actuado o contacto normalmente fechado (N.F.) F2 (circuito abre ) . Equao lgica do circuito : KM1 = /F2 . /S1 . ( S2 + KM1)

BRESIMAR

<j.andril@bresimar.pt>

Cap. V 3 de 35

TWINCAT PLC Exemplos prticos 1.1 - Edio a texto 1.1.1 - ST - Structured Text

BECKHOFF New Automation Technology

BRESIMAR

<j.andril@bresimar.pt>

Cap. V 4 de 35

TWINCAT PLC Exemplos prticos 1.1.2 - IL - Instruction List

BECKHOFF New Automation Technology

BRESIMAR

<j.andril@bresimar.pt>

Cap. V 5 de 35

TWINCAT PLC Exemplos prticos

BECKHOFF New Automation Technology

1.2 - Edio grfica 1.2.1 - LD - Ladder Diagram

BRESIMAR

<j.andril@bresimar.pt>

Cap. V 6 de 35

TWINCAT PLC Exemplos prticos

BECKHOFF New Automation Technology

1.2.2 - FBD - Function Block Diagram

BRESIMAR

<j.andril@bresimar.pt>

Cap. V 7 de 35

TWINCAT PLC Exemplos prticos

BECKHOFF New Automation Technology

1.2.3 - CFC - Continuos Function Chart

BRESIMAR

<j.andril@bresimar.pt>

Cap. V 8 de 35

TWINCAT PLC Exemplos prticos 1.3 - Edio por GRAFCET

BECKHOFF New Automation Technology

Para quem utilizar o mtodo de diagrama funcional GRAFCET , teremos para o circuito anterior a seguinte estrutura : GRAFCET NVEL 1 (Especificaes funcionais)

GRAFCET NVEL 2 (Especificaes tecnolgicas) Na etapa inicial (etapa 0) o automatismo no executa qualquer aco , estando o sistema em repouso (motor parado) . Para que o motor trabalhe necessrio que o GRAFCET evolua para a etapa 1. A etapa 1 activada se a transio for vlida , ou seja , se a etapa 0 estiver activa e a condio lgica de transio ( F2 . /S1 . S2 ) for verdadeira ( o boto de presso S2 foi pressionado , no est pressionado o boto S1 e nem o rel trmico F2 foi actuado ). Nesta situao o GRAFCET evolui para a etapa 1 e a aco associada a esta etapa realizada (bobina do contactor alimentada e o motor M1 accionado). Estando o motor em funcionamento (etapa 1) se desejarmos desligar o motor teremos de passar , no GRAFCET , para a etapa 0 . Isso acontece quando a condio lgica ( /F2 + S1 ) for verdadeira ( o boto de presso S1 foi pressionado ou o rel trmico F2 disparou ) .

BRESIMAR

<j.andril@bresimar.pt>

Cap. V 9 de 35

TWINCAT PLC Exemplos prticos

BECKHOFF New Automation Technology

1.3.1 - SFC - Sequencial Function Chart

BRESIMAR

<j.andril@bresimar.pt>

Cap. V 10 de 35

TWINCAT PLC Exemplos prticos

BECKHOFF New Automation Technology

1.3.2 - GRAFCET com instrues Set / Reset (Biestavel)

BRESIMAR

<j.andril@bresimar.pt>

Cap. V 11 de 35

TWINCAT PLC Exemplos prticos

BECKHOFF New Automation Technology

2 INVERSO DE ROTAO DE MOTOR TRIFSICO


Com este circuito pretende-se comandar o sentido de rotao de um motor trifsico atravs de duas botoneiras com contactos normalmente abertos (N.A.) S7 (marcha para a direita) e S8 (para a esquerda) . A paragem efectua-se quando se pressiona o boto S6 (N.A)ou se a proteco trmica do motor contra sobrecargas for actuada . Se tal acontecer , actuado o contacto normalmente fechado (N.F.) F2 ( contacto abre) . Equao lgica do circuito : KM5 = /F2 . /S6 . /KM6 . ( S7 + KM5) KM6 = /F2 . /S6 . /KM5 . ( S8 + KM6)

BRESIMAR

<j.andril@bresimar.pt>

Cap. V 12 de 35

TWINCAT PLC Exemplos prticos 2.1 - Edio a texto 2.1.1 - ST - Structured Text

BECKHOFF New Automation Technology

BRESIMAR

<j.andril@bresimar.pt>

Cap. V 13 de 35

TWINCAT PLC Exemplos prticos 2.1.2 - IL - Instruction List

BECKHOFF New Automation Technology

BRESIMAR

<j.andril@bresimar.pt>

Cap. V 14 de 35

TWINCAT PLC Exemplos prticos 2.2 - Edio grfica 2.2.1 - LD - Ladder Diagram

BECKHOFF New Automation Technology

BRESIMAR

<j.andril@bresimar.pt>

Cap. V 15 de 35

TWINCAT PLC Exemplos prticos

BECKHOFF New Automation Technology

2.2.2 - FBD - Function Block Diagram

BRESIMAR

<j.andril@bresimar.pt>

Cap. V 16 de 35

TWINCAT PLC Exemplos prticos

BECKHOFF New Automation Technology

2.2.3 - CFC - Continuos Function Chart

BRESIMAR

<j.andril@bresimar.pt>

Cap. V 17 de 35

TWINCAT PLC Exemplos prticos 2.3 - Edio por GRAFCET

BECKHOFF New Automation Technology

Para quem utilizar o mtodo de diagrama funcional de GRAFCET , teremos para o circuito anterior a seguinte estrutura : GRAFCET NVEL 1 (Especificaes funcionais)

GRAFCET NVEL 2 (Especificaes tecnolgicas) Na etapa inicial (etapa 0) o automatismo no executa qualquer aco , o motor est parado . Para que o motor trabalhe necessrio que o GRAFCET evolua para a etapa 1 ou 2. A etapa 1 activada se a transio for vlida , ou seja , se a etapa 0 estiver activa e a condio lgica de transio ( F2 . /S6 . /S8 . S7 ) for verdadeira ( o boto de presso S7 foi pressionado e no est pressionado o boto S6 nem o S8 e nem o rel trmico F2 foi actuado ). Nesta situao o GRAFCET evolui para a etapa 1 e o motor ir rodar para a direita . Para o motor rodar para a esquerda , a etapa 2 ter de ser activada , em alternativa etapa 1 , sendo necessrio que o motor esteja parado ( etapa 0) e a condio de transio ( F2 . /S6 . /S7 . S8 ) seja verdadeira . Estando o motor em funcionamento (etapa 1 ou 2) se desejarmos desligar o motor teremos de passar , no GRAFCET , para a etapa 0 . Isso acontece quando a condio lgica ( /F2 + S6 ) for verdadeira ( o boto de presso S6 foi pressionado ou o rel trmico F2 disparou ) .

BRESIMAR

<j.andril@bresimar.pt>

Cap. V 18 de 35

TWINCAT PLC Exemplos prticos

BECKHOFF New Automation Technology

2.3.1 - SFC - Sequencial Function Chart

BRESIMAR

<j.andril@bresimar.pt>

Cap. V 19 de 35

TWINCAT PLC Exemplos prticos

BECKHOFF New Automation Technology

2.3.2 - GRAFCET com instrues Set / Reset (Biestavel)

BRESIMAR

<j.andril@bresimar.pt>

Cap. V 20 de 35

TWINCAT PLC Exemplos prticos

BECKHOFF New Automation Technology

BRESIMAR

<j.andril@bresimar.pt>

Cap. V 21 de 35

TWINCAT PLC Exemplos prticos

BECKHOFF New Automation Technology

3 ARRANQUE ESTRELA-TRIANGULO DE MOTOR TRIFSICO


Com este circuito pretende-se efectuar o arranque estrela - triangulo de um motor assncrono trifsico com rotor em curto-circuito. O arranque ocorre quando se pressiona o boto de presso S10. A paragem efectua-se quando se pressiona o boto S9 (N.A) ou se a proteco trmica do motor F2 (N.F.)contra sobrecargas for actuada . Equao lgica do circuito : KM1 = /F2 . /S9 . ( S10 + KM2 . KM1) . /KM2(t1) . /KM3 KM2 = /F2 . /S9 . ( S10 . KM1+ KM2) KM3 = /F2 . /S9 . ( S10 . KM1+ KM2) . /KM1

BRESIMAR

<j.andril@bresimar.pt>

Cap. V 22 de 35

TWINCAT PLC Exemplos prticos 3.1 - Edio a texto 3.1.1 - ST - Structured Text

BECKHOFF New Automation Technology

BRESIMAR

<j.andril@bresimar.pt>

Cap. V 23 de 35

TWINCAT PLC Exemplos prticos 3.1.2 - IL - Instruction List

BECKHOFF New Automation Technology

BRESIMAR

<j.andril@bresimar.pt>

Cap. V 24 de 35

TWINCAT PLC Exemplos prticos

BECKHOFF New Automation Technology

BRESIMAR

<j.andril@bresimar.pt>

Cap. V 25 de 35

TWINCAT PLC Exemplos prticos 3.2 - Edio grfica 3.2.1 - LD - Ladder Diagram

BECKHOFF New Automation Technology

BRESIMAR

<j.andril@bresimar.pt>

Cap. V 26 de 35

TWINCAT PLC Exemplos prticos

BECKHOFF New Automation Technology

BRESIMAR

<j.andril@bresimar.pt>

Cap. V 27 de 35

TWINCAT PLC Exemplos prticos

BECKHOFF New Automation Technology

3.2.2 - FBD - Function Block Diagram

BRESIMAR

<j.andril@bresimar.pt>

Cap. V 28 de 35

TWINCAT PLC Exemplos prticos

BECKHOFF New Automation Technology

BRESIMAR

<j.andril@bresimar.pt>

Cap. V 29 de 35

TWINCAT PLC Exemplos prticos

BECKHOFF New Automation Technology

3.2.3 - CFC - Continuos Function Chart

BRESIMAR

<j.andril@bresimar.pt>

Cap. V 30 de 35

TWINCAT PLC Exemplos prticos 3.3 - Edio por GRAFCET

BECKHOFF New Automation Technology

Para quem utilizar o mtodo de diagrama funcional de GRAFCET , teremos a seguinte estrutura : GRAFCET NVEL 1 (Especificaes funcionais)

GRAFCET NVEL 2 (Especificaes tecnolgicas) Na etapa inicial (etapa 0) o automatismo no executa qualquer aco , o motor esta parado . A etapa 1 activada se a transio for vlida , ou seja , se a etapa 0 estiver activa e a condio lgica de transio ( F2 . /S9 . S10 ) for verdadeira ( o boto de presso S10 foi pressionado e no est pressionado o boto S9 e nem o rel trmico F2 foi actuado ). Nesta situao o GRAFCET evolui para a etapa 1 e o motor ir arrancar em modo estrela durante o tempo t1 (seg.) . Nesta etapa est accionado o contactor KM1 e KM2 .Passado esse tempo t1 o sistema passar para a etapa 2 , que corresponde ao modo triangulo . Nesta etapa o contactor KM1 est desligado , o contactor KM2 mantm-se ligado e ligado o contactor KM3 . Estando o motor em funcionamento (etapa 1 ou 2) se desejarmos desligar o motor teremos de passar , no GRAFCET , para a etapa 0 . Isso acontece quando a condio lgica ( /F2 + S9) for verdadeira ( o boto de presso S9 foi pressionado ou o rel trmico F2 disparou ) .

BRESIMAR

<j.andril@bresimar.pt>

Cap. V 31 de 35

TWINCAT PLC Exemplos prticos

BECKHOFF New Automation Technology

3.3.1 - SFC - Sequencial Function Chart

BRESIMAR

<j.andril@bresimar.pt>

Cap. V 32 de 35

TWINCAT PLC Exemplos prticos

BECKHOFF New Automation Technology

BRESIMAR

<j.andril@bresimar.pt>

Cap. V 33 de 35

TWINCAT PLC Exemplos prticos

BECKHOFF New Automation Technology

3.3.2 - GRAFCET com instrues Set / Reset (Biestavel)

BRESIMAR

<j.andril@bresimar.pt>

Cap. V 34 de 35

TWINCAT PLC Exemplos prticos

BECKHOFF New Automation Technology

BRESIMAR

<j.andril@bresimar.pt>

Cap. V 35 de 35

TWINCAT PLC Resumo de Instrues

BECKHOFF New Automation Technology

Anexo A RESUMO DE INSTRUES E FUNES STANDARD 1 RESUMO DE INSTRUES DO TwinCAT PLC 2 RESUMO DAS FUNES BLOCO STANDARD 3 RESUMO DAS FUNES STANDARD

BRESIMAR

<j.andril@bresimar.pt>

Anexo A 1 de 9

TWINCAT PLC Resumo de Instrues

BECKHOFF New Automation Technology

BRESIMAR

<j.andril@bresimar.pt>

Anexo A 2 de 9

TWINCAT PLC Resumo de Instrues

BECKHOFF New Automation Technology

1 RESUMO DE INSTRUES DO TwinCAT PLC


NUMERICAS ABS - Valor absoluto IL LD in ABS ST out LD in ACOS ST out LD in ASIN ST out LD in ATAN ST out LD in COS ST out LD in EXP ST out LD in1 EXPT in2 ST out LD in LN ST out LD in LOG ST out LD in SIN ST out LD in SQRT ST out LD in TAN ST out IL LD in1 ADD in2 ST out LD in1 MUL in2,in3 ST out LD in1 SUB in2 ST out ST out:=ABS(in); LD

ACOS - Arco de coseno ASIN - Arco de seno

out:=COS(in);

out:=ASIN(in);

ATAN - Arco de tangente COS - Co-seno

out:=ATAN(in);

out:=COS(in);

EXP - Exponencial

out:=EXP(in);

EXPT - Expo. de in1 levantado a in2 LN - Logaritmo natural

out:=EXPT(in1, in2); out:=LN(in);

LOG - Logaritmo de base 10 SIN - Seno

out:=LOG(in);

out:=SIN(in);

SQRT - Raiz quadrada

out:=SQRT(in);

TAN - Tangente

out:=TAN(in);

ARITMETICAS ADD - Soma

ST out:= in1+in2;

LD

MUL - Multiplicao

out:= in1*in2*in3;

SUB - Subtraco

out:= in1-in2;

BRESIMAR

<j.andril@bresimar.pt>

Anexo A 3 de 9

TWINCAT PLC Resumo de Instrues DIV - Diviso LD in DIV in2 ST out LD in MOD in2 ST out IL LD in1 AND in2 ST out LD in OR in2 ST out LD in XOR in2 ST out LD in NOT ST out IL LD in SHL n ST out LD in SHR n ST out LD in ROL n ST out LD in ROR n ST out IL LD TRUE SEL in1,in2 ST out LD in1 MAX in2 MAX in3 ST out LD in1 MIN in2,in3 ST out

BECKHOFF New Automation Technology out:= in1 / in2;

MOD - Resto da diviso

out:= in1 MOD in2;

LOGICAS AND - E (produto lgico)


( BOOL , BYTE , WORD , DWORD )

ST out:= in1 AND in2;

LD

OR - OU (soma lgica)
( BOOL , BYTE , WORD , DWORD )

out:= in1 OR in2;

XOR - OU EX ( OU exclusivo)
( BOOL , BYTE , WORD , DWORD )

out:= in1 XOR in2;

NOT - NO (negao lgica)


( BOOL , BYTE , WORD , DWORD )

out:= NOT in;

DESLOCAO SHL - Deslocao de in em n bits a direita com preenchimento esquerda


( BYTE , WORD , DWORD )

ST out:= SHL (in,n);

LD

SHR - Deslocao de in em n bits esquerda com preenchimento direita


( BYTE , WORD , DWORD )

out:= SHR (in,n);

ROL - Deslocao de in em n bits direita com entrada esquerda


( BYTE , WORD , DWORD )

out:= ROL (in,n);

ROR - Deslocao de in em n bits esquerda com entrada direita


( BYTE , WORD , DWORD )

out:= ROR (in.n);

SELECO SEL - Selector binrio

ST out:=SEL(g,in1,in2);

LD

MAX - Seleco do maior dado

out:=MAX (in1,in2,in3);

MIN - Seleco do menor dado

out:=MIN(in1,in2,in3);

BRESIMAR

<j.andril@bresimar.pt>

Anexo A 4 de 9

TWINCAT PLC Resumo de Instrues LIMIT - Seleco de limites LD min LIMIT in , max ST out LD k MUX in0,in1,in2, In3,in4 ST out IL LD in1 GT in2 ST out LD in1 LT in2 ST out LD in1 GE in2 ST out LD in1 LE in2 ST out LD in1 EQ in2 ST out LD in1 NE in2 ST out IL LD in
BOOL_TO_INT

BECKHOFF New Automation Technology out:=LIMIT(min,in,max);

MUX - Multiplexador

out:=MUX(K,in0,in1,in2,in3,in4) ;

COMPARAO GT > (maior que)

ST out:= in1 > in2;

LD

LT < (menor que)

out:= in1 < in2;

GE >= (maior ou igual a) LE <= (menor ou igual a) EQ = (igual a)

out:= in1 >= in2;

out:= in1 <= in2;

out:= in1 = in2;

NE <> (no igual a) CONVERSO BOOL_TO_tipo (16 converses) BYTE_TO_tipo (16 converses) WORD_TO_tipo (16 converses) DWORD_TO_tipo (16 converses) USINT_TO_tipo (16 converses) UINT_TO_tipo (16 converses) UDINT_TO_tipo (16 converses)

out:= in1 <> in2;

ST out:=BOOL_TO_INT(in);

LD

ST out LD in
BYTE_TO_WORD

out:=BYTE_TO_WORD(in);

LD

ST out LD in
WORD_TO_INT

out:=WORD_TO_INT(in);

ST out LD in
DWORD_TO_BOOL

out:=DWORD_TO_BOOL(in);

ST out LD in
USINT_ TO_DINT

out:=USINT_TO_INT(in);

ST out LD in
UINT_ TO_USINT

out:=UINT_TO_USINT(in);

ST out LD in
UDINT_ TO_USINT

out:=UDINT_TO_USINT(in);

ST out

BRESIMAR

<j.andril@bresimar.pt>

Anexo A 5 de 9

TWINCAT PLC Resumo de Instrues SINT_TO_tipo (16 converses) INT_TO_tipo (16 converses) DINT_TO_tipo (16 converses) REAL_TO_tipo (16 converses) LREAL_TO_tipo (16 converses) STRING_TO_tipo (16 converses) TIME_TO_tipo (16 converses) TOD_TO_tipo (16 converses) TIME_OF_DAY DATE_TO_tipo (16 converses) DT_TO_tipo (16 converses) DATE_AND_TIME TRUNC Truncar varivel VRIAS INDEXOF index interno do POU SIZEOF n de bytes da varivel ADR endereo absoluto da varivel ^ indicao de ponteiro BITADR endereo do bit na varivel LD in
BITADR

BECKHOFF New Automation Technology out:=SINT_TO_USINT(in);

LD in
SINT_ TO_USINT

ST out LD in
INT_ TO_USINT

out:=INT_TO_USINT(in);

ST out LD in
DINT_ TO_USINT

out:=DINT_TO_USINT(in);

ST out LD in
REAL_ TO_USINT

out:=REAL_TO_USINT(in);

ST out LD in
LREAL_ TO_USINT

out:=LREAL_TO_USINT(in);

ST out LD in
STRING_TO_USINT

out:=STRING_TO_USINT(in);

ST out LD in
TIME_ TO_USINT

out:=TIME_TO_USINT(in);

ST out LD in
TOD_ TO_UINT

out:=TOD_TO_UINT(in);

ST out LD in
DATE_TO_UINT

out:=DATE_TO_UINT(in);

ST out LD in
DT_TO_UINT

out:=DT_TO_UINT(in);

ST out LD in TRUNC ST out IL LD in INDEXOF ST out LD in SIZEOF ST out out:=TRUNC(in);

ST out:=INDEXOF(in);

LD

out:=SIZEOF(in);

pt:POINTER TO INT var_int1:INT; var_int2:INT; pt:=ADR(var_int1); var_int2:=pt^; out:=BITADR(in);

ST out

BRESIMAR

<j.andril@bresimar.pt>

Anexo A 6 de 9

TWINCAT PLC Resumo de Instrues CAL chamada de uma funo bloco

BECKHOFF New Automation Technology

2 RESUMO DAS FUNES BLOCO STANDARD


BIESTAVEL RS Biestavel com RESET prioritrio IL CAL rs1 (SET := in1, RESET1 := in2) LD rs1.Q1 ST out1 LD in1 ST sr1.SET1 CAL sr1 (RESET:=in2) LD rs1.Q1 ST out1 CAL sema1 (CLAIM:=in1, RELEASE:=in 2, BUSY=>out1) IL CAL ftrig1 (CLK := in1) LD ftrig1.Q ST out1 CAL rtrig1 (CLK := in1) LD rtrig1.Q ST out1 IL CAL tof1 (IN := in1 , PT := T#2s , Q=>out1 , ET=>tempor) LD tof1.Q ST out1 LD tof1.ET ST tempor TON Temporizado ao trabalho CAL ton1 (IN := in1 , PT := T#4s , Q=>out1 , ET=>tempor) ton1(IN:=in1 , PT:=T#4s , Q=>out1 , ET=>tempor ); ST tof1(IN:=in1 , PT:=T#2s , Q=>out1 , ET=>tempor ); LD ST rs1(SET:=in1 , RESET1:=in2 , Q1=> out1); LD

SR Biestavel com SET prioritrio

sr1(SET1:=in1 , RESET:=in2 , Q1=> out1);

SEMA Funo semforo

sema1(CLAIM:=in1,RESET:=in 2,BUSY=>out1);

TRIGGER F_TRIG Accionamento pelo flanco descendente R_TRIG Accionamento pelo flanco ascendente

ST ftrig1(CLK:=in1 , Q=>out1 );

LD

rtrig1(CLK:=in1 , Q=>out1 );

TEMPORIZADORES TOF Temporizado ao repouso

BRESIMAR

<j.andril@bresimar.pt>

Anexo A 7 de 9

TWINCAT PLC Resumo de Instrues TP Temporizado ao trabalho por impulso CAL tp1 (IN := in1, PT:=T#6000ms ) LD tp1.Q ST out1 LD tp1.ET ST tempor CONTADORES CTD Contador decrescente IL CAL tof1 (IN := in1 , PT := T#2s , Q=>out1 , ET=>tempor) LD tof1.Q ST out1 LD tof1.ET ST tempor CTU Contador crescente CAL ton1 (IN := in1 , PT := T#4s , Q=>out1 , ET=>tempor) CAL tp1 (IN := in1, PT:=T#6000ms ) LD tp1.Q ST out1 LD tp1.ET ST tempor

BECKHOFF New Automation Technology tp1(IN:=in1, PT:=T#6s ); out1:=tp1.Q; tempor:=tp1.ET;

ST tof1(IN:=in1 , PT:=T#2s , Q=>out1 , ET=>tempor );

LD

ton1(IN:=in1 , PT:=T#4s , Q=>out1 , ET=>tempor );

CTUD Contador crescente / decrescente

tp1(IN:=in1, PT:=T#6s ); out1:=tp1.Q; tempor:=tp1.ET;

3 RESUMO DAS FUNES STANDARD


BIESTAVEL CONCAT Combina 2 strings . DELETE Apaga uma parte de um STRING a partir de uma dada posio . FIND Funo de procura de uma parte (frase) dentro de um STRING . INSERT Funo de procura de uma parte (frase) dentro de um STRING . IL LD S. CONCAT WILLI ST Var1 LD SUXYSI DELETE 2,2 ST Var1 ST (* Resultado S.WILLI *) Var1:=CONCAT(S.,WILLI); (* Resultado SYSI *) Var1: = DELETE (SUXYSI , 2 ,2); LD

LD SUXYSI FIND XY ST Var1 LD SUSI INSERT XY,2 ST Var1

(* Resultado 3 *) Var1: = FIND (SUXYSI , XY ); (* Resultado SUXYSI *) Var1: = INSERT (SUSI , XY , 2) ;

BRESIMAR

<j.andril@bresimar.pt>

Anexo A 8 de 9

TWINCAT PLC Resumo de Instrues LEFT Selecciona um n caracteres de um STRING a comear pela esquerda . LEN Calcula o tamanho de um STRING (n de caracteres) . MID Selecciona um n caracteres de um STRING a partir de uma dada posio . REPLACE Cola um STRING a partir de uma dada posio de um dado STRING e eliminando um n de caracteres definidos . RIGTH Selecciona um n caracteres de um STRING a comear pela direita . LD BRESIMAR LEFT 2 ST Var1 LD BRESIMAR LEN ST Var1 LD BRESIMAR MID 2 , 3 ST Var1 LD BRESIMAR REPLACE ASA , 2, 3 ST Var1

BECKHOFF New Automation Technology (* Resultado BR *) Var1: = LEFT (BRESIMAR , 2) ; (* Resultado 8 *) Var1: = LEN (BRESIMAR ) ;

(* Resultado ES *) Var1: = MID (BRESIMAR , 2 , 3) ;

(* Resultado BASAIMAR *) Var1: = REPLACE (BRESIMAR , ASA , 2 , 3) ;

LD BRESIMAR RIGTH 3 ST Var1

(* Resultado MAR *) Var1: = RIGTH (BRESIMAR , 3) ;

BRESIMAR

<j.andril@bresimar.pt>

Anexo A 9 de 9

TWINCAT PLC Lista de erros

BECKHOFF New Automation Technology

Anexo B LISTA DE ERROS DE COMPILAO DE PROGRAMA 1 ERROS DE COMPILAO

BRESIMAR

<j.andril@bresimar.pt>

Anexo B 1 de 18

TWINCAT PLC Lista de erros

BECKHOFF New Automation Technology

BRESIMAR

<j.andril@bresimar.pt>

Anexo B 2 de 18

TWINCAT PLC Lista de erros

BECKHOFF New Automation Technology

1 ERROS DE COMPILAO
Neste capitulo encontrar as mensagens de erro ( em italics ) e as suas possveis causas . Para uma melhor interpretao e como o software TwinCAT o usado a verso inglesa , optamos em deixar a tabela na mesma lngua . 1.1 - CHAMADAS DE ATENO (Warnings) N men.
1100 1101 1102 1103

Mensagem de ateno
Unknown function '<name>' in library. Unresolved symbol '<Symbol>'. Invalid interface for symbol '<Symbol>'. The constant '<name>' at code address '<address>' overwrites a 16K page boundary! Task '%s', call of '% Access variables in the parameter list are not updated File not found '<name>' Analyze-Library not found! Code for analyzation will not be generated. New externally referenced functions inserted. Online Change is therefore no longer possible! Unknown Pragma '<name>' is ignored! The struct '<name>' does not contain any elements. Expression contains no assignment. No code was generated. String constant passed as 'VAR_IN_OUT': '<name>' must not be overwritten! Variable '<name>' has the same name as a POU. The POU will not be called!

Possvel causa
An external library is used. Please check, whether all functions, which are defined in the .hex file, are also defined in the .lib file. The code generator expects a POU with the name <Symbol>. It is not defined in the project. Define a function/program with this name. The code generator expects a function with the name <Symbol> and exactly one scalar input, or a program with the name <Symbol> and no input or output. A string constant exceeds the 16K page boundary. The system cannot handle this. It depends on the runtime system whether the problem could be avoided by an entry in the target file. Please contact the PLC manufacturer. Variables, which are only used at a function block call in the task configuration, will not be listed in the cross reference list. The file, to which the global variable object is pointing, does not exist. Please check the path. The analyze function is used, but the library analyzation.lib is missing. Add the in the library manager. Since the last download you have linked a library containing functions which are not yet referenced in the runtime system. For this reason you have to download the complete project. This pragma is not supported by the compiler. See keyword pragma for supported directives. The structure with name <name> does not contain any elements. But Variables of this type will use 1 Byte of memory. The result of this expression is not used. For this reason there is no code generated for the whole expression. The constant may not be written within the POU, because there no size check is possible. A variable is used, which has the same name Example: PROGRAM a ... VAR_GLOBAL a: INT; END_VAR ... a; (* Not POU a is called but variable a is loaded.. *)

1200

1300 1301

1302

1400 1401 1500 1501

1502

BRESIMAR

<j.andril@bresimar.pt>

Anexo B 3 de 18

TWINCAT PLC Lista de erros


1503 1504 The POU <name> has no outputs. Box result is set to 'TRUE'. <name> (<number>): Statement may not be executed due to the evaluation of the logical expression Side effect in '<name>'! Branch is probably not executed ! Variable '%s' has the same name as a local action. The action will not be called! Open DB unclear (generated code may be erroneous). Input box without assignment. <name>(element #<element number>): Invalid watchexpression '%s' '<name> (number): No Input on Expression '<name>' possible POU '<name>' (main routine) is not available in the library Access Variables and Variable Configurations are not saved in a library! '<name>': is no Library for the current machine type! <name>: is no valid Library

BECKHOFF New Automation Technology


The Output pin of a POU which has no outputs, is connected in FBD or KOP. The assignment automatically gets the value TRUE. Eventually not all branches of the logic expression will be executed. Example: IF a AND funct(TRUE) THEN If a has is FALSE then funct will not be called. The first input of the POU is FALSE, for this reason the side branch, which may come in at the second input, will not be executed. Rename the variable or the action.

1505 1506

1600 1700 1800

The original Siemens program does not tell, which POU is openend. An input box is used in CFC which has no assignment. For this no code will be generated. The visualization element contains an expression which cannot be monitored. Check variable name and placeholder replacements. In the configuration of the visualization object at field input a composed expression is used. Replace this by a single variable. The Start-POU (z.B. PLC_PRG) will not be available, when the project is used as library. Access variables and variable configuration are not stored in the library. The .obj file of the lib was generated for another device. The file does not have the format requested for the actual target.

1801 1900 1901

1902 1903

1.2 ERROS DE COMPILAO N erro


3100

Mensagem de erro
Code too large. Maximum size: '<number>' Byte (<number>K) Total data too large. Maximum size: '<number>' Byte (<number>K) Error in library file '<name>'. Library '<name>' is too large. Maximum size: 64K Nonrelocatable instruction in library. Library code overwrites function tables. Library uses more than one segment. Unable to assign constant to VAR_IN_OUT. Incompatible data types .

Possvel causa
The maximum program size is exceeded. Reduce project size. Memory is exceeded. Reduce data usage of the application.

3101

3110 3111 3112 3113 3114 3115

The .hex file is not in INTEL Hex format. The .hex file exceeds the set maximum size. The .hex file contains a nonrelocatable instruction. The library code cannot be linked. The ranges for code and function tables are overlapping. The tables and the code in the .hex file use more than one segment. The internal pointer format for string constants cannot get converted to the internal pointer format of VAR_IN_OUT, because the data are set "near" but the string constants are set " huge" or "far". If possible change these target settings.

BRESIMAR

<j.andril@bresimar.pt>

Anexo B 4 de 18

TWINCAT PLC Lista de erros


3120 3121 3122 3130 Current code-segment exceeds 64K. POU too large." A POU may not exceed the size of 64K. Initialisation too large. Maximum size: 64K User-Stack too small: '<number>' DWORD needed, '<number>' DWORD available. User-Stack too small: '<number>' WORD needed, '<number>' WORD available. System-Stack too small: '<number>' WORD needed, '<number>' WORD available. Parameter <number> of function '<name>': Cannot pass the result of a IEC-function as string parameter to a Cfunction. Can't open library file '<name>'. Library '<name>' contains no codesegment Could not resolve reference in Library '<name>'(Symbol '<name>', Class '<name>', Type '<name>') Unknown reference type in Library '<name>' (Symbol '<name>' , Class '<name>' , Type '<name>') "%s (%d): Boolean expression to complex <name> (<network>): A network must not result in more than 512 bytes of code Stack overrun with nested string/array/structure function calls Expression too complex (too many used address registers). A jump exceeds 32k Bytes Internal Error: Too many constant strings" In a POU there at the most 3000 string constants may be used. Function block data exceeds maximal size Array optimization
<j.andril@bresimar.pt>

BECKHOFF New Automation Technology


The currently generated code is bigger than 64K. Eventually to much initializing code is created. A POU may not exceed the size of 64K. The initialization code for a function or a structure POU may not exceed 64K. The nesting depth of the POU calls is to big. Enter a higher stack size in the target settings or compile build project without option Debug (can be set in dialog Project Options Build). Please contact the PLC manufacturer.

3131

3132

Please contact the PLC manufacturer.

3150

Use a intermediate variable, to which the result of the IEC function is assigned.

3160 3161 3162

A library <name> is included in the library manager for this project, but the library file does not exist at the given path. A .obj file of a library at least must contain one C function. Insert a dummy function in the .obj file, which is not defined in the .lib file. The .obj file contains a not resolvable reference to another symbol. Please check the settings of the C-Compiler.

3163

The .obj file contains a reference type, which is not resolvable by the code generator. Please check -the settings of the C-Compiler.

3200

3201

The temporary memory of the target system is insufficient for the size of the expression. Divide up the expression into several partial expressions thereby using assignments to intermediate variables. Internal jumps can not be resolved. Activate option "Use 16 bit Sprungoffsets" in the 68k target settings. A nested function call CONCAT(x, f(i)) is used. This can lead to data loss. Divide up the call into two expressions. Divide up the assignment in several expressions. Jump distances may not be bigger than 32767 bytes. In a POU there at the most 3000 string constants may be used.

3202

3203 3204 3205

3206 3207

A function block may produce maximum 32767 Bytes of code. The optimization of the array accesses failed because during

BRESIMAR

Anexo B 5 de 18

TWINCAT PLC Lista de erros


3208 3209 3210 3211 3250 3251 3252 3253 3254 3400 3401 3402 3403 3404 3405 3406 3407 3408 3409 3410 3411 3450 3451 Conversion not implemented yet Operator not implemented Function '<name>' not found Max string usage exceeded Real not supported for 8 Bit Controller date of day types are not supported for 8 Bit Controller size of stack exceeds <number> bytes Could not find hex file: '<name>' Call to external library function could not be resolved. An error occurred during import of Access variables An error occurred during import of variable configuration An error occurred during import of global variables Could not import <name> An error occurred during import of task configuration An error occurred during import of PLC configuration Two steps with the name '<name'. Second step not imported. Predecessor step '<name>' not found Successor step '<name>' not found No successional transition for step <name>' No successional step for transition '<name>' Step '<name>' not reachable from initial step PDO'<PDO-name>': Missing COB-Id! Error during load: EDSFile '<name>' could not be found, but is referenced in hardware configuration! The module '<name>' couldn't be created! The channel '<name>' couldn't be created! The address '<name>'
<j.andril@bresimar.pt>

BECKHOFF New Automation Technology


index calculation a function has been called. A conversion function is used, which is not implemented for the actual code generator. A operator is used, which is not implemented for this data type and the actual code generator. MIN(string1,string2). A function is called, which is not available in the project. A variable of type string can be used in one expression 10 times at the most. The target is currently not supported. The target is currently not supported. The target is currently not supported. The target is currently not supported. The target is currently not supported. The .exp file contains an incorrect access variables section. The .exp file contains an incorrect configuration variables section. The .exp file contains an incorrect global variables section. The section for object <name> in the .exp file is not correct. The section for the task configuration the .exp file is not correct. The section for the PLC configuration in the .exp file is not correct. The section for the SFC POU in the .exp file contains two steps with equal names. Rename one of the steps in the export file. The step <name> is missing in the .exp file. The step <name> is missing in the .exp file. In the .exp file a transition is missing, which requires step <name> as preceeding step. In the .exp file a step is missing which requires the transition <name> as preceeding condition. In the .exp file the connection between step <name> and the initial step is missing. Click on the button Properties in the PLC configuration dialog for the module and enter a COB ID for the PDO <PDO Name>. Eventually the device file needed for the CAN configuration is not in the correct directory. Check the directory setting for configuration files in Project' 'Options' 'Directories'. The device file for module <name> does not fit to the current configuration. Eventually it has been modified since the configuration has been set up or it is corrupted. The device file for channel <name> does not fit to the current configuration. Eventually it has been modified since the configuration has been set up or it is corrupted. Option 'Check for overlapping addresses' is activated in the

3452 3453 3454

BRESIMAR

Anexo B 6 de 18

TWINCAT PLC Lista de erros


points to an used memory! 3455 Error during load: GSDFile '<name>' could not be found, but is referenced in hardware configuration! The profibus device '<name>' couldn't be created! Error in module description! No 'VAR_CONFIG' for '<name>' No address in 'VAR_CONFIG' for '<name>'. Wrong data type for '<name>' in 'VAR_CONFIG

BECKHOFF New Automation Technology


dialog Settings of the PLC configuration and an overlap has been detected. Regard, that the area check is based on the size which results of the data types of the modules, the size which is given by the entry size in the configuration file. Eventually the device file required by the Profibus configuration is not in the correct directory. . Check the directory setting for configuration files in Project' 'Options' 'Directories'. The device file for module <name> does not fit to the current configuration. Eventually it has been modified since the configuration has been set up or it is corrupted. Please check the device file of this module. Insert a declaration for this variable in the global variable list which contains the 'Variable_Configuration'. Assign an address to this variable in the global variable list which contains the 'Variable_Configuration'.

3456 3457 3500 3501 3502 3503 3504 3505 3506 3507

3550 3551 3552 3553 3554

3555 3600 3601 3610 3611 3612

In the global variables list which contains the Variable_Configuration the variable is declared with a different data type than in the POU. In the global variables list which contains the Wrong data type for '<name>' in 'VAR_CONFIG' Variable_Configuration the variable is declared with a different address than in the POU. A variable of the Variable_Configuration is declared with Initial values are not address and initial value. But an initial value can only be supported for defined for input variables without address assignment. 'VAR_CONFIG The Variable_Configuration contains a nonexisting variable. '<name>is no valid instance path In the global variable list for Access Variables the access Access path expected path for a variable is not correct. Correct: <Identifier>:'<Access path>':<Type> <Access mode> The global variable list for Access Variables contains an No address address assignment for a variable. This is not allowed. Valid specification for variable definition: <Identifier>:'<Access path>':<Type> 'VAR_ACCESS'<Access mode> variables There are two tasks are defined with an identic same name. Duplicate definition of Rename one of them. identifier '<name>' Insert a program call or delete task. The task '<name>' must contain at least one program call There is an event variable set in the Single field of the task Event variable properties dialog which is not declared globally in the project. '<name>' in task '%s' Use another variable or define the variable globally. not defined Use a variable of type BOOL as event variable in the Single "Event variable field of the task properties dialog. '<name>' in task '%s' must be of type 'BOOL' In the field Program call a function or a not defined POU is Task entry '<name>' entered. Enter a valid program name. must be a program or global function block instance In the field Append program call there are parameters used The task entry which do not comply with the declaration of the program '<name>' contains POU. invalid parameters Use command Rebuild all. If nevertheless you get the error Implicit variables not message again please contact the PLC manufacturer. found! The given variable is declared in the project, although it is <name> is a reserved reserved for the codegenerator. Rename the variable. variable name The given feature is not supported by the current version of '<name>' not supported the programming system. There is an invalid directory given in the Project Options The given compile Directories for the Compile files. directory '<name>' is invalid Too many POUs and data types are used in the project. Maximum number of Modify the maximum number of POUs in the Target POUs (<number>) Settings / Memory Layout. exceeded! Compile is aborted.
<j.andril@bresimar.pt>

BRESIMAR

Anexo B 7 de 18

TWINCAT PLC Lista de erros


3613 3614 Build canceled Project must contain a POU named '<name>' (main routine) or a task configuration <name> (main routine) must be of type program Programs musn't be implemented in external libraries Out of memory BitAccess not supported in current code generator! POU with name <name>' is already in library '<name>' Name used in interface is not identical with POU Name Overflow of identifier list Duplicate definition of identifier '<name>' data recursion: <POU 0> -> <POU 1> > .. -> <POU 0> Address expected after 'AT' Only 'VAR' and 'VAR_GLOBAL' can be located to addresses Only 'BOOL' variables allowed on bit addresses Invalid type '<name>' at address: '<name>' Invalid type: '<name>' Expecting type specification Enumeration value expected Integer number expected Enum constant '<name>' already defined.

BECKHOFF New Automation Technology


The compile process was cancelled by the user. Create an init POU of type Program (e.g. PLC_PRG) or set up a task configuration. A init POU (e.g. PLC_PRG) is used in the project which is not of type Program. The project which should be saved as an external library contains a program. This will not be available, when the library will be used. Increase the virtual memory capacity of your computer. The code generator for the currently set target system does not support bit access on variables. A POU name is used in the project, which is already used for a library POU. Rename the POU. Use command Project Rename object to rename the POU in the object organizer, or change the name of the POU in the declaration window. There the POU name has to be placed next to one of the keywords PROGRAM, FUNCTION or FUNCTIONBLOCK. Maximum 100 identifiers can be entered in one variable declaration. Take care that there is only one identifier with the given name in the declaration part of the POU. A FB instance was used, which needs itself. Add a valid address after the keyword AT or modify the keyword. Put the declaration to a VAR or VAR_GLOBAL declaration area. Modify the address or modify the type of the variable to which the address is assigned. The type of this variable cannot be placed on the given address. Example: For a target system working with alignment 2 the following declaration is not valid: var1 AT % IB1:WORD; An invalid data type is used in a variable declaration. A keyword or an operator is used instead of a valid type identifier. In the definition of the enumeration type an identifier is missing after the opening bracket or after a comma between the brackets. Enumerations can only be initialized with numbers of type INT. Check if you have followed the following rules for the definition of enumeration values: - Within one enum definition all values have to be unique. - Within all global enum definitions all values have to be unique. - Within all local enum definitions all values have to be unique Subrange types can only be defined resting on integer data types. One of the limits set for the range of the subrange type is out of the range which is valid for the base type. There is a not valid constant used for the definition of the string length. More than the allowed three dimensions are given in the definition of an array. If applicable use an ARRAY OF ARRAY. There is a not defined constant used to define the lower limit

3615 3616 3617 3618 3700 3701

3702 3703 3905 3720 3721 3722 3729

3740 3741 3742 3743 3744

3745 3746 3747 3748 3749

Subranges are only allowed on Integers! Subrange '<name>' is not compatible with Type '<name>' unknown string length: '<name>' More than three dimensions are not allowed for arrays lower bound '<name>'
<j.andril@bresimar.pt>

BRESIMAR

Anexo B 8 de 18

TWINCAT PLC Lista de erros


not defined supported in current code generator! POU with name <name>' is already in library '<name>' Name used in interface is not identical with POU Name Overflow of identifier list Duplicate definition of identifier '<name>' data recursion: <POU 0> -> <POU 1> > .. -> <POU 0> Address expected after 'AT' Only 'VAR' and 'VAR_GLOBAL' can be located to addresses Only 'BOOL' variables allowed on bit addresses Invalid type '<name>' at address: '<name>' Invalid type: '<name>' Expecting type specification Enumeration value expected Integer number expected Enum constant '<name>' already defined.

BECKHOFF New Automation Technology


for a subrange or array type. not support bit access on variables. A POU name is used in the project, which is already used for a library POU. Rename the POU. Use command Project Rename object to rename the POU in the object organizer, or change the name of the POU in the declaration window. There the POU name has to be placed next to one of the keywords PROGRAM, FUNCTION or FUNCTIONBLOCK. Maximum 100 identifiers can be entered in one variable declaration. Take care that there is only one identifier with the given name in the declaration part of the POU. A FB instance was used, which needs itself. Add a valid address after the keyword AT or modify the keyword. Put the declaration to a VAR or VAR_GLOBAL declaration area. Modify the address or modify the type of the variable to which the address is assigned. The type of this variable cannot be placed on the given address. Example: For a target system working with alignment 2 the following declaration is not valid: var1 AT % IB1:WORD; An invalid data type is used in a variable declaration. A keyword or an operator is used instead of a valid type identifier. In the definition of the enumeration type an identifier is missing after the opening bracket or after a comma between the brackets. Enumerations can only be initialized with numbers of type INT. Check if you have followed the following rules for the definition of enumeration values: - Within one enum definition all values have to be unique. - Within all global enum definitions all values have to be unique. - Within all local enum definitions all values have to be unique Subrange types can only be defined resting on integer data types. One of the limits set for the range of the subrange type is out of the range which is valid for the base type. There is a not valid constant used for the definition of the string length. More than the allowed three dimensions are given in the definition of an array. If applicable use an ARRAY OF ARRAY. There is a not defined constant used to define the lower limit for a subrange or array type. The notation of the constant does not comply with the IEC61131-3 format. The value used for the time constant cannot be represented in the internal format. The maximum value which is representable is t#49d17h2m47s295ms The notation of the constant dies not comply with the IEC61131-3 format. The notation of the constant dies not comply with the IEC61131-3 format. The notation of the constant dies not comply with the IEC61131-3 format.

3700 3701

3702 3703 3905 3720 3721 3722 3729

3740 3741 3742 3743 3744

3745 3746 3747 3748 3749 3903 3904 3905 3906 3907

Subranges are only allowed on Integers! Subrange '<name>' is not compatible with Type '<name>' unknown string length: '<name>' More than three dimensions are not allowed for arrays lower bound '<name>' not defined Invalid duration constant Overflow in duration constant. Invalid date constant Invalid time of day constant Invalid date and time constant
<j.andril@bresimar.pt>

BRESIMAR

Anexo B 9 de 18

TWINCAT PLC Lista de erros


3908 4000 4001 4010 Invalid string constant Identifier expected Variable '<name>' not declared Type mismatch: Cannot convert '<name>' to '<name>'. Type mismatch in parameter '<name>' of '<name>': Cannot convert '<name>' to '<name>'. Type mismatch in parameter '<name>' of '<name>': Cannot convert '<name>' to '<name>'. Type mismatch in output '<name>' of '<name>': Cannot convert '<name>' to '<name>'. Typed literal: Cannot convert '<name>' to '<name> Data type <name>' illegal for direct bit access Bit index '<number>' out of range for variable of type '<name> 'MOD' is not defined for 'REAL Variable with write access or direct address required for 'ST', 'STN', 'S', 'R' No write access to variable '%s' allowed Operand expected Number expected after '+' or '-' <operator 0> or <operator 1> or ... expected before '<name>' ':=' or '=>' expected before '<name>' 'BITADR' expects a bit address or a variable on a bit address Integer number or symbolic constant expected 'INI' operator needs function block instance or data unit type instance Nested calls of the same function are not possible. Expressions and constants are not allowed as operands of 'ADR' 'ADR' is not allowed on bits! Use 'BITADR'
<j.andril@bresimar.pt>

BECKHOFF New Automation Technology


The string constant contains an invalid character. Enter a valid identifier at this position. Declare variable local or global. Check what data type the operator expects (Browse Online Help for name of operator) and change the type of the variable which has caused the error, or select another variable. The data type of the actual parameter cannot be automatically converted to that of the formal parameter. Use a type conversion or use another variable type. A value with the invalid type <Typ2> is assigned to the input variable '<name>'. Replace the variable or constant to one of type <Typ1> or use a type conversion respectively a constant with type-prefix. A value with the invalid type <Typ2> is assigned to the output variable '<name>'. Replace the variable or constant to one of type <Typ1> or use a type conversion respectively a constant with type-prefix. The type of the constant is not compatible with the type of the prefix. Example: SINT#255 Direct bit addressing is only allowed for Integer- and Bitstring data types. You are using a variable var1 of type REAL/LREAL or a constant in bit access <var1>.<bit>. You are trying to access a bit which is not defined for the data type of the variable. The operator MOD can only be used for integer and bitstring data types. Replace the first operand by a variable with write access.

4011

4012

4013

4014 4015 4016 4017 4020

4021 4022 4023 4024

Replace the variable by a variable with write access. Add an operand behind the command. Enter a digit. Enter a valid operand at the named position.

4025 4026 4027 4028

Enter one of the both operators at the named position. Use a valid bit address (e.g. %IX0.1). Enter a integer number or the identifier of a valid constant. Check the data type of the variable, for which the INI operator is used. At not reentrant target systems and in simulation mode a function call may not contain a call of itself as a parameter. Example: fun1(a,fun1(b,c,d),e); Use a intermediate table. Replace the constant or the expression by a variable or a direct address. Use BITADR. Please note: The BITADR function does not return a physical memory address

4029 4030

4031

BRESIMAR

Anexo B 10 de 18

TWINCAT PLC Lista de erros


4032 instead. <number> operands are too few for '<name>'. At least <number> are needed <number> operands are too many for '<name>'. At least <number> are needed Division by 0 ADR must not be applied on 'VAR CONSTANT' if 'replaced constants' is activated Label '<name>' is not defined Duplicate definition of label '<name>' No more than %d labels in sequence are allowed Format of label invalid. A label must be a name optionally followed by a colon. POU '%s' is not defined '%s' is no function '%s' must be a declared expected before '<name>' ':=' or '=>' expected before '<name>' 'BITADR' expects a bit address or a variable on a bit address Integer number or symbolic constant expected 'INI' operator needs function block instance or data unit type instance Nested calls of the same function are not possible. Expressions and constants are not allowed as operands of 'ADR' 'ADR' is not allowed on bits! Use 'BITADR' instead. <number> operands are too few for '<name>'. At least <number> are needed <number> operands are too many for '<name>'. At least <number> are needed Division by 0

BECKHOFF New Automation Technology


Check how many operands the named operator requires and add the missing operands. Check how many operands the named operator requires and remove the surplus operands. You are using a division by 0 in a constant expression. If you want to provocate a runtime error, use if applicable - a variable with the value 0. An address access on constants for which the direct values are used, is not possible. If applicable, deactivate the option Replace Constants in Project Options Build. Define a label with the name <LabelName> or change the name <LabelName> to that of a defined label. The label '<name>' is multiple defined in the POU. Rename the label or remove one of the definitions. The number of jump labels is limited to '<Anzahl>'. Insert a dummy instruction. The label name is not valid or the colon is missing in the definition. Define a POU with the name '<name>' using the command Project Add Object or change '<name>' to the name of a defined POU. Use instead of <name> a function name which is defined in the project or in the libraries. Use an instance of data type '<name>' which is defined in Enter one of the both operators at the named position. Use a valid bit address (e.g. %IX0.1). Enter a integer number or the identifier of a valid constant. Check the data type of the variable, for which the INI operator is used. At not reentrant target systems and in simulation mode a function call may not contain a call of itself as a parameter. Example: fun1(a,fun1(b,c,d),e); Use a intermediate table. Replace the constant or the expression by a variable or a direct address. Use BITADR. Please note: The BITADR function does not return a physical memory address Check how many operands the named operator requires and add the missing operands. Check how many operands the named operator requires and remove the surplus operands. You are using a division by 0 in a constant expression. If you want to provocate a runtime error, use if applicable - a

4033

4034 4035

4040 4041 4042 4043

4050 4051 4052 4025 4026 4027 4028

4029 4030

4031 4032

4033

4034

BRESIMAR

<j.andril@bresimar.pt>

Anexo B 11 de 18

TWINCAT PLC Lista de erros


4035 ADR must not be applied on 'VAR CONSTANT' if 'replaced constants' is activated Label '<name>' is not defined Duplicate definition of label '<name>' No more than %d labels in sequence are allowed Format of label invalid. A label must be a name optionally followed by a colon. POU '%s' is not defined '%s' is no function '%s' must be a declared Unexpected end of text in brackets <name> in brackets not allowed Closing bracket with no corresponding opening bracket No comma allowed after ')' Label in brackets not allowed 'N' modifier requires operand of type 'BOOL', 'BYTE', 'WORD' or 'DWORD' Conditional Operator requires type 'BOOL' Function name not allowed here 'CAL', 'CALC' and 'CALN' require a function block instance as operand Comments are only allowed at the end of line in IL Accumulator is invalid before conditional statement 'S' and 'R' require 'BOOL' operand Another 'ST' statement or end of POU expected Too many parameters in function '%s' Too few parameters in function '%s' 'IF' or 'ELSIF' require 'BOOL' expression as condition 'WHILE' requires 'BOOL' expression as condition 'UNTIL' requires 'BOOL'
<j.andril@bresimar.pt>

BECKHOFF New Automation Technology


variable with the value 0. An address access on constants for which the direct values are used, is not possible. If applicable, deactivate the option Replace Constants in Project Options Build. Define a label with the name <LabelName> or change the name <LabelName> to that of a defined label. The label '<name>' is multiple defined in the POU. Rename the label or remove one of the definitions. The number of jump labels is limited to '<Anzahl>'. Insert a dummy instruction. The label name is not valid or the colon is missing in the definition. Define a POU with the name '<name>' using the command Project Add Object or change '<name>' to the name of a defined POU. Use instead of <name> a function name which is defined in the project or in the libraries. Use an instance of data type '<name>' which is defined in Insert a closing bracket after the text. The operator <name> is not valid in a IL bracket expression. (not valid are: 'JMP', 'RET', 'CAL', 'LDN', 'LD', 'TIME') Insert an opening bracket or remove the closing one. Remove comma after closing bracket. Shift jump label so that it is outside of the brackets. The N modifier requires a data type, for which a boolean negation can be executed. Make sure that the expression gives out a boolean result or use a type conversion. Replace the function call by a variable or a constant. Declare an instance of the function block which you want to call. Shift the comment to the end of the line or to an extra line. The accu is not defined. This happens if an instruction is preceeding which does not submit a result (e.g. 'CAL'). Use a boolean variable at this place. The line does not start with a valid ST instruction. There are more parameters given than are declared in the definition of the function. There are less parameters given than are declared in the definition of the function. Make sure that the condition for IF or ELSIF is a boolean expression. Make sure that the condition following the WHILE is a boolean expression. Make sure that the condition following the UNTIL is a

4040 4041 4042 4043

4050 4051 4052 4202 4203 4204 4205 4206 4207

4208 4209 4210

4211 4212 4213 4250 4251 4252 4253 4254 4255

BRESIMAR

Anexo B 12 de 18

TWINCAT PLC Lista de erros


4256 4257 4258 4259 4260 4261 4262 4263 4264 4265 4266 4267 4268 4269 4270 4271 4272 expression as condition 'NOT' requires 'BOOL' operand Variable of 'FOR' statement must be of type 'INT' Expression in 'FOR' statement is no variable with write access Start value in 'FOR' statement is no variable with write access End value of 'FOR' statement must be of type 'INT' Increment value of 'FOR' statement must be of type 'INT' 'EXIT' outside a loop Expecting Number, 'ELSE' or 'END_CASE' 'CASE' requires selector of an integer type Number expected after ',' At least one statement is required Function block call requires function block instance Expression expected 'END_CASE' expected after 'ELSE'-branch 'CASE' constant '%ld' already used The lower border of the range is greater than the upper border. Exptecting parameter '%s' at place %d in call of '%s'! Parts of the 'CASE'Range '%ld..%ld' already used in Range '%ld..%ld' Multiple 'ELSE' branch in 'CASE' statement Jump requires 'BOOL' as input type POU '%s' need exactly %d inputs POU '%s' need exactly %d outputs '%s' is no operator Non-boolean expression '<name>' used with contact Non-boolean expression '<name>' used with coil Expression expected at input 'EN' of the box '<name>' Expression expected at
<j.andril@bresimar.pt>

BECKHOFF New Automation Technology


boolean expression. Make sure that the condition following the NOT is a boolean expression. Make sure that the counter variable is of an integer or bitstring data type (e.g. DINT, DWORD). Replace the counter variable by a variable with write access. The start value in the FOR' instruction must be compatible to the type of the counter variable. The end value in the FOR' instruction must be compatible to the type of the counter variable. The incremental value in the FOR' instruction must be compatible to the type of the counter variable. Use 'EXIT' only within 'FOR', 'WHILE' or 'UNTIL' instructions. Within a CASE' expression you only can use a number or a 'ELSE' instruction or the ending instruction 'END_CASE'. Make sure that the selector is of an integer or bitstring data type (e.g. DINT, DWORD). In the enumeration of the CASE selectors there must be inserted a further selector after a comma. Insert an instruction, at least a semicolon. The identifier in the functionblock call is no instance. Declare an instance of the desired functionblock or use the name of an already defined instance. Insert an impression here. Terminate the 'CASE' instruction after the 'ELSE' part with an 'END_CASE'. A 'CASE' selector may only be used once within a CASE' instruction. Modify the area bounds for the selectors so that the lower border is not highte than the upper border. You can edit a function call in that way, that also the parameter names are contained, not only the parameter values. But nevertheless the position (sequence) of the parameters must be the same as in the function definition. Make sure that the areas for the selectors which are used in the CASE instruction, dont overlap. A CASE instruction may not contain more than one ELSE' instruction. Make sure that the input for the jump respectively the RETURN instruction is a boolean expression. The number of inputs does not correspond to the number of VAR_INPUT and VAR_IN_OUT variables which is given in the POU definition. The number of outputs does not correspond to the number of VAR_OUTPUT variables which is given in the POU definition. Replace '<name>' by a valid operator. The switch signal for a contact must be a boolean expression. The output variable of a coil must be of type BOOL. Assign an input or an expression to the input EN of POU '<name>. The input <number> of the operator POU is not assigned.

4273

4274 4300 4301 4302 4303 4320 4321 4330 4331

BRESIMAR

Anexo B 13 de 18

TWINCAT PLC Lista de erros


input '<number>' of the box '<name>' Expression expected at input '<name>' of the box '<name>' Identifier in jump expected Expression expected at the input of jump Expression expected at the input of the return Expression expected at the input of the output Identifier for input expected Box '%s' has no inputs Typemismatch at output: Cannot convert '<name>' to '<name>'. Jump requires 'BOOL' as input type Return requires 'BOOL' as input type Expression expected at input 'EN' of the box '<name>' Values of Constants: <name> 'S' and 'R' require 'BOOL' operand Invalid Type for parameter '<name>' of '<name>': Cannot convert '<type>' to '<type>'. Not allowed to use a constant as an output" 'VAR_IN_OUT' parameter needs variable with write access as input. An SFC-Action can not be accessed from outside! Step name is no identifier: '<name>' Extra characters following valid step name:'<name>' Step name duplicated: '<name>' Jump to undefined Step: '<name>' A transition must not have any side effects (Assignments, FB-Calls etc.) Jump without valid Step Name: '<name>' IEC-Library not found Action not declared: '% s'.

BECKHOFF New Automation Technology

4332 4333 4334 4335 4336 4337 4338 4339 4340 4341 4342 4343

The input of the POU is of type VAR_IN_OUT and is not assigned. The given jump mark is not a valid identifier. Assign a boolean expression to the input of the jump. If this is TRUE, the jump will be executed. Assign a boolean expression to the input of the RETURN instruction. If this is TRUE, the jump will be executed. Assign a suitable expression to the output box. Insert a valid expression or identifier in the input box. To none of the inputs of the operator POU '<name>' a valid expression is assigned. The type of the expression in the output box is not compatible to that of the expression which should be assigned to it. Make sure that the input for the jump is a boolean expression. Make sure that the input for the RETURN instruction is a boolean expression. Assign a valid boolean expression to the EN input of the box. Input '<name>' of box '<name>' is declared as VAR_INPUT CONSTANT. But to this POU box an expression has been assigned in the dialog 'Edit Parameters' which is not type compatible. Insert a valid boolean expression after the Set resp. Reset instruction. An expression is assigned to input '<name>' of POU box '<name>' which is not type compatible.

4344 4345

4346 4347

You can only assign an output to a variable or a direct address with write access. To VAR_IN_OUT parameters only variables with write access can be handed over, because these can be modified within the POU. SFC actions only can be called within the SFC POU in which they are defined. Rename the step or choose a valid identifier as step name. Remove the not valid characters in the step name. Rename one of the steps. Choose an existent step name as aim of the jump resp. insert a step with name <name>. A transition must be a boolean expression.

4350 4351 4352 4353 4354 4355

4356 4357 4358

Use a valid identifier as aim (mark) of the jump. Check whether the library iecsfc.lib is inserted in the library manager and whether the library paths defined in Project Options Pathsare correct. Make sure that in the object organizer the action of the IEC step is inserted below the SFC POU and that in the editor the action name is inserted in the box on the right hand of

BRESIMAR

<j.andril@bresimar.pt>

Anexo B 14 de 18

TWINCAT PLC Lista de erros


4359 4360 4361 4362 4363 4364 4365 4366 4367 4368 Invalid Qualifier: '%s' Time Constant expected after qualifier '%s' '%s' is not the name of an action Nonboolean expression used in action: '%s' IEC-Step name already used for variable: '<name>' A transition must be a boolean expression Time Constant expected after qualifier '<name>' The label of the parallel branch is no valid identifier: '<name>' The label '<name>' is already used Action '<name>' is used in multiple step chains, where one is containing the other! Exactly one network required for a transition Additional lines found after correct ILtransition Invalid characters following valid expression: '<name> Import / conversion of POU '%s' contains errors resp. is not complete. S5 time constant %lu seconds is too big (max. 9990s). Direct access to I/Os allowed only. STEP5/7 instruction invalid or not convertible to IEC 61131-3. STEP5/7 operand invalid or not convertible to IEC 61131-3. Reset of a STEP5/7 timer cannot be converted into IEC 61131-3. STEP5/7 Counter constant out of range (max. 999). STEP5 instruction not convertible to IEC 61131-3. Bit access of timer or counter words not convertible into IEC 61131-3. Contents of ACCU1 or
<j.andril@bresimar.pt>

BECKHOFF New Automation Technology


the qualifier. In the box on the left hand of the action name enter a qualifier for the IEC action. Enter next to the box on the left hand of the action name a time constant behind the qualifier. Enter next to the box on the right hand of the qualifier the name of an action or the name of a variable which is defined in the project. Insert a boolean variable or a valid action name. Please rename the step or the variable. The result of the transition expression must be of type BOOL. Open dialog step attributes for the step '<name>' and enter a valid time variable or time constant Enter a valid identifier next to the triangle which marks the jump label. There is already a jump label or a step with this name. Please rename correspondingly. The action '<name>' is used in the POU as well as in one or several actions of the POU. There are used several FBD resp. LD networks for a transition. Please reduce to 1 network. Remove the not needed lines at the end of the transition. Remove the not needed characters at the end of the transition. The POU cannot be converted to IEC 61131-3 completely.

4369 4370 4371 4400

4401 4402 4403

There is no valid BCD coded time in the accu. Make sure that you only access variables which are defined as input or output. Some STEP5/7 commands are not convertable to IEC 61131-3, e.g. CPU commands like MAS. Some STEP5/7 operands are not convertable to IEC 611313 respectively an operand is missing. The corresponding IEC timer have no reset input.

4404

4405

4406 4407 4408

There is no valid BCD coded counter constant in the accu. Some STEP5/7 instructions cannot be converted to IEC 61131-3, e.g. DUF. Special timer/counter commands are not convertable into IEC 61131-3. A command, which connects the both accus, cannot be

4409

BRESIMAR

Anexo B 15 de 18

TWINCAT PLC Lista de erros


ACCU2 undefined, not convertible into IEC 61131-3. Called POU not in project. Error in global variable list. Internal error no.11 Error in format of line in data block FB/FX name missing. Instruction after block end not allowed. Invalid Command Comment not closed FB/FX-Name too long (max. 8 characters) Expected format of line ""(* Name: <FB/FXName> *)"" Name of FB/FX parameter missing Type of FB/FX parameter invalid Type of FB/FX parameter missing Invalid FB/FX call parameter Warning: FB/FX for call either missing or parameters invalid or has '0' parameters Definition of label missing POU does not have a valid STEP 5 block name, e.g. PB10 Timer type not declared Maximum number of open STEP5 brackets exceeded Error in name of formal parameter Type of formal parameter not IECconvertible Too many 'VAR_OUTPUT' parameters for a call in STEP5 STL Labels within an expression are not allowed Too many labels After jump / call, a new expression must start Bit result undefined, not convertible to IEC 61131-3. Type of instruction and operand are not compatible No data block opened (insert instruction C DB before) Unrecognized variable or address
<j.andril@bresimar.pt>

BECKHOFF New Automation Technology


converted, because the accu values are not defined. Import the called POU. Please check the SEQ file. Please contact the PLC manufacturer. In the code which should be imported there is an erroneous date. In the original S5D file the symbolic name of an (extended) POU is missing. A protected POU cannot get imported The S5/S7 command cannot be disassembled. Close the comment with "*)". The symbolic name of an (extended) POU is to long. Correct the line correspondingly. Check the POUs. Check the POUs. Check the POUs. Check the interface of the POU. The called POU is not imported yet or is not correct or has no parameters (in the last case you can ignore the error message). The aim (label) of the jump is not defined. Modify the POU name. Add a declaration of the timer in the global variables list. You may not use more than seven open brackets. The parameter name may not exceed four characters. In IEC 61131-3 Timer, counter and POUs cannot be converted as formal parameters. A POU may not contain more than 16 formal parameters as outputs. In IEC 61131-3 jump labels may not be inserted at any desired position. A POU may not contain more than 100 labels. After jump or call a Load command LD must follow. The command which is used by VKE cannot get converted, because the value of the VKE is not known. A bit command is used for a word operand or the other way round. Insert a A DB. The watch variable is not declared within the project. By pressing <F2> you get the input assistant which lists the

4410 4411 4412 4413 4414 4415 4416 4417 4418 4419 4420 4421 4422 4423 4424

4425 4426 4427 4428 4429 4430 4431

4432 4434 4435 4436 4437 4438 4500

BRESIMAR

Anexo B 16 de 18

TWINCAT PLC Lista de erros


4501 4520 4521 4522 4550 Extra characters following valid watch expression Error in Pragma: Flag expected before '<name>'! Error in Pragma: Unexpected element '<name>'! "flag off' pragma expected! Index out of defined range : Variable OD "number>, Line <line number>. Subindex out of defined range : Variable OD "number>, Line <line number>. Index out of defined range : Parameter OD "number>, Line <line number>. Subindex out of defined range : Parameter OD "number>, Line <line number>. Variablename invalid: Variable OD <number>, Line <line number>. Empty table-entry, input not optional: Parameter OD <number>, Line <line number> Empty table-entry, input not optional: Variable OD <number>, Line <number>

BECKHOFF New Automation Technology


declared variables. Remove the surplus signs. The pragma is not correct. Check whether <name>' is a valid flag. Check whether pragma is composed correctly. The switch off of the pragma is missing, add a 'flag off' instruction. Ensure that the index is within the area which is defined in the target settings/ networkfunctionality. Ensure that the subindex is within the area which is defined in the target settings /networkfunctionality. Ensure that the index is within the area which is defined in the target settings /networkfunctionality Ensure that the subindex is within the area which is defined in the target settings /networkfunctionality. Enter a valid project variable in the filed variable. Use the syntax <POU name>.<variable name> resp. for global variables .<variable name> You must make an entry in this field.

4551

4552

4553

4554 4555

4556

You must make an entry in this field.

BRESIMAR

<j.andril@bresimar.pt>

Anexo B 17 de 18

TWINCAT PLC Lista de erros

BECKHOFF New Automation Technology

BRESIMAR

<j.andril@bresimar.pt>

Anexo B 18 de 18

Você também pode gostar