Motor movements (from Labview)

There are clients like Labview that move motors by using the asynchronous server mode of online of by starting online as a deamon. It is important to split the whole movement into pieces. Each of these is executed very fast, although the whole movement may last arbitrarily long. The following code snippet demonstrates how such a move is executed. A Laview client would communicate with an Online server via TCP/Ip and use the mentioned functions.

 
if (n_arg() < 1) 
    say " This file requires at least 1 argument " 
    wait
    end 
 endif 

setup_absolute_unit_move( mot1) = arg(1)
* = start_move( mot1)

label1:
  if( check_move( mot1)) 
    wait 0.1
    say/line=2 "pos "get_motor_unit_position( mot1)
    goto label1
    endif

* = complete_move( mot1)
say/line=2 "pos "get_motor_unit_position( mot1)