Rockwell-automation FactoryTalk View Machine Edition Users Guide Manual do Utilizador Página 484

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 677
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 483
FACTORYTALK VIEW MACHINE EDITION USERS GUIDE
23-6
• • • • •
To create a tag placeholder in an expression
Type the cross-hatch character followed by a number (no space in between). For
example, #1.
Constants
A constant can have any of the following formats:
Integer (123)
Floating-point (123.45)
String constant (“character string”)
Arithmetic operators
Arithmetic operators perform math on two or more numeric values and calculate the
result. The arithmetic operators are:
Symbol Operator
Example
(For these examples, tag1 = 5 and tag2 = 7)
+ addition tag1 + tag2
returns a value of 12
You can also use this operator with string
operands. See page 23-7.
- subtraction tag1 - tag2
returns a value of -2
* multiplication tag1 * tag2
returns a value of 35
/ division tag1 / tag2
returns a value of 0.7142857
MOD,% modulus (remainder) tag2 MOD tag1
returns a value of 2
The modulus operator is the remainder of one
number divided by another. In the example, the
remainder of 7 divided by 5 is 2; so 7 % 5 = 2
Important: This operator is for integers only,
not floating-point numbers.
** exponent tag1 ** tag2
returns a value of 78125
Vista de página 483
1 2 ... 479 480 481 482 483 484 485 486 487 488 489 ... 676 677

Comentários a estes Manuais

Sem comentários