Documente Academic
Documente Profesional
Documente Cultură
?
?
y=LN(x)
sin?
cos?
tan?
...?
SIMATIC S7
Siemens AG 1999. All rights reserved.
Date:
File:
04.10.2007
PRO2_3P.1
Contedo
Conhecimento em Automao
Training Center
Pg.
Siemens Ltda.
Training Center
Pgina 1
ST-7PRO2
Instrues com nmeros REAIS
2
3
4
5
6
7
30
29
28
27 26
25
24
23
22
21
20 19
18
17
16 15
14
13
12
11 10
0 1 0 0 0 0 1 0 1 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
2-23
2-1
S
Expoente: e (8 Bits)
Exemplo:
S =0
e = 1000 0101 = 133
f = 1010 0000... = 0.5 + 0.125
SIMATIC S7
Date:
File:
Conhecimento em Automao
Training Center
04.10.2007
PRO2_3P.2
Nmero REAL
Limites de faixa
Designao
Valor e
Mantissa f
Valor
No.no pt.flut.
255
<>0
[qNaN]
Estouro
255
>(2-2-23) 2127
<(-2+ 2-23) 2127
1
0
0
1
1
1
1
1
No. normalizado
1.. 254
qualquer
(1.f) 2e-127
(-1.f) 2e-127
1
0
0
1
0
0
No.no normaliz. 0
<>0
(0.f) 2-126
(- 0.f) 2-126
0
0
0
0
1
1
1
1
Zero
+0
Nota
Siemens Ltda.
Training Center
CC1 CC0 OV OS
ST-7PRO2
Instrues com nmeros REAIS
Adio em REAL:
L
L
+R
T
MD10
MD20
MD30
Multiplicao em REAL:
L
L
*R
T
MD30
Subtrao em REAL:
L
L
-R
T
MD10
MD20
MD10
MD20
MD30
Diviso em REAL:
L
L
/R
T
SIMATIC S7
Siemens AG 1999. All rights reserved.
MD10
MD20
MD30
Date:
File:
04.10.2007
PRO2_3P.3
Conhecimento em Automao
Training Center
Vista Geral
Nmeros REAIS
no autorizados
Nota
Siemens Ltda.
Training Center
Pgina 3
ST-7PRO2
Instrues com nmeros REAIS
Funes Matemticas:
SQR
SQRT
EXP
LN
Exemplo:
L
SQR
T
MD10
MD30
EN
MD10
SIMATIC S7
Siemens AG 1999. All rights reserved.
IN
SQR
ENO
OUT
(STL)
(LAD)
MD30
Date:
File:
Conhecimento em Automao
Training Center
04.10.2007
PRO2_3P.4
Vista Geral
SQR
SQRT
EXP
LN
Siemens Ltda.
Training Center
Pgina 4
ST-7PRO2
Instrues com nmeros REAIS
Funes Trigonomtricas:
SIN
COS
TAN
Seno
Coseno
Tangente
ngulo
Funes Arco:
ASIN
ACOS
ATAN
Arco seno
Arco coseno
Arco tangente
Exemplo:
L
SIN
T
MD10
MD30
EN
MD22
SIMATIC S7
Siemens AG 1999. All rights reserved.
Funes
Trigonomtricas
Funes Arco
Siemens Ltda.
Training Center
IN
SIN
(STL)
ENO
OUT
(LAD)
MD30
Date:
File:
04.10.2007
PRO2_3P.5
Conhecimento em Automao
Training Center
Pgina 5
ST-7PRO2
Instrues com nmeros REAIS
Exemplo:
L
RND+
T
MD22
SIMATIC S7
Siemens AG 1999. All rights reserved.
MD10
MD30
EN
RND+
ENO
IN
OUT
(STL)
(LAD)
MD30
Date:
File:
04.10.2007
PRO2_3P.6
Conhecimento em Automao
Training Center
Vista Geral
RND+
RND-
RND
TRUNC
DTR
ABS
NEGR
A instruo NEGR nega o nmero REAL no ACCU1, isto , o sinal (bit 31)
invertido (par para um nmero REAL invlido). As instrues DTR, ABS e
NEGR no afetam os bits de status.
Siemens Ltda.
Training Center
Pgina 6
ST-7PRO2
Instrues com nmeros REAIS
P2
Y1
P1
X1
Funo: FC 31 com D =
SIMATIC S7
Siemens AG 1999. All rights reserved.
X2
(X2 - X1)2 + (Y2 - Y1)2
Date:
File:
04.10.2007
PRO2_3P.7
Conhecimento em Automao
Training Center
Objetivo
Tarefa
O que fazer
Additional Task
Criar uma verso run-time otimizada do FC31 para S7-400, que possa operar
sem o uso de variveis temporrias.
Siemens Ltda.
Training Center
Pgina 7
ST-7PRO2
Instrues com nmeros REAIS