These commands allow you to follow the movement of a motor by reading the encoder position as function of time
. Currently the time resolution is 20us. In the example below, we are interested in motor "shutr"
 

Read Encoder

def record_encoder '{
  local file t t0
  file="$1"
  t0=date("%s.%.6")
  while(t-t0<1) {
    t = date("%s.%.6")
    fprintf(file,"%f %f\n",t-t0,encoder_val(shutr))
  }
  close(file)
}'