Elmomc Multi-Axis Motion Controller-Maestro Manual do Utilizador Página 98

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 313
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 97
Example:
function @perror(int error_number)
if(number == 1)
TRACE (“Divided by zero! ”)
end if
restart
end function
5.7 Virtual Machine Control Statements
5.7.1 wait control statement
The wait keyword suspends the execution of the program until the specified time has
elapsed. The expression may be within round parentheses or without parentheses. The
expression specifies the waiting time in milliseconds. It can be a numerical expression
only, which is evaluated in a single value.
Syntax
wait(numerical-expression)
Example:
function foo()
// do something
……
wait(1000) // program waiting one second
end function
5.7.2 waitvar control statement
The waitvar keyword suspends the execution of the program until the specified
variable value has changed or timeout elapsed. Variable name specifies the global
variable for waiting. The expression specifies the waiting time in milliseconds. It can
be numerical expression only, which is evaluated in a single value.
Syntax
waitvar(variable-name, numerical-expression)
Example:
function foo()
// do something
……
waitvar(g_var, 1000) // program wait for g_var to chang in one second
end function
Maestro Software Manual MAXL Program Language
MAN-MASSW (Ver. Q)
5-36
Vista de página 97
1 2 ... 93 94 95 96 97 98 99 100 101 102 103 ... 312 313

Comentários a estes Manuais

Sem comentários