Home
        2.3 Tracker Programming Interface
         Contents
1.               223  4 3 5 CESAPICOMmmand    0        eeeeeeeeeeeeeeeeeees 224  4 3 6 CESAPIRGCCIVE               ccceeeeeeeeeeeeeeeeeeeeeeeees 226  4 3 7 Queued and Scattered Data    227  4 3 8 Partial Settings Changes                   cceeeeee 231  4 3 9 Asynchronous Programming Issues                 232   4 4 C   Language TPI Samples                    235  4 4 1 Sample A  lt o   xo  terctevtaseeds lates tates levee ete 235  442  Sample O   ccescctceer ec aaae aiea aaao igiri 238  4 4 3 Sample 12   aaassnnneeeeenosssenenrnrrsesereerrnnrnrseeeeeeene 239    5 COM   Interface    5 1 High level TPI Programming                    242  5 1 1 DPAWDACKS son dccniecndiac ten decnccendedadeceddcndndmbedndedadse 242  5 1 2 Introduction ce scat tssd tec ecaee lash cles e ati 242   5 2 COM TPI Programming Instructions         244  5 2 1 VisualBasic and VBA Applications                  244  5 2 2 C   APPUCAIONG   1 22 2crcerete coset ane 247       5    5 2 3 Notification Method                  cccceeececeeeeeeeeeeees 248    5 2 4 Exceptions and Return Types                0000 250  5 2 5 COM TPI Programming Languages                253  5 2 6 Proper Interface Selection               cccccccceeeeeees 255  5 2 7 Type  Library  asc08  7 Asana ueh AAA 257  5 2 8 COM TPI Reference                   cccceceeeeeeeeeeees 258  5 2 9 Registering COM Objects                  cceeeeeees 259    5 2 10 Synchronous versus Asynchronous  Interface 260    5 2 11 Multi  Tracker Applications             
2.           147    diagonal points of a box    Values are in current units and CS type  but not  according to active transformation settings    These settings only apply if the bUseRegion flag in  the appropriate continuous measurement  structure is enabled  together with the  Box   region type     SphereRegionDataT          struct SphereRegionDataT       double dVall     double dVal2   double dVal3   double dRadius              Used for parameters of Set GetSphereRegionParams  commands  The parameters describe center point  and radius of a sphere    Values are in current units and  apart from  Radius  in current CS type and according to  applied transformation settings     These settings only apply if the bUseRegion  flag in the appropriate continuous measurement  structure is enabled  together with  Sphere  region    type           ESVersionNumberT   struct ESVersionNumberT      int iMajorVersionNumber   int iMinorVersionNumber   int iBuildNumber              Used for one of the parameters of the  GetSystemStatus command  Contains version info  of the currently installed tracker server software              148    TransformationInputDataT          struct TransformationInputDataT         enum ES_TransResultType resultType   double dTransVall   double dTransVal2   double dTransVal3   double dRotVall   double dRotVal2   double dRotVal3   double dScale    double dTransStdVall   double dTransStdVal2   double dTransStdVal3   double dRotStdVvall   double dRotStdVal2   double dRot St
3.         277    Always test the variable directly  or against  Not  False        Example          Ob jSync GetContinuousDistanceModeParamsEx dataout    If  dataout bUseRegion  Then  MsgBox  bUseRegion is True   End If    or    If Not  dataout bUseRegion   False  Then  MsgBox  bUseRegion is True   End If    are both correct  However  the following would evaluate to a  wrong result     If  dataout bUseRegion   True  Then  MsgBox  bUseRegion is True    No message even flag true   End If       Further details see  Readme txt  file in Sample 5  folder and code  comments in source files     5 3 2 Sample 7    The LtcCPPClient provides a dialog  based MFC  C   application  It uses the synchronous  interface  but also implements an event sink to  catch asynchronous answers  continuous  measurements and error events      Programmers need to be familiar with ATL COM  in order to understand the event sink  implementation     Refer to a COM book for further details     The LtcCPPClient covers all essential initial steps  for a successful system start and accurate results   with some disabled code  which demonstrates all  other variants of notification methods  which  may be more familiar to programmers than event  handling     Fx See comments in source code     Message Notifications    The disadvantages of message notifications are        278       e The result parameters cannot be received  directly     e There are only general messages for all types of  answers     e Usually only the siz
4.         338    LTC  HW Trigger cable LTC card to Encoder card not connected    990   LTC  Tacho Power Supply failed  located in the measuring head             999   Unknown hardware error SSS O       10 2 T  PRODUCTS ERROR NUMBERS     Unique ID_  Text   MSGERR  ERROR  message table inconsistent  entry   d    MSGERR  ERROR  attachement ring buffer overrun   PARMGR  MESSAGE  New parameter initialisation   PARMGR  ERROR  CRC on parameter table    PARMGR  ERROR  not allowed range for this parameter   PARMGR  ERROR  unknown parameter id    PARMGR  REMARK  parameter table is full    PARMGR  WARNING  table size defined in code and that saved in flash differs  PARMGR  WARNING  error occure during load    PARMGR  ERROR  error occure during save    PARMGR  ERROR  invalid command parameter    PARTBL  ERROR  flash table not found   PARTBL  ERROR  invalid table block number    PARTBL  ERROR  invalid table data    O   CMDI  ERROR  unknown keyword    CMDI  ERROR  not allowed command in this mode    CMDI  ERROR  to long string parameter    EE   DCSC  ERROR  wrong value for T Cam mode    DSPHL  ERROR  timeout during V_INIT command   3054   DSPHL  ERROR  timeout during V_INFO command     TGT  Command parameter invalid   command not executed  TGT  FGIF data invalid   data block discarded   TGT  Section list overflow   line discarded       339    3113 TGT  Invalid image item   data item skipped    TGT  Objects per line overflow   further objects discarded  TGT  Objects in total overflow   furthe
5.         bool SetContinuousTimeModeParams  long l1TimeSeparation   long 1lNumberOfPoints   bool bUseRegion   ES_RegionType regionType          Example for a command taking a struct  parameter           bool SetContinuousTimeModeParams  ContinuousTimeModeDataT  continuousTimeModeData          The latter two functions are different overloads of  the same function     Many of the command  function exist in two  different overloads  Depending on context  it may  be more suitable for an application to use one or  the other overload     A complete listing of all these functions is  available from the CESAPICommand class  definition in the file  ES_CPP API Def h  file     Rather than redundantly listing all of these  member functions in this chapter  a general rule  is presented on how to derive the function names  from the related C TPI structures     The text in  brackets  shows the rule applied to a  sample     1  Look up the command of interest in the  enum    ES_Command    C  TPI Reference     ES_C_SetContinuousTimeModeParams     2   Remove the prefix  ES_C_  from the  command tag  name  This will be the name of  the C   function     SetContinuousTimeModeParams        3   For finding the input parameters  add the  Postfix  CT  to the remaining command  tag  name   SetContinuousTimeModeParamsCT      4   Look up this CT structure in the C  TPI  reference for a description of all the  parameters              218    4 2 2 CESAPIReceive class  ReceiveData          bool ReceiveData vo
6.        struct BasicCommandRT packetInfo   int iTotalCompensations   int  iInternalTipToProbeCompensationId   int iInternalTipAdapterId   int iTipAdapterInterface   int iInternalProbeCompensationId   ES_BOOL bMarkedForExport   unsigned short cTipToProbeCompensationName 32      unsigned short  cTipToProbeCompensationComment  128             GetTipToProbeCompensationCT RT    Command structures to get the ID of active Tip to  Probe  compensation  There is no related  Set   command since detection is automatic  The  GetTipToProbeCompensation command delivers  the compensation ID as only parameter           struct GetTipToProbeCompensationCT      struct BasicCommandCT packetInfo         struct GetTipToProbeCompensationRT     struct BasicCommandRT packetInfo   int iInternalTipToProbeCompensationId   hi          199          Get SetExternTriggerParamsCT RT    Command structures for setting getting the  external trigger parameters  See   ExternTriggerParamsT  structure for parameter  description           struct SetExternTriggerParamsCT      struct BasicCommandCT packetInfo    struct ExternTriggerParamsT triggerParams         struct SetExternTriggerParamsRT      struct BasicCommandRT packetInfo         struct GetExternTriggerParamsCT      struct BasicCommandCT packetInfo         struct GetExternTriggerParamsRT     struct BasicCommandRT packetInfo   struct ExternTriggerParamsT triggerParams            GetErrorEllipsoidCT RT    Command structures to calculate an error  ellipsoid from a 
7.       e COM methods throw exceptions in case of  failure  The sample code shown below shows  how to handle these  On Error Goto      It s  highly recommended to wrap every COM   method calling function with an  On Error  Got Error Handler    statement  Do not forget  the  Exit Sub    statement just before the   ErrorHandler  label     Here is a    stripped down    version of the Samples      Connect    handler  It shows only the essential  steps    See Sample code for a more sophisticated     Connect    handler  with getting the IP address  from user  interface etc            Private Sub Button_Connect_Click     On Error goo error handler    Ob jConnect ConnectEmbeddedSystem  192 168 0 1   700      This is important if events want to be received  electrification s LTC_NM_Event  0  0      NEVER FORGET to initialize the objects this way        Set Ob jSync   Connecticut s  Set ObjAsync   disconnectedness s    Exit Sub  ErrorHandler    MsgBox  Err Description   End Sub       The End statement in the error case exits the  application  when connection to the tracker server  has failed     To disconnect from Tracker Server use a handler  as shown below  Only essential code is shown            Private Sub Button_Disconnect_Click     disconnectednesses  End Sub       Fic See Sample 7 for an explanation of the call   electrification s LTC_NM_ Event  0  0           272          However  for VisualBasic applications  it usually  does not make sense to call this method with  other parame
8.       will be read in one read  cycle  limited to a certain  buffer size      These might be several combined packets or only  a fraction of a  trailing  packet     Problem Solution    There are several possible approaches     1  Provide a sufficient read buffer and read all  that is currently pending  The client application  parses the data block into packets  using the  header information and size of each packet   With a fragmented last packet  the next read   cycle is started and the two fragments from the  previous and the current reading are  assembled together  This is probably the most  efficient method  since it minimizes the number  of reading interrupts  However  it is also the  most complex one in terms of data parsing     2  Read only the header to determine the size of  the first pending packet  The rest of the packet  is estimated by reading  packetSize     header Size   bytes    Variant method   Peek   instead of Read  the  header  without removing data from the socket   With known size  read as many bytes as  indicated by packetSize  See code sample below     The sample code shown below demonstrates a  method to ensure complete packets  if data blocks  arrive scattered  and to avoid data congestion   traffic jams   It is based on Winsock 2 0 API  functions        228          LRESULT CMsgSink  OnMessageReceived UINT uMsg  WPARAM wParam   LPARAM lParam   BOOL amp  bHandled        The read buffer is kept static for performance reasons      In a real application 
9.      Private Sub CommandSync_ErrorEvent  _  ByVal command As LTCONTROLLib ES_Command  _  ByVal status As LTCONTROLLib ES_ResultStatus        eWhen doing the same in VBAQ7 it will read  as follows        Private Sub CommandSync_ErrorEvent  ByVal command As Long  _  ByVal status As Long              Visual Basic keeps the enum type  information and recognizes the parameters  with their correct enum  types  while VBA just  passes them as long parameters    However  the symbols of the enum values are  correctly recognized  although not checked  by the compiler for correct typing  which can  lead to errors  which are difficult to find    This problem is not specific to VBA  it also  exists in VB  There are two different  situations where enums and their value   symbols affect the interface     Method takes enum type parameters  for  example  call SetMeasurementMode the same  way for both VB and VBA        ICommandSync   SetMeasurementMode  ES_MM_ContinuousDistance                1  ES_MM_ContinuousDistance will be  correctly recognized as having the value  2    see enum definition      2  Correct typing of values  VB as well as  the VBA interpreter will not recognize typing       265       errors in enum symbols here  However  both  VB and VBA provide  IntelliSense      providing  for a selection from a list rather than having  to type them in     3  Event handlers  as we have seen above   pass enums as long values in VBA  The  incoming values can be tested against enum  symbols  
10.      Winsock API    In Windows applications  the Winsock OCX  control could be used instead of the Winsock API   However  the Winsock API functions are more  efficient than the Winsock OCX control    The use of a MFC library permits even a very  convenient class wrapper around the Winsock  API     Refer to the CAsyncSocket and CSocket classes in  C   section for details        215       4 C   Interface    4 1 Class  based TPI Programming  4 1 1 Preconditions    Using the C  interface requires sufficient  knowledge of object  oriented programming    A programmer should at least know about class   design  class  inheritance  virtual functions   member function overloads  asynchronous  programming concepts and TCP IP socket  programming    This chapter describes wrapper classes for data  structures and two main classes used for sending  commands and receiving answers     The description of the classes in this chapter may  be slightly discrepant to the contents of the  ES_CPP_API_Def h file in the SDK  In case of  discrepancies  the information in the  ES_CPP_API_Def h file should be regarded as  correct     Sample 4  former Sample 4_2 in emScon 1 5   comprises all these topics  This sample is most  suitable for introduction into emScon C    programming    The C   TPI does not provide any additional  functions for the Tracker Server  It is built upon  the C TPI and is made up of one include file   ES_CPP_API_Def h with ES_C_API_Def h as its  basis  The C   interface implements tw
11.      cccccceeeeeeeeeeeeeeeeeeeeees 335  10 1 4 Laser Control Processor HW Errors             335  10 1 5 Absolute Distance Meter HW Errors             335  10 1 6 Hardware Error  additional error numbers  tothe OXXQIOUP  iea a a et te Peet ccn eet ses 336  10 1 7 Operation Errors i ttctt ede etre eievtieeercts 336  10 1 8 Hardware Configuration Errors  user   oo  d    ejf  0      eee 337  10 1 9 Hardware Error  requires service  personnel  atiii sorniera eea aaa ine aiie 338   10 2 T  PRODUCTS ERROR NUMBERS      339          2 Introduction    2 1 Prerequisites   2 1 1 Tracker Basics Terminology   This manual does not replace tracker operating  knowledge  Users of this Reference Manual must  be familiar with tracker operation and tracker   specific terms such as Bird bath  Tracker  initialization etc     2 1 2 Abbreviations    TPI Tracker Programming  Interface   TS Tracker Server   CS Coordinate System   ADM Absolute Distance Meter   IFM Interferometer   TP Tracker Processor   NYI Not yet implemented   LT Laser Tracker    2 1 3 Hardware    The emScon TPI supports the following Laser  Trackers     e LT300   e LT500  amp  LTD500  e LT600  amp  LTD600  e LTD700   e LT800  amp  LTD800       2 1 4 Programming Environment    This manual  notation  samples  is based on  Microsoft Visual Studio 6 0  VC   6 0  Visual  Basic 6 0  running on Microsoft Windows   98 NT 2000   Some samples refer to VisualStudio  7 0  C  and VB  NET samples     e For Unicode applications  install VC   with 
12.     0000 261  5 2 12 Visual Basic Boolean variable evaluation    261  5 2 13 Reading Data Blocks with Visual Basic        262  5 2 14   VBA Macro Language Suppott                 264  5 2 15 Continuous measurements and VBA           266  5 2 16 Scripting Language Suppott               000 269    5 2 17 Exception Handling for Non  Microsoft  Clients 269    5 3 COM TPI Samples                 cccccesssssssseeeees 270  531 Sample Saee hen a ei 270  5 32  Sample 1 oiiaii einega iaai aaant 278  53 3  Sample 8 orregaiti iganna aeiu int 285  5 3 4 Sample Ahaha Ae hha eM ha Nae 285  590  OaM e 1D veer tern chiar ceuteananaieue cater nates 286  DO   Sample Variance eect al ees heheh eke nes 286  53 7 Sampe 20  af ttre e eaaa A ASE EEANN E ESEA ARE 286    C    Interface    6 1 Client Programming with C                00 288  6 1 1 MTOGUCHON ices naa aea 288  6 1 2 C  Application Programming               eee 288  6 1 3 Sample 16             eeeeecccceeeeeeeeeeeeseeeeeeeeeeeeeeeeees 289  6 1 4 Sample 17 vecccccescessesececscecenessespeseccesienesesteenenlst 289    Base User Interface  BUI     7 1 Client Programming and BUJ                 4  293  7 1 1 Measurement BUI versus Compensation  Applicati  nS s e inienn en e naas 293  7 1 2  EmScon Basic User Interface  BUI                  293  7 1 3 Integration of BUI into applications                   294  7 1 4 Sample 13 2 se et ace sae da acceneitetteatae 294    Selected Commands in Detail    8 1 Special FUNCTIONS                ccceecee
13.     138    the beam always remains attached to the same  reflector and there is a major time  gap between  measurements  several minutes or hours      Note that the useADM flag has no effect for 6DOF  measurement modes and will be ignored for  these modes  regardless whether true or false   Note  The    bUseADM    Flag only applies to 3D  measurement modes and has no effect to 6D  modes  It can be ignored in 6D cases     Continuous TimeModeDataT          struct ContinuousTimeModeDataT    long 1TimeSeparation   long l1NumberOfPoints   ES_BOOL bUseRegion     enum ES_RegionType regionType            Used as parameters for the  Set GetContinuousTimeModeParams commands  A  INumberOfPoints value of zero means    infinite     in  this case  the measurement must be stopped  explicitly with a StopMeasurement command    Time separation is in milliseconds and can vary  between 1  99999 ms     ContinuousDistanceModeDataT          struct ContinuousDistanceModeDataT         double dSpatialDistance   long lNumberOfPoints   ES_BOOL bUseRegion     enum ES_RegionType regionType            Used as parameters for the  Set GetContinuousDistanceModeParams commands   A INumberOfPoints value of zero means  infinite    must be stopped explicitly   Rather than based  on a time  separation criteria  a distance criteria is  used  It is in current length  unit  Note  One  single measurement will be preformed upon  StartMeasurement  Further measurements are not  taken until the reflector is being moved   
14.     GetSystemStatus     command     ESVersionNumberT esVersionNumber    Depending on the server version the application  is connected to  it has to allow prevent  commands being executed    If the queried server version for example  evaluates to 1 5  the application would have to  block  for example gray out menus  all 6Dof  related commands    See    enum ES_Command    in file     ES_C_Api_def h    for availability of commands in    which version  There are comments such as     New commands added for release 2 0    2 3 9 Sample Code    The samples tutorials  which are part of the SDK  and which have to be regarded as integral part of  this manual  show the principles of TPI  programming in terms of ready to compile use  applications    However  the sample applications may not be of       20    real practical use  with respect to the specific TPI  commands they implement  The focus of the  samples is set to show principles of tracker  control     In a practical application  in order to get accurate  results  it is crucial to implement all the steps as  listed under    Initial steps        The number of files and overhead in the samples  has been kept to a minimum  Code generated  from wizards  such as recompiled headers  icon  res2  includes and    cosmetic functions     have been  stripped off     See also the numerous comments in the sample  source files and the  ReadMe txt  files in each  sample folder     Error Handling    The samples do not always implement complete  err
15.    In contrast to the PositionRelative command   MoveHV does not mean a one time movement   The MoveHV command rather means    Start  movement              struct MoveHVCT     struct BasicCommandCT packetInfo   int iHzSpeed   int iVtSpeed   hi    struct MoveHVRT       struct BasicCommandRT packetInfo   hi       q The speed parameters are prefixed with       clockwise is   and anti clockwise is     to specify  the direction of movement     GoNivelPositionCT RT          struct GoNivelPositioncT      struct BasicCommandCT packetInfo   enum ES_NivelPosition nivelPosition     hi    struct GoNivelPositionRT         struct BasicCommandRT packetInfo   hi       Structures for invoking the GoNivelPosition  command in the orient to gravity procedure  The  input parameters are the pre defined Nivel  positions  1 to 4   This command is mainly used  for the  Orient to Gravity    command  It is rarely  used by applications unless an own orient to  Gravity procedure is implemented        177          The tracker head moves at a slow speed to  minimize affecting the Nivel sensor     LookForTargetCT RT    Structures for invoking the LookForTarget  command  The input parameters are in the  selected CS type   units  The output parameters  are always angles related to the tracker  coordinate system in the current angle unit  settings     This command is mainly used for LT  series of  trackers  without ADM   For LTD trackers  rather  use  GoPosition  instead           struct LookForTargetCT       
16.    Preface   Contact   Leica Geosystems AG   Metrology Division   Moenchmattweg 5   5035 Unterentfelden   Switzerland   Phone   41  62 737 67 67  Fax   41  62 737 68 34    www leica geosystems com ims index htm       1       Contents    Contents  Introduction   2 1 PrerequiSites                    eccceeceeesssssseeeeeeeeeeeeees 8  2 1 1 Tracker Basics Terminology               cccceeeeeeeeees 8  2 1 2  ADDreViAtIONS            cccccccecceeeeeeeeeeeeeeeeeeeeeeeeeeeeeees 8  2 1 3  Hardware sstrictiasderdyletissroaiiuirl ese eeiiyl sceliyoes 8  2 1 4 Programming Environment           0    ceeeeee 9  21 5 TOPAP  Protocol   nisms cmssiatintaisvamseisverveuventesss 9   2 2 TCP IP Communication               ssssssseeeeeeeeees 9  22 0 Socket FUNCHONS sonan na iae 9   2 3 Tracker Programming Interface                   11  2 3 1 Platform and Programming Language  Issues 11  2 3 2 Prefixes and Suffixes used in Type Names        12  2 3 3 Asynchronous Communication               cc0ee 13  2 3 4 Working Conditions               ccc cceceeeeeeeeeeeeeeeeees 14  2 3 5 Coordinate Parameter Triplets                ee 16  2 3 0     POISISIONCY iniisa a 17  2 3 7 Default Settings wi cisccetcccccecietniarsetiiietecesaseie as 17  2 3 8 Version Backward Compatibility                 0  18  23 9 Sample GOGC s itesccte ct rectal a aaa 20   2 4 Application Initial Steps                    eeeee 22  2 4 1 Essential Steps            ce eeeeeeeeeeeeeeeeeeeeeeeeee 22  2 4 2 Command Sequence for 3D Meas
17.    are  available from the Tracker Server    These answers mainly resolve the relation  between item name  string  and item ID   numerical ID   for example the relation between  Reflector name and Reflector ID    Apart from different other information  the  packets also contain  redundant  information on  the total number of items and the number of  packets expected to arrive     Convention     All string type names are in Unicode  representation     Example  short  cReflectorName 32  declaration  It can consist of a  maximum of 32 characters  however  since  short   is 16 bit  there are 16 bits for every character  not  only one Byte         44    ReflectorPosResultT and ProbePosResultT can also  be seen as a special command answers  These are  ES_DT_ReflectorPosResult   ES_DT_ProbePosResult  type packets and are received whenever the  tracker is locked onto a reflector  3 measurements  per second   supposed the     SendReflectorPositionData  system  setting flag is  enabled  This mechanism can be used in  applications providing graphical representation  of reflector probe motion  even while no  continuous measurement is in ongoing    Note that the accuracy of the positions provided  are limited  The receipt of these measurements  can be switched on off  It is switched off by  default     3 2 3 Error Events    Most error type data packets ES_DT_Error are not  direct reactions to commands  They are     unsolicited    and can occur at any time  These  confirm the highly  async
18.    depends on the TCP IP communication  functions library  The SendPacket   function  expects a pointer to a data packet and the size of  that packet           224    Class CMyEsCommand  Derived from CESAPICommand     Class definition          class CMyEsCommand   public CESAPICommand     public    CMyEsCommand       virtual  CMyEsCommand          virtual function override  bool SendPacket  void  pPacketStart  long PacketSize         Todo  add members and methods used for     TCP IP communication  hi       Class implementation          CMyEsCommand    CMyEsCommand             Todo  add initialization code  if any          CMyEsCommand   CMyEsCommand            Todo  add cleanup code  if any           virtual function override  bool CMyEsCommand  SendPacket  void  pPacketStart   long 1PacketSize         Todo  implement this function according to your     TCP IP communication     return true        Command Methods    The CESAPICommand class defines a  Send   method for each one of the TPI commands  These  methods are named according to the command  they cover     Examples of such method names include   e   Initialize     e GetCoordinateSystemType     e SetSphereCenterModeParams      The argument list depends on the number of   send  parameters these commands take           bool Initialize       example with no arguments    bool GoPosition double dVall     3 position coordinate values  double dVal2   double dVal3   bool bUseADM   false      default parameter       These function
19.    versus   CESAPI   C        Since C  does not support the C  like  include   file    approach  the classes defined in   ES_MCPP_API_Def h  must be packed into a   Managed C    DLL  This DLL then can be added  as reference to a C  application     For convenience  this DLL named   ES_MCPP_API_Wrapper dll  is also provided  with the SDK  ES_SDK   Lib   Unicode         288    If the DLL should be missing  or if it needs to be  rebuilt due to changes in the   ES_MCPP_API_Def h  file  Sample 16 shows how  to create this DLL     Note  An emScon programmer may make  changes to the files  ES_MCPP_API_Def h  and or   ES_CPP_API_Def h     although this should  normally neither be necessary nor recommended     Sample 17 shows a C  Application based on the  emScon C    class interface     6 1 3 Sample 16   This sample shows on how to create the required   ES_MCPP_API_Wrapper dll  from the   ES_MCPP_API_Def h  file     This is quite simple  There is only one source file   ES_MCPPAPIWrapper cpp  which contains  nothing else than the statement            include  ES_MCPP_API_Def h        In addition  some well known emScon C  include  files need to be provided in order to compile this  project   ES_C_API_Def h  Enum h etc      Note that the resulting DLL   ES_MCPP_API_Wrapper dll  has already been  built and added to the SDK for convenience  It is  therefore not really required to build it as shown  in Samplel6    However  Sample16 may help developers to  debug their applications if code i
20.   AXYZ  control    Note  Reboot the tracker processor     ES_RS_NoSuchCompensation  Meaning  The ID of a non existent  Compensation was passed to the  SetCompensation command        91    Note  Use the GetCompensations command to  get a list of valid Compensations     ES_RS_MeteoDataOutOfRange   Meaning  The current environmental  parameters  Temperature  Pressure   Humidity  are out of range    Note  Use SetEnvironmtalParams command to  set these parameters correctly  If a weather  station is attached  check for proper  functioning     The Thommen Meteo station must be  connected to the tracker system and  switched on before booting emScon   Incorrect environmental data may be  produced  if the weather station is  connected switched on later  Connecting the  combined Temperature Pressure device is  optional  However  if missing  the other   small  Temperature device must be present   If no humidity is available  a default value of  70  is assumed  Note  Other than for  temperature and pressure  the influence of  the humidity to the refraction index is  marginal  See also  ES_RS_NoTemperatureFromWM    ES_RS NoPressureFfromWM   and ES_RS_NoHumidityFromWM     ES_RS_InCompensationMode   Meaning  The server is set to Compensation  Mode  This is the case when the  Compensation BUI is active  During this  state  all TPI commands are locked    Note  Quit the Compensation BUI     ES_RS_InternalProcessActive   Meaning  The server is still busy with a  command    Note  The application 
21.   Basic  this is often performed in the  Form_Load function           Private Sub Form_Load    On Error GoTo ErrorHandler    ObjConnect ConnectEmbeddedSystem  192 168 0 1   Ob jConnect SelectNotificationMethod LTC_NM_Event  0  0  Set ObjAsync   ObjConnect ILTCommandAsync    Exit Sub   ErrorHandler   End   Exit application when connect failed  MsgBox  Err Description    End Sub       5  Call ConnectEmbeddedSystem   with the IP  address of the Tracker Processor     6  Select the LTC_NM_Event method  if using  events     7  Initialize ObjAsync pointer with the related  property of the ObjConnect   Use error handlers as shown  since interface  methods may throw exceptions     8  Call Tracker functions           Private Sub Initialize Click     On Error GoTo ErrorHandler    Ob jAsync Initialize  Exit Sub  ErrorHandler   MsgBox  Err Description   End Sub       q Invoke only one command at a time when  using the asynchronous interface  No other  command should be sent until a pending one has  completed  This behavior makes up the       245             asynchronous approach    With the synchronous interface  calls can be  queued within one function    Some answer types  Errors  SystemStatusChange   continuous measurement  reflectors  are always  asynchronous by nature  regardless whether  using synchronous or asynchronous interface     9  Declare event handlers   VB provides automatic code generation for  event handler bodies           Private Sub ObjAsync_ErrorEvent  _  ByVal comman
22.   Compensation properties  The  GetTCamToTrackerCompensations command    retrieves all such compensations defined in the    Tracker Server  The answer consists of as many    answer packets as tips are defined in the server    database  These resolve the relation between    compensation name  string  and compensation          ID  numerical   Each packet  in addition  a  redundancy   contains the total number of  compensations  i e  the total number of packets to  be expected  only for programmer s convenience    Other properties  such as tracker Serial Number   comment  etc  serve as information  mainly used       196    for user interface purpose  There is a flag  bIsActive which is true for exactly one  compensation           struct GetTCamToTrackerCompensationsCT      struct BasicCommandCT packetInfo         struct GetTCamToTrackerCompensationsRT         struct BasicCommandRT packet Info   int iTotalCompensations   int  iInternalTCamToTrackerCompensationId   int iInternalTrackerCompensationId   int iInternalCamerald   ES_BOOL bIsActive   long l1TrackerSerialNumber     unsigned short  cTCamToTrackerCompensationName  32     unsigned short  cTCamToTrackerCompensationComment  128    hi       Get SetTCamToTrackerCompensationCT RT    Command structures to get set the ID of the  active T Cam to tracker compensation  The  Get SetTCamToTrackerCompensation command  takes delivers the compensation ID as parameter           struct SetTCamToTrackerCompensationCT     struct BasicCommandC
23.   DataPacket packetInfo packetHeader 1PacketSize    sizeof  SetUnitsCT    DataPacket packetInfo packetHeader type   ES_DT_Command   DataPacket packetInfo command   ES_C_SetUnits     DataPacket unitsSettings   unitsSettings   de  CSetUnits  CSetUnits  ES_LengthUnit lenUnitType   ES_AngleUnit angUnitType   ES_TemperatureUnit tempUnitType   ES_PressureUnit pressUnitType   ES_HumidityUnit humUnitType     DataPacket packetInfo packetHeader 1PacketSize     sizeof  SetUnitsCT    DataPacket packetInfo packetHeader type   ES_DT_Command   DataPacket packetInfo command   ES_C_SetUnits   DataPacket unitsSettings lenUnitType   lenUnitType   DataPacket unitsSettings angUnitType   angUnitType   DataPacket unitsSettings tempUnitType   tempUnitType   DataPacket unitsSettings pressUnitType   pressUnitType   DataPacket unitsSettings humUnitType   humUnitType             SetUnitsCT DataPacket        4 3 5 CESAPICommand    A class for sending commands    The user of the C  TPI may ignore all struct  wrapper classes  The only important class to be  used for programming is CESAPICommand   which is defined at the end of the  ES_CPP_API_Def h file     Virtual override of SendPacket    In order to use the C   TPI  a class from the  CESAPICommand class must be derived  This  derived class  a  virtual  function  SendPacket     must be implemented  This function cannot be  implemented without knowledge of the TCP IP  communication functions the application wants  to use  The implementation of SendPacket 
24.   ES _ NivelStatus    Additional information about the Nivel20 sensor  connected to the laser tracker  This enumeration  type is used as a result parameter for  ES_C_StartNivelMeasurement           enum ES_NivelStatus      ES_NS_NoNivel   ES_NS_A110K   ES_NS_OutOfRangeOK   ES_NS_OutOfRangeNOK       e ES NS _NoNivel  No Nivel20 sensor found connected to  tracker     e ES_NS_AIlOK  Nivel measurement OK  The range of the  measurement rx ry values is within     1 5  millirad     e ES_NS_OutOfRangeOK  Result within measurement range  but  warning threshold exceeded  This warning  applies when the range of at least one  measurement value is within     1 5 and 2 0  millirad     e ES_NS_OutOfRangeNOK  No measurement could be taken  out of  range  This error applies when at least one  measurement value exceeds     2 0 millirad     These tolerance  thresholds 1 5 2 0 millirad are  invariable characteristics of the Nivel20  hardware  Please refer to the Nivel20 Instruction  Manual  Page 7        107       ES _ NivelPosition    Positions during orient to gravity procedure  This  enumeration type is used as a parameter for  ES_C_GoNivelPosition command           enum ES_NivelPosition     ES_NP_Pos1   ES_NP_Pos2   ES_NP_Pos3   ES_NP_Pos4       e ES NP_ Posl  Tracker head at Nivel position 1  90 degrees      e ES NP Pos2  Tracker head at Nivel position 2  180  degrees      e ES NP Pos3  Tracker head at Nivel position 3  270  degrees      e ES NP Pos4  Tracker head at Nivel position 4  360  
25.   LTVideo2 tlb    LTVideo2 tlb is the related type library delivered  for convenience  LTVideo2 ocx contains all type  information required     Server Address    LTVideo2 ocx has a property server address   which must be set according to your server  address     The port number is 5001  Any changes to the port  number must also be done on the server side     The size must have a width height proportion of  4 3  The image must be started stopped by  invoking the method Start StopLivelmage     See Microsoft documentation  for further  information on how to use ActiveX controls in  general        306    Events Methods   The essential methods of the camera OCX are   e StartLivelmage    e StopLivelmage      To alter the default frame rate  15 sec   the  following methods are used     e FrameRateStepUp    e FrameRateStepDown      In addition  there is a Method for advanced usage   details see below upon event description      e GetCameraParameters      Moreover  the following events  are defined           void VideoClick double deltaHz   double deltaVt   long posxX   long posyY   long flags         This event occurs when clicking on the image  with the mouse  The event parameters are as  follows     e DeltaHz  deltaVt  The angles that can be  passed to the PositionRelativeHV command  in  order to move the tracker to the clicked position     e PosX  posY  The pixel values of the clicked  position within the image coordinate system   top left   0  0      e The flags parameter can be 
26.   Sizeof data type  alternatively could be used to  calculate the packet size     This redundancy may be used for consistency  checks and is helpful when using programming  languages other than C that lack the sizeof    operator      Important  The following striked through  statement has been considered as a bug in  emScon 1 5 and former versions and is no longer  true for emScon V2 0 and up        209          From emScon Version 2 0 and up  lPacketSize  must be initialized correctly also on sending  packets  This information is essential and no  longer ignored by the tracker server as this was  the case for previous emScon server versions     3 5 10 Command Subtype Switch    14  Command type answers require a  switch statement to distinguish the command  subtype  Non data returning commands can all  be treated the same and are handled in the  default switch statement  All other command  answers need to be masked with the appropriate  result structure  The code fragment below  demonstrates this with the GetUnits command   and shows part of the handling of a single  measurement answer        210          switch  pData  gt type      case ES_DT_Command      command  type  answer arrived     BasicCommandRT  pData2    BasicCommandRT   byteArr        if something went wrong  no need to continue  if  pData2  gt status    ES_RS_A110K         TODO  evaluate and handle the error  return false          switch  pData2  gt command      case ES_C_Initialize   case ES_C_PointLaser   case 
27.   details     4 3 8 Partial Settings Changes    Consider the command  SetUnits   This command  takes all selectable unit  types  Length  Angular   Temperature  Pressure  Humidity  as parameters   However  often one wants to change only one of  these and leave the others untouched     The best method to do so is invoking a  GetUnits   first  then change only the one parameter of  interest and finally do a  SetUnits      Here is a C   sample  although the same  approach also applies to C and COM interface         231             GetUnits       trigger a  GetUnitsCommand        The current units are delivered in such that     the following virtual function will be called     void OnGetUnitsAnswer  unitsSettings      SystemUnitsDataT newUnits   unitsSettings      change angle unit and leave rest untouched    newUnits angUnitType   ES_AU_ Degree        vestore changed parameters      assumed g_cmdObj is a pointer to your ApiCommand obj     g_cmdObj  gt SetUnits  newUnits             Note  since the parameter of the  OnGetUnitsAnswer   is designed as    const     it is  necessary to use a local struct  newUnits      It is not  possible to directly change  unitsSettings        Another    favorite    for this technique is the  command  SetSystemSettings      Often it is required  to change only one of the different flags of the     SetSystemSettings  parameters     However  this technique can be used for every  Set Get command pair  if the command has more  than one parameter or a st
28.   emScon V2 0 and up  Correct Initialization of     IPacketSize    is compulsory     3 5 3 Initialization Macros    6  To avoid initialization errors  which  may happen through copy paste errors and are  difficult to trace  it is recommended to use  initialization macros for correct assignment of  type  size and command values    An INITStopMeasurement macro   for example   requires two statements  the parameter  declaration and the parameter initialization   macro call   The StopMeasurement has no  additional command parameters  If there are any   these can be incorporated into the macro        206             StopMeasurementCT cmdStop     declaration  INITStopMeasurement  cmdStop       initialization       3 5 4 Excurse  C   Initialization    C   offers a much more elegant way for  initialization     the  constructor  approach  which  eases the initialization issues     See a C   programmers reference for details     7  After initialization of the data variable   send it to the tracker server using the TCP IP  SendData   function  or whatever this function is  called   Depending on the TCP IP communication  library used  the data packet may need to be  packed into a Variant vrtData variable  followed  by a SendData  vrtData  call  Alternatively  a  Send   function takes the address and size of the  data packet variable  Send   amp data  sizeof data       3 5 5 Answers from Tracker Server    8  The SendData   function does not wait  for the Tracker Server  tracker  to comple
29.   emergency aborts    in those cases where     StopMeasurement    is not sufficient   Applications cannot rely on that this  command will send any confirmation   command completed  SystemStatus change  events   Depending on context  there may be  a reaction or not  Applications should close  the TCP IP connection after having sent the     ExitA pplication    command    Note     ExitApplication    and     StopMeasurement    are the only two  exceptions of commands that cause  immediate reaction while some other       55       command is still pending  All other  commands will return    Server busy instead       Hint  This does not apply to the  synchronous emScon COM interface   LTControl       ES_C_GetSystemStatus  Request status information about the system     ES_C_GetTrackerStatus  Request status information about the tracker     ES_C_SetTemperatureRange  Set the Trackers working temperature range     ES_C_GetTemperatureRange  Get the Trackers working temperature range     ES_C SetUnits   Set Current Units    All length  angular  temperature  pressure  and humidity  type parameters of all TPI   commands are represented in the currently  selected units    Exception  Nivel20  inclination sensor   readings are provided in the Nivel20 sensors  native units  milli rad  Celsius     Related structure  SystemUnitsDataT     ES_C_GetUnits  Queries the currently active unit  settings   Related structure  SystemUnitsDataT     ES_C Initialize   Initializes the tracker    ES_C_ReleaseMo
30.   for a list of modes  supported     ES_C _GetMeasurementMode  Queries the currently active measurement  mode        60    ES_C_SetCoordinateSystemType   Sets the coordinate system type    See  ES_CoordinateSystemType  for a list of  CS  types supported  All coordinate  type  parameters of all TPI commands are  represented in the currently selected CS     type   ES_C_GetCoordinateSystemType  Queries the currently active CS type     ES_C_SetStationaryModeParams   Sets the properties for a stationary  measurement  i e  Measurement time and  ADM use  usually do not use ADM upon  measurement   Measurement time must lie  between 500 ms and 100000 ms  0 5     100  seconds     Related structure  StationaryModeDataT     ES_C_GetStationaryModeParams   Queries the currently valid Stationary Mode  Parameters    Related structure  StationaryModeDataT     ES_C_ SetContinuousTimeModeParams  Sets the properties for a continuous time  measurement    Related structure   ContinuousTimeModeDataT     ES_C_GetContinuousTimeModeParams  Queries the currently valid Continuous Time  Mode Parameters   Related structure   ContinuousTimeModeDataT     ES_C_ SetContinuousDistanceModeParams  Sets the properties for a continuous distance  measurement    Distance parameter is in current Length   units  No range limitation applies to distance  parameters in theory  but there is a practical  limitation given by tracker working space        61    Related structure   ContinuousDistanceModeDataT     ES_C_GetConti
31.   looking up information in this chapter  C   Interface    might be essential     3 1 3 Byte Alignment    Data packets have a 4 Byte alignment convention  as a Visual Basic default     small data packets sent  over the network  The VC   statement  pragma  pack  push  4   before user defined structure  definition  uses 4 Byte alignment     VC   default  is 8 Byte  The statement  pragma pack  pop  sets  the alignment back to the previous value     q Use only 4 Byte alignments for TPI  structures     These are Microsoft VC   specific statements   When using a non Microsoft compiler   pragma  pack  push  4  and pragma pack  pop  may have to  be replaced or removed respectively     The following include statement prepares the  C_API_Def h file for Byte alignment in Linux   Win32     q 4 Byte alignments for other platforms must  be inserted            ifdef _WIN32    pragma pack  push  4     elif defined __linux__    pragma pack  4     elif    error Insert here directive to ensure 4 Byte alignment for  other platforms  Unix  MAC     endif       3 1 4 Little Big Endians    Non Intel based workstations  for example  M68000 based workstations like SUN  Apple or       38       IBM RS6000 series  use different endians for  double values  The client application  the TCP IP  communication interface respectively  requires  appropriate measures to interpret numerical  values correctly     T The Tracker Server is Intel based  All values  are provided in the little endian format     3 1 5 Pre
32.   or may take several seconds  for  example for FindReflector or Initialize Tracker      Generally  a  lt CommandName gt RT structure defines  the contents of a command answer  However   there are some special cases in the case of  measurements commands    The command answers can be categorized into  several subtypes as listed below     Non data Returning Command Answers    This command answer type essentially consists of  a command type    cookie    with the return status   succeeded  or  failed   In case of failure  the return  status  its numerical representation or enum   status value  may indicate the reason  Non data  returning commands all share the same basic  return type structure  Find Reflector is an example  of a non data returning command     Property data Returning Command Answers    Properties are the  current  system settings of the  Tracker Server  Properties can be retrieved by  Get lt xxx gt  commands  All Get lt xxx gt  commands       41    return their results in a Get lt xxx gt RT structure  The  RT structure for each command differs with  respect to its data members  Data members with  only a Get    with no corresponding Set     command can be individual basic type or enum  parameters  int  double   enum       Example   GetSystemStatusRT    However  the normally there is a command   specific sub structure  example GetUnitsRT  contains a SystemUnitsDataT sub structure     In other words  a sub  structure is available   when the same parameters are used f
33.   qdq  qdq  _  d  d  d  d  d  d   d  a    d  d  d  d  d  d  b  MsgBox  x  amp  CStr        amp  y  amp  CStr         amp  2   Exit Sub  ErrorHandler   MsgBox  Err Description   End Sub       If this command was an asynchronous call  it  would not be possible to display the result within  this function  A result display is performed in the  appropriate asynchronous answer handler     For more details  refer to Sample 5 source code     Implementing Asynchronous Commands    Visual Basic with  IntelliSense  provides support  for the available functions of an interface with the  function parameters     Add a button named InitAsync     The command handler should be completed with  the following code           Private Sub InitAsync_Click    On Error goo error handler    ObjAsync Initialize    Exit Sub  error handler    MsgBox  Err Description   End Sub       In contrast to the synchronous initialize function   this one does not stop at the Initialize   function   Exit Sub is reached immediately  When tracker  initialization is done  a notification or event is  sent     Catching Events and Messages    For asynchronous commands  the answers must  be handled by some event mechanism  This could  be Events  Windows Messages  custom window   bound  registered  WM_COPYDATA               274    For Visual Basic  Events are the right choice  The  event mechanism is provided by the  _ILTCommandAsyncEvents interface  which is a  subsidiary of ILTCommandAsync  To activate this  mechanism for a 
34.   that can occur at any time  An application  may evaluate these  mainly for GUI update      e The Tracker Server high level interface   COM  provides both asynchronous and  synchronous communication     Some answer types remain  asynchronous  even when using  synchronous communication       13    2 3 4 Working Conditions    The table below shows the valid working ranges  for selected parameters     Level 1    A Warning will be issued message when range is  outside level 1 limits  but within level 2 limits   In  other words  Values are outside Leica specified  working ambient conditions but still accepted   Should be used with caution        14       Working  ambient  conditions    Minimum value    Maximum value       Temperature      5  C      40  C       Height above  sea  level elevation   not relevant for  software      500 m     3000 m       Air pressure    600 mbar    1170 mbar       Relative  humidity    10     90        Refraction index  IFM    1 00015    1 000331       Refraction index  ADM          1 000152       1 000336       Level 2    An Error message occurs when trying to set a    value outside the specified range  The values are    rejected        Storage ambient  conditions   extended  working range     Minimum value    Maximum value       Temperature     10  C      60  C       Height above  sea  level elevation   not relevant for  software      2000 m     7000 m       Air pressure    330 mbar    1400 mbar       Relative  humidity    0     100        Refracti
35.   the number of the last error   lastResultStatus  can also be retrieved with the  command  GetSystemStatus        Evaluating the Return status    The necessary exception handling precludes  evaluation of the return status     T Certain constellations such as S_FALSE  return value require an evaluation     Types of  success  return           S_OK  S_FALSE       S_OK is returned for ordinary success cases     Commands that return a status of type Out of  Range OK  example   ES_RS_Parameter1OutOfRangeOK returns  S_FALSE in case of Out Of Range OK  This means  that the command succeeded  but is out of  specified tolerance  As a warning no exception  will be thrown  but appropriate status       252             information can be obtained in two different  ways     e Evaluate the property  ILTConnect  LastResultStatus     e Get the error Information  error string  with  GetErrorInfo             BSTR bstrError   IErrorInfo  pInfo     HRESULT hr   GetErroriInfo 0   amp pInfo    if  pInfo  amp  amp  SUCCEEDED  pInfo  gt GetDescription  amp bstrError          _bstr_t errorString bstrError       piInfo  gt Release     P OAL ae       In case of command failure  E_FAIL is returned   This automatically leads to an exception  thrown  by the COM framework      5 2 5 COM TPI Programming Languages  e Visual C      All Interfaces supported       User defined TypeLibrary  enum  structs   supported       Event and message notification methods  supported     e VisualBasic    All interfaces suppor
36.  1  1  Fixed  Approx  Approx  0  0  0    AddNominalPoint 0  2  2  Fixed  Approx  Approx  0  0  0    AddNominalPoint 1l  0  1  Approx  Fixed  Approx  0  0  0    AddNominalPoint 1l1  0  2  Approx  Fixed  Approx  0  0  0    AddNominalPoint 1l  1  0  Approx  Approx  Fixed  0  0  0    AddNominalPoint  2  2  0  Approx  Approx  Fixed  0  0  0         Again  this is a minimum configuration provided  the scale is fixed     Orientation using Nivel measurement    Suppose the horizontal angles xAngle and  yAngle have been obtained from a Nivel  measurement  To complete the orientation of the  station use a number of reference points together  with           SetInputParams 0  0  0  xAngle  yAngle  0  1  Unknown  Unknown   Unknown  Fixed  Fixed  Unknown  Fixed         9 3 T Probe    The coordinate system of the T Probe is defined  as in Figure 1 with the z axis pointing roughly  towards the camera and the y axis opposite to  mount 1  Thus the y coordinate of a tip vector at  mount 1 is negative        332                   Figure 1    The tip position and probe orientation is returned  with respect to the user coordinate system   transformation parameters   The probe orientation  is described by the rotation angles  xAngle   yAngle  zAngle  or the quaternion  q0  q1  q2  q3    In terms of rotation angles the rotation matrix R is  defined as in Section 9 2 4   In terms of the  quaternion it is given by   Rxx   qO0 q0 q1 q1 q2 q2 q3 q3   Rxy 2 q1 q2 q0 q3    Rxz 2 q1 q3 q0 q2    Ryx 2 q1 q2 
37.  1 Sample 5    This chapter is related to the  Sample5  folder of  the emScon SDK Samples     Sample 5  LtcVBClient  comes as an LTControl   based Visual Basic emScon Client     Note   LTControl dll  must be correctly registered  before proceeding     See chapter  LTControl dll Installation    for details     If LTControl is correctly registered    LtcVBClient vbp  can directly be opened with  Visual Basic Studio  It should be ready to compile  and run     In order to create a Sample 5  type application  from scratch  follow the steps       Launch Visual Basic 6 0  choose New Project  gt   Standard exe  Click OK       Save the default Form1 as LtcVBClient frm and  the project as LtcVBClient vbp  or use any name  of your choice        Choose menu Project  gt  References       Inthe  Available References    list  look for the  entry  LTControl 2 x Type Library    and check the  box in front of     q Ensure that the file path at the bottom of  the dialog matches the control s registration  location  Otherwise browse for the correct  location    Finally click OK     Accessing COM Interfaces    Other than ActiveX  OCX  controls  LTControl dll   which is an ATL type COM object  can also be       270    used for non window based applications  For  example  it will also support  pure C clients   console applications      It is neither necessary nor possible to place an  LTControl control object to the VB application  Form  as ActiveX controls require      Interface Variable Declarati
38.  35  0  0  0    AddActualPoint  1  1  0  1 0E 35  1 0E 35  1 0E 35  0  0  0    AddActualPoint  1   1  0  1 0E 35  1 0E 35  1 0E 35  0  0  0         The resulting orientation has translation   0 06  0   0  and no rotation  The residual vectors are   0 16   0  0     0 16  0  0    0 04  0  0    0 04  0  0   The  weighted residuals  divide by square of standard  deviation  have equal length 40000        331          3 2 1 Alignment          AddNominalPoint 1l1  2  3  Fixed  Fixed  Approx  0  0  0    AddNominalPoint  2  3  4  Fixed  Fixed  Fixed  0  0  0    AddNominalPoint  0   4  2  Approx  Fixed  Approx  0  0  0      SetInputParams 0  0  0  0  0  0O  1  Unknown  Unknown  Unknown   Unknown  Unknown  Unknown  Fixed         This is a minimum configuration since    redundancy  2 3 1 6 0     The approximate coordinates are necessary to  select a unique solution from the eight possible  solutions  This fact can be easily observed in the  following example           AddNominalPoint  0  0  0  Fixed  Fixed  Fixed  0  0  0    AddNominalPoint 1  0  0  Unknown  Fixed  Fixed  0  0  0    AddNominalPoint  1  1  0  Unknown  Unknown  Fixed  0  0  0         Here each of the rotation angles can be 0 or n  The  scale must be fixed in 3 2 1 situations     Box corner    The corner of a box is defined by three mutually  perpendicular planes  In the subsequent example  each plane contains two measured points  Only  the nominal coordinate defining the plane is  exactly known           AddNominalPoint 0 
39.  4 pairs  high and  low  separated by approx  90 degrees     e Twelve measurements in 4 groups of 3 each   high  low  horizontal   separated by  approx  90 degrees     Related Commands     ClearDrivePointList     AddDrivePoint     CallIntermediateCompensation      SetCompensation    Comments    Settings    Current emScon system settings  such as units   coordinate system and coordinate type  are taken  over when emScon interprets point input  driver       315    point  values  All points in the drive library must  be known within   2mm  0 0787 in  tolerance   otherwise this will cause an error in the  measurements     The settings  such as units  coordinate system and  coordinate system type  must correspond to the  input data  Ensure that the settings describe the  environment of the driver points before they are  uploaded to the server     One of the first actions of the automated  compensation algorithm is to check the geometry  of the used driver points  If the target setup fits  the requirements  as described above   then the  process continues with the measurements   otherwise it will abort        316    Compensation Results    A successful Intermediate Compensation  procedure returns the following information     e Total RMS  e Max  Deviation    e Error bit filed with the information of  warnings and errors     Compensation Intervals    An intermediate compensation is recommended  when the maximum deviation is  lt  0 0012 deg   13     With the command SetCompensation t
40.  90   to the  vertical line   Measurements on a Straight Line  1  The two measurements must be taken on a  straight line  ray  at the same level as the    as the Tilting mirror of the Tracker  Point  A  lt 0 5 m and Point B within 5 10 m        Measurements on a Vertical Line    2  All 3 measurements should be taken in a  vertical line     1  Mid point 0   at Tracker head height     2  Upper measurement at  40   deg        318    3  Lower measurement at  40   deg     During measurements  the Birdbath should not  point in the direction of measurement     a Oe dae    f          Bird Bath       Measurement   90   to the Vertical Line   3  Setup the tripod at 90    as shown in the  graphic below     The Tracker is setup such that it can turn to the  90   position  without running into stop           319    Procedure   Measurement    1  Set up the tracker     2  Set the coordinate system type to spherical  clock wise  SCW   TPI command  SetCoordinateSystemType     3  Set the Stationary Measurement Mode   TPI command  SetMeasurementMode    4  Set the Stationary measurement parameter   MeasTime to 10000ms  TPI command  SetStationaryModeParams    5  Attach the reflector to the target location     6  Point the tracker to the target location   TPI command  e g  GoPostion  This is only  possible when the coordinates of the point are  known within   2mm  otherwise track the  reflector manually from the Bird bath     7  Execute the Stationary Measurement in Face I  and save it   TPI comma
41.  A region can be applied to limit the  sensitive   measurement space  See commands SetBox          139          SetSphereRegionParams for region definition     SphereCenterModeDataT          struct SphereCenterModeDataT       double dSpatialDistance   long lNumberOfPoints   ES_BOOL bFixRadius   double dRadius    hi       Used as parameters for the  Set GetSphereCenterModeParams commands  A  INumberOfPoints value of zero means  infinite    must be stopped explicitly     Spatial distance and Radius are in current length   unit  The radius can be left variable  to be  calculated by the fit  routine   or fixed  if it is  known    Same trigger criteria as with Continuous distance  mode     CircleCenterModeDataT          struct CircleCenterModeDataT      double dSpatialDistance   long l1NumberOfPoints   ES_BOOL bFixRadius   double dRadius    hi       Used for parameters  Set GetCircleCenterModeParams commands  A  INumberOfPoints value of zero means    infinite      must be stopped explicitly     Radius is in current length  unit    Spatial distance and Radius are in current length   unit  The radius can be left variable  to be  calculated by the fit  routine   or fixed  if it is  known    Same trigger criteria as with Continuous distance  mode        140          GridModeDataT          struct GridModeDataT       double dVvall    double dVal2    double dVal3    long l1NumberOfPoints   ES_BOOL bUseRegion     enum ES_RegionType regionType            Used as parameters for the  Set Get
42.  Busy  Not Ready    Apart from evaluating these events  the  measurement status can also be asked  actively with the command    ES_C_ GetTrackerStatus     This information is  typically used for user  interface purpose to  implement a    traffic light    with green  ready     yellow  busy measuring   red  target lost or  missing compensation  colors     ES_SSC_MeasStatus_6DStatusInvalid   Same comments as above  Only applies to  probe measurements  Tracking is still OK   but the tilt of the probe is out of range so the       115    TCam cannot reliably determine the rotation  parameters  The rotation angles are not  accurate and thus  the tip  coordinates not  reliable  The recommended UI  color to  assign to this status is blue  Used in BUI   Compensation module      ES_SSC_MeasurementCountReached  Stop a continuous measurement  when the  max  number of measurements are reached     ES_SSC_IsFacel  This event is fired whenever the tracker  changes to Face I     ES_SSC_IsFace2  This event is fired whenever the tracker  changes to Face II     ES_SSC_ExternalControlActive   This event is fired whenever the tracker  server enters external control  e g  Axyz     While under external control  control  through TPI commands are blocked     ES_SSC_ServiceSoftwareActive   This event is fired whenever the tracker  server runs with service software  While  running service software  control through  TPI commands is limited     ES_SSC_TcamToTrackerCompensation  Deleted    ES_SSC_Measuremen
43.  COM Objects    COM objects must be registered on the  application PC before they can be used     LTControl dll Installation    Register LTControl dll on the client PC     both developer and customer PCs          If LTControl dll is located in the    C    WINNT   system32 directory  call  Regsvr32   C    WINNT  system32   LTControl dll  from the Start Run menu of the  explorer task bar     q The LTControl dll does not  depend on any other custom DLL   it can be registered anywhere  The  Windows system directory is the  common location     A message box appears confirming    registration      Registering of  LTControl dll succeeded        A message such as  Error  Load Library    failed  error 0x0000007e  most  likely indicates that the PC lacks a  correct ATL dl installation   missing  wrong version or not  registered     In this case  first install ATL dll as  described below  After that  repeat  registering of LTControl dll     ATL dll Installation    Copy Atl dll from ES SDK  Lib  directory to  Windows system system32 directory OR to  LTControl dll directory    Unicode version for WinNT Win2000  ANSI  version for Win9x Win ME        259    See properties of ATL dll for operating  systems supported     e   Register Atl dll     Regsvr32 exe   lt path gt   Atl dll     e Repeat registration of LTControl dll     5 2 10 Synchronous versus  Asynchronous Interface   When designing a client application using the  LTControl COM component  either the  synchronous or asynchronous inte
44.  ES_C_GetTrackerStatus  command parameter  The Tracker Status is  related to the LED indicator on the tracker head        105             enum ES_TrackerStatus    ES_API     ES  ES  ES  ES    enum ES_TrackerStatus    TS_NotReady   TS_Busy    TS_Ready   _TS_6DstatusInvalid        ES_TS_NotReady   Tracker not ready  currently not attached to a  target    ES_TS_Busy   Tracker is currently measuring   ES_TS_Ready   Tracker attached to a target and is ready to    measure     ES_TS 6DStatusInvalid  6D status of T Probe measurement is not  valid    ES ADMsStatus    Add    itional information about the ADM of the    laser tracker  This enumeration type is used as a    para    meter for ES_C_GetSystemStatus        enum E     ES  ES  ES  ES  ES  ES  ES       S_ADMStatus    __AS_NoADM   AS _ADMCommFailed     _ AS _ADMReady   __AS_ADMBusy   _AS_HWError    AS SecurityLockActive   AS NotCompensated              ES_AS_NoADM  Tracker not equipped with an ADM     ES_AS_ ADMComm Failed  Communication with ADM failed     ES_AS_ADMReady  ADM is ready to measure     ES_AS_ADMBusy  ADM is busy  performing a measurement      ES_AS HWError  Unspecified hardware error    ES_AS_SecurityLockActive  ADM has been locked for security because  maximal allowed laser intensity has       106       exceeded  Try to recover with powering  off on the controller  If problem persists   refer to Leica service     e ES_AS_NotCompensated  The ADM is not compensated and  if at all   may deliver inaccurate distances   
45.  ES_DT_Single6DMeasResult packet type        154          This structure is used to transmit the result of a  6D stationary measurement  The result depends  on current length and angle units  the coordinate  system type  orientation and transformation  parameters applied     It contains     Status Information      Adapter where Tip mounted including its  accuracy      Probe position  The position values relate to the  center of the tip ruby sphere       Probe orientation in two different  representations       Quaternion or    Rotation Angles including their accuracy      Environmental Data    Rotation angles are always represented in the  interval between  PI and PI     Details about RotationStatus  see chapter     Rotation Status  just following the chapter   ProbeMeasValueT     Applies only to 6DoF systems     ProbeContinuousResultT          struct ProbeContinuousResultT         struct ReturnDataT packetInfo    long lNumberOfResults   enum ES_MeasMode measMode    ES_BOOL bIsTryMode    long iInternalProbeld    int iFieldNumber   enum ES_MeasurementTipStatus tipStatus    long iInternalTipAdapterId   long iTipAdapterInterface   double dTemperature    double dPressure    double dHumidity    struct ProbeMeasValueT data 1      hi       This receive only structure describes the ES_DT_  ContinuousProbeMeasResult packet type  The only       155       difference to an ES_DT_ MultiMeasResult is the  array element types  Applies only to 6DoF       systems   NivelResultT  struct NivelR
46.  IDL language  and its data  types are fully transparent to COM interfaces   except constants      The ES_C_API_Def h file is the only interface  definition of emScon TPI  It is the  native  emScon  interface  All other interface levels  C   TPI  LT  Control  are strictly based on this basic include   file and are  therefore  just provided for  convenience  This enables the client programmer  to design alternate C   interfaces and or other  high level interfaces  e g  even COM  components      T The ES_C_API_Def h file should not be   changed on any account    2 3 1 Platform and Programming Language   Issues   e   The versatility of emScon TPI with TCP IP  allows its use on different operating systems   Windows  Linux and Macintosh      e The programming language is not restricted  to C  as shown in the interface specification   All programming languages  which define  structures in C notation  can be used to       11    program based on the TPI low level  interface  However  use of languages other  than C C   require translation of C   structures  ES_C_API_Def h  to the target  language s notation  with matching  structures on the byte level  4 Byte  alignment     Translations are not covered by this Manual     The use of programming languages other  than C C   is not recommended for low   level TPI programming  and no support is  provided     Translating the TPI s Enumeration  Types and Data Structures into other  language s syntax may encounter potential  errors  different
47.  KNOWN  i e  defined data according to  enums structs in C  API def file  All other data  must be ignored     Only if this rule is attended  existing emScon  client applications will also run with future  emScon server upgrades  Otherwise  application  source may need to be adjusted to be compliant  to new server versions     Applications supporting different server versions    If an application is required to support tracker  hardware with different capability and or several  emScon server versions  some important version  checking issues apply    Consider for example that the same application  should be able to deal with emScon 1 5  3D only   as well as with emScon 2 0 and up  3D trackers as  well 6Dof systems         19          Since newer emScon server versions always are  backward compatible  that is  all previous  commands are also contained in the newer  version  there is usually no problem  exceptions  see previous chapter  to run an already existing  application on a newer server version    The problem starts if developing a new  application  which should for example support  6Dof systems  emScon server V2 0 at least   but  should also be able to deal with 3D trackers  running in combination with an emScon 1 5  server    In order to run properly  such an application  should check the server version upon startup and  make provisions to prevent calls not suitable to a  particular server version     The version info to query is part of the  information delivered by the
48.  MC None  Type could not be determined  Should not  occur under normal conditions     e ES MC TCam700  T Cam is of series 700    e ES MC TCams00  T Cam is of series 800    ES _ProbeType    Specifies the measurement probe type  This  enumeration type is used as a parameter for the  GetMeasurementProbeInfo command           enum ES_ProbeType      ES_PT_None   ES_PT_Reflector   ES_PT_TProbe   ES_PT_TScan   ES_PT_MachineControlProbe   ES_PT_TCamToTrackerTool   ES_PT_ZoomArtifactTool        e ES PT None  Type could not be determined  Should not  occur under normal conditions     e ES PT Reflector  The    probe    is a reflector  No 6DoF  measurements are possible    e ES PT_TProbe  Probe is a standard T Probe    e ES _PT_TScan  Probe is a T Scan    e ES PT _MachineControlProbe  Probe is of type  Machine Control Probe          124          e ES PT _TCamToTrackerTool    Probe    is the T Cam to tracker  compensation tool     e ES PT _ZoomArtifactTool    Probe    is the T Cam to tracker  compensation tool     ES _ProbeConnectionType    Specifies the measurement probe type  This  enumeration type is used as a parameter for the  GetMeasurementProbelnfo command        enum ES_ProbeConnectionType     ES_PCT_None   ES_PCT_CableController   ES_PCT_CableSensor   ES_PCT_IRLaser   ES_PCT_IRWideAngle        e ES PCT None  No connection could be determined    e ES PCT CableController  Connection is through cable to controller    e ES PCT CableSensor  Connection is through cable to sensor   skip
49.  Stationary         TODO  do something with data       break     case ES_DT_ReflectorPosResult          Not implemented       break     case ES_DT_Command   break     nothing to do    default   Beep 100  100      all other data currently unhandled       switch       ProcessData         Fix For further details refer to the sample source  code     q Limitations for high frequency continuous  measurements  like loss of data  may occur due  to hardware  LAN  PC performance  limitations   Tests have shown that under good conditions   LAN  PC  Client program design   the LT  Control is able to handle the maximum data rate  of 1000 points per second  even through the event  notification mechanism  which might have  slightly less performance than the message       284       methods     Low performance of  Dispatch  Interfaces     Known Bugs in ATL Event Sink Implementation    There are currently two known bugs confirmed  by Microsoft in VC   6 0 concerning event  handlers        Q237771   Events Fail in ATL Containers  when Enum Used as Event Parameter        Q241810   DispEventImpl Event Handlers May  Give Strange Values     Apply one of the workarounds provided in  MSDN and in Sample 7  file DataArrived h  for a  practical application of one of the workarounds  provided     Further details see  Readme txt  file in Sample 7  folder and code  comments in source files     5 3 3 Sample 8    This sample works only with Excel 2000 and  higher  and consists of an Excel sheet with a VBA  m
50.  Unicode libraries  custom installation    Linker runtime errors  such as  mfc42u lib   mfc42ud lib or mfc42u dll missing  indicate  that VC   was installed without Unicode  support     2 1 5 TCP IP Protocol    Communication to the tracker server is based on  TCP IP  The client PC must be equipped with a  TCP IP enabled LAN Board     q This manual does not cover hardware and  installation issues     2 2 TCP IP Communication    Communication with TCP IP requires platform  specific communication functions  These are not  part of the emScon TPI and have to be provided   except when using the high level TPI  COM  interface      The TCP IP API functions of your operating  system  OS  can be used  Keywords under VC    include Win32 Sockets API  or  if using MFC   CAsyncSocket and CSocket  Visual Studio contains  a TCP IP communication library  MSWinsck ocx   as an ActiveX control  COM object      2 2 1 Socket Functions    Minimal required Functions include        e Connect     Build a TCP IP connection  between the Application PC and Tracker  Server  Specify the IP address hostname and  port number of the Tracker Server     e SendData   Send a packet of data  usually by  specifying a pointer to a byte array data   block and the size of that block    e ReceiveData     callback mechanism  To be  notified when data arrives and to read   process this data     e ReadData   To read arrived data into a byte   array buffer  upon a notification     e Close  Closes a previously established  
51.  applications  using Visual Basic  MS Excel  MS Access and MS  Word     5 1 1 Drawbacks    The TS high level interface  in contrast to the C    TPI  may cause some performance drawbacks   During high data rates  some data may get lost  under certain conditions  In this case  using the  C C   TPI would be more suitable  since this  would allow for  tuning  the TCP IP  communication  The TS high level interface does  not provide such tuning capabilities     q The TS high level interface is limited to  Win32 platforms     5 1 2 Introduction    The TS high level interface is made up of a COM  object  as an ATL DLL COM server  It comes as a  DLL named  LTControl dll   and it is part of the  emScon SDK     COM objects have to be registered on the  Application Computer  In order to register  LTControl dll  Windows platforms only   execute  the following command from the command line           Regsvr32 exe  lt Path gt  LTControl dll       See chapter    Registering COM Objects    for a more  detailed description        242       COM Components provide standardized  programming interfaces  LTControl provides  several custom interfaces and    Connection Point  Interfaces     of type IDispatch   This chapter lists  the methods and properties of these interfaces   A type library describes COM object interfaces  The  type library LTControl tlb is implicitly included in  LTControl dll    All enumeration types and structures defined in  the C TPI are also provided by the LTControl s  COM in
52.  bugs that make  development of Tracker Server clients virtually  impossible  as soon as events are involved  This  bug leads to a completely corrupted file upon file  saving  after an event has arrived    For this reason  Excel samples delivered with the  TPI SDK are in Excel 2000 format  They may run  with Excel 97   but may be destroyed as soon as  any changes are saved  Always maintain a safe   read only  copy    The following remarks only apply to Office 97  programming  Office 2000 VBA behaves as  ordinary VB      User defined Types  the Differences between  Visual Basic and VBA97    e Both allow defining user defined structs  locally  However  those structs exported by  the LTControl  such as PacketHeaderT   SingleMeasResultT  are only recognized from  within Visual Basic  VBA claims an error  Automation type not supported if declaring  for  example  a variable like        264          Dim val As SingleMeasResultT    works with VB  but not VBA97          e Enums are not supported by VBA97  The  compiler does not know the keyword Enum   User defined enums cannot be defined  locally  although this works with ordinary  Visual Basic  It is also not possible to use  enum  type variables that are exported by the  LTControl  Declaration as follows are not  possible in VBA97         Dim cmd as ES_Command    works with VB  but not VBA97       e When implementing an EventHandler that  has enum type parameters in Visual Basic will  read as follows  only function header  shown    
53.  calculated from the  actual statistical variation of the many shots  It  gives an indication on the stability of the  measurement environment disregarding  systematic effects  We recommend not using this  accuracy for any other purpose     9 1 3 Transformation of covariance matrices    In the  spherical  tracker coordinate system the a  priori covariance matrix of a tracker  measurement is diagonal  see formulas above    Conversion to Cartesian coordinates results in a  full matrix  Transformation to other coordinate  systems using orientation and or transformation  parameters  Section 9 2 below  again transforms  the covariance matrix  However  at any stage the  standard deviations  i e  the square roots of the  diagonal entries provide a reasonable estimate on  the accuracy of the respective coordinate triple     9 2 Orientation and Transformation    The orientation takes the instrument coordinate  system to the world coordinate system and the  transformation takes the world coordinate system       323    to an object coordinate system  The two are used  either by them selves or together to show  coordinates in the required coordinate system     See Section 8 1 5 for a survey on the TPI  commands used to calculate orientation or  transformation parameters  The major input to  these calculations are the coordinates of a set of  reference points together with the corresponding  measured coordinates  The result of the  calculation is a seven parameter transformation  of the m
54.  data  especially when  using the asynchronous interface   Most of these  pass their results through basic data type  parameters     Fk See chapter  Handling Data Arrival      Continuous Measurements     q Message notification methods with VB are  not demonstrated here     However  there are some exceptions where the  data must be retrieved explicitly upon an  incoming event  These types of events can be  identified by the DataReady term in their names   The continuous measurement events are among  these     The code below shows an implementation of the  ContinuousPointMeasDataReady   event handler  It  does not demonstrate the processing of the data  received  This handler does some diagnostics      checks whether the size of read data complies       262       with the passed parameter  If OK  the size is  displayed  otherwise an error message is shown     By calling the ObjConnectGetData   function  the  arrived data  that caused the event  is being read  into a local buffer  The application interprets and  processes the data  In order to get the  measurement values  loop through the array and  interpret the array elements with MeasValueT  not  shown here      a VB may not be the right choice to process   high rate  continuous measurements  especially  when running the interpreter  The VB project  must be compiled first           Private Sub ObjAsync_ContinuousPointMeasDataReady  _  ByVal resultsTotal As Long  _  ByVal bytesTotal As Long   Dim data As Variant  Dim tp As VbV
55.  image by mouse pointer will move  the tracker inaccurately  typically  the tracker  will move double or half the amount of the     clicked    distance         145    SystemUnitsDataT          struct SystemUnitsDataT       enum ES_LengthUnit lenUnitType   enum ES_AngleUnit angUnitType   enum ES_TemperatureUnit tempUnitType   enum ES_PressureUnit pressUnitType   enum ES_HumidityUnit humUnitType        i       Used for parameters of Set GetUnits commands   See related enums     they explain themselves           EnvironmentDataT   struct EnvironmentDataT      double dTemperature   double dPressure   double dHumidity     hi       Used for parameters of Set GetEnvironmentParams  commands  The SetEnvironmentParams command  mainly applies when no weather monitor is  available  or when disabled by the  bUseWeatherMonitor setting  Otherwise  these  parameters are updated implicitly and the  current values can be retrieved with the  GetEnvironmentParams  See also description of  enum  ES_WeatherMonitorStatus         Fix See chapter  Working Conditions        RefractionDataT          struct RefractionDataT     double difmRefractionIndex   double dAdmRefractionIndex   he       Used for parameters of Set GetRefractionParams  commands  See also description of enum   ES_WeatherMonitorStatus        This is a command for advanced and special  usage  It should only be used in combination with  the WeatherMonitorStatus mode   ES_WMS_ReadOnly   See description there     Normal application should
56.  lt  approxDist   lt   50000 mm  Note  the minimum value is  101 mm  not 100 mm    The search time depends on the search  radius  Large search radii result in extended  search times    See also command  SetSearchParams     A    FindReflector    command in progress can  be interrupted with     ES_C_StopMeasurement       ES_C Unknown  Used for initialization purposes only  Does  not appear as an answer to a command      ES_C_LookForTarget   Looks for a reflector at the given position  and returns H  V values  if a reflector is  present  Values are in current angular units   This command is mainly useful for LT  series  of Tracker without ADM and should not be  used in general     ES_C _GetDirection    Returns H  V values even without a reflector  locked on  Values always are in current  angular units     ES_C_CallOrientToGravity   Triggers an    Orient to Gravity    process  The 2  inclination parameters are returned as a  result  Result values are in current angular  units and are typically used as RotVal1   RotVal2 input values for the  SetStationOrientationParams command   Note  this is a rather long taking command   It can be interrupted with       69       ES_C_StopMeasurement        ES_C _ClearTransformationNominalPointList  Clears the current nominal point list  which  is used as input data for the Transformation  process     For all transformation related commands  see  Section 9 2 for details     ES_C_ClearTransformationActualPointList  Clears the current actual point 
57.  not explicitly set  refraction parameters  They are set indirectly by  using the SetEnvironmentParams command  if no  weather monitor available   or by selecting the  mode  ES_WMS_ReadAndCalculateRefractions                 146     if a WM is connected      T Under certain conditions  the refraction  parameters are updated  set  implicitly on setting  new environment parameters  See description of  enum  ES_WeatherMonitorStatus      Fix See chapter  Working Conditions        StationOrientationDataT          struct StationOrientationDataT         double dVall   double dVal2   double dVal3   double dRot1   double dRot2   double dRot 3              Used as parameters for  Set GetStationOrientationParams commands   Values are in current units and CS type  These  settings can be enabled disabled through the  system flag bUseStationOrientationParams           TransformationDataT  struct TransformationDataT      double dVall    double dVal2    double dVal3    double dRotl    double dRot2    double dRot 3    double dScale        i       Used as parameters for  Set GetTransformationParams commands  Values  are in current units and CS type  These settings  can be enabled disabled through the system flag  bUseLocalTransformationMode           BoxRegionDataT   struct BoxRegionDataT      double dP1Vall   double dP1Val2   double dP1Val3   double dP2Vall   double dP2Val2   double dP2Val3     hi       Used for parameters of Set GetBoxRegionParams  commands  The parameters describe two      
58.  rates  Always run compiled  versions  In special cases the incoming results  need to be buffered           268    Use of values instead of symbols  in Visual Basic   avoids the problem of typing incorrect enum  symbols  which cause errors difficult to detect     q A complete  tlh file is automatically  generated when importing LTControl tlb into a  VCH project     5 2 16 Scripting Language Support    Pure scripting languages VBS  Visual Basic  Script   JavaScript etc  are currently not supported  by the LTControl COM component     This would require  Dispatch interfaces rather  than custom interfaces  Combinations of  Dispatch  and custom interfaces  dual interfaces  have the  same disadvantage as  Dispatch     lack of  performance     5 2 17 Exception Handling for Non   Microsoft Clients   The emScon LTControl COM interface also  supports Windows application development with  Non  Microsoft Tools  such as Borland Delphi     For such applications  it may be necessary to set  the property   LTConnect  ExceptionHandlingPolicy    to 1   Before connecting to emScon server   Otherwise  exceptions may not be raised in the client  application    Do not set this property for Microsoft clients  VB   C    C   Excel     that is  leave its default value 0     For further information  see commented code in  Sample 20  LtcDelphiClient   where this property  is set to 1     Example  Delphi            LtcConnect  Set_ExceptionHandlingPolicy  1            269       5 3 COM TPI Samples    5 3
59.  reflector name   string  and reflector ID  numerical   Each packet   in addition  a redundancy   contains the total  number of reflectors  i e  the total number of  packets to be expected  only for programmer s  convenience   Other properties are the targetType  and the surfaceOffset  Surface offset is in current  length units     T The reflector name is in Unicode format    short _cReflectorName 32  declaration  It can  consist of a maximum of 32 characters     q Each tracker  compensation has its own set  of reflector  definitions  However  the mapping  between reflector name and ID remains the same  throughout all available tracker compensations     Example  A T Cam is mounted on the tracker   hence  the active tracker compensation is one that       169       was performed with a mounted camera  Assume  this tracker   compensation has definitions for  three valid reflectors as follows     Name ID  CCR 75mm  7  CCR 1 5in 2  TBR O 5in 5    Now  the T Cam is removed  and hence another  tracker  compensation becomes active  one that  was performed without a mounted T Cam   Let s  assume that this compensation has only two  reflector definitions  CCR 1 5in and TBR 0 5in   Conveniently  the mapping between name and  ID remained the same as it was in the previous    compensation   Name ID  CCR 1 5in 2  TBR O 5in 5    If reflector ID 7 was the active one at the time the  camera was removed  you will now get a    wrong  current reflector    error message on executing  reflector  d
60.  reflector search parameter values     E  See struct  AdmParamsDataT  for details              171    Set GetEnvironmentParamsCT RT          struct SetEnvironmentParamsCT      struct BasicCommandCT packetInfo   struct EnvironmentDataT environmentData           struct SetEnvironmentParamsRT      struct BasicCommandRT packetInfo   di    struct GetEnvironmentParamsCT      struct BasicCommandCT packetInfo   he    struct GetEnvironmentParamsRT      struct BasicCommandRT packetInfo   struct EnvironmentDataT environmentData     hi       Command structures for setting getting the  environmental parameter values     q Environmental values are updated  automatically at regular intervals  if the weather  monitor is on  connected and the  WeatherMonitorStatus  of SystemSettings  is one  of ES_WMS_ReadOnly or  ES_WMS_ReadAndCalculateRefractions     E  See struct  EnvironmentDataT  for details     Set GetStationOrientationParamsCT RT          struct SetStationOrientationParamsCT     struct BasicCommandCT packetInfo   struct StationOrientationDataT stationOrientation      i    struct SetStationOrientationParamsRT         struct BasicCommandRT packetInfo   he    struct GetStationOrientationParamsCT      struct BasicCommandCT packetInfo   hi    struct GetStationOrientationParamsRT      struct BasicCommandRT packetInfo    struct StationOrientationDataT stationOrientation   hi       Command structures for setting getting the  station orientation parameters  These settings act      like current 
61.  same  address port  This lets the client application   instead of the Reflector ocx  handle any  connecting problems     e The client application must ignore answers  from commands triggered by the Reflector ocx   Get Reflectors  GetReflector and SetReflector      e Do not implement an Error Event handler for  Reflector ocx  The control has a built  in  handler  Visual Basic does not allow it  it  causes a compiler error  If correctly applied   the component should never fire an error  event     e Here is a code sequence for a VB application   Typically executed in Form Load           Reflectorl ServerAddress    192 168 0 1   Reflectorl PortNumber   700  Reflectorl Initialize       e Itis assumed that the client application has  already successfully connected to the same  address port before these calls     Keyboard Interface Limitation    e This component is primarily designed for  mouse control and does not work properly  with a keyboard interface  E g  use of arrow  keys in VB      See VC VBA VB documentation for general  information on ActiveX controls  and how to  include them in applications        240       Further details see  Readme txt  file in Sample 12  folder and code  comments in source files     Sample 19  LiveVideo display C   application     See Chapter 8   Special Functions   Live Image  display for details        241       5 COM  interface    5 1 High level TPI Programming    The emScon high level interface  COM interface   is convenient for creating quick
62.  size of basic data types  byte  alignment issues etc       Using the C   interface is highly  recommended instead of the C interface  The  C   interface defines Class wrappers around  the basic data structures  of the C interface    easing programming for sending commands  and receiving answers     2 3 2 Prefixes and Suffixes used in Type    Names  Prefixes  ES Tracker programming  interface  DT Data type  Packet type   C Command  RS Result Status  SSC System Status Change  Suffixes  T Type  usually used for    general sub structures       12    RT Return type  used for  data transfer from ES    CT Command type  used for  data transfer to ES     These are only the most frequent ones  Other  Prefixes explain themselves as they are derived  from the enum type  names in which definition  they occur     2 3 3 Asynchronous Communication    Low level communication  C C    to the Tracker  Server is asynchronous     e SendData function will always return  immediately without waiting for an answer   Depending on the command  several seconds  may expire before the answer arrives   through a notification or callback      e Each TPI command causes an asynchronous  answer  sort of an acknowledgment   Hence   Commands and Answers always occur    pair   wise     Some commands  however  cause  more than one result packet     e Some Error Event types  for example  beam  broken     can occur at any time and are not  direct reactions to a command     e There are numerous  System Change Events 
63.  the class  provides virtual functions for every type of  answer  So the user can just override those virtual  functions he is interested in     Step 4 also covers the topic of  asynchronous   communication  All C   TPI communication is  asynchronous  That means a new command must  not be sent before the acknowledge or result of  the previous command has arrived  In addition   the application should always be ready to catch  events  system status change  error events     Correct reflector handling is also demonstrated   relation between reflector ID and reflector name  and how to handle this in a dropdown combo box   do not mix up the combo index with reflector  ID   Initializing the reflector combo happens in  several steps  GetReflectors  fill them into the box   then GetReflector   to get the current one and  select it in the box     Asynchronous techniques are heavily touched  with the reflectors handling  filling them into  combo box  select the current reflector        Further details see  Readme txt  file in Sample 4  folder and code  comments in source files     4 4 2 Sample 9    This Sample  EmsyCPPApiConsoleClient  with a  CESAPIReceive class demonstrates Sending and  Receiving features of the C   TPI  among other  features   Like Sample 3  Sample 9 is a simple       238    console application  However  in contrast to   Sample3  it is based on the C   TPI  In addition  it  has a more sophisticated data receiver function in  order to handle traffic jams and or scatte
64.  this context    There is a difference to the C   interface  concerning continuous measurements  If a  continuous packet arrives  it contains only the  measurement header info  but not the elementary  measurements itself  like in C   in a variable  sized array   The application must rather use the  CESCSAPIReceive   lt MeasType gt MeasValueGetA     function to access the measurements    See code in sample 17  file   EmsyCSApiConsoleClient cs    for example in  function  OnMultiMeasurementAnswer    for  details        290    As already known from C   samples  sample 17  requires a separate Receiver Thread since it is a  Console application  In Windows applications   the Window Message Loop can be used instead   Hence windows application do not require to be  designed as multi threaded applications  See  related C   Windows emScon applications     Make sure the  ES_MCPP_API_Wrapper dll  is  added as reference to the project and that the  reference path points to the correct location    Sample 17 expects the DLL being in the  applications runtime directory  However  this  may be changed of course      Sample 17 in not sophisticated in terms of error   exception handling and command  synchronization  Remember that emScon  commands are asynchronous and it is the  applications responsibility not to send a new  command to the server before the previous one  has completed     Answer  handlers  virtual overrides  for all types  of answers are implemented    Also calls for all emScon c
65.  to  its related Standard Deviation     See command  SetTransformationInputParams   for details        47    Other Constants    The other constants defined in  Constant h   Unit   Conversion related constants  are for  informational reasons only and should not be  directly referenced by emScon applications     3 3 2 Enumeration Types    This section describes all enumeration types and  their individual values     ES DataType    The ES_DataType enumeration values are used to  identify the type of data packets that are sent  to received from the Tracker Server on TCP IP   There are 11 different packet types that differ in  size and structure     q The ES_DT_Command comprises many sub   types that all differ in size and structure as well   A related data type is PacketHeaderT  which  serves as a sub structure in all packets           enum ES_DataType    ES_DT_Command   ES_DT_Error   ES_DT_SingleMeasResult   ES_DT_MultiMeasResult   ES_DT_StationaryProbeMeasResult   ES_DT_ContinuousProbeMeasResult   ES_DT_NivelResult   ES_DT_ReflectorPosResult   ES_DT_SystemStatusChange   ES_DT_SingleMeasResult2   ES_DT_MultiMeasResult2     ES_DT_ProbePosResult        e ES DT_Command  The data packet contains a command  sent    or a command answer  received    Related data structures  BasicCommandCT  and BasicCommandRT  which are used as  sub structures of each command related  structure      e ES DT Error  The data packet contains error information        48       Such a packet means an  Error ev
66.  user interface programmer    e The reflector name is a string value  in  Unicode   which is see on the user interface of  the application software     e This reflector name is an alias for the reflector  ID and cannot be resolved by the system     e The system can  internally  only deal with  reflector IDs  which are integer numbers     e The commands take return a reflector ID as a  parameter        297       It is crucial to provide the correct reflector ID to  SetReflector    Passing the ID of an unintended  but existing   reflector will cause wrong measurement  results     Programmers often fill all reflector names in a  list box  When the user selects one of the  reflectors shown in the list box  a SetReflector  command is carried out    Hence the need for a    lookup table        List index    It is not correct to use the index of the list box  as a reflector ID  This is because the reflector  IDs are arbitrary in sequence and may contain  gaps    The programmer must not assume that the  reflector IDs are a sequence of 1    n without  any gaps  Although most systems may deliver  reflectors with sequential reflector IDs starting  from 0 with no gaps   This may not be presumed  Every system  behaves differently     GetReflectors may deliver for example 3  reflectors with the following Names and IDs     Name ID  CCR 75mm   CCR 1 5in 2  TBR 0 5in 5    Lookup Table    The list box indices will range from 0 to 2  when    the three names are entered in a control list box     
67.  valid environment   parameters    Related structure  EnvironmentDataT   See enum  ES_WeatherMonitorStatus  for   details on explicit and implicit updates of   environmental parameters     ES_C _ SetRefractionParams  Set explicit Refraction Indices for       59    Interferometer and ADM  This is an  advanced command and should only be  used in real special situations  That is  if one  wants to use his own formula for calculating  the refractions from the environment  parameters  SetRefractionParams will  override those refraction parameters  indirectly calculated and implicitly set by a  previous call to SetEnvironmentParams   Note SetEnvironmentParams and  SetRefractionParams are  concurrent   commands  Both update the refraction  parameters    Refraction indices are dimension less    For valid parameter ranges refer to chapter   Working Conditions    in the    Introduction     main chapter of this manual    Trying to set values outside the valid ranges  will result in command failure    A change of the environment parameters  automatically causes an internal  implicit  refraction parameter setting     ES_C_ GetRefractionParams  Query the currently valid Refraction  Parameters for Interferometer and ADM     ES_C SetMeasurementMode   Sets the measurement mode of the tracker   Depending on this mode  a subsequent  Start  measurement    command will result in a     Stationary measurement      single point  measurement   a  Continuous measurement     etc    See enum  ES MeasMode
68. 0 ms for timeout     AdmParamsDataT       struct AdmParamsDataT      double dTargetStabilityTolerance   double 1RetryTimeFrame   double lNumberOfRetrys    hi       Used for parameters for the Set GetAdmParams  commands  RetryTimeFrame is in milliseconds in  the range between 500 and 5000    TargetStability Tolerance is a distance parameter  and is in current length  units   TargetStabilityTolerance must lie between 0 005  and 0 1 Millimeter  Leave this value as low as  possible   Default is 0 005     The SetAdmParams command should be used  with caution  Only change these parameters if  working in an unstable environment  vibrations    Lowering the stability tolerance results in loss of  precision     SystemSettingsDataT          struct SystemSettingsDataT     enum ES_WeatherMonitorStatus weatherMonitor   ES_BOOL bApplyTransformationParams   ES_BOOL  bApplyStationOrientationParams   ES_BOOL bKeepLastPosition   ES_BOOL bSendUnsolicitedMessages   ES_BOOL bSendReflectorPositionData   ES_BOOL bTryMeasurementMode   ES_BOOL bHasNivel   ES_BOOL bHasVideoCamera   hi          Used for parameters of Set Get SystemSettings  commands  The system settings are a collection of  various    properties    to control certain behavior of  the emScon system      e  WeatherMonitorStatus  Indicates the WM status  See description on  enum ES_WeatherMonitorStatus    e    bApplyTransformationParams  If this flag is set to false  the System does not       142       transform the measurements into a use
69. 5       8 Selected  Commands in  Detail    8 1 Special Functions    Some of the more complex  commands procedures  which have been referred  to in this manual are described in detail  with  some background information     8 1 1 Get Reflectors Command    The GetReflectors command is often  misinterpreted  GetReflectors is used to  ask  the  Tracker Server  which reflectors are currently  defined  and to get the relation between reflector  names and reflector Ids     Related Commands     SetReflector     GetReflector       296    Comments    GetReflectors causes as many GetReflectorsRT data  packets to arrive  as reflectors are defined in the  tracker database  Each one of these packets  contains the following information           struct GetReflectorsRT       struct BasicCommandRT packetInfo    int iTotalReflectors    int iInternalReflectorId    enum ES_TargetType targetType    double dSurfaceOffset    short cReflectorName 32      Unicode        of Reflector data packets of the following       iTotalReflectors    iTotalReflectors is just for programmers     convenience     e Names the number of reflectors known to  the system and has the same value in every  packet     e Provides information  on arrival of the first  packet  as to how many packets are still  outstanding     e Counts the incoming packets to know when  the last one has arrived     linternalReflectorld   cReflectorName    The commands iInternalReflectorId and  cReflectorName provide important information for  the
70. CT      struct BasicCommandCT packetInfo         struct GetCoordinateSystemTypeRT     struct BasicCommandRT packetInfo   enum ES_CoordinateSystemType coordSystType   hi       Fix See enum  ES_CoordinateSystemType  for  details     Set GetMeasurementModeCT RT    Command structures for setting getting the  current measurement mode           struct SetMeasurementModeCT     struct BasicCommandCT packetInfo   enum ES_MeasMode measMode         struct SetMeasurementModeRT       struct BasicCommandRT packetInfo         struct GetMeasurementModeCT      struct BasicCommandCT packetInfo   hi    struct GetMeasurementModeRT     struct BasicCommandRT packetInfo   enum ES_MeasMode measMode   he       Fe See enum  ES_MeasMode  for details     Set GetTemperatureRangeCT RT    Command structures for setting getting the active  laser tracker temperature range  A value different  than  ES_TR_Medium   default  should be    selected only if special environmental conditions  apply        162                struct SetTemperatureRangeCT     struct BasicCommandCT packetInfo   enum ES_TrackerTemperatureRange temperatureRange   he    struct SetTemperatureRangeRT      struct BasicCommandRT packetInfo         struct GetTemperatureRangeCT      struct BasicCommandCT packetInfo         struct GetTemperatureRangeRT      struct BasicCommandRT packetInfo    enum ES_TrackerTemperatureRange temperatureRange   hi       Fix See enum  ES_TrackerTemperatureRange  for  details     Set GetStationaryModeParamsCT RT    Co
71. CT Negative  The negative clock transition triggers the  event    e ES CT Positive  The positive clock transition triggers the  event    Note  Trigger functionality is not yet available  with emScon 2 1 x releases and may be subject to  change     ES_TriggerMode    Specifies the trigger mode  This enumeration type  is used as a parameter for the  Get SetExternTriggerParams command   ExternTriggerParamsT sub structure        enum ES_TriggerMode      ES_TM_EventTrigger   ES_TM_ContinuousExternalClockWithStartStop   ES_TM_InternalClockWithExternalStartStop    hi          e ES_TM_EventTrigger  The measurement is triggered by an event  trigger  button  touch  trigger     e ES TM ContinuousExternalClockWithStart  Stop  The measurement  start stop  is triggered  by an external clock     e ES _ TM _InternalClockWithExternalStartSto  p  The measurement is triggered by the  internal clock  with external start stop     Note  Trigger functionality is not yet available  with emScon 2 1 x releases and may be subject to  change        127    ES_TriggerStartSignal    Specifies the level of the trigger start signal  This  enumeration type is used as a parameter for the  Get SetExternTriggerParams command   ExternTriggerParamsT sub structure           enum ES_TriggerStartSignal       ES_TSS_Low   ES_TSS_High   i       e ES TSS Low  The trigger start signal is of low level     e ES_TSS_High  The trigger start signal is of high level     Note  Trigger functionality is not yet available  with emS
72. CompensationRT            struct BasicCommandRT packet Info    int iInternalCompensationId   hi  SetCompensationCT RT    Command to activate one of the intermediate  tracker compensations delivered by  GetCompensations by its ID           struct SetCompensationcCT     struct BasicCommandCT packetInfo   int iInternalCompensationId   hi    struct SetCompensationRT      struct BasicCommandRT packetInfo   hi       GetCompensationsCT RT    Command structures to read all Tracker  Compensations stored in the database   Particularly  the relation between ID and  compensation name is given  As many packets as  compensations exist are delivered  similar to the  GetReflectors command        188                   struct GetCompensationsCT       struct BasicCommandCT packetInfo   hi    struct GetCompensationsRT         struct BasicCommandRT packetInfo    int iTotalCompensations    int iInternalCompensationId   unsigned short cTrackerCompensationName  32    unsigned short cTrackerCompensationComment  128   unsigned short cADMCompensationName  32    ES_BOOL bHasMeasurementCameraMounted        GetCompensations2CT RT    Enhanced version of GetCompensationsCT RT  with some additional information   GetCompensationsCT RT has been left only for  backward compatibility  Newer applications  should use GetCompensations2CT RT           struct GetCompensations2CT      struct BasicCommandCT packetInfo   di    struct GetCompensations2RT            struct BasicCommandRT packetInfo   int iTotalCompensatio
73. ES_C_FindReflector   break     case ES_C_GetUnits      GetUnitsRT  pData3    GetUnitsRT   byteArr        Diagnostics   check whether packet size     as expected  in debug mode only   ASSERT  pData3     gt packetInfo   packetHeader 1PacketSize     sizeof  GetUnitsRT           now you can access Unit specific data   pData3  gt unitsSettings lenUnitType   pData3  gt unitsSettings tempUnitType     break             case XXX      Todo  add other command type evaluations  Lf  break     default   break           break     case ES_DT_SingleMeasResult     single meas result          type answer has arrived  SingleMeasResultT  pData4     SingleMeasResultT   byteArr     if  pData4  gt packetInfo status    ES_RS_A110K   return false     break        Todo  add further  case  statements     for remaining packet types       e Declaring variables within case statements   which are suitable for masking data  require  curly brackets around a particular case  block  Otherwise the compiler will claim     e If then else can be used instead of switch  statements  However  switches are more  efficient     e Frequent items should be treated at the top  of a switch statement  for example multi   measurement results  not covered above         211       3 6 C Language TPI   Samples    Some older Samples distributed with former  emScon versions have been dropped because  they have  expired   For Example Samples 1 and  Sample 2 do no longer exist for the emScon V2 0  SDK  Nevertheless  the samples still 
74. Existing client applications  will not be broken in combination with future  emScon server versions  with one important  caveat     Backward compatibility will be provided  in that  existing packets information structure are neither  changed nor removed  In practice  this generally  means that the default case in switch statements  should always be treated as  neutral   no action      Example     The enum ES_SystemStatusChange in v1 2  contains only two members           enum ES_SystemStatusChange     ES_SSC_DistanceSet   ES_SSC_LaserWarmedUp   hi       EmScon 1 2 had only two system status change  events  as shown above  With emScon version 1 4   and higher   many more status change events  have been appended  See C  API def file         18       A  v1 2  programming statement as follows  would cause an  Unexpected Status    message   with  v1 3 and higher  emScon server upgrades           switch  status      case ES_SSC_DistanceSet   MessageBox     ADM Distance  re established       break     case ES_SSC_LaserWarmedUp   MessageBox     Laser is now  ready       break     default   MessageBox     Unexpected Status       break     WRONG     hi       Solution     Ignore the default case with no  default  entry tag  or one that just has an effect to debug versions           default     No action at all  break     or    default     no effect to retail versions  TRACE     Unexpected Status       ASSERT  false    break        In short  emScon client application only must  interpret
75. FC CAsyncSocket    Using WinSock2 API or MFC CAsyncSocket   to read directly from the socket  must consider  the implications of large file data     Since the file data is relatively big   70 KB   it  is very unlikely that it will arrive as one single  data block over TCP IP     Provisions must be made to repeat reading  data until the data packet is complete     A technique to achieve this is shown in the  OnMessageReceived code sample   See chapter  Sample9  and chapter  Queued  and Scattered Data        COM TPI within C C      When using the COM TPI  within a C C    application   the results of the LTControl s       302       GetStilllmage  synchronous  function can be  assumed to be complete  See related code extract  below  When receiving Stilllmage data  asynchronously  Event Handler   MessageHandler   the difference is that the data  will not be provided directly through a  parameter  So  LTConnect  GetData   must be used  first     Note the Variant  type parameter of the fileData     GetStilllmage     Synchronous          void CCPPClientDlg   OnButtonStillImage       HRESULT hr   0   long 1FileSize     VARIANT vt   VariantInit   amp vt      try     if   hr   m_pLTCommandSync  gt GetStillimage  ES_SI_Bitmap    amp lFileSize   amp vt      S_OK      ASSERT  vt  parray     gt rgsabound 0  cElements      unsigned long  1FileSize      FILE  pFile   NULL        write file to current runtime location  if   pFile   fopen  image bmp    wb       NULL       long 1lWritten   fwrit
76. GridModeParams commands  The 3 values  describe the grid size in the CS  Position values  are in current units   CS type  A  NumberOfPoints  value of zero means    infinite     must be stopped  explicitly     A region can be applied to limit the  sensitive   measurement space  See commands  SetBox     SetSphereRegionParams  for region definition     SearchParamsDataT       struct SearchParamsDataT      double dSearchRadius   double 1TimeOut    hi       Used for parameters of Set GetSearchParams  commands    The search process is aborted upon one or the  other of the two criterias is reached    TimeOut is in milliseconds  There is a minimum  value of 10   000 ms  10 Seconds     Note  this minimum value was 2500 ms in  previous emScon versions and has been increased  to 10000 for EmScon from Version 2 0   SearchRadius is in current units  The timeout  parameter will interrupt the search if it takes too  long due to a too big search radius  if no reflector  found within the specified time   The Search  Radius in current length units and must lie  between 0 and 0 5 meters   Caution with small or  even zero radius and   or small timeOut  Too  small value may cause the search process to fail   Note  the maximum radius value was 1 0 m in  previous emScon versions and has been reduced  to 0 5 m for emScon Version    Large search radii result in extended search          141    times  unless time is limited to a reasonable  value    Typical values are 0 05 m for the radius and  30   00
77. In an event handler  the following  code might be typical  example ErrorEvent in  VBA         Private Sub CommandSync_ErrorEvent  ByVal command As Long  _  ByVal status As Long   If  command   ES_C_Initialize  Then    do something  End If    If  status   ES_RS_NoTPFound  Then    do something   End If   End Sub       Use extreme caution while typing the symbols  with VBA 97  No  IntelliSense    support is  available     Summary  There is no problem with enums and VBA9Q7  It is    just a potential error source due to missing type  checking     Structs  unless locally defined  are not supported  in VBA97  LTControl always offers an alternative  to those functions returning struct parameters     None of the event functions has struct parameters   technical restriction   and have  therefore  no  restriction with VBA97     5 2 15 Continuous measurements and VBA    Events of continuous measurements do not  directly pass the data     Fk See chapter  Handling Data Arrival      Continuous Measurements   for details     Handling continuous measurements within VBA  requires care  Events can be  subscribed  with the       266       WithEvent keyword and pending data can be read  with GetData    as shown in     Fk See chapter  Reading Data Blocks with Visual  Basic  for details     Masking Data    The unavailability of  LTControl  structures  prevents masking the data  With the byte layout  of the data blocks the appropriate bytes can be  extracted  manually  and assigned to basic data  ty
78. K     true when message handled       OnMessageReceived          This code ensures that only complete packets are  processed  However  the client may still not be  fast enough to process all the incoming data  The  TCP IP framework will buffer data  up to a limit   If such limits are reached  arbitrary data may  arrive  The above function has  limited  recovery  ability in case this should happen  Data will be  lost in such situations     Cause of Data Loss    e The network is not fast enough     e The client PC is not powerful enough        230       e The application is not able to process data  fast enough     e The application is not designed  appropriately        The client application can still buffer  incoming data  for example  in a FIFO list   taking the data packets as list elements    This approach can be chosen if the  performance constraint is caused by  intensive data processing  The Winsock API  offers certain    tuning    functions  These  allow  for example  to alter internal network  buffers  Increasing the receive  buffer with  setsockopt    for example  may increase data  throughput significantly            define SOCKET_READ_BUFFER_SIZE  256   1024     256 KB buffer    int nBufSize   SOCKET_READ_BUFFER_SIZE   int nVarSize   sizeof nBufSize      it s 4 byte  but sizeof is  better style     nRet   setsockopt  m_sock  SOL_SOCKET  SO_RCVBUF    char    amp nBufSize  nVarSize    ASSERT  nRet    SOCKET_ERROR          See documentation on setsockopt   for further
79. K   32   _MSTI_CameraToTrackerParamsFound   64     _MSTI_MeasurementProbeFound   128   _MSTI_ProbeParamsFound   256   _MSTI_MeasurementTipFound   512     SI_TipParamsFound   1024   SI_ReflectorFound   2048   SI_InFacel   4096           132       3 4 Data Structures    This section describes all data structures defined  in ES_C_API_Def h  The data structures describe  the  layout  of the data packets  byte arrays  to be  transmitted over the TCP IP network  The  structures are required to construct and send data  packets  to mask incoming data packets in order  to recognize their type and to interpret their  contents     q Note the 4 Byte alignment prerequisite for  the Tracker Server and the client  See  pragma  pack  push  4  in file ES_C_API_Def h  The     pragma pack  is a Microsoft specific C language  extension  A 4 Byte alignment may be different  for other C C   compilers  No change of layout      of bytes and alignment for each member  is  permitted  during translation of these structures  to other languages     There is a short general description for each type   All members are not described in detail  Data  members are often self  explanatory  while  enumeration type members have been described  under Enumeration Types  Struct variable  descriptions are provided only where necessary     q Parameters are always in current units and  coordinate system   CS type  where applicable       unless specified otherwise     3 4 1 Basic Data Structures    This section describe
80. Measurement  BUI    The BUI requires a Master  application the BUI is  hosted by  It mainly acts as a    Display     component of such a host application  There is  also a Toolbar to control the most common  Tracker actions  However  there is  other than in  the stand alone WEB applications  no way to  perform settings such as    Units     CS  Type  Filters  etc  These have to be performed by the Master  application the BUI is hosted by     7 1 2 EmScon Basic User Interface  BUI     The emScon Base User Interface  emScon BUI   provides a graphical interface to emScon s most       293    common functions  Access to it is provided  through the Microsoft Internet Explorer     The BUI includes     e A Toolbar for common sensor control such as  sensor moving or triggering measurements     e A window for result display  DRO      e Web pages providing access to selected sensor  and system settings     7 1 3 Integration of BUI into applications    The BUI can be used as standalone application for  testing reasons  However  there is no real  practical use for the BUI as a standalone  application    The BUI  however  allows to be integrated to  client applications  This approach is  demonstrated in Sample 13     The BUI provides a graphical interface to  emScon  However  general system settings  such  as Units  CS type etc  are not provided by the  BUI  An application hosting the BUI will have to  do emScon settings control through the ordinary  TPI interface  Also retrieving measureme
81. ReadingModuleDb   ES_RS_ErrorWritingModuleDb   ES_RS_NotInCameraPosition   ES_RS_TPHasServiceFirmware   ES_RS_TPExternalControl   ES_RS_WrongParameter8   ES_RS_WrongParameter9   ES_RS_WrongParameter10   ES_RS_WrongParameterll   ES_RS_WrongParameter12   ES_RS_WrongParameter13   ES_RS_WrongParameterl14   ES_RS_WrongParameter15   ES_RS_WrongParameterl16   ES_RS_NoSuchCompensation    ES_RS_MeteoDataOutOfRange   ES_RS_InCompensationMode   ES_RS_InternalProcessActive   ES_RS_NoCopyProtectionDongleFound   ES_RS_ModuleNotActivated   ES_RS_ModuleWrongVersion   ES_RS_DemoDongleExpired   ES_RS_ParameterImportFromProbeFailed   ES_RS_ParameterExportToProbeFailed   ES_RS_NotTrkCompWithMeasCamera   ES_RS_NoMeasurementCamera   ES_RS_NoActiveMeasurementCamera   ES_RS_NoMeasurementCamerasInDb   ES_RS_NoCameraToTrackerCompSet   ES_RS_NoCameraToTrackerCompInDb   ES_RS_ProblemStoringCameraToTrackerFactorySet   ES_RS_ProblemWithCameraInternalCalibration   ES_RS_CommunicationWithMeasurementCameraFailed   ES_RS_NoMeasurementProbe   ES_RS_NoActiveMeasurementProbe   ES_RS_NoMeasurementProbesInDb   ES_RS_NoMeasurementProbeCompSet   ES_RS_NoMeasurementProbeCompInDb   ES_RS_ProblemStoringProbeFactorySet    r   o   o   o   o             ES_RS_WrongActiveMeasurementProbeCompInDb    ES_RS_CommunicationWithMeasurementProbeFailed   ES_RS_   ES_RS_   ES_RS_     easurementTip   ActiveMeasurementTip   easurementTipsInDb                       82             ES_RS_6DModeNotAllowed     ES_RS    ES_RS_NoMeasurementT
82. SSC_SystemSettingsChanged   ES_SSC_TemperatureRangeChanged   ES_SSC_CameraParamsChanged   ES_SSC_CompensationChanged   ES_SSC_CoordinateSystemTypeChanged   ES_SSC_BoxRegionParamsChanged   ES_SSC_SphereRegionParamsChanged   ES_SSC_StationOrientationParamsChanged   ES_SSC_TransformationParamsChanged   ES_SSC_MeasurementModeChanged   ES_SSC_StationaryModeParamsChanged   ES_SSC_ContinuousTimeModeParamsChanged   ES_SSC_ContinuousDistanceModeParamsChanged   ES_SSC_GridModeParamsChanged   ES_SSC_CircleCenterModeParamsChanged   ES_SSC_SphereCenterModeParamsChanged   ES_SSC_StatisticModeChanged   ES_SSC_MeasStatus_NotReady   ES_SSC_MeasStatus_Busy   ES_SSC_MeasStatus_Ready   ES_SSC_MeasurementCountReached   ES_SSC_TriggerSourceChanged   ES_SSC_IsFacel    ES_SSC_IsFace2   ES_SSC_ExternalControlActive   ES_SSC_ServiceSoftwareActive   ES_SSC_MeasurementCameraChanged   ES_SSC_MeasurementCameraModeChanged   ES_SSC_ProbeChanged    ES_SSC_TipChanged   ES_SSC_TCamToTrackerCompensationChanged   ES_SSC_ProbeCompensationChanged   ES_SSC_TipToProbeCompensat ionChanged   ES_SSC_ExternTriggerParamsChanged   ES_SSC_TCamToTrackerCompensationDeleted   ES_SSC_MeasurementProbeCompensationDeleted   ES_SSC_Measurement TipCompensationDeleted   ES_SSC_ManyMechanicalCompensationsInDB   ES_SSC_MeasStatus_6DstatusInvalid   ES_SSC_MeasurementProbeButtonDown   ES_SSC_MeasurementProbeButtonuUp   ES_SSC_ExternalTriggerEvent   ES_SSC_ExternalTriggerStartEvent   ES_SSC_ExternalTriggerStopEvent   ES_SSC_CopyProtectio
83. T   command types  client to Server  and the  BasicCommandRT  return types  Server to client         158          struct InitializeCcT         struct BasicCommandCT packetInfo   hi    struct InitializeRT         struct BasicCommandRT packetInfo   hi    struct ReleaseMotorsCT         struct BasicCommandCT packetInfo      i    struct ReleaseMotorsRT         struct BasicCommandRT packetInfo   hi    struct ActivateCameraViewCT         struct BasicCommandCT packetInfo   hi    struct ActivateCameraViewRT         struct BasicCommandRT packetInfo   he    struct ParkCT       struct BasicCommandCT packetInfo   hi    struct ParkRT       struct BasicCommandRT packetInfo   di    struct GoBirdBathCT       struct BasicCommandCT packetInfo      i    struct GoBirdBathRT       struct BasicCommandRT packetInfo   hi    struct GoLastMeasuredPointCT         struct BasicCommandCT packetInfo   di    struct GoLastMeasuredPointRT         struct BasicCommandRT packetInfo   de    struct ChangeFaceCT       struct BasicCommandCT packetInfo   hi    struct ChangeFaceRT       struct BasicCommandRT packetInfo   de    struct StartNivelMeasurementCT         struct BasicCommandCT packetInfo   he    struct StartNivelMeasurementRT         struct BasicCommandRT packetInfo      i    struct StartMeasurementCT         struct BasicCommandCT packetInfo   he    struct StartMeasurementRT         struct BasicCommandRT packetInfo           159                   struct StopMeasurementCT         struct BasicCommandCT packetIn
84. T packetInfo   int iInternalTCamToTrackerCompensationId         struct SetTCamToTrackerCompensationRT      struct BasicCommandRT packetInfo         struct GetTCamToTrackerCompensationCT      struct BasicCommandCT packetInfo         struct GetTCamToTrackerCompensationRT     struct BasicCommandRT packetInfo   int iInternalTCamToTrackerCompensationId   hi       GetProbeCompensationsCT RT    Command structure to get Probe Compensation  properties  The GetProbeCompensations  command retrieves all such compensations  defined in the Tracker Server  The answer  consists of as many answer packets as probes are  defined in the server database  These resolve the  relation between compensation name  string  and  compensation ID  numerical   Each packet  in       197          addition  a redundancy   contains the total  number of compensations  i e  the total number of  packets to be expected  only for programmer s  convenience   Other properties  such as tracker  Serial Number  comment  etc  serve as  information  mainly used for user interface  purpose  There is a flag blsActive which is true  for exactly one compensation           struct GetProbeCompensationsCT      struct BasicCommandCT packetInfo   di    struct GetProbeCompensationsRT         struct BasicCommandRT packetInfo    int iTotalCompensations    int iInternalProbeCompensationId   int iInternalProbeld    int iFieldNumber    ES_BOOL bIsActive    ES_BOOL bMarkedForExport    ES_BOOL bPreliminary    unsigned short cProbeCompensat
85. TCAM no Synchronization Signal    TCAM zoom out of Range  1 5   15m           TCAM marker identification error       10 1 8 Hardware Configuration Errors  user  correctable     845   An old SMART310 Sensor cable is in use  it isn   t compatible with the new LT  Controller and LT LTD500 Sensor     LTD600 700 800 sensor connected to a classic  LTD500  controller    TCAM not compatible with Tracker  LTD7 800 mixed with TCAM8 700     TCAM on tracker head not locked    Elevation index offset is not suitable for this measuring head           337    10 1 9 Hardware Error  requires service personnel     906   Elevation encoder is not working  _      S   SCSCSSSSSCCSCSCSCS   S    Calculation error while determining the SERVO CONTROL POINT   No collar reflector found for measuring the servo control point   or the beam intensity is  not strong enough to locate the collar reflector       Laser unable to stabilize  hardware error on the laser detected     Interferometer is not working properly   eg  at test into the collar reflector did not work     A D board  Analog input multiplexor error  A D board  A D converter is not working    A D board  Pacer clock too slow  switch is set wrong  D A board  both axes not working     A D board  Pacer trigger is not working    A D board  onboard clock is not working   D A board  Azimuth axis not working    A D board  DMA data transfer is not working      960  reserved S   reserved o      969   reserved    A D board  8 16 channel switch is set wrong  
86. TCP IP connection     Availability of TCP IP functions    There are several options as listed below  The  emScon application programmer has to decide  which one to use  This decision will mainly  depend on the programming language used and  the type of the application  Console Application   Windows Application with GUI  Server  Application running in background         e Operating system TCP IP API  e g  Winsock  2 0 API of Windows   This approach requires  some advanced programming knowledge    e Class Libraries  for example MFC  provide a  higher level abstraction of the winsock  functions  Easier to use     e ActiveX Controls   COM libraries  For  example Winsck ocx of Windows     e Third party TCP IP communication library  or component     e Self developed TCP IP library        10    2 3 Tracker Programming Interface    EmScon provides a TCP IP interface   Communicating with the emScon server hence  means sending and receiving byte array data   blocks over a network connection    The emScon TPI  low level interface  is a  collection of Data Types  namely Enumeration  Types and Data Structures  These data types fully  describe the structure of the data blocks to be  exchanged over the TCP IP network  They are  required to  construct  blocks to be sent to the  Tracker Server and can be used to mask incoming  data blocks in order to interpret these  The  definition of these data types is provided with C   notation include file  ES_C_API_Def h  This file is  compatible to the
87. TT_ Unknown  The target type is unknown     ES_TT_CornerCube  The target is a corner cube reflector     ES_TT_CatsEye  The target is a cats eye reflector     ES_TT_GlassPrism  The target is a glass prism reflector     ES_TT_RFIPrism    The target is an RFI  Reflector for fixed  installations  reflector     ES_TrackerTemperatureRange    The ambient temperature range for the laser    tracker        102             enum ES_TrackerTemperatureRange         ES_TR_Low   ES_TR_Medium   ES_TR_High       ES_TR_Low   Ambient temperatures between 5 and 20   C   ES_TR Medium   Ambient temperatures between 10 and 30   C   ES_TR_High   Ambient temperatures between 20 and 40   C     ES _CoordinateSystemType    Coordinate system types supported by the TPI           enum ES_CoordinateSystemType         ES_CS  ES_CS  ES_CS    ES_CS_RHR   ES_CS_  ES_CS_  ES_CS_  ES_CS_CCW     LHRX   LHRY   LHRZ     CCC   SCW   SCC       ES_CS_RHR   Right Handed Rectangular  default type   ES_CS_LHRX   Left Handed Rectangular  Set by changing  the sign of the X axis     ES_CS_LHRY  Left Handed Rectangular  Set by changing  the sign of the Y axis     ES_CS_LHRZ   Left Handed Rectangular  Set by changing  the sign of the Z axis    ES_CS_CCW   Cylindrical Clockwise system   ES_CS_CCC   Cylindrical Counter Clockwise system   ES_CS_SCW   Spherical Clockwise system        103          e ES_CS_SCC  Spherical Counter Clockwise system     ES _LengthUnit    Length units supported by the TPI  This  enumeration type is used 
88. They must be  selected in the reflectors list box     q The GetReflectors button is only required in     emergency    cases  If the client starts before the  Tracker Server is ready and the client dialog  shows up  but is not able to read the reflectors  yet    e The application is based on LTC_NM_Event  notification selection  By changing the  parameter of SelectNotificationMethod in  CCPPClientDlg  OnInitDialog    all variants are  prepared   a different notification method can  be activated  However  there is only an  incomplete implementation of ProcessData   for  these alternate methods  reflector processing   for example  is not yet complete      e Only the LTC_NM_Event notification method is  fully implemented in this sample  However   data transfer also works with message  methods  One or the other methods can be  activated by enabling the commented source  code     q Only the last call of SelectNotificationMethod  is effective  there should be only one call to this  function      Fix See chapter    Handling Data Arrival      Continuous Measurements    for details on  obtaining data in general and continuous  measurements in particular        280    Handling Data Arrival     Continuous Measurements    Continuous measurement streams are always  handled asynchronous  That is  even if only a  LTCommandSync is implemented  through which  the Start Measurement command may be  invoked   the continuous measurement packets  will arrive asynchronously     A continuous measurem
89. Value2T      enum ES_MeasurementStatus status   long 1Timel   long 1Time2   double dVall   double dVal2   double dVal3   double dAprioriStdDevl   double dAprioriStdDev2   double dAprioriStdDev3   double dAprioriStdDevTotal   double dAprioriCovar1l2   double dAprioriCovar13   double dAprioriCovar23     hi       This struct describes a single measurement of a  continuous 3D measurement stream in case the  statistical mode is set to    extended     Principally  the same as MeasValueT  but with statistic  information in addition  Position values and  statistic parameters are in current units   CS type  and according to applied orientation    transformation parameters     See command  SetStatisticMode    and description  of struct  MeasValueT    above  for details        136       ProbeMeasValueT          struct ProbeMeasValueT         enum ES_MeasurementStatus status    enum ES_TriggerStatus triggerStatus    long 1RotationStatus    long 1Timel    long 1Time2    double dPositionl    double dPosition2    double dPosition3    double dStdDevPositionl   double dStdDevPosition2   double dStdDevPosition3   double dStdDevPositionTotal   double dCovarPositionl2   double dCovarPositionl13   double dCovarPosition23   double dQuaternion0o    double dQuaternionl    double dQuaternion2    double dQuaternion3    double dRotationAnglex   double dRotationAngleyY   double dRotationAnglez   double dStdDevRotationAnglex   double dStdDevRotationAngleY   double dStdDevRotationAngleZ   double dStdDevRo
90. Visual Basic application  we  provided the keyword WithEvents upon the  declaration           Dim WithEvents ObjAsync As LTCommandAsync       When no requirements for catching events exists   omit the WithEvents keywords in order to save  overhead     q Not only the asynchronous interface     where  absolutely crucial     has an Event interface  Also  the synchronous interface has an Event interface   _ILTCommandSyncEvents  It is required for  receiving continuous measurements and other   multi  answer  results  such as results to a   GetReflectors  call   as well as for error messages   such as beam broken events   which cannot be  handled synchronous by their nature     q Events are one of the notification methods of  the LT Control  When alternatively using  Windows messages for asynchronous  notifications the keyword WithEvents becomes  obsolete  Windows messages  instead of Events   may be more appropriate for VC  clients and  will be discussed later  For VisualBasic  Events  are always the right choice     e The application must declare what notification  mechanism to use  We did this with the  statement shown below  Without calling this  function in the initialization part of the  application  no notification mechanism will be  activated     Pk See remarks on continuous measurement    in chapter  Handling Data Arrival     Continuous  Measurements           275             electrification s LTC_NM_Event  0  0       e As soon as the WithEvents keyword is declared   the O
91. _GetStatisticMode   ES_C_GetStillImage   ES_C_SetCameraParams   ES_C_GetCameraParams   ES_C_GetCameraParams   ES_C_GetCompensation           54             ES_C_GetCompensations   ES_C_CheckBirdBath   ES_C_GetTrackerDiagnostics   ES_C_GetADMInfo    ES_C_GetTPInfo   ES_C_GetNivellInfo   ES_C_SetLaserOnTimer   ES_C_GetLaserOnTimer   ES_C_ConvertDisplayCoordinates   ES_C_GoBirdBath2   ES_C_SetTriggerSource   ES_C_GetTriggerSource   ES_C_GetFace    ES_C_GetCameras    ES_C_GetCamera   ES_C_SetMeasurementCameraMode   ES_C_GetMeasurementCameraMode    ES_C_GetProbes    ES_C_GetProbe   ES_C_GetTipAdapters   ES_C_GetTipAdapter    ES_C_Get TCamToTrackerCompensations   ES_C_Get TCamToTrackerCompensation   ES_C_SetTCamToTrackerCompensation   ES_C_GetProbeCompensations   ES_C_GetProbeCompensation   ES_C_SetProbeCompensation   ES_C_GetTipToProbeCompensations   ES_C_GetTipToProbeCompensation    ES_C_SetExternTriggerParams   ES_C_GetExternTriggerParams    ES_C_GetErrorEllipsoid   ES_C_GetMeasurementCameralInfo   ES_C_GetMeasurementProbeInfo   ES_C_SetLongSystemParameter   ES_C_GetLongSystemParameter   ES_C_GetMeasurementStatusInfo   ES_C_GetCompensations2   ES_C_GetCurrentPrismPosition        ES_C_ExitApplication   Stop and reset the Tracker Server    Other than most commands       ExitA pplication    takes effect even while  another command may still be busy   Initialization  FindReflector     However   there might be a delayed reaction in certain  cases  This command thus can be used for   
92. a 0   Phi 0    Kappa 0   Scale   1           34             Coordinate System Type       Implication    Comment       Selects the coordinate  system type    RHR LHR X  LHR Y   LHR  Z CCW CCC SCW SCC       The TPI delivers the data  in the current coordinate  system type  By default  the tracker system will  work in the right handed  rectangular coordinate  system  RHR  type     3D rectangular  coordinates are defined  by 3 mutually  perpendicular axes X  Y  and Z given in the order   X  Y  Z      Since the axes can be  arranged in two different  ways  right and left   handed systems are  defined according to the  convention illustrated in  a simple 2D case     Cylindrical Clockwise   CCW     Cylindrical Counter  Clockwise  CCC     In a cylindrical system  the X and Y values are  expressed in terms of a  radial  distance  offset  from the Z axis and a  horizontal angle of  rotation  The Z  coordinate remains the  same           35          Implication    Comment          Spherical Clockwise   SCW     Spherical Counter  Clockwise  SCC     In a spherical system a  point is located by a  distance and two angles  instead of the 3  coordinate values along  the rectangular axes  For  axes labeled XYZ  with Z  vertical  the point is  located by its distance  from the origin   horizontal angle in the  XY plane and zenith  angle measured from the  Z axis              36          3 C  interface    3 1 Low level TPI Programming    3 1 1 Preconditions    Using the C interface requires som
93. ached tip cannot be recognized    e ES_PTS_MultipleTipsAttached  There are multiple Tips attached    ES _TriggerSource    Specifies the source for the measurement  trigger  This enumeration type is used as a  parameter for the ES_C_Set GetTriggerSource  commands        enum ES_TriggerSource      ES_TS_Undefined   ES_TS_Internal_Application   ES_TS_External   ES_TS_ExternalEvent   ES_TS_ExternalStartStopEvent           e ES TS Undefined  The trigger source is undefined        121    e ES_TS_Internal_Application  The application acts as trigger source   Mainly used for emScon internal modes     e ES TS External  The trigger source is external  The    trigger  port    of the controller is used for trigger  signal input  A regular clock signal is  usually used with this mode     e ES TS ExternalEvent  The trigger source is external  The    trigger  port    of the controller is used for trigger  signal input  The trigger signal occurs on a  specific event such as  manual  button  press  roboter elevation limit and so on   There is no distinction between start stop   The application defines the behavior  for  example whether the reaction is the same  for every event  or whether there is a     toggle    behavior    An    ExternalTriggerEvent    status change  event is issued on each trigger event     e ES_TS_ExternalStartStopEvent  This type is very similar to ExternalEvent   but there is a distinction between start and  stop  which for example allows to  distinguish between button 
94. acker  Compensation may be  defined for a tracker   although often there is  only one      If there is more than one   these can be queried from  the system by using the     GetCompensations   command  This will show  the relation between the  ID  a number  and the  Name  a Date  String  of  the available  compensation  The ID  can then be passed to the     SetCompensation   command in order to  activate it  Note that this  setting remains  persistent  Nevertheless  it s a good idea that an  application upon launch  at least checks whether  the desired compensation  is set  command  GetCompensation     The principle of dealing  with compensations is  the same as for  Reflectors  For more  details see chapter 8   Get  Reflectors  command          30          Set T  Cam To Tracker Compensation       Implication    Comment       Select a specific T  Cam  to Tracker  Compensation  Related to  6DoF modes only        More than one T  Cam to  Tracker Compensation  may be defined for a  tracker  camera  although  often there is only one      If there are more than  one  these can be queried  from the system by using  the   GetTCamToTrackerCom  pensations  command   This will show the  relation between the ID  a  number  and the Name  a  Date  String  of the  available compensation   The ID can then be  passed to the     SetTCamToTrackerCom  pensation    command in  order to activate it  Note  that this setting remains  persistent   Nevertheless  it s a good idea that an  application 
95. acro LtcExcel  Tracker server client VBA   programming with Excel 97  Office 97  is not  recommended     Vic See chapter  VBA Macro Language Support   Excel  Word  Access        The essential difference between a VB client and  an Excel client is that the Excel sheet takes the  role of a VB Form  That is  data input output goes  through cells     Further details see  Readme txt  file in Sample 8  folder and code  comments in source files     5 3 4 Sample 14    This sample shows integration of emScon COM  TPI to a C  application  The focus of this sample  is on how accessing COM methods from C   An       285    application just calling SetCameraParams    GetCameraParams  using synchronous interface   may not be very much related to practice     This sample is preliminary an might be improved  in future SDK versions    Note  In order to build run this sample  the  _NET  framework and VisualStudio V7   VisualStudio NET  is required     Further details see  Readme txt  file in Sample 14  folder and code  comments in source files     5 3 5 Sample 15    This sample shows integration of emScon COM  TPI to a VB  NET application  The focus of this  sample is on how accessing COM methods from  VB  NET  The application just demonstrates some  system settings     This sample is preliminary an might be improved  in future SDK versions     Note  In order to build run this sample  the  NET  framework and VisualStudio V7   VisualStudio NET  is required     Further details see  Readme txt  fi
96. ain types of packets  see enum   ES_DataType      The structures of  ES_DT_Command  type packets differ for  different commands     q All packet types contain  directly or through  another sub structure such as ReturnDataT   BasicCommandCT or BasicCommandRT  a sub   structure of type PacketHeaderT with the size and  type of the packet     e Command type packets  apart from a certain  number of parameters   always contain an  ES_Command command type parameter     e Return type packets  command  error and  measurements always contain a status          parameter   ErrorResponseT  struct ErrorResponseT     struct PacketHeaderT packetHeader   enum ES_Command command     enum ES_ResultStatus status        i       This receive only structure ES_DT_Error packet  type describes the packet size and type  It       150          contains a standard packet header and a return  status  ES_ResultStatus  or a tracker error number     The  command  parameter is often set to  ES_C_Unknown since errors are often occur     unsolicited     that is  they are not a reaction to a  command  Consider a  beam broken    error  Such  an event can happen at any time and is obviously  not caused by a command     Fix See 8  Appendix at the bottom of this  document     The command parameter is set to ES_C_Unknown  unless the error was caused by particular          command    SingleMeasResultT   struct SingleMeasResultT      struct ReturnDataT packetInfo   enum ES_MeasMode measMode   ES_BOOL bisTryMode   doubl
97. al reference       Orientation CAD coordinates   Measured   Nominal  w r t  CAD by active    325       station   SOS    Orientation Measured by 1  Measured   Nominal  w r t  1  station   station by active  station    Transformation   Object coordinates   Measured   Actual  by active  station       Table 1  9 2 4 Orientation parameters    Orientation and transformation are both seven  parameter transformations consisting of three  translation  three rotation  and one scale  parameter  They describe a mapping of a given  set of actual points onto a given set of reference  points  The mapping is calculated such as to  minimize the deviation between the transformed  points and the corresponding reference points in a  least squares sense  Typically the scale is close to  one  e g  when describing a temperature  dependent dilation  In the orientation case the  map assumes the form     T x   t Rx s  with  t   3D translation vector  R   3x3 rotation matrix  s  scale  The corresponding residuals are   residual   T  actual      nominal  The map T can be interpreted as a coordinate  system with its origin at t and the axes given by  the columns of R  In terms of the rotation angles  xAngle  yAngle  zAngle the rotation matrix  assumes the form  cz  cy  SZ   CY sy  R    SZ CX CZ SY SX CZ CX SZ Sy SX  CY SX    SZ    SX CZ SY CX CZ SX SZ Sy CX CY CX    where       326    cx   cos xAngle    sx   sin xAngle   and similarly for the other angles   9 2 5 Transformation parameters    Transformati
98. also mentioned here  although this does not  really mean an    automated queuing    of  commands  Let the synchronization to the  user  This means that the application  implements an individual Button for every  command  i e  every button handler calls only  one command  The user himself must make  sure he does not press a button while a  pending command has not terminated  The  application can support the user in such that it  disables all buttons while a command is in  action   Disable all buttons when pressing any  button  enable all again when a  On  Answer     handler is called     The    asynchronous issues  of this chapter also  apply to the C  Interface and the emScon COM  interface     as far as using the asynchronous  interface  or those parts of the synchronous COM  interface that remain asynchronous by nature      4 4 C   Language TPI Samples    4 4 1 Sample 4    This sample is designed as a 4 Step by Step  tutorial  It is a Windows application with a  graphical dialog user  interface and makes use of  the MFC framework     Step1     Step 1 offers a simple dialog  based MFC  application  It has added some dialog controls  with message handlers and required dialog       235    member variables already defined   However  all message handlers are empty  except  Beep      The framework has been created using the  AppWizard and ClassWizard and then a bit  cleaned up manually in order to keep the code as  slim as possible  Eliminated icons  rc2 and pre   compiled header
99. always use the  Extended mode and therefore use all the    2      version structures   handlers     ES _StilllmageFileType    Specifies the format of the still image  This  enumeration type is used as a parameter for the  ES_C_GetStilllmage command           enum ES_StillImageFileType       ES_SI_Bitmap   ES_SI_Jpeg  hi       e ES_SI_ Bitmap  The image arrives in Bitmap format    e ES_SI Jpeg  The image arrives in Jpeg format   This format is not supported     ES_TransResultType    Specifies the type of the Transformation  Parameters  Depending on this setting  the  transformation routine will provide the 7 result  parameters in    inverse    order  This enumeration  type is used as a parameter for the  ES_C_Set GetTransformationInputParams  command           enum ES_TransResultType      ES_TR_AsTransformation   ES_TR_AsOrientation   hi       e ES_TR_AsTransformation  The 7 parameters are provided to be used for  a transformation from local to object   nominal  coordinate system     e ES _TR_AsOrientation  The 7 parameters are provided to be used as  orientation parameters   ES_C_SetOrientationParameters         119          ES_TrackerProcessorType    Specifies the controller type of the Tracker  Processor in use  SMART  Embedded   LTController plus base  etc             enum ES_TrackerProcessorType     ES_TT_Undefined   ES_TT_SMART310   ES_TT_LT_Controller   ES_TT_EmbeddedController  hi       ES_TPMicroProcessorType    Specifies the microprocessor type of the Tracker  Proces
100. amToTrackerCompensation  Sets the specified tracker compensation with  the given ID as the active one  The available  TCamToTracker compensations including       77    their Ids can be retrieved with the command    GetTCamToTrackerCompensation       ES_C_GetProbeCompensations   Reads all Probe  compensations stored in the  database  Apart from the internal ID and  name  a series of properties is delivered     ES_C_GetProbeCompensation   Reads the currently active probe  compensation ID  Only the internal ID is  returned  For additional information  the  properties need to be looked up in the list  delivered by  ES_C_GetTCamToTrackerCompensations    ES_C_SetProbeCompensation   Sets the specified Probe compensation with  the given ID as the active one  The available  Probe compensations including their ID s can  be retrieved with the command   Get  GetProbeCompensations       ES_C_GetTipToProbeCompensations   Reads all TipToProbe  compensations stored  in the database  Apart from the internal ID  and name  a series of properties is delivered     ES_C_GetTipToProbeCompensation  Reads the currently active TipToProbe  compensation ID  Only the internal ID is  returned  For additional information  the  properties need to be looked up in the list  delivered by  ES_C_GetTipToProbeCompensations    ES_C_ SetExternTriggerParams   Set the behavior of the external trigger   related structure  ExternTriggerParamsT  Note  Trigger functionality is not yet  available with emScon 2 1 x release
101. and use  wrong  default  parameters    However  wrong parameters do not cause  any fatal failures  The only effect will be that  the  Find Reflector    feature by clicking to the  live video image by mouse pointer will move  the tracker inaccurately  typically  the tracker  will move double or half the amount of the     clicked    distance      ES_RS NoAdm   Meaning  A command could not access the  absolute distance meter of the tracker  This  error should only occur if a tracker is not  equipped with an ADM  i e  LT  series only    Note  If this error occurs for LTD trackers        88    this probably indicates a hardware  failure  Refer to Leica service      ES_RS_NoNivel   Meaning  A command could not access the  external Nivel20 inclination sensor  Either it  is not present or not correctly connected   Note  If there is a Nivel20 connected  check  the cable  If no Nivel20 is present  set the  SystemStatusFlag HasNivel to zero   Command SetSystemStatus   The flag must  be   0  in order to access the Nivel20     ES_RS_WrongTPFirmware   Meaning  The installed Firmware on the  Tracker controller does not match the actual  hardware    Note  Upgrade the firmware  Refer to Leica  service     ES_RS_DataBaseNotFound   Meaning  No database could be found on the  tracker server    Note  There are no compensation parameters  found for the attached sensor  Send the  respective parameter files to the emScon  server using the transfer tool     ES_RS_LicenseExpired   Meaning  The Copy  P
102. arType  Dim sz As Long    ObjConnect GetData data  tp   VarType data    type  we expect a Byte arryay    If  tp  sz      vbArray   vbByte  Then   Byte Array    UBound  data    1   index is zero based   If  bytesTotal   sz  Then   MsgBox sz  display   of bytes received  Else    MsgBox CStr   Unexpected size     amp  sz _   amp  CStr    expected     amp  bytesTotal  End If  End If  End Sub       q It is not necessary to read data here  with  GetData   Answers may be filtered out and only  those data packets of interest can be read    With TCP IP data must be read at socket level   see previous samples  otherwise no notification  will arrive again     The principles shown here also apply to message  handlers  if one of the message notification  mechanisms is selected     Fix See chapter    Answers from Tracker Server    on  how to mask evaluate incoming data blocks        263       5 2 14 VBA Macro Language Support    Excel  Word  Access    The LTControl COM component can also be used  with VBA  Visual Basic for Applications   the  built in Macro language of MS Excel  Word and  Access     with the exception that structs and enums  are not fully supported with VBA that comes  with Office 97   Ex  functions that take struct  parameters cannot be used  VBA that comes with  Office 2000 no longer has such limitations     q It is highly recommended to use Office 2000  or higher for Tracker Server VBA Programming   Office 97  Excel 97 Word 97    apart from a  missing UDT   contain some
103. are delivered  in current units and current CS type  the  same as with TransformationInputParams    For all transformation related commands  see  Section 9 2 for details     ES_C _GetTransformedPoints   Retrieves the    secondary    transformation  results    transformed points including  statistical information and their residuals to  nominal points  after a successful     CallTransformation     Values are provided in  current units  current CS type  but not  according to current orientation settings    Transformed points do match the nominal  points  apart from residuals   For all  transformation related commands  see  Section 9 2 for details     ES_C _ ClearDrivePointList   Clears the current drive point list  used as  input data for the Intermediate  Compensation      ES_C_AddDrivePoint   Add a point to the drive point list for the  Intermediate Compensation  Values are  expected in current units  current CS type  and according current orientation    transformation settings    For all intermediate compensation related       71    commands  see main chapters 8  sub  chapter  Automated Intermediate Compensation      ES_C_CallIntermediateCompensation  Triggers an    Intermediate Compensation     process and calculation    A successful result will not automatically  become the active compensation    For all intermediate compensation related  commands  see main chapters 8  sub  chapter  Automated Intermediate Compensation    Note  this is a long taking command  It can  be inte
104. as a parameter for  ES_C_SetUnits ES_C_GetUnits           enum ES_LengthUnit      ES_LU_Meter   ES_LU_Millimeter     ES_LU_Micron   ES_LU_Foot   ES_LU_Yard     ES_LU_Inch       ES _AngleUnit    Angle units supported by TPI  This enumeration  type is used as a parameter for  ES_C_SetUnits ES_C_GetUnits           enum ES_AngleUnit      ES_AU_Radian   ES_AU_Degree   ES_AU_Gon   hi       ES_TemperatureUnit    Temperature units supported by TPI  This  enumeration type is used as a parameter for  ES_C_SetUnits ES_C_GetUnits           enum ES_TemperatureUnit     ES_TU_Celsius   ES_TU_Fahrenheit  hi       ES PressureUnit    Pressure units supported by the TPI  This  enumeration type is used as a parameter for  ES_C_SetUnits ES_C_GetUnits        104                   enum ES_PressureUnit     ES_PU_Mbar    default  ES_PU_HPascal    same as MBar  ES_PU_KPascal   ES_PU_MmHg   ES_PU_Psi   ES_PU_InH20   ES_PU_InHg        e ES PU _Mbar  Millibar  e ES_PU_Hpascal  HectoPascal    Millibar   e ES_PU_Kpascal  KiloPascal  e ES_PU_MmHg  Millimeter Mercury  e ES PU_Ps  Pounds per Inch  e ES PU _InH20  Inch Water Height  e ES_PU_InHg  Inch Mercury    ES _HumidityUnit    Humidity units supported by the TPI  This  enumeration type is used as parameter for  ES_C_SetUnits ES_C_GetUnits           enum ES_HumidityUnit      ES_HU_RH           e ES HU RH  Relative humidity  which is expressed in  percentage     ES _TrackerStatus    This enumeration type names the possible tracker  states  It is used as the
105. atal error since the Pressure is  required for the calculation of the refraction  index     ES_RS 6DMeasurementFace2NotAllowed  Meaning  The system is in Face II while       98    trying to do a 6D measurement    The system does not allow to perform 6D  measurements while in Face II  Change to  Face I first     ES MeasMode    This enumeration type names the currently    implemented measurement modes  Used as a  parameter for the ES_C_SetMeasurementMode  command           enum ES_MeasMode         ES_MM Stationary    ES_MM_ ContinuousTime   ES_MM_ContinuousDistance   ES_MM_ Grid   ES_MM_SphereCenter   ES_MM_CircleCenter   ES_MM_6DStationary   ES_MM_ 6DContinuousTime   ES_MM_ 6DContinuousDistance   ES_MM_6DGrid   ES_MM_6DSphereCenter   ES_MM_ 6DCircleCenter        ES_MM_Stationary   Stationary measurement mode  Also known  as    Single Point  measurement  where the  target is stationary     q A stationary measurement is an average  value of many tracker measurements  The  parameters for a stationary measurement   number of measurements and the time span  can be controlled with the  ES_C_SetStationaryModeParams command     ES_MM_ContinuousTime   Continuous measurement mode with a time  interval  a measurement is triggered after  the time interval  The behavior of a  continuous measurement can be controlled  with the  ES_C_SetContinuousTimeModeParams  command     ES_MM_ContinuousDistance  Continuous Measurement mode with a  distance interval  A measurement is       99       trigge
106. better make it a member      variable of CMsgSink        static char szRecvBuf  RECV_BUFFER_SIZE      bool bOK   true   long lReady   0   int nCounter    long 1Missing    long 1BytesRead 0    long 1PacketSize   0    long 1BytesReadTotal   0    int nHeaderSize   sizeof  PacketHeaderT     PacketHeaderT  pHeader   NULL     r  r    E   e    TRACE  _T   CMsgSink  OnMessageReceived  lu   lu  n     wParam  lParam      if  WSAGETSELECTEVENT  lParam     FD_READ         Just peek the header  do not remove data from queue  lReady   recv  SOCKET wParam  szRecvBuf   nHeaderSize  MSG_PEEK      if  lReady  lt  nHeaderSize        if  lReady    SOCKET_ERROR      if  WSAGetLastError      WSAEWOULDBLOCK   Sleep  50      busy   try later  else       Beep  1000  100       not able to get header         else       if  return true     non fatal only a peek  try next time        if  pHeader    PacketHeaderT   szRecvBuf   bOK   bOK  amp  amp  lReady    nHeaderSize  amp  amp     pHeader  gt 1lPacketSize  gt   nHeaderSize  amp  amp   pHeader  gt 1lPacketSize  lt  RECV_BUFFER_SIZE  amp  amp   pHeader  gt type  gt   ES_DT_Command  amp  amp   pHeader  gt type  lt   ES_DT_ReflectorPosResult     lPacketSize   pHeader  gt 1PacketSize     if  bOK       do        nCountert t      if  1BytesRead  gt  0   l1BytesReadTotal    1BytesRead     lMissing   1PacketSize   1BytesReadTotal     lBytesRead   recv   SOCKET  wParam    szRecvBuf   1BytesReadTotal    1Missing  0      if  1BytesRead    SOCKET_ERROR      if  WSAG
107. bjAsync object  or whatever the variable is  called  is listed in the top left list box of the  Form   s source code window     Just as an experiment  Remove WithEvents  and save the code     the list entry will vanish     elf ObjAsync is selected in the list box  a list of all  available event handlers is shown in the right  drop down list     eTo generate the code framework for an event  handler  select it from the right list      Selecting ErrorEvent will generate a function  named ObjAsync_ErrorEvent  Do this and  complete the generated function frame with a  message box to read as follows           Private Sub ObjSync_ErrorEvent   _  ByVal command As LTCONTROLLib ES_Command  _  ByVal status As LTCONTROLLib ES_ResultStatus   MsgBox  command  amp  CStr         amp  status   End Sub       This event handler will now be triggered  for  example on a Beam Broken Event     Note  The 6Dof part of the interface contains  some event  types with a huge count of  parameters  To mention      Stationary ProbeMeasData     which is the most  extreme with 49 parameters        Such excessive parameter lists   depending on VB  version   partly are beyond code  generating  Wizards capability  Lines may be cut  which will  lead to syntax errors  for generated code   In  these cases  the cut lines need to be completed  manually  see type library for signature         276          Extended Synchronous Functions    ObjSync MeasurStationaryPoint has 18  basic data  type  parameters  Basic data t
108. ble dQuaternion0o    double dQuaternionl    double dQuaternion2    double dQuaternion3    double dRotationAnglex   double dRotationAngleY   double dRotationAngleZ              The  Probe  relative to ReflectorPosResult  Values  are in current units   CS type and according to  applied orientation   transformation parameters   There are some status values in addition   Rotation angles are always represented in the  interval between  PI and PI    The position values relate to the center of the tip  ruby sphere    Details about RotationStatus  see chapter   Rotation Status  just following the chapter   ProbeMeasValueT     SystemStatusChangeT          struct SystemStatusChangeT      struct ReturnDataT packetHeader    enum ES_SystemStatusChange systemStatusChange   hi       This receive only structure describes the  ES_DT_SystemStatusChange packet type  These  are received when the system status has changed     Fix See enum  ES_SystemStatusChange  for  supported notification types     ExternTriggerParamsT          struct ExternTriggerParamsT      enum ES_ClockTransition clockTransition   enum ES_TriggerMode triggerMode   enum ES_TriggerStartSignal startSignal   long 1MinimalTimeDelay    l        Parameters 1  3  See description of appropriate  enumeration types        157             IMinimalTimeDelay  The time delay between  trigger event and measurement     Non  Parameter Command Return Types    Lists all non  parameter command structures   They are derived from the BasicCommandC
109. c  diagnostic data  The tracker must be equipped  wit an ADM           struct GetADMInfoCT      struct BasicCommandCT packetInfo   hi    struct GetADMInfoRT     struct BasicCommandRT packet Info   int iFirmWareMajorVersionNumber   int iFirmWareMinorVersionNumber   int iSerialNumber        GetNivelinfoCT RT    Command structures to read NIVEL20 specific  diagnostic data  The tracker must have a  NIVEL20 sensor connected and enabled           struct GetNivelInfoCT      struct BasicCommandCT packetInfo         struct GetNivelInfoRT     struct BasicCommandRT packetInfo   int iFirmWareMajorVersionNumber   int iFirmWareMinorVersionNumber   int iSerialNumber        GetTPIinfoCT RT    Command structures to read TP specific  diagnostic data  This is a command mainly used  for service purposes        190                   struct GetTPInfoCT      struct BasicCommandCT packetInfo   hi    struct GetTPInfoRT     struct BasicCommandRT packetInfo   int iTPBootMajorVersionNumber   int iTPBootMinorVersionNumber   int iTPFirmWareMajorVersionNumber   int iTPFirmWareMinorVersionNumber   int iLCPFirmWareMajorVersionNumber   int iLCPFirmWareMinorVersionNumber     enum ES_TrackerProcessorType trackerprocessorType   enum ES_TPMicroProcessorType microProcessorType   int iMicroProcessorClockSpeed    enum ES_LTSensorType laserTrackerSensorType        SetLaserOnTimerCT RT    Command structure to set the time in hours and  minutes  rounded off to nearest   hour block  to  start the laser previously switch
110. cCommandCT packetInfo   he    struct GetCircleCenterModeParamsRT      struct BasicCommandRT packetInfo    struct CircleCenterModeDataT circleCenterModeData   hi       Fy See struct  CircleCenterModeDataT  for  details     Set GetGridModeParamsCT RT    Command structures for setting getting the  parameters for the Grid Measurement mode        165                struct SetGridModeParamsCT     struct BasicCommandCT packetInfo   struct GridModeDataT gridModeData   he    struct SetGridModeParamsRT       struct BasicCommandRT packetInfo   he    struct GetGridModeParamsCT      struct BasicCommandCT packetInfo      i    struct GetGridModeParamsRT     struct BasicCommandRT packetInfo   struct GridModeDataT gridModeData   hi       By See struct  GridModeDataT  for details     Set GetSystemSettingsCT RT    Command structures for setting getting the  system settings parameters           struct SetSystemSettingsCT     struct BasicCommandCT packetInfo   struct SystemSettingsDataT systemSettings   he    struct SetSystemSettingsRT       struct BasicCommandRT packetInfo   he    struct GetSystemSettingsCT      struct BasicCommandCT packetInfo         struct GetSystemSettingsRT     struct BasicCommandRT packetInfo   struct SystemSettingsDataT systemSettings   hi       Vic See struct  SystemSettingsDataT  for details     Set GetUnitsCT RT    Command structures for setting getting the units     settings  The current units act     like current CS   type  and transformation   orientation  parameter
111. cally used to perform a  continuous measurement while the Button  is being hold down  i e  Start the  measurement upon pressing the button and  stop it on releasing button      ES _ProbeConfigTip   Parameter values for  ES_C_Set GetLongSystemParameter command in  case of ES_SP_ProbeConfig_Sound parameter    type        130          enum ES_ProbeConfigTip     ES_PCT_OnlyWithTip   ES_PCT_NoTipAllowed               e ES PCT_OnlyWithTip   Probe requires a Tip attached    e ES PCT_NoTipAllowed   No tip required  Scanner  probes     ES ProbeButtonEvent    ES_C_Set GetLongSystemParameter command in  case of ES_SP_ProbeConfig_ButtonEvent  parameter type           ES_API enum ES_ProbeButtonEvent     ES_PBE_DisableEvents   ES_PBE_EnableEvents   hi       e ES PBE_DisableEvents   no button events are sent    e ES PBE_EnableEvents   server sends button events    ES MeasurementStatusIinfo    The values of this enum can be used to  identify mask each individual bit of the long  parameter delivered by the command  ES_C_GetMeasurementStatusInfo  Hence the  power of 2 of every value  The meaning of the  values should be self explaining according to  their symbol names    See description of command  ES_C_GetMeasurementStatusInfo for further  information        131             enum ES_MeasurementStatusInfo               SI_Unknown   0   SI_TrackerFound   1   SI_TrackerCompensationFound   2   SI_ADMFound   4   SI_ADMCompensationFound   8     SI_MeasurementCameraFound 16   SI_InternalCameraParamsO
112. ch  timeout value selected by  SetSearchParams       See command  SetSearchParams  for details   A    GoPosition    command in progress can be  interrupted with    ES_C_StopMeasurement        ES_C GoPositionHVD   Laser beam is sent to specified location   followed by an implicit  Find reflector     Input  is in current units as horizontal  vertical and  distance parameters related to the values of  the  instrument CS  and  raw  measurement  values  regardless of current CS and CS type   Range limitations apply with respect to the  tracker elevation limits  The useADM flag  should always be set for trackers equipped  with an ADM    If ADM flag is not set  the provided distance  is taken as new IFM distance  To be used  with caution     The search time depends on the search  radius  Large search radii result in extended  search times  unless limited by the search  timeout value selected by  SetSearchParams       See command  SetSearchParams  for details   A    GoPositionHVD    command in progress  can be interrupted with     ES_C_StopMeasurement        PositionRelativeHV   Position  relative the tracker head to the  given horizontal and vertical angles  The  angles are  signed  values in order to specify  the direction  Parameters are according to  currently set angular units  Range limitations       67    apply with respect to the tracker elevation  limits    ES_C_ PointLaser   Similar to ES_C_GoPosition  but laser beam  is sent to the specified location only  A  reflector is 
113. cify  the direction of movement  In contrast to the  MoveHV command  PositionRelative means a  one time movement           struct PositionRelativeHVCT      struct BasicCommandCT packetInfo   double dHzVal   double dvtVal    di    struct PositionRelativeHVRT      struct BasicCommandRT packetInfo            PointLaserCT RT    Structures for invoking the PointLaser command   The input parameters are in current units   CS   type and according to applied orientation    transformation parameters           struct PointLaserCT       struct BasicCommandCT packetInfo     double dVall   double dVal2   double dVal3     i    struct PointLaserRT      struct BasicCommandRT packetInfo   hi       PointLaserHVDCT RT    Structures for invoking the PointLaserHVD  command  Same as PointLaser with the input  parameters in a spherical coordinate system type   irrespective of the selected CS  Values are in  current units           struct PointLaserHVDCT       struct BasicCommandCT packetInfo     double dHzAngle   double dvtAngle   double dDistance           struct PointLaserHVDRT      struct BasicCommandRT packetInfo   hi          176             MoveHVCT RT    Structures for invoking the MoveHV command   The input parameters are vertical horizontal  speed values between 1  and 100  of the  maximum speed of the tracker     Use 0 value s  to stop a previously started  movement  MoveHV can be called repeatedly  with varying speed values in order to change  moving speed  No stop is required in  between
114. cketHeaderT packetHeader   enum ES_Command command     hi       This is a generic structure used to derive all other  command types from  It serves as a general basis  for sending commands           BasicCommandRT   struct BasicCommandRT      struct PacketHeaderT packetHeader   enum ES_Command command   enum ES_ResultStatus status     hi       This is a generic structure used to derive all other  result types from  It serves as a general basis for  receiving commands     q Instead of using  typedef  for all basic  command types   result types  commands that do  not take additional parameters or do not return  date   two data structure containing only  BasicCommandCT   BasicCommandRT member  have been introduced  This approach enables  naming consistency  with respect to struct nesting    depth     Fix See chapter  Non  Parameter Command Return  Types              Meas ValueT   struct MeasValueT      enum ES_MeasurementStatus status   long 1Timel   long 1Time2   double dVall   double dVal2   double dVal3              This struct describes a single measurement of a  continuous 3D measurement stream  Time1  indicates seconds expired since a measurement  start  Time2 indicates microseconds expired  within the last second  The total elapsed time in  microseconds is     T  ms    10e6   ITime1   ITime2  Position values Val1  Val3 are in current units    CS type and according to applied orientation         135             transformation parameters           Meas Value2T   struct Meas
115. cketInfo   double dApproxDistance   hi    struct FindReflectorRT       struct BasicCommandRT packetInfo        The search time depends on the search radius  and timeout set by the SetSearchParams  command  Large search radii result in extended  search times unless limited by a reasonable  SearchTimeout  See    SetSearchParams    for details   The real search radius in addition depends on the  specified approx distance  An approx  distance   which is 50  off the actual value  will also  influence the search radius by 50   The system  cannot directly work with the radius  It calculates  horizontal and vertical angles for the tracker from  the specified search radius and approximate  Distance    Although no range limitation for the approx  distance applies in theory  there is a practical  limitation given by tracker working space  100  mm  lt  approxDist  lt   50000 mm  Note  the  minimum value is 101 mm  not 100 mm     See also SearchParamsDataT     Set GetCoordinateSystemTypeCT RT    Command structures for setting getting the  current coordinate system type  The current CS   type acts     like current units  and transformation    orientation parameters      as a input output   Filter  to all coordinate type related parameters           161          struct SetCoordinateSystemTypeCT     struct BasicCommandCT packetInfo   enum ES_CoordinateSystemType coordSystType   he    struct SetCoordinateSystemTypeRT      struct BasicCommandRT packetInfo         struct GetCoordinateSystemType
116. coder failure    MOT  ERROR  wrong encoder counter direction    MOT  ERROR  motor controller failure    MOT  ERROR  motor unit is blocked or braked    MOT  ERROR  reflexion sensor failure   14105   MOT  ERROR  unknown error in open loop check   MOT  ERROR  function call not allowed    MOT  ERROR  standstill error while closed loop check   MOT  ERROR  timeout during closed loop check   4109 MOT  ERROR  timeout during reference search    MOT  ERROR  no index position found    MOT  ERROR  no cable feedback signal    MOT  ERROR  encoder status error    MOT  ERROR  encoder signal error    MOT  ERROR  over temperature on sensor 0    MOT  ERROR  over temperature on sensor 1    MOT  ERROR  over current on motor 0    MOT  ERROR  over current on motor 1    PROBE  ERROR  wrong command parameter    ZFCI  INFO  zoom controller is connected again to the DSP  ZFCI  ERROR  no zoom controller connected to the DSP   ZFCI  ERROR  dsp avr synchronisation error    ZFCI  ERROR  checksum failure    ZFCI  ERROR  incorrect flash or eeprom address        340    4014 ZFCI  ERROR  flash or eeprom address already written        4215 ZFCI  ERROR  zoom controller reports an error   command not executed   4216 ZFCI  ERROR  command may not be executed at the moment   4217 ZFCI  ERROR  invalid command parameter    4218 ZFCI  ERROR  wrong ZFC answer    ea   4250 FLASH  REMARK  space in err log message sector is running out  4251 FLASH  REMARK  err log message sector erased successfully  4260 FLASH  ERROR  err 
117. con 2 1 x releases and may be subject to  change     ES _SystemParameter    Specifies the value to be addressed by the  ES_C_Set GetLongSystemParameter command           enum ES_SystemParameter      ES_SP_KeepLastPositionFlag    ES_SP_WeatherMonitorSetting   ES_SP_ShowAl1l6DMeasurements   ES_SP_LaserPointerCaptureBeam   ES_SP_DisplayReflectorPosition     ES_SP_ProbeConfig_ButtonEvent   ES_SP_ProbeConfig_Tip     ES_SP ProbeConfig_Button   ES_SP ProbeConfig_SoundVolume        e ES _SP_KeepLastPositionFlag  Param value  0   OFF  1   ON   Important  Enabling the    KeepLastPosition  flag is compulsory for 6D Measurement  Modes  Otherwise the Probe will not be  recognized  If beam catched at zero    1    position     Alternativley  this setting also can be  controlled through the SetSystemSettings  command        128          ES_SP_WeatherMonitorSetting  Parameter value  see  ES_WeatherMonitorStatus   Alternativley  this setting also can be  controlled through the SetSystemSettings  command     ES_SP_ShowAll6DMeasurements  Parameter value  0   Only show data if 6D  rotation status is OK  default   1   Show  always     ES_SP_LaserPointerCaptureBeam   Allows to control the behavior of the   PointLaser  command if the beam is being  sent very close to a reflector  In this  situation  it is not always desired that the  laser beam locks on to the reflector   Parameter value  0   Beam catch OFF  1    Beam catch ON  default      ES_SP_DisplayReflectorPosition   Parameter value  0   Disab
118. ct system given by the  transformation parameters  It is defined by  its diagonal  i e  by two points in the object  system  The coordinates of the points are  subject to units and coordinate type  They  are NOT subject to transformation  parameters         58    A box region is described by a coordinate  system parallel to the box edges and two  opposite vertices  All coordinates of the first  point must be less than those of the second  one  If this condition fails on input  the  corresponding coordinates are switched   Related structure  BoxRegionDataT     ES_C_GetBoxRegionParams   Queries the currently valid box region  parameters  Note that the retrieved point  coordinate values can be different from those  previously set by SetBoxRegion  Because of  the condition that the coordinates of the first  point must be less than those of the second  one   However  the defined box will remain  the same    Related structure  BoxRegionDataT     ES_C_ SetEnvironmentParams   Sets the environment parameters    temperature  pressure and humidity    Parameters are in current units    For valid parameter ranges refer to chapter   Working Conditions    in the    Introduction     main chapter of this manual    Trying to set values outside the valid ranges  will result in command failure    Related structure  EnvironmentDataT    See enum  ES_WeatherMonitorStatus  for  details on explicit and implicit updates of  environmental parameters     ES_C_GetEnvironmentParams   Queries the currently
119. d   Where limitations apply  these are mentioned at  the command description    See also chapter  Working Conditions    in the     Introduction    main chapter of this manual    Note that it is never possible to violate valid  parameter ranges in such that the related  Set     commands do not accept values outside valid  range and therefore will return with an error     Reading Instructions Set Get Command  pairs     Information about parameter representation in  terms of current Units  Coordinate System  Type   CS type   Transformation and Orientation is  provided at the Description of the  Set     command  but not repeated at the description of  the related  Get    command    It is obvious that these information apply to both      Set    and  Get      Although the valid range  information is obsolete for  Get    commands         53          enum ES_Command         ES_C_ExitApplication   ES_C_GetSystemStatus   ES_C_GetTrackerStatus   ES_C_SetTemperatureRange   ES_C_GetTemperatureRange   ES_C_SetUnits    ES_C_GetUnits    ES_C_Initialize   ES_C_ReleaseMotors   ES_C_ActivateCameraView   ES_C_Park    ES_C_SwitchLaser   ES_C_SetStationOrientationParams   ES_C_GetStationOrientationParams   ES_C_SetTransformationParams   ES_C_GetTransformationParams   ES_C_SetBoxRegionParams   ES_C_GetBoxRegionParams   ES_C_SetSphereRegionParams   ES_C_GetSphereRegionParams   ES_C_SetEnvironmentParams   ES_C_GetEnvironmentParams   ES_C_SetRefractionParams   ES_C_GetRefractionParams   ES_C_SetMeasur
120. d As LTCONTROLLib ES_Command  _  ByVal status As LTCONTROLLib ES_ResultStatus        For example indicates a beam broken event  If not  status   ES_RS_Unknown  Then  MsgBox  command  amp  CStr         amp  status  Else  MsgBox     unknown Error      Endif  End Sub       10  Retrieve data during continuous  measurement events   Events for continuous measurements  and  Stilllmage results  do not provide the data  directly  The data must be retrieved  explicitly by using ILTConnect  GetData     In C   mask a data block with struct type  casts  For VB and VBA  ILTConnect provides  some convenient functions        246             Private Sub LtSync_ContinuousPointDataReady  _  ByVal resultsTotal As Long _  ByVal bytesTotal As Long     On Error GoTo ErrorHandler    Dim numResults As Long  Dim measMode As Long  Dim temperture As Double  Dim pressure As Double  Dim humidity As Double  Dim data As Variant    LtConnect GetData data    LtConnect ContinuousDataGetHeaderInfo data  numResults _  measMode  temperture  pressure  _  humidity    For index   0 To numResults   1    LtConnect ContinuousPointGetAt data  index  status _  timel  time2  dVall  daVal2  dVal3      Todo  Do something with the measurement data here  Next    Exit Sub  ErrorHandler    MsgBox  Err Description   End Sub       Continuous DataGet HeaderInfo   ContinuousPointGe  tAt   may affect the performance  They have been  primarily designed for use with VBA  For C    applications and VB  there are more efficient  ways to 
121. d eigenvalues of the covariance  matrix  If the covariance matrix is diagonal  the  axes of the error ellipsoid are parallel to the  coordinate axes  The correlations    covar   stdDev   stdDev         P       satisfy the relations     1 lt  p   lt 1     At the TPI point coordinates together with the  covariance matrix are passed in the following  non redundant form    Coord1  Coord2  Coord3    StdDev1  StdDev2  StdDev3    Covar12  Covar13  Covar23     9 1 1 A priori accuracy    For continuous measurements  the a priori  covariance matrix of a point measurement is  calculated according to the tracker accuracy   Emscon adapts the following model   StdDevH   max 1 25E 5 d  5E 6   StdDevV   max 1 25E 5 d  5E 6     StdDevD   J1E 10    1 25E 6   d            322    where d denotes the measured distance in meters   H and V denotes the horizontal and vertical angle  in radians  This formula applies in the case of  IFM measurements initialized at bird bath  distance  The angle accuracy is constant beyond  2 5m and slightly poorer at close range   Simplified homogeneous models are   StdDevXYZ   max 10E 6 d  25  or even simpler  StdDevXYZ  50u  The a priori accuracy includes  unresolved systematic errors and indicates the  reliability of a measurement  This kind of  accuracy should be used as input to any further  calculation     9 1 2 A posteriori accuracy    For single point measurements  stationary   sphere center  circle center  also the a posteriori or  repeatability covariance is
122. d order of actual points must  agree with that of the corresponding set of  nominal points  Typically  actual points are  obtained from single point measurements  We  recommend using the a priori accuracy  Section  9 1 1   in particular when using fixed nominal  values  Using fixed nominals together with the a  posteriori accuracy provided by tracker  measurements would lead to over weighting of  residuals in laser direction  The reason is that  tracker measurements are much more accurate in  the laser direction than perpendicular to it     Parameter constraints    If any of the seven orientation or transformation  parameters are known prior to the calculation   their value can be fixed  Frequently the scale is  fixed to be 1 0 and the other parameters are free  as in the following example           SetInputParams 0 0  0 0  0 0  0 0  0 0  0 0  1 0   ES_UnknownStdDev  ES_UnknownStdDev  ES_UnknownStdDev   ES_UnknownStdDev  ES_UnknownStdDev  ES_UnknownStdDev   ES_FixedStdDev          The values of unknown parameters can be set  arbitrarily  Parameter constraints are not used to  reduce the required number of known nominal  coordinates  They are not taken into account for  the initial approximation  To fix some or all  components of the translation vector the  coordinate type must be one of Cartesian RHR or  LHR     9 2 7 Output of transformation computation  Transformation parameters    The command CallTransformation returns a  structure CallTransformationRT containing  the seve
123. dPointsCT      struct BasicCommandCT packetInfo   he    struct GetTransformedPointsRT       struct BasicCommandRT packetInfo        int iTotalPoints   double dVall   double dVal2   double dVal3   double dStdDev1   double dStdDev2   double dStdDev3   double dStdDevTotal   double dCovarl12   double dCovarl13   double dCovar23   double dResidualVall   double dResidualVal2   double dResidualVal3   hi  GetStilllmageCT RT    Command structures for getting a camera still  image  The data is delivered as a BMP file  Jpeg  format is not supported yet  The result is a binary  block  given by start address and size  in  File   format  It can directly be viewed with a bitmap  viewer           struct GetStillImageCT     struct BasicCommandCT packetInfo   enum ES_StillImageFileType imageFileType   hi    struct GetStillImageRT       struct BasicCommandRT packetInfo   enum ES_StillImageFileType imageFiletype   long 1lFileSize   char cFileStart        i       Only the BMP format is currently supported        187          GoBirdBath2CT RT    Command structures for driving the laser to the  Bird bath  either in clockwise or counter  clockwise direction           struct GoBirdBath2CT     struct BasicCommandCT packetInfo   ES_BOOL bClockWise   hi    struct GoBirdBath2RT       struct BasicCommandRT packetInfo   hi       GetCompensationCT RT    Command structures to read the currently active  Compensation ID           struct GetCompensationcT       struct BasicCommandCT packetInfo   i    struct Get
124. dVal3   double dScaleStd              Used for parameters of the  Set GetTransformationInputParams command   Used in order to specify  Fixing  Weighting   transformation result values    Values are in current units and  apart from  Radius  in current CS type  No transformation    applies    For details see Section 9 2      For the StdDev parameters  use values as  specified in chapter  Constants            TransformationPointT   struct TransformationPointT      double dVall   double dVal2   double dVal3   double dStdl   double dstd2   double dstd3   double dCov12   double dCov13   double dCov23     hi       It is used as a sub  structure for the AddNominal   AddActualTransformationPoint commands   Values are in current units and CS type and  according to applied transformation settings only  in case of actual points  Nominal points are not  influenced by transformation settings    For details see Section 9 2      For the StdDev parameters  use values as  specified in chapter    Constants           149          CameraParamsDataT          struct CameraParamsDataT      int iContrast   int iBrightness   int iSaturation              Used for parameters of the Set GetCameraParams  command  Values of Contrast Brightness range  from 0 to 256     Saturation is currently not used and must be set  to zero     3 4 2 Packet Data Structures    These data types describe the real data blocks  exchanged over the TCP IP network between the  Tracker Server and the application PC  There are  9 m
125. data structure  MultiMeasResult2T        ES_DT_ ProbePosResult  The equivalent to ES_DT_ReflectorPosResult   but related to probes with 6 Degrees of  freedom  I e  Not only the position  but also  the rotation is supplied     ES Command    This enumeration type names all commands that  are provided by the TPI  A data packet of type  ES_DT_Command contains exactly one of these  values  The answer packet to a command returns  the same value for acknowledgment     E  See struct  BasicCommandCT  for details     General Information related to each command     1   Naming Convention Send   Receive Structs    The related data  structures for sending and  receiving data can be derived from the command  name as follows     e Remove the ES _C_ Prefix from the command    e Add CT postfix to get name of related send   structure  CT stands for CommandType     e Add RT postfix to get name of related receive   structure  RT stands for ReturnType     Example  Structures related to command    ES_C Initialize    are  InitializeCT    and  InitializeRT    If CT RT structures contain sub  structs  these are  mentioned at each commands description     Explanations are available at the command  descriptions  ES_C_     and also at the related  structure descriptions    CT    RT   To avoid too       51    much redundancy  descriptions are usually not  repeated at both locations  Thus it might be  necessary to look  up command descriptions and  related structure descriptions     2   Dimensions   Units 
126. de   This command only applies to tracker  systems equipped with a T Cam  Allows to  switch between Measurement  and  Overview mode  If in Overview mode  the T   Cam plays the role of a    classic    camera as  already available with LT D 500 series  That  is  commands such as  ActivateCameraView    Set GetCameraParams  GetStilllmage apply     ES_C _GetMeasurementCameraMode  Get the currently active T Cam mode   Measurement  Overview      ES_C_GetProbes  This command only applies to tracker       75    systems equipped with a T Cam    Delivers all T Probes known to the system   including ID and other properties  This  command is the 6DoF relative to  ES_C_GetReflectors of a 3D system     ES_C_GetProbe  Gets the ID of the currently active Probe     ES_C_GetTipAdapters   This command only applies to tracker  systems equipped with a T Cam    It delivers all Measurement Tip Adapters  known to the system  including ID and other  properties  This command is similar to  ES_C_GetReflectors of a 3D system     Explanation of Terms     Probe         Tip Adapter Interfaces    rl Tip   Stylus     Tip Assembly  Stylus Assembly    Combination of Tip and Tip Adapter    Tip Adapter       L       Note that the terms    Tip    and    Stylus    are  equivalent  The former is used in by the TPI   while the Compensation Application mainly  uses the latter    A    TipAssembly       StylusAssembly   addresses the actual combination of Tip and  TipAdapter  The TipAssembly is designed as  a property o
127. defined  by the nominal points     Related Commands  e ClearTransformationNominalPointList  e ClearTransformationActualPointList  e AddTransformationNominalPoint  e AddTransformationActualPoint  e SetTransformationInputParams  e GetTransformationInputParams  e CallTransformation    e GetTransformedPoints    Comments    The command CallTransformation displays a  transformation carried out with  Set GetTransformationParams    Before doing a CallTransformation  both point lists   nominal and actual must be prepared  They must  contain the same number of elements     EmScon System Settings    The system settings of emScon  units  coordinate  type and coordinate system  must reflect the  current input data  Point input values   nominal actual  are interpreted by emScon based  on the current emScon system settings     e Additional parameters can be set by using the  SetTransformationInputParams command  For  example to fix certain parameters  By default   i e if no call to SetTransformationInputParams   all parameters are assumed as unknown      e After a successful calculation  additional results  in terms of transformed points and residuals  can be retrieved optionally by using       312    GetTransformedPoints    None of the 7 calculated transformation  parameters  received as output from  CallTransformation  are automatically applied to  the system  This must be done explicitly by  calling SetTransformationParams    See Section 9 2 for mathematical description     8 1 6 Automat
128. degrees      ES WeatherMonitorStatus    Specifies status of the weather monitor  This  enumeration type is used as a parameter for  ES_C_SetSystemSettings and  ES_C_GetSystemStatus commands  The Tracker  server maintains one single set of current  environmental parameters     temperature   pressure and humidity  The command  ES_C_GetEnvironmentParams queries current  parameters  Parameters are set with  explicit implicit methods           enum ES_WeatherMonitorStatus    ES_WMS_NotConnected    ES_WMS_ReadOnly    ES_WMS_ReadAndCalculateRefractions  hi       e ES WMS NotConnected  There is no weather monitor connected to  the system  or it is switched off  The  application must use  ES_C_ SetEnvironmentParams to set the       108          environment parameters  explicit method    SetEnvironmentParams also updates the  refraction parameters  Therefore  it is not  necessary to use      ES _C SetRefractionParams     If   ES_C_ SetRefractionParams is called  anyway  the refraction parameters are  updated with the values provided   however  the next call to  ES_C _SetEnvironmentParams will  overwrite these values again     ES_WMS_ReadOnly   While in this mode  if weather monitor is  connected and correctly working  the  system automatically reads the  environmental values periodically    20  seconds  from the monitor and internally  updates the current environment  parameters  implicit method   Error events  repeatedly occur if no values can be read   weather monitor switched off  o
129. e  compensated and activated before it can be  used for measuring     ES_RS_ProblemStoringCameraToTracker  FactorySet   Meaning  The factory parameters of the   current camera could not be replicated in the   database    Note  This error should not occur under   normal conditions     ES_RS_ProblemWithCameralInternal  Calibration  Meaning  There is something wrong with       96    the internal camera calibration    Note  This error should not occur under  normal conditions  The camera probably  needs to be repaired     e ES RS CommunicationWithMeasurement  CameraFailed   Meaning  Possibly a hardware failure  The  mounted camera should be detected  automatically   Note  Remove the Camera and mount  again  If still a problem  refer to Leica  service     ES_RS_ProblemStoringProbeFactorySet   Meaning  The Factory parameters of the  current probe could not be stored in the   database    Note  This error should not occur under  normal conditions     ES_RS_NoDataToImport  Meaning  Import Data failed since no data to  import was found     ES_RS_ProblemStoringTipAssembly  Meaning  Tip assembly could not be stored   Note  This error should not occur under  normal conditions     ES_RS 6DModeNotAllowed   Meaning  Trying to execute a 6DoF related  command with a 3D measuring system  or  system is set to 3D Mode    Note  Make sure the system supports 6DoF   i e  has a camera mounted  and that one of  the Probe  6DoF  measurement modes is  selected     ES_RS_Bad6DResult   Meaning  The 6D coo
130. e daVall   double dVal2   double dVal3   double dStdl   double dstd2   double dstd3   double dStdTotal   double dPointingErrorl   double dPointingError2   double dPointingError3   double dAprioriStdl   double dAprioriStd2   double dAprioriStd3   double dAprioriStdTotal   double dTemperature   double dPressure   double dHumidity              This receive only structure describes the  ES_DT_SingleMeasResult packet type  Apart from  the standard ReturnDataT structure  it contains  data specific to a single tracker 3D measurement   In addition to the 3 coordinate values  there is  statistical information such as standard  deviations  a posteriori and a priori  and pointing  errors  The environmental values are those  currently valid to the system  either those  explicitly set by SetEnvironmentParams  or those  last implicitly updated by the weather monitor         151       The flag blsTryMode is set if system is in    Try  Mode     This is not relevant for common users     T The format of measurements  statistical  informations and environmental values depend  on current units  Measurements and statistical  information in addition are according current CS   type and applied orientation   transformation          parameters    SingleMeasResult2T   struct SingleMeasResult2T      struct ReturnDataT packetInfo   enum ES_MeasMode measMode   ES_BOOL bIsTryMode   double dVall   double dVal2   double dVal3   double dStdDev1   double dStdDev2   double dStdDev3   double dStdDevTotal   doub
131. e of a data block is passed  with the message     e The data block must be first read with  GetData    except for WM_COPYDATA  and  then interpreted  Interpretation is done with a   switch  statement with the ProcessData    sample code     Fk See chapter  Handling Data Arrival      Continuous Measurements       This sample also shows one of the features not  shown so far  How to retrieve the reflectors  known to the system  It also demonstrates  continuous measurements     Fk View the source code for details  Note that  this code contains a relatively big overhead  needed for user interface issues  The Tracker  Server specific part is not that dominant     Source Code Description    e Information that is displayed in list boxes  such  as units  CS type  is automatically read from  the Tracker Server upon startup  What is seen  has been actually selected     e Changing the items of one list box  automatically creates a  Set  for the newly  selected item     e On changing units  CS type etc   some  dependent information may vanish from the  related edit fields to ensure consistency  This is  due to the paradigm  What you see is selected      Do a  Get  to recover it  which can also be done  by the application        279    e On setting new values  the  Set  command is  automatically followed by a  Get   two beep  sounds   The  Get  is not required  only for  testing and demonstration purpose      e Reflectors are read upon client startup  Can be  heard by characteristic beeps  
132. e particular C   programming knowledge  A programmer should  at least know about asynchronous programming   concepts  TCP IP socket programming and multi   threading     The description of the enums structs in this  chapter may be slightly discrepant to the contents  of the ES_C_API_Def h file in the SDK  In case of  discrepancies  the information in the  ES_C_API_Def h file should be regarded as  correct     This chapter completely and exclusively relates to  the file  ES_C_API_Def h   which is part of the  EmScon SDK  All Enumeration types and  Structures are described in this header file  This  header file acts as an integral part to this manual  and it might be helpful to have it open in parallel  to this document since the information is much  more condensed in the header file     3 1 2 Recommendation    Although the C  interface makes up the native  programming  interface to emScon  it is not  usually recommended to write applications  directly using the C  interface  Rather use the  much more convenient C   interface    In contrast to the C   interface  the C interface  requires much more coding lines and comprises       37    the danger of doing initialization errors for  structures  aka    copy paste errors        However  since it s the native interface  the  enumeration types and structures of the C   interface serve as main  reference  The same  enumeration types and parameters will show up  in the C   interface as well    Hence even when using the C    interface 
133. e vt parray  gt pvData  1   lFileSize  pFile      if  lWritten    1FileSize   AfxMessageBox _T  File could not be written n        fclose  pFile         Display the image using MSPaint       but first close previous instance        HWND hWnd     FindWindow _T  MSPaintApp    NULL      if  hWnd     paint is already running   close first    SendMessage  hWnd  WM_SYSCOMMAND  SC_CLOSE  0      WinExec  mspaint exe image bmp   SW_SHOWNOACTIVATE     P ff oe   F EE     catch _com_error  amp e       Beep 4000  100     AfxMessageBox   LPCTSTR e Description           VariantClear  amp vt      Avoid memory leak             303    GetStilllmage     Asynchronous          void __stdcall OnStillImageDataReady  ES_StillImageFileType  imageFileType  long fileSize  long bytesTotal      ASSERT  m_bUseAsync       VARIANT vt   VariantInit   amp vt      m_pLTConnect     gt GetData  amp vt      ASSERT  vt  parray     gt rgsabound 0  cElements      unsigned long bytesTotal       GetStillImageRT  pData     GetStillImageRT   vt parray  gt pvData     ASSERT  pData  gt 1FileSize   fileSize         Do something with the file  for example write out     to a disk file   like shown in code above    VariantClear  amp vt      Avoid Memory leak       COM VB A     Neither type casts nor writing binary files are  common tasks in VisualBasic  In order to achieve  the same Stilllmage features from VB A   some  convenience Functions have been added to the  COM TPI  StillImageGetFile and WriteDiskFile     This is an e
134. eStd   double ARMS    double dMaxDev   double dVarianceFactor     hi       Error codes    A return status other than ES_RS_AIIOK  0   means that the command could not be completed   In addition to the values defined in  ES_ResultStatus  the CallTransformation command  answer status can evaluate to one of the following  values    Code Description   24010 OLE COM initialization failed  F     24011 Reading resource string failed  F     24012 Error on reading input data from  database  F   24013 Error on saving results to database  F     24020 Least Squares Fit failed   24021 Initial Approximation for Fit failed  24022 Too many unknown nominals  24023 Multiple solutions found    Errors marked with  F  are unanticipated fatalities     Set GetTransformationInputParamsCT RT    Command structures for setting getting the  transformation Input parameters  These are used  as input for the Transformation calculation  process to fix weight transformation result  parameters           185    See struct  TransformationInputDataT  for  details  Also see Section 9 2            struct SetTransformationInputParamsCT     struct BasicCommandCT packetInfo   struct TransformationInputDataT transformationData         struct SetTransformationInputParamsRT      struct BasicCommandRT packetInfo         struct GetTransformationInputParamsCT      struct BasicCommandCT packetInfo         struct GetTransformationInputParamsRT     struct BasicCommandRT packetInfo   struct TransformationInputDataT transformat
135. easured points onto the reference points     9 2 1 Orientation    Orientation refers to the alignment of a tracker  with respect to a world coordinate system  WCS    The world coordinate system may be defined by  the principal measurement station  Fig  1  or by a  CAD model  Fig  2   The coordinates of a point  with respect to the principal station or CAD  model respectively are called nominal or reference  coordinates  The coordinates as measured by the  active station are called actual coordinates           Orientation    Z  Y  Acty   al     w    YY     X  WCS O  X    Active station    Principal station       Fig  1          Setting the calculated parameters as orientation  parameters with the  SetStationOrientationParams command  and re measurement of the reference points  yields actual coordinates approximately equal to       324    the nominal coordinates           Orientation             Fig  2       9 2 2 Transformation    A transformation defines a local object coordinate  system  In this case the object coordinates play the  role of nominals   Fig  3   Activating the  calculated transformation parameters and re   measurement yields actual coordinates  approximately equal to the nominal coordinates           Y Object coordinate system       i Transformation  Active station    Fig3             9 2 3 Nominal and actual coordinates    The role of nominal  actual  and world  coordinates in the orientation and transformation  calculation are summarized in Table 1     Nomin
136. ector      The search time depends on the search radius   Large search radii may result in extended search  times  A typical value is 0 05 m  An approx   distance entry is required only for the  FindReflector command  UseADM should  normally be true for this command     GoPositionHVDCT RT    Structures for invoking the GoPositionHVD  command  Same as GoPosition with the input  parameters in a spherical  tracker   coordinate  system type  irrespective of the current CS type   Values are in current units    Range limitations apply with respect to the  tracker elevation limits  The useADM flag should  always be set for trackers equipped with an  ADM    If ADM flag is not set  the provided distance is  taken as new IFM distance  To be used with  caution           struct GoPositionHVDCT       struct BasicCommandCT packetInfo     double dHzAngle   double dvtAngle   double dDistance   ES_BOOL bUseADM           struct GoPositionHVDRT     struct BasicCommandRT packetInfo     hi       The search time depends on the search radius   Large search radii result in extended search times  unless limited by a reasonable SearchTimeout  A  typical value is 0 05 m       UseADM    should normally be true for this  command     See also command  SetSearchParams               175    PositionRelativeHVCT RT    Structures for invoking the PositionRelativeHV  command  The input parameters are angles in the  current units  The angles are prefixed with       clockwise is   and anti clockwise is     to spe
137. ed  as they are completely     hidden     Use the related  virtual  member  functions of CESAPIReceive instead     4 3 3 Class Design Issues    All class member functions are defined    inline      Neither a library nor a  cpp file is required  One  single include file suffices  The C   interface is  fully transparent with complete source code  provided     The C   interface implements two classes named  CESAPICommand and CESAPIReceive  apart from  wrapper classes for each data structure  of the C   TPI   A class design has the advantage of  constructors to delegate initialization issues  The  class CESAPICommand has a virtual function   SendPacket    which must be overwritten using  Send    command functions     While the CESAPICommand class is used to send  data to the tracker server  the class  CESAPIReceive is used to receive data     The principle is as follows  Derive your own class  from CESAPIReceive class and override those  virtual functions on whose data you are  interested in  Details see below in   CESAPIReceive  chapter     Insertion of the statement           define ES_USE_EMSCON_NAMESPACE       before the inclusion of the ES_CPP_API_Def h file   defines a namespace EmScon for the TPI CPP  classes  This is only required in case of potential  name conflicts with other  third party  libraries        222       Refer to Sample 4 in the emScon SDK  for  namespace techniques  Refer also to C    documentation     4 3 4 Data Structure Wrapper Classes    About 80   of t
138. ed Intermediate Compensation    The Intermediate Compensation is a simple and  fast procedure to perform a fully automated  intermediate compensation  where the tracker is  in a fixed installation     Tracker Geometry    Out of a total of 15 parameters  which affect the  trueness of the tracker geometry  the most  significant changes are affected by these three  parameters     See emScon manuals  for more information   e Transit axis tilt  i   e Mirror tilt  c   e   Vertical index error  j    Intermediate Compensation refreshes these three  parameters by taking a small number of Two face  measurements  If the result is accepted  it updates  only these three parameters and takes over the  rest of the overall 15 parameters from the last Full  Compensation  It is a simpler and faster  procedure than a Full Compensation     Intermediate vs  Full Compensation    Intermediate Compensations do not replace Full  Compensations  Regular intermediate  compensations extend the interval at which full  compensations need to be carried out        313    Setup    A recommended setup is shown below with a  network of fixed targets  Based on a given drive  library the laser tracker measures the target  points automatically and calculates the    Intermediate Compensation results     approx  2m approx  2m  it  a       High          Two face measurements in the vertical plane    The automated Intermediate Compensation  routine requires that all target locations are fitted  with reflectors  recomm
139. ed off by a  SwitchLaser off  command  The tracker controller  and emScon server must be switched on  Since  the laser takes about 20 minutes to stabilize  this  command is useful to program laser on in the  morning so the system is ready when work is  scheduled to begin     The laser can be independently switched off           struct SetLaserOnTimerCT     struct BasicCommandCT packetInfo   int iLaserOnTimeOffsetHour   int iLaserOnTimeOffsetMinute      i    struct SetLaserOnTimerRT      struct BasicCommandRT packetInfo            GetLaserOnTimerCT RT    Command structures to read the time left in  hours and minutes  rounded off to nearest 1   4  hour block   to start the laser  A system restart  sets this value to zero  The tracker processor    emScon server must be switched on           struct GetLaserOnTimerCT      struct BasicCommandCT packetInfo         struct GetLaserOnTimerRT     struct BasicCommandRT packetInfo   int iLaserOnTimeOffsetHour   int iLaserOnTimeOffsetMinute   hi          191             ConvertDisplayCoordinatesCT RT    Command structures to call the  DisplayCoordinateConversion function   DisplayCoordinateConversion is a private  function command and is not  documented supported  It should not be used for  any client programming          struct ConvertDisplayCoordinatesCT         struct BasicCommandCT packetInfo   enum ES_DisplayCoordinateConversionType conversionType   double dVall    double dVal2    double dVal3           struct ConvertDisplayCoordinate
140. em parameters are new and can       79    only be addressed by this command and not  by the former SetSystemSettings command   Example  ES_SP_AllowProbeWithoutTip      ES_C_GetLongSystemParameter   Get current  long  type  system parameter   The opposite of  ES_C_SetLongSystemParameter    ES_C_GetMeasurementStatusInfo   Get information about availability of all  types of compensations and related  hardware    The information data is delivered as a long  value representing a bit mask  Use the enum  ES_MeasurementStatusInfo values to  identify   mask the long parameter  information     ES_C_GetCurrentPrismPosition    Get the current position of the prism the  laser beam is currently attached to  This can  be a reflector or the prism of a probe   Delivered position parameters are with all     filters    applied  Units  CS  Type   Transformation  Orientation   In other  words  the    same    values as a stationary  measurement would deliver  However  these  position values are NOT as accurate as  stationary measurements  Do NOT use these  values as measurements where precise  measurements are required    The background for this command is as  follows  If a probe is attached  it is not  possible to take 3D measurements to the  probe prism  A measurement to the probe  delivers the tip position  not the prism  position  However  there exist situations  where the position of the probe prism may  be of interest  for example when issuing a  GoPosition as a reaction of a beam broken  ev
141. emScon 2 1         wO    ES    Programmers Manual     Tracker Programming Interface    feica    Geosystems       Programmers Manual    emScon TPI    Metrology Division       Preface    These are original instructions and part of the  product  Keep for future reference and pass on to  subsequent holder user of product  Read  instructions before setting up and operating the  hard  and software  The emScon TPI reference  manual and the emScon TPI user manual should  always be used together    This reference manual contains information  protected by copyright and subject to change  without notice  No part of this reference manual may  be reproduced in any form without prior and  written consent from Leica Geosystems AG    Leica Geosystems AG shall not be responsible for  technical or editorial errors or omissions    Product names are trademarks or registered  trademarks of their respective companies    The software described herein is furnished under  license and non disclosure agreement  and may be  used only in accordance with the terms of the sales  agreement       Leica Geosystems AG   Feedback  Your feedback is important as we strive to improve  the quality of our documentation  We request you to  make specific comments as to where you envisage  scope for improvement  Please use the following E   Mail address to send in suggestions     documentation metrology leica geosystems com    Software and version emScon TPI  V2 1  Manual update April 2005  Manual order number None    
142. ementMode   ES_C_GetMeasurementMode   ES_C_SetCoordinateSystemType   ES_C_GetCoordinateSystemType   ES_C_SetStationaryModeParams   ES_C_GetStationaryModeParams   ES_C_SetContinuousTimeModeParams   ES_C_GetContinuousTimeModeParams   ES_C_SetCont inuousDistanceModeParams   ES_C_GetCont inuousDistanceModeParams   ES_C_SetSphereCenterModeParams   ES_C_GetSphereCenterModeParams   ES_C_SetCircleCenterModeParams   ES_C_GetCircleCenterModeParams   ES_C_SetGridModeParams   ES_C_GetGridModeParams   ES_C_SetReflector   ES_C_GetReflector   ES_C_GetReflectors   ES_C_SetSearchParams   ES_C_GetSearchParams   ES_C_SetAdmParams   ES_C_GetAdmParams   ES_C_SetSystemSettings   ES_C_GetSystemSettings   ES_C_StartMeasurement   ES_C_StartNivelMeasurement   ES_C_StopMeasurement   ES_C_ChangeFace    ES_C_GoBirdBath    ES_C_GoPosition   ES_C_GoPositionHVD   ES_C_PositionRelativeHV   ES_C_PointLaser   ES_C_PointLaserHVD    ES_C_MoveHV    ES_C_GoNivelPosition   ES_C_GoLastMeasuredPoint   ES_C_FindReflector    ES_C_Unknown    ES_C_LookForTarget   ES_C_GetDirection   ES_C_CallOrientToGravity   ES_C_ClearTransformationNominalPointList   ES_C_ClearTransformationActualPointList   ES_C_AddTransformationNominalPoint   ES_C_AddTransformationActualPoint   ES_C_SetTransformationInputParams   ES_C_GetTransformationInputParams   ES_C_CallTransformation   ES_C_GetTransformedPoints   ES_C_ClearDrivePointList   ES_C_AddDrivePoint   ES_C_CallIntermediateCompensation   ES_C_SetCompensation   ES_C_SetStatisticMode   ES_C
143. ended 0 5    Tooling Ball  or Corner Cube   before the routine is started     Area Required    Make sure that no one walks around the area  during the whole Compensation procedure   Vibration can affect the measurement and  walking through the beam causes the signal to  break  If a measurement fails  the system  automatically repeats the measurement to  achieve a successful measurement  a maximum of  three times     Procedure    Requirements    The automated Intermediate Compensation can  only be started when the Leica Tracker system is  ready to measure     For the initial setup it is required that the  locations of the fixed targets are measured  manually  These locations provide the  information for the driver points        314    e Six Two Face measurements  in two groups  of 3 each     e Each group of 3 points is in an approximate  vertical line     e Minimum distance from the tracker is 2m     e The high and low measurements should be  more than 30 degrees from the horizontal     e The groups should have a horizontal angle  separation of about 180 degrees  i e  all  measurements should lie approximately in  the same vertical plane    Minimum Measurements    A minimum of 4 measurements is required   mathematically   More measurements reduce the  influence of errors  In addition  unstable  conditions  such as vibrations and rapid  temperature changes  make it necessary for more  measurements to be taken  The following  combinations are examples     e Eight measurements in
144. ent     For  example    beam broken      It is not a reaction of  some previous command and can occur at  any time    Related data structure  ErrorRT     ES_DT_SingleMeasResult   The data packet contains the result of one  single  stationary 3D  measurement   Result    type packets can only be received    Related data structure  SingleMeasResultT     ES_DT_MultiMeasResult   The data packet contains results of a  continuous 3D measurement  This type of  result block is of variable size and depends  on the number of single measurements  within a block   Result   type values can only  be received    Related data structure  MultiMeasResultT     ES_DT_StationaryProbeMeasResult   The equivalent to SingleMeasResult  but  with 6 degrees of freedom  i e  the data block  contains 3 angular values in addition to 3  coordinate values  apart from other data    Related data structure   ProbeStationaryResultT     ES_DT_ContinuousProbeMeasResult   The equivalent to MultiMeasResult  but with  6 degrees of freedom  that is  the data block  contains measurements each with 3 rotation  parameters in addition to 3 coordinate  position values  apart from other data    Related data structure   ProbeContinuousResultT    ES_DT_NivelResult  The data packet contains the result of a  Nivel20  inclination sensor  measurement     Requires the Nivel sensor being  connected to the Tracker directly   Result         49    type values can only be received   Related data structure  NivelResultT     ES_DT_Reflect
145. ent     supposed the probe is always placed       80    to the same location    Thus  this command is probably only of  interest for Probe related enterprises     ES _ ResultStatus  Defines the supported result status values    received as an answer to TPI commands     Fic See 8  Appendix at the end of this manual for  a listing of error numbers        81          enum ES_ResultStatus      ES_RS_A110K   ES_RS_ServerBusy   ES_RS_NotImplemented   ES_RS_WrongParameter   ES_RS_WrongParameterl   ES_RS_WrongParameter2   ES_RS_WrongParameter3   ES_RS_WrongParameter4   ES_RS_WrongParameter5   ES_RS_WrongParameter6   ES_RS_WrongParameter7                    ES_RS_ParameterlOutOfRangeOK   ES_RS_ParameterlOutOfRangeNOK   ES_RS_Parameter20utOfRangeOK   ES_RS_Parameter20utOfRangeNOK   ES_RS_Parameter30utOfRangeOK   ES_RS_Parameter30utOfRangeNOK   ES_RS_Parameter40OutOfRangeOK   ES_RS_Parameter4OutOfRangeNOK   ES_RS_Parameter50utOfRangeOK   ES_RS_Parameter50utOfRangeNOK   ES_RS_Parameter6OutOfRangeOK   ES_RS_Parameter6OutOfRangeNOK   ES_RS_WrongCurrentReflector     ES_RS_NoCircleCenterFound   ES_RS_NoSphereCenterFound   ES_RS_NoTPFound   ES_RS_NoWeathermonitorFound   ES_RS_NoLastMeasuredPoint   ES_RS_NoVideoCamera   ES_RS_NoAdm   ES_RS_NoNivel   ES_RS_WrongTPFirmware   ES_RS_DataBaseNotFound   ES_RS_LicenseExpired   ES_RS_UsageConflict   ES_RS_Unknown   ES_RS_NoDistanceSet   ES_RS_NoTrackerConnected   ES_RS_TrackerNotInitialized   ES_RS_ModuleNotStarted   ES_RS_ModuleTimedOut   ES_RS_Error
146. ent may last very long   It is not suitable to block execution all the time     Methods to Catch Packets    Provide a LTCommandSync object with a call to  SelectNotificationMethod  with LTC_NM_Event as  first parameter    This setting allows catching the continuous  measurement packets through the event  mechanism  This is especially convenient for  Visual Basic     Use one of the Windows Messages notification  methods    See    Sample 7      where this method is shown   disabled  in the source code    These may be methods preferred with VC    clients  especially if the programmer is not  familiar on setting up event sinks  On the other  hand  receiving Windows messages within VB  application is permissible     The MultiMeasResultT structure only covers the  first item of the array  The rest of the  INumberOfResults   1 array elements are padded  to the packet without gaps     q Continuous measurement packets mostly  contain more than one measurement value   Iteration through an array of measurements is  necessary     A code fragment  on how to process a continuous  measurement packet using the event mechanism   is shown below  This is a client implementation        281    stripped down and altered from sample 7  of the  ContinuousPointMeasDataReady event  which  exists for both __ILTCommandSyncEvents and  _ILTCommandAsyncEvents interfaces          void __stdcall OnContinuousPointDataReady  long resultsTotal   long bytesTotal        CString s   VARIANT vt   VariantInit   amp 
147. ently attached to  Delivers  the    same    values as a stationary measurement  would deliver  however  less accurate than  stationary measurements  Do NOT use these  values as measurements where precise  measurements are required    See command description     GetCurrentPrismPosition    for a typical  application of this command           203          struct GetCurrentPrismPositionCT      struct BasicCommandCT packetInfo   hi    struct GetCurrentPrismPositionRT       struct BasicCommandRT packetInfo     double dVall   double dVal2   double dVal3           204       3 5 C   Language TPI Programming  Instructions    The C TPI is made  up of a pure collection of  enumeration types and data structures  The data  structures reflect the    architecture    of the data  packets    byte arrays  sent and received over the  TCP IP network  between the Application  Processor and the Tracker Server  This  low  level    interface serves as the basis for all higher level  interfaces  C    COM     Also refer to C  Language TPI Reference section  and the ES_C_API_Def h file     No functions or procedures are defined     Since C   is an extension of C  a C   compiler  can also be used for C programming     3 5 1 TCP IP Connection    1  Establish a TCP IP connection to the  tracker server  This is typically achieved by  invoking a Connect function of the TCP IP  communication library or toolbox  This function  will take the IP address  or its related hostname   of your Tracker Server     2  Se
148. ependent commands  Thus  the  application must first set one of the now available  IDs 2 or 3 with the  SetReflector  command     The fact that the relation between reflector ID and  Name remains the same throughout all tracker   compensations may be convenient to application  programmers since there is no need to re query  all reflector mappings upon a tracker  compensation change        170    Set GetSearchParamsCT RT          struct SetSearchParamsCT     struct BasicCommandCT packetInfo   struct SearchParamsDataT searchParams   he    struct SetSearchParamsRT      struct BasicCommandRT packetInfo   di    struct GetSearchParamsCT      struct BasicCommandCT packetInfo   he    struct GetSearchParamsRT     struct BasicCommandRT packetInfo   struct SearchParamsDataT searchParams   hi       Command structures for setting getting the  reflector search parameter values     The search time depends on the search radius   Large search radii may result in extended search  times unless limited by a reasonable  SearchTimout     Fe See struct  SearchParamsDataT  for details     Set GetAdmParamsCT RT          struct SetAdmParamsCT     struct BasicCommandCT packetInfo   struct AdmParamsDataT admParams   he    struct SetAdmParamsRT       struct BasicCommandRT packetInfo   he    struct GetAdmParamsCT      struct BasicCommandCT packetInfo      i    struct GetAdmParamsRT     struct BasicCommandRT packetInfo   struct AdmParamsDataT admParams   hi       Command structures for setting getting the 
149. eptions  when installing new software or importing  compensation data    The active compensation is a persistent setting  which can be changed by a    SetCompensation     TPI command  or by selection within the  compensation tree  representation in the BUI   Application   See description of     GetCompensations   GetCompensation    SetCompensation           24    2 4 3 Command Sequence for 6DOF    Measurements    6DOF Measurements are performed to a T Probe   which will be recognized automatically by the  system   The selected Measurement mode must  apply to one of the DOF modes  A T Cam must    be mounted              angle  temperature  and pressure     Steps TPI command  1  Establish TCP IP Depends upon TCP IP  connection  communication     See  different samples  2  Set units  length  ES_C_ SetUnits                   3  Set current ES_C _ SetEnvironmentP  environmental arams   temperature  pressure  and humidity   4  Initialize the ES_C Initialize  System   5  Select desired ES_C_SetMeasurement  6DOF Measurement Mode  mode   6  Ensure that  Keep ES_C_SetSystemSettings  Last Position    flag is  OR  enabled ES_C_SetLongSystemPa   rameter   7  Set Station ES_C_ SetStationOrienta  Orientation tionParams  parameters       8  Set Transformation  parameters    ES_C SetTransformatio  nParams       9  Set Coordinate  system type  RHR   LHR              ES_C_SetCoordinateSys  temType          25       In addition  apart from a valid mechanical  Tracker compensation  see 3D   compe
150. er  even when using the synchronous  interface  some answers remain asynchronous by  nature  These are error events  system status  change events and  multi  packet    command  answers  such as  GetReflectors     GetCompensations  etc     The correct approach is that the application  never issues a command before the previous one  has returned  Even a non  parameter returning  command always indicates its termination by  sending an    acknowledgment     With the C    interface  either the general   OnCommandAnswer    can be used for that   practically only suitable for commands that do  not return any results   In addition  every  command has its individual  On  Answer     handler  See  ES_CPP_ API Def h  file   CESAPIReceive class     In particular  the next command may not be  issued before the  On  Answer    handler of the  previous command has arrived  There are several  possible approaches to achieve correct execution  of a series of commands      1  Directly call the next command in the   On  Answer    of the previous command  This       233    approach is demonstrated with the   GetReflectors    GetReflector    sequence in  Step4 of Sample 4    Remark  There is a helper function  InitReflectorBox   in OnGetReflectorsAnswer     The next command   GetReflector    is called in  this  InitReflectorBox    function  However    GetReflector    could also be called inside   OnGetReflectorsAnswer    function directly       Queue your commands in a list  Take the first  command 
151. eseeeeeeeeees 296  8 1 1 Get Reflectors Command                ccccceeeeeeees 296  8 1 2 Still Image Command                 cceeeeeeeeeeeeeeeeees 300  8 1 3    Live Image display os  cccsvevsvens ciecriceceetaeeacesacene cts 305  8 1 4 Orient To Gravity Procedure           ccee 310  8 1 5 Transformation Procedure               ccccceeeeeeeeees 311  8 1 6 Automated Intermediate Compensation           313  8 1 7 Two Face Field Check              cccceeeeeeeeeeeeeeeees 317  Mathematics   9 1 Point accuracy f 4c tie ee  322       9 1 1 A priori accuracy    322  9 1 2 A posteriori ACCUrACY          sssesssseeeeeeeeeeerrereeee 323  9 1 3 Transformation of covariance matrices            323  9 2 Orientation and Transformation                323  9 2 1 Orientation fates niatsrinencsishiesiusis cis ars visiianasis 324  9 2 2 Transformation           cccccccceeeeeeeeeeeeeeeeeeeeeeeeeeees 325  9 2 3 Nominal and actual coordinates                 0  325  9 2 4 Orientation parameterS              cccceeeeeeees 326  9 2 5 Transformation parameters              ccccceeeee 327  9 2 6 Input to transformation computation                 327  9 2 7 Output of transformation computation              328  9 2 87 Examples  rhenen scotch a ese E EEEE 330  9 3  T PrOD aeina ia eee  332    10 Appendix A    10 1 TRACKER ERROR NUMBERS              334  10 1 1 System EROlSs cael cc ccreem sete itt heats 334  10 1 2 Communication Errors              ccccccccccceeeeeees 335  10 1 3 Parameter Errors       
152. esidual     i l  This functional is called the weighted residual  square sum  The weight matrix is the inverse of the  covariance matrix of the residual  For constraints  the residual and the weight matrix are scalars     Variance factor    The variance factor  Axyz  mean error  is related to  the residual square sum through     RSS    varianceFactor           _   _   _  redundancy    It is dimensionless  i e  it does not depend on the  length or angle units  Its value may vary  considerably depending on the accuracy of the  input and the model error  i e  the size of the  residuals  If the residuals are systematically  bigger than the standard deviations of the actual  coordinates  the variance factor exceeds one   Otherwise  it is less than one     Redundancy    The redundancy is an integer defined as    redundancy   noEquations     noParameters    If the redundancy is zero the variance factor is  undefined  Such cases are called minimum  configurations  If the redundancy is negative  the  solution is non unique  More fixed nominal  coordinates or parameter constraints are needed  to determine a unique solution     9 2 8 Examples  Standard case with 3 points          AddNominalPoint 1l  2  3  Fixed  Fixed  Fixed  0  0  0    AddNominalPoint  2  3  4  Fixed  Fixed  Fixed  0  0  0    AddNominalPoint  0   4  2  Fixed  Fixed  Fixed  0  0  0    SetInputParams 0  0  0  0  0  0O  1  Unknown  Unknown  Unknown   Unknown  Unknown  Unknown  Unknown          In this example    redundanc
153. esultT     struct ReturnDataT packetInfo   enum ES_NivelStatus nivelStatus   double AXTilt   double daYTAlt   double dNivelTemperature              This receive only structure describes the  ES_DT_NivelResult packet type  which includes  the ReturnDataT structure and contains data  specific to a Nivel20 measurement     Refer to chapter  ES_NivelStatus  in chapter 3 3 2   enumeration types  for details about supported  measurement ranges     q The format of measurement and  environmental values do NOT depend on current  unit settings  Nivel results always arrive in native  Nivel20 format     milliradiant for X Y tilt and  Celsius for temperature        ReflectorPosResultT   struct ReflectorPosResultT      struct ReturnDataT packetInfo   double dVall   double dVal2   double dVal3        hi          This receive only structure describes the  ES_DT_ReflectorPosResult packet type  These are  received whenever the tracker is locked onto a  reflector  3 measurements per second   The  receipt of these  measurement   types can be  switched on off with the systems flag  bSendReflectorPositionData  Values are in current  units   CS type and according to applied  orientation   transformation parameters        156    ProbePosResultT          struct ProbePosResultT       struct ReturnDataT packetInfo    long lRotationStatus    enum ES_MeasurementTipStatus tipStatus    long iInternalTipAdapterId   long iTipAdapterInterface   double dPositionl    double dPosition2    double dPosition3    dou
154. etLastError      WSAEWOULDBLOCK      Sleep 50      busy   try later  continue      else  Beep 1000  100         if    if  nCounter  gt  64     emergency exit     if  1BytesReadTotal  lt   0      TRACE  _T  not able to read data  recv  n        return true     nothing read  can leave safely         if          229             else     bOK   false   break           if    TRACE  _T  Loop  BytesRead  ld  BytesReadTotal    Sld  PacketSize  ld  Missing    ld n     lBytesRead  lBytesReadTotal 1lBytesRead   1PacketSize   1Missing   1BytesRead         while  1lBytesRead  lt  1Missing      if  1BytesRead  gt  0   l1BytesReadTotal    l1BytesRead     FLE   bOK   bOK  amp  amp  lBytesRead    1Missing  amp  amp   lBytesReadTotal  lt   RECV_BUFFER_SIZE    if  bOK           ProcessReceivedData   is assumed to take one single      complete  data packet  It contains a  switch      statement to evaluate the packet  we have seen this     method several times in this manual   samples     if  1BytesReadTotal    1PacketSize   ProcessReceivedData szRecvBuf  1BytesReadTotal          if     else  bOK   false     if   bOK        make sure socket is cleaned up on data jam     in order to recover ordinary data receiving    do     nCountertt   lBytesRead   recv  SOCKET wParam  szRecvBuf   RECV_BUFFER_SIZE  0    TRACE  _T   Recover in loop n        while  1BytesRead  gt  0  amp  amp  nCounter  lt  128    TRACE  _T   Unexpected data   fatal error n        Beep  250  10      data lost       else    return bO
155. extract continuous measurements     5 2 2 C   Applications    A complete C    console application    based on the  COM TPI is shown below  It shows import of the  LTControl and how to declare and initialize  objects  The application uses the synchronous  interface  queuing several commands   Events are  not recognized with a  console application       Fix See Sample 9 of the emScon SDK for a  minimal C   application  demonstrating  CESCommandApi as well the CESAPIReceive  class       247             include  lt stdio h gt   include  lt atlbase h gt     extern CComModule _Module   include  lt atlcom h gt     import  LTControl dl1l  no_namespace  named_guids   inject_statement    pragma pack  4       int main int argc  char  argv          CoInitialize  NULL       try      ILTConnectPtr g_pLTConnect   ILTCommandSyncPtr g_pLTCommandSync     g_pLTConnect CreateInstance  __uuidof  LTConnect        g_pLTConnect     gt ConnectEmbeddedSystem  127 8 34 61     g_pLTCommandSync   g_pLTConnect     gt GetILTCommandSync       g_pLTCommandSync  gt Initialize     g_pLTCommandSync  gt PointLaser 1 7  2   0 6         g_pLTConnect     gt DisconnectEmbeddedSystem          catch _com_error    amp e      printf   Exception  s  n    LPCTSTR e Description           CoUninitialize     return 0               T Note the statement            import  LTControl dll  no_namespace  named_guids   inject_statement    pragma  pack  4           This statement must  and not as shown  reside on  one single line  I
156. f a TipAdapter and mainly  consists of Tip Length and the diameter of  the ruby sphere  There is one and only one  TipAssembly for each TipAdapter        76    TipAssemblies can only be defined from  within the Compensation Module  apart  from importing TipAdapters with already  existing valid TipAssembly   The  TipAssembly must be redefined each time a  different Type of Tip  Stylus  is attached to a  TipAdapter  Moreover  a TipAssembly  definition must be followed by a TipToProbe  Compensation    Note that a particular Tip     other than a  TipAdapter     does not have its own ID  For  that reason  there is no    GetTips    command   Tips can only be identified indirectly  through the TipAdapter they are mounted to  It is the users responsibility to correctly  define length and radius  upon defining a  TipAssembly for a particular TipAdapter    These values  in addition to a user  defined  comment  can be retrieved through the  command GetTipAdapters     ES_C_GetTipAdapter  Gets the ID of the currently active Tip  Adapter     ES_C_GetTCamToTrackerCompensations  Reads all T Cam to Tracker  compensations  stored in the database  Apart from the  internal ID and name  a series of properties is  delivered     ES_C_GetTCamToTrackerCompensation  Reads the currently active T_Cam to Tracker  compensation ID  Only the internal ID is  returned  For additional information  the  properties need to be looked up in the list  delivered by ES_C_  GetTCamToTrackerCompensations    ES_C_SetT C
157. fo   i    struct StopMeasurementRT         struct BasicCommandRT packetInfo   hi    struct ExitApplicationcT       struct BasicCommandCT packetInfo   hi    struct ExitApplicationRT       struct BasicCommandRT packetInfo   di    struct ClearTransformationNominalPointListCT         struct BasicCommandCT packetInfo   di    struct ClearTransformationNominalPointListRT         struct BasicCommandRT packetInfo   hi    struct ClearTransformationActualPointListCT         struct BasicCommandCT packetInfo   di    struct ClearTransformationActualPointListRT         struct BasicCommandRT packetInfo   he    struct ClearDrivePointListCT         struct BasicCommandCT packetInfo   hi    struct ClearDrivePointListRT         struct BasicCommandRT packetInfo   di       SwitchLaserCT RT    Command structures for switching the laser  on off  The laser should only be switched off  during long breaks  overnight   while the  controller is not shut down  Switching laser on  again will take about 20 minute to stabilize           struct SwitchLaserCT      struct BasicCommandCT packetInfo   ES_BOOL blIsOn       i    struct SwitchLaserRT       struct BasicCommandRT packetInfo   hi       FindReflectorCT RT    Command structures for invoking a  Find  Reflector    sequence  dApproxDistance should be       160          specified in order to apply search radius  dependent on the distance from the tracker   Approx distance is in current length units           struct FindReflectorCT     struct BasicCommandCT pa
158. from the list and send it to the  tracker server  At the same time  set an Event   or another synchronization object  such as  Mutex or Semaphore     that prevents taking the  next command from the list  As soon as the  answer of the pending command arrives  reset  the Event  which will cause to process the next  command from the list    In contrast to the first approach  where each  On  Answer   handler calls a different  subsequent command  this second approach is  more general in such that every answer  handler does the same   ResetEvent   Needless  to say that this approach means a multi  threaded application       Queue your commands in a list  Use an  application defined Windows message handler  that removes and processes the first command  of the list and sends it to the tracker server  To  start the  command  chain     do an explicit first  call of this message handler  In every   On  Answer    handler  a  PostMessage    call  will cause to trigger the message handler in  order to process the next command   Important  to use PostMessage  not SendMessage     The advantage of this approach is that no  multi  threaded application is required since  the Windows message loop takes care of  synchronization  On the other hand  this       234    approach only works for windows applications  and not for console applications or    windowless  server applications     Hint  you may use an  invisible window for message handling      4  To be complete  the most simple approach is  
159. gh driving  points  or not all could be found and or  measured     Minimum vertical angle difference not  met    An unknown error occurred    Errors marked with  F  are unanticipated fatalities     Warning flags    Warning flags are available upon a successful  compensation  Status ES_RS_AJIOK    0    The  parameter  WarningFlags is a 32 bit value  If the  value is zero  none of the bits set   then the    intermediate compensation process completed  with no warnings  Otherwise  each raised bit  means a particular warning  There can be more    than one warning at a time     Currently  the following warnings are possible     Bit 1   0x1     Bit 2   0x2     Bit 3   0x4     AverageVerticalTwoFaceErrorIsTooHigh   Tracker service  from Leica Geosystems  personnel  is required because the vertical  index is constantly  gt  1 Gon  There is  currently no way for the user to reset the  approximate index   AtLeastOneVerticalTwoFaceErrorIsTooHig  h    If Bit 1 not raised  there is probably a very  high error within a single two face  measurement     If Bit 1 is raised too  ignore warning Bit 2     AtLeastOneDistanceIlsNotInRange    At least one of the distances is smaller than  the minimum or larger than the maximum  recommended distance  according to the  recommendations        183       Bit 4 NotEnoughMeasInTwoOppositeVerticalP1   0x8  anesWithGoodDiffOfVerticalAngle   This warning covers all  except the range  criterion  possible criteria  which are not  fulfilled by the measurement c
160. given point and its error  statistic  This is a convenience command for  user  interface purposes  Input parameters are 3  coordinate values  their standard deviations  plus the covariance matrix  Input is in current  units  current CS and with applied  transformation   orientation settings  Output  parameters are 3 Std Dev values  ellipsoid   axes   always related to X Y Z  RH cartesian   and 3 Rotation angles that describe the  orientation of the error ellipsoid        200             struct GetErrorEllipsoidCT     struct BasicCommandCT  double  double  double  double  double  double  double  double  double  hi    struct GetErrorEllipsoidRT       struct BasicCommandRT pa  double ds  double ds  double ds  double dR  double dR  double dR    packetInfo   dCoordl   dCoord2   dCoord3   dStdDevl   dStdDev2   dStdDev3   dCovarl12   dCovarl13   dCovar23     cketInfo   tdDevx   tdDevyY   tdDevaZ   otationAnglex   otationAngleyY   otationAngleZ        GetMeasurementCameralinfoCT RT    Command structure    s to read T CAM specific    information and diagnostic data of the active    camera  The tracker    must be equipped with a    Measurement camera           struct GetMeasurementCameral      struct BasicCommandCT  he    struct GetMeasurementCameral     struct BasicCommandRT  int  int  long  ES_MeasurementCameraType  unsigned short  long  long  long  long  long  double  double  long  long  double  double  long    nfoCT    packetInfo     nfoRT    packetInfo   iFirmWareMajorVersionNumbe
161. h a high level  convenient programming  interface     q COM interfaces work well together with  Visual Basic  Delphi and Office Macro  programming languages  VBA  on the Win32  platform  while using the emScon C or C    interface is difficult for those types of languages        256    COM vs  C C   Programming             provided  All these  functions are built in   Only the IP address of  the tracker server needs  to be provided     Advantages Disadvantages   No include file to deal Comes as a DLL  ATL   with on using COM TPI  COM component   Its  source code is not public   which complicates  application debugging    No TCP IP library or Is limited to Win32   function needs to be platforms        The COM interface offers  both synchronous and  asynchronous  communication support     Due to COM overhead   the performance may be  affected        There are wide varieties  of notification methods  for arrival data when  using asynchronous  communication     Since TCP IP  communication is built   in  there are no  tuning   possibilities        Supports various  programming languages   Easy to use due to  support of  IntelliSense   for Microsoft Visual and  Office programming  tools           The component needs to  be registered on the client  PC        Interfaces and Notification Methods    Vic See chapter  COM Interface    for more  information on the interfaces provided     5 2 7 Type  Library    In order to get detailed information about the  Interfaces  including data type
162. he  new calculated compensation can be activated     8 1 7 Two Face Field Check    A field check is a control process of the  Compensation parameters  It checks the  condition of the Leica Tracker  with respect to  predefined parameters  It does not  however   provide for compensatory corrections     Periodicity   If the tracker is used in a stationary position   conduct the field check on a weekly basis  If the  field check results show no change  over a period  of six weeks  carry out field checks at least once a  month     If the tracker has been moved  always carry out a  field check before taking measurements     Compensations and field checks must be carried  out in normal working conditions  under which  the measurements are taken     Field check two face Measurement    Two face measurements with 4 to 5 reflector  positions  distributed over the whole object       317    range  will indicate whether the Tracker  compensation is within specifications  To achieve  a 2 sigma accuracy  95   of the measurements  must be within the specification     Client Routine    The Tracker Server Programming Interface does  not have a specific two face measurement mode   A client routine is required  which can use the  basic functionality provided     See chapter  Procedure     Measurement        Procedure   Preparation  The procedure requires the following three  setups   1 Two measurements on a straight line   2 One measurement set on a vertical line   3 One measurement plus or minus
163. he ES_CPP_API_Def h file size is  used for definition of wrapper classes for data  structures  which are required for    internal     purposes  These classes are seldom used directly   Each one of these classes contains only one single  member variable  a struct variable from C TPI  and one or more constructors  Class wrappers are  only available for command structures   CT   not  for return structures   RT   since the technique for  receiving data implements a completely different  approach through virtual functions     Example  class CGoPosition          CGoPosition  CGoPosition double dVall   double dVal2   double dVal3   bool bUseADM     DataPacket packetInfo packetHeader 1PacketSize    sizeof  GoPositioncCT     DataPacket packetInfo packetHeader type   ES_DT_Command   DataPacket packetInfo command   ES_C_GoPosition   DataPacket dVall   dVall   DataPacket dVal2   dVal2   DataPacket dVal3   dVal3   DataPacket bUseADM   bUseADM         GoPositionCT DataPacket            The struct member variable is declared at the  bottom and is of type GoPositionCT  definition of  C TPI   To initialize the member variable  a so  called constructor  taking the command  parameters as input  is provided     Certain wrapper classes implement two  constructors     e Taking the data as individual parameters     e Taking the data as one single struct  parameter     Example  class CSetUnits       223             class CSetUnits     public   CSetUnits  CSetUnits  SystemUnitsDataT unitsSettings    
164. hed to it   The MultiMeasResultT structure only contains   covers  the first element of this array  a  pointer   to the array   The INumberOfResults parameter  identifies the number of array elements  and the  remaining elements can be iterated from data  0       data  INumberOfResults   1      q C arrays are always zero based     This structure only covers the header of a multi   measurement packet  Measurement mode and  environmental parameters are common for the  body  measurement array   The flag bIsTryMode is  set if system is in Try Mode  This is not relevant  for common users     The format of measurements  statistical  informations and environmental values depend  on current units  Measurements and statistical  information in addition are according current CS   type and applied orientation   transformation  parameters           153    MultiMeasResult2T          struct MultiMeasResult2T       struct ReturnDataT packetInfo    long lNumberOfResults   enum ES_MeasMode measMode    ES_BOOL bIsTryMode   double dTemperature   double dPressure    double dHumidity    struct MeasValue2T data 1      hi       The same as MultiMeasResultT  see above   but  received in case the statistical mode is set to       extended        See also command  SetStatisticMode        ProbeStationaryResultT          struct ProbeStationaryResultT      struct ReturnDataT   enum ES_MeasMode   ES_BOOL   enum ES_TriggerStatus   long   long   int   enum ES_MeasurementTipStatus   long   long   double   doub
165. her used to construct data blocks     understandable    to the emScon server  It s the  first time that the emScon SDK is involved  We  have to include the  ES_CPP_API_Def h  file  and    indirectly through this file      some other include  files such as  ES_C_API_ Def h  and  Enum h        As done with CSocket  we also must derive our  own class from  CESAPICommand  because this  class contains a virtual function  SendPacket     It is  mandatory to provide our own implementation  of this class  The implementation depends on the  TCP IP communication package we use     Step3 application allows us to send commands   but not yet to receive answers  So we will not be  able to check whether the command was  executed correctly because all commands are  ASYNCHRONOUS  That is  a command is sent   then the application is idle while the server  executes the command  Then the server sends  back an acknowledge or error message  We have  no code yet to interpret these answers  We just  see how many bytes arrive  In Step4  we will add  logic to receive data     Nevertheless  supposed the server and tracker is  running  we will at least see the tracker moving  when sending a    Initialize    tracker command        237    If the correct reflector is set  GoBirdbath will also  work and we can even perform a measurement   but we will not see the results yet     Step4     Step 4 introduces the emScon class   CESAPIReceive  to RECEIVE    understandable     data from the server  More precisely 
166. hese packets contains a  various sized array of  single     atomic   measurements      k See also structures  MultiMeasResultT     MultiMeasResult2T  and   ProbeContinuousResultT      Only the first element of the measurement  array is covered by these structures   although the index is valid from  0   numberOfResults 1  There is another  significant difference to single  measurements  Before the measurement data  packet stream starts  a StartMeasurementRT  with command status OK arrives   acknowledge that the    start    command has  arrived      Single measurement results always arrive  within a certain time span  This is not the  case with continuous measurements  Grid  Mode  big time separation criteria    A  StartMeasurementRT confirmation is therefore  essential for continuous modes     T A multi measurement stream runs until       43    explicitly stopped  StopMeasurement or until  specified time or count thresholds are  reached     Special Command Answers    Some commands  such as ES_C_GetReflectors and  ES_C_GetTransformedPoints   ES_C_GetCompensations  ES_C_GetTipAdapters  do  not fit any of the above categories    Generally spoken  all commands starting with   Get  and ending with an  s   i e  plural  are treated  in a special way     q ES_C_GetReflectors must not to be mixed up  with ES_C_GetReflector  missing  s       Convention     The answer to these commands is made up of as  many answer packets as reflector types  or  transformed points  Compensations  Tips  
167. hronous  behavior of  emScon communication  A typical example is the   Laser beam broken    event     q Command directly contain the error status in  their answer structure in case of command  failure    ES_DT_Errors type answer packets are only used  for so called  unsolicited errors   which can occur  at any time  regardless of a command      3 2 4 System Status Change Events    Although already present in version 1 2  only two  events   there has been an inflation of such   events since then  The appropriate packet type is  ES_DT_SystemStatusChange  The handling is the  same as with error events  with the only  difference that there is only one parameter        45    IMPORTANT  See chapter  Version Backward  Compatibility    for convention about handling       unknown    data     3 2 5 3D   6 DOF     Related commands    The essential change between emScon v1 5 and  emScon V2 0 is the introduction of 6DoF  measurement structures  6 degrees of freedom    Some were already present in v1 5  However   these were declared as preliminary and have    significantly changed since then     From programming point of view  handling 6DoF    measurements is principally the same as 3D    measurements  The only difference is that other    data structures are to be used  Here is an  overview of the related commands   packets      structures        3D Packets Commands    6DoF  Probe   Packets Commands       ES_DT_SingleMeasResult    ES_DT_StationaryProbeMeas  Result       ES_DT_MultiMeasResu
168. id  packetStart  long packetSize         ReceiveData is the parser  function for incoming  data  It has to be called after receiving a block of  data from the emScon server     Packets passed to this method must be  COMPLETE  in terms of an RT struct as defined  in the C API   Packet fragments are not processed  correctly  Hence the application  which calls  ReceiveData  must ensure to pass complete  packets  See chapter  Queued and Scattered Data   for details     Data Arrival virtual Functions    The principle is as follows  Derive your own class  from CESAPIReceive and override those virtual  functions on whose data you are interested in     Only a few sample of the class  virtual data  receiver member functions are listed here since  these can be derived directly from the C   interface     Example for a command returning no data  If this  function is called this means the command has  successfully executed  i e the tracker has finished  initializing            virtual void OnInitializeAnswer          Example for a command returning data   Which  is the case for all  Get     functions            virtual void OnGetContinuousTimeModeParamsAnswer    const ContinuousTimeModeDataT    cont inuousTimeModeData        A complete listing of all these functions is  available from the CESAPIReceive class  definition in the file  ES_CPP API Def h  file     Rather than redundantly listing all of these  member functions in this chapter  a general rule  is presented on how to derive the f
169. in the order shown above  A lookup table is    therefore required to match the index values to    the reflector IDs  Such a lookup table is shown    below   Index ID  0 7       298    1 2  2 5    The call to SetReflector must pass the reflector ID   not the list box index  A frequent source of a  programming error     Reflector Name     Unicode Format    The reflector name is always in Unicode format   irrespective of whether the application is in  Unicode or ANSI     Names in C C   applications may have to be  converted accordingly     See  Sample 7  which implements reflector  handling with a list box  It uses  rather  complicated  a MFC Map as a lookup table   Simple solutions can be achieved with just an  integer array     See also  Sample 9  on how to interpret reflector  names in Unicode format correctly     Persistence of Reflector Name   ID Mapping    Each tracker  compensation has its own set of  reflector  definitions  However  the mapping  between reflector name and ID remains the same  throughout all available tracker compensations     Example  A T Cam is mounted on the tracker   hence  the active tracker compensation is one that  was performed with a mounted camera  Assume  this tracker   compensation has definitions for  three valid reflectors as follows     Name ID  CCR 75mm 7  CCR 1 5in 2  TBR 0 5in 5       299    Now  the T Cam is removed  and hence another  tracker  compensation becomes active  one that  was performed without a mounted T Cam   Let s  assume 
170. interfaces in the same LTConnect  instance     although possible     usually makes no  sense and partly leads to duplicate answers  Use  of both interfaces within one and the same  application is therefore not recommended     5 2 11 Multi  Tracker Applications    On multi tracker  multi tracker server  systems   create a separate instance of LTConnect for each  tracker     5 2 12 Visual Basic Boolean variable  evaluation   Do not test explicitly against the VB keyword   True     if using the Get lt FunctionName gt Ex  methods of the LTControl  for those commands  returning Boolean data within their result  structure  This is because the Boolean member in  these structures  if true  is one  1   However  the  VB keyword  True  evaluates to   1   Always test  the variable directly  or against  Not False           261    Example          Ob jSync GetContinuousDistanceModeParamsEx dataout    If  dataout bUseRegion  Then  MsgBox  bUseRegion is True   End If    or    If Not  dataout bUseRegion   False  Then  MsgBox  bUseRegion is True   End If    are both correct  However  the following would evaluate to a  wrong result     If  dataout bUseRegion   True  Then  MsgBox  bUseRegion is True    No message even flag true   End If       5 2 13 Reading Data Blocks with Visual  Basic   Arrival data reading with C   as shown in     Handling Data Arrival     Continuous  Measurements     can also be ported to VB  Events  for VB are used here  with unique events for  almost every type of arrival
171. ion calls  SelectNotificationMethod   with the following  parameters        282                   cookie must be in the valid range for a user defined message   m_pLTConnect  gt SelectNotificationMethod LTC_NM_WM_Notify    long m_hWnd   MY_NOTIFY_MSG               The message ID  which also acts as a cookie  here  is defined as         define MY_NOTIFY_MSG  WM_USER 99                Entry in the message map must exist as  follows        ON_MESSAGE  MY_NOTIFY_MSG  OnNotifyMsg             Provide the ProcessData   subroutine   Not every type of data packet is fully  implemented        283          void CCPPClientDlg  ProcessData void  ptr  int nCookie      CString s  s2     PacketHeaderT  pHeader    PacketHeaderT   ptr     switch  pHeader  gt type      case ES_DT_MultiMeasResult     most frequent ones on top     MultiMeasResultT  pData    MultiMeasResultT   ptr     for  int i   0  i  lt  pData     gt lNumberOfResults  i        s Format  _T  Slf  Slf  S1f     pData  gt data i  dVall   pData  gt data i  dVal2   pData  gt data i  dVal3         do something with data     application dependent  m_staticContMeas SetWindowText  s          for       break     case ES_DT_Error        ErrorResponseT  pCmdData    ErrorResponseT   ptr     s Format  _T  error  command  d  status  d n     pCmdData  gt command   pCmdData  gt status       AfxMessageBox s         break     case ES_DT_SingleMeasResult       SingleMeasResultT  pData    SingleMeasResultT   ptr   ASSERT  pData  gt measMode    ES_MM
172. ionData   he       AddTransformationNominalPointCT RT    Command structures for adding a Point to the  Nominal point list  See struct   TransformationPointT   and also chapter   Transformation Procedure    in chapter 8 for  details           struct AddTransformationNominalPointCT     struct BasicCommandCT packetInfo   struct TransformationPointT transformationPoint           struct AddTransformationNominalPointRT       struct BasicCommandRT packetInfo   hi       AddTransformationActualPointCT RT    Command structures for adding a Point to the  actual point list  See struct  TransformationPointT    and also chapter  Transformation Procedure    in          chapter 8 for details   struct AddTransformationActualPointCT     struct BasicCommandCT packetInfo   struct TransformationPointT transformationPoint     hi    struct AddTransformationActualPointRT         struct BasicCommandRT packetInfo   hi       GetTransformedPointsCT RT    Command structures for retrieving the  transformed points and residuals after a  successful transformation  Result values are in       186             current units and CS  type  like nominal points    This command results in as many result packets  as specified points through the nominal actual  input points list  This approach is similar to the  GetReflectors command  See chapter   Transformation Procedure    in chapter 8 for  details     Residuals are the difference between the nominal  and the transformed actual points           struct GetTransforme
173. ionName  32    unsigned short cProbeCompensationComment  128         Get SetProbeCompensationCT RT    Command structures to get set the ID of active  Probe compensation  The  Get SetProbeCompensation command  takes delivers the compensation ID as only  parameter           struct SetProbeCompensationCT     struct BasicCommandCT packetInfo   int iInternalProbeCompensationId   i    struct SetProbeCompensationRT      struct BasicCommandRT packetInfo   hi    struct GetProbeCompensationCT      struct BasicCommandCT packetInfo   he    struct GetProbeCompensationRT     struct BasicCommandRT packetInfo   int iInternalProbeCompensationId   hi       GetTipToProbeCompensationsCT RT    Command structures to get Tip to probe  Compensation properties  The  GetTipToProbeCompensations command       198          retrieves all such compensations defined in the  Tracker Server  The answer consists of as many  answer packets as tips are defined in the server  database  These resolve the relation between  compensation name  string  and compensation  ID  numerical   Each packet  in addition  a  redundancy   contains the total number of  compensations  i e  the total number of packets  to be expected  only for programmer s  convenience   Other properties  such as  underlying probe compensations  comment  etc   serve as information  mainly used for user   interface purpose           struct GetTipToProbeCompensationsCT      struct BasicCommandCT packetInfo         struct GetTipToProbeCompensationsRT  
174. ipCompiInDb     oMeasurementTipCompSet   ProblemStoringTipAssembly   ProblemReadingCompensationDb   oDataToImport   ProblemSettingTriggerSource     Bad  6DResult   oTemperatureFromwWM   oPressureFromwM   oHumidityFromwM   6DMeasurementFace2NotAllowed              ES_RS_AILOK  Meaning  The command terminated  successfully     ES_RS_ServerBusy   Meaning  A previously invoked command  was being processed when the next  command was invoked  The  next  command  was not executed    Note  The application should always wait   until the previous command has terminated   before issuing the next command  This is due  to the asynchronous communication  behavior of the emScon C C   TPI  This  indicates a programming error in the  application     The application did not await  the termination of the previous command   before issuing a new one    This error should not occur when using the  synchronous interface of the COM TPI     ES_RS_NotImplemented   Meaning  A command that is already  specified in the programming interface  but  not yet implemented supported  was being  executed    This may occur in pre releases  Beta  versions  of emScon     ES_RS_WrongParameter   This error applies to commands with only  one parameter    Meaning  The parameter of the issued  command was not accepted and executed   This error is issued if  for example        83         A positive value is expected but the user  passed a negative one       The parameter is out of valid range  Very  often this is due to w
175. is ready only if it is initialized     This enumeration type is used as a parameter of  ES_C_GetSystemStatus        111             enum ES_TrackerProcessorStatus     ES_TPS_NoTPFound   ES_TPS_TPFound   ES_TPS_NBOpen   ES_TPS_Booted   ES_TPS_CompensationSet     ES_TPS_Initialized        e ES TPS _NoTPFound  No Tracker Processor could be recognized     e ES TPS TPFound  Tracker Processor is recognized  but  connection from processor to tracker failed   e ES_TPS_NBOpen  Connection from processor to tracker is    established  but booting failed     e ES_TPS_Booted  Tracker Processor booted  but there is no  valid compensation     e  ES_TPS_CompensationSet  Compensation set available  tracker not yet  initialized    e   ES_TPS_Initialized  Initialization was OK  tracker is ready     ES _LaserProcessorStatus    Additional information about the laser processor   This enumeration type is used as a parameter for  ES_C_GetSystemStatus           enum ES_LaserProcessorStatus     ES_LPS_LCPCommFailed   ES_LPS_LCPNotAvail   ES_LPS_LaserHeatingUp   ES_LPS_LaserReady   ES_LPS_UnableToStabilize     ES_LPS_LaserOff       e ES _LPS_LCPCommFailed  Communication to laser processor failed   This indicates a hardware problem  Report to  Leica service representative     e ES_LPS_LCPNotAvail  The Laser processor is not available  This  indicates a hardware problem  Report to  Leica service representative        112          ES_LPS_LaserHeatingUp   Laser is warming up  This is the normal case  after 
176. ively     5 2 COM TPI Programming  Instructions    5 2 1 VisualBasic and VBA Applications    Due to several problems and bugs in Office 97  it  is recommended to use Office 2000  Excel  2000 Word 2000  for VBA client programming     The following steps apply to VisualBasic VBA   Excel  Access      1  Import LTControl to the project s references  list   Select Project  gt  References  gt  LTControl dll    You may need to browse if dll not shown in  the list   Make sure the selected one matches  the one registered    2  Declare an object of type LTConnect for each  TPI tracker   LTConnect is the only so called  creatable   object  hence the keyword  New            Dim ObjConnect As New LTConnect       3  Declare only one of the TPI controlling  interfaces  either synchronous or  asynchronous  It is not recommended to use  both synchronous and asynchronous  interfaces from within one LTConnect  instance    When doing so  some answers would be       244       duplicated and arrive on    both    channels  making it difficult to handle with an  application    The keyword WithEvents is optional  and  should only be used in combination with  LTC_NM_Event selected as  NotificationMethod  It activates the related  connection point interface for event  handling           Dim WithEvents ObjSync As LTCommandSync  Dim WithEvents ObjAsync As LTCommandAsync       4  Connect to the Tracker Server and initialize  interface pointers  as is typical in an  application startup procedure  In Visual
177. lass and function  declaration is shown here  not the  implementation  Refer to samples for complete  code            class CMyESAPIReceive   public CESAPIReceive          override virtual functions of those      answers you are interested in   protected    void OnErrorAnswer  const   ErrorResponseT amp        void OnGetSearchParamsAnswer  const  SearchParamsDataT amp   searchParams          See Sample 9  EmsyCPPApiConsoleClient  for a  complete example on how to implement the two  classes derived from  CESAPICommand  and   CESAPIReceive       Further see the  revised  Sample 4    Sample 4 2  in emScon 1 5  on how to deal with the  CESAPICommand class  ESCppClient_Step3  and  the CESAPIReceive class  ESCppClient_Step4      4 3 7 Queued and Scattered Data    When the Tracker Server delivers more data  through the TCP IP network than the client is  able to process  it results in    traffic jams      Although  the TCP IP network buffers such data   up to the configured buffer size   single data  packets will be queued  That is  there are no more   gaps  between the data packets  When the client  is notified from the TCP IP communication  framework that data has arrived  it has to react to  this notification by a Read call  depending on  your communication tools  this can be recv   GetData  CAsyncSocket  Receive   etc       These read functions are not able to recognize  packet boundaries  Read functions read all data  that is currently available  In practice  the data       227 
178. le   double   double   double   double   double   double   double   double   double   double   double   double   double   double   double   double   double   double   double   double   double   double   double   double   double   double   double   double   double   double   double   double   double    dAprioriStdDevRotationAngleTotal     double   double   double   double   double   double  hi    packetInfo    measMode    bIsTryMode    triggerStatus   1RotationStatus   iInternalProbeld   iFieldNumber    tipStatus   iInternalTipAdapterlId   iTipAdapterInterface   dPositionl    dPosition2    dPosition3   dStdDevPositionl   dStdDevPosition2   dStdDevPosition3   dStdDevPositionTotal   dCovarPositionl2   dCovarPositionl3   dCovarPosition23   dAprioriStdDevPositionl   dAprioriStdDevPosition2   dAprioriStdDevPosition3   dAprioriStdDevPositionTotal   dAprioriCovarPositionl2   dAprioriCovarPositionl13   dAprioriCovarPosition23   dQuaternion0o   dQuaternionl   dQuaternion2   dQuaternion3   dRotationAnglex   dRotationAngleyY   dRotationAnglez   dStdDevRotationAnglex   dStdDevRotationAngleyY   dStdDevRotationAnglez   dStdDevRotationAngleTotal   dCovarRotationAnglexyY   dCovarRotationAnglexzZ   dCovarRotationAngleYZ   dAprioriStdDevRotationAnglex   dAprioriStdDevRotationAngleY   dAprioriStdDevRotationAngleZ     dAprioriCovarRotationAnglexY   dAprioriCovarRotationAnglexZ   dAprioriCovarRotationAngleYZ   dTemperature    dPressure    dHumidity        This receive only structure describes the 
179. le Reflector  Position Tracking  default   1   Enable  Tracking  This setting also can be controlled  through the SetSystemSettings command     ES_SP_ProbeConfig_Button  Configures the behavior of the probe   buttons  Parameter values  see enum  ES_ProbeConfigButton    ES_SP_ProbeConfig_ButtonEvent  Enables disables events throwing on using  the probe buttons  Parameter values  see  enum ES_ProbeButtonEvent    ES_SP_ProbeConfig_Tip   Configure whether 6Dof measurements are  allowed without a mounted Tip or not   Parameter values  enum  ES_ProbeConfigTip    ES_SP_ProbeConfig_SoundVolume  Parameter values  volume as long  0  No       129    sound  0  7 sound volume selected  0 off  1   soft      7  loud     Note     LaserPointerCaptureBeam    and      Show All6Dmeasurements    are non persistent  settings  They fall back to the default value in  case of server reboot  If applies  an application  must always set these values upon startup     ProbeConfigButton   Parameter values for  ES_C_Set GetLongSystemParameter command in  case of ES_SP_ProbeConfig_Tip parameter type        enum ES_ProbeConfigButton     ES_PCB_SingleClick   ES_PCB_StartStop   he       e ES _PCB_SingleClick   A single button click causes a   ES_SSC_MeasurementProbeButtonDown      event  Typically used to trigger a   StartMeasurement      e ES_PCB_StartStop   A first button  click causes a   ES_SSC_MeasurementProbeButtonDown    event  releasing the button causes a   ES_SSC_MeasurementProbeButtonUp   event  Typi
180. le dCovarl12   double dCovarl13   double dCovar23   double dPointingErrorH   double dPointingErrorv   double dPointingErrorD   double dAprioriStdDevl   double dAprioriStdDev2   double dAprioriStdDev3   double dAprioriStdDevTotal   double dAprioriCovar12   double dAprioriCovar13   double dAprioriCovar23   double dTemperature   double dPressure   double dHumidity     hi       This receive only structure describes the  ES_DT_SingleMeasResult2 packet type in case of  extended statistical mode  Use this variant if  points to be used as input for the Transformation  routine    The flag blsTryMode is set  if system is in  Try  Mode     This is not relevant for common users     See also command  SetStatisticMode        T The format of measurements  statistical  informations and environmental values depend  on current units  Measurements and statistical  information in addition are according current CS   type and applied orientation   transformation  parameters        152       MultiMeasResultT          struct MultiMeasResultT     struct ReturnDataT packetInfo     long lNumberOfResults   enum ES_MeasMode measMode    ES_BOOL biIsTryMode   double dTemperature   double dPressure    double dHumidity    struct MeasValueT data 1               This receive only structure describes the  ES_DT_MultiMeasResult packet type  where a  continuous stream of packets is received during a  continuous measurement    A packet consists of the single measurement and  an array of MeasValueT parameters attac
181. le in Sample 15  folder and code  comments in source files     5 3 6 Sample 18    LiveVideo display application  This sample is  based on the  LTVideo2 ocx  ActiveX COM  control     See Chapter 8   Special Functions   Live Image  display for details     5 3 7 Sample 20    Concerning its functionality  this sample is  similar to Sample 5  i e  an LTControl  based       286    client  However  it is based on Borland Delphi 7  instead of Visual Basic     If no Delphi 7 programming environment is  available  you may download a trial version from  Borlands homepage     For details  refer to the  Readme txt  file in the  Sample20 folder and to heavily commented code        287       6  C   Interface    6 1 Client Programming with C     6 1 1 Introduction    The samples 14 and 15  see chapter 4  COM   Interface  show how to embed the LTControl  COM object into C  applications    However  there is also a C  class  interface  similar to the C   class  interface     In order to use this interface  the  NET  framework and VisualStudio V7   VisualStudio NET  is required for client  application programming     6 1 2 C  Application Programming    The C  class interface is represented by the  include file  ES_MCPP_API_Def h   MCPP relates  to  Manged C     This file defines two abstract  classes   CESCSAPICommand  and   CESCSAPIReceive   from which a C  application  must derive its own classes  This is quite the same  approach as for the C   interface    Note the name prefixes  CESCSAPI   C
182. lectNotificationMethod method should be  Zero     LTC _ NM Event    Events are used to notify the client on  asynchronous answers  sync and async  interface   The targetHandle and cookie of the  SelectNotificationMethod method should be  Zero     LTC_NM_WM_CopyData   The client is notified by aWM_COPYDATA  message upon data arrival  The arrived data  block is transferred with the message    See Win32 API documentation on  WM_COPYDATA for details    The handle of the window that gets the  message must be passed through  targetHandle  If there are multiple LTControl  instances  more than one tracker   the call of  SelectNotificationMethod for each LTControl  instance must get a different cookie  in order  to identify incoming messages with the  respective tracker  The number of cookies is       249       unlimited  They are passed to the client  through the pCopyDataStruct   dwData  member  The transferred data needs to be  interpreted by using the structures defined  in the C TPI as masks     e LTC_NM_WM _Notify  The client is notified by a user defined  message  WM_USER XXxX or a  registered  message     The CopyData method has one  cookie for each tracker  Other methods have  cookies only if there is more than one  tracker  The cookie is available as wParam at  the client application  The handle of the  window that gets the message must be  passed through targetHandle   Only the size of the block is passed with the  message  through  Param   The GetData    method of the LTCo
183. list  which is  used as input data for the Transformation  process      ES_C_AddTransformationNominalPoint  Adds a point to the transformation input  nominal point list  Values are expected in  current units  current CS type   Transformation parameters are not taken  into account     ES_C_AddTransformationActualPoint   Adds a point to the transformation input  actual point list  Values are expected in  current units  current CS type and according  current transformation settings  in contrast  to AddTransformationNominalPoint      ES_C_SetTransformationInputParams  Sets the input params for the  transformation    Values are expected in  current units and current CS type  No  transformation applies   For all  transformation related commands  see  Section 9 2 for details    Input Standard deviations should take one of  the constant values defined in the chapter     Constants for Transformation     TPI  Reference     In particular  they one of the following  values should be assigned    0 0     If parameter to be fixed    1 0E 35     If parameter unknown  or       70    1 0E 15     If parameter approximately  known    Rather use the predefined constant symbols  than hardcoded numerical values     ES_C_GetTransformationInputParams  Gets the currently active transformation  input parameters     ES_C_ CallTransformation   Triggers the transformation parameter  calculation process  The 7 transformation  parameters  including statistical information   are returned as a result  Values 
184. ll not be  recognized  If beam catched at zero position         143    bSendUnsolicitedMessages   If this flag is set to true  the system sends all  error messages as they occur  This flag  should always be true  Otherwise neither  error events nor system status  change  events will be issued  These events should be  suppressed only in real special situations     bSendReflectorPositionData   If this flag is set to true and a reflector   Probe  is locked on by the tracker  the system sends  the current reflector position  max  3  measurements per second   These are issued  even when no continuous measurement is in  progress  They can be used to view the  Reflector probe movement on applications  with graphic representation of reflector  movement  Do not regard the position values  as accurate measurements  They are of  limited accuracy    See structs  ReflectorPosResultT  and   ProbePosResultT  for details     bTryMeasurementMode   If this flag is set to true  the system delivers  all results in the try mode  This is a Leica  internal feature and therefore  undocumented  It can be ignored by  application programmers  The effect is just  that     if set to true     the value is  echoed   with each measurement     bHasNivel   A hardware Configuration issue  This flag  tells the system that a Nivel20 sensor is  attached  Measurements with the sensor are  now possible  The system cannot  automatically detect whether a Nivel sensor  is attached  Hence you must tell it the system  b
185. log message sector erase failed    4261 FLASH  ERROR  writing of a err log message failed    i             4350 SPI  ERROR  Receive timeout occurred    4351 SPI  ERROR  Transmit channel not ready        H   4400 SYNCH  ERROR  No external synch input received   a   4450 CCIR  ERROR  invalid command parameter    Eo    4500 FLTABHD  REMARK  parameter table is empty    4501 FLTABHD  REMARK  recovery of the corresponding table failed   4502 FLTABHD  WARNING  read parameter table is not valid    4510 FLTABHD  ERROR  FLASH write error    4511 FLTABHD  ERROR  FLASH read error    4512 FLTABHD  ERROR  reset of a parameter table failed    4513 FLTABHD  ERROR  module initialization failed or was not done   4514 FLTABHD  ERROR  malloc error occurred    4515 FLTABHD  ERROR  parameter table write error  crc check was not successful    4516 FLTABHD  ERROR  sector erase error    4550 CAM  ERROR  invalid Z CAMCOM answer    4551 CAM  ERROR  no valid camera FPGA version     EmScon 2 1 TPI Programmers Manual   Revison  April 27  2005       341    
186. lt    ES_DT_ContinuousProbeMea  sResult       ES_DT_ReflectorPosResult    ES_DT_ProbePosResult          3D Structures    6DoF Structures                   SingleMeasResultT ProbeStationaryResultT  MultiMeasResultT ProbeContinuousResultT  ReflectorPosResultT ProbePosResultT       The ES_DT_SingleMeasResult2    SingleMeasResult2T and ES_DT_MultiMeasResult2    MultiMeasResult2T packets   commands are  extended variants of the relatives without the  2     in their name  The only difference is that these  versions contain extended  statistical        46       information  Applications passing measurements  to the  CallTransformation  command should use  the  2   variants since the transformation routine  requires these extended statistics  See also   SetStatisticMode     command     3 3 C  Language TPI Reference    3 3 1 Constants    This section names the constants that can be used  with C C   TPI programming     The application needs to include the file   Constant h  in addition to  ES_C API Def h      Constants for Transformation    These constants are used for the Weighting  Scheme of the Transformation process  see  Section 9 2 6       const double ES_FixedStdDev   0 0   ES FixedStdDev    Use this value    0 0  to indicate a parameter as  fixed     ES UnknownStdDev  const double ES_UnknownStdDev   1 0E35     Use this value to indicate a parameter as  unknown  not fixed      ES ApproxStdDev  const double ES_ApproxStdDev   1 0E15     Use this value to weigh parameters according
187. ltStatus     e OnSystemStatusChange   is called for every  status change event  For status values  see       220       enum  ES_SystemStatusChange     e Note that virtual functions are only called if  defined int the derived receiver class   Particular arrival data can be ignored if the  appropriate virtual function definition is  omitted     e Attention  Make sure the signature of the  virtual function in the derived class exactly  matches the signature in   CESAPIReceive     However  the keyword  virtual  is optional  in the derived class     e Mismatching signatures will result in not   calling the functions  The compiler cannot  detect such kind of errors     e Itis therefore recommended to copy paste  the virtual function header from  CESAPIReceive to the derived class     4 3 C   Language TPI  Programming Instructions    4 3 1 Sending Data    The class CESAPICommand contains a virtual  function SendPacket    which must be overwritten   This approach allows convenient  Send      command functions     Dealing with C data structures for sending  commands is no longer required  as they are  completely  hidden   Use the related member  functions of CESAPICommand instead     4 3 2 Receiving Data    In order to select the data the application is  interested in  CESAPI Receive offers a method  ReceiveData  which is called on data arrival       221    events  as well as numerous virtual member  functions      Dealing with C data structures for receiving data  is no longer requir
188. ly  the  value dOmega and dPhi are set as dRot1 and  dRot2 parameters of StationOrientationDataT  to  be passed with the SetStationOrientationParams  command     See special chapter  Orient to Gravity procedure   in chapter 8        180                struct CallOrientToGravityCT     struct BasicCommandCT packetInfo        i    struct CallOrientToGravityRT       struct BasicCommandRT packetInfo   double domega   double dPhi     hi       Error codes    A return status other than ES_RS_AIIOK  0   means that the command could not be completed   In addition to the values defined in  ES_ResultStatus  the CallOrientToGravity  command answer status can evaluate to one of  the following values    Code Description    20010 An unknown error occurred  F   20011 Socket initialization failed  F   20012 OLE COM initialization failed  F   20013 Reading resource string failed  F   20014 Error on sending data    20015 Error on receiving data   20016 No answer within reasonable time   20017 Error on saving results to database  F    20018 Too many retries due to unstable Nivel  liquid   20019 Invalid count of samples specified min 2   max 10    20020 There was an unexpected command  answer   20021  Some  Nivel results out of valid range    20022 No Nivel connected  or Nivel flagged off    20023  POS270 or  POS90 expected as  command line argument  F     Errors marked with  F  are unanticipated fatalities     CallintermediateCompensationCT RT    Command structures for executing an     Intermedia
189. meraMode cameraMode   hi  GetProbesCT RT    Command structure to get Probe properties   GetProbes command retrieves all probes defined  in the Tracker Server  The answer consists of as  many answer packets as probes are defined in the  server database  These resolve the relation  between probe name  string  and probe ID   numerical   Each packet  in addition  a  redundancy   contains the total number of  probes  i e  the total number of packets to be  expected  only for programmer s convenience    Other properties  such as probeType  serial  Number  comment  etc  serve as information   mainly used for user interface purpose              194          struct GetProbesCT       struct BasicCommandCT packetInfo      i    struct GetProbesRT          struct BasicCommandRT packetInfo   int iTotalProbes   int iInternalProbeld   long 1SerialNumber   enum ES_ProbeType probeType   int iNumberOfFields   unsigned short cName  32    unsigned short cComment  128     hi   GetProbeCT RT    Command structure to get the ID of active Probe   The GetProbe command delivers the currently  active probe by its ID  Currently set as the active  one in the database            struct GetProbeCT      struct BasicCommandCT packetInfo      i    struct GetProbeRT     struct BasicCommandRT packetInfo   int iInternalProbeld   hi       GetTipAdaptersCT RT    Command structure to get measurement Tip  properties  The GetTipAdapters command  retrieves all tip adapters defined for the Tracker  Server  The answer con
190. meters    was omitted  the     deltaHz    and    deltaVt    values of the click event  were not correct for certain types of video  cameras    LTVideo2 OCX versions 2 0 0 15 and higher   delivered with emScon versions  gt   2 0 55  do no  longer require calling    GetCameraParameters     explicitly by the application  The application may  call it for informational issues  but in most  applications     GetCameraParameters    may never  get used        308       Sample 18    This Visual Basic sample demonstrates how to  implement a Live Video image based on the   LTVideo2 ocx  ActiveX component     Note that  LTVideo2 ocx   part of the emScon  SDK  must be registered first     If no Visual Basic development environment is  available  the code can easily be ported to VBA   Excel  or any other MS Office application with  VBA support     Sample 18 demonstrates the full functionality of  the control  including GetCameraParameters  events and  Click  handler     The code is simple enough to be self  explaining   Further details see  Readme txt  file in Sample18  folder and code  comments in source files     Sample 19    This C    MFC  sample demonstrates how to  implement a Live Video image without using the   LTVideo2 ocx     It is not recommended to use this approach for  Windows  platform targeted applications     For Windows based applications  we highly  recommend rather to use the  ready to use   LTVideo2 ocx control for implementation of  emScon LiveVideo  LTVideo2 ocx is par
191. mmand structures for setting getting the  parameters for the Stationary Measurement  mode           struct SetStationaryModeParamsCT     struct BasicCommandCT packetInfo   struct StationaryModeDataT stationaryModeData         struct SetStationaryModeParamsRT       struct BasicCommandRT packetInfo   hi    struct GetStationaryModeParamsCT       struct BasicCommandCT packetInfo   he    struct GetStationaryModeParamsRT      struct BasicCommandRT packetInfo    struct StationaryModeDataT stationaryModeData   hi       Fix See struct  StationaryModeDatalT  for details     Set GetContinuous TimeModeParamsCT RT    Command structures for setting getting the  parameters for the Continuous Time  Measurement mode        163                struct SetContinuousTimeModeParamsCT     struct BasicCommandCT packetInfo   struct ContinuousTimeModeDataT continuousTimeModeData      i    struct SetContinuousTimeModeParamsRT         struct BasicCommandRT packetInfo         struct GetContinuousTimeModeParamsCT      struct BasicCommandCT packetInfo      i    struct GetContinuousTimeModeParamsRT      struct BasicCommandRT packetInfo    struct ContinuousTimeModeDataT continuousTimeModeData   hi       By See struct  ContinuousTimeModeDataT  for  details     Set GetContinuousDistanceModeParamsCT RT    Command structures for setting getting the  parameters for the Continuous Distance  Measurement Mode           struct SetContinuousDistanceModeParamsCT     struct BasicCommandCT packetInfo   struct ContinuousDi
192. must wait until the  previous command has finished  before       92    issuing a new command  asynchronous  behavior      ES_RS_NoCopyProtectionDongleFound  Meaning  The copy protection dongle is  missing    Note  Make sure the dongle is connected at  the correct port     ES_RS_ ModuleNotActivated   Meaning  The copy protection dongle does  not qualify to use the specified module   Note  Refer to Leica representative to get a  dongle field  upgrade     ES_RS_ModuleWrongVersion   Meaning  The copy protection dongle does  not qualify to use the specified module  version    Note  Refer to Leica representative to get a  dongle field  upgrade     ES_RS_DemoDongleExpired   Meaning  The dongle is not activated or has  expired    Note  Refer to a Leica representative  A field  upgrade might be provided     ES_RS_ParameterImportFromProbeFailed  Meaning  Importing of a probe  compensation failed    Note  Make sure Probe has information in its  memory  Also check for potential version  conflict     ES_RS_ParameterExportToProbeFailed  Meaning  Exporting of a probe  compensation failed    Note  Check for potential version conflict     ES_RS_NotTrkCompWithMeasCamera  Meaning  The selected Tracker  Compensation was not made with a T Cam  mounted  This compensation must not be       93    used with a Tracker wit T Cam mounted   Note  Select a different compensation     ES_RS NoMeasurementCamera  Meaning  No T Cam is available   Note  Mount the T Cam     ES_RS_NoActiveMeasurementCamera  Meani
193. n   ES_MCPP_API Def h  needs to be traced     Further details see  Readme txt  file in Sample 16  folder and code  comments in source files     6 1 4 Sample 17    This sample implements a C  emScon application  based on the C  class interface  The C   interface  cannot be used directly in C  applications  A       289    specific C  class interface is therefore provided as  described above    Note the difference to Samples 14 15  where the  emScon COM interface was used  The one and  the same COM object ca be used for C   and C   as well as for visual basic  VBA  e g  Excel  and  VisualBasic NET applications     The programming approach is quite the same as  for the C   interface  Derive classes from both    CESCSAPICommand  and  CESCSAPIReceive   classes  override the  SendPacket  virtual function  in  CESCSAPICommand  and override those  virtual functions of  CESCSAPIReceive  in which  the application is interested in     The application must provide Socket  communication  and the same conditions as for  C   applications apply  Commands are invoked  by calling  CESCSAPICommand  member  functions and arriving data from the socket must  be passed to the  CESCSAPIReceive  ReceiveData   Parser  Note that only one packet at a time must  be passed to the parser  The sample shows one  possible approach  First always peek the packet  header  then only read as many bytes as the     packet  size    variable indicates  The helper  method CESCSAPIReceive  GetPacketHeader   is  useful in
194. n C language TPI  these values are  explicitly enumerated     F See TPI _C_AP1_Def h in SDK  for enum  definitions  A type library viewer will also show  the numerical values    Example    Enum definition        254          enum ES_TrackerTemperatureRange     ES_TR_Low   ES_TR_Medium   ES_TR_High   hi       ES_ TR_Low  0  TR_Medium 1 and  ES_TR_High 2    e Command ina VB application       Ob jSync SetTemperatureRange ES_TR_High       e Command in  old version  VBA          Ob jSync SetTemperatureRange 2       Only use the second approach if the first one is  not supported with your programming  environment     5 2 6 Proper Interface Selection    Unlike the C and C   TPI  the COM TPI is a DLL  library and not an include file  This DLL provides  an easy to use programming interface for the  Tracker Server  This makes it suitable for  programmers with minimal programming  expertise to design simple tracker applications   The COM TPI also opens doors to programming  languages such as VisualBasic  Delphi  VB NET   VBA  Office Macro Languages  etc     The interface is made  up of a so called COM  object  It is designed as an ATL DLL COM server   The DLL is named  LTControl dll    and comes as  part of the emScon SDK  LTControl provides  built in TCP IP communication     The LTControl COM object DLL is based on the  tracker server C   TPI  the Win32 Sockets 2 0 API  and VC   ATL  The LTControl dll is  in a sense  a  Tracker Server C   Client  However it acts as  Server from applica
195. n measurement precision loss  Only  change these values if really required due  instable conditions  ground vibrations etc    TargetStabilityTolerance is a distance  parameter and is in current length  units   TargetStabilityTolerance must lie between  0 005 and 0 1 Millimeter  Leave this value as  low as possible   Default is 0 005    RetryTimeFrame is in milliseconds in the  range between 500 and 5000    Related structure  AdmParamsDataT     ES_C _GetAdmParams   Queries the currently valid ADM  parameters    Related structures  SetAdmParamsCT   SetAdmParamsRT and AdmParamsDataT     ES_C_SetSystemSettings   Sets system settings  a collection of flags to  control the behavior of Tracker Server    See struct  SystemSettingsDataT   for details   Related structures  SetSystemSettingsCT   SetSystemSettingsRT and SystemSettingsDataT      ES_C_GetSystemSettings  Queries the currently valid System Settings   Related structure  SystemSettingsDataT     ES_C_ StartMeasurement   Triggers a measurement     regardless of the  measurement mode  I e  depending on  selected mode  Start Measurement may start  a Stationary3D  a StationaryProbe   a  Continuous3D  or a ContinuousProbe  measurement    Once a continuous measurement  with       64    unlimited time points  has been started  it  can only be stopped on using  ES_C_StopMeasurement  apart from beam  break     Note     StopMeasurement    can also be used to  interrupt some other lengthily taking  but  deterministic  commands  Except on 
196. n parameters of the transformation   translation  rotation angles  scale  together with  their standard deviations  The standard deviation  of a fixed parameter is zero        328          Transformed points and residuals   The command Get TransformedPoint returns   a list of structures  each containing a transformed  point together with its covariance matrix and the   three coordinates of the residual vector    residual   nominal     transformed    The covariance matrix of the transformed point  takes into account the covariance matrix of the  actual point and the 7 by 7 covariance matrix of  the transformation calculated  The covariance  matrix of the residual is obtained by adding those  of the nominal and the transformed point   Statistics   The command CallTransformation also  returns the    e RMS of residuals  e Maximum deviation  e Variance factor  RMS of residuals  The RMS of residuals is defined as    5  residual  RMS  4           noEquations    where the number of equations is the number of  fixed or weighted nominal coordinates   Maximum deviation   The maximum deviation is defined as    maxDev   max     i 1  n       residual      where fixed and weighted nominal coordinates  are taken into account     Weighted residual square sum    The transformation algorithm determines the  values of the transformation parameters in the  weighted least squares sense  This means that the  following target functional is minimized        329    RSS     residual     weightMatrix  r
197. nRemoved   ES_SSC_TPConnectionClosing   ES_SSC_ServerClosing   ES_SSC_ServerStarted        ES_SSC_DistanceSet   Precondition is that the system is equipped  with an ADM and is set to     KeepLastPosition     one of the parameters  controlled by Set GetSystemSettings   This  event is fired as soon as the beam is  re    locked on to the target and an ADM  measurement has been performed  a few  seconds after the target has been placed to a  stable position while beam attached   From  now on  measurements can be continued   This mode is very convenient since it is not  necessary to go back to the BirdBath after a       114       beam break   For Probe  6DoF  measurements  this flag  MUST always be true     q It is not fired when the system flag Keep  Last Position is not active     ES_SSC_LaserWarmedUp   This event is fired once the tracker is  warmed up  after system   laser start  about  20 minutes after the laser was switched on    Also see description of enum   ES_LaserProcessorStatus   The laser  processor status  warmed up or not  can also  be queried in an active way  polling  by  using  ES_C_GetSystemStatus        ES_SSC_XXX_Changed   These events are fired whenever there is a  change of one of the system settings   Parameters  Modes  Regions   Compensations  or Hardware  those  detected automatically  such as TCam  Probe     Tip    ES_SSC_MeasStatus_NotReady  ES_SSC_MeasStatus_Busy    ES_SSC_MeasStatus_Ready   This event informs about a Measurement  Status change  Ready 
198. nction is used to measure the tilt of the  tracker s primary z axis  standing axis  with  respect to the vertical  This can be used to orient       310    the measurement network to gravity  The tilt is  specified by two angular components about the  tracker s internal x and y axes     Related Command    e CallOrientToGravity    Comments    e This command is only available in  combination with a Nivel20 Inclination  Sensor     e Executing this command drives the tracker  head to 4 different positions on the xy  plane     1  Taking Nivel20 measurement samples     2  In addition  the station inclination  parameters Ix and ly are calculated and  returned as result parameters     e Executing this command does not     implicitly    apply any orientation values to  the system     e In order to  activate  the station orientation  to gravity  the two result values  Ix and ly   must be explicitly set with the command  SetStationOrientationParams  Rotation angles  rotl and rot2     See Section 9 2 for mathematical  description     8 1 5 Transformation Procedure    See Section 9 2 for a detailed discussion of the  Transformation issue     This procedure matches a measured set of points  to a given set of nominal points by using a least  squares  best fit method  The procedure calculates  the 7 parameters  x y z  omega  phi  kappa  scale    which describe the  transformation filter    to be  applied to the measured points in order to       311    represent these in the coordinate system 
199. nd  StartMeasurement    8  Execute the command Change Face  which  puts the Laser Tracker from Face I to Face II   The pointing to a fixed reflector position from  a station should be the same in both faces   TPI command  ChangeFace    9  Execute the Stationary Measurement in Face II  and save it   TPI command  StartMeasurement     10  Execute the command Change face  which  puts the Laser Tracker from Face II to Face I   TPI command  ChangeFace     11  Repeat the steps 5   10 for all target  locations     Procedure   Calculation    Devv   vertical angle Face I     vertical angle Face  I       320    Devn   horizontal angle Face I     horizontal angle  Face II    Both measurements are in Face I representation   Face II measurements are represented in Face I   Example   Devv   90 7289893  90 7287338   0 0003 Deg  Devn   269 9877001  269 9879985    0 0003 Deg  Tolerances   The recommended tolerances of the deviations  are    Vertical angle    13cc  0 0012 Deg    Horizontal angle    13cc  0 0012 Deg     When the tolerance is exceeded  an Intermediate  Compensation is recommended        321       9 Mathematics    9 1 Point accuracy    Throughout Emscon point coordinates are stored  together with a 3x3 covariance matrix  It is a  symmetric 3x3 matrix with the squares of the  respective standard deviations on the diagonal     2  stdDev  covar     covan    2  covar   stdDev   covar      2  covar  covar    stdDev     The error ellipsoid of the point is defined by the  eigenvectors an
200. neither searched nor attached     ES_C_ PointLaserHVD   Same as ES_C_GoPositionHVD  laser beam  is sent to the specified location   but a  reflector is neither searched for nor attached     ES_C MoveHV   Command to start laser beam movement in  horizontal  vertical direction  or to stop  movement  Zero values mean  stop  movement       The parameters for MoveHV are  signed   values in order to specify the direction of  movement  The parameters are  speed values  in the range between  100  lt  x  lt  100    ES_C_GoNivelPosition   This command moves the tracker head to  one of the defined Nivel20 positions  1 to 4    The laser tracker moves at a slow speed to  avoid disturbing the Nivel sensor  This  command is used for the orient to gravity  procedure     ES_C_GoLastMeasuredPoint   Positions the laser beam to the location that  has been last measured successfully in  stationary mode     ES_C _ FindReflector   Searches a reflector at the given position   Reflector is attached if found  The approx  distance is only required to calculate the     opening angle    of the laser beam from the  given search parameter  An inaccurate  approx distance only has the effect that the  real search radius will be bigger or smaller       68    than specified in SetSearchParams  It has no  effect to measurement quality  Approx  distance parameters are in current Length  Unit  Although no range limitation applies in  theory  there is a practical limitation given by  tracker working space  100 mm 
201. ng  The mounted T Cam does not  match the one stored in the database   Note  Make sure mounted T Cam matches  the camera information stored in the  database     ES_RS_ NoMeasurementCamerasInDb  Meaning  No T Cam is defined in database   Note  Provide camera information in  database     ES_RS_NoCameraToTrackerCompSet  Meaning  No T Cam to tracker  compensation is activated    Note  use the   SetTCamToTrackerCompensation      command to activate a compensation     ES_RS_NoCameraToTrackerCompInDb  Meaning  No T Cam to Tracker  compensation is available in database   Note  Perform a T Cam to Tracker  compensation     ES_RS_WrongActiveCameraToTracker  CompInDb   Meaning  T Cam to Tracker compensation   does not match the mounted camera    Note  Use the correct camera  or provide a   compensation     ES_RS_NoMeasurementProbe  Meaning  No probe can be  seen  by the  camera    Note  Move the probe to the camera s  viewing space        94    ES_RS_NoActiveMeasurementProbe  Meaning  The detected probe cannot be set  as active    Note  Make sure probe communication is OK   cable problem      ES_RS_ NoMeasurementProbesInDb  Meaning  No Probes are available in  database    Note  Import probe information     ES_RS_NoMeasurementProbeCompSet  Meaning  No probe compensation is  activated    Note  use the  SetProbeCompensation   command to activate a compensation     ES_RS_NoMeasurementProbeCompInDb  Meaning  No probe compensation can be  found in database    Note  Import or provide a probe  c
202. ngeFace  Changes the tracker face before the laser  beam is attached to the same position     ES_C _GoBirdBath   3D Modes  Laser beam is sent to the Bird  bath  The beam is    attached    to the reflector in  the Bird bath and the Interferometer distance  is set to the known Bird  bath distance  This  command is especially important for LT   series trackers without ADM  For such  tracker  there is no other way to set the  interferometer distance    6D Modes  GoBirdBath does not make sense  for a Probe  This command thus has a  different effect while one of the 6D  measurement modes is active  The laser  beam is sent to zero position instead  which  is on the opposite side of the BirdBath    where it can then be catched with the probe     ES_C GoPosition   Laser beam is sent to a specified location   followed by an implicit  Find reflector     The  beam is  attached  to the reflector  if found    Input is in current units  CS type and  according to applied orientation    transformation parameters  No range  limitations apply to these parameters in  theory  but there is a practical limitation  given by tracker working volume  The  useADM flag should always be set for  trackers equipped with an ADM    If ADM flag is not set  the IFM distance is  calculated from the supplied coordinates and       66    is set as the valid one  To be used with  caution     The search time depends on the search  radius  Large search radii result in extended  search times  unless limited by the sear
203. nguage TPI Programming  Instructions crsciscccercicecicec saccdeetsiedicangeriuicsevaigeasaete 205  3 5 1 TCP IP Connection c e 205  3 5 2 Sending CommandS                  ccceeeeeeeeeeeeeeeees 205  3 5 3   Initialization Macros           cccccceeececeeeeseeeeeeeeeeees 206  3 5 4 Excurse  C   Initialization           eee 207  3 5 5 Answers from Tracker Server    207  3 5 6 Asynchronous Communication               c068 208  3 5 7 DataArrived Notification           ccc eeeee sete eens 208  3 5 8 Data arrival  Traffic JaMs  ou    eee eens 208  3 5 9 PacketHeader Masking               ccccceeeeeeeeeeees 209  3 5 10     Command Subtype Switch    ee 210  3 6 C Language TPI   Samples             ccssssseee 212  361 Sample 3 ninna aneia t 212    4 C   interface    4 1 Class  based TPI Programming                 216  AAA PreCONnditlONS 2sccctil cee hotiesde i eeiientecads 216  4 1 2 Platform ISSUCS          eee eee eeeeeeeeeeeeeeeeeees 217  4N TOPP penea a 217   4 2 C   Language TPI Reference                  217  4 2 1 CESAPICommand Class                 cccceeeeteeees 217  4 2 2 CESAPIReceive Class               ccceeeeeeeeeeeeeeeeees 219   4 3 C   Language TPI Programming   Instr  CtionsS  osissa lath cetceec tect Decent state te laced 221  4 3 1  Sending Data tcc csteccaccdas ences cen tanesenes 221  4 3 2 Receiving Data              cccccceeeeseeeeeeeeeeeeeeeeeees 221  4 3 3 Class Design Issues                cccceeeeeeeeeeeeeeeeeees 222  4 3 4 Data Structure Wrapper Classes   
204. nnect interface must be  called in order to retrieve the data     The method SelectNotificationMethod is defined as  follows           HRESULT SelectNotificationMethod     in  LTC_NotifyMethod notifyMethod    in  long targetHandle    in  long cookie         q Implementing an event sink in a Windows  application  using the  LTC_NM_WM_COPYDATA or  LTC_NM_WM_Notify is recommended     Using  LTC_NM_Event   although possible  as  Sample 7 shows   is complicated    Sample 7 demonstrates all different approaches  with disabled code sections  Although most  complicated  the  LTC_NM_Event  method is  enabled as the default     5 2 4 Exceptions and Return Types    All methods interfaces have a HRESULT return  type  as per COM design  Applications are  usually not required to test these return codes        250       since method failures are signaled by exceptions   These exceptions come with error information   mainly a text string describing the reason for  failure     q Exceptions must be  caught   Unhandled  exceptions lead to program aborts     Exception Handling in Visual Basic    Each VB function calling interface methods must  provide the following statement before the first  call           On Error GoTo ErrorHandler       At the bottom of the function  before the EndSub  statement  the following  minimal  code block  must be inserted           Exit Sub  ErrorHandler   MsgBox  Err Description        Err Description is only a default minimal error  text  always in English   Of co
205. ns   int iInternalCompensationId   unsigned short cTrackerCompensationName  32    unsigned short cTrackerCompensationComment  128   unsigned short cADMCompensationName  32    unsigned short cADMCompensationComment  128    ES_BOOL bHasMeasurementCameraMounted   ES_BOOL bIsActive    hi   CheckBirdBathCT RT    Command structures to check the Bird bath  position of the current  selected reflector  Values  are in current units           struct CheckBirdBathCT       struct BasicCommandCT packetInfo   hi    struct CheckBirdBathRT       struct BasicCommandRT packetInfo   double dInitialHzAngle    double diInitialVtAngle    double dInitialDistance    double dHzAngleDiff    double dvtAngleDiff    double dDistanceDiff        GetTrackerDiagnosticsCT RT    Command structures to read tracker diagnostic  data  This is a command mainly used for service  purposes                 189          struct GetTrackerDiagnosticsCT      struct BasicCommandCT packetInfo         struct GetTrackerDiagnosticsRT      struct BasicCommandRT packetInfo    double dTrkPhotoSensorxVal    double dTrkPhotoSensorYVal    double dTrkPhotoSensorIVal    double dRefPhotoSensorxVal    double dRefPhotoSensoryVal    double dRefPhotoSensorIVal    double dADConverterRange    double dServoControlPointxX    double dServoControlPointyY    double dhLaserLightRatio        ait iLaserControlMode   double dSensorInsideTemperature   int iLCPRunTime   int iLaserTubeRunTime   hi  GetADMInfoCT RT    Command structures to read ADM specifi
206. nsations  must be present and active for TCamToTracker   Probe and TipToProbe  supposed all these  compensation processes have once been  performed or imported   Active compensations  are persistent settings that can be changed by the  several    Set    Compensation    TPI commands  or  by selection within the compensation tree   representation in the BUI  Application   See  description of    Get   Compensations    Get   Compensation   Set   Compensation        Selection of TCam and Probe compensation only  mean a    hint    to the system  The compensations  themselves only become really active if a  matching TCam  i e  the compensation must  match the serial number of the TCam  is being  mounted respectively a matching Probe is being  attached and recognized by the camera        26    2 4 4 Initial Steps Description in Detail    Description of some commands that require more    explanation     Initialize Laser Tracker       Implication    Comment       Initialize encoders and  internal components          This command has to be  performed every time  you set up a new Leica  Tracker system station  It  is strongly recommended  to use this function 2 3  times a day to initialize  encoders and its internal  components  This is  important due to thermal  expansion of the tracker  hardware  which has a  direct influence on the  measurements          27       Set Current Environmental Parameters          Implication Comment  Calculate and Set index With the input of the  of refrac
207. nt data  has to be provided through the TPI  Unless one  wants just to VIEW the data through the DRO    The BUI can be launched from within an  application  see Sample 13   if not already  running  However  it is also possible to start the  BUI manually and execute a  data  catcher     application  without BUI launch  after that  Such  an application then is capable to process data   triggered by the BUI  as far as appropriate  handlers are provided     7 1 4 Sample 13    This sample is a  BUI  launcher and   listener     to  launch the emScon BUI from within a client       294    application  That is  the BUI becomes part of the  client application  The client application    BUI  host  is mainly used to  catch  measurements  triggered by the BUI in order to do further data  processing    The application shows how to perform initial  settings  that cannot be set with the BUI  and how  to catch the measurements  triggered from the  BUI   These measurement  results are just written  to the applications dialog  which does not really  make sense because they are already displayed  on the BUI Page  A real application would do  further processing  such as storing the  measurements into a database etc     The sample is in Visual Basic  However  the  principles would not change for a C    application     Further details see  Readme txt  file and code   comments in  BUILaunch frm  source  file in  Sample13 Folder     Also refer to BUI documentation  User Manual   for details        29
208. nter Mode  parameters may not have been set properly  See command   SetSphereCenterModeParams      ES_RS_NoTPFound   Meaning  There is no communication  between the tracker controller and the  tracker server  Either the connection is  broken or the tracker controller did not boot  and connect properly  Often this error occurs  if the application tries to access the tracker  server before the boot process is finished or if  the boot process failed for some reason     For version 1 5 and above  it is  recommended to await the  ES_SSC_ServerStarted event before trying to       86    issue a command    Note  This problem can occur with use of an  External Tracker Server  cable  unplugged damaged  plugged to wrong  connector   This problem is minimized for  LT Controller plus base since both the  tracker server and controller are integrated  in one unit     ES_RS_ NoWeathermonitorFound   Meaning  A command or polling mechanism  could not access an external weather station   The weather station is not  present connected switched on    Note  If there is a weather station connected   check the cable and make sure the power is  switched on  If no weather station is  connected  set the SystemStatusFlag  HasWeatherMonitor to zero   Command  SetSystemStatus   The flag must be   0  in  order to access the weather station     ES_RS_ NoLastMeasuredPoint   Meaning  This error occurs after a command  GoLastMeasuredPoint  when no stationary  point has been measured since last system  boot  The
209. nuousDistanceModeParams  Queries the currently valid Continuous  Distance mode parameters    Related structure   ContinuousDistanceModeDataT     ES_C_SetSphereCenterModeParams   Sets the properties for a Sphere Center  measurement  Radius and SpatialDistance  parameters are in current Length  units  No  range limitation apply to distance and radius  parameters in theory  but there is a practical  limitation given by tracker working space   Related structure  SphereCenterModeDataT     ES_C_GetSphereCenterModeParams  Queries the currently valid  SphereCenterMode Parameters    Related structure  SphereCenterModeDataT     ES_C_ SetCircleCenterModeParams   Set the properties for a Circle Center  measurement    Radius and SpatialDistance parameters are  in current Length  units  No range limitation  apply to distance and radius parameters in  theory  but there is a practical limitation  given by tracker working space    Related structure  CircleCenterModeDataT     ES_C _GetCircleCenterModeParams  Queries the currently valid Circle Center  Mode Parameters    Related structure  CircleCenterModeDataT     ES_C _ SetGridModeParams   Sets the properties for a Grid measurement   Grid value parameters are in current units   and according current CS type  No range  limitation apply to grid parameters in  theory  but there is a practical limitation       62    given by tracker working space   Related structure  GridModeDataT     ES_C_GetGridModeParams  Queries the current Grid Mode Parameter
210. o classes  CESAPICommand and CESAPIReceive  apart from  wrapper classes for each data structure  of the C   TPI      CESAPICommand handles sending of commands  from the client application to the TS and  CESAPIReceive supports receiving and parsing       216    data sent by the Tracker Server to the client  application    The advantage of a class design is the availability  of constructors to perform  struct  initialization   A Tracker Server C  interface is preferable to a C  low level interface  if a C   compiler is available     4 1 2 Platform Issues    Tracker Server client programming remains  platform independent since C   compilers are  available for virtually every platform     4 1 3 TCP IP    This chapter does not touch TCP IP basic issues   See C  TPI section since this topic is independent  from the TPI  type used  except COM interface     4 2 C   Language TPI Reference    4 2 1 CESAPICommand class  SendPacket          virtual bool SendPacket  void  PacketStart  long PacketSize          This virtual function must be implemented in the  class derived from CESAPICommand  Its  implementation depends on the selected TCP IP  socket library    Command Functions    Only a few sample of the class  command  member functions are listed here since these can  be derived directly from the C  interface     Example for a command taking no parameters    Initialize the tracker            bool Initialize          Example for a command taking basic  type  parameters        217        
211. of Parameters    Unless stated explicitly in the command  description  the following units of all parameters  are always in  current units     That is  in those  units the application programmer has selected  with the SetUnits command       Length  units     Angle  units     Temperature  units     Pressure  units     Humidity  units  currently only one  percent     This applies to parameters sent as well as those  received such as coordinates  standard  deviations  meteorological values       e Currently  there is only one exception to this  rule  The command StartNivelMeasurement  delivers the native Nivel20 inclination  readings  These are milli radiants and degrees  Celsius  regardless of currently selected units     e Other units include     Time     units   These are always in milliseconds     unless  stated differently  Example  a Stationary  Measurement Time of  2000  means two  seconds     e String  type parameters   Strings as far as handled through the TPI are  always in UNICODE  arrays of unsigned  short   That is  two bytes are reserved for each  character  As far as pure ANSI text is used  an  application can just ignore each second byte   See sample applications for examples        52    e Enumeration type parameters  These are type   safe with the related enum definition  The  parameters are described at the enum   definition location     3   Valid Parameter Ranges    This applies to parameters being sent to the  system  typically with one of the  Set    comman
212. ommands are  implemented  but all except one are commented  in the sample code  any other call may be enabled  instead   Due lack of synchronization  the  provided sample application will mostly mess   up if sending more than one command     The most simple way to synchronize the  application was providing an old  style key press  user  interface  as done in Sample 9   This means  the user performs synchronization by not  pressing the next key before the answer of the  previous command has arrived     See also the many comments in the code     This sample is preliminary an might be improved  in future SDK versions        291    Further details see  Readme txt  file in Sample 17  folder and code  comments in source files        292       7 Base User  Interface  BUI     7 1 Client Programming and BUI    7 1 1 Measurement BUI versus Compensation  Applications   The emScon software comes with several  graphical User  Interfaces represented by a WEB   application  running on internet explorer     It is important to distinguish between standalone  applications and integrated applications    The Compensation   Field Check  and Tracker  Server modules are pure    stand  alone     applications  For details see the designated  special manuals fore these applications    On the other hand  the so called Measurement      Base User Interface     BUI  does not make sense to  be used as a stand  alone application  except for  system testing reasons    This chapter exclusively addresses the  
213. ompensation     ES_RS_WrongActiveMeasurementProbe  CompInDb   Meaning  The probe seen by the camera does   not match the information in database    Note  Replace the probe by the matching   one  or provide database information   suitable to active probe     ES_RS_CommunicationWithMeasurement  ProbeFailed  Meaning  Possibly a hardware failure  The  probe should be detected automatically   Note  Relocate the probe to try again  Try  with a cable connection if using a cordless  probe  Refer to Leica service if problem still  remains     ES_RS_NoMeasurementTip  Meaning  No Tip is mounted at the probe   Note  Mount a tip        95    ES_RS_NoActiveMeasurementTip   Meaning  The detected Tip cannot be set as  active    Note  Make sure probe communication is OK   cable problem      ES_RS_NoMeasurementTipsInDb  Meaning  No Tips can be found in database   Note  Provide tip definition     ES_RS_NoMeasurementTipCompInDb  Meaning  No Tip compensation can be  found in database    Note  Import or provide a tip compensation     ES_RS_ProblemReadingCompensationDb  Meaning  Compensations could not be read  from database    Note Access to the database has failed  This  error should not occur under normal  conditions     ES_RS_ProblemSettingTriggerSource  Meaning  Trigger source parameters could  not be set    Note Probably a hardware problem  or no  trigger board available with current system     ES_RS_NoMeasurementTipCompSet  Meaning  Tip compensation missing   Note A Tip   Tip Assembly must b
214. on    To access LTControl s interfaces  an object  variable of type LTConnect is needed in the   General  declaration part of the code behind the  application form  Note the essential keyword   New            Dim ObjConnect As New LTConnect       Just after that  declare an object for each one of  the shown types  Note the keyword   WithEvents   In a real application  only one    either a synchronous or an asynchronous  interface     should be declared  Declaring both  as  done here for demonstration purposes  could  result in some duplicate data arrivals and other  confusion            Dim WithEvents ObjAsync As LTCommandAsync  Dim WithEvents ObjSync As LTCommandSync       Connecting   Disconnecting to Server and  Initialization Tasks   A variable of LTConnect object is always required   whereas  in a real application  only one of the  LTCommandSync or LTCommandAsync objects is  required  Depending on the selected notification  mechanism  LTCommandAsync or  LTCommandSync is to be declared with without  event support  WithEvents keyword      The LTCommandSync and LTCommandAsync  variables act like    pointers     These  pointers  must  be initialized with the related properties of  LTConnect        271          e Just after calling the  ObjConnect ConnectEmbeddedSystem    method  initialize the  pointers  as shown  below  In the sample  this is done in the  event handler of the  Connect  button    Further  the notification method must be  selected  SelectNotificationMethod   
215. on and orientation equations are the  inverse form to each other as mappings  For  transformations the map assumes the form    T x    sR   x         9 2 6 Input to transformation computation  Orientation or transformation    In the orientation transformation procedure the  first parameter of the  SetTransformationInputParams command  is choosen as ES_TR_AsOrientation   ES_TR_AsTransformation respectively     Nominal points    Nominal points are added as in the following  example           AddNominalPoint  1 0  2 0  3 0  ES_FixedStdDev  ES_UnknownStdDev   ES_ApproxStdDev  0 0  0 0  0 0         The parameters are the three coordinates together  with their standard deviations and covariances   see Section 9 1 above   We recommend using the  following predefined standard deviations  see  also Section 3 3 1             Coordinate Symbol Value  accuracy       Fixed  exactly ES_FixedStdDev 0 0  known        Unknown  free  ES_UnknownStdDev 1 0E35             Approximately BS_ApproxstaDev  1 0E15    known   reasonable        Weighted  gt  0 0    lt  L0ELO                   Approximately known coordinates are used to  calculate an initial approximation of the  orientation or transformation parameters  In a  minimum configuration  the solution would be  ambiguous without this additional information        327    Actual points    Actual points are added in the following form           AddActualPoint   12 487   5 79687  5 49683  0 0001  0 0001   0 0001  0 0  0 0  0 0         The number an
216. on index  IFM    1 000077    1 000419       Refraction index  ADM          1 000078       1 000425          15          2 3 5 Coordinate Parameter Triplets    The values of coordinate parameter triplets  often  named as Val1 Val2 and Val3  in most data  structures  depend on the currently active  coordinate system type and the currently active  units  In addition  measured coordinate values   output  and positioning values  input  are  transformed according to currently set  transformation  and orientation parameters   Coordinate values for  filters   Sphere  Box  Grid   differ from case to case  Details and exceptions  are explained in the reference section     q The orientation   transformation filters can  be switched off through flags provided by the  system settings  Using the default values for  orientation and transformation parameters    0 0 0 0 0 0   0 0 0 0 0 0 1  mean invariant  transformations                                   Coordinate   Val1 Val2 Val3  system type   Cartesian X Y Z   RHR  LHR    Spherical  H V D   R   Cylindrical  R Phi   H  Z  X Y Z Cartesian    coordinate values    H Horizontal angle   V Vertical Angle   D Distance   Radius    R Radius   PHI Horizontal Angle    H     T Different notations of values in different  systems  Phi instead of H  D instead of R        16    maintain continuity with previous releases of  application software     2 3 6 Persistency    The Tracker Server keeps settings  such as Units   CS type  Reflector type etc   persi
217. on of GetStilllmage is explained  below using code fragments     GetStilllmage must be called with the parameter  ES_SI_ Bitmap  The parameter ES_SI_Jpeg is not  supported yet     e The answer to a successfully executed  GetStilllmage command results in a  GetStilllmageRT data structure     e Apart from the common header information   this structure echoes the file type   imageFiletype  ES_SI_Bitmap   the size of the  file  FileSize   and the first Byte of the file   cFileStart      e The following code accesses the core file data  and writes it to a physical disk file        301             assume pData contains the data  block received     to a GetStillImage  ES_SI_Bitmap  command    long 1FileSize     GetStillImageRT   pData    gt 1lFileSize   char cFileStart     GetStillImageRT   pData    gt cFileStart     FILE  pFile   NULL   if   pFile   fopen  C   Temp  img bmp    wb        NULL         long 1lWritten    fwrite  amp cFileStart  1  1lFileSize  pFile      if  lWritten    1FileSize    printf  File could not be written  n     else   printf   wrote  d bytes n   lWritten      fclose  pFile            e The disk  file can be skipped and a memory     mapped file can be used instead  OR    With the file structure of the Bitmap file  the  bitmap information can be extracted from the  data block and used directly with GDI  functions     In the code above  it was assumed that pData  contained a complete GetStillImageRT structure  with complete file data padded     WinSock2 API   M
218. onParamsCT     struct BasicCommandCT packetInfo   struct SphereRegionDataT sphereRegionData         struct SetSphereRegionParamsRT      struct BasicCommandRT packetInfo         struct GetSphereRegionParamsCT      struct BasicCommandCT packetInfo   he    struct GetSphereRegionParamsRT     struct BasicCommandRT packetInfo   struct SphereRegionDataT sphereRegionData            Command structures for setting getting the  sphere region parameters     Fk See struct  SphereRegionDataT  for details     GoPositionCT RT          struct GoPositioncT         struct BasicCommandCT packetInfo     double dVall   double dVal2   double dVal3   ES_BOOL bUseADM           struct GoPositionRT      struct BasicCommandRT packetInfo   hi       These are structures for invoking the GoPosition  command  Values are in current units   CS type  and according to applied orientation    transformation parameters  When bUseADM is  set  which is the normal case for this command   an ADM measurement is performed and the IFM  distance is set to this new value  If ADM flag is  not set  the IFM distance is calculated from the  supplied coordinates and is set as the valid one   To be used with caution    The useADM flag should always be set for  trackers equipped with an ADM    No range limitations apply to these parameters in  theory  but there is a practical limitation given by  tracker working volume    GoPosition can be seen as a combination of       174          commands  PointLaser   followed by a   FindRefl
219. onfiguration   according to the recommendations   Bit 5 NotAllCorrectedDoubledTwoFaceErrorsAr   0x10  eWithinCompensationTolerance   Not all measurement residuals are within  recommended tolerances   Bit 6 NotAllMechanicalParametersAreInRange    0x20  Not all three  3  mechanical parameters  calculated are within recommended  tolerance  according to hardware specs      The  WarningFlags value is a decimal value  Use a  scientific calculator to convert this value to a  binary value to visualize the flagged bits     Programmatically  in C C     a particular bit is  set if the following expression evaluates to TRUE         lWarningFlags  amp  dwCode     where dwCode is one of the Masks     shown above  For example  0x10     tests for 5th bit  See C  reference     for details  bit operations           CallTransformationCT RT    Command structures for executing an     Transformation    process  including reception of  results   Result values are in current units CS   type   See chapter    Transformation Procedure    in  chapter 8 for details        184          struct CallTransformationCT       struct BasicCommandCT packetInfo           struct CallTransformationRT         struct BasicCommandRT packetInfo     double dTransVall   double dTransVal2   double dTransVal3   double dRotVall   double dRotVal2   double dRotVal3   double dScale    double dTransStdVall   double dTransStdVal2   double dTransStdVal3   double dRotStdVvall   double dRotStdVal2   double dRot StdVal3   double dScal
220. oop to stop   until the event is signaled to be read  The  blocking by the WaitForSingleObject is released  and the loop passes on     Reset the event before available data is read into a  buffer     Call a function ProcessData   that does the  interpretation of the buffer     Queuing  Traffic Jams     There are no provisions to handle    traffic jams  on  the network  A real application needs to make  provisions to handle such situations with a  packet size transmitted in the header of each  packet  The Winsock function setsockopt   may be  used to  tune  TCP IP transmission rate by  increasing buffer sizes     See Win32 documentation for more information  about Winsock API  especially the WSA     function   threads and events    See also  Sample 9   Receiving Data  in the C      TPI section  Notice the comments in the source  code           214    Remarks    This sample can easily be ported to non Win32  platforms  Unix  Linux  and Mac      Creating a    console    application requires the use  of the WSAEventSelect   function with events and  threads     Excurse  Windows Application    This chapter points out the options we had if we  chosen a Windows application instead of a  Console application     For Windows applications  the WSAAsyncSelect    function would be more appropriate  It issues  Window messages instead of events and is  simpler to handle  No separate thread is required   the window message loop takes this part      See Win32 documentation on WSAAsyncSelect  
221. or handling and may need to be run through  the debugger in order to find failure reasons     Interface Design    The user interface design is kept at a minimum  level  for example  unavailable buttons are not  grayed out   Such items are general issues of  Windows programming     Hard Coded Information    The samples may contain some hard coded  information  IP address coordinate values  that  might be adapted to the local environment        21    2 4 Application Initial Steps    2 4 1 Essential Steps    A client application must carry out all steps listed  below upon startup  Omitting some of these steps  may prevent the tracker from measuring or lead  to inaccurate results  Inaccurate results are  difficult to detect     Setting correct environment parameters   temperature  pressure  humidity  or configuring  the system for automatic  environment parameter  reading is crucial     Most of the Settings     Set   commands  remain  persistent  That is  they will be the same after a  system restart  However  it is strongly  recommended that an application always  confirms these settings upon startup  This is  because another application  e g  emScon Base  User Interface  could have accessed the tracker  server in between and could have changed the  settings     Note that most of the sample applications are not  complete to this respect     the intention of the  Samples is to show programming principles only   See also Leica Tracker Training Manual        22    2 4 2 Command Seq
222. or more  than one command  This avoids code duplication     Set Get commands rarely fail  If a Set command  fails  return status not OK   the supplied  parameters are usually out of valid range  The  return status informs about the failure reason     Single Measurement Answers    These are answers that follow to a previously  issued Start lt xxx gt MeasurementCT command   Single measurements are often also referred to as  Stationary measurements     q Applies only when the measurement mode is  set to stationary     e  In case of a failure  which is frequent for  measurement commands   a  Start lt xxx gt MeasurementRT structure with the  error code is returned     e Incase of success  instead of a  Start lt xxx gt MeasurementRT  not designed to  take sensor results   a specifically designed  measurement type related data packet is  received  For example  a  ES_DT_SingleMeasResult type indicates a  SingleMeasResultT structure  and  ES_DT_StationaryProbeMeasResult indicates       42    arrival of a ProbeStationaryResultT     A successful measurement always  returns such a data packet     Multi Measurement Answers    These apply to tracker related continuous    measurements only  The measurement mode is    set to one of the non  stationary modes     In case of failure  as with single  measurement answers  a  Start lt xxx gt MeasurementRT with error code is  returned     In case of success  not only one packet  but  also a series of multi measurement packets  arrive  Each one of t
223. orPosResult    The data packet contains position  information about the reflector  This type of  information is foreseen for special purposes  and can be suppressed    Related data structure  ReflectorPosResultT     ES_DT_SystemStatusChange   The data packet contains information about a  status change  Other than an error event  a  SystemStatusChange event does not mean a  failure    Related data structure   SystemStatusChangeT     ES_DT_SingleMeasResult2  The data packet contains the result of one  single  stationary  measurement  in case the  statistic mode is set to    extended     These  types are mainly used for measurements  used as input to the Transformation routine   See command  SetStatisticMode    The difference is that SingleMeasResult2T  contains more statistical information than the  standard SingleMeasResultT  This is an  advanced feature  The default statistic mode  is    standard      This  type 2 meas result  has  been introduced to avoid changes to already  published TPI definitions with earlier  versions  in order not to break existing  applications      Related data structure  SingleMeasResult2T     ES_DT_MultiMeasResult2   The data packet contains results of a  continuous measurement  in case the statistic  mode is set to    extended       See command  SetStatisticMode     The difference is that MultiMeasResult2T  contains more statistical information than the       50    standard MultiMeasResultT   The default statistic mode is    standard      Related 
224. pdated   The  ES_C_GetEnvironmentParams  and   ES_C_ GetRefractionParams  commands  can be used to retrieve the current values   while the  ES_C_ SetEnvironmentParams   and  ES_C SetRefractionParams  both are  not available in this mode  would return  with an    usage conflict    error      Attention  The weather monitor should be  switched on before starting the emScon server   The weather monitor requires some initialization        110    time after switching on  If values are queried  during this initialization phase  wrong values  may be returned and the weather monitor  remains in indifferent state  This is due to a  problem of the weather monitor hardware  It is  recommended to remove the battery from the  weather monitor and always enable its power  supply before  or at the same time  the emScon  server gets booted     ES RegionType    This enumeration type is used as a parameter for  regions            enum ES_RegionType      ES_RT_Sphere   ES_RT_Box            e ES_RT_Sphere   Region type is a sphere   e ES_RT_Box   Region Type is a box     ES_TrackerProcessorStatus    The sequence of this enum is important  It shows  the state of the tracker processor during startup  of the Tracker Server  The value issued describes  the status of the startup procedure       The tracker can only be booted if there is a  connection to emScon       It can have a valid compensation only if it is  booted       It can be initialized only if it has a valid  compensation       The tracker 
225. pes    This is not convenient and exceeds the typical  Excel programmer s expertise     Even with VB  although structs are available   masking data is not that easy as in C   By  providing some helper functions  data blocks can  be copied to appropriate struct parameters  instead of pointer type casts        ILTConnect  ContinuousDataGetHeaderInfo     ILTConnect  ContinuousPointGetAt     ILTConnect  ContinuousPoint2GetAt     ILTConnect  Continuous6DDataGetAt          This allows extracting information of interest  from data blocks of type ES_DT_MultiMeasResult   ES_DT_MultiMeasResult2 and   ES _DT_Multi6DMeasResult     A VB  VBA  implementation  with comments  of  the ContinuousPointMeasDataReady event handler  that demonstrates usage of these functions reads  as follows        267          Private Sub LtSync_ContinuousPointMeasDataReady   _  ByVal resultsTotal As Long  ByVal bytesTotal As Long       a continuous point meas packet came in  Note that in     case of continuous measurements  due to multiple points    variable size of packet  only   of results and packet size    are passed in  which both are not really needed here      So we first must GET the data  then retrieve information     out of the gotten block       since we are doing function calls to a COM object      LtConnect  that can throw exceptions  we need an error     handler  Note we would not require an error handler in the    other Event Handlers  LtSync_ReflectorsData      LtSync_ReflectorPositionData  beca
226. ping the controller     e ES PCT _IRLaser  There is a wireless connection  through  Infrared Laser     e ES_PCT_IRWideAngle  There is a wireless connection  through  Infrared wide angle sensor     ES _ProbeButtonType    Specifies the measurement probe measurement  button  trigger   This enumeration type is used as  a parameter for the GetMeasurementProbelInfo  command           125       enum ES_ProbeButtonType     ES_PBT_None   ES_PBT_Measurement   hi             e ES PBT None  The probe is not equipped with a  measurement button     e ES PBT Measurement  The probe is equipped with a measurement  button     ES _ TipType    Specifies the measurement tip type  This  enumeration type is used as a parameter for the  GetTipAdapters command  Note  There exist  alternate terms for  Tip   Some talk of    Stylus           enum ES_TipType      ES_TT_None   ES_TT_Fixed   ES_TT_Scanner   ES_TT_TouchTrigger    hi             e ES TT None  Tip type is undefined or could not be  determined     e ES TT Fixed  Tip tip type is a fixed standard tip     e ES_TT_ Scanner  Tip    tip    type is a scanner  I e  a    virtual tip        e ES_TT_TouchTrigger  Tip tip type is equipped with a touch   trigger     ES _ ClockTransition    Specifies the trigger clock transition  This  enumeration type is used as a parameter for the  Get SetExternTriggerParams command   ExternTriggerParamsT sub structure        126          enum ES_ClockTransition     ES_CT_Negative   ES_CT_Positive        hi          e ES_
227. press and  button release  or leaving entering a valid  roboter elevation etc    Depending on context  an     ExternalTriggerStartEvent    or an     ExternalTriggerStopEvent    status change  event is issued on a trigger event     Note  Trigger functionality is not yet available  with emScon 2 1 x releases and may be subject  to change        122    ES _ TrackerFace    Specifies the Tracker Face  This enumeration type  is used as a parameter for the ES_C_GetFace  command           enum ES_TrackerFace      ES_TF_Unknown   ES_TF_Facel   ES_TF_Face2   hi       e TF Unknown  Tracker face could not be determined   Should not occur under normal conditions     e ES_TF Facel  The tracker is in face I position     e ES_TF Face2  The tracker is in face II position     ES MeasurementCameraMode    Specifies the source for the measurement camera  mode  This enumeration type is used as a  parameter for the  Set GetMeasurementCameraMode command           enum ES_MeasurementCameraMode     ES_MCM_Measure   ES_MCM_Overview   hi       e ES MCM Measure  Measurement camera  T Cam  is in  measurement mode     e ES MCM Overview  Measurement camera  T Cam  is in  overview mode and can be addressed by  e g  GetStilllmage     ES MeasurementCameraType    Specifies the measurement camera type  This  enumeration type is used as a parameter for the  GetMeasurementCameraInfo command        123             enum ES_MeasurementCameraType     ES_MC None   ES_MC_TCam700   ES_MC_TCam800           i          e ES
228. processor Statements    The following statements show a common  practice to avoid multiple inclusion of the same  include file while compiling a  CPP module  In  case of nested inclusion of the ES_C_API_Def h  file  these statements will prevent warnings for  multiple definitions of data types            ifndef ES_C_API_DEF_H   define ES_C_API_DEF_H     fendif       3 1 6 TPI    Boolean    Data Type    No native Boolean data type is available in C  C  uses the integer basic type for Boolean values  For  convenience  a platform  independent ES_BOOL  type has been introduced for the ES_API     typedef int ES_BOOL    Neither BOOL  which is 2 Bytes and Microsoft   specific  nor bool  which is 1 Byte and specific to  newer C   revisions  has been used  By using a 4  Byte Boolean    int   pure C compliance and  maximal portability is assured     q This relates only to the C interface   ES_C_API_Def h  The C   interface as well as  custom programs may use any compatible  Boolean type  Boolean type variables used in ES C  API structs must be 4 bytes        39       3 1 7 Enumeration Type Members  Numerical representation   Enumeration type members in C are internally  represented by integer values  Numbers can be  assigned explicitly to particular enum values  this  is the case for all enumeration types defined for  emScon    This approach has some advantages for  application debugging   However  applications  should never use the numerical values directly   Always use the according 
229. properties  such as  cameraType  serial Number  comment  etc  serve  as information  mainly used for user interface  purpose           struct GetCamerasCT       struct BasicCommandCT packetInfo   hi    struct GetCamerasRT            struct BasicCommandRT packetInfo   int iTotalCameras   int iInternalCamerald   long 1SerialNumber   enum ES_MeasurementCameraType cameraType   unsigned short cName  32    unsigned short cComment  128     hi   GetCameraCT RT    Command structure to get the ID of the active  Camera  The GetCamera command delivers the  currently active measurement camera by its ID   Currently set as the active one in the database    However  since this camera may have been  removed  an additional flag indicates whether  the active camera is mounted or not        193                struct GetCameraCT      struct BasicCommandCT packetInfo   hi    struct GetCameraRT      struct BasicCommandRT packetInfo    int iInternalCamerald    ES_BOOL bMeasurementCameralIsMounted   hi       Set GetMeasurementCameraModeCT RT    Command structures for setting getting the  measurement camera mode           struct SetMeasurementCameraModeCT     struct BasicCommandCT packetInfo   enum ES_MeasurementCameraMode cameraMode      i    struct SetMeasurementCameraModeRT       struct BasicCommandRT packetInfo   de    struct GetMeasurementCameraModeCT      struct BasicCommandCT packetInfo   di    struct GetMeasurementCameraModeRT            struct BasicCommandRT packetInfo   enum ES_MeasurementCa
230. provided  have not been re named  That s the reason  Sample 3 is the first one referenced here   However  even if the names have not changed   the samples might have improved since earlier  versions  Sample 4  see C   section  has been  completely revised for example     3 6 1 Sample 3    Implements a    lightweight    C TPI client  application  with no graphical interface  GUI  overhead or MFC or ATL  This sample fits into a  single file with 350 lines of code  including  comments and empty lines   and compiles into a  small executable file     This sample implements only Initialize Tracker  and Get Direction commands  Since no Windows  Message Loop is available  the application needs  a multi threaded approach and therefore  requires events and threads  For TCP IP  communication  the Winsock API functions are  used    Further details see  Readme txt  file in Sample 3  folder and code  comments in source files     Console Application   The VC   AppWizard or a text editor can be used  to create a  Console Application    skeleton  and to  implement the C standard entry function        212          int main int argc  char  argv                Add all the source code  save the file   c or  cpp  extension  and invoke the C compiler from the  command line    Comments    These comments refer to the file  EmsyCApiConsoleClient cpp     The following include  files are required            include  lt stdio h gt     standard C input output   include  lt Winsock2 h gt     win32 socket s
231. q0 q3    Ryy q0  q0 q1 q1 q2   q2 q3  q3   Ryz 2 q2   q3 q0   q1    Rzx 2 q1 q3 q0 q2    Rzy 2 q3 q2 q0 q1    Rzz q0 q0 q1 q1 q2 q2 q3 q3    This matrix is used to transform directions from  the probe coordinate system to the user system  through     directionUser   R  directionProbe        333       10 Appendix A    10 1 TRACKER ERROR NUMBERS    The error numbers that are sent with answers are all a three digit number  The first digit  indicates the category of the error condition that is reported  These are     HXX  System errors    2XX  Communication errors   3XX  Parameter errors    4XX  LCP hardware errors    ADM hardware errors    I6XX  Hardware error in the TP  repair by service personnel  additional range to 9XX   7XX  Operation errors    exx  Hardware configuration error  repair by user    I9XX  Hardware error in the TP  repair by service personnel     HE Additional error number for LTCplus base  LTD600 700 800  TCAM and T Probe    10 1 1 System Errors    CO DSSS S    FlashDisk  file read error  O T O  Command not implemented           334    10 1 2 Communication Errors    Overflow of input buffer     Communications timeout  the string is not completed within time  Frame error  the format of the received string is not correct     Communications between TP and Laser Control Processor  LCP  has failed   Probe Tip communication timeout    Additional Compensation Tool communication timeout  Additional Compensation Tool busy       10 1 3 Parameter Errors    3xx   Invalid 
232. r   iFirmWareMinorVersionNumber   1SerialNumber    cameraType    cName  32    1CompensationIdNumber   1ZoomSerialNumber   1ZoomAdjustment IdNumber   1Zoom2DCompensationIdNumber   1ZoomProjCenterCompIdNumber   dMaxDistance    dMinDistance    1NrOfPixelsxX    1NrOfPixelsyY    dPixelSizex    dPixelSizeyY    1MaxDataRate        GetMeasurementProbelnfoCT RT    Command structure    s to read Probe specific    information and diagnostic data of the active    probe        201                struct GetMeasurementProbeInfoCT     struct BasicCommandCT packetInfo           struct GetMeasurementProbeInfoRT         struct BasicCommandRT packetInfo    int iFirmWareMajorVersionNumber   int iFirmWareMinorVersionNumber   long 1SerialNumber    ES_ProbeType probeType    long 1CompensationIdNumber    long lActiveField   ES_ProbeConnectionType connectionType    long lNumberOfTipAdapters   ES_ProbeButtonType probeButtonType    long lNumberOfFields    ES_BOOL bHasWideAngleReceiver    long lNumberOfTipDataSets    long l1NumberOfMelodies    long lNumberOfLoudnesSteps        Get SetLongSystemParamCT RT    Command structures to set   get individual  system settings parameters  See enum  ES_SystemParameter           struct SetLongSystemParamCT       struct BasicCommandCT packetInfo   enum ES_SystemParameter systemParam   long lParameter   hi  struct SetLongSystemParamRT     struct BasicCommandRT packetInfo   hi  struct GetLongSystemParamCT     struct BasicCommandCT packetInfo   enum ES_SystemParameter sy
233. r   specified coordinate system  If set to true   transformation as per transformation  parameters is applied  If set to false  the  default transformation will be used  0  0  0  0   0  0  1   regardless of the current values set  with SetTransformationParams command   Transformations also apply to the  positioning commands  such as GoPosition   and to part of the Input Output filters  Box   Sphere     e   bApplyStationOrientationParams  If this flag is set to true  the System uses the  given orientation parameters  If set to false   the default station orientation will be used  0   0  0  0  0  O   regardless of the current values  set with the SetStationOrientationParams  command  Orientations also apply to the  positioning commands  such as GoPosition      e bKeepLastPosition  If this flag is set to true and the laser beam is  broken  it does not leave the current position   This allows to  catch  the beam again  then  placing the reflector to a stable position  The  ADM then tries to perform a measurement  and     if success  sets the measured distance as  the new interferometer distance  From then on   it is possible to recover measuring without  having to go back to the BirdBath on beam  broken events   If the flag is set to false  the beam is disabled   mirror points down   If an Overview Camera  is installed  the sensor drives into the camera  position   Important  Enabling the    KeepLastPosition     flag is compulsory for 6D Measurement  Modes  Otherwise the Probe wi
234. r cable  connection broken     The  ES_C_GetEnvironmentParams   command can be used to retrieve the  current values  Note  this command does  not immediately trigger a measurement  from the weather monitor     it just returns  the emScon  internally buffered meteo  values  i e  those last read from the WM    while the command   ES_C_SetEnvironmentParams  is not  available in this mode  Returns with an     usage conflict    error     Refraction parameters are not influenced by  the periodical update of environmental  parameters  To change refraction values  an  explicit  ES_C_SetRefractionParams  is  required  The  ES_WMS_ReadOnly  mode is  therefore suitable if the environmental       109    values come from the WM  but the  application wants to use its own formula to  calculate refraction parameters from these  values  The mode of operation is hence as  follows       ES C GetEnvironmentParams   delivers values last read from weather  monitor       Calculate ADM and IFM refraction  indices with application specific  formula       Set the calculated refraction  parameters with  ES_C _ SetRefractionParams     This mode is therefore rarely used  The normal  mode of operation is to use   ES_WMS_ReadAndCalculateRefractions   see  below      e ES WMS _ ReadAndCalculateRefractions  This is the normal mode of operation if  using a weather monitor  It acts the same as  the  ES_WMS_ReadOnly  mode  but in  addition  the current refraction parameters  are automatically recalculated and u
235. r objects discarded  TGT  Too many objects surrounding feature   feature not tracked  TGT  Timeout in TGT extraction   b      VTT  ERROR  invalid angle    VTT  ERROR  invalid distance    VTT  ERROR  invalid command parameter    VTT  ERROR  command not allowed    VTT  ERROR  timeout command function    VTT  ERROR  mode changing not possible    VTT  ERROR  error during V_OFFSET procedure     3200 DARK  ERROR  timeout while getting image   3203 DARK  ERROR  timeout of blende command  3204 DARK  ERROR  camera access error              ERROR  timeout while getting image     ERROR in a state             WARNING  too many active ethernet clients     WARNING  ethernet client id not found     ERROR  ethernet module already initialized      ERROR  init of the ethernet module failed      ERROR  trying to access ethernet module in uninitialized state     ERROR  receiving error occurred  error code  u       ERROR  transmit error occurred  error code  u            COM  ERROR  transmit buffer is too big for appending   a   FGIF  ERROR  image memory overflow    4051 FGIF  ERROR  image data not picked up    FGIF  ERROR  command not allowed    FGIF  ERROR  invalid command parameter    FGIF  ERROR  timeout command function    FGIF  ERROR  100Hz synchronisation failure    FGIF  ERROR  FPGA watchdog failure    FGIF  ERROR  FPGA data overflow error    FGIF  ERROR  GBPS data failure    FGIF  ERROR  GBPS synchronisation error    FGIF  ERROR  mailbox overflow in full picture mode   a   MOT  ERROR  en
236. ramming  Usually it is  sufficient just to check for    Error6D    being 0   success  or 1  error   while    Status6D    is 1            struct RotationStatus         unsigned Status6D 1     0   gt  no rotation status  1   gt      rotation status valid  unsigned Error6D 1     1   gt  ERROR in rotation status    unsigned NotEnoughLED 1   unsigned RMSToHigh 1   unsigned AngleOutOfRange 1     Hz or Vt  see RotStatus     values   unsigned Frozen6DValues 1     6D values are not updated      unsigned DistanceOutOfRange 1    dist too short or too long   unsigned Reserved1 1     always 0   unsigned RotStatLeftRight 3     see documentation   unsigned RotStatUpDown  3     see documentation   unsigned GoodGauge 2     0   gt  All bad  1   gt  33  good     2   gt  66  good       unsigned Face2 1     0   gt  Facel  1   gt  Face2   unsigned Reserved2 15     always 0    hi    union URotationStatus            long l   struct RotationStatus rotStat   hi  StationaryModeDataT          struct StationaryModeDataT     long 1MeasTime   ES_BOOL bUseADM     Caution  has no effect in 6D mode    hi       Used as parameters for the  Set GetStationaryModeParams commands  The  measurement time parameter must lie between  500 ms and 100000 ms  0 5     100 seconds   The  useADM flag should be set to false  if the ADM  measurement was performed upon laser beam  attachment  FindReflector  GoPosition   Only in  exceptional cases an ADM measurement should  be performed upon a stationary measurement   If         
237. rdinates delivered with  this packet are not complete or even wrong   maybe zero   This situation can occur  because of a bad rotation status or because       97    not enough LED   s were visible during a     long time     In other words  the system was  not able to measure as many single  measurements as specified during the  specified measurement time  An application  must treat such a result as an error     ES_RS_NoHumidityFromWM   Meaning  No humidity value could be  queried from the Weather monitor  The  Humidity device is probably not connected  to the Thommen Weather Station  This is a  legal condition  A default value of 70  is  assumed in this case  Note  The influence of  the Humidity to the refraction index is  marginal      ES_RS_NoTemperatureFromWM   Meaning  No temperature value could be  queried from the Weather monitor  None of  the two Temperature devices is probably  connected to the Thommen Weather Station   This is a fatal error since the Temperature is  required for the calculation of the refraction  index  At least one of the Temperature  devices must be attached to the Thommen  Weather monitor  If both are connected  the  temperature of the combined  Temperature Humidity device has priority     ES_RS NoPressureFromWM   Meaning  No pressure value could be  queried from the Weather monitor  Since the  pressure device is an integral  non   removable part of the Thommen Weather  Station  this error indicates a failure of the  Thommen Station    This is a f
238. re is no last measured point to go  to    Note  Ensure that the user or the application  does not call GoLastMeasuredPoint  if no  stationary point has been measured since last  system boot     ES_RS_NoVideoCamera   Meaning  A command could not access the  Overview Camera  This error can only occur  if no Overview Camera is attached to the  system    Note  If no camera is connected  set the  SystemStatusFlag HasVideoCamera to zero    Command SetSystemStatus   The application  should not call camera related commands  if       87    there is no camera attached     There exist different types of overview  cameras that differ in internal parameters   focus distance  CCD chip size   Older  emScon versions were not able to detect  whether an overview camera was mounted  or not  not to speak of type recognition   indeed it was the overview camera  hardware that did not support type  recognition   For that reason  the flag   HasVideoCamera    was originally  introduced  Thus  the user had to  tell  the  system when an overview camera was  mounted  Newer EmScon versions  2 0 and  up  are able to detect the camera type  automatically  Hence  this flag theoretically  has become obsolete  However  currently the  camera type is recognized only when the   hHas VideoCamera  flag is enabled    If your system is equipped with an overview  camera  it is highly recommended to always  having this flag checked  default is  unchecked   Otherwise  the system may not  detect the correct camera type 
239. red after the distance interval  The  behavior of a Continuous Distance  measurement can be controlled with the  ES_C_SetContinuousDistanceModeParams  command     ES_MM_Grid   Continuous Measurement Mode by grid  interval  A measurement is triggered after  the grid interval  The behavior of a grid  measurement can be controlled with the  ES_C_SetGridModeParams command     ES_MM_SphereCenter   Measurement mode to indirectly measure a  sphere center point  This is achieved by a  continuous measurement scan over the  sphere surface  The behavior for a Sphere  Center measurement can be controlled with  the ES_C_SetSphereCenterModeParams  command     ES_MM _ CircleCenter   Circle measurement similar to  ES_MM_SphereCenter  The behavior for a  Circle Center measurement can be controlled  with the ES_C_SetCircleCenterModeParams  command     ES_MM_6DStationary    The Probe  6DoF  relative of  ES_MM_Stationary mode  See description  there     ES MM_6DContinuousTime   The Probe  6DoF  relative of  ES_MM_ContinuousTime mode  See  description there   ES_MM_6DContinuousDistance  The Probe  6DoF  relative of    ES_MM_ContinuousDistance mode  See  description there        100    ES_MM_6DGrid  The Probe  6DoF  relative of ES_MM_ Grid  mode  See description there     ES_MM_6DSphereCenter   The Probe  6DoF  relative of  ES_MM_SphereCenter mode  See  description there     ES_MM_ 6DCircleCenter   The Probe  6DoF  relative of  ES_MM_CircleCenter mode  See description  there     ES MeasurementStat
240. red data     The principle of using the C   interface is the  same as used in Sample 4  Derive your own  classes from the C   TPI classes   CESApiCommand  and  CESApiReceive  and  define virtual methods as needed     Set the IP address to the actual TS address   before building the application  Alternatively  the  IP address can be passed as command  line  argument upon running the application     Further details see  Readme txt  file in Sample 9  folder and code  comments in source files     4 4 3 Sample 12    This ReflectorCtl sample provides an Activex  component comprising the most common  reflector commands     This control skips building up a lookup table for  ID Name mapping  querying all the defined  reflectors from the system and providing the  appropriate user interface controls     The Sample contains full source code  Visual C     and has a compiled component Reflector ocx   which allows use without a Visual C   compiler     Remarks    e The Reflector ocx control must be registered  before it can be used     e Only one instance of such a control can be  instantiated per Form Dialog box     e The properties  ServerAddress  and   PortNumber  can be specified at       239     Form Dialog  design time  However  this only  makes sense if these parameters are constant   The more common way is to set these  properties programmatically     e Call the method Initialize after having set the  properties and not before the client application  has successfully connected to the
241. rface can be  used     Differences between the synchronous and  asynchronous interface     The functions of the synchronous interface do  not return before the task is completed  while the  asynchronous functions do so  see C C  TPI      In general  programming with synchronous  functions is much easier  Handling Data Arrival  Events or Notifications is not required  except in  some special cases      With the asynchronous interface and the events  notification  that is  calling  SelectNotificationMethod with LTC_NM_Event   an  Event  Sink must be implemented  In VB  this is  done by defining the WithEvents keyword  but in  C   this is a bit more complicated  In addition   the appropriate event handlers must be  implemented    With any other notification mechanism  the  event sink is not required and the WithEvents  keyword must be removed  Implement Windows  message handlers and not event handlers  in this  case     With the synchronous interface  some answers  remain asynchronous by their nature   continuous  measurement packets  Reflectors and error answers       260     these may partly occur non command related   for example beam broken     With synchronous commands  events or  notifications must still be caught   See former  paragraph  Any other notification mechanism  does not need an event sink  and the WithEvents  keyword must be removed  In this case  do not  implement event handlers  appropriate  Windows message handlers must be  implemented instead     Using both 
242. rong unit selection     Note  Check the valid range and current unit  of the command parameter  see command  description     Example  The system is currently set to   Meters  for length units  but the user enters  5000  5000 mm  instead of 5     ES_RS_WrongParameter1  ES_RS_WrongParameter2  ES_RS_WrongParameter3  ES_RS_WrongParameter4  ES_RS_WrongParameter5  ES_RS_WrongParameter6  ES_RS_WrongParameter7  ES_RS_WrongParameter8  ES_RS_WrongParameter9  ES_RS_WrongParameter10  ES_RS_WrongParameter11  ES_RS_WrongParameter12  ES_RS_WrongParameter13  ES_RS_WrongParameter14  ES_RS_WrongParameter15    ES_RS_WrongParameter16   Meaning  Applies to commands with  more than one parameter  The symbol  specifies which one of the parameters is  wrong     ES_RS_ParameterlOutOfRangeOK  ES_RS_ParameterlOutOfRangeNOK  ES_RS_Parameter2OutOfRangeOK       84    ES_RS_Parameter2OutOfRangeNOK  ES_RS_Parameter30OutOfRangeOK  ES_RS_Parameter3O0utOfRangeNOK  ES_RS_Parameter4OutOfRangeOK  ES_RS_Parameter4OutOfRangeNOK  ES_RS_Parameter5OutOfRangeOK  ES_RS_Parameter5OutOfRangeNOK  ES_RS_Parameter6OutOfRangeOK    ES_RS_Parameter6OutOfRangeNOK  Meaning  OutOfRangeOK  warning     The value of the specified parameter was  out of the recommended range  but  within the valid range  and accepted   The command was executed   OutOfRangeNOK  error      The value of  the specified parameter was not within  the valid range and was not accepted   The command was not executed     q These errors warnings typically  apply 
243. rotection Dongle has  expired  Probably due to a demo dongle     Note  Request for a dongle Field  upgrade at  Leica or get anew dongle     ES_RS_UsageConflict   Meaning  Some system modes disable other  commands  because they do not make sense  in this context  For example  if the system is  equipped with a weather station and is set  up to automatically monitor the temperature   pressure and humidity  the system will  prevent a manual setting of these values    The command SetEnvironmentParams will  issue an error ES_RS_UsageConflict        89    The command GetEnvironmentParams will  work and deliver the actual values measured  by the monitor  If the weather station mode  is set to  read and recalculate Refraction      then the same applies to the command  SetRefractionParams  It will issue a  ES_RS_UsageConflict  since setting the  refraction index manually would conflict the  automatic mechanism and would be  overwritten upon the next weather station  read cycle    20 seconds     Note  The application should not call  SetEnvironmentParams and or  SetRefractionParams  if these values are  automatically updated by the weather  station  as per system settings     ES_RS_ Unknown   Meaning  An unknown error occurred   Should never occur as a response to a  command     ES_RS_ NoDistanceSet   Meaning  The interferometer has no valid  reference distance  Measuring is not possible  in this condition    Note  Trackers with ADM may attach to a  stable reflector anywhere  Use GoPosi
244. rrupted with     ES_C_StopMeasurement        ES_C_GetCompensations   Reads all Tracker  compensations stored in  the database  Apart from the internal ID and  name  which is made up of the  compensation date   a series of properties is  delivered     ES_C_GetCompensations2   Enhanced version of  ES_C_GetCompensations  Delivers comment  for ADM compensation and active  compensation as additional information   ES_C_GetCompensations only left for  backward compatibility reasons  New  applications should use  ES_C_GetCompensations2     ES_C_SetCompensation   Sets the specified tracker compensation with  the given ID as the active one  The available  Tracker compensations including their Ids  can be retrieved with the command   GetCompensations      ES_C_GetCompensation   Reads the currently active compensation ID   Only the internal ID is returned  For  additional information  the properties need       72    to be looked up in the list delivered by  ES_C_GetCompensations    ES_C _ SetStatisticMode    Switches the statistic mode between     standard    and    extended     This mode only  influences the Single  and Multi   measurement results  This is an advanced  feature  Extended statistic mode should only  be used if enhanced statistical information is  required  This is for example the case when  using stationary measurements as input to  the transformation routine    See difference between  Single MultMeasResultT  standard  and  Single MultMeasResult2T enhanced      ES_C_ GetS
245. ruct parameter      4 3 9 Asynchronous Programming Issues    As already stated  all communication through the  C   interface is asynchronous     It is therefore not possible to  queue  commands  within one function call  In other words  consider  a Windows application with a graphical interface   Assume a button named  InitialSettings  with a  button  press handler as follows behind  Note  this is pseudo code since no parameters are  specified         OnInitialSettingsButtonPressed          m_myApiCmd  gt SetUnits        m_myApiCmd  gt SetEnvironmentParams        m_myApiCmd  gt Initialize     m_myApiCmd  gt GetReflectors  j   m_myApiCmd     gt SetMeasurementMode                  This won t work at all because this a typical  synchronous approach  i e  It is assumed a  command has finished when it returns   In an       232       asynchronous approach  each command returns  immediately  In the sample above  SetUnits   and  SetEnvironmentParams   may accidentally work   because these commands do not take a long time      but never rely on this    But Initialize       since  this command takes about 45 seconds to  terminate     also returns immediately  The server   however  is not ready to take the next command  until initialization of tracker is finished  Hence  the command   GetReflectors    would fail with a     Server busy    error     Note  The emScon COM interface provides a  synchronous interface which allows to queue  several commands in one and the same function   Howev
246. s      as a input output    Filter    to all  Length Angular Meteo type parameters              166          struct SetUnitsCT     struct BasicCommandCT packetInfo   struct SystemUnitsDataT unitsSettings   he    struct SetUnitsRT       struct BasicCommandRT packetInfo   he    struct GetUnitsCT      struct BasicCommandCT packetInfo      i    struct GetUnitsRT     struct BasicCommandRT packetInfo   struct SystemUnitsDataT unitsSettings   i       F  See struct  SystemUnitsDataT   for details     GetSystemStatusCT RT    Command structures for getting the system  status           struct GetSystemStatusCT       struct BasicCommandCT packetInfo   i    struct GetSystemStatusRT       struct BasicCommandRT packetInfo    enum ES_ResultStatus lastResultStatus    enum ES_TrackerProcessorStatus trackerProcessorStatus   enum ES_LaserProcessorStatus laserStatus    enum ES_ADMStatus admStatus    struct ESVersionNumber esVersionNumber    enum ES_WeatherMonitorStatus weatherMonitor    long lFlagsValue    long 1TrackerSerialNumber     hi       Fix See description of related enumeration types  for details     The  FlagsValue member contains some additional  status information about the tracker tracker  processor  for advanced programming     q The description of the nin bit of the  IFlagsValue  start with least significant bit                              Bit Description   Bit 1 Reflector was found  Bit 2 Interferometer locked  Bit 3 Positioning complete  Bit 4 Tracker initialized   Bit 5 Calibra
247. s   In a real application  these  things could be left of course     Note that the Step 1 application does not yet  depend on emScon at all     Step2     Step 2 adds TCP IP communication to the  application  There are several ways to do this       use an appropriate Socket Class  that s what we  do in this application   we use CAsyncSocket of  MEC       use the Winsock2 C library  as for example used  in the  Sample9  of the emScon SDK       use the Winsck ocx ActiveX control      use any other third party socket library  We need to provide the following functions     connect to server     disconnect from server      write data to previously opened server  connection    In addition  we need a notification mechanism to  get informed that data has arrived and is ready to  be read     Since this is a Windows application  we can use  the window message mechanism to achieve this      Note that in a non  windows application  we  would need to use events and threads to achieve  the same   see Sample9         236    So far nothing depends from the emScon SDK    we do not need any emScon  include file yet  All  is provided by the VC   development Kit  But  nevertheless we will be able to connect to    disconnect from server  But Step2 application will  not yet allow to send real emScon commands and  receive answers to from server     Step3     Step 3 introduces the emScon command class   CESAPICommand  to SEND    understandable     data to the server  More precisely  the class is  rat
248. s   Related structure  GridModeDataT     ES_C SetReflector   Sets the valid reflector type by its numerical  ID  Attention  Reflector ID s must not be  hard coded  They differ from emScon system  to emScon system  Use command   GetReflectors  to query the system for  defined reflectors and appropriate ID   name type mapping     ES_C_ GetReflector  Queries the ID of currently valid Reflector      ES_C_ GetReflectors   Queries all known reflectors of the Tracker  Server  Apart from other information  mainly  delivers the association between reflector  names and their numerical IDs     ES_C SetSearchParams   Set criteria for reflector search abort  search  radius and time out   Search radius is in  current Length  units  Maximal search  parameter is 0 5 meters    The search time should be set into a  reasonable relation to the search radius   Large search radii result in extended search  times unless limited by the search timeout  value  The minimum value for the  SearchTimeout is 10   000 ms  10 seconds    Note  was 2   5000 in previous emScon  versions     Related structure  SearchParamsDataT   For a detailed description see there     ES_C_GetSearchParams  Queries the currently valid criteria for  aborting a reflector search        63    Related structure  SearchParamsDataT   For detailed description see there     ES_C SetAdmParams   Set parameters for the ADM  stability  time   retries   Attention  This is a  dangerous   command  Lowering the stability criteria will  result i
249. s  properties        257       methods and events  exposed by a COM object  a  COM viewer may be used  Visual Studio offers  such a viewer  The OLE COM Object Viewer can  be launched from the Tools menu of VC       File  gt  View Type Lib  gt  LTControl dll or LTControl tlb     5 2 8 COM TPI Reference    The type library of a COM object can be seen as  Interface Reference     Listing all the methods redundantly in this  manual would not make sense     The type library enables a development  environment to provide  IntelliSense  support   That is  the development environment supports  the programmer in selecting methods and  parameters in an active manner     The method names of the COM TPI partly differ  from those of the C   interface  Although most of  them   especially the  Set Get  functions     are  named accordingly   This  inconsistency    comes  from the high  level approach of certain methods   However  by viewing the list of available  functions  type  library  Intellisense   it is quite  easy to find the proper methods and their  relatives to the C   C   interface  where the  parameters are described      Note that asynchronous methods never return  any data  Data is returned through events in  these cases  On the other hand  synchronous  methods always return the result data  if any  as  parameters     Concerning input parameters  sent to the tracker  server   there is no difference between the  synchronous and asynchronous approach        258    5 2 9 Registering
250. s and may  be subject to change     ES_C_GetExternTriggerParams  Set the parameters of the external trigger        78    Note  Trigger functionality is not yet  available with emScon 2 1 x releases and may  be subject to change     ES_C_GetErrorEllipsoid   Convenience function to calculate an error  ellipsoid from a given point with Standard  Deviations and Covariance    Input is in current units  current CS type and  applied orientation   transformation settings   Output is always in RHR     ES_C_GetMeasurementCameralInfo  Returns Measurement Camera information   This is an advanced   diagnostic command   Not usually used by common applications   See Tracker T Cam hardware manual for  details    See also GetMeasurementCameraInfoRT  structure     ES_C_GetMeasurementProbelnfo   Returns Probe information  This is an  advanced   diagnostic command  Not  usually used by common applications  See  Tracker Probe hardware manual for details   See also GetMeasurementProbeInfoRT  structure     ES_C_ SetLongSystemParameter   This is an advanced command to set  SystemSettings parameters of type Long   Boolean and enum  types individually  This  approach was chosen to avoid extending the  existing  SystemSettingsDataT    structure   There are now some parameters covered by  both commands  For example  WeatherMonitorStatus   For these  either  command  SetSystemSettings or  SetLongSystemParameter  can be used    See enum ES_SystemParameter for values  supported by this command    Some syst
251. s completely hide command struct  and struct initialization known from the C  interface  There is only one method for each one                225    of the command structs described  A derived  class such as CMyEsCommand inherits all these  methods     The names of the command functions are derived  from the members of the  enum ES_Command    C  TPI   Just omit the prefix  ES_C_  to get the  command function related to a command  packet        Example  Given the ES_C_Command   ES_C_SetBoxRegionParams      the related C    command function will be called    SetBoxRegionParams          The methods for sending commands are  asynchronous and can only be used for sending  commands     4 3 6 CESAPIReceive    A class for receiving command answers    Virtual override of Answer Functions    In order to use the C   TPI for receiving data  a  class from the CESAPIReceive class must be  derived  Then override those virtual functions on  whose data you are interested in    Example  If your application implements a     GetDirection      call  a method of the  CESAPICommand class     see     ES_CPP_API_Def h      then you must override  the virtual function     OnGetDirectionAnswer const double dHzAngle   const double dVtAngle     in your derived  CESAPIReceive class in order to receive the  results  In order to track errors  you always also  should override the virtual function     OnErrorAnswer const ErrorResponseT amp  error            226    Class CMyESAP Receive    Code Sample   only c
252. s those data structures that  are not directly exchanged as packets  They are  used as sub structures to compose the real   Packet  data types        133    PacketHeaderT          struct PacketHeaderT      long 1PacketSize   enum ES_DataType type    he       This basic structure is a part of all data blocks  transmitted over the TCP IP network  The   PacketSize has been introduced for programmer s  convenience  The value of the data structure  contains the size  in Bytes  of received packets   U j E R EYE      i initialize thi     ah Ee Tene es  q New for emScon V2 0 and up  The strike   through statement above  which was valid up to  emScon 1 5 servers  is no longer true   The  PacketSize value is no longer ignored  It is  compulsory to correctly initialize this value   Otherwise  command calls will mostly fail   Note that due to this change  existing V1 2   V1 5  emScon C  clients  who did not initialize these  length variables  will fail with emScon servers  newer than V2 0  Such client applications need  to be fixed at source level     q C  programmers have the sizeof   operator   This is inappropriate in other languages  to  determine the size of data structures           ReturnDataT   struct ReturnDataT      struct PacketHeaderT packetHeader   enum ES_ResultStatus status              This basic structure is part of all result data  blocks  It comprises a PacketHeaderT and a  ES_ResultStatus              134    BasicCommandCT          struct BasicCommandCT      struct Pa
253. sRT         struct BasicCommandRT packetInfo   double dVal1   double dVal2   double dVal3        Set GetTriggerSourceCT RT    Command structures to Set Get Trigger Source   See enum  ES_TriggerSource  for details    Note  Trigger functionality is not yet available  with emScon 2 1 x releases and may be subject to  change           struct SetTriggerSourceCT     struct BasicCommandCT packetInfo   enum ES_TriggerSource triggerSource   i    struct SetTriggerSourceRT       struct BasicCommandRT packetInfo   di    struct GetTriggerSourceCT       struct BasicCommandCT packetInfo      i    struct GetTriggerSourceRT     struct BasicCommandRT packetInfo   enum ES_TriggerSource triggerSource   hi       GetFaceCT RT    Command structures to query current Tracker Face   whether in Face I or Face II position        192                struct GetFaceCT      struct BasicCommandCT packetInfo   hi    struct GetFaceRT     struct BasicCommandRT packetInfo   enum ES_TrackerFace trackerFace   di       GetCamerasCT RT    Command structure to get Measurement Camera  properties  The GetCameras command retrieves  all measurement cameras  T Cams  defined  The  answer consists of as many answer packets as  cameras are defined in the server database  These  resolve the relation between camera name  string   and camera ID  numerical   Each packet  in  addition  a redundancy   contains the total  number of cameras  i e  the total number of  packets to be expected  only for programmer s  convenience   Other 
254. sformation parameters to be  applied to measurements and positioning  coordinates and to  part of  the input filters  such as region parameters    Invariant transformation parameters are   0 0 0 0 0 0 1   With these default settings  the  tracker delivers data in the instrument s CS        57     or in the  oriented system     if non invariant  orientation parameters are present    Transformation parameters are also ignored  if the applyTransformationParams system  settings flag is not set    Transformation parameters itself are in  current units and current CS type  but  neither according to applied orientation  settings nor to applied transformation  settings  which would mean recursive   No  range limitations apply    Related structure  TransformationDataT     ES_C _GetTransformationParams  Queries the currently applied 7  transformation parameters    Related structure  TransformationDataT     ES_C_SetSphereRegionParams   Defines a spherical region  If the  corresponding mode is active  measurements  outside the region are suppressed  The  interpretation of the parameters is subject to  units  coordinate type  and transformation  parameters    Related structure  SphereRegionDataT    ES_C_GetSphereRegionParams   Queries the currently valid sphere region  parameters    Related structure  SphereRegionDataT     ES_C_SetBoxRegionParams   Defines a box region  If the corresponding  mode is active  measurements outside the  region are suppressed  The box is connected  to the obje
255. sicCommandCT packetInfo   hi    struct GetStatisticModeRT       struct BasicCommandRT packetInfo   enum ES_StatisticMode stationaryMeasurements   enum ES_StatisticMode cont inuousMeasurements              Changing the statistical mode is for advanced  purposes only  Default statistical mode is     Standard    and ensures compatibility to earlier  versions     Set GetCameraParamsCT RT    Command structures for setting getting the  Camera parameters    See also description of struct   CameraParamsDataT         179             struct SetCameraParamsCT     struct BasicCommandCT packetInfo   struct CameraParamsDataT cameraParams   he    struct SetCameraParamsRT      struct BasicCommandRT packetInfo   de    struct GetCameraParamsCT       struct BasicCommandCT packetInfo   hi    struct GetCameraParamsRT            struct BasicCommandRT packetInfo   struct CameraParamsDataT cameraParams   hi  AddDrivePointCT RT    Command to add a point to the Drive Point List  to be used by the Intermediate Compensation  process  See chapter   Intermediate Compensation   in main chapter 8 for details           struct AddDrivePointCT       struct BasicCommandCT packetInfo     int iInternalReflectorId   double dVall   double dVal2   double dVal3           struct AddDrivePointRT       struct BasicCommandRT packetInfo   hi       CallOrientToGravityCT RT    Command structures for executing an    Orient To  Gravity    process  including reception of results      Results are in current angle units  Typical
256. sists of as many answer  packets as tips adapters are defined in the server  database  These resolve the relation between tip  name  string  and tip adapter ID  numerical    Each packet  in addition  a redundancy   contains  the total number of tip adapters  i e  the total  number of packets to be expected  only for  programmer s convenience   Other properties   such as tipType  serial Number  comment  etc   serve as information  mainly used for user   interface purpose        195                struct GetTipAdaptersCT      struct BasicCommandCT  hi    struct GetTipAdaptersRT     struct BasicCommandRT  int  int  long  long  long  enum ES_TipType  double  double  unsigned short  unsigned short    packetInfo     packetInfo   iTotalTips   iInternalTipAdapterlId   lAssemblyId   1SerialNumberLowPart   1SerialNumberHighPart   tipType    dRadius    dLength    cName  32     cComment  128         GetTipAdapterCT RT    Command structures to get the ID of active Tip  Adapter  The GetTipAdapter command delivers    the currently active tip adapter by its ID   Currently set as the active one in the database    In addition to the ID  the adapter number  to  which the tip is attached  is returned           struct GetTipAdapterCT      struct BasicCommandCT  i    struct GetTipAdapterRT      struct BasicCommandRT  int  int    hi    packetInfo     packetInfo   iInternalTipAdapterlId   iTipAdapterInterface        Get SetTCamToTrackerCompensationsCT RT    Command structures to get T Cam To Tracker
257. software  terminates gracefully while the connection       117    is still established  Upon a server crash  this  event cannot be expected     ES_SSC_ServerStarted    This event is fired if the server is has re   started  supposed the connection was still  established      ES StatisticMode    Specifies the current statistical mode  This  enumeration type is used as a parameter for the  ES_C_SetStatisticMode command           enum ES_StatisticMode         ES_SM_Standard   ES_SM_Extended  he       ES_SM_Standard   This is the default  Single  and Multi   measurement results are provided with  reduced statistical information  without  covariance values   That is  the data  structures SingleMeasResultT and  MultiMeasResultT are used and are  compatible with the structures used in earlier  emScon versions     ES_SM_Extended   Single  and Multi  measurement results are  provided with enhanced statistical  information  including covariance values    While this mode is activated  the data  structures SingleMeasResult2T and  MultiMeasResult2T are used  The only  difference is that these  2   versions contain  extended  statistical  information   Applications passing measurements to the   CallTransformation  command should use  the  2   variants since the transformation  routine requires these extended statistics     WE To maintain compatibility with earlier  versions  Single MultiMeasResultT have not  been extended with additional parameters        118       Newer application should 
258. sor in use  i486  686 etc             enum ES_TPMicroProcessorType      ES_TPM_Undefined   ES_TPM_i486   ES_TPM_686   hi       ES _ LTSensorType    Specifies the type of sensors that are defined   LT300  LTD800 etc             enum ES_LTSensorType     ES_LTS_Undefined    ES_LTS_SMARTOptodyne   ES_LTS_SMARTLeica   ES_LTS_LT_D_500   ES_LTS_LT300   ES_LTS_LT600   ES_LTS_LT_D_800       ES _DisplayCoordinateConversionType    Specifies the conversion of the coordinate system   either base to current or vice versa  Do not use  this type  It is related to the   ConvertDisplayCoordinates  command  not  supported           enum ES_DisplayCoordinateConversionType     ES_DCC_BaseToCurrent  ES_DCC_CurrentToBase    0   1             ES _TriggerStatus    Enumeration type to describe Status of Trigger  Button at T Probe       120                      enum ES_TriggerStatus      ES_TS_TriggerNotPressed   ES_TS_TriggerPressed    hi             e ES_TS_TriggerNotPressed   The measurement trigger button at the T   Probe is currently released  e ES_TS_TriggerPressed     The measurement trigger button at the T   Probe is currently pressed    ES MeasurementTipStatus    Enumeration type to describe Status of  Measurement Tip at T Probe       enum ES_MeasurementTipStatus      ES_PTS_TipOK   ES_PTS_UnknownTip   ES_PTS_MultipleTipsAttached                   e ES_PTS_TipOK  A tip  adapter  is present and is working  correctly   e ES_PTS_UnknownTip  There is no tip  adapter  attached or the  currently att
259. stanceModeDataT  continuousDistanceModeData   he    struct SetContinuousDistanceModeParamsRT      struct BasicCommandRT packetInfo      i    struct GetContinuousDistanceModeParamsCT      struct BasicCommandCT packetInfo      i    struct GetContinuousDistanceModeParamsRT     struct BasicCommandRT packetInfo   struct ContinuousDistanceModeDataT  continuousDistanceModeData   hi       By See struct  ContinuousDistanceModeDataT   for details     Set GetSphereCenterModeParamsCT RT    Command structures for setting getting the  parameters for the Sphere Center Measurement  mode        164                struct SetSphereCenterModeParamsCT     struct BasicCommandCT packetInfo   struct SphereCenterModeDataT sphereCenterModeData   he    struct SetSphereCenterModeParamsRT      struct BasicCommandRT packetInfo   he    struct GetSphereCenterModeParamsCT      struct BasicCommandCT packetInfo      i    struct GetSphereCenterModeParamsRT      struct BasicCommandRT packetInfo    struct SphereCenterModeDataT sphereCenterModeData   hi       F  Se struct  SphereCenterModeDataT  for  details     Set GetCircleCenterModeParamsCT RT    Command structures for setting getting the  parameters for the Circle Center Measurement  Mode           struct SetCircleCenterModeParamsCT     struct BasicCommandCT packetInfo   struct CircleCenterModeDataT circleCenterModeData         struct SetCircleCenterModeParamsRT       struct BasicCommandRT packetInfo   hi    struct GetCircleCenterModeParamsCT       struct Basi
260. stemParam      i  struct GetLongSystemParamRT     struct BasicCommandRT packetInfo   enum ES_SystemParameter systemParam   long lParameter                 GetMeasurementStatusInfoCT RT    Command structures to get information about  status of all types of compensations and related  hardware    Such information is useful in cases where the  Tracker Status is not ready and one wants to  figure out why  Without the information of this  command  investigation could be difficult  because there are numerous conditions why a       202       system is not ready to measure  Missing  compensations  Beam not attached  no accurate  Reflector   This especially applies to 6DOF  modes  A look to the bits of     IMeasurementStatusInfo    immediately shows  the reason    The information data is delivered as a long  value representing a bit mask  Use the enum   ES _MeasurementStatusInfo values to decode    mask the   MeasurementStatusInfo  parameters  flags information    Note the terminology with the  s    GetMeasurementStatusInfo  This is because this  command relates to different types of  compensations and hardware  which are always  related           struct GetMeasurementStatusInfoCT     struct BasicCommandCT packetInfo     hi    struct GetMeasurementStatusInfoRT         struct BasicCommandRT packetInfo   enum ES_ResultStatus lastResultStatus   long lMeasurementStatusInfo              GetCurrentPrismPositionCT RT    Command structures to get the 3D position of the  prism the laser is curr
261. stently  Recent  values will be restored  on restart of the Tracker   server     It is recommended to initially set the required  settings  on every client startup     as good  programming practice     2 3 7 Default Settings    List of the most common parameters and their  default factory  settings     e Orientation parameters  0 0 0 0 0 0     e Transformation parameters  0 0 0 0 0 0 1    scale factor is 1     e CS Type  RHR  right handed rectangular   e Length  Meter   e Angle  Radian   e Temperature  Celsius   e Pressure  Hectopascal   e Rel  Humidity  70    e Temperature  20 0  C   e Pressure  1013 25 mbar  760 mmHg    e Measurement mode  Stationary   e Temperature range  Medium   e Reflector  None   e Interferometer refraction index  1 0   e ADM refraction index  1 0   e Stationary point measurement time 2500 ms    e Continuous measurement  time  1000 ms       17    e Continuous measurement  number of  points  100    e Statistic mode  Standard    e Region and grid mode parameters   Arbitrary     Other  less  common settings are described in the  command reference section     2 3 8 Version Backward Compatibility    New data types packets with evolving server versions    This is a very important issue in order to prevent  client application software adjustments upon  future emScon server software upgrades  The  coming versions of emScon will include arrival of  new extended data over the TCP IP connection   such as new packet types  status messages and  new error messages  
262. struct BasicCommandCT packetInfo     double dVall   double dVal2   double dVal3   double dSearchRadius           struct LookForTargetRT      struct BasicCommandRT packetInfo   double dHzAngle   double dvtAngle             The search time depends on the search radius   Large search radii result in extended search  times  A typical value is 0 05 m     GetDirectionCT RT    Structures for invoking the GetDirection  command  The output parameters are always  angles related to the tracker coordinate system in  the current angle unit settings    This command is mainly useful for LT  series of  trackers  in combination with LookForTarget            struct GetDirectionCT      struct BasicCommandCT packetInfo   hi    struct GetDirectionRT     struct BasicCommandRT packetInfo   double dHzAngle   double dvtAngle   hi          178          Set GetStatisticModeCT RT    Command structures for setting getting the  statistic mode  Depending on the mode   stationary and or continuous 3D measurement  packets will contain more or less statistical  information  Note that different data packets for  the measurement apply depending on which  mode is used     See enum  ES_StatisticMode  description for  details           struct SetStatisticModeCT       struct BasicCommandCT packetInfo   enum ES_StatisticMode stationaryMeasurements   enum ES_StatisticMode cont inuousMeasurements           struct SetStatisticModeRT      struct BasicCommandRT packetInfo   di    struct GetStatisticModeCT       struct Ba
263. switching on the laser   controller  takes  about 20 minutes      ES_LPS_LaserReady   Laser is ready  From now on  the tracker can  be used  but first needs to be initialized  See  chapter    Application Initial Steps       Note  There is an alternative of repeatedly  polling with  ES_C_GetSystemStatus  to  figure out whether the laser is ready  As  soon as the laser is ready  emScon issues a  so  called    SystemStatusChange    event  This  is a packet of the type   ES_DT_SystemStatusChange     containing a  status parameter  In case of laser ready  this  parameter is  ES_SSC_LaserWarmedUp     ES_LPS_UnableToStabilize   Laser not able to stabilize  This probably  indicates a rapidly changing  up and down   of the environment temperature or a wrong  active Temperature Range  Make sure the  tracker is used in an environment with stable  temperature  This rarely happens  Usually  the laser just takes a longer warm up phase if  environment temperature is not that stable     ES_LPS_LaserOff  The Laser is switched off  Use     ES _SwitchLaser    to switch laser on     ES SystemStatusChange    Specifies status change types  This enumeration    type is used as a parameter for  ES_DT_SystemStatusChange notifications        113          enum ES_SystemStatusChange         ES_SSC_DistanceSet   ES_SSC_LaserWarmedUp   ES_SSC_EnvironmentParamsChanged   ES_SSC_RefractionParamsChanged   ES_SSC_SearchParamsChanged   ES_SSC_AdmParamsChanged   ES_SSC_UnitsChanged   ES_SSC_ReflectorChanged   ES_
264. symbol names     3 1 8 Basic C Data Type size of TPI Structures    This is relevant for programming languages other  than C C    However  some non standard C C    compilers may provide different sizes of basic  data types  For TPI clients  it is necessary to use  the following standard sizes     Data type Size   Enum values 4 Bytes    int 32 or long    Long 4 Bytes   Int 4 Bytes   Short 2 Bytes  for Unicode  strings exclusively    Double 8 Bytes   ES_BOOL 4 Bytes    int 32 or long     3 2 Communication Basics  3 2 1 Commands    The Tracker Server can be controlled only  through commands sent over TCP IP  Commands  differ in the count of parameters they take     e  GoBirdBath is an example for a non   parameter taking command     e   PointLaser  x y z  takes 3 parameters     The majority of commands taking parameters are  used for so  called property setting  Set lt CommandName gt  commands  The syntax of       40    each command     whether taking parameters or  not     is defined by its  lt CommandName gt CT  structure     q These structures need to be initialized  properly  Refer to C  Programming instructions  section     3 2 2 Command Answers    Every command causes an asynchronous answer   with an acknowledgment  The command type   cookie  previously sent to the Tracker Server is  echoed back  padded with information whether  the command succeeded or not  and  optionally   padded with command specific data  Depending  on the command type  this echo can occur  immediately
265. t is assumed that LTControl dll  resides in the current directory  otherwise specify  the path  for example     ES_SDK lib  LTControl dll     a Other than VB applications  COM TPI  based  C   applications need to call CreateInstance    and  the statement        g_pLTCommandSync   g_pLTConnect     gt GetILTCommandSync          replaces the related VB call           Set ObjAsync   Ob jConnect ILTCommandAsync       Fix See Sample 7 for setting up an event sink for  a Windows application  Although this approach  is not recommended      5 2 3 Notification Method    The following enumeration type defines the  different methods the SelectNotificationMethod can                248    take  Only one of these methods can be active at a  time  Therefore  SelectNotificationMethod should  be called only once with one of the following    values           enum LTC_NotifyMethod         but       LTC_NM_None     No notification  using nothing else       synchronous calls     LTC_NM_Event     notify through connection point  interfaces        Events                 LTC_NM_WM_CopyData     notify through copydata and pass data     directly with message  LTC_NM_WM_Notify     notify through WM message and pass    only size    hi       through 1Param       LTC_NM_None   In combination with the synchronous  interface  neither events nor Windows  messages are sent  Hence neither a  continuous measurement nor trapping error  events  beam broken etc   is possible  The  targetHandle and cookie of the  Se
266. t of the  SDK and its usage is demonstrated in Sample 18     However  the current LiveVideo CPP application  might be useful for non  Windows based  applications  e g  Linux  since support for  LTVideo2 ocx will not be available there     In this sample  the application directly connects  to the Video Port    5001  of the emScon server   The command interface is based on Ansi text  tokens  The following commands are supported      LiveImageStart        309     LiveImageStop    FrameRateStepUp    FrameRateStepDown      RequestCameraParameters     These tokens can be sent directly to an open  socket connection to port 5001     Arrival Data includes the following types     Live Image Data Blocks  Bitmap format     Note that each image arrives in two chunks  and must be composed to a complete image  before displaying it     Camera Parameter Block  Result of a  RequestCameraParameters  call   See source code  function OnReceive    on  how to parse incoming data   See source code  function OnPaint    on how  to display image data     The source code is commented in detail and  should be self  explaining  However  as already  mentioned  using the LiveVideo TCP IP interface  directly  as shown in this sample only is  recommended for non Windows client platforms   Rather base clients on  LTVideo2 ocx  for  Windows platform targeted application    Further details see  Readme txt  file in Sample19  folder and code  comments in source files     8 1 4 Orient To Gravity Procedure   This fu
267. t the TCP IP Port Number to 700 for  the Tracker Server     3 5 2 Sending Commands    3  Call a SendData function from the  TCP IP communication library or toolbox   Function name may differ   This function  typically takes a pointer to a data packet and  probably the size of it  unless the packet is  wrapped into a structure that knows its size  implicitly  for example a Variant structure         205    4  The architecture of the packets  TPI  protocol  is defined by the data structures in the  ES_C_API_Def h file     5  For invoking for example a GoPosition  command  use the structure GoPositionCT and  assign appropriate initialization values  In  particular  assign an ES_Command and an  ES_C_GoPosition as header  data and provide 3  coordinate values as command parameters    The compiler will not detect  if  for example  an  ES_DT_SingleMeasResult as type  or an  ES_C_SwitchLaser as command is assigned to a  GoPositionCT variable  Inappropriate initialization  values cause the command to fail     GoPosition initialization sample           GoPositionCT data     declare packet variable  data packetInfo packetHeader type   ES_DT_Command   data packetInfo packetHeader 1PacketSize   sizeof  data    data packetInfo command   ES_C_GoPosition    data dVall    1 879    data dVal2   2 011    data dVal3   0 551    data bUseADM   FALSE        Note  emScon Version 1 5 was tolerant in not  initializing    packetHeader IPacketSize    upon  sending commands  This is no longer the case for
268. tProbeCompensation  Deleted    ES_SSC_MeasurementTipCompensation  Deleted   Above three events inform about   compensation deletion     ES_SSC_ManyMechanicalCompensations  InDB       116    The recommended maximal number of  mechanical compensations has been  reached  Please delete some older  compensations     ES_SSC_MeasurementProbeButtonDown  This event is fired whenever one of the  probe buttons  measurement trigger  is  pressed     ES_SSC_MeasurementProbeButtonUp  This event is fired whenever the previously  pressed probe button is released     ES_SSC_ExternalTrigger Event   This event is fired whenever an external  Trigger Pulse occurs  Applies to trigger  source    ES TS ExternalEvent       ES_SSC_ExternalTriggerStartEvent   This event is fired whenever an external  Trigger Start Pulse  trigger signal rising  flank  occurs  Applies to trigger source     ES_TS_ExternalStartStopEvent       ES_SSC_ExternalTriggerStopEvent   This event is fired whenever an external  Trigger Stop Pulse  trigger signal falling  flank  occurs  Applies to trigger source     ES_TS_ExternalStartStopEvent       ES_SSC_CopyProtectionRemoved   This event is fired if the copy protection  device  dongle  is removed  System control  through TPI commands is locked     ES_SSC_TPConnectionClosing   This event is fired if the server connection  gets lost  Server control through TPI  commands is no longer possible  Server  probably needs a reboot     ES_SSC_ServerClosing  This event is fired if the server 
269. tationAngleTotal   double dCovarRotationAnglexyY   double dCovarRotationAnglexzZ   double dCovarRotationAngleYZ              This struct describes a single measurement  6  degrees of freedom  in a 6DoF continuous  measurement stream  Time1 indicates seconds  expired since a measurement start  Time2  indicates microseconds expired within the last  second  The total elapsed time in microseconds is     T  ms    10e6   ITime1   1Time2   Position values  angular values and statistic  parameters are in current units   CS type and  according to applied orientation   transformation  parameters     The position values relate to the center of the tip  ruby sphere    Rotation angles are always represented in the  interval between  PI and PI     The following helper  structs ease the  interpretation of the Rotation  Status     RotationStatus    Note  If the SystemParameter flag   ES_SP_ShowAll6DMeasurements  is set to  False    which is default   then only measurements with       137       Rotation Status OK will arrive  Interpreting the  Rotation Status only becomes an issue if the   ShowAll6DMeasurements  is enabled  By using  the  SetLongSystemParameter  command     The following union can be used to easily  interpret the rotation status  Assign the returned  value  a long  to URotationStatus 1  then interpret  the Error6D and optionally other fields  Note that  the fields are only valid if Status6D bit is set    The evaluation of rotation status in detail is  subject of advanced prog
270. tatisticMode  Gets the current statistic mode     ES_C_GetStilllmage   Requests a still image  in case the tracker is  equipped with an Overview Camera     For all Still Image related commands  see  main chapters 8  sub  chapter Still Image      ES_C SetCameraParams   Sets the current contrast and brightness  parameters of the Overview Camera  Valid  values are between 1  255  Saturation is  currently ignored and should be zero     ES_C_ GetCameraParams  Get current Overview Camera parameters     ES_C _CheckBirdBath   Carries out Bird bath check routine  Returns  Initial and current differences of BirdBath  Angles and Distances  Values are expected  in current units     ES_C_GetTrackerDiagnostics  Returns Tracker diagnostic information  This  is an advanced   diagnostic command  Not       73    usually used by common applications  See  Tracker hardware manual for details     ES_C_ GetADMInfo   Returns Absolute Distance Meter  information  Version and Serial Number   if  available  i e  If a LTD series tracker      ES_C_GetTPInfo   Returns Tracker Processor information  This  is an advanced   diagnostic command  Not  usually used by common applications  See  Tracker TP hardware manual for details     ES_C _GetNivelInfo  Returns Nivel information  if available    Version and Serial Number      ES_C SetLaserOnTimer  Switches the laser on in predefined time    ES_C_ GetLaserOnTimer  Reads the remaining time left before it is  switched on    ES_C_ConvertDisplayCoordinates   Conver
271. te Compensation    sequence  including  reception of quality result parameters   TotalRMS       181       and maxDev are angular values and are in  current angle units    For details see special chapter  Intermediate  Compensation procedure    in chapter 8           struct CallIntermediateCompensationCT     struct BasicCommandCT packetInfo           struct CallIntermediateCompensationRT         struct BasicCommandRT packetInfo   double dTotalRMS   double dMaxDev    long lWarningFlags     hi       Error codes    A return status other than ES_RS_AIlIOK  0   means that the command could not be completed   In addition to the values defined in  ES_ResultStatus  the CallIntermediateCompensation  command answer status can evaluate to one of  the following values    Code Description   23011 EmScon database open failure  F     23012 EmScon database read failure  F     23013 EmScon database write failure  F    23014 No points to measure in database   23020 Tracker initialization failed   23021 Tracker getting parameters failed   23022 Tracker setting parameters failed   23030 There was an unexpected command  answer  F    23031 Sending data via TCP IP failed   23032 Error on receiving data  communication  error    23033 Insufficient memory to create data  F     23501 At least one of the 3 calculated  mechanical parameters is not in range  specified        182       23502    23503    23998    Too few  less than 2  measurements  available  Calculation cannot be  performed  Either not enou
272. te the  requested action   SendData   will return  immediately  On completion of the requested  action  the tracker server sends an answer back to  the client  Depending on the command  it may  take a few seconds between sending the  command and receiving an answer  This requires  some type of notification or callback mechanism   That is  as soon as data arrives from the Tracker  Server  some sort of event needs to trigger a  ReadData   procedure in the client application   Depending on the TCP IP communication  this  notification could be a Windows Message  an  Event or a Callback Function     This type of communication is called  asynchronous           207    3 5 6 Asynchronous Communication    9  From the programmer s point of view   asynchronous communication is much more  difficult to handle than synchronous  communication  The programmer must ensure   not to send a new command until the answer of  the previous one has returned     3 5 7 DataArrived Notification    10  All TCP IP communication  libraries toolkits contain either a DataArrived    notification or a similar function  which is called  by the framework each time data has arrived   Depending on the toolkit     e The function may directly return a Variant  type parameter that contains the data     e The function may deliver the data within a  byte array     e The function returns the size of the data  packet that is ready to be read  In this case   the DataArrived   function subsequently  calls a ReadData   func
273. ted       User defined TypeLibrary  enum  structs   supported       Event and WM Message Notification  methods supported  Events to be preferred      e VisualBasic for Applications  VBA   Excel   Word  and Access     All interfaces supported       User defined types of TypeLibrary  enum   structs  supported with Office 2000  but not  fully supported with Office 97        253         Event notification methods supported  WM  Messages not supported      e C and VB NET    All interfaces supported       User defined types of TypeLibrary  enum   structs  supported      Event notification methods supported      Scripting Languages  VBS  JavaScript   Currently not supported  Support of these  languages requires    Dual    or  Dispatch COM  interfaces    Could be achieved by providing a COM  Idispatch wrapper around the LTControls  custom interfaces     q It is recommended to use Office 2000 for TPI  VBA Programming  Office 97  Excel 97  Word 97   lacks UDT and contains some bugs that make  development of TPI clients virtually impossible   as soon as events are involved     Interface methods using  struct  parameters   which do not support user defined types  Office  97 only   cannot be used from within VBA   However  functions are available based on basic  data types  as a work around     Older versions of VBA may lack support of  enum type symbols  so they need to be passed as  4 Byte  long  values  Therefore the numerical  representation of particular enum values must be  known  I
274. terface  These enums and structs will be  available for applications using LTControl  when  the programming language supports user   defined data types     To get an overview of the interfaces  including  properties  methods  events and UUIDs  exposed  by a COM object  a COM viewer may be used     e Select the tools menu of Visual Studio   e Select OLE COM Object Viewer    e Choose File  gt  View Type Lib    e Select LTControl dll or LTControl tlb     The LTControl component is very convenient for  developing simple tracker applications using  Visual Basic  MS Excel  MS Access etc     However  where performance and customized  TCP IP communication are an issue  the C C    interface is recommended    It is not recommended to use the COM TPI for  writing C   client applications  although this is  possible and also demonstrated in Sample 7   However  especially receiving data is  complicated in such applications  Rather use the  C   TPI for C   applications    On the other hand  using the COM interface for  VisualBasic is very convenient  including  receiving data  through Event handlers         243    Refer to Samples 5  VB  and Sample 8  Excel  for  further information on how to apply the emScon  COM interface for Visual Basic clients    Sample 7 shows the usage from within C     although we do not recommend this  For C    applications  we rather recommend to use the  C   API directly    Samples 14 and 15 show the usage of the COM  TPI from VB  NET and C  applications  respect
275. ters     Implementing Synchronous Commands    Add a button named InitSync  The button handler  should be completed with the following code           Private Sub InitSync_Click     On Error goo error handler    Ob jSync Initialize    Exit Sub  ErrorHandler   MsgBox  Err Description   End Sub       Since this is a synchronous call     e ObjSync  Initialize will not return before the  tracker has finished initializing     e The Exit Sub statement will not be reached until  initialization is finished  A real application  would at least display an hourglass cursor  while the program resides in the InitSync  function     The error handler should be implemented in  every command  button  handler  otherwise the  application will terminate in case of an error   unhanded exception      Add another Button Handler Measure Single Point  and implement the handler as shown below  It is  presumed the tracker server is set to  stationary   when triggering this command  In Sample 5 code   this is ensured in the Button_Connect_Click    handler     Of course the laser beam must be  attached to a reflector in order to perform this  command successfully  The result     since a  synchronous answer     can be shown directly in a  message box  only x  y and z are shown         273             Private Sub StartMeas_Click    Dim x As Double  Dim y As Double  Dim z As Double  Dim d As Double  d is a dummy variable  Dim b As Boolean    On Error goo error handler    ObjSync MeasureStationaryPoint x  y  Zz
276. that this compensation has only two  reflector definitions  CCR 1 5in and TBR 0 5in   Conveniently  the mapping between name and  ID remained the same as it was in the previous    compensation   Name ID  CCR 1 5in 2  TBR 0 5in 5    If reflector ID 7 was the active one at the time the  camera was removed  you will now get a    wrong  current reflector    error message on executing  reflector  dependent commands  Thus  the  application must first set one of the now available  IDs 2 or 3 with the  SetReflector  command     The fact that the relation between reflector ID and  Name remains the same throughout all tracker   compensations may be convenient to application  programmers since there is no need to re query  all reflector mappings upon a tracker  compensation change     8 1 2 Still Image Command    For trackers equipped with an Overview Camera   the GetStillImage command takes an image and  delivers it as a file image data block     Related Commands   e GetStilllmage   e SetCameraParams   e GetCameraParams   e StilllmageGetFile  COM  not in C     e WriteDiskFile  COM only        300    These commands are available on all TPI levels   C  C    COM   Set GetCameraParameters is not  explained here further     Preconditions   The following preconditions have to be fulfilled   e Camera mounted on tracker   e System settings     Has video    flag activated    e Tracker must be in camera view  command  ActivateCameraView     Application of GetStilllmage     C C      The applicati
277. tion    Click positions on the Image are currently written  out to Excel cells  These values can be used to  calculate relative tracker movement angles  call  MovekelativeHV to direct the tracker there and  then request a new Image           Private Sub Imagel_MouseDown  ByVal Button As Integer  ByVal  Shift As Integer  ByVal X As Single  ByVal Y As Single   Beep  ws Cells 2  2  Value  ws Cells 3  2  Value  ws Cells 5  2  Value  End Sub    X  Y  Shift       8 1 3 Live Image display    Live Image Control LTVideo2 ocx    The live camera display from the Overview  Camera can be implemented into user  applications by using an ActiveX control   LTVideo2 ocx  See SDK lib directory   ANSI Unicode subdirectories     Registering LTVideo2 ocx    LTVideo2 o0cx is an ActiveX type COM object and  requires registration on the Application  Processor        305          From the command line perform the following  command     Regsvr32  lt Path gt   LTVideo2 ocx  where  lt path gt   depends on the location of the file     typically  C  WINNT System32     ANSI Unicode Version    Use the ANSI version for Win98 ME platforms  and the Unicode version for WinNT 2000     See Version info of LTVideo2 ocx for details   under File Properties  gt  Version TAB     Development Platforms  For Visual Basic or Office  the ActiveX controls  must be added as a reference     For VC    a wrapper class is generated using     Add to Project Components  gt  Controls  gt  Controls  type library from Visual Studio   
278. tion Errors    Target lost  tracking has failed   Interferometer has failed  lost count     703   Azimuth limit has been reached  The tracker head has attempted to go beyond the   240 degrees     Elevation limit has been reached     705   Positioning timeout  positioning of the tracker head could not be completed within the  timeout period     Abort command   invalid angle on the azimuth axis   invalid angle on the elevation axis           336    Radial speed is within bounds   Sent after a speed warning when the speed has  returned to acceptable bounds     Radial speed warning  This is a warning that the movement of the reflector in the radial  direction is approaching the speed limit     7 Radial speed error  This indicates that the radial speed has exceeded the capacity of  72    10  11  12  0     60    the interferometer and there is a likely loss of accurate distance setting   Intensity overflow on photosensor  This error occurs  if the intensity value from the  photosensor exceeds the range of the A D converter  The TP will change the A D range  automatically   Laser light mode has jumped  This means the laser control loop wasn   t able to stabilize  the laser tube   This can be caused by a fast and large temperature change    ADM measuring timeout  the communication with the ADM is working  but there is no  pleted measurment within a certain time by the ADM         reseved S OSOS     reseved S SOS  TCAM vertical drive not initialized   761   TCAM zoom not initialized  
279. tion environmental       temperature  pressure  and humidity  the system  calculates the light  refraction index of the  interferometer  IFM  and  the absolute distance  meter  ADM   These  parameters have a direct  influence on the distance  measurement A change  of 1  C causes a  measurement difference  of lppm     A change of 3 5mbar  causes a measurement  difference of Ippm     Change environmental  parameters when  significant changes take  place     Default values   20 0   C  1013 3 mbar             28       Set Reflector       Implication    Comment          Select a specific reflector       A wrong reflector results  in a wrong initial IFM  distance  e g  when using  the Go Birdbath  command  This has a  direct influence on the  distance measurement     Tooling ball reflector   TBR    5 310 mm  Cat eye   59 114 mm    There is usually more  than one reflector  defined  These can be  queried from the system  by using the   GetReflectors  command   This shows the relation  between the ID and the  Name  Reflector Type    The ID can then be  passed to the   SetReflector  command  to activate it  Note that  this setting remains  persistent  Nevertheless  it s strongly  recommended that an  application upon launch  at least checks whether  the desired Reflector is  set   More info  Chapter 8   Get  Reflectors  command          29          Set Compensation       Implication    Comment       Select a specific  Mechanical Tracker  Compensation       More than one  mechanical Tr
280. tion immediately  in  order to get the data into a local byte array     3 5 8 Data arrival    Traffic Jams     11  If a  traffic jam  occurs on the incoming  TCP IP line  i e   if incoming data is being queued   a ReadData   call will read all the currently  available data with no notification for each  individual packet  Many packets may be queued  and only one DataArrived notification might be  issued  This means that the byteArr buffer will  contain more than one packet  This may occur on  high frequency  continuous measurement  streams  The application has to make provisions  to correctly treat such cases  The  PacketSize value  is most convenient when parsing the byteArr  buffer        208    If the byteArr buffer is completely filled with data   it is likely that the last packet in the byteArr is  incomplete  The packet fragment needs to be  saved and padded to complete upon the  subsequent read call     See chapter  Queued and Scattered Data    for  details     12  Assuming a received data block has  been read into a byte buffer named byteArr  In  order to interpret the data  a mask is required   This requires knowledge of the type of data  packet  enum ES_DataType   A typical  PacketHeader interpreting code is as follows     3 5 9 PacketHeader Masking          PacketHeaderT  pData    PacketHeaderT   byteArr        13  Access the type and the size of the  packet can be with           pData  gt type   pData  gt lPacketSize        The packet size is only for convenience 
281. tion or   if close to a reflector  FindReflector  If  Keep  last position is enabled     the system tries to  re establish the distance automatically as  soon as a reflector can be tracked  For  trackers without a ADM       Place the reflector in the Birdbath  Do a  GoBirdbath       Move reflector to the measuring position  without interrupting the beam     ES_RS_NoTrackerConnected  Meaning  The connection between controller  and tracker is broken        90    Note  Check all cables between controller  and tracker     ES_RS_TrackerNotlInitialized   Meaning  The tracker is not initialized   Note  Execute the Initialize command  Set the  environmental parameters   manually weather station  before  initialization    See also chapter    Initial Steps    ES_RS_ ModuleNotStarted   ES_RS_ ModuleTimedOut  ES_RS_ErrorReadingModuleDb    ES_RS_ErrorWritingModuleDb   Meaning  These errors indicate a software  installation problem on the emScon server   Note  Reinstall emScon software     ES_RS_NotInCameraPosition   Meaning  Application tried to grab a video  image from the Overview Camera  when the  tracker was not in camera position    Note  Issue an ActivateCameraView command  first     ES_RS_TPHasServiceFirmware   Meaning  The server has loaded service  firmware  This firmware is not suitable for  ordinary tracker usage  This error cannot  occur under normal conditions    Note  Refer to Leica service     ES_RS_TPExternalControl   Meaning  The controller is running under  external  e g
282. tion set                   167                            Bit Description   Bit 6 Tracker parked   Bit 7 Motor switch is on  Bit 8 Encoder angle error  Bit 9 Sleep condition set  Bit 10 Motor power active          GetTrackerStatusCT RT          struct GetTrackerStatusCT     struct BasicCommandCT packetInfo        i    struct GetTrackerStatusRT      struct BasicCommandRT packetInfo   enum ES_TrackerStatus trackerStatus                 Command structures for getting the tracker  status     We See enum  ES_TrackerStatus  for details     Set GetReflector s CT RT    Command structures for getting setting the  current reflector by its numerical ID        168          struct SetReflectorCT     struct BasicCommandCT packetInfo   int iInternalReflectorId   he    struct SetReflectorRT      struct BasicCommandRT packetInfo   he    struct GetReflectorCT       struct BasicCommandCT packetInfo      i    struct GetReflectorRT     struct BasicCommandRT packetInfo   int iInternalReflectorId   he    struct GetReflectorsCT      struct BasicCommandCT packetInfo         struct GetReflectorsRT       struct BasicCommandRT packetInfo    int iTotalReflectors    int iInternalReflectorId   enum ES_TargetType targetType    double dSsurfaceOffset    short cReflectorName  32         i       The GetReflectors command retrieves all reflectors  defined in the Tracker Server  The answer  consists of as many answer packets as reflector  types  defined in the server database  These  resolve the relation between
283. tions  based on LTControl   point of view     The programmer is not required to deal with  TCP IP communication libraries or system  programming interfaces              255    The high level TPI supports both synchronous  and asynchronous methods    Note  Using the    synchronous    interface may  provide some convenient properties  However   there are also some disadvantages  Long  taking  actions cannot be interrupted  FindReflector   OrientToGravity     as this is possible with  asynchronous communication on using     StopMeasurement    command  Synchronous  commands also imply potential timeouts  They  also offer less transparency and control to the  programmer    For highly professional applications  we  recommend programming in C   or C   hence  using the C   or C  interface directly  which are  asynchronous be design   If using the COM  interface for VB VBA VB NET C  application  programming  we recommend to prefer the  asynchronous COM interface to the synchronous  interface  Although client  programming is more  difficult with the asynchronous interface  the  programmer has much more control and  transparency     COM objects expose  interfaces   described by a  Type Library  which is implicitly included in the  DLL  A pure Type Library LTControl tlb is also  available  although not really needed  This High   level interface does not provide any additional  functions  in terms of Tracker Server controlling  functions   LTControl is strictly based on the C     TPI  wit
284. to atmospheric values such as  temperature and pressure  The system  can still perform the requested action   but the result will not be within  specifications     q In case of OutOfRangeOK  the user  should be aware that the system may not  deliver highest accuracy     ES_RS_WrongCurrentReflector   Meaning  An invalid reflector was set  e g  if  the parameter of command SetReflector  applies to a non existing reflector ID or to an  ID of an existing but inaccurate reflector   Note  This is usually a programming error in  the application  The application should not  allow the user to set an invalid reflector  The       85    application should query the IDs of valid  reflectors with the command GetReflectors  and then offer these as possible parameters  for the SetReflector command     ES_RS_ NoCircleCenterFound   Meaning  This error occurs only in the  continuous measurement mode   CircleCenterMode  The calculation of the circle  center failed    Note  The measurements represent either a  very small sector of the circle and or describe  a circle not within the required accuracy   which is not sufficient for calculation  The  Circle Center Mode parameters may not  have been set properly    See command   SetCircleCenterModeParams         ES_RS_NoSphereCenterFound   Meaning  Similar to  ES_RS_NoCircleCenterFound    Note  The measurements represent a very  small sector of the sphere  For good results   at least half of the sphere should be covered  by measurements  The Sphere Ce
285. tors   Release the motor for horizontal and vertical    tracker head movement in order to allow  manual tracker head movement     ES_C _ ActivateCameraView   Activates the camera view  The mirror is  turned upwards in order to direct camera  view towards tracker head orientation        56    Command only applies to Trackers equipped  with an overview camera     ES_C Park   Send tracker to park position  The laser beam  points towards the floor on the opposite side  of the Bird bath     ES_C_SwitchLaser  Switch the laser off or on  Usually used to  switch off the laser overnight     ES_C _ SetStationOrientationParams   Set the 6 orientation parameters to be  applied to measurements and positioning  coordinates  Invariant orientation parameters  are  0 0 0 0 0 0   With these default settings   the tracker delivers measured coordinate  values  and takes positioning values  in the  instrument s CS  Orientation parameters  values are also ignored if the  applyStationOrientationParams system settings  flag is not set    Station orientation parameters itself are in  current units and current CS type  but  neither according to applied transformation  settings nor to applied orientation settings   which would mean recursive   No range  limitations apply    Related structure  StationOrientationDataT   ES_C_ GetStationOrientationParams  Queries the currently applied 6 orientation  parameters    Related structure  StationOrientationDataT     ES_C_ SetTransformationParams   Set the 7 tran
286. ts display coordinate triples from  base to current and back    This is a private function command and is  not documented supported  It should not be  used for any client programming    ES_C_GoBirdBath2   Sets the laser beam to the Bird bath by  turning tracker head in specified direction   clockwise or counter clockwise   Note  This  command only applies to 3D measurement  modes  See description of ES_C_GoBirdBath  for more details     ES_C _SetTriggerSource   Sets the Trigger Source for triggering  measurements from remote  e g  Probe  buttons  or clock signal     Note  Trigger functionality is not yet       74    available with emScon 2 1 x releases and may  be subject to change     ES_C_GetTriggerSource   Get the currently active Trigger source   Note  Trigger functionality is not yet  available with emScon 2 1 x releases and may  be subject to change     ES_C_GetFace  Get the currently active Tracker  Face  I or II     ES_C_GetCameras   Enumerate all Measurement cameras known  to the system  i e  those defined in the  database   Apart from the    internal    ID  a  selection of properties is delivered  Name   Type  Serial number       This approach is the  same as used for the command   ES_C_GetReflectors  or   ES_C_GetCompensations      ES_C_GetCamera   Get the currently active  i e  mounted  camera  Only the internal ID is returned  For  additional information  the properties need  to be looked up in the list delivered by  ES_C_GetCameras    ES_C SetMeasurementCameraMo
287. tuff       e The main   function first does a TCP IP  connection by calling the function  TcpIpConnect    starts the Data Receiver  thread and enters an endless  User Interface  loop   The default IP address    192 168 0 1     should be adjusted to the actual server  address  Alternatively  the IP address can  be passed as command  line argument  upon running the application     e This loop looks for user input of one of the  two TPI commands    1    for Initialize Tracker  and  g    for Get Direction     e Ifthe user enters x  the loop is stopped  the  TCP IP connection is closed and the  application terminates    The TcpIpConnect   function is  straightforward up to the call of connect       e Call WSAStartup  After connecting  call  WSAEventSelect    which takes the  following parameters       A socket handle  that has been created  before  as a global variable       An event of type WSAEVENT as a global  variable  This variable must be initialized  with the return value of a  WSACreateEvent   call        213            A flags parameter  FD_READ is passed   indicating an interest in data arrival  events  a realistic application would have  to also trap FD_CLOSE events      Calling this function will cause the TCP IP  framework to signal the passed event   whenever data has arrived at the socket     The DataRecvThread   has an infinite loop with the  following statement           WaitForSingleObject  g_hSocketEvent  INFINITE         This is a blocking call and causes the l
288. uence for 3D    Measurements    3D Measurements are performed to a  currently  selected  Reflector  The selected Measurement  mode must apply to one of the 3D modes  The  tracker does not require a T Cam  although there    might be one mounted                                Steps TPI command   1  Establish TCP IP Depends upon TCP IP  connection  communication     See   different samples   2  Set units  length  ES_C SetUnits  angle  temperature  and pressure    3  Set current ES_C  SetEnvironmentP  environmental arams   temperature   pressure and  humidity   4  Initialize the Laser ES_C Initialize  Tracker   5  Select desired 3D  ES_C SetMeasurement  Measurement mode  Mode   Stationary   ContinuousTime      6  Query all defined  ES_C_GetReflectors  Reflectors   7  Select the Reflector  ES_C SetReflector  being used             23       8  Go Bird Bath ES_C _GoBirdBath   optional  if Tracker  equipped with an  ADM    For 6D modes  the  tracker will move to  zero position instead   GoBirdBath does not  make sense for  Probes       Orientation ionParams  parameters    9  Set Station ES_C _ SetStationOrientat       parameters nParams    10  SetTransformation  ES_C_ SetTransformatio       system type  RHR   temType  LHR              11  Set Coordinate ES_C_SetCoordinateSys          In addition  a valid mechanical Tracker  compensation must be active  This is usually  always the case  supposed the Tracker  compensation once has been performed or  imported   However  there can be exc
289. unction names  from the related C TPI structures        219              The text in  brackets  shows the rule applied to a  sample      1     Look up the command of interest in the  enum  ES_Command    C  TPI Reference     ES_C_GetContinuousTimeModeParams       Replace the prefix  ES_C_  by  On  and pad the    name with  Answer  in addition  This will be  the name of the virtual C   answer function     OnGetContinuousTimeModeParamsAnswer          For finding the passed parameters  ignore the     On  prefix and replace the  Answer  Postfix by   RT     GetContinuousTimeModeParamsRT        Look up this RT structure in the C  TPI    reference for a description of all the  parameters     General Data Arrival virtual Functions          virtual void OnCommandAnswer const BasicCommandRT amp  cmd     virtual void OnErrorAnswer  const ErrorResponseT amp    error      virtual void OnSystemStatusChange    const SystemStatusChangeT   status         e OnCommandAnswer   is called for every  command  in addition to the command   related answer function  This function can  be convenient especially for non  parameter  taking commands     e OnErrorAnswer    is called upon an error  condition  The status parameter indicates  the kind of error and  if known   the  command parameter indicates the  command that caused the error  Note that  not all errors are caused through  commands  e g  Beam broken   In such  cases  the command parameter is     unknown       For status values  see enum   ES_Resu
290. units and current CS type     asa  input output  Filter  to all coordinate type related  parameters              172    E  See struct  StationOrientationDataT  for  details     Set GetTransformationParamsCT RT          struct SetTransformationParamsCT     struct BasicCommandCT packetInfo   struct TransformationDataT transformationData   he    struct SetTransformationParamsRT      struct BasicCommandRT packetInfo   i    struct GetTransformationParamsCT      struct BasicCommandCT packetInfo         struct GetTransformationParamsRT     struct BasicCommandRT packetInfo   struct TransformationDataT transformationData   he       Command structures for setting getting the  transformation parameters  These settings act      like current units and current CS type     as a  input output  Filter  to all coordinate type related  parameters     r  See struct  TransformationDataT  for details     Set GetBoxRegionParamsCT RT          struct SetBoxRegionParamsCT     struct BasicCommandCT packetInfo   struct BoxRegionDataT boxRegionData         struct SetBoxRegionParamsRT      struct BasicCommandRT packetInfo         struct GetBoxRegionParamsCT      struct BasicCommandCT packetInfo         struct GetBoxRegionParamsRT     struct BasicCommandRT packetInfo   struct BoxRegionDataT boxRegionData   l         Command structures for setting getting the Box  Region parameters     Fk See struct  BoxRegionDataT  for details        173          Set GetSphereRegionParamsCT RT          struct SetSphereRegi
291. upon launch  at least checks whether  the desired compensation  is set  command   Get CamToTrackerCom  pensation        The principle of dealing  with compensations is  the same as for  Reflectors  For more  details see chapter 8   Get  Reflectors  command          31       Set Probe Compensation       Implication    Comment          Select a specific Probe  Compensation  Related to  6DoF modes only        More than one Probe  Compensation may be  defined for a tracker   camera  although often  there is only one      If there is more than one   these can be queried from  the system by using the   GetProbeCompensations   command  This will show  the relation between the  ID  a number  and the  Name  a Date  String  of  the available  compensation  The ID  can then be passed to the     SetProbeCompensation   command in order to  activate it  Note that this  setting remains  persistent  Nevertheless  it s a good idea that an  application upon launch  at least checks whether  the desired compensation  is set  Command   GetProbeCompensation      The principle of dealing  with probe  compensations is the  same as for Reflectors   For more details see  chapter 8   Get Reflectors     command          32          Keep Last Position Flag          Implication Comment  Makes the laser beam Enabling this flag is  stay at its current optional for 3D    position if the beam is    broken     measurements  it makes  only sense if the Tracker  is equipped with an  ADM   This flag is  cleared b
292. urements     23  2 4 3  Command Sequence for  DOF  Measu  rements syed cal ca EE EEEE teva EEEn 25  2 4 4 Initial Steps Description in Detail                 00   27  C   Interface   3 1 Low level TPI Programming                0008 37  3 1 1     PRECOMGIONSicariccicariettincintiaeepdisieigieimeeticess 37  3 1 2 Recommendation             cccceeeceeeeeeeeeeeeeeeeeeeeees 37  3 1 3    Byte Alignment    n e 38  3 1 4  Little Big Endians            eeeeeeeeneneeeeeeeeerernnnneeene 38  3 1 5 Preprocessor Statements                 ccceeeeeeeeeeeees 39  3 1 6 TPI Boolean  Data Type              ccceeeeeeeeeeees 39  3 1 7 Enumeration Type Members Numerical  representaatio Miia a a E 40  3 1 8 Basic C Data Type size of TPI Structures          40   3 2 Communication BaSiCs                  sseeeeee 40  3 2 1 Commands fined cst vied lasssecless tees iada silanes 40  3 2 2 Command Answers           cccccccceeeeeeeeeeeeeeeeeeeeeees 41  3 2 3  EMOMEVCIIS saat aliases nla hadansraliabies 45       3 2 4 System Status Change Events                0000 45    3 2 5 3D 6 DOF  Related command                      46  3 3 C  Language TPI Reference             ccsssssseee 47  Deu  PEROT PSS EAMES ee EE EA entreaties EEEE 47  3 3 2 Enumeration Types                   ccccceeeeeeeeeeeeeeeees 48  3 4 Data Structures              cccccsssseeeessessseeeeeeeees 133  3 4 1 Basic Data Structures           cc ceeceeeeeeeeeeeeees 133  3 4 2 Packet Data Structures             ceeeceeeeeeeeeees 150  3 5 C  La
293. urse any other error  message of your choice can be displayed     To get the error number rather than a text  the  error handler would may look as follows           Exit Sub    ErrorHandler   MsgBox  CStr   Error occurred      amp   ObjConnect LastResultStatus        Do not use the term  Err Number   This is a COM  error number  which is useless to the application     Alternatively  the number of the last error   lastResultStatus  can also be retrieved with the  command  GetSystemStatus      T Additional or different error handling code  can be inserted after the ErrorHandler label     Exception Handling in C     In C   applications  exception handling is  performed through  try catch  statements  The  caught exception is of type _com_error        251             See Win32API COM documentation for details of  ISupportError Interface           try     objSync  gt FindReflector 5 0  true      catch _com_error  amp e       MessageBox   Exception  s    LPCTSTR e Description              An e Description   returns the appropriate string  that describes the reason of the failure   Try catch   statements may be nested  and are required when  queuing several synchronous commands within  one C   function     If the error number rather than the  default  text  is of interest  use the property  objConnect LastResultStatus           try  objSync  gt FindReflector 5 0  true      catch _com_error  amp e      MessageBox   Error Nr  d   objConnect LastResultStatus               Alternatively
294. us    Additional status information to be delivered    with each single measurement of a continuous    measurement stream     Measurements with a status other than    ES_MS_AIlOK should be treated with care           enum ES_MeasurementStatus         ES_MS_A110K   ES_MS_SpeedWarning   ES_MS_SpeedExeeded   ES_MS_PrismError   ES_MS_TriggerTimeViolation        ES_MS_AIlOK   Measurement was carried out within  specified target speed  movement    ES_MS_SpeedWarning   Measurement was taken  when target was    moving with a speed above warning  threshold     ES_MS_SpeedExeeded   Measurement was taken when target was  moving with a speed above limit    ES_MS _PrismError   Measurement could not be taken due to a  prism error  Reflection is probably too weak     ES_MS_ TriggerTimeViolation  Those measurements marked with       101          TriggerTimeViolation    in a  trigger  controlled  stream could not be taken in  exact coincidence with the trigger pulse   This situation can occur if the trigger pulse  rate is very close to the maximum  measurement rate    If it is even beyond the maximum  measurement rate  probably all of the  measurements will be marked with     TriggerTime Violation        ES _ TargetType    This enumeration type names the known target    types  prism types   It is used as one of the  ES_C_SetSystemSettings command parameters           enum ES_TargetType         ES_TT_Unknown   ES_TT_CornerCube   ES_TT    CatsEye     ES_TT_GlassPrism   ES_TT_RFIPrism        ES_
295. use  usually  no COM  functions are called there subsequently       On Error GoTo ErrorHandler    1  Get the data    Dim data As Variant  LtConnect GetData data      2  Get header info  Calling this function is optional     the only thing we need here is numResults  However     it s the same as resultsTotal passed to the functions     Dim numResults As Long  Dim measMode As Long  Dim temperture As Double  Dim pressure As Double  Dim humidity As Double    LtConnect ContinuousDataGetHeaderInfo data  numResults   measMode  temperture  pressure  humidity      since we have numResults twice from different paths  lets    check them for compliance     If Not  numResults   resultsTotal  Then  MsgBox  Fatal Error   unexpected discrepancy   End If      since we know how many results  we can loop over the index    Note that index runs form 0 to numResults   1    For index   0 To numResults   1    data and index are input parameters  rest output    LtConnect ContinuousPointGetAt data  index  status  _  timel  time2  dVall  dVal2  dVal3      TODO  do something with each result here  Next  Exit Sub  ErrorHandler     MsgBox  Err Description   End Sub       ContinuousPointGetAt   Continuous6DDataGetAt    may have an impact on performance  They have  been primarily designed for use with VB A   For  C   applications  more efficient ways to extract  continuous measurements exist     VBA applications  depending on data processing   may not have enough performance when using  continuous high data
296. used to figure  out which modifier keys are pressed during the  click  The flags parameter is the same as  provided by the OnLButtonDown standard  message    See Microsoft MFC documentation  for details     e Server address and Port number must be  passed as properties     e AnRGB triplet can be passed to alter the  color of the crosshair          307    The following event is fired on a  GetCameraParameters method call           void CameraParams  long brightness   long contrast   double focalLength   double horizontalChipSize   double verticalChipSize   VARIANT_BOOL mirrorImageHz   VARIANT_BOOL mirrorImageVt          This is usually done once upon initialization to  get the actual overview properties  FocalLength   Chip characteristics and mirror status are for  advanced programming issues  If one wants to  implement it s own  image click handler     i e   determine relative tracker movement parameters  out of image coordinates     Important Remark    Up to LTVideo2 OCX version 2 0 0 13  part of  emScon 2 0 54 release   it was essential for an  application to call    GetCameraParameters    as part  of the control   s initialization process  i e  before  calling    StartLivelmage    for the first time     Since    GetCameraParameters    is an asynchronous  command  calling this command upon  initialization was a somehow struggling task  because the application had to wait for the event  coming back  a synchronization issue  which is  prone to bugs      If       GetCameraPara
297. using  the emScon COM  LTControl  synchronous  interface     See Chapter    Proper Interface  Selection      Further details see description of     ES_C_StopMeasurement        ES_C_ StartNivelMeasurement   Triggers a Nivel 20  inclination sensor   measurement  if sensor is available  Note   result are in native Nivel20 units  milli   radiant  Celsius   regardless of the currently  set angular and temperature units  This is an  exception to the common convention   Reason  It does not make sense to provide  very small angles  parts of milli  radiants  in  Degrees or Gons     ES_C_StopMeasurement   Stopping a continuous measurement is the  main purpose of this command    However  this command can also be used to  interrupt other long taking  but deterministic  actions  This is a new feature introduced  with V2 0 and is not available on earlier  emScon versions     Commands that can be interrupted include   Stationary Measurements  if a long  measurement time is applied   those  Positioning Commands including a spiral  reflector search  GoPosition  FindReflector      and finally the    OrientToGravity    and     Automated Intermediate Compensation     processes    Note  the Tracker    Initialize    command  cannot be interrupted        65    Interruption of long taking commands is also  not possible when using the emScon COM   LTControl  synchronous interface  If an  issue  use the asynchronous COM interface   For details see chapter    Proper Interface  Selection        ES_C_Cha
298. value for parameter xx  where xx is the number of the parameter  The number of  the parameter depends on the command     Several parameters are invalid        10 1 4 Laser Control Processor HW Errors           4xx more error numbers will be defined in the future        10 1 5 Absolute Distance Meter HW Errors    501   ADM has no firmware loaded   502   Set frequency not locked     503   Set frequency  illegal state  internal software error   504   Measurement cycles exceeded  505   Reserved     Resne O O OO OOOO S  506  508  509  512  513  514  515  516         501      502      503      504      505      506      508      509      512      513      514      515      516         335    Pea pe ed    550   Light polarization during ADM measurement too unstable     happens normally only on large entry angles into prisms       ase   ADM communication  frame error   ADM  LTC communication  internal software error  unknown ADM error       10 1 6 Hardware Error  additional error numbers to  the 9xx group     eo S S O   606   LTCplus base  video output cable not connected o o Z i O    609   Motor Amplifier  motor power  28V  Watchdog has locked   IFM count not stable  counting error during servo control point measurement      632   Serial port COM1  reserved SSS O    635   Serial port COM2  reserved __ SS O    No Trigger Card  No internal TCAM Probe cable  No internal Trigger I O cable    No Cable Trigger to Mot Amp Card  Incompatible program on Trigger Card  FPGA        10 1 7 Opera
299. vt      if  m_pLTConnect    NULL   return     m_pLTConnect     gt GetData  amp vt      MultiMeasResultT  pData     MultiMeasResultT   vt parray  gt pvData     ASSERT  pData  gt 1lNumberOfResults    resultsTotal      for  int i   0  i  lt  pData     gt lNumberOfResults  i          s Format  _T     71f    71f      71f       pData  gt data i  dVall   pData  gt data i  dVal2   pData  gt data i  dVal3         this is application dependent  May differ in your app  m_pMainWnd  gt m_edit_Result SetWindowText  s    buff for       OnContinuousPointMeasDataReady             eOn using a Windows message notification  method  LTC_NM_WM_Notify  it looks quite  similar  However  with the event method there  is a unique event function for just receiving  continuous results  With message notify  methods  all types of data packets come in  through the same message handler  The data  must be interpreted with a  switch  statement   This is done in the ProcessData   function   Use of the CESAPIReceive class of the C    interface is another possibility     eThe following implementation demonstrates  receiving  not only data of continuous  measurements  but also  any kind of data           LRESULT CCPPClientDlg  OnNotifyMsg  WPARAM wParam  LPARAM lParam      CString s   VARIANT vt   VariantInit   amp vt    m_pLTConnect     gt GetData  amp vt         wParam   msg ID   cookie   ProcessData vt parray  gt pvData  wParam      return true     return non zero if msg handled            Activating this funct
300. xtract from an Excel application  The  image is displayed in an Image dialog control   named Imagel1            Private Sub GetStillImage_Click     On Error GoTo ErrorHandler    Dim fileData As Variant  Dim size As Long    ObjSync GetStillImage ES_SI_Bitmap  size  fileData  ObjConnect WriteDiskFile fileData   C  Temp img bmp       Now load picture into sheet  Imagel Picture   LoadPicture  C  Temp img bmp      Exit Sub  ErrorHandler   MsgBox  Err Description   End Sub       Event handler    Within an event handler  the file data structure  must be extracted first  since GetData delivers the  complete data packet including header  information  A similar helper function is required  in VB  since no casting to  GetStilllmageRT     is  available    See chapter    Continuous measurements and VBA    for       304          similar method using  Continuous DataGet Header Info           Private Sub ObjAsync_StillImageDataReady  ByVal imageFileType As  LTCONTROLLib ES_StillImageFileType  ByVal fileSize As Long   ByVal bytesTotal As Long    Dim fsize as Long    dummy   ObjConnect GetData data  Get whole packet  incl header     1    retrieve out size and file data  ObjConnect StillImageGetFile data  fsize  file    ObjConnect WriteDiskFile file   img  bmp       Now load picture into sheet  Imagel Picture   LoadPicture  img bmp      End Sub       Although designed for use with VB   StilllmageGetFile and WriteDiskFile can also be  used in LTControl based C   applications     Image Click Posi
301. y   3 noPoints    7  2           330    Pure dilation          AddNominalPoint 1  1  0  Fixed  Fixed  Fixed  0  0  0     AddNominalPoint  1  1  0  Fixed  Fixed  Fixed  0  0  0    AddNominalPoint 1   1  0  Fixed  Fixed  Fixed  0  0  0    AddNominalPoint  1   1  0  Fixed  Fixed  Fixed  0  0  0      AddActualPoint 1 1  1 1  0  0 001  0 001  0 001  0  O  0     AddActualPoint   1 1  1 1  0  0 001  0 001  0 001  0  O  0    AddActualPoint  1 1   1 1  0  0 001  0 001  0 001  0  O  0    AddActualPoint   1 1   1 1  0  0 001  0 001  0 001  O  O  0      SetInputParams 0  0  0  0  0  0  1  Unknown  Unknown  Unknown   Unknown  Unknown  Unknown  Fixed         In this example the desired transformation is the  identity with parameters 0  0  0  0  0  0  1  The  length of all residuals is 0 1 2   Their covariance    matrix is  10      0  covar   0 10   0  0 0 10      The weight matrix is    10   0 0  weight   0 10   0  0 0 10      Thus    RSS  4   10      0 12    80000  redundancy  12  6 6    varianceFactor     13333     Weighting    To illustrate the influence of nominal or actual  standard deviations consider the following  example           AddNominalPoint 1l 1  1  0  0 002  Fixed  Fixed  0  0  0     AddNominalPoint  1 1   1  0  0 002  Fixed  Fixed  0  0  0    AddNominalPoint  1 1  1  0  0 001  Fixed  Fixed  0  0  0    AddNominalPoint   1 1   1  0  0 001  Fixed  Fixed  0  0  0      AddActualPoint 1  1  0  1 0E 35  1 0E 35  1 0E 35  0  0  0     AddActualPoint 1   1  0  1 0E 35  1 0E 35  1 0E
302. y default  For  6DOF measurements   enabling this flag is  compulsory to prevent  the laser going to home  position upon a beam  break      automatically  remeasures reference  distance to the Reflector  or T Probe after the  laser beam has been  lost      There are two ways to  control this flag  either  through the command     SetSystemSettings    or  through     SetLongSystemParame    J    ter    See also 1 4 3             33       Station Parameters       Implication    Comment          The station parameters  describes the translation  and rotation of the  tracker station in a  coordinate system    X  Y  Z  Omega  Phi   Kappa       Orientation parameters  can be determined using  the Transformation  functionality of emScon   see  8 1 Points to points  Transformation  or can  be individually set by the  application     By default  the  orientation parameters  are as follows    X 0 Y 0 Z 0 Omega 0 P  hi 0 Kappa 0         Transformation Parameters       Implication    Comment          A transformation  describes a change into  another coordinate  system  which is different  from the tracker  coordinate system  It has  the following parameters   X  Y  Z  Omega  Phi  and  Kappa and scale factor        Transformation  parameters can be  determined using the  Transformation  functionality of emScon   see  8 1 Points to points  Transformation  or can  be individually set by the  application     By default  the  transformation  parameters are as  follows   X 0   Y 0   Z 0    Omeg
303. y enabling this flag     bHasVideoCamera  A hardware Configuration issue  This flag       144    tells the system  that an Overview Camera is  present    If your system is equipped with an overview  camera  it is recommended to always having  checked this flag  even when the camera is  temporarily removed   Otherwise  leave it  always unchecked    default      In the meantime there exist different  types of overview cameras that differ in  internal parameters  focus distance  CCD  chip size   Older emScon versions were not  able to detect whether an overview camera  was mounted or not  not to speak of type  recognition  indeed it was the overview  camera hardware that did not support type  recognition   For that reason  the flag   HasVideoCamera    was originally  introduced  Thus  the user had to  tell  the  system when an overview camera was  mounted  Newer EmScon versions  2 0 and  up  are able to detect the camera type  automatically  Hence  this flag theoretically  has become obsolete  However  currently the  camera type is recognized only when the   hHas VideoCamera  flag is enabled    If your system is equipped with an overview  camera  it is highly recommended to always  having this flag checked  default is  unchecked   Otherwise  the system may not  detect the correct camera type and use  wrong  default  parameters    However  wrong parameters do not cause  any fatal failures  The only effect will be that  the  Find Reflector    feature by clicking to the  live video
304. ype parameters are  a requirement in order to use these functions with   older versions of  VBA  Excel  Access        For programming languages supporting user   defined data types  VC    Visual Basic   having a  function with only one struct parameter would be  more convenient  LTControl provides a collection  of such    extended    functions    Note that such extended functions cannot be  provided for Event handlers  Technical  limitation     One of these extended functions   MeasureStationaryPointEx  is implemented in the  sample           Private Sub StartMeasEx_Click     Dim result As SingleMeasResultT    On Error goo error handler  ObjSync  MeasureStationaryPointEx result      display the result   MsgBox  result packetInfo status  amp  CStr        amp  _  result packetInfo packetHeader Type  amp  _  CStr  7   amp  result  dVal Tl E CSET  T gM   e  result dVal2  amp  CStr         amp  result dVal3     Exit Sub  ErrorHandler    MsgBox  Err Description   End Sub       The data type SingleMeasResultT from the C TPI  is transparent through the COM interface  The VB  application  knows  this type  through its  reference to the LTControl     Remark    Do not test explicitly against the VB keyword   True     if using the Get lt FunctionName gt Ex methods  of the LTControl  for those commands returning  Boolean data within their result structure  This is  because the Boolean member in these structures      if true     are  1   However  the VB keyword  True   evaluates to   1    
    
Download Pdf Manuals
 
 
    
Related Search
    
Related Contents
VSAM LISTCAT Extract Tutorial    Descargar Ficha Técnica  NTS210 取扱説明書  GP2S60データシート  Yarvik PMP204  取扱説明書  SmartMetals 082.5170-3101 mounting kit  AU NOYER MASSIF    Copyright © All rights reserved. 
   Failed to retrieve file