Beta 1742A Manual do Utilizador Página 337

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 520
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 336
12-8 Motion Mate DSM314 for Series 90-30 PLCs User's Manual
January 2001 GFK-1742A
12
Local Logic Arithmetic Operators
The Local Logic language contains familiar constructs to perform basic signed integer arithmetic
computations. The language supports 32-bit arithmetic in the Local Logic program and limited use
of 64/32-bit arithmetic. All operations require two operands except for the ABS function, which
returns the absolute value of a variable or numeric constant.
Table 12-3. Arithmetic Operators
Operator Meaning
+ Addition
-Subtraction
* Multiplication
/ Integer Division
MOD Modulus
ABS Absolute Value
Arithmetic expressions may only be used in assignment statements with one operation per
statement.
The arithmetic operations do not require data type conversion functions since the motion module
automatically does this operation.
Operator +
Adds source1 to source2 and stores the result in destination
Syntax
destination := source1 + source2;
The + operator syntax has these parts:
Part Description
Destination Any writeable local logic variable except Dxx registers.
source1 Any readable local logic variable/constant except Dxx registers.
source2 Any readable local logic variable/constant except Dxx registers.
Overflow
– Set if the result of an addition is greater than 2,147,483,647 or less than
–2.147,483,648. The Module_Status_Code is set to a value of 16#0095, which is a
status-only error.
Vista de página 336
1 2 ... 332 333 334 335 336 337 338 339 340 341 342 ... 519 520

Comentários a estes Manuais

Sem comentários