Elmomc Multi-Axis Motion Controller-Maestro Manual de usuario Pagina 68

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 313
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 67
For example:
i = 0x3fff; // Hexadecimal constant
j = 0X3FFF; // Equal to i
5.1.6.2
Maestro Software Manual MAXL Program Language
MAN-MASSW (Ver. Q)
Named Constant - #define and const.
Constants must be declared in the “global declarations” section, i.e. before the first
function. Named constants declared with #define are accessible only in the current
program. Constants declared using
const can be used by other programs.
#define is used to declare named constants locally. For example, if a program uses the
same constant several times, a named constant can be used as in the following
example:
// program : test1
#define AC 200000000
function run()
a1.ac=AC
a2.ac=AC
a1.dc=AC
a2.dc=AC
end function
To declare a global constant, which is visible to other programs and the command
interpreter, use
const as in the following example:
// program test1
const AC=200000000
function run()
a1.ac=AC
a2.ac=AC
a1.dc=AC
a2.dc=AC
end function
Now the command interpreter has access to the named constant:
>test1.AC
200000000
5-6
Vista de pagina 67
1 2 ... 63 64 65 66 67 68 69 70 71 72 73 ... 312 313

Comentarios a estos manuales

Sin comentarios