next up previous contents
Next: Initializing the ZY Up: Operation Previous: Connecting to ZY   Contents

Using Commands

There are two broad classes of commands in the ZY command set: low level and high level (or cube based). Low level commands allow the client program to directly control the various sub-systems or system parameters of the ZY such as the servo systems, the A/D system, system status, etc. High level commands use one or more sub-systems to perform the tasks that the ZY was designed to accomplish. These higher level commands will be called `cube based commands' because they take a cube name or number as a parameter. To illustrate the difference between cube commands and low level commands, here are two examples that do the same thing: move the laser to a target and measure the returning phase and amplitude. In this case, the target is a cube named ZG11. First, the low level commands:
  ABP 0, 29000     ; give azimuth a destination of 29000
  ABP 1, 65700     ; give elevation a destination of 65700
  STT 0            ; start the azimuth moving
  STT 1            ; start the elevation moving
  WAI 0            ; wait for azimuth to complete move
  WAI 1            ; wait for elevation to complete move
  TRG              ; Trigger the A/D converter
  MPC              ; Calculate the phase and amplitude from data
  RAD              ; Return the phase
The numbers 29000 and 65700 are arbitrary encoder coordinates that, on this particular ZY, would aim the laser at the desired cube. Using a cube based command to do the same thing would look like this:
  CMEAS 1, ZG11       ; aim laser at cube ZG11 and measure.
The last example is much more sophisticated since the ZY can calculate the needed azimuth and elevation encoder coordinates from the actual three dimensional coordinate of the cube's location and the location and orientation of the ZP ranger unit (see section 2.4). Cube based commands cannot be used if cube objects have not been created. They will fail if the cube parameter passed to them is incorrect (a specified cube does not exist, for instance). The ones that use the servo sub-system will fail if the servos have not been homed.
next up previous contents
Next: Initializing the ZY Up: Operation Previous: Connecting to ZY   Contents
Ramon E. Creager 2002-03-11