Leica TM30 Series Reference Manual
ಜಾಹಿರಾತು
ಜಾಹಿರಾತು
Leica TPS1200+
Leica TS30 / TM30
GeoCOM Reference
Manual
Version 1.50
English
GeoCOM Reference Manual Contents
1 GEOCOM .................................................................................................................................................................. 5
1.1
I NTRODUCTION .................................................................................................................................................... 5
1.2
TPS1200 S YSTEM S OFTWARE ............................................................................................................................. 5
1.3
P RINCIPLES OF G EO COM O PERATION ................................................................................................................. 6
2 GENERAL CONCEPTS OF USING GEOCOM .................................................................................................. 7
2.1
INTRODUCTION .................................................................................................................................................... 7
2.2
G ENERAL C ONCEPT OF O PERATION ..................................................................................................................... 7
2.3
ASCII P ROTOCOL ................................................................................................................................................ 7
2.4
F UNCTION C ALL P ROTOCOL C/C++ .................................................................................................................. 8
2.5
F UNCTION C ALL P ROTOCOL VBA..................................................................................................................... 9
3 FUNDAMENTALS OF PROGRAMMING GEOCOM ..................................................................................... 10
3.1
INTRODUCTION .................................................................................................................................................. 10
3.2
ASCII P ROTOCOL P ROGRAMMING .................................................................................................................... 10
3.3
C/C++ P ROGRAMMING .................................................................................................................................... 12
3.4
VBA P ROGRAMMING ...................................................................................................................................... 14
3.5
U NITS OF V ALUES ............................................................................................................................................. 16
3.6
TPS1200 I NSTRUMENT M ODES OF O PERATION ................................................................................................. 16
3.7
C OMMON C OMMUNICATION E RRORS ................................................................................................................ 16
4 REMARKS ON THE DESCRIPTION ................................................................................................................. 19
4.1
S TRUCTURE OF D ESCRIPTIONS ........................................................................................................................... 19
5 COMMUNICATION SETTINGS......................................................................................................................... 21
5.1
USAGE ............................................................................................................................................................. 21
5.2
C ONSTANTS AND T YPES .................................................................................................................................... 21
5.3
G ENERAL G EO COM F UNCTIONS ....................................................................................................................... 22
5.4
C LIENT S PECIFIC G EO COM F UNCTIONS ............................................................................................................ 24
6 ALT USER - AUS ................................................................................................................................................... 38
6.1
U SAGE ............................................................................................................................................................... 38
6.2
C ONSTANTS AND T YPES .................................................................................................................................... 38
6.3
F UNCTIONS ........................................................................................................................................................ 39
7 AUTOMATION - AUT .......................................................................................................................................... 43
7.1
U SAGE ............................................................................................................................................................... 43
7.2
C ANCEL L ING / A BORTING CURRENT FUNCTIONS ............................................................................................... 43
7.3
C ONSTANTS AND T YPES .................................................................................................................................... 43
7.4
F UNCTIONS ........................................................................................................................................................ 45
8 BASIC APPLICATIONS – BAP ........................................................................................................................... 69
8.1
USAGE ............................................................................................................................................................. 69
8.2
C ONSTANTS AND T YPES .................................................................................................................................... 69
8.3
F UNCTIONS ........................................................................................................................................................ 71
9 BASIC MAN MACHINE INTERFACE – BMM ................................................................................................ 89
9.1
USAGE ................................................................................................................................................................ 89
9.2
C ONSTANTS AND T YPES .................................................................................................................................... 89
9.3
F UNCTIONS ........................................................................................................................................................ 90
10 COMMUNICATIONS – COM.......................................................................................................................... 94
10.1
USAGE ............................................................................................................................................................. 94
10.2
C ONSTANTS AND T YPES .................................................................................................................................... 94
10.3
F UNCTIONS ........................................................................................................................................................ 95
11 CENTRAL SERVICES – CSV ........................................................................................................................ 101
11.1
INTRODUCTION ................................................................................................................................................ 101
11.2
U SAGE ............................................................................................................................................................. 101
11.3
C ONSTANTS AND T YPES .................................................................................................................................. 101
11.4
F UNCTIONS ...................................................................................................................................................... 103
Leica TPS1200 / TS30 / TM30 – Version 1.50 2
GeoCOM Reference Manual Contents
12 ELECTRONIC DISTANCE MEASUREMENT – EDM .............................................................................. 113
12.1
INTRODUCTION ................................................................................................................................................ 113
12.2
U SAGE ............................................................................................................................................................. 113
12.3
C ONSTANTS AND T YPES .................................................................................................................................. 113
12.4
F UNCTIONS ...................................................................................................................................................... 114
13 FILE TRANSFER - FTR ................................................................................................................................. 117
13.1
U SAGE ............................................................................................................................................................. 117
13.2
C ONSTANTS AND T YPES .................................................................................................................................. 117
13.3
F UNCTIONS ...................................................................................................................................................... 118
14 IMAGE PROCESSING – IMG ....................................................................................................................... 127
14.1
INTRODUCTION ................................................................................................................................................ 127
14.2
U SAGE ............................................................................................................................................................. 127
14.3
C ONSTANTS AND T YPES .................................................................................................................................. 127
14.4
F UNCTIONS ...................................................................................................................................................... 128
15 MOTORISATION – MOT .............................................................................................................................. 131
15.1
INTRODUCTION ................................................................................................................................................ 131
15.2
U SAGE ............................................................................................................................................................. 131
15.3
C ONSTANTS AND T YPES .................................................................................................................................. 131
15.4
F UNCTIONS ...................................................................................................................................................... 132
16 SUPERVISOR – SUP ....................................................................................................................................... 137
16.1
USAGE .............................................................................................................................................................. 137
16.2
C ONSTANTS AND T YPES .................................................................................................................................. 137
16.3
F UNCTIONS ...................................................................................................................................................... 138
17 THEODOLITE MEASUREMENT AND CALCULATION – TMC ........................................................... 140
17.1
INTRODUCTION ................................................................................................................................................ 140
17.2
U SAGE ............................................................................................................................................................. 140
17.3
C ONSTANTS AND T YPES .................................................................................................................................. 141
17.4
MEASUREMENT F UNCTIONS ............................................................................................................................. 144
17.5
M EASUREMENT C ONTROL F UNCTIONS ............................................................................................................ 157
17.6
D ATA S ETUP F UNCTIONS ................................................................................................................................. 160
17.7
I NFORMATION F UNCTIONS ............................................................................................................................... 177
17.8
C ONFIGURATION F UNCTIONS .......................................................................................................................... 179
18 PORTING A TPS1100 APPLICATION......................................................................................................... 191
18.1
INTRODUCTION ................................................................................................................................................ 191
18.2
RPC C HANGES ................................................................................................................................................ 191
18.3
D ATA T YPES AND C ONSTANTS C HANGES ........................................................................................................ 193
18.4
R ETURN CODES ............................................................................................................................................... 193
19 GEOCOM RELEASES.................................................................................................................................... 194
19.1
R ELEASE 1.00 .................................................................................................................................................. 194
19.2
RELEASE 1.10 .................................................................................................................................................. 194
19.3
RELEASE 1.20 .................................................................................................................................................. 194
19.4
RELEASE 1.50 .................................................................................................................................................. 194
20 APPENDIX........................................................................................................................................................ 195
A Return-Code names and return-code values................................................................................................... 195
B Hardware interface......................................................................................................................................... 201
B-1 Serial Interface........................................................................................................................................ 201
B-2 Debugging Utility ................................................................................................................................... 202
C Provided Samples ........................................................................................................................................... 203
C-1 Program Frames...................................................................................................................................... 203
C-1.1
VBA Sample Program .................................................................................................................... 203
C-1.2
C/C++ Sample Programs ................................................................................................................ 203
C-1.3
TCC Image Grabber Sample Program ............................................................................................ 204
D List of Remote Procedure Calls (RPC) ....................................................................................................... D-205
D-1 rpc in Alphabetical order .................................................................................................................... D-205
Leica TPS1200 / TS30 / TM30 – Version 1.50 3
GeoCOM Reference Manual Contents
Microsoft, MS, MS-DOS, Windows, Windows NT, Win32, Visual C++ and Visual Basic are either registered trademarks or trademarks of Microsoft Corporation in the USA and other countries
Leica TPS1200 / TS30 / TM30 – Version 1.50 4
GeoCOM Reference Manual GeoCOM
1 G
EO
COM
1.1
INTRODUCTION
TPS1200 series Theodolites are modern geodetic measurement instruments. Most of the main tasks can be fulfilled with these instruments implicitly by their integrated applications. Now, to fulfil a broader spectrum of tasks and applications an interface to the TPS1200 series sensor functions has been defined and will be published with this document.
With this interface it will be possible to write client applications based on MS-Windows and/or for any other platform, which supports ASCII, based communications.
Note: The TS30/TM30 and TPS1200 share the same GeoCOM interface. If not otherwise stated, the implementation for TM30 and TS30 instruments is the same as that for theTPS1200 instruments.
1.2
TPS1200 SYSTEM SOFTWARE
The TPS1200 system software organises and controls the interplay of several sensor elements. Furthermore, it builds up a frame for applications, which can be executed on the TPS1200 Theodolite.
This document concentrates on the main interface to the sensor elements of the TPS1200 Theodolite. This main interface can be used to implement solutions for special customer problems if the already existing solution does not provide the needed functionality or just to enhance it.
1.2.1
Organisation of Subsystems
The TPS1200 system software is built around the sensor elements, which are parts and/or optional add-ons of the
TPS1200 Theodolite instrument. It provides a set of functions to access sensors and calculated values. These functions are organised as subsystems. We will keep this segmentation in this document.
These functions can be grouped in the following sections:
AUS The subsystem ‘Alt User’ mainly contains functions behind the “SHIFT” + ”USER” button.
AUT Automatisation; a module which provides functions like the control of the Automatic Target Recognition,
Change Face function or Positioning functions.
BAP Basic Applications; some functions, which can easily be used to get measuring data.
BMM Basic Man Machine; functions which controls some basic input/output functionality, e.g. set beep alarm, etc.
COMF Communication; a module, which handles the basic communication parameters. Most of these functions relate to both client and server side.
COM Communication; functions to access some aspects of TPS1200 control, which are close to communication.
These functions relate either to the client side or to the server side.
CSV Central Services; this module provides functions to get or set central/basic information about the TPS1200 instrument.
CTL Control task; this module contains functions of the system control task.
EDM Electronic Distance Meter; the module, which measures distances.
FTR File Transfer, functions to list, download image files from instrument
IMG Image Processing; configure and capture Telescopic Camera Images
MOT Motorization; the part, which can be used to control the movement and the speed of movements of the instrument.
SUP Supervisor; functions to control some of the general values of the TPS1200 instrument.
TMC Theodolite Measurement and Calculation; the core module for getting measurement data.
Leica TPS1200 / TS30 / TM30 – Version 1.50 5
GeoCOM Reference Manual GeoCOM
PC application
GeoCOM client
Serial Line
PC
TPS
COMF
GeoCOM server
BAP
AUT
MOT
TMC
CTL
EDM CSV BMM SUP COM
motorization system software inclination sensor angle sensor distance sensor basic in/out
Picture 1-1: Overview Client/Server Application
1.3
PRINCIPLES OF GEOCOM OPERATION
Communication takes place between two participants - a client and a server. The medium of communication is a serial communication line. Refer to Appendix B for further information about settings and needed hardware.
The idea of GeoCOM is based on SUN Microsystems’ Remote Procedure Call (RPC) protocol.
On the low level of implementation, each procedure, which is executable on the remote instrument, is assigned a remote procedure call identification number. This number is used internally to associate a specific request, including the implicit parameters, to a procedure on the remote device. On this level, GeoCOM provides an ASCII interface, which can be used to implement applications on platforms, which do not support MS-Windows.
On the high level, GeoCOM provides normal function call interfaces for C/C++ and MS-VBA to these remote functions. These interfaces enable a programmer to implement an application as if it would be executed directly on the
TPS1200 instrument.
Note: Further on we will refer to a remotely executable system function as a RPC .
The TPS1200 instrument system software uses a multitasking operating system. Nevertheless, only one request can be executed at once. This means in respect of calling RPC’s GeoCOM works synchronously only.
On the low level interface the server buffers subsequent requests if current request(s) has not been finished so far. If the queue is full then subsequent requests will be lost.
Instead on the high level interface a function call will not return until it has been completely finished.
Leica TPS1200 / TS30 / TM30 – Version 1.50 6
GeoCOM Reference Manual General Concepts of Using GeoCOM
2 G
ENERAL
C
ONCEPTS OF
U
SING
G
EO
COM
2.1
INTRODUCTION
Here we will describe several aspects of using GeoCOM. One of them is how to execute a function at a TPS1200 instrument.
The current implementation of GeoCOM supports two (three) kinds of usage. We can distinguish between a rather rudimentary ASCII protocol and a high-level function call interface.
The former - ASCII protocol - is made up of requests and replies. Using GeoCOM in this way means that an application assembles a request, sends it over the serial line to the listening TPS1200 instrument, wait for the answer and decode the received reply.
The latter uses normal function calls either in C/C++ or in VBA. For explanation purposes we will split it into two categories because the two supported programming environments differ in relation to their type systems. Using
GeoCOM in this way means calling a function. GeoCOM will handle any necessary communication implicitly.
2.2
GENERAL CONCEPT OF OPERATION
Fundamentally, GeoCOM is implemented as a point-to-point communication system. The two communication participants are known as the client (external device) and the server (TPS1200 instrument). One communication unit consists of a request and a corresponding reply. Hence, one communication takes place when the client sends a request to the server and the server sends a reply back to the client.
Client request reply
Server
Picture 2-1: Basic communication
GeoCOM is implemented as synchronous communication. A request/reply pair cannot be interrupted by another request/reply. Instead, a communication unit must be completed successfully before a new communication unit may be initiated. An indicator for completion is the receiving of the return code.
Although the ASCII protocol allows sending the next request before the corresponding reply has been received, it is not recommended to do that. Of course, subsequent request will be buffered when the previous request has not been finished so far. But if the buffer content reaches its limit in size then data may be lost.
2.3
ASCII PROTOCOL
In sequence we will define the syntax first and then give some information about how to use the ASCII protocol to call a function on the TPS1200 instrument.
The ASCII protocol is a line protocol; hence it uses a line terminator to distinguish between different requests (replies).
One request must be terminated by one terminator.
2.3.1
ASCII Protocol Syntax
Syntax of an ASCII request:
[<LF>]%R1Q,<RPC>[,<TrId>]:[<P0>][,<P1>,...]<Term>
Optional items are in brackets []. The angled-brackets <> surround names or descriptions. These names have variable values depending on their types and meanings. The angled-brackets themselves are not part of the transferred text.
Characters not surrounded by brackets are literal text and are part of the GeoCOM protocol.
<LF> An initial line feed clears the receiver buffer.
%R1Q
<RPC>
<TrId>
:
<P0>,<P1>,...
<Term>
GeoCOM request type 1.
Remote Procedure Call identification number in between 0 to 65535.
Optional transaction ID: normally incremented from 1 to 7. Same value in reply.
Separator between protocol header and following parameters.
Parameter 0, Parameter 1, ...
Terminator string (default CR/LF, use COM_SetTerminator to change the
Leica TPS1200 / TS30 / TM30 – Version 1.50 7
GeoCOM Reference Manual General Concepts of Using GeoCOM terminator). As a common shortcut ‘^m’ will be used in examples.
Example:
The following example uses the RPC CSV GetDateTime to query the current date and time of the instrument:
%R1R,5008:1^m (1^m denotes the terminator)
Note: Additional characters at the beginning of a request, between parameters or at the end are not allowed. They might lead to errors during interpretation.
Syntax of an ASCII reply:
%R1P,<RC_COM>[,<TrId>]:<RC>[,<P0>,<P1>, ...]<Term>
Optional items are in brackets []. The angled-brackets <> surround names or descriptions. These names have variable values as described in the types they have. The angled-brackets themselves are not a part of the communication text.
Characters not surrounded by angled-brackets are literal text and are part of the GeoCOM protocol.
%R1P
<RC_COM>
<TrId>
:
<RC>
<P0>,<P1>,...
<Term>
GeoCOM reply type 1.
GeoCOM return code. This value denotes the success of the communication.
GRC_OK = 0 means the communication was successful.
Refer to ‘3.7 Common Communication Errors’ for further information.
Transaction ID - identical to that of the request. If the request had no
Transaction ID then it will be 0.
Separator between protocol header and following parameters.
Return code from the called RPC and denotes the successful completion if it is set to 0 (see table ‘RPC return codes’ in the appendix for further information).
Parameter 0, Parameter 1, … These parameters will be valid only if <GRC> is equal to 0 (GRC_OK).
Terminator string (default CR/LF, use COM_SetTerminator to change the terminator).
Example:
The following example shows the reply to the RPC 5008 - CSV_GetDateTime.
%R1P,0,0:0,1996,'07','19','10','13','2f'^m
¦ ¦ ¦ ----------------------------
¦ ¦ ¦ ¦ The values for month, day, hour,
¦ ¦ ¦ +--- minute and second are replied in the byte-
¦ ¦ ¦ format (see table communication parameter
¦ ¦ ¦ for further information)
¦ ¦ +------ Return code from the RPC: 0 means no error
¦ ¦ (see RPC return codes for further information)
¦ +----- The Transaction ID of the request. If there was no ID
¦ the value returned is 0.
+---- Return code from GeoCOM: 0 means no error (see
GeoCOM return codes for further information)
2.4
FUNCTION CALL PROTOCOL - C/C++
The implementation of GeoCOM for C/C++ conforms to normal function calls. GeoCOM itself handles all necessary communication. No intervention of the programmer in respect to the communication is necessary with one exception. If the GeoCOM reports a communication error the programmer has to make sure that either the problem will be solved - by calling GeoCOM support functions - or no further RPC’s will be called - by terminating the running task.
Nevertheless, the programmer has to initialise GeoCOM and set up the port’s settings to make sure that communication can take place. Moreover the user has to make sure that the TPS1200 instrument is well connected.
Example:
An example code fragment for using TMC_GetSimpleMea could be the following. We do not take care of the necessary initialisation and set up of GeoCOM here. Please refer to chapter 3.2.3 Basic GeoCOM Application Frame for C/C++ for this information.
Leica TPS1200 / TS30 / TM30 – Version 1.50 8
GeoCOM Reference Manual
GRC_TYPE RetCode;
TMC_HZ_V_ANG Angles;
double dSlopeDist;
RetCode = TMC_GetSimpleMea( 1000, Angles, dSlopeDist,
TMC_AUTO_INC
if (RetCode == GRC_OK)
{
// do something - use values
}
else
{
// handle error
}
General Concepts of Using GeoCOM
2.5
FUNCTION CALL PROTOCOL - VBA
Here almost all is valid for VBA as for C/C++. Please refer to Chapter 2.4. The only difference between VBA and
C/C++ is that VBA has a different type system. Hence, the defined data types differ slightly in their definition.
Furthermore, because of implementation reasons the RPC names must have an additional prefix, which is “VB_” for the current implementation of GeoCOM.
Example:
We take the same example as in Chapter 2.4.
Dim RetCode As Integer
Dim Angles As TMC_HZ_V_ANG
Dim dSlopeDist As Double
RetCode = VB_TMC_GetSimpleMea( 1000, Angles,
dSlopeDist,
TMC_AUTO_INC )
If RetCode = GRC_OK Then
' do something - use values
Else
' handle error
End If
Leica TPS1200 / TS30 / TM30 – Version 1.50 9
GeoCOM Reference Manual Fundamentals of Programming GeoCOM
3 F
UNDAMENTALS OF
P
ROGRAMMING
G
EO
COM
3.1
INTRODUCTION
We will describe how programs can be written using the different protocols. Certainly, the type system, where the main differences lie between the protocols, will be described in more detail.
3.2
ASCII PROTOCOL PROGRAMMING
Implementing an application, which uses the ASCII protocol, is based on simple data transfers using a serial line. The programmer is responsible to set up the serial line parameters of the client such that they correspond to the settings of the TPS1200 instrument. Then Remote calls are done by just sending the valid encoded requests and receiving and decoding the replies of them.
For debugging purposes, it might be helpful to use a so-called Y-cable, which enables you to observe the communication on the serial line using either a terminal or a terminal emulator. For further details see
Appendix B-2 Debugging Utility.
Note : If the settings of the active COM port will be set by any software part and if the server is online, then it is strongly recommended to use a leading <LF> to clear the receiver buffer at the server side. This will reduce unnecessary error messages of the next RPC.
3.2.1
Data Types in ASCII Protocol
Each parameter of a RPC has its own associated data type with it. There are varieties of different data types, which have been defined for the set of published functions. The ASCII protocol supports simple data types only. All data types, which are different from the base, types in name and aggregated data types are converted and reduced to their base types. Conversion means to serialise the aggregated data into a comma-separated list of its elements. Therefore, the programmer has the responsibility to interpret the values depending on the associated data type.
The supported base types and their value range are defined below:
Format Type Valid range Len Valid input representations
Typical output representations boolean 0 = false
1 = true byte
’A7’ ’7a’,’A7’ string double long
±2.225E-308...
±1.797E+308
(-2
31
)...(2
31
-1)
-0.1e-07, -2 short -32768...32767 6
-54321
0, -1, -32700, 45,
56, 0x45e,
0X3AA
900000
0, -1, -32700, 45,
56 unsigned long 0...(2 32 -1) unsigned short 0...65535 5 0, 1, 34000, 65,
65535, 0x3a,
0x00, 0xFFFF
95735
0, 1, 34000, 65,
65535
Table 3-1: Communication Parameter Types
Leica TPS1200 / TS30 / TM30 – Version 1.50 10
GeoCOM Reference Manual Fundamentals of Programming GeoCOM
Note: Bytes are always represented in two-character hexadecimal notation. Hexadecimal notation can use upper- or lower-case representation: 0.9 + [a .. f | A .. F].
Characters sent within a string which do not fall within the ASCII character range 0x20 to 0x7E (32 to 126 decimal) are sent using an adapted byte notation - e.g. ”\x9A”, where \x (or \X) introduces a byte value in hexadecimal notation. To include the back slash, double quote, per cent or tilde character (\ “ % ~) as part of the string, it must be preceded by a backslash character, e.g. “This is a \”quote\””.
Types of integer (short, unsigned short, long, unsigned long) can also be represented in hexadecimal notation, introduced by 0x or 0X.
The following rules are for generating/interpreting values with a type different from the base types and aggregated data types:
Numerical and string data type
The numerical data types correspond to the C-parameters in value, range and precision as close as possible. If no identical data type is available then the next best one will be taken. Character and string will be replaced by the string data type.
Enumerations
If the corresponding C-parameter is an enumeration data type, then the enumeration value of the ASCII parameter is equal to the implicit value of the declaration of the C-data type. For clarification, we will give always the name and the associated value in the description of an enumeration data type.
Structures
Structure data types will be converted into a comma-separated list of elements. One element’s representation conforms to the data type representation of its base type. If an element itself is a structure then depth first conversion will take place. If this rule does not apply then the types and their ASCII parameters are described explicitly.
Arrays
An array will be converted into a comma-separated list of elements. One element’s representation conforms to the data type representation of its base type.
Example for Enumeration Data Types and Structures
The following example gives a typical data type declaration and the corresponding procedure declaration used in this manual for TMC_GetSimpleMea from the subsystem Theodolite Measurement and Calculation:
Constants and Types typedef long SYSTIME; struct TMC_HZ_V_ANG
{
double dHz;
double dV;
} enum TMC_INCLINE_PRG
{
TMC_MEA_INC,
TMC_AUTO_INC,
TMC_PLANE_INC
}
C-Declaration
// encoded as 0
// 1
// 2
TMC_GetSimpleMea(SYSTIME WaitTime,
TMC_HZ_V_ANG &OnlyAngle,
double &dSlopeDistance,
TMC_INCLINE_PRG Mode)
ASCII-Request
%R1Q,2108: WaitTime[long],Mode[long]
ASCII-Response
%R1P,0,0: RC,Hz[double],V[double],dSlopeDistance[double]
Please, notice that the RPC has two input and two output parameters. Anytime a request must encode and send input and in/out parameters only and a reply must encode and send in/out and output parameters only!
Leica TPS1200 / TS30 / TM30 – Version 1.50 11
GeoCOM Reference Manual Fundamentals of Programming GeoCOM
Note : Unnecessary parameters must not be sent.
Although the enclosed header file com_pub.hpp
denotes default values for certain function parameters they will not be supported. Hence, they have to be sent.
The ASCII Request to call this RPC with the value for WaitTime = 1000 and the inclination measure mode
TMC_AUTO_INC has the following form (note that the value 1 is used for the Mode parameter because the counting of enumeration data types start at 0):
%R1Q,2108:1000,1^m
A possible reply can be as follows:
%R1P,0,0:0,0.9973260431694,1.613443448007,1.3581^m
Where the second and third value after the colon corresponds to the dHz and dV parts of the structure
TMC_HZ_V_ANG and the fourth value corresponds to the variable dSlopeDistance . (Note that the first value after the ‘:’ is not a parameter but the return code value of the RPC).
3.2.2
ASCII Protocol Program Example
For getting a feeling of how requests and replies are build up and work see also the provided geocom.trm
file in the samples directory. Please refer to Appendix C-1 Settings for Terminal Emulator for further information.
3.2.3
Modes of Operation Concerning Communication
Section 3.6 - TPS1200 Instrument Modes of Operation - explains the different modes of operation of GeoCOM concerning communication. Similar to that the following is valid for the ASCII protocol.
Since the client has to remind which mode is active, no support can be given from the TPS1200 instrument. The only way to distinguish between modes is to remind the actions an application has initiated and their resulting replies. So far no other possibility exists to determine the current mode.
To switch on the instrument a single character is sufficient. It is recommended to ignore the subsequent reply (one or two lines).
3.3
C/C++ - PROGRAMMING
Programming in C/C++ is based on the well-known DLL concept, defined by Microsoft Corp. To compile a project successfully first you have to include the file com_pub.hpp
, which defines all necessary constants, data types and function prototypes. Second geocoms2k.lib
has to be included in the project, which enables the linker to resolve the
DLL exported functions. To operate successfully the geocoms2k.dll
file must be accessible for the operating system, hence it must be located in a directory, which the operating system looks up for the requested DLL file.
Project Options
Structure byte-alignment
GEOCOMS2K.lib
4 bytes
Memory model N/A
Special #defines (if not using MFC) STRICT
3.3.1
Data Types in C/C++
Since the main programming language of implementation of TPS1200 instruments Firmware is C/C++ all data types are initially defined in C/C++. Therefore, no conversion of values or data types is necessary.
3.3.2
Basic GeoCOM Application Frame for C/C++
A C/C++ GeoCOM application consists at least of the following parts:
- Initialise GeoCOM
- Open a connection to the server
- One or more GeoCOM RPC’s
- Close the active connection to the server
- Finalise GeoCOM
A sample implementation of above points could be:
// include standard system headers
#include "com_pub.hpp"
// include application headers
Leica TPS1200 / TS30 / TM30 – Version 1.50 12
GeoCOM Reference Manual Fundamentals of Programming GeoCOM
#define NUM_OF_RETRIES 1
GRC_TYPE RetCode;
BOOLE bOpenAndRunning = FALSE;
// initialize GeoCOM
RetCode = COM_Init(); if (RetCode == GRC_OK)
{
// open a connection to the TPS1200 instrument
RetCode = COM_OpenConnection (COM_1, COM_BAUD_19200,
NUM_OF_RETRIES);
if (RetCode == GRC_OK)
{
bOpenAndRunning = TRUE;
}
}
// optionally set up other comm. parameters here if (RetCode == GRC_OK)
{
// -- functionality of the application --
// here we just test if communication is up
RetCode = COM_NullProc();
if (RetCode != GRC_OK)
{
// handle error
}
}
// close channel if (bOpenAndRunning)
{
RetCode = COM_CloseConnection ();
if (RetCode != GRC_OK)
{
// handle error
}
}
// anytime finalize and reset GeoCOM
RetCode = COM_End(); if (RetCode != GRC_OK)
{
// handle error
}
3.3.3
C/C++ Development System Support
GeoCOM system files have been developed using Microsoft Visual C/C++ 6.0. Although this development environment were the basis for the current GeoCOM implementation, it has been emphasised that it is independent of it, hence other development environments can be used too. But please notice that it has not been tested thoroughly so far.
3.3.4
Programming Hints
Order of Include Statements
Since GeoCOM redefines TRUE , FALSE and NULL we recommend the following include order:
1. Include system headers like stdio.h
or stdafx.hpp
2. Include com_pub.hpp
3. Include the current project headers
BOOLE Definition
GeoCOM defines its own Boolean type as an enumeration type of FALSE and TRUE . It is called BOOLE . With one exception, this does not produce any problems. Only if a BOOL type value will be assigned to a BOOLE type variable or parameter the compiler (MS-VisualC/C++) generates an error. To solve this problem the expression, which will be assigned to, has to be converted by a CAST statement to BOOLE .
Leica TPS1200 / TS30 / TM30 – Version 1.50 13
GeoCOM Reference Manual Fundamentals of Programming GeoCOM
3.4
VBA - PROGRAMMING
Similar to C/C++ programming the programming of VBA is based on the DLL concept. To enable access to GeoCOM the special module COM_StubsPub.bas
has to be included in the project. COM_StubsPub.bas
includes all constants, data types and function prototypes, which are available in GeoCOM.
3.4.1
Data Types in VBA - General rules for derivation
This subsection gives a summary of general derivation rules VBA-parameters from C-data types. Basically the C/C++ - data types are given in a C/C++ notation before they are used in a RPC-description.
If the appearance of a VBA data type does not follow the general rules then they are described explicitly.
In general, the following rules can be applied:
Numerical data type
The numerical data types correspond to the C/C++-parameters in value and range as close as possible. If it cannot be replaced directly then the best possible replacement will be taken.
String data type
Character and string types are replaced by string data types. Since string data types of C/C++ and VBA are not directly interchangeable, the programmer has to take certain care of the necessary pre- and post-processing of variables of this data type. Please refer to the example below.
Enumeration data type
Conceptually VBA does not have enumeration data types. Therefore, Long data types will be used instead. The enumeration values will be defined by constants. Using the numerical value is also valid. Notice that some of the enumeration values are reserved words in VBA. That is why we had to define different identifiers. Enumerated return values are numerical values and correspond to the position of the enumeration value in the C/C++definition. For clarification, also the numerical values are given in the description of an enumeration data type.
Structures and Arrays
They are defined as in C/C++.
Example for Enumeration Data Types and Structures
The following example gives the data type declaration and the procedure declaration usually used in this manual for an example procedure ( TMC_GetSimpleMea from the subsystem Theodolite Measurement and Calculation):
VBA-Declaration
VB_TMC_GetSimpleMea(
WaitTime As Long,
OnlyAngle As TMC_HZ_V_ANG,
SlopeDistance As Double,
In the file COM_StubsPub.bas
the corresponding items are defined:
Global Const TMC_MEA_INC = 0
Global Const TMC_AUTO_INC = 1
Global Const TMC_PLANE_INC = 2
Global Const TMC_APRIORI_INC = 3
Global Const TMC_ADJ_INC = 4
Global Const TMC_REQUIRE_INC = 5
Type TMC_HZ_V_ANG
dHz As Double
dV As Double
End Type
Obviously all enumeration values are encoded as global constants. The VBA structure definition equals to the C structure definition. A valid procedure call would be:
Dim WaitTime As Long
Dim OnlyAngle As TMC_HZ_V_ANG
Dim SlopeDistance As Double
WaitTime = 1000
VB_TMC_GetSimpleMea( WaitTime,
Leica TPS1200 / TS30 / TM30 – Version 1.50 14
GeoCOM Reference Manual
OnlyAngle,
SlopeDistance,
TMC_AUTO_INC)
Fundamentals of Programming GeoCOM
3.4.2
Basic GeoCOM Application Frame for VBA
Like in section 3.3.2 - Basic GeoCOM Application Frame for C/C++ - a VBA GeoCOM application consists at least of the following parts:
- Initialise GeoCOM
- Open a connection to the server
- One or more GeoCOM RPC’s
- Close the active connection to the server
- Finalise GeoCOM
A sample implementation of above points could be:
CONST NUM_OF_RETRIES = 1
DIM RetCode As Integer
DIM bOpenAndRunning as Integer
DIM bAvailable as BOOLE
' initialize GeoCOM bOpenAndRunning = False
RetCode = VB_COM_Init()
If (RetCode = GRC_OK) Then
' open a connection to the TPS1200 instrument
RetCode = VB_COM_OpenConnection(COM_1, COM_BAUD_19200,
NUM_OF_RETRIES)
If (RetCode = GRC_OK) Then
bOpenAndRunning = True
End If
End If
' optionally set up other comm. parameters here
If (RetCode = GRC_OK) Then
' functionality of the application
' we just test if communication is up
RetCode = VB_COM_NullProc()
If (RetCode <> GRC_OK) Then
' handle error
End If
End If
If (bOpenAndRunning) Then
' close channel
RetCode = VB_COM_CloseConnection ()
If (RetCode <> GRC_OK) Then
' handle error
End If
End If
' finalize and reset GeoCOM
RetCode = VB_COM_End()
If (RetCode <> GRC_OK) Then
' handle error
End If
3.4.3
VBA Development System Support
This interface has been written for Microsoft Visual Basic for Applications 5.0 and higher only. Hence, no other development environment will be supported.
3.4.4
Programming Hints
Output Parameters of String Data Type
The internal representation of strings is not directly compatible between C/C++ and VBA. Therefore the one has to pre- and post-process such an output parameter. In the following example, we know that the output parameter will be less than 255 characters in length from the description of the RPC.
Leica TPS1200 / TS30 / TM30 – Version 1.50 15
GeoCOM Reference Manual Fundamentals of Programming GeoCOM
Dim s As String
' initialise string s = Space(255)
Call VB_COM_GetErrorText(GRC_IVPARAM, s)
' trim string, justify string length s = Trim$(s)
Note: Incorrectly handled string output parameters may lead to severe runtime problems.
3.5
UNITS OF VALUES
All parameters are based on the SI unit definition, if not explicitly indicated differently. The SI units, and their derivatives, used are:
Abbreviation Unit Description
M
Rad
( Meters )
( Radians ) for lengths, co-ordinates, ... for angles
Sec
Hpa
( Seconds )
( Hekto Pascal ) for time for pressure
C (Celsius temperature
Table 3-2: SI Units
3.6
TPS1200 INSTRUMENT MODES OF OPERATION
In respect to communication, the TPS1200 instrument knows several states in which it reacts differently. The main state for GeoCOM is online state or mode. There it is possible to use all RPC’s, which are described in this manual.
Especially we will describe the possibilities of changing the state by the built-in RPC’s. For the ASCII protocol refer to section 3.2.3 - Modes of Operation Concerning Communication.
The possible states can be described as follows:
Off The instrument is switched off and can be switched on using COM_OpenConnection . To switch on the instrument a single character is sufficient.
GeoCOM The instrument accepts RPC’s. To switch into GeoCOM mode start the “Configuration” menu on the instrument, open the submenu “Interfaces” and enable interface “GeoCOM Mode”.
RCS The instrument accepts Remote Control sequences.
3.7
COMMON COMMUNICATION ERRORS
GeoCOM is based on calling functions remotely. Because of the additional communication layer the set of return codes increases with return codes based on communication errors. Since all of these codes may be returned by any RPC we will explain them here and omit them in the descriptions of the RPC’s.
GRC_OK
GRC_COM_CANT_ENCODE
GRC_COM_CANT_DECODE
GRC_COM_CANT_SEND
0
3073
3074
3075
Leica TPS1200 / TS30 / TM30 – Version 1.50
Successful termination, implies also no communication error.
Can't encode arguments in client. Returned by the client to the calling application directly, i.e. without anything being sent to the transport layer and beyond.
Can't decode results in client. Once an RPC has been sent to the server and a reply has been sent back, this return code states that the encoded reply could not be decoded in the client. This is usually the result of using different versions of
GeoCOM on client and server.
Failure in sending calls. If the resources at the transmitting port have been allocated previously, i.e. GeoCOM does not have exclusive rights to the port, or if the exception or similar routine has experienced a failure, this error code is returned.
16
GeoCOM Reference Manual
GRC_COM_CANT_RECV
GRC_COM_TIMEDOUT
GRC_COM_WRONG_FORMAT
GRC_COM_VER_MISMATCH
GRC_COM_CANT_DECODE_REQ
GRC_COM_PROC_UNAVAIL
GRC_COM_CANT_ENCODE_REP
GRC_COM_SYSTEM_ERR
GRC_COM_FAILED
GRC_COM_NO_BINARY
GRC_COM_INTR
GRC_COM_REQUIRES_8DBITS
GRC_COM_TR_ID_MISMATCH
GRC_COM_NOT_GEOCOM
GRC_COM_UNKNOWN_PORT
Fundamentals of Programming GeoCOM
3076
3077
3078
3079
3080
3081
3082
3085
3086
3087
3090
3093
3094
3095
Failure in receiving result. A failure has occurred during reception of a packet at the data link layer. This could be due to incorrect parameter settings or noise on the line, etc..
Call timed out. The client has sent an RPC to the server but it has not replied within the current time-out period as set for the current transaction. This could be because: the server has not received the request; the server has taken too long to execute the request; the client has not received the reply; the communication line (physical layer is no longer there; or, the time-out is too short (especially true when communicating over noisy or radio links at low baud rates).
The request and receive formats are different. Something got mixed up along the way or the application tried to send using a format, which has not been implemented on both client and server.
RPC protocol mismatch error. An RPC protocol has been requested which does not exist. This error will indicate incompatible client and server protocols.
Can't decode request in server. If the client sends the server an
RPC but one, which cannot be decoded in the server, the server replies with this error. It could be that the GeoCOM versions running on the client and server are different or the packet was not correctly sent over a noisy or unreliable line.
The requested procedure is unavailable in the server. An attempt has been made to call an RPC, which does not exist.
This is usually caused when calling RPC’s, which have been inserted, appended, deleted, or altered between the differing versions of GeoCOM on client and server. To be on the safe side, always use the same GeoCOM version whenever possible on both sides.
Can't encode reply in server. The server has attempted to encode the reply but has failed. This can be caused by the calling procedure trying to pass too much data back to the client and in so doing has exceeded the maximum packet length.
Mess into communication itself. Should be OK once the node has been recycled, i.e. powered-down and -up again.
Unknown protocol. An unknown (or not yet supported)
Transport or Network protocol has been used. Could appear when using differing GeoCOM versions on client and server.
Call interrupted. Something has happened outside of the scope of GeoCOM, which has forced the current RPC to abort itself.
This error indicates desired protocol requires 8 data bits
Request and reply transaction ids do not match. Somewhere along the line a packet (usually a reply) has been lost or delayed. GeoCOM tries to bring everything back to order but if this error continues during the session it may be wise to inspect the line and, at least, to restart the session. The immediately following RPC may be lost.
Parse failed; data package not recognised as GeoCOM communication package
Tried to access an unknown hardware port. The application has not taken the physical resources of the machine on which it is running into account.
Leica TPS1200 / TS30 / TM30 – Version 1.50 17
GeoCOM Reference Manual Fundamentals of Programming GeoCOM
GRC_COM_OVERRUN
GRC_COM_SRVR_RX_CHECKSUM_ERROR
GRC_COM_CLNT_RX_CHECKSUM_ERROR
GRC_COM_PORT_NOT_AVAILABLE
GRC_COM_PORT_NOT_OPEN
GRC_COM_NO_PARTNER
GRC_COM_ERO_NOT_STARTED
GRC_COM_CONS_REQ
GRC_COM_SRVR_IS_SLEEPING
GRC_COM_SRVR_IS_OFF
3101
3102
3103
3104
3105
3106
3107
3108
3109 has exceeded the maximum packet length. It will be discarded!
This can be caused by a noisy line during GeoCOM Binary format transmissions.
Checksum received at server is wrong. The checksum belonging to the current packet is wrong - no attempt is made at decoding the packet.
Checksum received at client is wrong. The checksum belonging to the current packet is wrong - no attempt is made at decoding the packet.
COM port not available. This can be caused by attempting to open a port for unique use by GeoCOM, which has already been allocated to another application.
COM port not opened / initialised. The application has attempted to use a COM port to which it has no unique rights.
No communications partner on other end. The connection to the partner could not be made or has been lost. Check that the line is there and try again.
The client, after calling an ERO has decided not to confirm the start of the ERO and has instead called another RPC.
Attention to send consecutive requests. The application has attempted to send another request before it has received a reply to its original request. Although GeoCOM does not return control to the app until a reply is received, this error is still possible with event-driven applications, i.e., the user pushing a button yields control back to the application code, which can then call GeoCOM again .
TPS has gone to sleep. Wait and try again.
TPS has shut down. Wait and try again
Leica TPS1200 / TS30 / TM30 – Version 1.50 18
GeoCOM Reference Manual Remarks on the Description
4 R
EMARKS ON THE
D
ESCRIPTION
This chapter contains some remarks on the description of RPC’s and on the structure of the descriptions.
4.1
STRUCTURE OF DESCRIPTIONS
The whole reference part is subdivided into sections. Each section contains descriptions of a set of functions, which build up a subsystem. A subsystem gathers all functions, which are related to a specific functionality of a TPS1200 instrument, e.g. MOT describes all functions, which relate to motorization. Each subsystem is subdivided into the descriptions of RPC’s.
4.1.1
Structure of a Subsystem
A subsystem consists of the following parts:
1.
Usage
This part gives some hints about the usage of the subsystem and general information of its functionality.
2.
Constants and Types
All subsystem specific constants and data types are listed here. Also their meanings are described if they are not obvious.
3.
Functions
All RPC’s of these subsystems are listed here and described in detail.
Note: To reduce redundancy the VB declarations of data types and constants have been omitted. Please refer to chapter
3.3 to get more information about this subject.
4.1.2
Structure of a RPC Description
One RPC description contains the following parts:
Title
Contains the name of the RPC and a short description of the function.
C-Declaration
Contains the C declaration of the function (excluding the return type).
VB-Declaration
Declares the function in VB (excluding the return type).
ASCII-Request
Describes the request including the input parameters and their data types listed in [ ].
ASCII-Reply
Describes the reply including the output parameters and their data types listed in [ ].
Remarks
Gives additional information on the usage and possible side effects of the function.
Parameters In/Out
Explains the parameters, their data types and their meaning. Parameters and their ASCII equivalent are explained at the beginning of each chapter.
Return-Codes
Lists the most common RC to this request, in RC name and RC value.
See Also
Cross-references shows other RPC’s which relate to this one.
Example
Gives an example of how this RPC could be used.
Leica TPS1200 / TS30 / TM30 – Version 1.50 19
GeoCOM Reference Manual Remarks on the Description
Note: To reduce redundancy the return type has been omitted from the C- and VB-declarations of the RPC’s.
ASCII-Request and Reply do not explain the whole data structures. Instead the corresponding base types will be given. Please refer to chapter 2.2 to get more information on this topic.
Also because of redundancy the necessary CR/LF at the end has been omitted from ASCII-Request and Reply.
4.1.3
Sample of a RPC Description
1.1.1
CSV_GetDateTime- Get date and time.
C-Declaration
Title and description
CSV_ GetDateTime (DATIME &DateAndTime)
VB-Declaration
VB_CSV_GetDateTime (DateAndTime As DATIME)
ASCII-Request
% R1Q ,5008:
ASCII-Response
Declarations for different protocols
% R1P ,0,0: RC,Year[short],Month,Day,Hour,Minute,Second[all byte]
Remarks
Remarks to this function and its usage a type DATIME . A possible response can look like this:
%R1P,0,0:0,1996,'07', '19','10','13','2f' (see chapter ASCII data type declaration for further information)
Parameters
Detailed description of parameters
Encoded date and time.
Return-Codes
GRC_OK Execution successful.
GRC_UNDEFINED Time and/or date is not set (yet).
See Also
CSV_SetDateTime
Meaning of return codes
Example
GRC_TYPE rc;
DATIME DateAndT
Cross reference to related functions rc = CSV_GetDateTime(DateAndTime); if (rc == GRC_OK)
{
// use Date and time
} else
{
// handle error
A typical usage of this function
Leica TPS1200 / TS30 / TM30 – Version 1.50 20
GeoCOM Reference Manual Communication Settings
5 C
OMMUNICATION
S
ETTINGS
5.1
USAGE
This subsystem provides functions which influences GeoCOM as a whole and functions, which relate to the client side only. If a function influences the client side only then there is no ASCII request defined.
5.2
CONSTANTS AND TYPES
Serial Port Selector
This enumeration type denotes the hardware serial port. enum COM_PORT
{
// port 1
// port 2
// port 3
// port 4
};
Transmission Data Format
This value tells if the transmission takes place in a readable ASCII data format or in a data size optimised binary data format. enum COM_FORMAT
{
COM_ASCII = 0,
COM_BINARY = 1
// Force ASCII comm.
// Enable binary comm.
};
Baud Rate enum COM_BAUD_RATE
{
COM_BAUD_38400 = 0,
COM_BAUD_19200 = 1,
= 2,
// default baud rate
= 3,
= 4,
COM_BAUD_115200 = 5,
COM_BAUD_57600 = 6
};
MS-Windows Data Types
One of the described functions uses the predefined type HWND of MS-Windows. Please refer to the documentation of
MS-Windows development environment for this data type.
Note: HWND depends on whether the pre-processor symbol STRICT is defined. When MFC libraries are used, STRICT is automatically defined. Otherwise the user must #define STRICT or he will get unresolved externals.
Leica TPS1200 / TS30 / TM30 – Version 1.50 21
GeoCOM Reference Manual Communication Settings
5.3
GENERAL GEOCOM FUNCTIONS
5.3.1
COM_GetDoublePrecision - getting the double precision setting
COM_GetDoublePrecision........................................................................................................................................................................................................................................................
108 .................................................................................................................................................................................................................................................................COM_GetDoubl
ePrecision
C-Declaration
COM_GetDoublePrecision( short &nDigits )
VB-Declaration
VB_COM_GetDoublePrecision( nDigits As Integer )
ASCII-Request
%R1Q,108:
ASCII-Response
%R1P,0,0:RC, nDigits[short]
Remarks
This function returns the precision - number of digits to the right of the decimal point - when double floatingpoint values are transmitted. The usage of this function is only meaningful if the communication is set to ASCII transmission mode. Precision is equal in both transmission directions. In the case of an ASCII request, the precision of the server side will be returned.
Parameters
Return-Code Names and Return-Code Values
GRC_OK
See Also
COM_SetDoublePrecision
Example
GRC_TYPE rc; short nDigits, nOldDigits;
TMC_HEIGT height;
(void) COM_GetDoublePrecision(nOldDigits); rc = COM_SetDoublePrecision(nDigits);
// nDigits > 15, nDigits < 0 -> GRC_IVPARAM if (rc == GRC_IVPARAM)
{
rc = COM_SetDoublePrecision(7);
}
// measure height of reflector ...
// the result is precisely calculated and
// returned with nDigits to the right of the
// decimal point
(void) TMC_GetHeight(height); // ignore return code print(„height: %d\n“, height.dHr);
// reset server accuracy to the old value rc = COM_SetDoublePrecision(nOldDigits);
// no error handling, because nOldDigits must be valid
Leica TPS1200 / TS30 / TM30 – Version 1.50 22
GeoCOM Reference Manual Communication Settings
5.3.2
COM_SetDoublePrecision – setting the double precision setting
COM_SetDoublePrecision.............................................................................................................................................................................................................................................................................
.................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... 107
107 .................................................................................................................................................................................................................................................................COM_SetDoubl
ePrecision
C-Declaration
COM_SetDoublePrecision( short nDigits )
VB-Declaration
VB_COM_SetDoublePrecision( ByVal nDigits As Integer )
ASCII-Request
%R1Q,107: nDigits[short]
ASCII-Response
%R1P,0,0: RC
Remarks
This function sets the precision - number of digits to the right of the decimal - when double floating-point values are transmitted. The TPS’ system software always calculates with highest possible precision. The default precision is fifteen digits. However, if this precision is not needed then transmission of double data (ASCII transmission) can be speeded up by choosing a lower precision. Especially when many double values are transmitted this may enhance the operational speed. The usage of this function is only meaningful if the communication is set to ASCII transmission mode. In the case of an ASCII request, the precision of the server side will be set. Notice that trailing Zeros will not be sent by the server and values may be rounded. E.g. if precision is set to 3 and the exact value is 1.99975 the resulting value will be 2.0
Note: With this function it is possible to decrease the accuracy of the delivered values.
Parameters
Return-Code Names and Return-Code Values
GRC_OK
2 GRC_IVPARAM
See Also
COM_GetDoublePrecision
Example see COM_GetDoublePrecision
0 > nDigits > 15
Leica TPS1200 / TS30 / TM30 – Version 1.50 23
GeoCOM Reference Manual Communication Settings
5.4
CLIENT SPECIFIC GEOCOM FUNCTIONS
The following functions are not applicable to the ASCII protocol, because these functions influence the behaviour of the client application only.
5.4.1
COM_Init - initialising GeoCOM
COM_Init....................................................................................................................................................................................................................................................................................
........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ -
C-Declaration
COM_Init ( void )
VB-Declaration
VB_COM_Init ()
ASCII-Request
-
ASCII-Response
-
Remarks
COM_Init has to be called to initialise internal buffers and variables. It does not change the TPS’ state.
Note: No other GeoCOM function can be called successfully without having initialised GeoCOM before.
Parameters
Return-Code Names and Return-Code Values
GRC_OK
See Also
COM_End
Example
See appendix C-2 for an example program frame.
Leica TPS1200 / TS30 / TM30 – Version 1.50 24
GeoCOM Reference Manual Communication Settings
5.4.2
COM_End - quitting GeoCOM
COM_End...................................................................................................................................................................................................................................................................................
........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ -
C-Declaration
COM_End( void )
VB-Declaration
VB_COM_End()
ASCII-Request
-
ASCII-Response
-
Remarks
COM_End has to be called to finish up all open GeoCOM transactions. It closes an open port and does whatever is necessary to shutdown GeoCOM. The TPS’ state will not be changed.
Parameters
Return-Code Names and Return-Code Values
GRC_OK
See Also
COM_Init
Example see COM_Init
Leica TPS1200 / TS30 / TM30 – Version 1.50 25
GeoCOM Reference Manual Communication Settings
5.4.3
COM_OpenConnection - opening a port for communication
COM_OpenConnection..............................................................................................................................................................................................................................................................
........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ -
C-Declaration
COM_OpenConnection( COM_PORT ePort,
COM_BAUD_RATE &eRate,
Short nRetries )
VB-Declaration
VB_COM_OpenConnection( ByVal Port As Integer,
ByVal Baud As Integer,
ByVal Retries As Integer )
ASCII-Request
-
ASCII-Response
-
Remarks
This function opens a PC serial port and attempts to detect a theodolite based on the given baud rate. If a TPS is well connected to the PC then GeoCOM tries to establish a connection to it.
To be successful the GeoCOM interface on the TPS must be enabled.
RPC COM_NullProc is used to check if the communication is up and running. nRetries denotes the number of retries if the first request has not been fulfilled successfully.
If the TPS is switched off it will be switched on automatically. In such a case it may take several retries to establish a connection. Since default timeout is three seconds we recommend nRetries to be 1-4.
GeoCOM chooses during start-up the default transmission data-format, which is ASCII. If TPS supports binary data format it is switched automatically to BINARY using RPC COM_SetComFormat.
This function will fail if the serial-port is locked or in use. It will also fail if no TPS is connected to the serial port.
If the call cannot be finished successfully then the port will be freed and closed.
Note: In the current implementation, GeoCOM does not support two open connections at the same time. A second attempt to open a second port at once will be denied by GeoCOM.
Parameters
Return-Code Names and Return-Code Values
GRC_OK
GRC_COM_PORT_NOT_AVAILABLE
GRC_COM_NO_PARTNER
GRC_IVPARAM
3103
3105
See Also
COM_CloseConnection
COM_NullProc
COM_SetComFormat
Example see COM_Init
Port is in use or does not exist
GeoCOM failed to detect a TPS.
Leica TPS1200 / TS30 / TM30 – Version 1.50 26
GeoCOM Reference Manual Communication Settings
5.4.4
COM_CloseConnection - closing the open port
COM_CloseConnection.............................................................................................................................................................................................................................................................
........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ -
C-Declaration
COM_CloseConnection( void )
VB-Declaration
VB_COM_CloseConnection( )
ASCII-Request
-
ASCII-Response
-
Remarks
This function closes the (current) open port and releases an established connection. It will not change the TPS’ state.
Parameters
Return-Code Names and Return-Code Values
GRC_OK
See Also
COM_OpenConnection
Example
See appendix C-2 for an example program frame.
Leica TPS1200 / TS30 / TM30 – Version 1.50 27
GeoCOM Reference Manual Communication Settings
5.4.5
COM_GetBaudRate - getting the current baud rate
COM_GetBaudRate ...................................................................................................................................................................................................................................................................
........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ -
C-Declaration
COM_GetBaudRate ( COM_BAUD_RATE &eRate )
VB-Declaration
VB_COM_GetBautRate( eRate As Long )
ASCII-Request
-
ASCII-Response
-
Remarks
Get the current baud rate of the serial line. It should be the setting of both client and server.
Parameters eRate Out Baud rate of serial line.
Return-Code Names and Return-Code Values
GRC_OK
See Also
COM_OpenConnection
Example void main()
{
GRC_TYPE rc;
COM_BAUD_RATE eRate;
// init GeoCOM
...
// get baud rate of active connection
rc = COM_GetBaudRate(eRate);
if (rc != GRC_OK)
{
COM_ViewError(rc, "Setup baud rate");
}
else
{
printf("Baudrate is %d Baud = " );
switch (eRate )
{
case COM_BAUD_115200:
printf("115200\n");
break ;
case COM_BAUD_57600:
printf("57600\n");
break ;
case COM_BAUD_38400:
printf("38400\n");
break ;
case COM_BAUD_19200:
printf("19200\n");
break ;
case COM_BAUD_9600:
printf("9600\n ");
break ;
case COM_BAUD_4800:
printf("4800\n ");
break ;
case COM_BAUD_2400:
printf("2400\n ");
break ;
default:
printf("illegal\n ");
break ;
}
Leica TPS1200 / TS30 / TM30 – Version 1.50 28
GeoCOM Reference Manual
}
...
// shutdown GeoCOM
} // end of main
Communication Settings
Leica TPS1200 / TS30 / TM30 – Version 1.50 29
GeoCOM Reference Manual Communication Settings
5.4.6
COM_GetTimeOut – getting the current timeout value
COM_GetTimeOut.....................................................................................................................................................................................................................................................................
........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ -
C-Declaration
COM_GetTimeOut( short &nTimeOut )
VB-Declaration
VB_COM_GetTimeOut( nTimeOut As Integer )
ASCII-Request
-
ASCII-Response
-
Remarks
This function retrieves the current timeout value for a request in seconds. The timeout value is the delay
GeoCOM will wait for completion before it signals an error to the calling application.
Parameters
Return-Code Names and Return-Code Values
GRC_OK
See Also
COM_SetTimeOut
Example
GRC_TYPE rc;
COM_GetTimeOut(nTimeOut); if (nTimeOut <= 3)
{
COM_SetTimeOut(7);
}
Leica TPS1200 / TS30 / TM30 – Version 1.50 30
GeoCOM Reference Manual Communication Settings
5.4.7
COM_SetTimeOut - setting the current timeout value
COM_SetTimeOut .....................................................................................................................................................................................................................................................................
........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ -
C-Declaration
COM_SetTimeOut( short nTimeOut )
VB-Declaration
VB_COM_SetTimeOut( nTimeOut As Integer )
ASCII-Request
-
ASCII-Response
-
Remarks
This function sets the current timeout value in seconds. The timeout value is the delay GeoCOM will wait for completion of the last RPC before it signals an error to the calling application.
A zero timeout value indicates no wait. But be aware of that this will yield into a GRC_COM_TIMEDOUT return code.
Note: A negative timeout value indicates an infinite waiting period and may block the client application.
Parameters
Return-Code Names and Return-Code Values
GRC_OK
See Also
COM_GetTimeOut
Example see COM_GetTimeOut
Leica TPS1200 / TS30 / TM30 – Version 1.50 31
GeoCOM Reference Manual
5.4.8
COM_GetComFormat – getting the transmission data format
COM_GetComFormat................................................................................................................................................................................................................................................................
........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ -
C-Declaration
COM_GetComFormat( COM_FORMAT &eComFormat )
VB-Declaration
VB_COM_GetComFormat( eComFormat As Long )
ASCII-Request
-
ASCII-Response
-
Remarks
This function gets the actual transmission data format.
Parameters
or COM_BINARY
Return-Code Names and Return-Code Values
GRC_OK
See Also
COM_SetComFormat
Example
GRC_TYPE rc;
COM_FORMAT eComFormat;
COM_GetComFormat(eComFormat); if (eComFormat == COM_ASCII)
{
printf("ASCII mode in use.\n");
} else
{
printf("BINARY mode in use.\n");
}
Communication Settings
Leica TPS1200 / TS30 / TM30 – Version 1.50 32
GeoCOM Reference Manual Communication Settings
5.4.9
COM_SetComFormat - setting the transmission data format
COM_SetComFormat ................................................................................................................................................................................................................................................................
........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ -
C-Declaration
COM_SetComFormat( COM_FORMAT eComFormat )
VB-Declaration
VB_COM_SetComFormat( ByVal eComFormat As Long )
ASCII-Request
-
ASCII-Response
-
Remarks
This function sets the transmission data format. Binary data format can only be set if it is supported by the server. To check if the server supports binary data format RPC COM_GetBinaryAvailable is used.
One can force ASCII data format for special purposes, e.g. debugging.
The server always replies in the data-format that it has received the request.
Parameters
or COM_BINARY
Return-Code Names and Return-Code Values
GRC_OK
GRC_COM_PORT_NOT_OPEN
GRC_COM_NO_BINARY
3104
3086
Port not open for transmission.
TPS Firmware does not support binary data transmission format.
See Also
COM_GetComFormat
COM_OpenConnection
Example
GRC_TYPE rc;
COM_FORMAT eFormat;
// change coding method
// eFormat is COM_ASCII or COM_BINARY eFormat = COM_BINARY; rc = COM_SetComFormat(eFormat); if (rc == GRC_COM_PORT_NOT_OPEN)
{
rc = COM_SetComFormat(eFormat);
} switch (rc)
{
case GRC_COM_PORT_NOT_OPEN:
printf("Port not open\n");
return (GRC_FATAL);
break;
case GRC_COM_NO_BINARY:
printf("Binary format not available "
"for this version.");
// continue in ASII-format
break;
} // end of switch (rc)
// continue in program
Leica TPS1200 / TS30 / TM30 – Version 1.50 33
GeoCOM Reference Manual Communication Settings
5.4.10
COM_UseWindow - declaring the parent window handle
COM_UseWindow.....................................................................................................................................................................................................................................................................
........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ -
C-Declaration
COM_UseWindow( HWND handle )
VB-Declaration
VB_COM_UseWindow( handle As HWND )
ASCII-Request
-
ASCII-Response
-
Remarks
The function sets the parent window-handle that GeoCOM uses when it creates a dialog or message box. If this function is not called, GeoCOM will use the NULL window as default.
Note: HWND depends on whether the pre-processor symbol STRICT is defined. When MFC libraries are used,
STRICT is automatically defined. Otherwise the user must #define STRICT or he will get unresolved externals.
Parameters
Return-Code Names and Return-Code Values
GRC_OK
See Also
COM_ViewError
Example
RC_TYE rc;
HWND hWnd; rc = COM_UseWindow(hWnd);
Leica TPS1200 / TS30 / TM30 – Version 1.50 34
GeoCOM Reference Manual Communication Settings
5.4.11
COM_ViewError – setting a pop up error message box
COM_ViewError........................................................................................................................................................................................................................................................................
........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ -
C-Declaration
COM_ViewError( GRC_TYPE Result,
char *szMsgTitle )
VB-Declaration
VB_COM_ViewError( ByVal Result As Integer,
ByVal szMsgTitle As String)
ASCII-Request
-
ASCII-Response
-
Remarks
This function checks the value of Result and if it is not equal to GRC_OK then it pops up a message box containing the specific error text.
Note: This function yields a valid error text only if GeoCOM has been initialised successfully.
Parameters
Return-Code Names and Return-Code Values
GRC_OK
See Also
COM_GetErrorText
Example
GRC_TYPE rc;
// initialize GeoCOM rc = COM_SetBaudRate(COM_BAUD_19200); if (rc != GRC_OK)
{
COM_ViewError(rc, "Set up connection");
// handle error
}
Leica TPS1200 / TS30 / TM30 – Version 1.50 35
GeoCOM Reference Manual Communication Settings
5.4.12
COM_GetErrorText – getting the error text
COM_GetErrorText ...................................................................................................................................................................................................................................................................
........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ -
C-Declaration
char
VB-Declaration
*szErrText)
VB_COM_GetErrorText(ByVal Result As Integer,
szErrText As String)
ASCII-Request
-
ASCII-Response
-
Remarks
This function checks the value of Result and returns an error text if the value is not equal to GRC_OK. The function yields an empty string if the value is GRC_OK. The maximum length of such an error text is 255 characters.
Parameters
Return-Code Names and Return-Code Values
GRC_OK
See Also
COM_ViewError this code will be checked.
Error text if not equal to GRC_OK .
Leica TPS1200 / TS30 / TM30 – Version 1.50 36
GeoCOM Reference Manual Communication Settings
5.4.13
COM_GetWinSWVersion - retrieving client side version information
COM_GetWinSWVersion.........................................................................................................................................................................................................................................................
........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ -
C-Declaration
COM_GetWinSWVersion( short &nRel,
short &nVer,
short &nSubVer )
VB-Declaration
VB_COM_GetWinSWVersion( nRel As Integer,
nVer As Integer,
nSubVer As Integer )
ASCII-Request
-
ASCII-Response
-
Remarks
This function retrieves the actual software Release (Release, version and subversion) of GeoCOM on the client side.
Parameters
Return-Code Names and Return-Code Values
GRC_OK
See Also
COM_GetSWVersion
Example
GRC_TYPE rc; short nRel, nSubVer, nVer;
(void) COM_GetWinSWVersion(nRel, nVer, nSubVer); printf("Windows GeoCOM:\n"); printf("Release %2d.%02d.%02d\n", nRel, nVer, nSubVer);
Leica TPS1200 / TS30 / TM30 – Version 1.50 37
GeoCOM Reference Manual Alt User - AUS
6 A
LT
U
SER
AUS
6.1
USAGE
This subsystem contains functions to switch between the automation modes (ATR / LOCK) and to query the current status.
6.2
CONSTANTS AND TYPES
On/Off switch enum ON_OFF_TYPE
{
OFF,
ON
};
// 0
// 1
Leica TPS1200 / TS30 / TM30 – Version 1.50 38
GeoCOM Reference Manual Alt User - AUS
6.3
FUNCTIONS
6.3.1
AUS_GetUserAtrState - getting the status of the ATR mode
AUS_GetUserAtrState...............................................................................................................................................................................................................................................................
............
18006...............................................................................................................................................................................................................................................................AUS_GetUserA
trState
............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ 18006
C-Declaration
AUS_GetUserAtrState(ON_OFF_TYPE &OnOff)
VB-Declaration
VB_AUS_GetUserAtrState (On/Off As Long)
ASCII-Request
%R1Q,18006:
ASCII-Response
%R1P,0,0: RC,OnOff[long]
Remarks
Get the current status of the ATR mode on automated instrument models. This command does not indicate whether the ATR has currently acquired a prism. Note the difference between GetUserATR and GetUserLOCK state.
Parameters
Return-Code Names and Return-Code Values
GRC_OK
GRC_NOT_IMPL 5 ATR not available; no automated instrument.
See Also
AUS_SetUserAtrState
Example
GRC_TYPE rc;
ON_OFF_TYPE OnOff;
// look for ATR state and set On if it is Off rc = AUS_GetUserAtrState(OnOff); if (OnOff == OFF)
{
rc = AUS_SetUserAtrState(ON);
if (rc == GRC_OK)
{
// set of ATR status successful
}
else
{
// no automated instrument
}
}
Leica TPS1200 / TS30 / TM30 – Version 1.50 39
GeoCOM Reference Manual Alt User - AUS
6.3.2
AUS_SetUserAtrState - setting the status of the ATR mode
AUS_SetUserAtrState............................................................................................................................................................................................................................................................................
............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ 18005
18005...............................................................................................................................................................................................................................................................AUS_SetUserAt
rState
C-Declaration
AUS_SetUserAtrState(ON_OFF_TYPE OnOff)
VB-Declaration
VB_AUS_SetUserAtrState(OnOff As Long)
ASCII-Request
%R1Q,18005: On/Off[long]
ASCII-Response
%R1P,0,0: RC
Remarks
Activates respectively deactivates the ATR mode.
Activate ATR mode:
The ATR mode gets activated. If LOCK mode is on and the command is sent, then LOCK mode changes to ATR mode.
Deactivate ATR mode:
The ATR mode gets deactivated. If LOCK mode is on and the command is sent, then LOCK mode stays on
This command is valid for automated instrument models only.
Parameters
Return-Code Names and Return-Code Values
GRC_OK
GRC_NOT_IMPL 5
See Also
AUS_GetUserAtrState
AUS_GetUserLockState
AUS_SetUserLockState
Example see AUS_GetUserAtrState
ATR not available; no automated instrument.
Leica TPS1200 / TS30 / TM30 – Version 1.50 40
GeoCOM Reference Manual Alt User - AUS
6.3.3
AUS_GetUserLockState - getting the status of the LOCK mode
AUS_GetUserLockState............................................................................................................................................................................................................................................................................
........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ 18008
18008...............................................................................................................................................................................................................................................................AUS_GetUserLo
ckState
C-Declaration
AUS_GetUserLockState(ON_OFF_TYPE &OnOff)
VB-Declaration
VB_AUS_GetUserLockState(OnOff As Long)
ASCII-Request
%R1Q,18008:
ASCII-Response
%R1P,0,0: RC, OnOff[long]
Remarks
This command gets the current status of the LOCK mode. This command is valid for automated instruments only. TheGetUserLockState command does not indicate if the instrument is currently locked to a prism. For this function the MotReadLockStatus has to be used.
Parameters
Return-Code Names and Return-Code Values
GRC_OK
GRC_NOT_IMPL 5 ATR not available; no automated instrument.
See Also
AUS_SetUserLockState
MOT_ReadLockStatus
Example
GRC_TYPE rc;
ON_OFF_TYPE OnOff, OldAtrStatus; rc = AUS_GetUserAtrState(OldAtrStatus); // save old mode rc = AUS_GetUserLockState(OnOff); if (OnOff == OFF)
{// ------ enable target tracking ------------------
rc = AUS_SetUserLockState(ON); //set the ATR mode
//automatically also!
if (rc == GRC_OK)
{// set of Lock state successful
rc = AUT_LockIn();// activate the real target
// tracking
if(rc != GRC_OK)
{
// error handling
}
}
else
{
// no automated instrument
}
} else
{// ------ disable target tracking ---------------
rc = AUS_SetUserLockState(OFF);// reset the ATR
// mode not
// automatically
if(rc == GRC_OK)
{// reset of Lock state successful
if(OldAtrStatus==OFF)
{// set old ATR mode
rc == AUS_SetUserAtrState(OFF);
}
}
}
Leica TPS1200 / TS30 / TM30 – Version 1.50 41
GeoCOM Reference Manual Alt User - AUS
6.3.4
AUS_SetUserLockState - setting the status of the LOCK mode
AUS_SetUserLockState.............................................................................................................................................................................................................................................................................
........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ 18007
18007...............................................................................................................................................................................................................................................................AUS_SetUserLo
ckState
C-Declaration
AUS_SetUserLockState(ON_OFF_TYPE OnOff)
VB-Declaration
VB_AUS_SetUserLockState(OnOff As Long)
ASCII-Request
%R1Q,18007: OnOff[long]
ASCII-Response
%R1P,0,0: RC
Remarks
Activates or deactivates the LOCK mode.
Status ON:
The LOCK mode is activated. This does not mean that the instrument is locked onto a prism. In order to lock and follow a moving target, see the function AUT_LockIn.
Status OFF:
The LOCK mode is deactivated. A moving target, which is being tracked, will be aborted and the manual drive wheel is activated.
This command is valid for automated instruments only.
Parameters
Return-Code Names and Return-Code Values
GRC_OK
GRC_NOT_IMPL 5
See Also
AUS_GetUserLockState
AUS_SetUserAtrState
AUT_LockIn
Example see AUS_GetUserLockState
ATR not available; no automated instrument.
Leica TPS1200 / TS30 / TM30 – Version 1.50 42
GeoCOM Reference Manual Automation - AUT
7 A
UTOMATION
AUT
7.1
USAGE
The subsystem ‘Automation’ mainly performs the dynamic application ‘absolute positioning’. This operation positions the axes of the instrument within a given tolerance to the system’s angle measurement unit.
In combination with the Automatic Target Recognition System (ATR) other functionality such as automatic target position or target search are supported.
Some of the functions of this subsystem can take an undefined time for execution (for example the position operation takes the more time the more precision is required).
7.2
CANCELLING / ABORTING CURRENT FUNCTIONS
All functions with long operation time (e.g. AUT_MakePositioning, AUT_SearchNext etc.) may be aborted by sending
‘c’<Term>.
Note: Automation RPC’s require valid GeoCOM robotic license key for successful execution.
7.3
CONSTANTS AND TYPES
Number of axis const short MOT_AXES = 2;
Positioning Tolerance struct AUT_POSTOL
{
double adPosTol[MOT_AXES];
// positioning tolerance for Hz and V [rad]
};
Maximum Position Time [s] struct AUT_TIMEOUT
{
double adPosTimeout[MOT_AXES]; // max. positioning time [sec]
};
Position Precision enum AUT_POSMODE
{
AUT_NORMAL = 0,
AUT_PRECISE = 1
// fast positioning mode
// exact positioning mode
// note: can distinctly claim more time
// for the positioning
AUT_Fast = 2 // for TS30 / TM30 instruments,
} positions with the last valid inclination and an increased positioning tolerance.
Fine-adjust Position Mode enum AUT_ADJMODE
{
AUT_NORM_MODE = 0
AUT_POINT_MODE = 1
AUT_DEFINE_MODE = 2
// Possible settings of the positioning
// tolerance relating the angle- or the
// point- accuracy at the fine adjust.
// Angle tolerance
// Point tolerance
// System independent positioning
// tolerance. Set with AUT_SetTol
Leica TPS1200 / TS30 / TM30 – Version 1.50 43
GeoCOM Reference Manual
}
Automatic Target Recognition Mode enum AUT_ATRMODE // Possible modes of the target
// recognition
{
AUT_POSITION = 0,
AUT_TARGET = 1
}
// Positioning to the hz- and v-angle
// Positioning to a target in the
// environment of the hz- and v-angle.
Automatic Detent Mode struct AUT_DETENT
{
double dPositiveDetent;
double dNegativeDetent;
BOOLE bActive;
}
// Detent data
// Detent in positive direction
// Detent in negative direction
// Is detent active
Search Spiral struct AUT_SEARCH_SPIRAL
{
double dRangeHz;
double dRangeV;
}
// width of search area [rad]
// maximal height of search area [rad]
Search Area struct AUT_SEARCH_AREA
{
double dCenterHz;
double dCenterV;
double dRangeHz;
double dRangeV;
BOOLE bEnabled;
}
// Hz angle of search area – center [rad]
// V angle of search area – center [rad]
// width of search area [rad]
// maximal height of search area [rad]
// TRUE: user defined search area is active
Directions
AUT_CLOCKWISE = 1,
AUT_ANTICLOCKWISE = -1
// direction clockwise.
// direction counter clockwise.
Automation - AUT
Leica TPS1200 / TS30 / TM30 – Version 1.50 44
GeoCOM Reference Manual Automation - AUT
7.4
FUNCTIONS
7.4.1
AUT_ReadTol - reading the current setting for the positioning tolerances
AUT_ReadTol ............................................................................................................................................................................................................................................................................
9008 .................................................................................................................................................
AUT_ReadTol
........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ 9008
C-Declaration
AUT_ReadTol(AUT_POSTOL &TolPar)
VB-Declaration
VB_AUT_ReadTol(TolPar As AUT_POSTOL)
ASCII-Request
%R1Q,9008:
ASCII-Response
%R1P,0,0: RC,Tolerance Hz[double],Tolerance V[double]
Remarks
This command reads the current setting for the positioning tolerances of the Hz- and V- instrument axis.
This command is valid for motorized instruments only.
Parameters direction [ rad ].
Return-Code Names and Return-Code Values
GRC_OK
GRC_NA 27 GeoCOM Robotic license key not available.
See Also
AUT_SetTol
Example const double MIN_TOL=3.141592654e-05;
GRC_TYPE rc;
AUT_POSTOL TolPar;
// read tolerance and set to a minimum of
// 3.141592654e-05 rc = AUT_ReadTol(TolPar); if ((TolPar.adPosTol[MOT_HZ_AXLE] > MIN_TOL) ||
(TolPar.adPosTol[MOT_V_AXLE] > MIN_TOL))
{
TolPar.adPosTol[MOT_HZ_AXLE] = MIN_TOL;
TolPar.adPosTol[MOT_HZ_AXLE] = MIN_TOL;
rc = AUT_SetTol(TolPar);
switch (rc)
{
case (GRC_OK):
// set of Lock tolerance successful
break;
case (GRC_IVPARAM):
// invalid parameter
break;
case (GRC_MOT_UNREADY):
// subsystem not ready
break;
}
}
Leica TPS1200 / TS30 / TM30 – Version 1.50 45
GeoCOM Reference Manual Automation - AUT
7.4.2
AUT_SetTol - setting the positioning tolerances
AUT_SetTol........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ 9007
9007 ................................................................................................................................................................................................................................................................AUT_SetTol
C-Declaration
AUT_SetTol(AUT_POSTOL TolPar)
VB-Declaration
VB_AUT_SetTol(TolPar As AUT_POSTOL)
ASCII-Request
%R1Q,9007: ToleranceHz[double], Tolerance V[double]
ASCII-Response
%R1P,0,0: RC
Remarks
This command sets new values for the positioning tolerances of the Hz- and V- instrument axes. This command is valid for motorized instruments only.
The tolerances must be in the range of 1[cc] ( =1.57079 E-06[ rad ] ) to 100[cc] ( =1.57079 E-04[ rad ] ).
Note: The maximum resolution of the angle measurement system depends on the instrument accuracy class. If smaller positioning tolerances are required, the positioning time can increase drastically.
Parameters direction [ rad ].
Return-Code Names and Return-Code Values
GRC_OK
GRC_NA
GRC_IVPARAM
27
2
1792
GeoCOM Robotic license key not available.
One or both tolerance values not within the boundaries
(1.57079E-06[ rad ] =1[cc] to 1.57079E-04[ rad ] =100[cc]).
Instrument has no motorization GRC_MOT_UNREADY
See Also
AUT_ReadTol
Example see AUT_ReadTol
Leica TPS1200 / TS30 / TM30 – Version 1.50 46
GeoCOM Reference Manual Automation - AUT
7.4.3
AUT_ReadTimeout - reading the current timeout setting for positioning
AUT_ReadTimeout............................................................................................................................................................................................................................................................................
................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ 9012
9012 ................................................................................................................................................................................................................................................................AUT_ReadTime
out
C-Declaration
AUT_ReadTimeout(AUT_TIMEOUT &TimeoutPar)
VB-Declaration
VB_AUT_ReadTimeout(TimeoutPar As AUT_TIMEOUT)
ASCII-Request
%R1Q,9012:
ASCII-Response
%R1P,0,0: RC, TimeoutHz[double], TimeoutV[double]
Remarks
This command reads the current setting for the positioning time out (maximum time to perform positioning).
Parameters
[sec].
Return-Code Names and Return-Code Values
GRC_OK
GRC_NA 27 GeoCOM Robotic license key not available.
See Also
AUT_SetTimeout
Example
GRC_TYPE rc;
AUT_TIMEOUT TimeoutPar;
// read timeout and set to a minimum of 10 [s] rc = AUT_ReadTimeout(TimeoutPar); if ((TimeoutPar.adPosTimeout[0] < 10) ||
(TimeoutPar.adPosTimeout[1] < 10))
{
TimeoutPar.adPosTimeout[0] = 10;
TimeoutPar.adPosTimeout[1] = 10;
rc = AUT_SetTimeout(TimeoutPar);
switch (rc)
{
case (GRC_OK):
// set of timeout successful
break;
case (GRC_IVPARAM):
// invalid parameter
break;
}
}
Leica TPS1200 / TS30 / TM30 – Version 1.50 47
GeoCOM Reference Manual Automation - AUT
7.4.4
AUT_SetTimeout - setting the timeout for positioning
AUT_SetTimeout ...........................................................................................................................................................................................................................................................................
.................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... 9011
9011 ................................................................................................................................................................................................................................................................AUT_SetTimeou
t
C-Declaration
AUT_SetTimeout(AUT_TIMEOUT TimeoutPar)
VB-Declaration
VB_AUT_SetTimeout(TimeoutPar As AUT_TIMEOUT)
ASCII-Request
%R1Q,9011: TimeoutHz[double],TimeoutV[double]
ASCII-Response
%R1P,0,0: RC
Remarks
This command set the positioning timeout (set maximum time to perform a positioning). The timeout is reset on
7[sec] after each power on
Parameters
[s]. Valid values are between 7 [sec] and 60 [sec].
Return-Code Names and Return-Code Values
GRC_OK
GRC_NA
GRC_IVPARAM
27
2
GeoCOM Robotic license key not available.
One or both time out values not within the boundaries (7[sec] to 60[sec]).
See Also
AUT_ReadTimeout
Example see AUT_ReadTimeout
Leica TPS1200 / TS30 / TM30 – Version 1.50 48
GeoCOM Reference Manual Automation - AUT
7.4.5
AUT_MakePositioning - turning the telescope to a specified position
AUT_MakePositioning..............................................................................................................................................................................................................................................................................
........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ 9027
9027 ................................................................................................................................................................................................................................................................AUT_MakePosi
tioning
C-Declaration
AUT_MakePositioning(double Hz,
double V,
AUT_POSMODE POSMode,
AUT_ATRMODE ATRMode,
BOOLE bDummy)
VB-Declaration
VB_AUT_MakePositioning4(Hz As Double,
V As Double,
POSMode As Long,
ATRMode As Long,
bDummy As Boolean)
ASCII-Request
%R1Q,9027: Hz,V,PosMode,ATRMode,0
ASCII-Response
%R1P,0,0: RC
Remarks
This procedure turns the telescope absolute to the in Hz and V specified position, taking tolerance settings for positioning (see AUT_POSTOL ) into account. Any active control function is terminated by this function call.
If the position mode is set to normal ( PosMode = AUT_NORMAL ) it is assumed that the current value of the compensator measurement is valid. Positioning precise ( PosMode = AUT_PRECISE ) forces a new compensator measurement at the specified position and includes this information for positioning.
If ATR mode is activated and the ATR mode is set to AUT_TARGET, the instrument tries to position onto a target in the destination area.
If LOCK mode is activated and the ATR mode is set to AUT_TARGET, the instrument tries to lock onto a target in the destination area.
Parameters
Horizontal (instrument) position [ rad ].
Vertical (telescope) position [ rad ].
AUT_NORMAL: (default) uses the current value of the compensator (no compensator measurement while positioning). For positioning distances >25GON
AUT_NORMAL might tend to inaccuracy.
AUT_PRECISE : tries to measure exact inclination of target.
Tend to longer position time (check AUT_TIMEOUT and/or
COM-time out if necessary).
AUT_Fast: for TS30 / TM30 instruments, positions with the last valid inclination and an increased positioning tolerance. Suitable in combination with ATRMode
AUT_Target .
AUT_POSITION : (default) conventional position using values
Hz and V .
AUT_TARGET : tries to position onto a target in the destination area. This mode is only possible if ATR exists and is activated.
It’s reserved for future use, set bDummy always to FALSE
Return-Code Names and Return-Code Values
GRC_OK
GRC_NA
GRC_IVPARAM
27
2
GeoCOM Robotic license key not available
Invalid parameter (e.g. no valid position).
Leica TPS1200 / TS30 / TM30 – Version 1.50 49
GeoCOM Reference Manual Automation - AUT
GRC_AUT_TIMEOUT
GRC_AUT_MOTOR_ERROR
TMC_NO_FULL_CORRECTION
8704
8707
1283
Time out while positioning of one or both axes. (perhaps increase AUT time out, see AUT_SetTimeout )
Instrument has no ‘motorization’.
Error with angle measurement occurs if the instrument is not levelled properly during positioning.
GRC_ABORT
GRC_COM_TIMEDOUT 3077 Communication timeout. (perhaps increase COM timeout, see COM_SetTimeout )
Additionally with position mode AUT_TARGET .
GRC_AUT_NO_TARGET 8710
GRC_AUT_MULTIPLE_TARGETS
GRC_AUT_BAD_ENVIRONMENT
GRC_AUT_ACCURACY
GRC_AUT_DEV_ERROR
8711
8712
8716
8709
GRC_AUT_NOT_ENABLED 8714
No target found
Multiple targets found.
Inadequate environment conditions.
Inexact fine position, repeat positioning
During the determination of the angle deviation error detected, repeat positioning
ATR mode not enabled, enable ATR mode
See Also
AUS_GetUserAtrState
AUS_SetUserAtrState
AUS_GetUserLockState
AUS_SetUserLockState
AUT_ReadTol
AUT_SetTol
AUT_ReadTimeout
AUT_SetTimeout
COM_GetTimeOut
COM_SetTimeOut
Example
The example program tries to position to the given position. If a time out occurred, the time out values are increased and the position procedure starts again. If a measurement error occurred, the automatic inclination correction is switched off and the position procedure starts again.
GRC_TYPE rc,
BOOL TryAgain = TRUE;
AUT_TIMEOUT TimeoutPar;
AUT_POSMODE POSMode = AUT_PRECISE; short nComTimeOut, nOldComTimeOut; rc=GRC_IVRESULT; hrc = COM_GetTimeOut(nOldComTimeOut); hrc = AUS_SetUserAtrState(ON); // for the ATR mode
// AUT_TARGET necessary,
// otherwise not necessary while(rc!=GRC_OK || TryAgain)
{
rc = AUT_MakePositioning(1.3, 1.6, POSMode,
AUT_TARGET, FALSE );
switch (rc)
{
case GRC_OK:
//Positioning successful and precise
break;
case GRC_AUT_TIMEOUT:
// measure timeout fault: increase timeout
hrc = AUT_ReadTimeout(TimeoutPar);
TimeoutPar.adPosTimeout[0]
= __min(TimeoutPar.adPosTimeout[0]+=5,60);
TimeoutPar.adPosTimeout[1]
= __min(TimeoutPar.adPosTimeout[1]+=5,60);
hrc = AUT_SetTimeout(TimeoutPar);
Leica TPS1200 / TS30 / TM30 – Version 1.50 50
GeoCOM Reference Manual
break;
case GRC_COM_TIMEDOUT:
//increase timeout
hrc = COM_GetTimeOut(nComTimeOut);
nComTimeOut=__min(nComTimeOut+=5, 60);
hrc = COM_SetTimeOut(nComTimeOut);
break;
case GRC_AUT_ANGLE_ERROR:
// error within angle measurement:
// switch inclination correction off
hrc = TMC_SetInclineSwitch(OFF);
break;
default:
// precise position not possible
TryAgain = FALSE;
if (rc == GRC_AUT_INCACC)
{
//Position successful but not precise
}
else
{
// Positioning not successful
// here further error analyse possible
}
break;
}
} rc = AUS_SetUserAtrState(OFF); // Note: LOCK mode will
// be automatically
// reseted ! hrc = COM_SetTimeOut(nOldComTimeOut);// Set old time-
// out
Automation - AUT
Leica TPS1200 / TS30 / TM30 – Version 1.50 51
GeoCOM Reference Manual Automation - AUT
7.4.6
AUT_ChangeFace – turning the telescope to the other face
AUT_ChangeFace ..............................................................................................................................................................................................................................................................................
................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ 9028
9028 ................................................................................................................................................................................................................................................................AUT_ChangeFa
ce
C-Declaration
AUT_ChangeFace(AUT_POSMODE PosMode,
AUT_ATRMODE ATRMode,
BOOLE bDummy)
VB-Declaration
VB_AUT_ChangeFace4(PosMode As Long,
ATRMode As Long,
bDummy As Boolean)
ASCII-Request
%R1Q,9028: PosMode,ATRMode,0
ASCII-Response
%R1P,0,0: RC
Remarks
This procedure turns the telescope to the other face. If another function is active, for example locking onto a target, then this function is terminated and the procedure is executed.
If the position mode is set to normal ( PosMode = AUT_NORMAL ) it is allowed that the current value of the compensator measurement is inexact. Positioning precise ( PosMode = AUT_PRECISE ) forces a new compensator measurement. If this measurement is not possible, the position does not take place.
If ATR mode is activated and the ATR mode is set to AUT_TARGET, the instrument tries to position onto a target in the destination area.
If LOCK mode is activated and the ATR mode is set to AUT_TARGET, the instrument tries to lock onto a target in the destination area.
Parameters
AUT_NORMAL : uses the current value of the compensator. For positioning distances >25GON AUT_NORMAL might tend to inaccuracy.
AUT_PRECISE : tries to measure exact inclination of target.
Tends to long position time (check AUT_TIMEOUT and/or
COM-time out if necessary).
AUT_POSITION : conventional position to other face.
AUT_TARGET: tries to position onto a target in the destination area. This set is only possible if ATR exists and is activated.
It’s reserved for future use, set bDummy always to FALSE
Return-Code Names and Return-Code Values
GRC_OK
GRC_NA 27
GRC_IVPARAM
GRC_AUT_TIMEOUT 8704
GeoCOM Robotic license key not available
GRC_AUT_MOTOR_ERROR
TMC_NO_FULL_CORRECTION
8707
1283
Timeout while positioning of one or both axes. (perhaps increase AUT timeout, see AUT_SetTimeout )
Instrument has no ‘motorization’.
Error with angle measurement occurs if the instrument is not levelled properly during positioning.
GRC_FATAL
GRC_ABORT
GRC_COM_TIMEDOUT 3077 Communication timeout. (perhaps increase COM timeout, see COM_SetTimeout )
Additionally with position mode AUT_TARGET .
GRC_AUT_NO_TARGET 8710
GRC_AUT_MULTIPLE_TARGETS 8711
No target found
Multiple targets found.
Leica TPS1200 / TS30 / TM30 – Version 1.50 52
GeoCOM Reference Manual Automation - AUT
GRC_AUT_BAD_ENVIRONMENT
GRC_AUT_ACCURACY
GRC_AUT_DEV_ERROR
GRC_AUT_NOT_ENABLED
8712
8716
8709
8714
Inadequate environment conditions.
Inexact fine position, repeat positioning
During the determination of the angle deviation error detected, repeat change face
ATR mode not enabled, enable ATR mode
See Also
AUS_GetUserAtrState
AUS_SetUserAtrState
AUS_GetUserLockState
AUS_SetUserLockState
AUT_ReadTol
AUT_SetTol
AUT_ReadTimeout
AUT_SetTimeout
COM_GetTimeOut
COM_SetTimeOut
TMC_GetFace
Example
The example program performs a change face. If a measurement error occurs, the automatic inclination correction is switched off and the change face starts again.
GRC_TYPE rc,
BOOL TryAgain = TRUE;
AUT_POSMODE POSMode = AUT_PRECISE; rc=GRC_IVRESULT; while(rc!=GRC_OK && TryAgain)
{
rc = AUT_ChangeFace(POSMode,
AUT_POSITION,
FALSE);
switch (rc)
{
case (GRC_OK): // position successful
//change face successful and precise
break;
case (GRC_AUT_ANGLE_ERROR):
//error within angle measurement:
//switch inclination correction off
rch = TMC_SetInclineSwitch(OFF);
break;
case (GRC_COM_TIMEDOUT):
//communication timed out while change face
TryAgain = FALSE;
break;
default:
//precise position not possible
TryAgain = FALSE;
if (rc == GRC_AUT_INCACC)
{
//change face successful but not precise
}
else
{
// change face not successful
// here further error analyse possible
}
break;
}
}
Leica TPS1200 / TS30 / TM30 – Version 1.50 53
GeoCOM Reference Manual Automation - AUT
7.4.7
AUT_FineAdjust - automatic target positioning
AUT_FineAdjust ............................................................................................................................................................................................................................................................................
.................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... 9037
9037 ................................................................................................................................................................................................................................................................AUT_FineAdjus
t
C-Declaration
AUT_FineAdjust( Double dSrchHz, double dSrchV ,
BOOLE bDummy)
VB-Declaration
VB_AUT_FineAdjust3( DSrchHz As Double, dSrchV As Double, bDummy As Boolean)
ASCII-Request
%R1Q,9037: dSrchHz [double], dSrchV [double],0
ASCII-Response
%R1P,0,0: RC
Remarks
This procedure precisely positions the telescope crosshairs onto the target prism and measures the ATR Hz and
V deviations. If the target is not within the visible area of the ATR sensor (Field of View) a target search will be executed. The target search range is limited by the parameter dSrchV in V- direction and by parameter dSrchHz in Hz - direction. If no target found the instrument turns back to the initial start position.
A current Fine Adjust LockIn towards a target is terminated by this procedure call. After positioning, the lock mode is active. The timeout of this operation is set to 5s, regardless of the general position timeout settings. The positioning tolerance is depends on the previously set up the fine adjust mode (see AUT_SetFineAdjustMoed and AUT_GetFineAdjustMode ).
Tolerance settings (with AUT_SetTol and AUT_ReadTol ) have no influence to this operation. The tolerance settings as well as the ATR measure precision depends on the instrument’s class and the used EDM measure mode (The EDM measure modes are handled by the subsystem TMC).
Parameters
It’s reserved for future use, set bDummy always to FALSE
Return-Code Names and Return-Code Values
GRC_OK
GRC_NA
GRC_AUT_TIMEOUT
27
8704
8707
GeoCOM Robotic license key not available
Timeout while positioning of one or both axes. The position fault lies above 100[cc]. (perhaps increase AUT timeout, see
AUT_SetTimeout )
Instrument has no ‘motorization’. GRC_AUT_MOTOR_ERROR
GRC_FATAL
GRC_ABORT
GRC_AUT_NO_TARGET
GRC_AUT_MULTIPLE_TARGETS
GRC_AUT_BAD_ENVIRONMENT
GRC_AUT_DEV_ERROR
GRC_AUT_DETECTOR_ERROR
GRC_COM_TIMEDOUT
8710
8711
8712
8716
8713
3077
No target found.
Multiple targets found.
Inadequate environment conditions.
During the determination of the angle deviation error detected, repeat fine positioning
Error in target acquisition.
Communication time out. (perhaps increase COM timeout, see COM_SetTimeout )
See Also
AUS_SetUserAtrState
AUS_GetUserAtrState
AUT_SetFineAdjustMode
AUT_GetFineAdjustMode
Example
GRC_TYPE Result;
ON_OFF_TYPE ATRState;
Leica TPS1200 / TS30 / TM30 – Version 1.50 54
GeoCOM Reference Manual Automation - AUT double dHzSearchRange, dVSearchRange dHzSearchRange=0.08;// search range in [rad] dVSearchRange=0.08; // search range in [rad]
Result = AUS_GetUserAtrState(ATRState); // The ATR-Status must be set for
// fine adjust functionality if(ATRState==ON)
{
// performs a fine position with a max. target
// search range of 0.08rad (5gon) in Hz and V
// direction
Result = AUT_FineAdjust(dHzSearchRange, dVSearchRange,
FALSE); switch (Result) // function return code
{
case (GRC_OK):
//fine adjust successful and precise
break;
case (GRC_AUT_NO_TARGET):
//no target found.
break;
case (GRC_AUT_MULTIPLE_TARGETS):
//multiple targets found.
break;
case (GRC_AUT_BAD_ENVIRONMENT):
//inadequate environment conditions.
break;
default:
//fine adjust not successful
//here further error analyse possible
break;
}
}
Leica TPS1200 / TS30 / TM30 – Version 1.50 55
GeoCOM Reference Manual Automation - AUT
7.4.8
AUT_Search - performing an automatic target search
AUT_Search ....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... 9029
9029 ................................................................................................................................................................................................................................................................AUT_Search
C-Declaration
AUT_Search(double Hz_Area,
double V_Area,
BOOLE bDummy)
VB-Declaration
VB_AUT_Search2(Hz_Area As Double,
V_Area As Double,
bDummy As Boolean)
ASCII-Request
%R1Q,9029: Hz_Area,V_Area,0
ASCII-Response
%R1P,0,0: RC
Remarks
This procedure performs an automatically target search within a given area. The search is terminated once the prism appears in the field of view of the ATR sensor. If no prism is found within the specified area, the instrument turns back to the initial start position. For an exact positioning onto the prism centre, use fine adjust
(see AUT_FineAdjust ) afterwards.
Note: If you expand the search range of the function AUT_FineAdjust , then you have a target search and a fine positioning in one function.
Parameters
Horizontal search region [ rad ].
Vertical search region [ rad ].
It’s reserved for future use, set bDummy always to FALSE
Return-Code Names and Return-Code Values
GRC_OK
27 GRC_NA
GRC_IVPARAM
GRC_AUT_MOTOR_ERROR
GRC_FATAL
GRC_ABORT
8707
GeoCOM Robotic license key not available
Instrument has no ‘motorization’.
GRC_AUT_NO_TARGET
GRC_AUT_BAD_ENVIRONMENT
GRC_AUT_DETECTOR_ERROR
GRC_COM_TIMEDOUT
8710
8712
8713
3077
No target found.
Inadequate environment conditions.
AZE error, at repeated occur call service
Communication timeout. (perhaps increase COM timeout, see COM_SetTimeout )
See Also
AUS_SetUserAtrState
AUS_GetUserAtrState
AUT_FineAdjust
Example
The example program performs a search in the given area. If no target is found, the area is increased until
1[ rad ]. If a communication timeout occurs, the value for the communication timeout is increased until 30[s]
(Note that a search over a big area takes a long time often results in an error).
BOOL TryAgain = TRUE; double Hz_Area,V_Area;
Hz_Area = 0.1;
V_Area = 0.1; rc = GRC_IVRESULT; hrc = COM_GetTimeOut(nOldComTimeOut);
Leica TPS1200 / TS30 / TM30 – Version 1.50 56
GeoCOM Reference Manual hrc = AUS_SetUserAtrState(ON); // activate ATR mode while(rc!=GRC_OK && TryAgain && hrc==GRC_OK)
{
rc = AUT_Search(Hz_Area,V_Area,FALSE);
switch (rc)
{
case (GRC_OK):
// execution successful
// Target found
break;
case (GRC_AUT_NO_TARGET):
//no target found.
//increase search area
Hz_Area += 0.1;
V_Area += 0.1;
if (Hz_Area > 1)
{
TryAgain = FALSE;
}
break;
case (GRC_COM_TIMEDOUT):
//communication timeout
//increase timeout until 30s
hrc = COM_GetTimeOut(nComTimeOut);
nComTimeOut=(short)__min(nComTimeOut+=5, 60);
hrc = COM_SetTimeOut(nComTimeOut);
//abort if timeout >= 30s
if (nComTimeOut >= 30)
{
TryAgain = FALSE;
}
break;
default:
//error: search not possible
//here further error analyse possible
break;
}
} hrc = COM_GetTimeOut(nOldComTimeOut);// Set old time
// out back hrc = AUS_SetUserAtrState(OFF);// Note: LOCK mode will
// be automatically also
Automation - AUT
// reseted!
Leica TPS1200 / TS30 / TM30 – Version 1.50 57
GeoCOM Reference Manual Automation - AUT
7.4.9
AUT_GetFineAdjustMode – getting the fine adjust positioning mode
AUT_GetFineAdjustMode ............................................................................................................................................................................................................................................................................
.................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... 9030
9030 ................................................................................................................................................................................................................................................................AUT_GetFineAd
justMode
C-Declaration
AUT_GetFineAdjustMode(AUT_ADJMODE& rAdjMode)
VB-Declaration
VB_AUT_GetFineAdjustMode(AdjMode As Long)
ASCII-Request
%R1Q,9030:
ASCII-Response
%R1P,0,0: RC,AdjMode[integer]
Remarks
This function returns the current activated fine adjust positioning mode. This command is valid for all instruments, but has only effects for instruments equipped with ATR.
Parameters
RAdjMode Out Current fine adjust positioning mode
Return-Code Names and Return-Code Values
GRC_OK
GRC_NA 27 GeoCOM Robotic license key not available
See Also
AUT_SetFineAdjustMode
Example see AUT_SetFineAdjustMode
Leica TPS1200 / TS30 / TM30 – Version 1.50 58
GeoCOM Reference Manual Automation - AUT
7.4.10
AUT_SetFineAdjustMode - setting the fine adjust positioning mode
AUT_SetFineAdjustMode.............................................................................................................................................................................................................................................................................
.................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... 9031
9031 ................................................................................................................................................................................................................................................................AUT_SetFineAd
justMode
C-Declaration
AUT_SetFineAdjustMode(AUT_ADJMODE AdjMode)
VB-Declaration
VB_AUT_SetFineAdjustMode(AdjMode As Long)
ASCII-Request
%R1Q,9031: AdjMode[long]
ASCII-Response
%R1P,0,0: RC
Remarks
This function sets the positioning tolerances (default values for both modes) relating the angle accuracy or the point accuracy for the fine adjust. This command is valid for all instruments, but has only effects for instruments equipped with ATR. If a target is very near or held by hand, it’s recommended to set the adjust-mode to
AUT_POINT_MODE.
Parameters
AdjMode In AUT_NORM_MODE : Fine positioning with angle tolerance
AUT_POINT_MODE : Fine positioning with point tolerance
Return-Code Names and Return-Code Values
GRC_OK
GRC_NA 27 GeoCOM Robotic license key not available
GRC_IVPARAM
See Also
AUS_GetUserAtrState
Example
GRC_TYPE Result;
AUT_ADJMODE AdjMode;
Result=AUT_GetFineAdjustMode(AdjMode); if(AdjMode!=AUT_MODE_POINT && Result==GRC_OK)
{// change the finepositioning mode to AUT_MODE_POINT
Result=AUT_SetFineAdjustMode(AUT_MODE_POINT);
if(Result!=GRC_OK)
{ // Error handling
}
}
Leica TPS1200 / TS30 / TM30 – Version 1.50 59
GeoCOM Reference Manual Automation - AUT
7.4.11
AUT_LockIn - starting the target tracking
AUT_LockIn....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... 9013
9013 ................................................................................................................................................................................................................................................................AUT_LockIn
C-Declaration
AUT_LockIn()
VB-Declaration
VB_AUT_LockIn()
ASCII-Request
%R1Q,9013:
ASCII-Response
%R1P,0,0: RC
Remarks
If LOCK mode is activated (AUS_SetUserLockState) then the function starts the target tracking. The
AUT_LockIn command is only possible if a AUT_FineAdjust command has been previously sent and successfully executed.
Parameters
Return-Code Names and Return-Code Values
GRC_OK
GRC_NA
GRC_AUT_MOTOR_ERROR
GRC_AUT_DETECTOR_ERROR
GRC_AUT_NO_TARGET
GRC_AUT_BAD_ENVIRONMENT
GRC_ATA_STRANGE_LIGHT
27
8707
8713
517
8712
524
GeoCOM Robotic license key not available
Instrument has no ‘motorization’.
Error in target acquisition, at repeated occur call service
No target detected, no previous Fine Adjust
Bad environment conditions
No target detected, no previous Fine Adjust
See Also
AUS_SetUserLockState
AUS_GetUserLockState
MOT_ReadLockStatus
Example
GRC_TYPE result; result = AUS_SetUserLockState(ON);// enable lock mode if(result==GRC_OK)
{ result = AUT_LockIn(); // activate target tracking if(result != GRC_OK)
{
// Error handling
}
}
Leica TPS1200 / TS30 / TM30 – Version 1.50 60
GeoCOM Reference Manual Automation - AUT
7.4.12
AUT_GetSearchArea – getting the dimensions of the PowerSearch window
AUT_GetSearchArea.............................................................................................................................................................................................................................................................................
............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ 9042
9042 ................................................................................................................................................................................................................................................................AUT_GetSearch
Area
C-Declaration
AUT_GetSearchArea( AUT_SEARCH_AREA &Area )
VB-Declaration
VB_AUT_GetSearchArea(Area As AUT_SEARCH_AREA)
ASCII-Request
%R1Q,9042:
ASCII-Response
%R1P,0,0: RC, dCenterHz [double], dCenterV [double], dRangeHz [double], dRangeV [double], bEnabled [Boolean]
Remarks
This function returns the current position and size of the PowerSearch Window. This command is valid for all instruments, but has only effects for instruments equipped with PowerSearch.
Parameters
Return-Code Names and Return-Code Values
GRC_OK
GRC_NA 27
See Also
AUT_SetSearchArea
BAP_SearchTarget
Example see AUT_SetSearchArea
GeoCOM Robotic license key not available
Leica TPS1200 / TS30 / TM30 – Version 1.50 61
GeoCOM Reference Manual Automation - AUT
7.4.13
AUT_SetSearchArea – setting the PowerSearch window
AUT_SetSearchArea..............................................................................................................................................................................................................................................................................
............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ 9043
9043 ................................................................................................................................................................................................................................................................AUT_SetSearch
Area
C-Declaration
AUT_SetSearchArea( AUT_SEARCH_AREA Area )
VB-Declaration
VB_AUT_SetSearchArea(byval Area As AUT_SEARCH_AREA)
ASCII-Request
%R1Q,9043: dCenterHz,dCenterV,dRangeHz,dRangeV,bEnabled
ASCII-Response
%R1P,0,0: RC
Remarks
This function defines the position and dimensions and activates the PowerSearch window. This command is valid for all instruments, but has only effects for instruments equipped with PowerSearch.
Parameters
Return-Code Names and Return-Code Values
GRC_NA 27 GeoCOM Robotic license key not available
See Also
AUT_GetSearchArea
BAP_SearchTarget
Example
AUT_SEARCH_AREA SearchArea;
SearchArea.dCenterHz = 0.5;
SearchArea.dCenterV = 1.5708; // 100 gon
SearchArea.dRangeHz = 0.4;
SearchArea.dRangeV = 0.2;
SearchArea.bEnabled = TRUE; // activate it
RetCode = AUT_SetSearchArea(SearchArea);
Leica TPS1200 / TS30 / TM30 – Version 1.50 62
GeoCOM Reference Manual Automation - AUT
7.4.14
AUT_GetUserSpiral – getting the ATR search window
AUT_GetUserSpiral...............................................................................................................................................................................................................................................................................
............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ 9040
9040 ................................................................................................................................................................................................................................................................AUT_GetUserSp
iral
C-Declaration
AUT_GetUserSpiral( AUT_SEARCH_SPIRAL &SpiralDim )
VB-Declaration
VB_AUT_GetUserSpiral(SpiralDim As AUT_SEARCH_SPIRAL)
ASCII-Request
%R1Q,9040:
ASCII-Response
%R1P,0,0: RC,dRangeHz[double],dRangeV[double]
Remarks
This function returns the current dimension of ATR search window. This command is valid for all instruments, but has only affects automated instruments.
Parameters
Return-Code Names and Return-Code Values
27 GRC_NA
See Also
AUT_SetUserSpiral
BAP_SearchTarget
Example see AUT_SetUserSpiral
GeoCOM Robotic license key not available
Leica TPS1200 / TS30 / TM30 – Version 1.50 63
GeoCOM Reference Manual Automation - AUT
7.4.15
AUT_SetUserSpiral - setting the ATR search window
AUT_SetUserSpiral............................................................................................................................................................................................................................................................................
................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ 9041
9041 ................................................................................................................................................................................................................................................................AUT_SetUserSp
iral
C-Declaration
AUT_SetUserSpiral( AUT_SEARCH_SPIRAL SpiralDim)
VB-Declaration
VB_AUT_SetUserSpiral(byval SpiralDim As AUT_SEARCH_SPIRAL)
ASCII-Request
%R1Q,9041: dRangeHz,dRangeV[double]
ASCII-Response
%R1P,0,0: RC
Remarks
This function sets the dimension of the ATR search window. This command is valid for all instruments, but has only effects for instruments equipped with ATR.
Parameters
Return-Code Names and Return-Code Values
GRC_NA 27 GeoCOM Robotic license key not available
See Also
AUT_GetUserSpiral
BAP_SearchTarget
Example
AUT_SEARCH_SPIRAL SearchSpiral;
GRC_TYPE result;
SearchSpiral.dRangeHz = 0.4;
SearchSpiral.dRangeV = 0.2; result = AUT_SetUserSpiral(SearchSpiral);
Leica TPS1200 / TS30 / TM30 – Version 1.50 64
GeoCOM Reference Manual Automation - AUT
7.4.16
AUT_PS_EnableRange – enabling the PowerSearch window and PowerSearch range
AUT_PS_EnableRange..............................................................................................................................................................................................................................................................................
........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ 9048
9048 ................................................................................................................................................................................................................................................................AUT_PS_Enable
Range
C-Declaration
AUT_PS_EnableRange(BOOLE bEnable)
VB-Declaration
VB_AUT_PS_EnableRange (bEnable As Boolean)
ASCII-Request
%R1Q,9048: Enable[BOOLE]
ASCII-Response
%R1P,0,0: RC
Remarks
This command enables / disables the predefined PowerSearch window including the predefined PowerSearch range limits, set by AUT_PS_SetRange
Parameters
Return-Code Names and Return-Code Values
FALSE: Default range 0..400m
GRC_NA
See Also
AUT_PS_SetRange
AUT_SetSearchArea
Example
-
27 GeoCOM Robotic license key not available
Leica TPS1200 / TS30 / TM30 – Version 1.50 65
GeoCOM Reference Manual Automation - AUT
7.4.17
AUT_PS_SetRange – setting the PowerSearch range
AUT_PS_SetRange............................................................................................................................................................................................................................................................................
................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ 9047
9047 ................................................................................................................................................................................................................................................................AUT_PS_SetRa
nge
C-Declaration
AUT_PS_SetRange(long lMinDist, long lMaxDist)
VB-Declaration
VB_AUT_PS_SetRange (lMinDist As Long, lMaxDist As Long )
ASCII-Request
%R1Q,9047: lMinDist[long], lMaxDist[long]
ASCII-Response
%R1P,0,0: RC
Remarks
This command defines the PowerSearch distance range limits.
These additional limits (additional to the PowerSearch window) will be used once the range checking is enabled
( AUT_PS_EnableRange ).
Parameters
Minimal distance to prism (
≥
0m)
Maximal distance to prism, where
lMaxDist
Return-Code Names and Return-Code Values
GRC_OK
GRC_NA 27
GRC_IVPARAM
See Also
AUT_PS_EnableRange
AUT_PS_SearchWindow
AUT_SetSearchArea
Example
-
GeoCOM Robotic license key not available
Leica TPS1200 / TS30 / TM30 – Version 1.50 66
GeoCOM Reference Manual Automation - AUT
7.4.18
AUT_PS_SearchWindow – starting PowerSearch
AUT_PS_SearchWindow ..............................................................................................................................................................................................................................................................................
.................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... 9052
9052 ................................................................................................................................................................................................................................................................AUT_PS_Search
Window
C-Declaration
AUT_PS_SearchWindow()
VB-Declaration
VB_AUT_PS_SearchWindow()
ASCII-Request
%R1Q,9052:
ASCII-Response
%R1P,0,0: RC
Remarks
This command starts PowerSearch inside the given PowerSearch window, defined by AUT_SetSearchArea and optional by AUT_PS_SetRange
Parameters
Return-Code Names and Return-Code Values
GRC_OK
GRC_NA
GRC_AUT_NO_WORKING_AREA
GRC_AUT_NO_TARGET
See Also
AUT_PS_EnableRange
AUT_PS_SetRange
AUT_PS_SearchNext
AUT_SetSearchArea
Example
-
8720
8710
Working area not defined
No Target found
Leica TPS1200 / TS30 / TM30 – Version 1.50 67
GeoCOM Reference Manual Automation - AUT
7.4.19
AUT_PS_SearchNext – searching for the next target
AUT_PS_SearchNext.............................................................................................................................................................................................................................................................................
............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ 9051
9051 ................................................................................................................................................................................................................................................................AUT_PS_Search
Next
C-Declaration
AUT_PS_SearchNext(long lDirection, BOOLE bSwing)
VB-Declaration
VB_AUT_PS_SearchNext(lDirection As Long, bSwing As Boolean )
ASCII-Request
%R1Q,9051: lDirection[long], bSwing[BOOLE]
ASCII-Response
%R1P,0,0: RC
Remarks
This command executes the 360º default PowerSearch and searches for the next target. A previously defined
PowerSearch window (AUT_SetSearchArea) is not taken into account. Use AUT_PS_SearchWindow to do so.
Parameters
Defines the searching direction ( CLKW=1 or ACLKW=-1 ) lDirection . This setting finds targets left of the telescope direction faster
Return-Code Names and Return-Code Values
GRC_OK 0
GRC_NA
GRC_AUT_NO_TARGET
27
8710
GRC_IVPARAM
See Also
AUT_PS_EnableRange
AUT_PS_SearchWindow
Example
-
Execution successful.
GeoCOM Robotic license key not available
No Target found
Leica TPS1200 / TS30 / TM30 – Version 1.50 68
GeoCOM Reference Manual Basic Applications – BAP
8 B
ASIC
A
PPLICATIONS
– BAP
8.1
USAGE
The subsystem basic applications (BAP) contain high-level functions visible on the user interface, the instrument display and commands combining several subcommands for easy workflow.
8.2
CONSTANTS AND TYPES
Measurement Modes enum BAP_MEASURE_PRG
{
BAP_NO_MEAS = 0
BAP_NO_DIST = 1
BAP_DEF_DIST = 2
BAP_CLEAR_DIST = 5
BAP_STOP_TRK = 6
};
Distance measurement programs
// no measurements, take last one
// no dist. measurement,
// angles only
// default distance measurements,
// pre-defined using
// BAP_SetMeasPrg
// clear distances
// stop tracking
// enum BAP_USER_MEASPRG {
BAP_SINGLE_REF_STANDARD = 0, // IR Standard
BAP_SINGLE_REF_FAST = 1,
BAP_SINGLE_REF_VISIBLE = 2
// IR Fast
// LO Standard
BAP_SINGLE_RLESS_VISIBLE = 3, // RL Standard
BAP_CONT_REF_STANDARD = 4,
BAP_CONT_REF_FAST = 5,
BAP_CONT_RLESS_VISIBLE = 6,
BAP_AVG_REF_STANDARD = 7,
BAP_AVG_REF_VISIBLE = 8,
// IR Tracking
// not supported by TPS1200
// RL Fast Tracking
// IR Average
// LO Average
BAP_AVG_RLESS_VISIBLE = 9,
BAP_CONT_REF_SYNCHRO = 10,
BAP_SINGLE_REF_PRECISE = 11
};
// RL Average
// IR Synchro Tracking
// IR Precise (TS30,TM30)
Prism type definition enum BAP_PRISMTYPE
{
BAP_PRISM_ROUND = 0,
BAP_PRISM_MINI = 1,
BAP_PRISM_TAPE = 2,
BAP_PRISM_360 = 3,
BAP_PRISM_USER1 = 4,
BAP_PRISM_USER2 = 5,
BAP_PRISM_USER3 = 6,
BAP_PRISM_360_MINI = 7,
BAP_PRISM_MINI_ZERO = 8,
BAP_PRISM_USER = 9,
// Leica Circular Prism
// Leica Mini Prism
// Leica Reflector Tape
// Leica 360º Prism
// not supported by TPS1200
// not supported by TPS1200
// not supported by TPS1200
// Leica Mini 360º Prism
// Leica Mini Zero Prism
// User Defined Prism
BAP_PRISM_NDS_TAPE = 10, // Leica HDS Target
BAP_PRISM_GRZ121_ROUND = 11, // GRZ121 360º Prism for Machine Guidance
BAP_PRISM_MA_MPR122 = 12
};
// MPR122 360º Prism for Machine Guidance
Reflector type definition enum BAP_REFLTYPE
{
BAP_REFL_UNDEF = 0,
BAP_REFL_PRISM = 1,
BAP_REFL_TAPE = 2
};
Prism name length
BAP_PRISMNAME_LEN = 16;
Prism definition struct BAP_PRISMDEF
// reflector not defined
// reflector prism
// reflector tape
// prism name string
Leica TPS1200 / TS30 / TM30 – Version 1.50 69
GeoCOM Reference Manual Basic Applications – BAP
{
char szName[BAP_PRISMNAME_LEN+1];
double dAddConst; // prism correction
BAP_REFLTYPE eReflType; // reflector type
}
Target type definition enum BAP_TARGET_TYPE
{
BAP_REFL_USE = 0 // with reflector
BAP_REFL_LESS = 1 // without reflector
};
ATR low vis mode definition typedef enum
{
BAP_ATRSET_NORMAL,
BAP_ATRSET_LOWVIS_ON,
BAP_ATRSET_LOWVIS_AON,
BAP_ATRSET_SRANGE_ON,
BAP_ATRSET_SRANGE_AON,
} BAP_ATRSETTING;
On/off switch
// ATR is using no special flags or modes
// ATR low vis mode on
// ATR low vis mode always on
// ATR high reflectivity mode on
// ATR high reflectivity mode always on enum ON_OFF_TYPE // on/off switch type
{
OFF = 0,
ON = 1
};
Leica TPS1200 / TS30 / TM30 – Version 1.50 70
GeoCOM Reference Manual Basic Applications – BAP
8.3
FUNCTIONS
17022
8.3.1
BAP_GetTargetType - getting the EDM type
.......................
.................................
BAP_GetTarget Type
.................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... 17022
C-Declaration
BAP_GetTargetType ( BAP_TARGET_TYPE &eTargetType )
VB-Declaration
VB_BAP_GetTargetType(eTargetType As Long)
ASCII-Request
%R1Q,17022:
ASCII-Response
%R1Q,0,0: RC , eTargetTyp e [long]
Remarks
Gets the current EDM type for distance measurements (Reflector (IR) or Reflectorless (RL)).
Parameters eTargetType Out Actual target type
Return-Code Names and Return-Code Values
GRC_OK
See Also
BAP_SetTargetType()
BAP_SetMeasPrg()
Example
-
Leica TPS1200 / TS30 / TM30 – Version 1.50 71
GeoCOM Reference Manual Basic Applications – BAP
8.3.2
BAP_SetTargetType – setting the EDM type
BAP_SetTargetType ..............................................................................................................................................................................................................................................................................
............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ 17021
17021...............................................................................................................................................................................................................................................................BAP_SetTargetT
ype
C-Declaration
BAP_SetTargetType ( BAP_TARGET_TYPE eTargetType )
VB-Declaration
VB_BAP_SetTargetType(byVal eTargetType As Long)
ASCII-Request
%R1Q,17021: eTargetTyp e [long]
ASCII-Response
%R1P,0,0: RC
Remarks
Sets the current EDM type for distance measurements (Reflector (IR) or Reflectorless (RL)).
For each EDM type the last used EDM mode is remembered and activated if the EDM type is changed.
If EDM type IR is selected the last used Automation mode is automatically activated.
BAP_SetMeasPrg can also change the target type.
EDM type RL is not available on all instrument types.
Parameters
Return-Code Names and Return-Code Values
GRC_OK
GRC_IVPARAM 2
See Also
BAP_GetTargetType()
BAP_SetMeasPrg()
Example
-
Target type is not available
Leica TPS1200 / TS30 / TM30 – Version 1.50 72
GeoCOM Reference Manual
8.3.3
BAP_GetPrismType - getting the default prism type
BAP_GetPrismType...............................................................................................................................................................................................................................................................................
............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ 17009
17009...............................................................................................................................................................................................................................................................BAP_GetPrismT
ype
C-Declaration
BAP_GetPrismType ( BAP_PRISMTYPE &ePrismType )
VB-Declaration
VB_BAP_GetPrismType (ePrismType As Long)
ASCII-Request
%R1Q,17009:
ASCII-Response
%R1Q,0,0: RC , ePrismTyp e [long]
Remarks
Gets the current prism type.
Parameters ePrismType Out Actual prism type
Return-Code Names and Return-Code Values
GRC_OK
GRC_IVRESULT 3 RL EDM type is set – no reflector.
See Also
BAP_SetPrismType()
Example
-
Basic Applications – BAP
Leica TPS1200 / TS30 / TM30 – Version 1.50 73
GeoCOM Reference Manual Basic Applications – BAP
8.3.4
BAP_SetPrismType – setting the default prism type
BAP_SetPrismType............................................................................................................................................................................................................................................................................
................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ 17008
C-Declaration
BAP_SetPrismType ( BAP_PRISMTYPE ePrismType )
VB-Declaration
VB_BAP_SetPrismType(byVal ePrismType As Long)
ASCII-Request
%R1Q,17008: ePrismTyp e [long]
ASCII-Response
%R1P,0,0: RC
Remarks
Sets the prism type for measurements with a reflector. It overwrites the prism constant, set by
TMC_SetPrismCorr .
Parameters
Return-Code Names and Return-Code Values
GRC_OK
GRC_IVPARAM 2
See Also
BAP_GetPrismType2()
TMC_SetPrismCorr()
Example
-
Prism type is not available.
Leica TPS1200 / TS30 / TM30 – Version 1.50 74
GeoCOM Reference Manual Basic Applications – BAP
8.3.5
BAP_GetPrismType2 – getting the default or user prism type
BAP_GetPrismType2.............................................................................................................................................................................................................................................................................
............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ 17031
17031...............................................................................................................................................................................................................................................................BAP_GetPrismT
ype2
C-Declaration
BAP_GetPrismType ( BAP_PRISMTYPE &rePrismType, char *szPrismName )
VB-Declaration
VB_BAP_GetPrismType2 ( rePrismType As Long, ByVal szPrismName As String)
ASCII-Request
%R1Q,17031:
ASCII-Response
%R1Q,0,0: RC , ePrismTyp e [long], szPrismName[string]
Remarks
Gets the current prism type and name.
Parameters rePrismType Out Actual prism type szPrismName Out Actual prism name
Return-Code Names and Return-Code Values
GRC_OK
See Also
BAP_SetPrismType()
BAP_SetPrismType2()
Example
-
Leica TPS1200 / TS30 / TM30 – Version 1.50 75
GeoCOM Reference Manual Basic Applications – BAP
8.3.6
BAP_SetPrismType2 – setting the default or user prism type
BAP_SetPrismType2 .............................................................................................................................................................................................................................................................................
............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ 17030
C-Declaration
BAP_SetPrismType ( BAP_PRISMTYPE ePrismType, char* szPrismName )
VB-Declaration
VB_BAP_SetPrismType(ByVal ePrismType As Long, ByVal szPrismName As String)
ASCII-Request
%R1Q,17030: ePrismTyp e [long], szPrismName[string]
ASCII-Response
%R1P,0,0: RC
Remarks
Sets the default or user prism type for measurements with a reflector. It overwrites the prism constant, set by
TMC_SetPrismCorr . For setting a user defined prism the prism has to be defined previously
(BAP_SetUserPrismDef)
Parameters ePrismType In Prism type. szPrismName In Prism name. Required if prism type is
BAP_PRISM_USER.
Return-Code Names and Return-Code Values
GRC_OK
GRC_IVPARAM 2 Prism type is not available, i.e. a user prism is not defined
See Also
BAP_GetPrismType2()
TMC_SetPrismCorr()
Example
-
Leica TPS1200 / TS30 / TM30 – Version 1.50 76
GeoCOM Reference Manual
8.3.7
BAP_GetPrismDef – getting the default prism definition
BAP_GetPrismDef.............................................................................................................................................................................................................................................................................
................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ 17023
17023...............................................................................................................................................................................................................................................................BAP_GetPrismD
ef
C-Declaration
BAP_GetPrismDef ( BAP_PRISMTYPE ePrismType,
BAP_PRISMDEF &PrismDef)
VB-Declaration
VB_BAP_GetPrismDef(byval ePrism As Long,
ASCII-Request
PrismDef As BAP_PRISMDEF )
%R1Q,17023: ePrismTyp e [long]
ASCII-Response
%R1Q,0,0: RC , Name[String], dAddConst[double], eReflType[long]
Remarks
Get the definition of a default prism.
Parameters
Return-Code Names and Return-Code Values
GRC_OK
GRC_IVPARAM
See Also
BAP_SetUserPrismDef()
Example
-
Basic Applications – BAP
Leica TPS1200 / TS30 / TM30 – Version 1.50 77
GeoCOM Reference Manual
8.3.8
BAP_GetUserPrismDef – getting the user prism definition
BAP_GetUserPrismDef .............................................................................................................................................................................................................................................................................
........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ 17033
17033...............................................................................................................................................................................................................................................................BAP_GetUserPr
ismDef
C-Declaration
BAP_GetUserPrismDef (char *szPrismName,
double &rdAddConst,
BAP_REFLTYPE &reReflType,
char *szCreator)
VB-Declaration
VB_BAP_GetUserPrismDef(ByVal szPrismName As String,
rdAddConst As Double,
reReflType As Long,
ByVal szCreator As String)
ASCII-Request
%R1Q,17033: szPrismName[String]
ASCII-Response
%R1P,0,0: RC, rdAddConst[double], reReflType[long], szCreator[String]
Remarks
Gets definition of a defined user prism.
Parameters
Basic Applications – BAP
Return-Code Names and Return-Code Values
GRC_OK
GRC_IVPARAM
See Also
BAP_SetPrismType()
BAP_SetPrismType2()
BAP_GetPrismDef()
BAP_GetUserPrismDef()
Example
-
Leica TPS1200 / TS30 / TM30 – Version 1.50 78
GeoCOM Reference Manual
8.3.9
BAP_SetUserPrismDef – setting a user prism definition
BAP_SetUserPrismDef..............................................................................................................................................................................................................................................................................
........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ 17032
17032...............................................................................................................................................................................................................................................................BAP_SetUserPr
ismDef
C-Declaration
BAP_SetUserPrismDef (char *szPrismName,
double dAddConst,
BAP_REFLTYPE eReflType,
char *szCreator)
VB-Declaration
VB_BAP_SetUserPrismDef(ByVal szPrismName As String,
dAddConst As Double,
eReflType As Long,
ByVal szCreator As String)
ASCII-Request
%R1Q,17032: szPrismName[String],dAddConst[double],eReflType[long],szCreator[String]
ASCII-Response
%R1P,0,0: RC
Remarks
Defines a new user prism.
Parameters
Basic Applications – BAP
Return-Code Names and Return-Code Values
GRC_OK
GRC_IVPARAM
GRC_IVRESULT
See Also
BAP_SetPrismType()
BAP_GetPrismDef()
BAP_GetUserPrismDef()
Example
-
3 Prism definition is not set
Leica TPS1200 / TS30 / TM30 – Version 1.50 79
GeoCOM Reference Manual Basic Applications – BAP
8.3.10
BAP_GetMeasPrg – getting the actual distance measurement program
BAP_GetMeasPrg..............................................................................................................................................................................................................................................................................
................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ 17018
17018...............................................................................................................................................................................................................................................................BAP_GetMeasP
rg
C-Declaration
BAP_GetMeasPrg ( BAP_USER_MEASPRG &eMeasPrg )
VB-Declaration
VB_BAP_GetMeasPrg(eMeasPrg As Long)
ASCII-Request
%R1Q,17018:
ASCII-Response
%R1Q,0,0: RC , eMeasPrg[long]
Remarks
Gets the current distance measurement program.
Parameters eMeasPrg Out Actual measurement program
Return-Code Names and Return-Code Values
GRC_OK
See Also
BAP_SetMeasPrg()
Example
-
Leica TPS1200 / TS30 / TM30 – Version 1.50 80
GeoCOM Reference Manual Basic Applications – BAP
17019
8.3.11
BAP_SetMeasPrg - setting the distance measurement program
.....................
.
17019
BAP_SetMeasPr g
C-Declaration
BAP_SetMeasPrg ( BAP_USER_MEASPRG eMeasPrg )
VB-Declaration
VB_BAP_SetMeasPrg(byVal eMeasPrg As Long)
ASCII-Request
%R1Q,17019: eMeasPrg [long]
ASCII-Response
%R1P,0,0: RC
Remarks
Defines the distance measurement program i.e. for BAP_MeasDistanceAngle
RL EDM type programs are not available on all instrument types.
Changing the measurement programs may change the EDM type as well (Reflector (IR) and Reflectorless (RL))
Parameters
Return-Code Names and Return-Code Values
GRC_OK
GRC_IVPARAM 2
See Also
BAP_GetMeasPrg()
BAP_SetTargetType()
Example
-
Measurement program is not available
Leica TPS1200 / TS30 / TM30 – Version 1.50 81
GeoCOM Reference Manual Basic Applications – BAP
8.3.12
BAP_MeasDistanceAngle – measuring Hz,V angles and a single distance
BAP_MeasDistanceAngle .............................................................................................................................................................................................................................................................................
.................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... 17017
17017...............................................................................................................................................................................................................................................................BAP_MeasDista
nceAngle
C-Declaration
BAP_MeasDistanceAngle(BAP_MEASURE_PRG &DistMode,
double &dHz, double &dV,
double &dDist)
VB-Declaration
VB_BAP_MeasDistAng(DistMode As Long,
dHz As Double, dV As Double
dDist As Double)
ASCII-Request
%R1Q,17017: DistMode[long]
ASCII-Response
%R1P,0,0: RC, dHz[double], dV[double], dDist[double],DistMode[long]
Remarks
This function measures angles and a single distance depending on the mode DistMode . Note that this function is not suited for continuous measurements (LOCK mode and TRK mode). This command uses the current automation settings.
Parameters
DistMode In
DistMode dHz
Out
Out
BAP_DEF_DIST uses the predefined distance measurement program as defined in BAP_SetMeasPrg
Actual distance measurement mode
Horizontal angle [rad]x, depends on DistMode dV Out Vertical angle [rad]x, depends on DistMode dDist Out Slopedistance [m]x, depends on DistMode
Return-Code Names and Return-Code Values
BAP_MeasDistanceAngle may additionally return AUT- and TMC-return codes.
GRC_OK
GRC_AUT_ANGLE_ERROR
GRC_AUT_BAD_ENVIRONMENT
GRC_AUT_CALACC
GRC_AUT_DETECTOR_ERROR
GRC_AUT_DEV_ERROR
8706
8712
8713
8709
8708
Angle measurement error
Bad Environment conditions
Error in target acquisition
Deviation measurement error
Position not exactly reached GRC_AUT_INCACC
GRC_AUT_MOTOR_ERROR
GRC_AUT_MULTIPLE_TARGETS
GRC_AUT_NO_TARGET
GRC_AUT_TIMEOUT
TMC_ACCURACY_GUARANTEE
TMC_ANGLE_ACCURACY_
GUARANTEE
TMC_ANGLE_ERROR
TMC_ANGLE_NO_FULL_
CORRECTION
TMC_ANGLE_OK
TMC_BUSY
TMC_DIST_ERROR
TMC_DIST_PPM
TMC_NO_FULL_CORRECTION
TMC_SIGNAL_ERROR
8711
8710
8704
1284
1289
1290
1288
1285
1293
1292
1291
1294
Multiple targets detected
No target detected
Position not reached
Info, accuracy cannot be guaranteed
Info, only angle measurement valid, accuracy cannot be guaranteed
Error, no valid angle measurement
Warning, only angle measurement valid, accuracy cannot be guaranteed
Warning, only angle measurement valid
Error, TMC submodule already in use by another subsystem, command not processed
An error occurred during distance measurement.
Error, wrong setting of PPM
Error, no signal on EDM (only in signal mode)
Leica TPS1200 / TS30 / TM30 – Version 1.50 82
GeoCOM Reference Manual Basic Applications – BAP
GRC_ABORT
GRC_COM_TIMEDOUT
GRC_IVPARAM
GRC_SHUT_DOWN
8
3077
2
12
Error, measurement aborted
Error, communication timeout. (possibly increase COM timeout , see COM_SetTimeout )
Error, invalid DistMode
Error, system stopped
See Also
-
Example void MyMeasurement(BAP_MEASURE_PRG DistMode)
{
GRC_TYPE Result;
BAP_MEASURE_PRG DistMode;
double dHz, dV, dDist;
DistMode = BAP_DEF_DIST
Result = BAP_MeasDistanceAngle(DistMode,
dHz, dV, dDist);
if (rc != GRC_OK)
{ // error-handling
switch (rc)
{
case GRC_IVPARAM:
printf("Wrong value for DistMode!");
break;
case GRC_ABORT:
printf("Measurement aborted!");
break;
case GRC_SHUT_DOWN:
printf("System has been stopped!");
break;
case GRC_TMC_DIST_PPM:
printf("PPM or MM should be switched off");
printf(" when EDM is on -> no results!“);
break;
case GRC_TMC_DIST_ERROR:
printf("Error occured during");
printf(" distance measurement!");
break;
case GRC_TMC_ANGLE_ERROR:
printf("Error occured while slope");
printf(" was measured!");
break;
case GRC_TMC_BUSY:
printf("TMC is busy!");
break;
case GRC_TMC_ANGLE_OK:
printf("Angle without coordinates!")
break;
} // end of switch (rc)
} // end of error handling
else
{ // use results
printf("horizontal angel [rad]: %d\n", dHz);
printf("vertical angel [rad] : %d\n", dV);
printf("slopedistance [rad] : %d\n", dDist);
}
} //end of MyMeasurement
Leica TPS1200 / TS30 / TM30 – Version 1.50 83
GeoCOM Reference Manual Basic Applications – BAP
8.3.13
BAP_SearchTarget - searching the target
BAP_SearchTarget.............................................................................................................................................................................................................................................................................
................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ 17020
17020...............................................................................................................................................................................................................................................................BAP_SearchTar
get
C-Declaration
BAP_SearchTarget(BOOLE bDummy)
VB-Declaration
VB_BAP_SearchTarget(bDummy As Boolean)
ASCII-Request
%R1Q,17020: 0
ASCII-Respo
%R1P,0,0: RC
Remarks
This function searches for a target in the configured or defined ATR SearchWindow. The functionality is only available for automated instruments.
Parameters bDummy In It’s reserved for future use, set bDummy always to FALSE
Return-Code Names and Return-Code Values
GRC_OK
GRC_AUT_BAD_ENVIRONMENT
GRC_AUT_DEV_ERROR
GRC_AUT_ACCURACY
GRC_AUT_MOTOR_ERROR
8712
8709
8716
Bad Environment conditions
Deviation measurement error
Position not exactly reached
GRC_AUT_MULTIPLE_TARGETS
GRC_AUT_NO_TARGET
GRC_AUT_TIMEOUT
GRC_ABORT
GRC_FATAL
8711
8710
8704
8
Multiple targets detected
No target detected
Time out, no target found
Error, searching aborted
See Also
AUT_GetUserSpiral
AUT_SetUserSpiral
BAP_ATRSetting (lowvis)
BAP_GetATRSetting
BAP_SetATRSetting
BAP_GetRedATRFov
BAP_SetRedATRFov
Leica TPS1200 / TS30 / TM30 – Version 1.50 84
GeoCOM Reference Manual Basic Applications – BAP
8.3.14
BAP_GetATRSetting – getting the current ATR low vis mode
BAP_GetPrismType2.............................................................................................................................................................................................................................................................................
............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ 17031
17031...............................................................................................................................................................................................................................................................BAP_GetPrismT
ype2
C-Declaration
BAP_GetATRSetting(BAP_ATRSETTING &reATRSetting)
VB-Declaration
VB_BAP_GetATRSetting(reATRSetting As Long)
ASCII-Request
%R1Q,17034:
ASCII-Response
%R1Q,0,0: RC , reATRSetting[long]
Remarks
Gets the current low vis mode.
Parameters
ATR is using no special flags/modes
BAP_LOWVIS_ON:
ATR low vis mode on
BAP_LOWVIS_ALWAYSON:
ATR low vis mode always on
BAP_LOWVIS_BOBBYON:
ATR high reflectivity mode on
BAP_LOWVIS_BOBBYALWAYSON:
ATR high reflectivity mode always on
Return-Code Names and Return-Code Values
GRC_OK
See Also
BAP_SetATRSetting()
Example
-
Leica TPS1200 / TS30 / TM30 – Version 1.50 85
GeoCOM Reference Manual
8.3.15
BAP_SetATRSetting – setting the current ATR low vis mode
BAP_GetPrismType2.............................................................................................................................................................................................................................................................................
............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ 17031
17031...............................................................................................................................................................................................................................................................BAP_GetPrismT
ype2
C-Declaration
BAP_SetATRSetting(BAP_ATRSETTING eATRSetting)
VB-Declaration
VB_ BAP_SetATRSetting(ByVal eATRSetting As Long)
ASCII-Request
%R1Q,17035: eATRSetting[long]
ASCII-Response
%R1Q,0,0: RC
Remarks
Sets the current low vis mode.
Parameters
ATR low vis mode
Return-Code Names and Return-Code Values
GRC_OK
See Also
BAP_GetATRSetting()
Example
-
Basic Applications – BAP
Leica TPS1200 / TS30 / TM30 – Version 1.50 86
GeoCOM Reference Manual Basic Applications – BAP
8.3.16
BAP_GetRedATRFov – getting the reduced ATR field of view
BAP_GetPrismType2.............................................................................................................................................................................................................................................................................
............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ 17031
17031...............................................................................................................................................................................................................................................................BAP_GetPrismT
ype2
C-Declaration
BAP_GetRedATRFov(ON_OFF_TYPE &reRedFov)
VB-Declaration
VB_BAP_GetRedATRFov(reRedFov As Long)
ASCII-Request
%R1Q,17036:
ASCII-Response
%R1Q,0,0: RC , reRedFov[long]
Remarks
Get reduced ATR field of view mode.
Parameters
ATR uses reduced field of view (about 1/9)
OFF:
ATR uses full field of view
Return-Code Names and Return-Code Values
GRC_OK
See Also
BAP_SetRedATRFov()
Example
-
Leica TPS1200 / TS30 / TM30 – Version 1.50 87
GeoCOM Reference Manual Basic Applications – BAP
8.3.17
BAP_SetRedATRFov – setting the reduced ATR field of view
BAP_GetPrismType2.............................................................................................................................................................................................................................................................................
............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ 17031
17031...............................................................................................................................................................................................................................................................BAP_GetPrismT
ype2
C-Declaration
BAP_SetRedATRFov(ON_OFF_TYPE eRedFov)
VB-Declaration
VB_BAP_SetRedATRFov(ByVal eRedFov As Long)
ASCII-Request
%R1Q,17037: eRedFov[long]
ASCII-Response
%R1Q,0,0: RC
Remarks
Set reduced ATR field of view mode.
Parameters
ATR uses reduced field of view (about 1/9)
OFF:
ATR uses full field of view
Return-Code Names and Return-Code Values
GRC_OK
See Also
BAP_GetRedATRFov()
Example
-
Leica TPS1200 / TS30 / TM30 – Version 1.50 88
GeoCOM Reference Manual Basic Man Machine Interface – BMM
9 B
ASIC
M
AN
M
ACHINE
I
NTERFACE
– BMM
9.1
USAGE
The subsystem BMM (Basic Man Machine Interface) implements the low-level functions for the MMI. These are also functions, which are relevant for controlling the display, keyboard, character sets and the beeper (signalling device). In
GeoCOM only the beep control functions are supported. The description of the IOS beep control functions is also in this chapter, because there is a very close relationship to the BMM functions.
9.2
CONSTANTS AND TYPES
Constants for the signal-device const short IOS_BEEP_STDINTENS = 100;
// standard intensity of beep expressed as
//a percentage
Leica TPS1200 / TS30 / TM30 – Version 1.50 89
GeoCOM Reference Manual Basic Man Machine Interface – BMM
9.3
FUNCTIONS
9.3.1
BMM_BeepAlarm - outputing an alarm signal (triple beep)
BMM_BeepAlarm.........................................................................................................................................................................................................................................................
.....................
................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ 11004
11004...............................................................................................................................................................................................................................................................BMM_BeepAlar
m
C-Declaration
BMM_BeepAlarm(void)
VB-Declaration
VB_BMM_BeepAlarm()
ASCII-Request
%R1Q,11004:
ASCII-Response
%R1P,0,0: RC
Remarks
This function produces a triple beep with the configured intensity and frequency, which cannot be changed. If there is a continuous signal active, it will be stopped before.
Parameters
Return-Code Names and Return-Code Values
GRC_OK
See Also
BMM_BeepNormal
IOS_BeepOn
IOS_BeepOff
Leica TPS1200 / TS30 / TM30 – Version 1.50 90
GeoCOM Reference Manual Basic Man Machine Interface – BMM
9.3.2
BMM_BeepNormal - outputing an alarm signal (single beep)
BMM_BeepNormal............................................................................................................................................................................................................................................................................
................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ 11003
11003...............................................................................................................................................................................................................................................................BMM_BeepNor
mal
C-Declaration
BMM_BeepNormal(void)
VB-Declaration
VB_BMM_BeepNormal()
ASCII-Request
%R1Q,11003:
ASCII-Response
%R1P,0,0: RC
Remarks
This function produces a single beep with the configured intensity and frequency, which cannot be changed. If a continuous signal is active, it will be stopped first.
Parameters
Return-Code Names and Return-Code Values
GRC_OK
See Also
BMM_BeepAlarm
IOS_BeepOn
IOS_BeepOff
Leica TPS1200 / TS30 / TM30 – Version 1.50 91
GeoCOM Reference Manual Basic Man Machine Interface – BMM
9.3.3
IOS_BeepOn - starting a continuous beep signal
IOS_BeepOn....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... 20001
20001...............................................................................................................................................................................................................................................................IOS_BeepOn
C-Declaration
IOS_BeepOn(short nIntens = IOS_BEEP_STDINTENS)
VB-Declaration
VB_IOS_BeepOn(ByVal nIntens As Integer)
ASCII-Request
%R1Q,20001: nIntens[short]
ASCII-Response
%R1P,0,0: RC
Remarks
This function switches on the beep-signal with the intensity nIntens . If a continuous signal is active, it will be stopped first. Turn off the beeping device with IOS_BeepOff .
Parameters percentage (0-100 %).
Return-Code Names and Return-Code Values
GRC_OK
See Also
IOS_BeepOff
BMM_BeepAlarm
BMM_BeepNormal
Example
IOS_BeepOn(IOS_BEEP_STDINTENS)
// wait for a second
IOS_BeepOff();
Leica TPS1200 / TS30 / TM30 – Version 1.50 92
GeoCOM Reference Manual
9.3.4
IOS_BeepOff – stopping an active beep signal
IOS_BeepOff...................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... 20000
20000...............................................................................................................................................................................................................................................................IOS_BeepOff
C-Declaration
IOS_BeepOff(void)
VB-Declaration
VB_IOS_BeepOff()
ASCII-Request
%R1Q,20000:
ASCII-Response
%R1P,0,0: RC
Remarks
This function switches off the beep-signal.
Parameters
Return-Code Names and Return-Code Values
GRC_OK
See Also
IOS_BeepOn
BMM_BeepAlarm
BMM_BeepNormal
Example see IOS_BeepOn
Basic Man Machine Interface – BMM
Leica TPS1200 / TS30 / TM30 – Version 1.50 93
GeoCOM Reference Manual Communications – COM
10 C
OMMUNICATIONS
– COM
10.1
USAGE
This subsystem contains those functions, which are subsystem COM related, but will be executed as RPC’s on the
TPS1200 instrument. It provides a function to check communication between the computer and the TPS1200 and also some functions to get and set communication relevant parameters on the server side. Furthermore, it implements functions to switch on or off (sleep mode, shut down) the TPS1200 instrument.
10.2
CONSTANTS AND TYPES
Stop Mode enum COM_TPS_STOP_MODE
{
COM_TPS_STOP_SHUT_DOWN =0, // power down instrument
COM_TPS_STOP_SLEEP =1 // not supported by TPS1200
};
Start Mode enum COM_TPS_STARTUP_MODE
{
COM_TPS_STARTUP_LOCAL =0 // not supported by TPS1200
COM_TPS_STARTUP_REMOTE=1 // RPC’s enabled, online mode
};
Leica TPS1200 – Version 1.50 94
GeoCOM Reference Manual Communications – COM
10.3
FUNCTIONS
10.3.1
COM_GetSWVersion - retrieving server instrument version
COM_GetSWVersion...................................................................................................................................................................................................................................................
.........................
............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ 110
110 .................................................................................................................................................................................................................................................................COM_GetSWVe
rsion
C-Declaration
VB-Declaration short &nVer, short &nSubVer )
VB_COM_GetSWVersion( nRel As Integer,
nVer Integer, nSubVer As Integer)
ASCII-Request
%R1Q,110:
ASCII-Response
%R1P,0,0: RC, nRel[short], nVer[short], nSubVer[short]
Remarks
This function displays the current GeoCOM release (release, version and subversion) of the instrument.
Parameters
Return-Code Names and Return-Code Values
GRC_OK
See Also
CSV_GetSWVersion
Example
GRC_TYPE rc; short nRel, nSubVer, nVer;
COM_GetSWVersion(nRel, nVer, nSubVer); printf(„TPS1200 GeoCOM Release:\n“); printf(„Release %02d\n“, nRel); printf(„Version %02d\n“, nVer); printf(„Subversion %02d\n“, nSubVer);
Leica TPS1200 – Version 1.50 95
GeoCOM Reference Manual Communications – COM
10.3.2
COM_SwitchOnTPS - turning on the instrument
COM_SwitchOnTPS ..............................................................................................................................................................................................................................................................................
............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ 111
111 .................................................................................................................................................................................................................................................................COM_SwitchOn
TPS
C-Declaration
COM_SwitchOnTPS(COM_TPS_STARTUP_MODE eOnMode)
VB-Declaration
VB_COM_SwitchOnTPS(ByVal eOnMode As Long)
ASCII-Request
%R1Q,111: eOnMode[short]
ASCII-Response
If instrument is already switched on then
%R1P,0,0:5 else
Nothing
Remarks
This function switches on the TPS1200 instrument.
Note: The TPS1200 instrument can be switched on by any RPC command or even by sending a single character.
Parameters
Return-Code Names and Return-Code Values
GRC_OK
GRC_NotImpl 5 Not implemented yet.
See Also
COM_SwitchOffTPS
COM_OpenConnection
Example
GRC_TYPE rc;
// switch on TPS1200 rc = COM_SwitchOnTPS(COM_TPS_REMOTE); if(rc == GRC_COM_TIMEDOUT)
{
for(short i = 0; i < 4 && rc != GRC_OK; i++)
{
rc = COM_SwitchOnTPS(COM_TPS_REMOTE);
}
} if(rc != RC_OK)
{
// error: switch on failed
}
Leica TPS1200 – Version 1.50 96
GeoCOM Reference Manual
10.3.3
COM_SwitchOffTPS turning off the instrument
COM_SwitchOffTPS .............................................................................................................................................................................................................................................................................
............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ 112
112 .................................................................................................................................................................................................................................................................COM_Switch
OffTPS
C Declaration
COM_SwitchOffTPS(COM_TPS_STOP_MODE eOffMode)
VB Declaration
VB_COM_SwitchOffTPS(ByVal eOffMode As Long)
ASCII Request
%R1Q,112: eOffMode[short]
ASCII Response
%R1P,0,0: RC
Remarks
This function switches off the TPS1200 instrument.
Parameters
Return-Code Names and Return-Code Values
GRC_OK
See Also
COM_SwitchOnTPS
Example
-
Communications – COM
Leica TPS1200 – Version 1.50 97
GeoCOM Reference Manual Communications – COM
10.3.4
COM_NullProc - checking the communication
COM_NullProc................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... 0
0 ...................................................................................................................................................................................................................................................................COM_NullProc
C-Declaration
COM_NullProc(void)
VB-Declaration
VB_COM_NullProc()
ASCII-Request
%R1Q,0:
ASCII-Response
%R1P,0,0: RC
Remarks
This function does not provide any functionality except of checking if the communication is up and running.
Parameters
Return-Code Names and Return-Code Values
GRC_OK
See Also
-
Example
-
Leica TPS1200 – Version 1.50 98
GeoCOM Reference Manual Communications – COM
10.3.5
COM_GetBinaryAvailable - getting the binary attribute of the server
COM_GetBinaryAvailable ............................................................................................................................................................................................................................................................................
.................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... 113
113 .................................................................................................................................................................................................................................................................COM_GetBinary
Available
C-Declaration
COM_GetBinaryAvailable(BOOLE &bAvailable)
VB-Declaration
VB_COM_GetBinaryAvailable(bAvailable As Long)
ASCII-Request
%R1Q,113:
ASCII-Response
%R1P,0,0: RC, bAvailable[Boolean]
Remarks
This function gets the ability information about the server to handle binary communication. The client may make requests in binary format which speeds up the communication by about 40-50%.
Parameters
: binary operation enabled.
FALSE : ASCII operation enabled.
Return-Code Names and Return-Code Values
GRC_OK
See Also
COM_SetBinaryAvailable
COM_SetFormat
COM_GetFormat
Leica TPS1200 – Version 1.50 99
GeoCOM Reference Manual Communications – COM
10.3.6
COM_SetBinaryAvailable - setting the binary attribute of the server
COM_SetBinaryAvailable.............................................................................................................................................................................................................................................................................
.................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... 114
114 .................................................................................................................................................................................................................................................................COM_SetBinary
Available
C-Declaration
COM_SetBinaryAvailable(BOOLE bAvailable)
VB-Declaration
VB_COM_SetBinaryAvailable(ByVal bAvailable As Long)
ASCII-Request
%R1Q,114: bAvailable[Boolean]
ASCII-Response
%R1P,0,0: RC
Remarks
This function sets the ability of the server to handle binary communication. With this function, one can force to communicate in ASCII only. During initialisation, the client checks if binary communication is enabled / possible or not which depends on this flag.
Parameters
: enable binary operation.
FALSE : enable ASCII operation only.
Return-Code Names and Return-Code Values
GRC_OK
See Also
COM_GetBinaryAvailable
COM_SetFormat
Example
-
Leica TPS1200 – Version 1.50 100
GeoCOM Reference Manual Central Services – CSV
11 C
ENTRAL
S
ERVICES
– CSV
11.1
INTRODUCTION
The subsystem Central Services implements some centralised functions to maintain global data of the TPS system software. Examples are date and time or the instrument’s name.
11.2
USAGE
These functions do not depend on other subsystems. Since this part is responsible for global data, any function can be called at any time.
11.3
CONSTANTS AND TYPES
TPS Device Configuration Type struct TPS_DEVICE
{
TPS_DEVICE_CLASS Class; // device precision class
TPS_DEVICE_TYPE Type; // device configuration type
};
TPS Device Precision Class enum TPS_DEVICE_CLASS
{
TPS_CLASS_1100 = 0,
TPS_CLASS_1700 = 1,
TPS_CLASS_1800 = 2,
TPS_CLASS_5000 = 3,
TPS_CLASS_6000 = 4,
TPS_CLASS_1500 = 5,
TPS_CLASS_2003 = 6,
TPS_CLASS_5005 = 7,
// TPS1000 family member,
// 1 mgon, 3"
// TPS1000 family member,
// 0.5 mgon, 1.5"
// TPS1000 family member,
// 0.3 mgon, 1"
// TPS2000 family member
// TPS2000 family member
// TPS1000 family member
// TPS2000 family member
// TPS5000 family member
TPS_CLASS_5100 = 8, // TPS5000 family member
TPS_CLASS_1102 = 100, // TPS1100 family member, 2"
TPS_CLASS_1103 = 101, // TPS1100 family member, 3"
TPS_CLASS_1105 = 102
TPS_CLASS_1101 = 103
// TPS1100 family member, 5"
// TPS1100 family member, 1"
TPS_CLASS_1202 = 200, // TPS1200 family member, 2"
TPS_CLASS_1203 = 201, // TPS1200 family member, 3"
TPS_CLASS_1205 = 202 // TPS1200 family member, 5"
TPS_CLASS_1201 = 203 // TPS1200 family member, 1"
TPS_CLASS_Tx30 = 300, // TS30,TM30 family member, 0.5"
TPS_CLASS_Tx31 = 301, // TS30,TM30 family member, 1"
};
TPS Device Configuration Type enum TPS_DEVICE_TYPE
{
// TPS1x00 common
TPS_DEVICE_T = 0x00000, // Theodolite without built-in EDM
TPS_DEVICE_MOT = 0x00004, // Motorized device
TPS_DEVICE_ATR = 0x00008, // Automatic Target Recognition
TPS_DEVICE_EGL = 0x00010, // Electronic Guide Light
TPS_DEVICE_DB = 0x00020, // reserved (Database, not GSI)
TPS_DEVICE_DL = 0x00040, // Diode laser
TPS_DEVICE_LP = 0x00080, // Laser plumbed
// TPS1000 specific
TPS_DEVICE_TC1 = 0x00001, // tachymeter (TCW1)
TPS_DEVICE_TC2 = 0x00002, // tachymeter (TCW2)
// TPS1100/TPS1200 specific
TPS_DEVICE_TC = 0x00001, // tachymeter (TCW3)
Leica TPS1200 – Version 1.50 101
GeoCOM Reference Manual Central Services – CSV
TPS_DEVICE_TCR = 0x00002, // tachymeter (TCW3 with red laser)
TPS_DEVICE_ATC = 0x00100, // Autocollimation lamp (used only PMU)
TPS_DEVICE_LPNT = 0x00200, // Laserpointer
TPS_DEVICE_RL_EXT = 0x00400, // Reflectorless EDM with extended range
// (Pinpoint R100,R300)
TPS_DEVICE_PS = 0x00800, // Power Search
// TPSSim specific
TPS_DEVICE_SIM = 0x04000 // runs on Simulation, no Hardware
};
Reflectorless Class enum TPS_REFLESS_CLASS
{
TPS_REFLESS_NONE = 0,
TPS_REFLESS_R100 = 1, // Pinpoint R100
TPS_REFLESS_R300 = 2, // Pinpoint R300
} TPS_REFLESS_R400 = 3, // Pinpoint R400
TPS_REFLESS_R1000 = 4, // Pinpoint R1000
General Date and Time struct DATIME {
DATE_TYPE Date;
TIME_TYPE Time;
};
General Date struct DATE_TYPE {
short Year;
BYTE Month;
BYTE Day;
};
General Time
// year
// month in year 1..12
// day in month 1..31 struct TIME_TYPE {
BYTE Hour;
BYTE Minute;
BYTE Second;
};
Power sources
// 24 hour per day 0..23
// minute 0..59
// seconds 0..59 struct CSV_POWER_PATH{
CSV_EXTERNAL_POWER = 1, // power source is external
CSV_INTERNAL_POWER = 2 // power source is the
// internal battery
};
Leica TPS1200 – Version 1.50 102
GeoCOM Reference Manual Central Services – CSV
11.4
FUNCTIONS
11.4.1
CSV_GetInstrumentNo – getting the factory defined instrument number
CSV_GetInstrumentNo..............................................................................................................................................................................................................................................................
................
5003 ................................................................................................................................................................................................................................................................CSV_GetInstrum
entNo
........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ 5003
C-Declaration
CSV_GetInstrumentNo(long &SerialNo)
VB-Declaration
VB_CSV_GetInstrumentNo(SerialNo As Long)
ASCII-Request
%R1Q,5003:
ASCII-Response
%R1P,0,0: RC, SerialNo[long]
Remarks
Gets the factory defined serial number of the instrument.
Parameters
SerialNo Out The serial number.
Return-Code Names and Return-Code Values
GRC_OK
Example
GRC_TYPE rc; long SerialNo; rc = CSV_GetInstrumentNo(SerialNo); if (rc == GRC_OK)
{
}
// use SerialNo else
{
}
// instrument number not yet set
Leica TPS1200 – Version 1.50 103
GeoCOM Reference Manual Central Services – CSV
11.4.2
CSV_GetInstrumentName – getting the Leica specific instrument name
CSV_GetInstrumentName.............................................................................................................................................................................................................................................................................
.................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... 5004
5004 ................................................................................................................................................................................................................................................................CSV_GetInstrum
entName
C-Declaration
CSV_GetInstrumentName(char *Name)
VB-Declaration
VB_CSV_GetInstrumentName(Name As String)
ASCII-Request
%R1Q,5004:
ASCII-Response
%R1P,0,0: RC,Name[string]
Remarks
Gets the instrument name, for example: TS30 0,5”
Parameters
Name Out The instrument name
Return-Code Names and Return-Code Values
GRC_OK
Example
GRC_TYPE rc; rc = CSV_GetInstrumentName(szName); if (rc == GRC_OK)
{
// use instrument name
} else
{
// instrument name not set yet
// (incomplete calibration data)
}
Leica TPS1200 – Version 1.50 104
GeoCOM Reference Manual Central Services – CSV
11.4.3
CSV_GetDeviceConfig – getting the instrument configuration
CSV_GetDeviceConfig..............................................................................................................................................................................................................................................................................
........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ 5035
5035 ................................................................................................................................................................................................................................................................CSV_GetDevice
Config
C-Declaration
CSV_GetDeviceConfig(TPS_DEVICE &Device);
VB-Declaration
VB_CSV_GetDeviceConfig(Device As TPS_DEVICE)
ASCII-Request
%R1Q,5035:
ASCII-Response
%R1P,0,0: RC, DevicePrecisionClass[long],
DeviceConfigurationType[long]
Remarks
This function returns information about the class and the configuration type of the instrument.
Parameters
Device Out System information (see data type description for further information).
Return-Code Names and Return-Code Values
GRC_OK
Example
GRC_TYPE rc;
TPS_DEVICE Device; rc = CSV_GetDeviceConfig(Device); if (rc == GRC_OK)
{
// Use system information
} else
{
// Intrument precision class undefined
// (incomplete calibration data)
}
Leica TPS1200 – Version 1.50 105
GeoCOM Reference Manual Central Services – CSV
11.4.4
CSV_GetReflectorlessClass – getting the RL type
CSV_ GetReflectorlessClass ..............................................................................................................................................................................................................................................................................
............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... 5100
5100 ................................................................................................................................................................................................................................................................CSV_ GetReflec torlessClass
C-Declaration
CSV_GetReflectorlessClass (TPS_REFLESS_CLASS &reRefLessClass);
VB-Declaration
VB_CSV_GetReflectorlessClass(reRefLessClass As TPS_REFLESS_CLASS)
ASCII-Request
%R1Q,5100:
ASCII-Response
%R1P,0,0: RC,reRefLessClass[long]
Remarks
This function returns information about the reflectorless and long range distance measurement (RL) of the instrument.
Parameters reRefLessClass
Return-Code Names and Return-Code Values
GRC_OK
Example
GRC_TYPE rc;
TPS_REFLESS_CLASS Device; rc = CSV_GetReflectorlessClass(reRefLessClass); if (rc == GRC_OK)
{
// Use RL type
} else
{
// Unknown RL type
}
Leica TPS1200 – Version 1.50 106
GeoCOM Reference Manual Central Services – CSV
11.4.5
CSV_GetDateTime – getting the date and time.
CSV_GetDateTime.............................................................................................................................................................................................................................................................................
................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ 5008
5008 ................................................................................................................................................................................................................................................................CSV_GetDateTi
me
C-Declaration
CSV_GetDateTime(DATIME &DateAndTime)
VB-Declaration
VB_CSV_GetDateTime (DateAndTime As DATIME)
ASCII-Request
%R1Q,5008:
ASCII-Response
%R1P,0,0: RC,Year[short],Month,Day,Hour,Minute,Second[all byte]
Remarks
Gets the current date and time of the instrument. The ASCII response is formatted corresponding to the data type
DATIME . A possible response can look like this : %R1P,0,0:0,1996,'07', '19','10','13','2f' (see chapter ASCII data type declaration for further information)
Parameters
DateAndTime Out Encoded date and time.
Return-Code Names and Return-Code Values
GRC_OK
See Also
CSV_SetDateTime
CSV_GetDateTimeCentiSec
Example
GRC_TYPE rc;
DATIME DateAndTime; rc = CSV_GetDateTime(DateAndTime); if (rc == GRC_OK)
{
// use Date and time
} else
{
// time and/or date is not set (yet)
// use CSV_SetDateTime to set date and time
// (March 25 1997, 10:20)
DateAndTime.Date.Year = 1997;
DateAndTime.Date.Month = 3;
DateAndTime.Date.Day = 25;
DateAndTime.Time.Hour = 10;
DateAndTime.Time.Minute = 20;
DateAndTime.Time.Second = 0;
rc = CSV_SetDateTime(DateAndTime);
}
Leica TPS1200 – Version 1.50 107
GeoCOM Reference Manual
11.4.6
CSV_SetDateTime – setting the date and time
CSV_SetDateTime .............................................................................................................................................................................................................................................................................
................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ 5007
5007 ................................................................................................................................................................................................................................................................CSV_SetDateTim
e
C-Declaration
CSV_SetDateTime(DATIME DateAndTime)
VB-Declaration
VB_CSV_SetDateTime(ByVal DateAndTime As DATIME)
ASCII-Request
%R1Q,5007: Year[short],Month,Day,Hour,Minute,Second[all byte]
ASCII-Response
%R1P,0,0: RC
Remarks
Sets the current date and time of the instrument.
Parameters
DateAndTime In Encoded date and time.
Return-Code Names and Return-Code Values
GRC_OK
See Also
CSV_GetDateTime
Example
See CSV_GetDateTime .
Central Services – CSV
Leica TPS1200 – Version 1.50 108
GeoCOM Reference Manual
11.4.7
CSV_GetSWVersion – getting the software version
CSV_GetSWVersion..............................................................................................................................................................................................................................................................................
............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ 5034
5034 ................................................................................................................................................................................................................................................................CSV_GetSWVe
rsion
C-Declaration
CSV_GetSWVersion2(short &nRelease, short &nVersion,
short &nSubVersion)
VB-Declaration
VB_CSV_GetSWVersion2(nRelease As Integer,
nVersion As Integer,
nSubVersion As Integer)
ASCII-Request
%R1Q,5034:
ASCII-Response
%R1P,0,0: RC,nRelease,nVersion,nSubVersion[all short]
Remarks
Returns the system software version.
Parameters nRelease nVersion
Out Release
Out Version nSubVersion
Return-Code Names and Return-Code Values
GRC_OK
Example
GRC_TYPE rc; short nRel, nVers, nSubVers; char szBuffer[17] rc = CSV_GetSWVersion(nRel, nVers, nSubVers) sprintf(szBuffer, "Version %02d.%02d.%02d",
nRel, nVers, nSubVers);
Returns: nRel = 2, nVers = 20, nSubVers = 0 szBuffer = “Version 02.20.00”
Central Services – CSV
Leica TPS1200 – Version 1.50 109
GeoCOM Reference Manual Central Services – CSV
11.4.8
CSV_CheckPower – checking the available power
CSV_CheckPower..............................................................................................................................................................................................................................................................................
................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ 5039
5039 ................................................................................................................................................................................................................................................................CSV_CheckPow
er
C-Declaration
CSV_CheckPower( unsigned short &unCapacity,
CSV_POWER_PATH &eActivePower,
CSV_POWER_PATH &ePowerSuggest)
VB-Declaration
VB_CSV_CheckPower( unCapacity As integer,
eActivePower As long,
ePowerSuggest As long)
ASCII-Request
%R1Q,5039:
ASCII-Response
%R1P,0,0: RC, unCapacity [long], eActivePower[long], ePowerSuggest[long]
Remarks
This command returns the capacity of the current power source and its source (internal or external).
Parameters unCapacity Out Actual capacity [%] eActivePower ePowerSuggest
Return-Code Names and Return-Code Values
GRC_OK
GRC_LOW_POWER
GRC_BATT_EMPTY
16
18
Power is low. Time remaining is about 30’.
Battery is nearly empty. Time remaining is about 1’.
Example
GRC_TYPE rc;
CSV_POWER_PATH eActivePower;
CSV_POWER_PATH eDummy; unsigned short unCapacity; rc = CSV_CheckPower(unCapacity, eActivePower,
eDummy)
Leica TPS1200 – Version 1.50 110
GeoCOM Reference Manual Central Services – CSV
11.4.9
CSV_GetIntTemp – getting the temperature
CSV_GetIntTemp...............................................................................................................................................................................................................................................................................
................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ 5011
5011 ................................................................................................................................................................................................................................................................CSV_GetIntTem
p
C-Declaration
CSV_GetIntTemp(double &Temp)
VB-Declaration
VB_CSV_GetIntTemp(Temp As double)
ASCII-Request
%R1Q,5011:
ASCII-Response
%R1P,0,0: RC,Temp[long]
Remarks
Get the internal temperature of the instrument, measured on the Mainboard side. Values are reported in degrees
Celsius.
Parameters
Temp Out
Instrument temperature [
°
C].
Return-Code Names and Return-Code Values
GRC_OK
Example
GRC_TYPE rc; double Temp; rc = CSV_GetIntTemp(Temp);
// use temperature information
Leica TPS1200 – Version 1.50 111
GeoCOM Reference Manual Central Services – CSV
11.4.10
CSV_GetDateTimeCentiSec – getting the date and time.
CSV_GetDateTime.............................................................................................................................................................................................................................................................................
................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ 5008
5008 ................................................................................................................................................................................................................................................................CSV_GetDateTi
me
C-Declaration
CSV_GetDateTimeCentiSec(short &nYear, short &nMonth, short &nDay,
short &nHour, short &nMinute, short &nSecond,
short &nCentiSec);
VB-Declaration
VB_CSV_GetDateTimeCentiSec(nYear As Integer, nMonth As Integer,
nDay As Integer, nHour As Integer,
nMinute As Integer, nSecond As Integer,
nCentiSec As Integer )
ASCII-Request
%R1Q,5117:
ASCII-Response
%R1P,0,0: RC,Year,Month,Day,Hour,Minute,Second,CentiSecond[all short]
Remarks
Gets the current date and time of the instrument.
Parameters nYear nMonth nDay
Out year
Out month
Out day nHour nMinute nSecond
Out hour
Out minute
Out second nCentiSec
Return-Code Names and Return-Code Values
GRC_OK
See Also
CSV_SetDateTime
CSV_GetDateTime
Example
See CSV_GetDateTime .
Leica TPS1200 – Version 1.50 112
GeoCOM Reference Manual Electronic Distance Measurement – EDM
12 E
LECTRONIC
D
ISTANCE
M
EASUREMENT
– EDM
12.1
INTRODUCTION
The subsystem electronic distance measurement (EDM) is the connection to the integrated distance measurement devices in the total station.
With the functionality of EDM one can switch on or off the Laserpointer and the Electronic Guide Light respectively.
Additionally, it is possible to change the brightness using EDM_SetEGLIntensity .
12.2
USAGE
In order to use the functions concerning the Laserpointer and the Electronic Guide Light, make sure these devices are available. If not, these functions return error messages.
12.3
CONSTANTS AND TYPES
On/off switch enum ON_OFF_TYPE // on/off switch type
{
OFF = 0,
ON = 1
};
Intensity of Electronic Guidelight typedef enum EDM_EGLINTENSITY_TYPE
{
EDM_EGLINTEN_OFF = 0,
EDM_EGLINTEN_LOW = 1,
EDM_EGLINTEN_MID = 2,
EDM_EGLINTEN_HIGH = 3
};
Leica TPS1200 – Version 1.50 113
GeoCOM Reference Manual Electronic Distance Measurement – EDM
12.4
FUNCTIONS
12.4.1
EDM_Laserpointer - turning on/off the laserpointer
EDM_Laserpointer........................................................................................................................................................................................................................................................
.....................
................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ 1004
1004 ................................................................................................................................................................................................................................................................EDM_Laserpoin
ter
C-Declaration
EDM_Laserpointer (ON_OFF_TYPE eLaser)
VB-Declaration
VB_EDM_Laserpointer(ByVal eLaser As Long)
ASCII-Request
%R1Q,1004: eLaser[long]
ASCII-Response
%R1P,0,0: RC
Remarks
Laserpointer is only available on models which support distance measurement without reflector.
Parameters
- switch Laserpointer on
OFF - switch Laserpointer off
Return-Code Names and Return-Code Values
GRC_OK
GRC_EDM_DEV_NOT_INSTALLED 778 Laserpointer is not implemented
See Also
-
Example
GRC_TYPE rc;
// switch on laserpointer rc = EDM_Laserpointer(ON); if (rc != GRC_OK)
{ // error-handling
switch (rc)
{
case GRC_EDM_DEV_NOT_INSTALLED:
printf("Laserpointer is not implemented.
Laserpointer is only available in
theodolites which supports distance
measurement without reflector.");
break;
} // end of switch (rc)
} // end of error handling else if (rc == GRC_OK)
{
// use laserpointer
}
Leica TPS1200 – Version 1.50 114
GeoCOM Reference Manual Electronic Distance Measurement – EDM
12.4.2
EDM_GetEglIntensity – getting the value of the intensity of the electronic guide light
EDM_GetEglIntensity............................................................................................................................................................................................................................................................................
............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ 1058
1058 ................................................................................................................................................................................................................................................................EDM_GetEglInt
ensity
C-Declaration
EDM_GetEglIntensity(EDM_EGLINTENSITY_TYPE
&eIntensity)
VB-Declaration
VB_EDM_GetEglIntensity (eIntensity As Long)
ASCII-Request
%R1Q,1058:
ASCII-Response
%R1Q,0,0: RC , eIntensity[long]
Remarks
Displays the intensity of the Electronic Guide Light.
Parameters intensity Out EDM_EGLINTEN_OFF
EDM_EGLINTEN_LOW
EDM_EGLINTEN_MID
EDM_EGLINTEN_HIGH
Return-Code Names and Return-Code Values
GRC_OK
GRC_EDM_DEV_NOT_INSTALLED 778
See Also
EDM_ SetEglIntensity ()
Example
See EDM_SetEglIntensity .
Electronic Guide Light not implemented
Leica TPS1200 – Version 1.50 115
GeoCOM Reference Manual Electronic Distance Measurement – EDM
12.4.3
EDM_SetEglIntensity – changing the intensity of the electronic guide light
EDM_SetEglIntensity............................................................................................................................................................................................................................................................................
............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ 1059
1059 ................................................................................................................................................................................................................................................................EDM_SetEglInt
ensity
C-Declaration
EDM_SetEglIntensity (EDM_EGLINTENSITY_TYPE
eIntensity)
VB-Declaration
VB_EDM_SetEglIntensity (ByVal eIntensity As
Long)
ASCII-Request
%R1Q,1059: eIntensity [long]
ASCII-Response
%R1P,0,0: RC
Remarks
Changes the intensity of the Electronic Guide Light.
Parameters intensity In EDM_EGLINTEN_OFF
EDM_EGLINTEN_LOW
EDM_EGLINTEN_MID
EDM_EGLINTEN_HIGH
Return-Code Names and Return-Code Values
GRC_OK
GRC_SYSBUSY
GRC_EDM_DEV_NOT_INSTALLED
GRC_EDM_INVALID_COMMAND
778
770
Electronic Guide Light not implemented
When an invalid intensity is entered
See Also
EDM_GetEglIntensity ()
Example
RC-TYPE rc;
EDM_EGLINTENSITY_TYPE eIntensity, eNewIntensity;
// Get actual EGL intensity rc = EDM_GetEglIntensity(eIntensity); if (rc == GRC_OK)
{
// switch EGL intensity one level up
switch (eIntensity)
{
case EDM_EGLINTENSITY_OFF:
eIntensityNew = EDM_EGLINTENSITY_LOW; break;
case EDM_EGLINTENSITY_LOW:
eIntensityNew = EDM_EGLINTENSITY_MID; break;
case EDM_EGLINTENSITY_MID:
eIntensityNew = EDM_EGLINTENSITY_HIGH;break;
case EDM_EGLINTENSITY_HIGH:
break; // Allready highest intensity
default:
eIntensityNew = EDM_EGLINTENSITY_LOW;
}
//Set new EGL intensity rc = SetEglIntensity(eIntensityNew);
// Handle errors
}
Leica TPS1200 – Version 1.50 116
GeoCOM Reference Manual File Transfer - FTR
13 F
ILE
T
RANSFER
FTR
13.1
USAGE
The subsystem ‘File Transfer’ contains functions such as list image files, download image files from instrument and delete image files. Telescopic Camera Images stored on Internal Memory or CF-Card may be transferred onto a PC using these functions.
Note: It is recommended to use binary communication mode with checksum (default) to secure transmission of files.
See also COM_SetComFormat.
/ata1a/
/ata0a/
Path
Images
FTR_DEVICE_INTERNAL
FTR_DEVICE_PCPARD
File type(s) Extension wildcard(s)
FTR_FILE_IMAGES "*.jpg"
13.2
CONSTANTS AND TYPES
Blocksize const unsigned short FTR_MAX_BLOCKSIZE = 450;
Devicetype typedef enum
{
FTR_DEVICE_INTERNAL = 0,
FTR_DEVICE_PCPARD = 1,
} FTR_DEVICETYPE;
Filetype typedef enum
{
FTR_FILE_IMAGES = 170,
} FR_FILETYPE;
Blocktype struct FTR_BLOCK
{
BYTE FTR_BLOCK_val[FTR_MAX_BLOCKSIZE];
unsigned short FTR_BLOCK_len;
};
Modification time struct FTR_MODTIME
{
BYTE ucHour; // hour
BYTE ucMinute; // minute
BYTE ucSecond; // second
BYTE ucCentisecond; // centisecond (0.01 sec)
};
Leica TPS1200 – Version 1.50 117
GeoCOM Reference Manual
Modification date struct FTR_MODDATE
{
BYTE ucDay; // UTC date, day
BYTE ucMonth; // UTC date, month
BYTE ucYear; // UTC date, year
};
Directory info struct FTR_DIRINFO
{
char szFileName[81];
unsigned long ulFileSize;
FTR_MODTIME ModTime;
FTR_MODDATE ModDate;
};
File Transfer - FTR
13.3
FUNCTIONS
13.3.1
FTR_SetupList – Setup list
AUT_ReadTol .................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... 9008
9009 .................................................................................................................................................
AUT_ReadTol
C-Declaration
FTR_SetupList(FTR_DEVICETYPE eDeviceType, FTR_FILETYPE eFileType,
char *szSearchPath)
VB-Declaration
VB_FTR_SetupList(DeviceType As Long, FileType As Long,
ByVal SearchPath As String)
Request
%R1Q,23306: eDeviceType , eFileType,szSearchPath
ASCII-Response
%R1P,0,0: RC
Remarks
This command sets up the device, file type and search path. It has to be called before command FTR_List can be used.
Parameters
Return-Codes
GRC_OK
GRC_IVPARAM
GRC_NOTOK
GRC_FTR_FILEACCESS
See Also
FTR_List
FTR_AbortList
Example
See FTR_List
FTR_FILE_UNKNOWN.
2
26
Device not available or can not get path.
Setup already done or FTR_AbortList() not called.
13056 File access error.
Leica TPS1200 – Version 1.50 118
GeoCOM Reference Manual File Transfer - FTR
13.3.2
FTR_List – List file
AUT_ReadTol ...............................................
.............................................................................................................................................................................................................................
........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ 9008
9010 .................................................................................................................................................
AUT_ReadTol
C-Declaration
FTR_List(BOOLE bNext, BOOLE &rbLast, FTR_DIRINFO &rDirInfo)
VB-Declaration
VB_FTR_List(Next As Long, Last As Long, DirInfo As FTR_DIRINFO)
Request
%R1Q,23307: bNext
ASCII-Response
%R1P,0,0: RC, rbLast,szFileName , ulFileSize , ucHour , ucMinute , ucSecond , ucCentisecond ucDay , ucMonth , ucYear
Remarks
This command gets one single file entry. The command FTR_List has to be called first.
Parameters
The entry is not valid if the file name is empty ( "").
Return-Codes
GRC_OK
GRC_FTR_MISSINGSETUP
GRC_FTR_INVALIDINPUT 13059 First block is missing or last time was already last block.
See Also
FTR_SetupList
FTR_AbortList
Example
GRC_TYPE rc;
FTR_DEVICETYPE eDeviceType;
FTR_FILETYPE eFileType; char szSearchPath[128];
FTR_DIRINFO DirInfo; eDeviceType = FTR_DEVICE_PCPARD; eFileType = FTR_FILE_IMAGES; strcpy(szSearchPath, ""); rc = FTR_SetupList(eDeviceType, eFileType, szSearchPath); if(rc == GRC_OK)
{ bNext = FALSE;
do
{ rc = FTR_List(bNext, bLast, DirInfo); if(rc != GRC_OK)
{
break;
} if(strlen(DirInfo.szFileName) < 1)
{
// entry is not valid or list is empty
break;
} sprintf(szEntry, "%s %ld %02/%02d/%04d %02d:%02d",
DirInfo.szFileName, DirInfo.ulFileSize,
DirInfo.ModDate.ucMonth, DirInfo.ModDate.ucDay,
DirInfo.ModDate.ucYear + 2000,
DirInfo.ModTime.ucHour, DirInfo.ModTime.ucMinute); bNext = TRUE;
}
Leica TPS1200 – Version 1.50 119
GeoCOM Reference Manual while(bLast != TRUE);
FTR_AbortList();
}
File Transfer - FTR
Leica TPS1200 – Version 1.50 120
GeoCOM Reference Manual
13.3.3
FTR_AbortList – Abort list
AUT_ReadTol ...............................................
.............................................................................................................................................................................................................................
........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ 9008
9011 .................................................................................................................................................
AUT_ReadTol
C-Declaration
FTR_AbortList(void)
VB-Declaration
VB_FTR_AbortList()
Request
%R1Q,23308:
ASCII-Response
%R1P,0,0: RC
Remarks
This command aborts or ends file list command.
Parameters
None
Return-Codes
GRC_OK
See Also
FTR_SetupList
FTR_List
Example
See FTR_Setup
File Transfer - FTR
Leica TPS1200 – Version 1.50 121
GeoCOM Reference Manual File Transfer - FTR
13.3.4
FTR_SetupDownload – Setup download
AUT_ReadTol ...............................................
.............................................................................................................................................................................................................................
........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ 9008
9012 .................................................................................................................................................
AUT_ReadTol
C-Declaration
FTR_SetupDownload(FTR_DEVICETYPE eDeviceType, FTR_FILETYPE eFileType,
char *szFileNameSrc, unsigned short unBlockSize,
unsigned short &runNumOfBlocks)
VB-Declaration
VB_FTR_SetupDownload(DeviceType As Long, FileType As Long,
ByVal FileNameSrc As String, BlockSize As Integer,
NumOfBlocks As Integer)
Request
%R1Q,23303: eDeviceType , eFileType,szFileNameSrc , unBlockSize
ASCII-Response
%R1P,0,0: RC, unNumOfBlocks
Remarks
This command sets up the download of a file from the instrument. It has to be called before command
FTR_Download can be used.
Parameters
File name with extension. I f file type is
FTR_FILE_UNKNOWN additional file path is required.
Block size. Max value is FTR_MAX_BLOCKSIZE.
Return-Codes
GRC_OK
GRC_IVPARAM
GRC_NOTOK
GRC_FTR_INVALIDINPUT
GRC_FTR_FILEACCESS
See Also
FTR_Download
FTR_AbortDownload
Example
See FTR_Download
2 Device not available or can not get path.
26 Setup already done or FTR_AbortDownload() not called.
13059 Block size too big.
13056 File access error.
Leica TPS1200 – Version 1.50 122
GeoCOM Reference Manual File Transfer - FTR
13.3.5
FTR_Download – Download file
AUT_ReadTol ...............................................
.............................................................................................................................................................................................................................
........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ 9008
9013 .................................................................................................................................................
AUT_ReadTol
C-Declaration
FTR_Download(unsigned short unBlockNumber, FTR_BLOCK &rBlock)
VB-Declaration
VB_FTR_Download(BlockNumber As Integer, Block As FTR_BLOCK)
Request
%R1Q,23304: unBlockNumber
ASCII-Response
%R1P,0,0: RC , FTR_BLOCK_val,FTR_BLOCK_len
Remarks
This command gets one single block of data. The command FTR_SetupDownload has to be called first.
Note: The maximum block number in C/VB is 65535/32767 therefore the file size is limited to 28MB/14MB.
Visual Basic does not know data type unsigned integer.
Parameters number is 0 then the download process is aborted
Return-Codes
GRC_OK
GRC_FTR_MISSINGSETUP
GRC_FTR_INVALIDINPUT
GRC_FTR_FILEACCESS
13059 First block is missing.
13056 File access error.
See Also
FTR_SetupDownload
FTR_AbortDownload
Example
GRC_TYPE rc;
FTR_DEVICETYPE eDeviceType;
FTR_FILETYPE eFileType;
FTR_BLOCK Block; char szFileNameSrc[128]; unsigned short unBlockNumber; unsigned short unBlockSize; unsigned short unNumOfBlocks;
FILE *pFile; unsigned short unWritten; eDeviceType = FTR_DEVICE_PCPARD; eFileType = FTR_FILE_IMAGES; strcpy(szFileNameSrc, "image000.jpg"); unBlockSize = FTR_MAX_BLOCKSIZE; rc = FTR_SetupDownload(eDeviceType, eFileType, szFileNameSrc,
unBlockSize, unNumOfBlocks); if(rc == GRC_OK)
{
// open the file pFile = fopen(szFileNameSrc, "wb"); if(pFile == NULL)
{
return;
} for(unBlockNumber = 1; unBlockNumber <= unNumOfBlocks; unBlockNumber++)
{ rc = FTR_Download(unBlockNumber, Block); if(rc != GRC_OK)
Leica TPS1200 – Version 1.50 123
GeoCOM Reference Manual
{
break;
}
// write block to file unWritten = fwrite(Block.FTR_BLOCK_val, 1,
Block.FTR_BLOCK_len, pFile);
if(unWritten != Block.FTR_BLOCK_len)
{
break;
}
}
FTR_AbortDownload();
fclose(pFile);
}
File Transfer - FTR
Leica TPS1200 – Version 1.50 124
GeoCOM Reference Manual
13.3.6
FTR_AbortDownload – Abort download
AUT_ReadTol ...............................................
.............................................................................................................................................................................................................................
........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ 9008
9014 .................................................................................................................................................
AUT_ReadTol
C-Declaration
FTR_AbortDownload(void)
VB-Declaration
VB_FTR_AbortDownload()
Request
%R1Q,23305:
ASCII-Response
%R1P,0,0: RC
Remarks
This command aborts or ends file download command.
Parameters
None
Return-Codes
GRC_OK
See Also
FTR_SetupDownload
FTR_Download
Example
See FTR_Download
File Transfer - FTR
Leica TPS1200 – Version 1.50 125
GeoCOM Reference Manual File Transfer - FTR
13.3.7
FTR_Delete – Delete file
AUT_ReadTol ...............................................
.............................................................................................................................................................................................................................
........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ 9008
9015 .................................................................................................................................................
AUT_ReadTol
C-Declaration
FTR_Delete(FTR_DEVICETYPE eDeviceType, FTR_FILETYPE eFileType,
FTR_MODDATE DelDate, char *szFileName,
unsigned short &runNumFilesDeleted);
VB-Declaration
VB_FTR_Delete(DeviceType As Long, FileType As Long, DelDate As FTR_MODDATE,
ByVal FileName As String, NumFilesDeleted As Integer)
Request
%R1Q,23309: eDeviceType , eFileType,ucDay,ucMonth,ucYear,szFileName
ASCII-Response
%R1P,0,0: RC , unNumFilesDeleted
Remarks
This command deletes one or more files. Wildcards may be used to delete multiple files. If deletion date is valid only files older than deletion date are deleted.
Parameters
Deletion date. Valid if ucMonth is not 0.
Return-Codes
GRC_OK
GRC_IVPARAM 2 Device not available or can not get path.
See Also
FTR_List
Example
GRC_TYPE rc;
FTR_DEVICETYPE eDeviceType;
FTR_FILETYPE eFileType;
FTR_MODDATE DelDate; char szFileName[128]; unsigned short unNumFilesDeleted; eDeviceType = FTR_DEVICE_PCPARD; eFileType = FTR_FILE_IMAGES;
DelDate.ucMonth = 0; strcpy(szFileName, "image000.jpg"); unNumFilesDeleted = 0;
// delete file rc = FTR_Delete(eDeviceType, eFileType, DelDate, szFileName,
unNumFilesDeleted); if(rc == GRC_OK)
{ if(unNumFilesDeleted == 1)
{
// file deleted
}
}
Leica TPS1200 – Version 1.50 126
GeoCOM Reference Manual Image Processing – IMG
14 I
MAGE
P
ROCESSING
– IMG
14.1
INTRODUCTION
This subsystem enables the capture of Telescopic Camera Images and the configuration of image parameters. There are two functions available to configure the image parameters and to read the currently defined parameters,
IMG_SetTccConfig and IMG_GetTccConfig respectively. One can capture an image by invoking the
IMG_TakeTccImage command.
Captured images are saved in jpeg compressed format to the Internal Memory or CF card into the \Images directory.
Each file name contains a prefix and a number in the following format: prefix###.jpg (e.g. image024.jpg).
14.2
USAGE
Imaging functionality applicable for TM30 / TS30 only.
In order to use the imaging functionality, make sure that a valid GeoCOM Imaging license key is loaded onto the instrument. If not available , these functions return error messages.
Note: Imaging RPC’s require valid GeoCOM imaging license key for successful execution.
14.3
CONSTANTS AND TYPES
Memory device type enum IMG_MEM_TYPE // MemDeviceType
{
IMG_INTERNAL_MEMORY = 0x0, // internal memory module (optional)
IMG_PC_CARD = 0x1 // external pc card
};
Image Parameters struct IMG_TCC_CONFIG
{
unsigned long ulImageNumber;
unsigned long ulQuality;
unsigned long ulSubFunctNumber;
char szFileNamePrefix[IMG_MAX_FILE_PREFIX_LEN];
};
Length of file name prefix const short IMG_MAX_FILE_PREFIX_LEN 20;
Leica TPS1200 – Version 1.50 127
GeoCOM Reference Manual Image Processing – IMG
14.4
FUNCTIONS
14.4.1
IMG_GetTccConfig – reading the actual image configuration
EDM_Laserpointer........................................................................................................................................................................................................................................................
.....................
................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ 1004
1004 ................................................................................................................................................................................................................................................................EDM_Laserpoin
ter
C-Declaration
IMG_GetTccConfig (IMG_MEM_TYPE eMemType, IMG_TCC_CONFIG &Parameters)
VB-Declaration
VB_IMG_GetTccConfig ( MemType As Long, Parameters As IMG_TCC_CONFIG ) As Integer
ASCII-Request
%R1Q,23400: eMemType[long]
ASCII-Response
%R1P,0,0: RC , ulImageNumber[long],ulQuality[long],ulSubFunctNumber[long],szFileNamePrefix[string]
Remarks
Parameters
1: Test image
2: Automatic exposure time selection
4: two-times sub-sampling
8: four-times sub-sampling
Return-Code Names and Return-Code Values
GRC_OK
GRC_FATAL
GRC_IVVERSION
4
17
27
CF card is not available or configuration file does not exist
Configuration file version differs from that of system firmware
Imaging license key not available GRC_NA
See Also
IMG_SetTccConfig
Example
-
Leica TPS1200 – Version 1.50 128
GeoCOM Reference Manual Image Processing – IMG
14.4.2
IMG_SetTccConfig – setting the actual image configuration
EDM_Laserpointer.............................................................................................................................................................................................................................................................................
................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ 1004
1004 ................................................................................................................................................................................................................................................................EDM_Laserpoin
ter
C-Declaration
IMG_SetTccConfig (IMG_MEM_TYPE eMemType, IMG_TCC_CONFIG Parameters)
VB-Declaration
VB_IMG_SetTccConfig ( MemType As Long, Parameters As IMG_TCC_CONFIG ) As Integer
ASCII-Request
%R1Q,23401: eMemType[long], ulImageNumber[long], ulQuality[long], ulSubFunctNumber[long], szFileNamePrefix[string]
ASCII-Response
%R1P,0,0: RC
Remarks
Parameters
1: Test image
2: Automatic exposure time selection
4: two-times sub-sampling
8: four-times sub-sampling
Return-Code Names and Return-Code Values
GRC_OK
GRC_FATAL 4
27
CF card is not available full
Any parameter is out of range
Imaging license key not available GRC_NA
See Also
IMG_GetTccConfig
IMG_TakeTccImage
Example
See IMG_TakeTccImage
Leica TPS1200 – Version 1.50 129
GeoCOM Reference Manual Image Processing – IMG
14.4.3
IMG_TakeTccImage – capture a telescopic image
EDM_Laserpointer.............................................................................................................................................................................................................................................................................
................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ 1004
1004 ................................................................................................................................................................................................................................................................EDM_Laserpoin
ter
C-Declaration
IMG_TakeTccImage (IMG_MEM_TYPE eMemType, unsigned short& runImageNumber)
VB-Declaration
VB_IMG_TakeTccImage ( MemType As Long, ImageNumber As Integer ) As Integer
ASCII-Request
%R1Q,23402: eMemType
ASCII-Response
%R1P,0,0: RC,runImageNumber
Remarks
Parameters
Return-Code Names and Return-Code Values
GRC_OK
GRC_IVRESULT 3 Not supported by Telescope Firmware
GRC_FATAL
GRC_NA
4
27
CF card is not available full
Imaging license key not available
See Also
IMG_GetTccConfig
IMG_SetTccConfig
Example
GRC_TYPE rc;
IMG_MEM_TYPE eMemType;
IMG_TCC_CONFIG Parameters; short nTimeout;
// Set parameters eMemType = IMG_PC_CARD;
Parameters.ulImageNumber = 999;
Parameters.ulQuality = 50;
// Automatic exposure time and two-times sub-sampling
Parameters.ulSubFunctNumber = 6; strcpy(Parameters.szFileNamePrefix, "def"); rc = IMG_SetTccConfig(eMemType, Parameters); if (rc != GRC_OK)
{
return rc;
}
// Increase geocom timeout, because image capture and readout takes long time
COM_GetTimeOut(nTimeout);
COM_SetTimeOut(200);
// Take image rc = IMG_TakeTccImage(eMemType, unBuf); if (rc != GRC_OK)
{
// Restore geocom timeout
COM_SetTimeOut(nTimeout);
return rc;
}
// Image "def999.jpg" is now stored on CF-Card
// Restore geocom timeout
COM_SetTimeOut(nTimeout);
Leica TPS1200 – Version 1.50 130
GeoCOM Reference Manual Motorisation – MOT
15 M
OTORISATION
– MOT
15.1
INTRODUCTION
The subsystem ‘Motorisation’ controls the motorised drive of the axis.
15.2
USAGE
Within the subsystem, there exist three different types of functions:
"Open-End" functions: These functions start a motorisation control task and continue execution until cancellation.
Special control functions are used to cancel such functions. An example for this type of function is the speed control function MOT_SetVelocity .
"Terminating" functions: These functions start control tasks, which terminate automatically. Examples for this type are positioning functions for example MOT_StartController and MOT_StopController .
Functions for the parameter handling: These functions manage system parameters. Examples are control parameter, motion parameter, tolerance and system configuration parameters (Example: MOT_ReadLockStatus ).
15.3
CONSTANTS AND TYPES
Lock Conditions enum MOT_LOCK_STATUS
{
MOT_LOCKED_OUT = 0, // locked out
MOT_LOCKED_IN = 1, // locked in
MOT_PREDICTION = 2 // prediction mode
};
Controller Stop Mode enum MOT_STOPMODE
{
MOT_NORMAL = 0, // slow down with current acceleration
MOT_SHUTDOWN = 1 // slow down by switch off power supply
};
Values for Horizontal (instrument) and Vertical (telescope) Speed struct MOT_COM_PAIR
{
double adValue[MOT_AXES];
};
Controller Configuration enum MOT_MODE
{
MOT_POSIT = 0, // configured for relative postioning
MOT_OCONST = 1, // configured for constant speed
MOT_MANUPOS = 2, // configured for manual positioning
// default setting
MOT_BREAK
MOT_TERM
};
Number of axis
= 4, // configured as "Brake"-controller
// do not use 5 and 6
= 7 // terminates the controller task const short MOT_AXES = 2;
Leica TPS1200 – Version 1.50 131
GeoCOM Reference Manual Motorisation – MOT
15.4
FUNCTIONS
15.4.1
MOT_ReadLockStatus – returning the condition of the LockIn control
MOT_ReadLockStatus...............................................................................................................................................................................................................................................................
................
6021 ................................................................................................................................................................................................................................................................MOT_ReadLock
Status
........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ 6021
C-Declaration
MOT_ReadLockStatus(MOT_LOCK_STATUS &Status)
VB-Declaration
VB_MOT_ReadLockStatus(Status As Long)
ASCII-Request
%R1Q,6021:
ASCII-Response
%R1P,0,0: RC, Status[long]
Remarks
This function returns the current condition of the LockIn control (see subsystem AUT for further information).
This command is valid for automated instruments only.
Parameters
Return-Code Names and Return-Code Values
GRC_OK
GRC_NOT_IMPL 5
Example
GRC_TYPE rc;
MOT_LOCK_STATUS Status; rc = MOT_ReadLockStatus(Status) if (rc == GRC_OK)
{
// use lock status information
} else
{
// this is no automated instrument
}
No motorisation available (no automated instrument).
Leica TPS1200 – Version 1.50 132
GeoCOM Reference Manual Motorisation – MOT
15.4.2
MOT_StartController – starting the motor controller
MOT_StartController.............................................................................................................................................................................................................................................................................
............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ 6001
6001 ................................................................................................................................................................................................................................................................MOT_StartCont
roller
C-Declaration
MOT_StartController(MOT_MODE ControlMode)
VB-Declaration
VB_MOT_StartController(ControlMode As Long)
ASCII-Request
%R1Q,6001: ControlMode[long]
ASCII-Response
%R1P,0,0: RC
Remarks
This command is used to enable remote or user interaction to the motor controller.
Parameters
Controller mode. If used together with MOT_SetVelocity the control mode has to be MOT_OCONST .
Return-Code Names and Return-Code Values
GRC_OK
GRC_IVPARAM
GRC_NOT_IMPL
GRC_MOT_BUSY
GRC_MOT_UNREADY
2
5
1793
1792
The value of ControlMode is not MOT_OCONST .
No motorization available (no automated instrument).
Subsystem is busy (e.g. controller already started).
Subsystem is not initialised.
See Also
MOT_SetVelocity
MOT_StopController
Example see MOT_SetVelocity
Leica TPS1200 – Version 1.50 133
GeoCOM Reference Manual Motorisation – MOT
15.4.3
MOT_StopController – stopping the motor controller
MOT_StopController .............................................................................................................................................................................................................................................................................
............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ 6002
6002 ................................................................................................................................................................................................................................................................MOT_StopCont
roller
C-Declaration
MOT_StopController(MOT_STOPMODE Mode)
VB-Declaration
VB_MOT_StopController(Mode As Long)
ASCII-Request
%R1Q,6002: Mode[long]
ASCII-Response
%R1P,0,0: RC
Remarks
This command is used to stop movement and to stop the motor controller operation.
Parameters
Mode In Stop mode
Return-Code Names and Return-Code Values
GRC_OK
GRC_MOT_NOT_BUSY 1792 No movement in progress (e.g. stop without start).
See Also
MOT_SetVelocity
MOT_StartController
AUS_SetUserLockState
Example see MOT_SetVelocity
Leica TPS1200 – Version 1.50 134
GeoCOM Reference Manual Motorisation – MOT
15.4.4
MOT_SetVelocity – driving the instrument with a constant speed
MOT_SetVelocity..............................................................................................................................................................................................................................................................................
................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ 6004
6004 ................................................................................................................................................................................................................................................................MOT_SetVeloci
ty
C-Declaration
MOT_SetVelocity(MOT_COM_PAIR RefOmega)
VB-Declaration
VB_MOT_SetVelocity(RefOmega As MOT_COM_PAIR)
ASCII-Request
%R1Q,6004: HZ-Speed[double],V-Speed[double]
ASCII-Response
%R1P,0,0: RC
Remarks
This command is used to set up the velocity of motorization. This function is valid only if
MOT_StartController(MOT_OCONST) has been called previously. RefOmega[0] denotes the horizontal and
RefOmega[1] denotes the vertical velocity setting.
Parameters maximum speed is +/- 3.14 rad/s each for TM30 TS30 instruments and 0.79 rad/s each for TPS1200 instruments.
Return-Code Names and Return-Code Values
GRC_OK
GRC_MOT_NOT_CONFIG
GRC_MOT_NOT_OCONST
1795
1794
and/or RefOmega.adValue[V] values are not within the boundaries.
System is not in state MOT_CONFIG or MOT_BUSY_OPEN_END
(e.g. missing ‘start controller’).
Drive is not in mode MOT_OCONST (set by
MOT_StartController ).
No motorization available (no automated instrument). GRC_NOT_IMPL 5
See Also
MOT_StartController
MOT_StopController
AUS_SetUserLockState
Example
GRC_TYPE rc;
MOT_COM_PAIR RefOmega;
// set parameter
RefOmega.adValue[0] = 0.05;
RefOmega.adValue[1] = 0.05;
// stop controller and any possible movements
(void) MOT_StopController(MOT_NORMAL);
// wait at least 5 sec. wait(5);
// start controller; the only valid mode
// for SetVelocity is MOD_OCONST rc = MOT_StartController(MOT_OCONST); if (rc == GRC_OK)
{
rc = MOT_SetVelocity(RefOmega);
// insert here a time delay or a wait for user
// action; the movement stops by calling
// MOT_StopController
}
// stop controller and movements abruptly rc = MOT_StopController(MOT_SHUTDOWN);
// restart controller with default setting rc = MOT_StartController(MOT_MANUPOS); if (rc != GRC_OK)
Leica TPS1200 – Version 1.50 135
GeoCOM Reference Manual
{
// handle error
}
Motorisation – MOT
Leica TPS1200 – Version 1.50 136
GeoCOM Reference Manual Supervisor – SUP
16 S
UPERVISOR
– SUP
16.1
USAGE
The subsystem ‘Supervisor’ performs the continuous control of the system (e.g. battery voltage, temperature) and allows to display automatically status information (e.g. system time, battery-, position-, Memory-Card-, and inclination measurement icons as well as local-remote display). It also controls the automatic shutdown mechanism.
16.2
CONSTANTS AND TYPES
On/Off Switch enum ON_OFF_TYPE
{
OFF = 0,
ON = 1
};
Automatic Shutdown Mechanism for the System enum SUP_AUTO_POWER
{
AUTO_POWER_DISABLED = 0, // instrument remains on
AUTO_POWER_OFF = 2 // turns off mechanism
};
System Time typedef long SYSTIME; // [ms]
Leica TPS1200 – Version 1.50 137
GeoCOM Reference Manual
16.3
FUNCTIONS
16.3.1
SUP_GetConfig – getting the power management configuration status
SUP_GetConfig..........................................................................................................................................................................................................................................................................
14001...............................................................................................................................................................................................................................................................SUP_GetConfig
....
.................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... 14001
C-Declaration
SUP_GetConfig(ON_OFF_TYPE & Reserved,
SUP_AUTO_POWER &AutoPower,
SYSTIME &Timeout)
VB-Declaration
VB_SUP_GetConfig(Reserved As Long,
AutoPower As Long,
Timeout As Long)
ASCII-Request
%R1Q,14001:
ASCII-Response
%R1P,0,0: RC, Reserved [long], AutoPower[long], Timeout[long]
Remarks
The returned settings are power off configuration and timing.
Parameters
Supervisor – SUP
Return-Code Names and Return-Code Values
GRC_OK
See Also
SUP_SetConfig
Example see SUP_SetConfig mode defined by the value of AutoPower when no user activity (press a key, turn the device or communication via
GeoCOM) occurs.
Leica TPS1200 – Version 1.50 138
GeoCOM Reference Manual Supervisor – SUP
16.3.2
SUP_SetConfig – setting the power management configuration
SUP_SetConfig................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... 14002
14002...............................................................................................................................................................................................................................................................SUP_SetConfig
C-Declaration
SUP_SetConfig(ON_OFF_TYPE Reserved,
SUP_AUTO_POWER AutoPower,
SYSTIME Timeout)
VB-Declaration
VB_SUP_SetConfig(Reserved As Long,
AutoPower As Long,
Timeout As Long)
ASCII-Request
%R1Q,14002: Reserved[long], AutoPower[long], Timeout[long]
ASCII-Response
%R1P,0,0: RC
Remarks
Set the auto power off mode to AUTO_POWER_DISABLED or AUTO_POWER_OFF and the corresponding timeout.
Parameters mode defined by the value of AutoPower when no user activity (press a key, turn the device or communication via
GeoCOM) occurs. The parameter for timeout must be between 60’000 m/s (1 min) and 6’000’000 m/s (100 min).
Return-Code Names and Return-Code Values
GRC_OK
GRC_IVPARAM 2 Timeout parameter invalid.
See Also
SUP_GetConfig
Example
GRC_TYPE
ON_OFF_TYPE
SUP_AUTO_POWER
SYSTIME rc;
Reserved;
AutoPower;
Timeout;
// get parameter values rc = SUP_GetConfig (Reserved,
AutoPower,
Timeout);
// set new values for parameter
AutoPower = AUTO_POWER_DISABLED;
Timeout = 600000; // =10min rc = SUP_SetConfig (Reserved,
AutoPower,
Timeout);
Leica TPS1200 – Version 1.50 139
GeoCOM Reference Manual Theodolite Measurement and Calculation – TMC
17 T
HEODOLITE
M
EASUREMENT AND
C
ALCULATION
– TMC
17.1
INTRODUCTION
This module is the central measurement, calculation and geodetic control module of the TPS1200 instrument family.
All sensors (angle, distance and compensator) deliver their respective data to this module. All sensor information is used to continuously calculate corrected or uncorrected values for angles, distance and position co-ordinates.
The functions handled by the TMC module are:
Measurement Functions
These functions deliver measurement results. Angle and inclination measurements are started by system functions directly, other measurement operations needs activating the corresponding sensor (e.g. distance measurement). This means a distance measurement needs to be previously activated in order to measure coordinates. ATR corrected angle values are automatically delivered once the ATR status is on. For simple measurements with a single procedure call, use the BAP MeasDist command.
Measurement Control Functions
These functions control measurement behaviour (activate/deactivate sensors) and basic data for the calculation of measurement results.
Data Set-up Functions
These functions allow sending destination data, location data and section data to the Theodolite.
Information Functions
These functions return additional information about measurement results, sensors, Theodolite status, etc.
Configuration Functions
These functions control the Theodolite behaviour in general.
The measurement functions of this subsystem generally can generate three types of return codes:
System Return Codes are of general use ( GRC_OK means result is okay,...)
Informative Return code indicates that the function was terminated successfully. But some restrictions apply (e.g. it can be reported that the angle values are okay, the distance is invalid).
Error Return Codes signal a non-successful termination of the function call.
17.2
USAGE
17.2.1
Inclination measurement/correction
The TMC module handles the inclination sensor data and correction. To get exact results (co-ordinates, angles, distances) the inclination of the instrument must be taken into account. In general, there are two ways how this can be done:
Measuring the inclination
Calculating the inclination
For a limited time of several seconds and a limited horizontal angle between 10 and 40 degrees (depending on instrument type) an inclination model is generated to speed up measurement. The model for the inclination is based on the last exact inclination measurement and is maintained within the TMC as a calculated inclination plane.
To control the kind of generating the results, all measurement functions have a parameter (of type TMC_INCLINE_PRG ), where the inclination mode can be selected. The different measurement modes are:
TMC_MEA_INC :
Measures the inclination (in any case). Use this mode by unstable conditions like e.g. the instrument has been moved or walking around the instrument may influence the inclination on an unstable underground (e.g. field grass). The disadvantage of this mode is the longer measurement time compared to TMC_PLANE_INC .
TMC_PLANE_INC :
Calculates the inclination (assumes that the instrument has not been moved). This mode gives an almost immediate result (some milliseconds).
TMC_AUTO_INC :
The system decides which method should be used (either TMC_MEA_INC or TMC_PLANE_INC ). You get the best performance regarding measure rate and accuracy with this mode; the instrument checks the conditions around the station. We recommend taking this mode any time.
Leica TPS1200 – Version 1.50 140
GeoCOM Reference Manual Theodolite Measurement and Calculation – TMC
Note that the results depend on the system’s configuration, too. That means that the compensator must be switched on in order to get a result with inclination correction (see TMC_SetInclineSwitch ). The return code of the measurement functions holds information about the quality of the result. E.g. it is reported, if the compensation of inclination could not be done.
Note:
17.2.2
Sensor measurement programs
The instrument supports different measurement programs, which activates or deactivates the sensors in different manner. The programs can be selected by the control function TMC_DoMeasure (via the parameter of the type
TMC_MEASURE_PRG ).
Additionally the setting of the EDM measurement mode is set with the function TMC_SetEdmMode and influences the measurement. Here a choice between single measurement and continues measurement is possible (each is different in speed and precision).
General measurement programs:
TMC_DEF_DIST :
Starts the distance measurement with the set distance measurement program.
TMC_TRK_DIST :
Starts the distance measurement in tracking mode.
TMC_STOP :
Stops measurement.
TMC_CLEAR :
Stops the measurement and clears the data.
TMC_SIGNAL :
Help mode for signal intensity measurement (use together with function TMC_GetSignal ). While S ignal or frequency measurement no angle measurement data are available.
TMC_RED_TRK_DIST:
Starts the distance tracking measurement with red laser. This mode can be used for reflectorless short distance measurement or long distance measurement with reflector.
17.3
CONSTANTS AND TYPES
On / Off switches enum ON_OFF_TYPE // on/off switch type
{
OFF
ON
};
= 0,
= 1
// Switch is off
// Switch is on
Inclination Sensor Measurement Program
(see Chapter 17.2.1 for further information) enum TMC_INCLINE_PRG {
TMC_MEA_INC = 0, // Use sensor (apriori sigma)
TMC_AUTO_INC = 1, // Automatic mode (sensor/plane)
TMC_PLANE_INC = 2, // Use plane (apriori sigma)
};
TMC Measurement Mode
(see Chapter 17.2.2 for further information) enum TMC_MEASURE_PRG {
TMC_STOP = 0, // Stop measurement program
TMC_DEF_DIST = 1, // Default DIST-measurement
// program
TMC_CLEAR = 3, // TMC_STOP and clear data
TMC_SIGNAL = 4, // Signal measurement (test
// function)
TMC_DO_MEASURE = 6, // (Re)start measurement task
TMC_RTRK_DIST = 8, // Distance-TRK measurement
// program
TMC_RED_TRK_DIST = 10, // Reflectorless tracking
TMC_FREQUENCY = 11 // Frequency measurement (test)
};
Leica TPS1200 – Version 1.50 141
GeoCOM Reference Manual Theodolite Measurement and Calculation – TMC
EDM Measurement Mode enum EDM_MODE {
EDM_MODE_NOT_USED = 0, // Init value
EDM_SINGLE_TAPE = 1, // IR Standard Reflector Tape
EDM_SINGLE_STANDARD = 2, // IR Standard
EDM_SINGLE_FAST = 3, // IR Fast
EDM_SINGLE_LRANGE = 4, // LO Standard
EDM_SINGLE_SRANGE = 5, // RL Standard
EDM_CONT_STANDARD = 6, // Standard repeated measurement
EDM_CONT_DYNAMIC
EDM_CONT_REFLESS
EDM_CONT_FAST
EDM_AVERAGE_IR
EDM_AVERAGE_SR
= 7, // IR Tacking
= 8, // RL Tracking
= 9, // Fast repeated measurement
= 10, // IR Average
= 11, // RL Average
EDM_AVERAGE_LR
EDM_PRECISE_IR = 13, // IR Precise (TS30, TM30)
EDM_PRECISE_TAPE = 14 // IR Precise Reflector Tape (TS30, TM30)
};
EDM Frequency typedef struct TMC_EDM_FREQUENCY {
double dFrequency; // EDM’s frequency in Hz
SYSTIME Time; // Time of last measurement
};
Calculated Co-ordinates based on a Distance Measurement struct TMC_COORDINATE {
double dE;
double dN;
double dH;
// E-Coordinate [m]
// N-Coordinate [m]
// H-Coordinate [m]
SYSTIME CoordTime;
double dE_Cont;
double dH_Cont;
double dN_Cont;
// Timestamp of dist. Measurement [ms]
// E-Coordinate (continuously) [m]
// N-Coordinate (continuously) [m]
// H-Coordinate (continuously) [m]
SYSTIME CoordContTime; // Timestamp of measurement [ms]
};
Corrected Angle Data struct TMC_HZ_V_ANG {
double dHz;
double dV;
};
// Horizontal angle [rad]
// Vertical angle [rad]
Corrected Angle Data with Inclination Data struct TMC_ANGLE {
double dHz;
double dV;
double dAngleAccuracy; // Accuracy of angles [rad]
SYSTIME AngleTime;
TMC_INCLINE Incline;
TMC_FACE eFace;
// Moment of measurement [ms]
// Corresponding inclination
// Face position of telescope
};
// Horizontal angle [rad]
// Vertical angle [rad]
Offset Values for Correction struct TMC_OFFSETDIST {
double dLengthVal; // Aim offset length
double dCrossVal; // Aim offset cross
double dHeightVal; // Aim offset height
};
Inclination Data struct TMC_INCLINE {
double dCrossIncline; // Transverse axis incl. [rad]
double dLengthIncline; // Longitud. axis inclination [rad]
double dAccuracyIncline ; // Inclination accuracy [rad]
SYSTIME InclineTime; // Moment of measurement [ms]
};
System Time typedef long SYSTIME; // time since poweron [ms]
Leica TPS1200 – Version 1.50 142
GeoCOM Reference Manual Theodolite Measurement and Calculation – TMC
Face Position enum TMC_FACE_DEF {
TMC_FACE_NORMAL,
TMC_FACE_TURN
};
Actual Face enum TMC_FACE {
TMC_FACE_1,=0
TMC_FACE_2,=1
};
Reflector Height
// Face in normal position
// Face turned
// Pos 1 of telescope
// Pos 2 of telescope struct TMC_HEIGHT {
double dHr;
};
Atmospheric Correction Data
// Reflector height struct TMC_ATMOS_TEMPERATURE {
double dLambda;
double dPressure;
// Wave length of the EDM transmitter [m]
// Atmospheric pressure [mbar]
double dDryTemperature; // Dry temperature [°C]
double dWetTemperature; // Wet temperature [°C]
};
Refraction Control Data struct TMC_REFRACTION {
ON_OFF_TYPE eRefOn // Refraction correction On/Off
double dEarthRadius; // Radius of the earth [m]
double dRefractiveScale; // Refraction coefficient
};
Instrument Station Co-ordinates struct TMC_STATION {
double dE0;
double dN0;
double dH0;
double dHi;
};
EDM Signal Information
// Station easting coordinate [m]
// Station northing coordinate [m]
// Station height coordinate [m]
// Instrument height [m] struct TMC_EDM_SIGNAL {
double dSignalIntensity; // Signal intensity of EDM in %
SYSTIME Time; // Timestamp [ms]
};
Correction Switches struct TMC_ANG_SWITCH {
ON_OFF_TYPE eInclineCorr;
ON_OFF_TYPE eStandAxisCorr;
// Inclination correction
// Standing axis corr.
ON_OFF_TYPE eCollimationCorr; // Collimation error corr.
ON_OFF_TYPE eTiltAxisCorr; // Tilting axis corr.
};
Leica TPS1200 – Version 1.50 143
GeoCOM Reference Manual Theodolite Measurement and Calculation – TMC
17.4
MEASUREMENT FUNCTIONS
17.4.1
TMC_GetCoordinate - getting the coordinates of a measured point
TMC_GetCoordinate..................................................................................................................................................................................................................................................................
............
2082 ................................................................................................................................................................................................................................................................TMC_GetCoord
inate
............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ 2082
C-Declaration
TMC_GetCoordinate(SYSTIME WaitTime,
TMC_COORDINATE &Coordinate,
TMC_INCLINE_PRG Mode)
VB-Declaration
VB_TMC_GetCoordinate1(ByVal WaitTime As Long,
Coordinate As TMC_COORDINATE,
ByVal Mode As Long)
ASCII-Request
%R1Q,2082: WaitTime[long],Mode[long]
ASCII-Response
%R1P,0,0: RC,E[double],N[double],H[double],CoordTime[long],
E-Cont[double],N-Cont[double],H-Cont[double],CoordContTime[long]
Remarks
This function queries an angle measurement and, in dependence of the selected Mode , an inclination measurement and calculates the co-ordinates of the measured point with an already measured distance. A distance measurement has to be started in advance. The WaitTime is a delay to wait for the distance measurement to finish. Single and tracking measurements are supported. Information about a missing distance measurement and other information about the quality of the result is returned in the return- code.
Parameters
[ms].
Return-Code Names and Return-Code Values
GRC_OK
GRC_TMC_ACCURACY_GUARANTEE 1284
GRC_TMC_NO_FULL_CORRECTION 1283
GRC_TMC_ANGLE_OK
GRC_TMC_ANGLE_NO_ACC_
GUARANTY
GRC_TMC_ANGLE_NO_FULL_
CORRECTION
GRC_TMC_DIST_ERROR
GRC_TMC_DIST_PPM
GRC_TMC_ANGLE_ERROR
1285
1289
1288
1292
1291
1290
Accuracy is not guaranteed, because the result is containing measurement data which accuracy could not be verified by the system. Co-ordinates are available.
The results are not corrected by all active sensors. Coordinates are available.
In order to secure which correction is missing use the both functions TMC_IfDataAzeCorrError and
TMC_IfDataIncCorrError
Angle values okay, but no valid distance. Co-ordinates are not available.
Only the angle measurement is valid but its accuracy cannot be guaranteed (the tilt measurement is not available).
No distance data available but angle data are valid. The return code is equivalent to the GRC_TMC_NO_FULL_CORRECTION and relates to the angle data. Co-ordinates are not available.
Perform a distance measurement first before you call this function.
No measuring, because of missing target point, co-ordinates are not available.
Aim target point and try it again
No distance measurement respectively no distance data because of wrong EDM settings. Co-ordinates are not available.
Angle or inclination measurement error. Check inclination modes in commands.
Leica TPS1200 – Version 1.50 144
GeoCOM Reference Manual Theodolite Measurement and Calculation – TMC
GRC_TMC_BUSY 1293 TMC resource is locked respectively TMC task is busy.
Repeat measurement.
GRC_ABORT
GRC_SHUT_DOWN
8
12
Measurement through customer aborted.
System power off through customer.
See Also
TMC_DoMeasure
TMC_IfDataAzeCorrError
TMC_IfDataIncCorrError
Example
GRC_TYPE
TMC_COORDINATE
Result;
Coordinate;
// make a single distance measurement first
Result=TMC_DoMeasure(TMC_DEF_DIST, TMC_AUTO_INC); if(Result==GRC_OK)
{// before you get the coordinates
Result=TMC_GetCoordinate(1000,Coordinate,
TMC_AUTO_INC);
} switch(Result)
{// result interpretation case GRC_OK:
break;
.
.
// error handling case ...:
.
. default:
break;
}
Leica TPS1200 – Version 1.50 145
GeoCOM Reference Manual Theodolite Measurement and Calculation – TMC
17.4.2
TMC_GetSimpleMea – returning an angle and distance measurement
TMC_GetSimpleMea.............................................................................................................................................................................................................................................................................
............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ 2108
2108 ................................................................................................................................................................................................................................................................TMC_GetSimpl
eMea
C-Declaration
TMC_GetSimpleMea(SYSTIME WaitTime,
TMC_HZ_V_ANG &OnlyAngle,
double &SlopeDistance,
TMC_INCLINE_PRG Mode)
VB-Declaration
VB_TMC_GetSimpleMea(ByVal WaitTime As Long,
OnlyAngle As TMC_HZ_V_ANG,
SlopeDistance As Double,
ByVal Mode As Long)
ASCII-Request
%R1Q,2108: WaitTime[long],Mode[long]
ASCII-Response
%R1P,0,0: RC,Hz[double],V[double],SlopeDistance[double]
Remarks
This function returns the angles and distance measurement data. This command does not issue a new distance measurement. A distance measurement has to be started in advance. If a distance measurement is valid the function ignores WaitTime and returns the results. If no valid distance measurement is available and the distance measurement unit is not activated (by TMC_DoMeasure before the TMC_GetSimpleMea call) the angle measurement result is returned after the waittime. Information about distance measurement is returned in the return code.
Parameters
[ms].
Return-Code Names and Return-Code Values
GRC_OK
GRC_TMC_NO_FULL_CORRECTION 1283
GRC_TMC_ACCURACY_GUARANTEE 1284
GRC_TMC_ANGLE_OK
GRC_TMC_ANGLE_NO_FULL_
CORRECTION
GRC_TMC_ANGLE_NO_ACC_
GUARANTY
GRC_TMC_DIST_ERROR
GRC_TMC_DIST_PPM
1285
1288
1289
1292
1291
The results are not corrected by all active sensors. Angle and distance data are available.
In order to secure which correction is missing use the both functions TMC_IfDataAzeCorrError and
TMC_IfDataIncCorrError
This message is to be considered as a warning.
Accuracy is not guaranteed because the result consists of data which accuracy could not be verified by the system. Angle and distance data are available.
Angle values okay, but no valid distance.
Perform a distance measurement previously.
No distance data available but angle data are valid. The return code is equivalent to the GRC_TMC_NO_FULL_CORRECTION and relates to the angle data.
Perform a distance measurement first before you call this function.
Only the angle measurement is valid but its accuracy cannot be guaranteed (the tilt measurement is not available).
No measurement because of missing target point, angle data are available but distance data are not available.
Aim at target point and try it again.
No distance measurement respectively no distance data because of wrong EDM settings. Angle data are available but distance data are not available.
Leica TPS1200 – Version 1.50 146
GeoCOM Reference Manual Theodolite Measurement and Calculation – TMC
GRC_TMC_ANGLE_ERROR
GRC_TMC_BUSY
1290
1293
Angle or inclination measurement error. Check inclination modes in commands.
TMC resource is locked respectively TMC task is busy.
Distance and angle data are not available.
Repeat measurement.
Measurement through customer aborted.
System power off through customer.
GRC_ABORT
GRC_SHUT_DOWN
8
12
See Also
TMC_DoMeasure
TMC_GetAngle5
Example
GRC_TYPE rc;
TMC_HZ_V_ANG OnlyAngle; double SlopeDistance;
// activate distance measurement rc = TMC_DoMeasure(TMC_DEF_DIST, TMC_AUTO_INC); if (rc == GRC_OK)
{
// distance measurement successful
rc = TMC_GetSimpleMea(3000, OnlyAngle,
SlopeDistance, TMC_MEA_INC);
if (rc == GRC_OK)
{
// use distance and angle values
else
{
// something with TMC_GetSimpleMea went wrong
} else
{
// something with dist. measurement went wrong
}
Leica TPS1200 – Version 1.50 147
GeoCOM Reference Manual Theodolite Measurement and Calculation – TMC
17.4.3
TMC_GetAngle1 – returning a complete angle measurement
TMC_GetAngle1............................................................................................................................................................................................................................................................................
.................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... 2003
2003 ................................................................................................................................................................................................................................................................TMC_GetAngle
1
C-Declaration
TMC_GetAngle(TMC_ANGLE &Angle,
TMC_INCLINE_PRG Mode)
VB-Declaration
VB_TMC_GetAngle1(Angle As TMC_ANGLE,
ByVal Mode As Long)
ASCII-Request
%R1Q,2003: Mode[long]
ASCII-Response
%R1P,0,0: RC,Hz[double],V[double],AngleAccuracy[double],
AngleTime[long],CrossIncline[double],LengthIncline[double], AccuracyIncline[double],InclineTime[long],FaceDef[long]
Remarks
This function carries out an angle measurement and, in dependence of configuration, inclination measurement and returns the results. As shown the result is very comprehensive. For simple angle measurements use
TMC_GetAngle5 or TMC_GetSimpleMea instead.
Information about measurement is returned in the return code.
Parameters
Return-Code Names and Return-Code Values
GRC_OK
GRC_TMC_ACCURACY_GUARANTEE 1284
GRC_TMC_NO_FULL_CORRECTION 1283
GRC_TMC_ANGLE_OK
GRC_TMC_ANGLE_NO_ACC_
GUARANTY
GRC_TMC_ANGLE_NO_FULL_
CORRECTION
GRC_TMC_DIST_ERROR
GRC_TMC_DIST_PPM
GRC_TMC_ANGLE_ERROR
GRC_TMC_BUSY
GRC_ABORT
GRC_SHUT_DOWN
See Also
TMC_DoMeasure
1285
1289
1288
1292
1291
1290
1293
8
12
Accuracy is not guaranteed, because the result are consist of measuring data which accuracy could not be verified by the system. Co-ordinates are available.
The results are not corrected by all active sensors. Coordinates are available.
In order to secure which correction is missing use the both functions TMC_IfDataAzeCorrError and
TMC_IfDataIncCorrError
Angle values okay, but no valid distance. Co-ordinates are not available.
Only the angle measurement is valid but its accuracy cannot be guaranteed (the tilt measurement is not available).
No distance data available but angle data are valid. The return code is equivalent to the GRC_TMC_NO_FULL_CORRECTION and relates to the angle data. Co-ordinates are not available.
Perform a distance measurement first before you call this function.
No measuring, because of missing target point, co-ordinates are not available.
Aim target point and try it again
No distance measurement respectively no distance data because of wrong EDM settings. Co-ordinates are not available.
Angle or inclination measurement error. Check inclination modes in commands.
TMC resource is locked respectively TMC task is busy.
Repeat measurement.
Measurement through customer aborted.
System power off through customer.
Leica TPS1200 – Version 1.50 148
GeoCOM Reference Manual
TMC_GetAngle5
TMC_GetSimpleMea
Example see TMC_GetAngle5
Theodolite Measurement and Calculation – TMC
Leica TPS1200 – Version 1.50 149
GeoCOM Reference Manual Theodolite Measurement and Calculation – TMC
17.4.4
TMC_GetAngle5 – returning a simple angle measurement
TMC_GetAngle5............................................................................................................................................................................................................................................................................
.................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... 2107
2107 ................................................................................................................................................................................................................................................................TMC_GetAngle
5
C-Declaration
TMC_GetAngle(TMC_HZ_V_ANG &OnlyAngle,
TMC_INCLINE_PRG Mode)
VB-Declaration
VB_TMC_GetAngle5(OnlyAngle As TMC_HZ_V_ANG,
ByVal Mode As Long)
ASCII-Request
%R1Q,2107: Mode[long]
ASCII-Response
%R1P,0,0: RC,Hz[double],V[double]
Remarks
This function carries out an angle measurement and returns the results. In contrast to the function
TMC_GetAngle1 this function returns only the values of the angle. For simple angle measurements use
TMC_GetSimpleMea instead.
Information about measurement is returned in the return code.
Parameters
Return-Code Names and Return-Code Values
GRC_OK
GRC_TMC_ACCURACY_GUARANTEE 1284
GRC_TMC_NO_FULL_CORRECTION 1283
GRC_TMC_ANGLE_OK
GRC_TMC_ANGLE_NO_ACC_
GUARANTY
GRC_TMC_ANGLE_NO_FULL_
CORRECTION
GRC_TMC_DIST_ERROR
GRC_TMC_DIST_PPM
GRC_TMC_ANGLE_ERROR
GRC_TMC_BUSY
GRC_ABORT
GRC_SHUT_DOWN
See Also
TMC_DoMeasure
TMC_GetAngle5
1285
1289
1288
1292
1291
1290
1293
8
12
Accuracy is not guaranteed, because the result are consist of measuring data which accuracy could not be verified by the system. Co-ordinates are available.
The results are not corrected by all active sensors. Coordinates are available.
In order to secure which correction is missing use the both functions TMC_IfDataAzeCorrError and
TMC_IfDataIncCorrError
Angle values okay, but no valid distance. Co-ordinates are not available.
Only the angle measurement is valid but its accuracy cannot be guaranteed (the tilt measurement is not available).
No distance data available but angle data are valid. The return code is equivalent to the GRC_TMC_NO_FULL_CORRECTION and relates to the angle data. Co-ordinates are not available.
Perform a distance measurement first before you call this function.
No measuring, because of missing target point, co-ordinates are not available.
Aim target point and try it again
No distance measurement respectively no distance data because of wrong EDM settings. Co-ordinates are not available.
Angle or inclination measurement error. Check inclination modes in commands.
TMC resource is locked respectively TMC task is busy.
Repeat measurement.
Measurement through customer aborted.
System power off through customer.
Leica TPS1200 – Version 1.50 150
GeoCOM Reference Manual Theodolite Measurement and Calculation – TMC
TMC_GetSimpleMea
Example
GRC_TYPE Result;
TMC_ANGLE Angle;
BOOLE bExit,
bAzeCorrError,
bIncCorrError; short nCnt; nCnt=0; do
{ bExit=TRUE;
// Gets the whole angle data
Result=TMC_GetAngle(Angle, TMC_AUTO_INC); switch(Result)
{ case GRC_OK:
// Execution successful
break; case GRC_TMC_NO_FULL_CORRECTION:
TMC_IfDataAzeCorrError(bAzeCorrError);
TMC_IfDataIncCorrError(bIncCorrError);
if(bAzeCorrError)
{
// coordinates are not corrected with the Aze-
// deviation correction
}
if(bIncCorrError)
{
// coordinates are not corrected with the
// incline correction
}
break; case GRC_TMC_ACCURACY_GUARANTEE:
// perform a forced incline measurement,
// see example TMC_QuickDist
break; case GRC_TMC_BUSY:
// repeat measurement
bExit=FALSE; case GRC_ABORT: case GRC_SHUT_DOWN: default:
break;
}// end switch nCnt++;
}while(!bExit && nCnt<3);
Leica TPS1200 – Version 1.50 151
GeoCOM Reference Manual Theodolite Measurement and Calculation – TMC
17.4.5
TMC_QuickDist - returning a slope distance and hz-angle, v-angle
TMC_QuickDist.............................................................................................................................................................................................................................................................................
.................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... 2117
2117 ................................................................................................................................................................................................................................................................TMC_QuickDis
t
C-Declaration double &dSlopeDistance)
VB-Declaration
VB_TMC_QuickDist( OnlyAngle As
TMC_HZ_V_ANG,
ASCII- Request
%R1Q,2117:
ASCII-Response
%R1P,0,0: RC,dHz[double],dV[double],dSlopeDistance[double]
Remarks
The function starts an EDM Tracking measurement and waits until a distance is measured. Then it returns the angle and the slope-distance, but no co-ordinates. If no distance can be measured, it returns the angle values (hz, v) and the corresponding return-code.
In order to abort the current measuring program use the function TMC_DoMeasure .
Parameters
Return-Code Names and Return-Code Values
GRC_OK
GRC_TMC_ACCURACY_GUARANTEE 1284
GRC_TMC_NO_FULL_CORRECTION 1283
GRC_TMC_ANGLE_OK
GRC_TMC_ANGLE_NO_ACC_
GUARANTY
GRC_TMC_ANGLE_NO_FULL_
CORRECTION
GRC_TMC_DIST_ERROR
GRC_TMC_DIST_PPM
GRC_TMC_ANGLE_ERROR
GRC_TMC_BUSY
GRC_ABORT
GRC_SHUT_DOWN
1285
1289
1288
1292
1291
1290
1293
8
12
Accuracy is not guaranteed, because the result are consist of measuring data which accuracy could not be verified by the system. Co-ordinates are available.
The results are not corrected by all active sensors. Coordinates are available.
In order to secure which correction is missing use the both functions TMC_IfDataAzeCorrError and
TMC_IfDataIncCorrError
Angle values okay, but no valid distance. Co-ordinates are not available.
Only the angle measurement is valid but its accuracy cannot be guaranteed (the tilt measurement is not available).
No distance data available but angle data are valid. The return code is equivalent to the GRC_TMC_NO_FULL_CORRECTION and relates to the angle data. Co-ordinates are not available.
Perform a distance measurement first before you call this function.
No measuring, because of missing target point, co-ordinates are not available.
Aim target point and try it again
No distance measurement respectively no distance data because of wrong EDM settings. Co-ordinates are not available.
Angle or inclination measurement error. Check inclination modes in commands.
TMC resource is locked respectively TMC task is busy.
Repeat measurement.
Measurement through customer aborted.
System power off through customer.
Leica TPS1200 – Version 1.50 152
GeoCOM Reference Manual Theodolite Measurement and Calculation – TMC
See Also
TMC_GetAngle
TMC_DoMeasure
TMC_IfDataAzeCorrError
TMC_IfDataIncCorrError
Example const short MAX=100;// number of measurements const double STATIC_TIME=4.0;// in seconds const double MAX_DIFFERENCE=0.0002// in rad
GRC_TYPE Result;
TMC_ANG_SWITCH SwCorr;
TMC_HZ_V_ANG HzVAng;
TMC_ANGLE AngleDummy;
BOOLE bExit;
DATIME Datime; double dSlopeDist,
dLastHzAng,
dhz_angle_diff, short nNoMeasurements;
TMC_GetAngSwitch(SwCorr);
SwCorr.eInclineCorr=ON; // measure rate will be
SwCorr.eStandAxisCorr=ON; // reduced if angle and
SwCorr.eCollimationCorr=ON;// incline correction are
SwCorr.eTiltAxisCorr=ON; // activated
TMC_DoMeasure(TMC_CLEAR); // clear distance first
TMC_SetAngSwitch(SwCorr); // before you can set the
// ANG switches, the
// distance must be
// cleared
CSV_GetDateTime(Datime); dstart_time=Datime.Time.Minute*60+
Datime.Time.Second;
// starts the rapid tracking dist. measurement program
TMC_QuickDist(HzVAng, dSlopeDist); bExit=FALSE; nNoMeasurements=0; do
{
dLastHzAng=HzVAng.dHz;
switch(Result)
{
// distance- and angles- data available
// perform a forced incline measurement
// caution: the calculation at zero rad is
// not consider
dhz_angle_diff=fabs(dLastHzAng-
HzVAng.dHz);
if(dhz_angle_diff<MAX_DIFFERENCE)
{// instrument is in static period
CSV_GetDateTime(Datime);
dact_time=Datime.Time.Minute*60+
Datime.Time.Second;
{// static mode exceeding 3-4 sec
TMC_GetAngle(TMC_MEA_INC,
AngleDummy);
TMC_GetAngle(TMC_MEA_INC,
Leica TPS1200 – Version 1.50 153
GeoCOM Reference Manual Theodolite Measurement and Calculation – TMC
AngleDummy);
}
}
else
{// instrument is not in static period
CSV_GetDateTime(Datime);
dstart_time=Datime.Time.Minute*60+
Datime.Time.Second;
} case GRC_TMC_NO_FULL_CORRECTION:
break;
// no distance data available
break;
// neither angle- nor distance- data available
default:
bExit=TRUE;
break;
}
} while(!bExit && nNoMeasurements<MAX);
TMC_DoMeasure(TMC_STOP);// stop measureprogram
Leica TPS1200 – Version 1.50 154
GeoCOM Reference Manual Theodolite Measurement and Calculation – TMC
17.4.6
TMC_GetFullMeas – returning an angle, inclination and distance measurement
TMC_QuickDist.............................................................................................................................................................................................................................................................................
.................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... 2117
2117 ................................................................................................................................................................................................................................................................TMC_QuickDist
TMC_GetSimpleMea......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... 2108
2108 ................................................................................................................................................................................................................................................................TMC_GetSimpl
eMea
C-Declaration
TMC_GetFullMeas (SYSTIME WaitTime,
double &rdHzAngle,
double &rdVAngle,
double &rdAccuracyAngle,
double &rdCrossIncl,
double &rdLengthIncl,
double &rdAccuracyIncl,
double &rdSlopeDist,
double &rdDistTime,
TMC_INCLINE_PRG Mode)
VB-Declaration
VB_TMC_GetFullMeas(ByVal WaitTime As Long,
HzAngle As Double,
VAngle As Double,
AccuracyAngle As Double,
CrossIncl As Double,
LengthIncl As Double,
AccuracyIncl As Double,
SlopeDist As Double,
DistTime As Double,
ByVal Mode As Long)
ASCII-Request
%R1Q,2167: WaitTime[long],Mode[long]
ASCII-Response
%R1P,0,0: RC,Hz[double],V[double],AccAngle[double],C[double],L[double],AccIncl[double],SlopeDist[double],
DistTime[double]
Remarks
This function returns angle, inclination and distance measurement data including accuracy and distance measurement time. This command does not issue a new distance measurement. A distance measurement has to be started in advance. If a distance measurement is valid the function ignores WaitTime and returns the results.
If no valid distance measurement is available and the distance measurement unit is not activated (by
TMC_DoMeasure before the TMC_GetFullMeas call) the angle measurement result is returned after the waiting time. Information about distance measurement is returned in the return code.
Parameters
[ms].
Return-Code Names and Return-Code Values
GRC_OK
GRC_TMC_NO_FULL_CORRECTION 1283
GRC_TMC_ACCURACY_GUARANTEE 1284
The results are not corrected by all active sensors. Angle and distance data are available.
In order to secure which correction is missing use the both functions TMC_IfDataAzeCorrError and
TMC_IfDataIncCorrError
This message is to be considered as a warning.
Accuracy is not guaranteed because the result consists of data
Leica TPS1200 – Version 1.50 155
GeoCOM Reference Manual Theodolite Measurement and Calculation – TMC
GRC_TMC_ANGLE_OK
GRC_TMC_ANGLE_NO_FULL_
CORRECTION
GRC_TMC_ANGLE_NO_ACC_
GUARANTY
GRC_TMC_DIST_ERROR
GRC_TMC_DIST_PPM
GRC_TMC_ANGLE_ERROR
GRC_TMC_BUSY
1285
1288
1289
1292
1291
1290
1293 which accuracy could not be verified by the system. Angle and distance data are available.
Angle values okay, but no valid distance.
Perform a distance measurement previously.
No distance data available but angle data are valid. The return code is equivalent to the GRC_TMC_NO_FULL_CORRECTION and relates to the angle data.
Perform a distance measurement first before you call this function.
Only the angle measurement is valid but its accuracy cannot be guaranteed (the tilt measurement is not available).
No measurement because of missing target point, angle data are available but distance data are not available.
Aim at target point and try it again.
No distance measurement respectively no distance data because of wrong EDM settings. Angle data are available but distance data are not available.
Angle or inclination measurement error. Check inclination modes in commands.
TMC resource is locked respectively TMC task is busy.
Distance and angle data are not available.
Repeat measurement.
Measurement through customer aborted.
System power off through customer.
GRC_ABORT
GRC_SHUT_DOWN
8
12
See Also
TMC_DoMeasure
TMC_GetAngle5
Example
GRC_TYPE rc; double HzAngle, VAngle, AccuracyAngle; double double
CrossIncl, LenIncl, AccuracyIncl;
SlopeDistance, DistTime;
// activate distance measurement rc = TMC_DoMeasure(TMC_DEF_DIST, TMC_AUTO_INC); if (rc == GRC_OK)
{
// distance measurement successful
rc = TMC_GetFullMeas(3000, HzAngle, VAngle, AccuracyAngle,
if (rc == GRC_OK)
{
// use distance and angle values
else
{
// something with TMC_GetFullMeas went wrong
} else
{
// something with dist. measurement went wrong
}
Leica TPS1200 – Version 1.50 156
GeoCOM Reference Manual Theodolite Measurement and Calculation – TMC
17.5
MEASUREMENT CONTROL FUNCTIONS
17.5.1
TMC_DoMeasure.......................................................................................................................................................................................................................................................................
2008 ................................................................................................................................................................................................................................................................TMC_DoMeasu
re
C-Declaration
TMC_DoMeasure - carrying out a distance measurement
TMC_DoMeasure(TMC_MEASURE_PRG Command,
TMC_INCLINE_PRG Mode)
VB-Declaration
VB_TMC_DoMeasure(ByVal Command As Long,
ByVal Mode As Long)
ASCII-Request
%R1Q,2008: Command[long],Mode[long]
ASCII-Response
%R1P,0,0: RC
Remarks
This function carries out a distance measurement according to the TMC measurement mode like single distance, tracking,... . Please note that this command does not output any values (distances). In order to get the values you have to use other measurement functions such as TMC_GetCoordinate , TMC_GetSimpleMea,
TMC_GetFullMeas or else TMC_GetAngle .
The result of the distance measurement is kept in the instrument and is valid to the next TMC_DoMeasure command where a new distance is requested or the distance is clear by the measurement program TMC_CLEAR .
Note: If you perform a distance measurement with the measure program TMC_DEF_DIST, the distance sensor will work with the set EDM mode, see TMC_SetEdmMode.
Parameters
Return-Code Names and Return-Code Values
GRC_OK
See Also
TMC_SetEdmMode
TMC_GetCoordinate
TMC_GetSimpleMea
TMC_GetAngle1
TMC_GetAngle5
Example
GRC_TYPE Result; short nCnt;
// set average mode
Result=TMC_SetEdmMode(EDM_CONT_EXACT);
// perform a single distance measurement
Result=TMC_DoMeasure(TMC_DEF_DIST); nCnt=0; while(nCnt<100)
{// wait on the distance data max. 100x100ms
Result=TMC_GetCoordinate(100,Coordinate,
TMC_AUTO_INC);
nCnt++;
}
// to complete the measurement, and clear data
TMC_DoMeasure(TMC_CLEAR);
// set standard mode
TMC_SetEdmMode(EMD_SINGLE_STANDARD);
Leica TPS1200 – Version 1.50 157
GeoCOM Reference Manual Theodolite Measurement and Calculation – TMC
17.5.2
TMC_SetHandDist - inputing a slope distance and height offset
TMC_SetHandDist.............................................................................................................................................................................................................................................................................
................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ 2019
2019 ................................................................................................................................................................................................................................................................TMC_SetHandD
ist
C-Declaration
TMC_SetHandDist(double SlopeDistance,
double HgtOffset,
TMC_INCLINE_PRG Mode)
VB-Declaration
VB_TMC_SetHandDist(ByVal SlopeDistance As Double,
ByVal HgtOffset As Double,
ByVal Mode As Long)
ASCII-Request
%R1Q,2019: SlopeDistance[double],HgtOffset[double],Mode[long]
ASCII-Response
%R1P,0,0: RC
Remarks
This function is used to input manually measured slope distance and height offset for a following measurement.
Additionally an inclination measurement and an angle measurement are carried out to determine the co-ordinates of target. The V-angle is corrected to
π
/2 or 3
⋅π
/2 in dependence of the instrument’s face because of the manual input.
After this command the previous measured distance is cleared.
Parameters
Return-Code Names and Return-Code Values
GRC_OK
GRC_TMC_ACCURACY_GUARANTEE 1284
GRC_TMC_NO_FULL_CORRECTION 1283
GRC_TMC_ANGLE_OK
GRC_TMC_ANGLE_NO_ACC_
GUARANTY
GRC_TMC_ANGLE_NO_FULL_
CORRECTION
GRC_TMC_DIST_ERROR
GRC_TMC_DIST_PPM
GRC_TMC_ANGLE_ERROR
GRC_TMC_BUSY
GRC_ABORT
1285
1289
1288
1292
1291
1290
1293
8
Accuracy is not guaranteed, because the result are consist of measuring data which accuracy could not be verified by the system. Co-ordinates are available.
The results are not corrected by all active sensors. Coordinates are available.
In order to secure which correction is missing use the both functions TMC_IfDataAzeCorrError and
TMC_IfDataIncCorrError
Angle values okay, but no valid distance. Co-ordinates are not available.
Only the angle measurement is valid but its accuracy cannot be guaranteed (the tilt measurement is not available).
No distance data available but angle data are valid. The return code is equivalent to the GRC_TMC_NO_FULL_CORRECTION and relates to the angle data. Co-ordinates are not available.
Perform a distance measurement first before you call this function.
No measuring, because of missing target point, co-ordinates are not available.
Aim target point and try it again
No distance measurement respectively no distance data because of wrong EDM settings. Co-ordinates are not available.
Angle or inclination measurement error. Check inclination modes in commands.
TMC resource is locked respectively TMC task is busy.
Repeat measurement.
Measurement through customer aborted.
Leica TPS1200 – Version 1.50 158
GeoCOM Reference Manual Theodolite Measurement and Calculation – TMC
GRC_SHUT_DOWN 12 System power off through customer.
See Also
TMC_IfDataAzeCorrError
TMC_IfDataIncCorrError
Example
GRC_TYPE
TMC_COORDINATE rc;
Coordinate rc = VB_TMC_SetHandDist(10, 1, TMC_AUTO_INC) if (rc == GRC_OK)
{
// calculate coordinates
rc=TMC_GetCoordinate(1000,Coordinate,TMC_AUTO_INC)
if (rc == GRC_OK)
{
// use coordinates
else
{
// something went wrong
}
}
Leica TPS1200 – Version 1.50 159
GeoCOM Reference Manual Theodolite Measurement and Calculation – TMC
17.6
DATA SETUP FUNCTIONS
17.6.1
TMC_GetHeight - returning the current reflector height
TMC_GetHeight.........................................................................................................................................................................................................................................................................
2011 ................................................................................................................................................................................................................................................................TMC_GetHeigh
t
....
.................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... 2011
C-Declaration
TMC_GetHeight(TMC_HEIGHT &Height)
VB-Declaration
VB_TMC_GetHeight(Height As TMC_HEIGHT)
ASCII-Request
%R1Q,2011:
ASCII-Response
%R1P,0,0: RC,Height[double]
Remarks
This function returns the current reflector height.
Parameters
Return-Code Names and Return-Code Values
GRC_OK
See Also
TMC_SetHeight
Example
GRC_TYPE rc;
TMC_HEIGHT Height, NewHeight;
// reset reflector height to 0
// if it is not already rc = TMC_GetHeight(Height); if (Height.dHr != 0)
{
NewHeight.dHr = 0;
rc = TMC_SetHeight(NewHeight);
if (rc == GRC_OK)
{
// set of height successful
}
else
{
// TMC is busy, no set possible
}
}
Leica TPS1200 – Version 1.50 160
GeoCOM Reference Manual Theodolite Measurement and Calculation – TMC
17.6.2
TMC_SetHeight – setting a new reflector height
TMC_SetHeight..............................................................................................................................................................................................................................................................................
.................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... 2012
2012 ................................................................................................................................................................................................................................................................TMC_SetHeight
C-Declaration
TMC_SetHeight(TMC_HEIGHT Height)
VB-Declaration
VB_TMC_SetHeight(ByVal Height As TMC_HEIGHT)
ASCII-Request
%R1Q,2012: Height[double]
ASCII-Response
%R1P,0,0: RC
Remarks
This function sets a new reflector height.
Parameters
Return-Code Names and Return-Code Values
GRC_OK
GRC_TMC_BUSY 1293
GRC_IVPAR 2
TMC resource is locked respectively TMC task is busy. The reflector height is not set.
Repeat measurement.
A reflector height less than 10m or greater than 100m is entered. Invalid parameter.
See Also
TMC_GetHeight
Example see TMC_GetHeight
Leica TPS1200 – Version 1.50 161
GeoCOM Reference Manual Theodolite Measurement and Calculation – TMC
17.6.3
TMC_GetAtmCorr – getting the atmospheric correction parameters
TMC_GetAtmCorr.............................................................................................................................................................................................................................................................................
................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ 2029
2029 ................................................................................................................................................................................................................................................................TMC_GetAtmC
orr
C-Declaration
TMC_GetAtmCorr
(TMC_ATMOS_TEMPERATURE &AtmTemperature)
VB-Declaration
VB_TMC_GetAtmCorr
(AtmTemperature As TMC_ATMOS_TEMPERATURE)
ASCII-Request
%R1Q,2029:
ASCII-Response
%R1P,0,0: RC,Lambda[double],Pressure[double], DryTemperature[double],WetTemperature[double]
Remarks
This function is used to get the parameters for the atmospheric correction.
Parameters
Return-Code Names and Return-Code Values
GRC_OK
See Also
TMC_SetAtmCorr
Example see TMC_SetAtmCorr
Leica TPS1200 – Version 1.50 162
GeoCOM Reference Manual Theodolite Measurement and Calculation – TMC
17.6.4
TMC_SetAtmCorr – setting the atmospheric correction parameters
TMC_SetAtmCorr..............................................................................................................................................................................................................................................................................
................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ 2028
2028 ................................................................................................................................................................................................................................................................TMC_SetAtmCo
rr
C-Declaration
TMC_SetAtmCorr
(TMC_ATMOS_TEMPERATURE AtmTemperature)
VB-Declaration
VB_TMC_SetAtmCorr
(ByVal AtmTemperature As TMC_ATMOS_TEMPERATURE)
ASCII-Request
%R1Q,2028: Lambda[double],Pressure[double], DryTemperature[double],WetTemperature[double]
ASCII-Response
%R1P,0,0: RC,
Remarks
This function is used to set the parameters for the atmospheric correction.
Parameters
Return-Code Names and Return-Code Values
GRC_OK
See Also
TMC_GetAtmCorr
Example
TMC_ATMOS_TEMPERATURE AtmCorr;
TMC_GetAtmCorr(AtmCorr);
// set new wet and dry temperature
AtmCorr.dDryTemperature=60;
AtmCorr.dWetTemperature=80;
TMC_SetAtmCorr(AtmCorr);
Leica TPS1200 – Version 1.50 163
GeoCOM Reference Manual Theodolite Measurement and Calculation – TMC
17.6.5
TMC_SetOrientation - orientating the instrument in hz-direction
TMC_SetOrientation..............................................................................................................................................................................................................................................................................
............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ 2113
2113 ................................................................................................................................................................................................................................................................TMC_SetOrient
ation
C-Declaration
TMC_SetOrientation(double HzOrientation)
VB-Declaration
VB_TMC_SetOrientation(ByVal HzOrientation As Double)
ASCII-Request
%R1Q,2113: HzOrientation[double]
ASCII-Response
%R1P,0,0: RC
Remarks
This function is used to orientate the instrument in Hz direction. It is a combination of an angle measurement to get the Hz offset and afterwards setting the angle Hz offset in order to orientates onto a target. Before the new orientation can be set an existing distance must be cleared (use TMC_DoMeasure with the command =
TMC_CLEAR ).
Parameters
Return-Code Names and Return-Code Values
GRC_OK
GRC_TMC_ACCURACY_GUARANTEE 1284
GRC_TMC_NO_FULL_CORRECTION 1283
GRC_TMC_ANGLE_OK
GRC_TMC_ANGLE_NO_ACC_
GUARANTY
GRC_TMC_ANGLE_NO_FULL_
CORRECTION
GRC_TMC_DIST_ERROR
GRC_TMC_DIST_PPM
GRC_TMC_ANGLE_ERROR
GRC_TMC_BUSY
GRC_ABORT
GRC_SHUT_DOWN
See Also
TMC_IfDataAzeCorrError
TMC_IfDataIncCorrError
TMC_DoMeasure
1285
1289
1288
1292
1291
1290
1293
8
12
Accuracy is not guaranteed, because the result are consist of measuring data which accuracy could not be verified by the system. Co-ordinates are available.
The results are not corrected by all active sensors. Coordinates are available.
In order to secure which correction is missing use the both functions TMC_IfDataAzeCorrError and
TMC_IfDataIncCorrError
Angle values okay, but no valid distance. Co-ordinates are not available.
Only the angle measurement is valid but its accuracy cannot be guaranteed (the tilt measurement is not available).
No distance data available but angle data are valid. The return code is equivalent to the GRC_TMC_NO_FULL_CORRECTION and relates to the angle data. Co-ordinates are not available.
Perform a distance measurement first before you call this function.
No measuring, because of missing target point, co-ordinates are not available.
Aim target point and try it again
No distance measurement respectively no distance data because of wrong EDM settings. Co-ordinates are not available.
Angle or inclination measurement error. Check inclination modes in commands.
TMC resource is locked respectively TMC task is busy.
Repeat measurement.
Measurement through customer aborted.
System power off through customer.
Leica TPS1200 – Version 1.50 164
GeoCOM Reference Manual
Example
GRC_TYPE Result;
// clear existing distance first
TMC_DoMeasure(TMC_CLEAR);
// set orientation to 0
Result=TMC_SetOrientation(0.0); if(Result!=GRC_OK)
{
// error or warning handling
}
Theodolite Measurement and Calculation – TMC
Leica TPS1200 – Version 1.50 165
GeoCOM Reference Manual Theodolite Measurement and Calculation – TMC
17.6.6
TMC_GetPrismCorr - getting the prism constant
TMC_GetPrismCorr...............................................................................................................................................................................................................................................................................
............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ 2023
2023 ................................................................................................................................................................................................................................................................TMC_GetPrismC
orr
C-Declaration
TMC_GetPrismCorr(double &PrismCorr)
VB-Declaration
VB_TMC_GetPrismCorr(PrismCorr As Double)
ASCII-Request
%R1Q,2023:
ASCII-Response
%R1P,0,0: RC,PrismCorr[double]
Remarks
This function is used to get the prism constant.
Parameters
Return-Code Names and Return-Code Values
GRC_OK
See Also
TMC_SetPrismCorr
Example const double Corr = 0.1;
GRC_TYPE rc; double PrismCorr;
// set the prism constant to
// 0.1 if not already set rc = TMC_GetPrismCorr(PrismCorr); if (PrismCorr != Corr)
{
rc = TMC_SetPrismCorr(Corr);
if (rc == GRC_OK)
{
// set of prisma corr successful
}
else
{
// Invalid parameter
}
}
Leica TPS1200 – Version 1.50 166
GeoCOM Reference Manual Theodolite Measurement and Calculation – TMC
17.6.7
TMC_GetRefractiveCorr – getting the refraction coefficient
TMC_GetRefractiveCorr ...........................................................................................................................................................................................................................................................................
........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ 2031
2031 ................................................................................................................................................................................................................................................................TMC_GetRefrac
tiveCorr
C-Declaration
TMC_GetRefractiveCorr(TMC_REFRACTION &Refractive)
VB-Declaration
VB_TMC_GetRefractiveCorr
(Refractive As TMC_REFRACTION)
ASCII-Request
%R1Q,2031:
ASCII-Response
%R1P,0,0: RC,RefOn[boolean],EarthRadius[double], RefractiveScale[double]
Remarks
This function is used to get the refraction coefficient for correction of measured height difference.
Parameters
Return-Code Names and Return-Code Values
GRC_OK
See Also
TMC_SetRefractiveCorr
Example const double
GRC_TYPE
EarthRadius = 6378000; rc;
TMC_REFRACTION Refractive;
// check the earth radius setting
// and reset if necessary rc = TMC_GetRefractiveCorr(Refractive); if (Refractive.dEarthRadius != EarthRadius)
{
Refractive.dEarthRadius = EarthRadius;
rc = TMC_SetRefractiveCorr(Refractive);
if (rc == GRC_OK)
{
// set of earth radius successful
}
else
{
// set not successful (subsystem busy)
}
}
Leica TPS1200 – Version 1.50 167
GeoCOM Reference Manual Theodolite Measurement and Calculation – TMC
17.6.8
TMC_SetRefractiveCorr - setting the refraction coefficient
TMC_SetRefractiveCorr............................................................................................................................................................................................................................................................................
........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ 2030
2030 ................................................................................................................................................................................................................................................................TMC_SetRefrac
tiveCorr
C-Declaration
TMC_SetRefractiveCorr(TMC_REFRACTION Refractive)
VB-Declaration
VB_TMC_SetRefractiveCorr
(ByVal Refractive As TMC_REFRACTION)
ASCII-Request
%R1Q,2030: RefOn[boolean],EarthRadius[double], RefractiveScale[double]
ASCII-Response
%R1P,0,0: RC
Remarks
This function is used to set the refraction distortion coefficient for correction of measured height difference.
Parameters
Return-Code Names and Return-Code Values
GRC_OK
GRC_TMC_BUSY 1293 TMC resource is locked respectively TMC task is busy. The refraction distortion factor is not set.
Repeat measurement.
GRC_IVRESULT
GRC_SETINCOMPLETE
See Also
TMC_GetRefractiveCorr
Example see TMC_GetRefractiveCorr
7 Invalid number of parameters.
Leica TPS1200 – Version 1.50 168
GeoCOM Reference Manual Theodolite Measurement and Calculation – TMC
17.6.9
TMC_GetRefractiveMethod – getting the refraction model
TMC_GetRefractiveMethod...............................................................................................................................................................................................................................................................................
............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... 2091
2091 ................................................................................................................................................................................................................................................................TMC_GetRefrac
tiveMethod
C-Declaration
TMC_GetRefractiveMethod(unsigned short &Method)
VB-Declaration
VB_TMC_GetRefractiveMethod(Method As Integer)
ASCII-Request
%R1Q,2091:
ASCII-Response
%R1P,0,0: RC,Method[unsigned short]
Remarks
This function is used to get the current refraction model. Note that changing the refraction method is not indicated on the instrument’s interface.
Parameters
Method = 1 means method 1 (for the rest of the world)
Method = 2 means method 2 (for Australia)
Return-Code Names and Return-Code Values
GRC_OK
See Also
TMC_SetRefractiveMethod
Example const unsigned short
GRC_TYPE unsigned short
RefractiveMethod = 1; rc;
Method;
// set the refractive methode to 1
// if it is not already rc = TMC_GetRefractiveMethod(Method); if (Method != RefractiveMethod)
{
rc = TMC_SetRefractiveMethod(RefractiveMethod);
if (rc == GRC_OK)
{
// set of refractive methode successful
}
else
{
// set not successful (subsystem busy)
}
}
Leica TPS1200 – Version 1.50 169
GeoCOM Reference Manual Theodolite Measurement and Calculation – TMC
17.6.10
TMC_SetRefractiveMethod - setting the refraction model
TMC_SetRefractiveMethod................................................................................................................................................................................................................................................................................
............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... 2090
2090 ................................................................................................................................................................................................................................................................TMC_SetRefrac
tiveMethod
C-Declaration
TMC_SetRefractiveMethod(unsigned short Method)
VB-Declaration
VB_TMC_SetRefractiveMethod(ByVal Method As Integer)
ASCII-Request
%R1Q,2090: Method[unsigned short]
ASCII-Response
%R1P,0,0: RC
Remarks
This function is used to set the refraction model.
Parameters
Method = 1 means method 1 (for the rest of the world)
Method = 2 means method 2 (for Australia)
Return-Code Names and Return-Code Values
GRC_OK
GRC_TMC_BUSY 1293 TMC resource is locked respectively TMC task is busy. The refraction model is not set.
Repeat measurement.
See Also
TMC_GetRefractiveMethod
Example see TMC_GetRefractiveMethod
Leica TPS1200 – Version 1.50 170
GeoCOM Reference Manual Theodolite Measurement and Calculation – TMC
17.6.11
TMC_GetStation - getting the station coordinates of the instrument
TMC_GetStation ............................................................................................................................................................................................................................................................................
.................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... 2009
2009 ................................................................................................................................................................................................................................................................TMC_GetStation
C-Declaration
TMC_GetStation(TMC_STATION &Station)
VB-Declaration
VB_TMC_GetStation(Station As TMC_STATION)
ASCII-Request
%R1Q,2009:
ASCII-Response
%R1P,0,0: RC,E0[double],N0[double],H0[double],Hi[double]
Remarks
This function is used to get the station coordinates of the instrument.
Parameters
Return-Code Names and Return-Code Values
GRC_OK
See Also
TMC_SetStation
Example
GRC_TYPE rc;
TMC_STATION Station, NullStation;
NullStation.dE0 = 0;
NullStation.dN0 = 0;
NullStation.dH0 = 0;
NullStation.dHi = 0;
// reset station coordinates to 0 rc = TMC_GetStation(Station); if ((Station.dE0 != 0)||
(Station.dN0 != 0)||
(Station.dH0 != 0)||
(Station.dHi != 0))
{ rc = TMC_SetStation(NullStation);
if (rc == GRC_OK)
{
// reset of station successful
}
else
{
// reset not successful (subsystem busy)
}
}
Leica TPS1200 – Version 1.50 171
GeoCOM Reference Manual Theodolite Measurement and Calculation – TMC
17.6.12
TMC_SetStation - setting the station coordinates of the instrument
TMC_SetStation.............................................................................................................................................................................................................................................................................
.................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... 2010
2010 ................................................................................................................................................................................................................................................................TMC_SetStation
C-Declaration
TMC_SetStation(TMC_STATION Station)
VB-Declaration
VB_TMC_SetStation(ByVal Station As TMC_STATION)
ASCII-Request
%R1Q,2010: E0[double],N0[double],H0[double],Hi[double]
ASCII-Response
%R1P,0,0: RC
Remarks
This function is used to set the station coordinates of the instrument.
Parameters
Return-Code Names and Return-Code Values
GRC_OK
GRC_TMC_BUSY 1293 TMC resource is locked respectively TMC task is busy or a distance is existing. The instrument co-ordinates are not set.
Clear distance and repeat measurement.
See Also
TMC_GetStation
TMC_DoMeasure
Example see TMC_GetStation
Leica TPS1200 – Version 1.50 172
GeoCOM Reference Manual Theodolite Measurement and Calculation – TMC
17.6.13
TMC_GetAtmPpm – getting the atmospheric ppm correction factor
TMC_GetSlopeDistCorr............................................................................................................................................................................................................................................................................
........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ 2126
2126 ................................................................................................................................................................................................................................................................TMC_GetSlopeD
istCorr
C-Declaration
TMC_GetAtmPpm (double &dPpmA)
VB-Declaration
VB_TMC_GetAtmPpm (dPpmA As Double)
ASCII-Request
%R1Q,2151:
ASCII-Response
%R1P,0,0: RC, dPpmA[double]
Remarks
This function retrieves the atmospheric ppm value.
Parameters
Return-Code Names and Return-Code Values
See Also
TMC_SetAtmPpm
TMC_GetGeoPpm
TMC_SetGeoPpm
TMC_GetPrismCorr
TMC_SetPrismCorr
Example see TMC_SetPrismCorr
Leica TPS1200 – Version 1.50 173
GeoCOM Reference Manual Theodolite Measurement and Calculation – TMC
17.6.14
TMC_SetAtmPpm – setting the atmospheric ppm correction factor
TMC_GetSlopeDistCorr............................................................................................................................................................................................................................................................................
........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ 2126
2126 ................................................................................................................................................................................................................................................................TMC_GetSlopeD
istCorr
C-Declaration
TMC_SetAtmPpm (double dPpmA)
VB-Declaration
VB_TMC_SetAtmPpm (ByVal dPpmA As Double)
ASCII-Request
%R1Q,2148: dPpmA[double]
ASCII-Response
%R1P,0,0: RC
Remarks
This function is used to set the atmospheric ppm value.
Parameters
Return-Code Names and Return-Code Values
See Also
TMC_GetAtmPpm
TMC_GetGeoPpm
TMC_SetGeoPpm
TMC_GetPrismCorr
TMC_SetPrismCorr
Example see TMC_SetPrismCorr
Leica TPS1200 – Version 1.50 174
GeoCOM Reference Manual Theodolite Measurement and Calculation – TMC
17.6.15
TMC_GetGeoPpm – getting the geometric ppm correction factor
TMC_GetSlopeDistCorr............................................................................................................................................................................................................................................................................
........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ 2126
2126 ................................................................................................................................................................................................................................................................TMC_GetSlopeD
istCorr
C-Declaration
TMC_GetGeoPpm(unsigned short &unGeomUseAutomatic,
double &dScaleFactorCentralMeridian,
double &dOffsetCentralMeridian,
double &dHeightReductionPPM,
double &dIndividualPPM)
VB-Declaration
VB_TMC_GetGeoPpm(unGeomUseAutomatic as Integer,
dScaleFactorCentralMeridian as Double,
dOffsetCentralMeridian as Double,
dHeightReductionPPM as Double,
dIndividualPPM as Double)
ASCII-Request
%R1Q,2154:
ASCII-Response
%R1P,0,0: RC,unGeomUseAutomatic[unsigned short],dScaleFactorCentralMeridian[double], dOffsetCentralMeridian[double],dHeightReductionPPM[double],dIndividualPPM[double]
Remarks
This function retrieves the geometric ppm values.
Parameters dScaleFactorCentralMeridian Out
(automatic or manual)
Scale factor on central meridian
Return-Code Names and Return-Code Values
See Also
TMC_GetAtmPpm
TMC_SetAtmPpm
TMC_SetGeoPpm
TMC_GetPrismCorr
TMC_SetPrismCorr
Example see TMC_SetPrismCorr
Leica TPS1200 – Version 1.50 175
GeoCOM Reference Manual Theodolite Measurement and Calculation – TMC
17.6.16
TMC_SetGeoPpm – setting the geometric ppm correction factor
TMC_GetSlopeDistCorr............................................................................................................................................................................................................................................................................
........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ 2126
2126 ................................................................................................................................................................................................................................................................TMC_GetSlopeD
istCorr
C-Declaration
TMC_SetGeoPpm(unsigned short unGeomUseAutomatic,
double dScaleFactorCentralMeridian,
double dOffsetCentralMeridian,
double dHeightReductionPPM,
double dIndividualPPM)
VB-Declaration
VB_TMC_SetGeoPpm(ByVal unGeomUseAutomatic as Integer,
ByVal dScaleFactorCentralMeridian as Double,
ByVal dOffsetCentralMeridian as Double,
ByVal dHeightReductionPPM as Double,
ByVal dIndividualPPM as Double)
ASCII-Request
%R1Q,2153: unGeomUseAutomatic[unsigned short],dScaleFactorCentralMeridian[double], dOffsetCentralMeridian[double],dHeightReductionPPM[double],dIndividualPPM[double]
ASCII-Response
%R1P,0,0: RC
Remarks
This function is used to set the geometric ppm values.
Parameters dScaleFactorCentralMeridian In
(automatic or manual)
Scale factor on central meridian
Return-Code Names and Return-Code Values
See Also
TMC_GetAtmPpm
TMC_SetAtmPpm
TMC_GetGeoPpm
TMC_GetPrismCorr
TMC_SetPrismCorr
Example see TMC_SetPrismCorr
Leica TPS1200 – Version 1.50 176
GeoCOM Reference Manual Theodolite Measurement and Calculation – TMC
17.7
INFORMATION FUNCTIONS
17.7.1
TMC_GetFace - getting the face information of the current telescope position
TMC_GetFace ............................................................................................................................................................................................................................................................................
2026 ................................................................................................................................................................................................................................................................TMC_GetFace
........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ 2026
C-Declaration
TMC_GetFace(TMC_FACE &Face)
VB-Declaration
VB_TMC_GetFace(Face As Long)
ASCII-Request
%R1Q,2026:
ASCII-Response
%R1P,0,0: RC,Face[long]
Remarks
This function returns the face information of the current telescope position. The face information is only valid, if the instrument is in an active measurement state (that means a measurement function was called before the
TMC_GetFace call, see example). Note that the instrument automatically turns into an inactive measurement state after a predefined timeout.
Parameters
Return-Code Names and Return-Code Values
GRC_OK
See Also
AUT_ChangeFace
Example
GRC_TYPE rc;
TMC_FACE Face;
// turn the face if not in normal position
// set active measurement state rc = TMC_DoMeasure(TMC_DEF_DIST, TMC_AUTO_INC); rc = TMC_GetFace(Face); if (Face == TMC_FACE_TURN)
{
rc = AUT_ChangeFace(AUT_NORMAL,
AUT_POSITION,
FALSE);
if (rc == GRC_OK)
{
// face successfuly turned
}
else
{
// change face problem: see AUT_ChangeFace
}
}
// clear distance rc = TMC_DoMeasure(TMC_CLEAR, TMC_AUTO_INC);
Leica TPS1200 – Version 1.50 177
GeoCOM Reference Manual Theodolite Measurement and Calculation – TMC
17.7.2
TMC_GetSignal - getting information about the EDM signal intensity
TMC_GetSignal..............................................................................................................................................................................................................................................................................
.................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... 2022
2022 ................................................................................................................................................................................................................................................................TMC_GetSignal
C-Declaration
TMC_GetSignal(TMC_EDM_SIGNAL &Signal)
VB-Declaration
VB_TMC_GetSignal(Signal As TMC_EDM_SIGNAL)
ASCII-Request
%R1Q,2022:
ASCII-Response
%R1P,0,0: RC,SignalIntensity[double],Time[long]
Remarks
This function returns information about the intensity of the EDM signal. The function can only perform a measurement if the signal measurement program is activated. Start the signal measurement program with
TMC_DoMeasure where Command = TMC_SIGNAL . After the measurement the EDM must be switched off
(use TMC_DoMeasure where Command = TMC_CLEAR ). While measuring there is no angle measurement data available.
Parameters
Return-Code Names and Return-Code Values
GRC_OK
GRC_TMC_SIGNAL_ERROR
GRC_ABORT 8
At repeated occur call service.
Measurement through customer aborted.
GRC_SHUT_DOWN 12 System power off through customer.
See Also
TMC_DoMeasure
Example
GRC_TYPE Result;
TMC_SIGNAL Signal;
TMC_DoMeasure(TMC_SIGNAL); do
{
Result=TMC_GetSignal(Signal);
if(Result==GRC_OK)
{
.
.
.
}
}while(Result==GRC_OK);
Leica TPS1200 – Version 1.50 178
GeoCOM Reference Manual Theodolite Measurement and Calculation – TMC
17.8
CONFIGURATION FUNCTIONS
17.8.1
TMC_GetAngSwitch - getting the angular correction status
TMC_GetAngSwitch .................................................................................................................................................................................................................................................................
............
2014 ................................................................................................................................................................................................................................................................TMC_GetAngSw
itch
............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ 2014
C-Declaration
TMC_GetAngSwitch(TMC_ANG_SWITCH &SwCorr)
VB-Declaration
VB_TMC_GetAngSwitch(SwCorr As TMC_ANG_SWITCH)
ASCII-Request
%R1Q,2014:
ASCII-Response
%R1P,0,0: RC,InclineCorr[long],StandAxisCorr[long],
CollimationCorr[long],TiltAxisCorr[long]
Remarks
This function returns the angular corrections status.
Parameters
Return-Code Names and Return-Code Values
GRC_OK
See Also
TMC_SetAngSwitch
Example
GRC_TYPE rc;
TMC_ANG_SWITCH SwCorr;
// get the switch state for the angular
// correction rc = TMC_GetAngSwitch(SwCorr); if (SwCorr.eTiltAxisCorr == ON)
{
// Tilting axis correction turned On
} else
{
// Tilting axis correction turned Off
}
Leica TPS1200 – Version 1.50 179
GeoCOM Reference Manual Theodolite Measurement and Calculation – TMC
17.8.2
TMC_GetInclineSwitch - getting the dual axis compensator status
TMC_GetInclineSwitch.............................................................................................................................................................................................................................................................................
........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ 2007
2007 ................................................................................................................................................................................................................................................................TMC_GetIncline
Switch
C-Declaration
TMC_GetInclineSwitch(ON_OFF_TYPE &SwCorr)
VB-Declaration
VB_TMC_GetInclineSwitch(SwCorr As Long)
ASCII-Request
%R1Q,2007:
ASCII-Response
%R1P,0,0: RC,SwCorr[long]
Remarks
This function returns the current dual axis compensator status.
Parameters
Return-Code Names and Return-Code Values
GRC_OK
See Also
TMC_SetInclineSwitch
Example
GRC_TYPE rc;
ON_OFF_TYPE SwCorr;
// clear distance first before you change the state
TMC_DoMeasure(TMC_CLEAR, TMC_AUTO,INC);
// deactivate the compensator
// if it is not already rc = TMC_GetInclineSwitch(SwCorr); if (SwCorr == ON)
{
rc = TMC_SetInclineSwitch(OFF);
if (rc == GRC_OK)
{
// successfully deactvated
}
else
{
// set not successful (subsystem busy)
}
}
Leica TPS1200 – Version 1.50 180
GeoCOM Reference Manual Theodolite Measurement and Calculation – TMC
17.8.3
TMC_SetInclineSwitch – switching the dual axis compensator on/off
TMC_SetInclineSwitch..............................................................................................................................................................................................................................................................................
........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ 2006
2006 ................................................................................................................................................................................................................................................................TMC_SetIncline
Switch
C-Declaration
TMC_SetInclineSwitch(ON_OFF_TYPE SwCorr)
VB-Declaration
VB_TMC_SetInclineSwitch(ByVal SwCorr As Long)
ASCII-Request
%R1Q,2006: SwCorr[long]
ASCII-Response
%R1P,0,0: RC
Remarks
This function switches the dual axis compensator on or off.
Parameters
Return-Code Names and Return-Code Values
GRC_OK
GRC_TMC_BUSY 1293 TMC resource is locked respectively TMC task is busy or a distance is existing. The incline state is not changed.
Clear distance and repeat measurement.
See Also
TMC_GetInclineSwitch
Example see TMC_GetInclineSwitch
Leica TPS1200 – Version 1.50 181
GeoCOM Reference Manual Theodolite Measurement and Calculation – TMC
17.8.4
TMC_GetEdmMode - getting the EDM measurement mode
TMC_GetEdmMode...............................................................................................................................................................................................................................................................................
............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ 2021
2021 ................................................................................................................................................................................................................................................................TMC_GetEdmM
ode
C-Declaration
TMC_GetEdmMode(EDM_MODE &Mode)
VB-Declaration
VB_TMC_GetEdmMode(Mode As Long)
ASCII-Request
%R1Q,2021:
ASCII-Response
%R1P,0,0: RC,Mode[long]
Remarks
This function returns the EDM measurement mode.
Parameters
Return-Code Names and Return-Code Values
GRC_OK
See Also
TMC_SetEdmMode
Example
GRC_TYPE rc;
EDM_MODE Mode;
// set EDM mode to single standard
// if it is in any repeated mode rc = TMC_GetEdmMode(Mode); switch (Mode)
{
case (EDM_CONT_STANDARD):
case (EDM_CONT_DYNAMIC):
case (EDM_CONT_FAST):
rc = TMC_SetEdmMode(EDM_SINGLE_STANDARD);
if (rc == GRC_OK)
{
// set to single mode successful
}
else
{
// set not successful (subsystem busy)
}
}
Leica TPS1200 – Version 1.50 182
GeoCOM Reference Manual Theodolite Measurement and Calculation – TMC
17.8.5
TMC_SetEdmMode - setting EDM measurement modes
TMC_SetEdmMode ...........................................................................................................................................................................................................................................................................
................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ 2020
2020 ................................................................................................................................................................................................................................................................TMC_SetEdmM
ode
C-Declaration
TMC_SetEdmMode(EDM_MODE Mode)
VB-Declaration
VB_TMC_SetEdmMode(ByVal Mode As Long)
ASCII-Request
%R1Q,2020: Mode[long]
ASCII-Response
%R1P,0,0: RC
Remarks
This function sets the current measurement mode. The measure function TMC_DoMeasure(TMC_DEF_DIST) uses this configuration.
Parameters
Return-Code Names and Return-Code Values
GRC_OK
GRC_TMC_BUSY 1293 TMC resource is locked respectively TMC task is busy. The
EDM mode is not set.
Repeat measurement.
See Also
TMC_GetEdmMode
TMC_DoMeasure
Example see TMC_GetEdmMode
Leica TPS1200 – Version 1.50 183
GeoCOM Reference Manual Theodolite Measurement and Calculation – TMC
17.8.6
TMC_GetSimpleCoord - getting cartesian coordinates
TMC_GetSimpleCoord..............................................................................................................................................................................................................................................................................
........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ 2116
2116 ................................................................................................................................................................................................................................................................TMC_GetSimpl
eCoord
C-Declaration
TMC_GetSimpleCoord( SYSTIME WaitTime, double &dCoordE, double& dCoordN, double& dCoordH,
TMC_INCLINE_PRG eProg)
VB-Declaration
VB_TMC_GetSimpleCoord( ByVal WaitTime As Long, dCoordE As Double, dCoordN As Double, dCoordH As Double,
ByVal eProg As Long)
ASCII-Request
%R1Q,2116: WaitTime[long],eProg[long]
ASCII-Response
%R1P,0,0: RC,dCoordE[double], dCoordN[double], dCoordH[double]
Remarks
This function gets the cartesian co-ordinates if a valid distance exists. The parameter WaitTime defined the max wait time in order to get a valid distance. If after the wait time a valid distance does not exist, the function initialises the parameter for the co-ordinates ( E,N,H ) with 0 and returns an error. For the co-ordinate calculate will require incline results. With the parameter eProg you have the possibility to either measure an inclination, use the pre-determined plane to calculate an inclination, or use the automatic mode wherein the system decides which method is appropriate (see 15.1.1).
Parameters
WaitTime eProg dCoordE
In
In
Max. wait time to get a valid distance [ms].
Inclination sensor measurement mode.
Out Easting. dcoordN Out Northing. dcoordH
Return-Code Names and Return-Code Values
GRC_OK
GRC_TMC_ACCURACY_GUARANTEE 1284
GRC_TMC_NO_FULL_CORRECTION
GRC_TMC_ANGLE_OK
GRC_TMC_ANGLE_NO_ACC_
GUARANTY
GRC_TMC_ANGLE_NO_FULL_
CORRECTION
GRC_TMC_DIST_ERROR
GRC_TMC_DIST_PPM
1283
1285
1289
1288
1292
1291
Accuracy is not guaranteed, because the result are consist of measuring data which accuracy could not be verified by the system. Co-ordinates are available.
The results are not corrected by all active sensors. Coordinates are available.
In order to secure which correction is missing use the both functions TMC_IfDataAzeCorrError and
TMC_IfDataIncCorrError
Angle values okay, but no valid distance. Co-ordinates are not available.
Only the angle measurement is valid but its accuracy cannot be guaranteed (the tilt measurement is not available).
No distance data available but angle data are valid. The return code is equivalent to the GRC_TMC_NO_FULL_CORRECTION and relates to the angle data. Co-ordinates are not available.
Perform a distance measurement first before you call this function.
No measuring, because of missing target point, co-ordinates are not available.
Aim target point and try it again
No distance measurement respectively no distance data because of wrong EDM settings. Co-ordinates are not
Leica TPS1200 – Version 1.50 184
GeoCOM Reference Manual Theodolite Measurement and Calculation – TMC
GRC_TMC_ANGLE_ERROR
GRC_TMC_BUSY
1290
1293 available.
Angle or inclination measurement error. Check inclination modes in commands.
TMC resource is locked respectively TMC task is busy.
Repeat measurement.
Measurement through customer aborted.
System power off through customer.
GRC_ABORT
GRC_SHUT_DOWN
8
12
See Also
TMC_GetCoordinate
TMC_IfDataAzeCorrError
TMC_IfDataIncCorrError
Example
GRC_TYPE Result;
TMC_ANG_SWITCH SwCorr;
SYSTIME WaitTime;
TMC_INCLINE_PRG ePrgm;
BOOLE bExit;
Double dCoordE,dCoordN,dCoordH;
TMC_GetAngSwitch(SwCorr); // measure rate will
SwCorr.eInclineCorr=ON; // be reduced with
SwCorr.eStandAxisCorr=ON; // angle and incline
SwCorr.eCollimationCorr=ON; // corrections.
SwCorr.eTiltAxisCorr=ON;
TMC_DoMeasure(TMC_CLEAR); // clear distance first TMC_SetAngSwitch(SwCorr); // before you can set the
// ANG switches, the
// distance must be
// cleared
TMC_DoMeasure(TMC_RTRK_DIST);// execute rapid
// tracking
// measurement
WaitTime=500;// set max. wait time 500 [ms] eProg=TMC_AUTO_INC;// set automatically incline prgm bExit=FALSE; do
{
Result=TMC_GetSimpleCoord(WaitTime, dCoordE,
dCoordN, dCoordH,eProg); switch(Result)
{ case GRC_OK: case GRC_TMC_NO_FULL_CORRECTION: case GRC_TMC_ACCURACY_GUARANTEE:
// in this cases are the coordinates
// available
Break;
Default:
bExit=TRUE;
// in all other cases are the coordinates not
// valid and set to 0
// further errorhandling
Break;
}// end switch
}// end do while while(!bExit);
TMC_DoMeasure(TMC_CLEAR); // complete measurement
// and clear data
Leica TPS1200 – Version 1.50 185
GeoCOM Reference Manual Theodolite Measurement and Calculation – TMC
17.8.7
TMC_IfDataAzeCorrError – returning the status if an ATR error occurs
TMC_IfDataAzeCorrError ............................................................................................................................................................................................................................................................................
.................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... 2114
2114 ................................................................................................................................................................................................................................................................TMC_IfDataAze
CorrError
C-Declaration
TMC_IfDataAzeCorrError(BOOLE& bAtrCorrectionError)
VB-Declaration
VB_TMC_IfDataAzeCorrError
ASCII-Request
%R1Q,2114:
ASCII-Response
%R1P,0,0: RC,bAtrCorrectionError[long]
Remarks
This function returns the status of the ATR correction of the last measurement. If you get a return code
GRC_TMC_ANGLE_NOT_FULL_CORR or GRC_TMC_ NO_FULL_CORRECTION from a measurement function, this function indicates whether the returned data is missing a deviation correction of the ATR or not.
Parameters
BAtrCorrectionError Out Flag, if ATR correction error occurred or not
FALSE : no error occurred
TRUE : last data record not deviation corrected with the ATR-
Return-Code Names and Return-Code Values
GRC_OK
See Also
TMC_IfDataIncCorrError
Example
GRC_TYPE Result;
SYSTIME WaitTime;
TMC_INCLINE_PRG ePrgm; double dCoordE,dCoordN,dCoordH;
TMC_DoMeasure(TMC_DEF_DIST);// execute single
// dist measurement
WaitTime=500;// set max. wait time 500 [ms] eProg=TMC_AUTO_INC;// set automatically incline prgm
Result=TMC_GetSimpleCoord(WaitTime, dCoordE, switch(Result)
{ case GRC_TMC_NO_FULL_CORRECTION:
TMC_IfDataAzeCorrError(bAzeCorrError);
TMC_IfDataIncCorrError(bIncCorrError);
if(bAzeCorrError)
{
// coordinates are not corrected with the Aze-
// deviation correction
}
if(bIncCorrError)
{
// coordinates are not corrected with the
// incline correction
} case GRC_OK: case GRC_TMC_ACCURACY_GUARANTEE:
// in this cases are the coordinates break; default:
// in all other cases are the coordinates not
// valid and set to 0
// further errorhandling
Leica TPS1200 – Version 1.50 186
GeoCOM Reference Manual Theodolite Measurement and Calculation – TMC break;
}// end switch
TMC_DoMeasure(TMC_CLEAR); // complete measurement
// and clear data
Leica TPS1200 – Version 1.50 187
GeoCOM Reference Manual Theodolite Measurement and Calculation – TMC
17.8.8
TMC_IfDataIncCorrError – returning the status if an incline error occurs
TMC_IfDataIncCorrError..............................................................................................................................................................................................................................................................................
.................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... 2115
2115 ................................................................................................................................................................................................................................................................TMC_IfDataIncC
orrError
C-Declaration
TMC_IfDataIncCorrError(BOOLE& bIncCorrectionError)
VB-Declaration
VB_TMC_IfDataIncCorrError
ASCII-Request
%R1Q,2115:
ASCII-Response
%R1P,0,0: RC,bIncCorrectionError[long]
Remarks
This function returns the status of the inclination correction of the last measurement. If you get a return code
GRC_TMC_ANGLE_NOT_FULL_CORR or GRC_TMC_ NO_FULL_CORRECTION from a measurement function, this function indicates whether the returned data is missing an inclination correction or not. Error information can only occur if the incline sensor is active.
Parameters
BIncCorrectionError Out Flag, if incline correction error occurred or not
FALSE : no error occurred
TRUE : last data record not incline-correction corrected with the
Return-Code Names and Return-Code Values
GRC_OK
See Also
TMC_IfDataAzeCorrError
Example see example TMC_IfDataAzeCorrError
Leica TPS1200 – Version 1.50 188
GeoCOM Reference Manual Theodolite Measurement and Calculation – TMC
17.8.9
TMC_SetAngSwitch - enabling/disabling the angle corrections
TMC_SetAngSwitch..............................................................................................................................................................................................................................................................................
............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ 2016
2016 ................................................................................................................................................................................................................................................................TMC_SetAngSw
itch
C-Declaration
TMC_SetAngSwitch(TMC_ANG_SWITCH Switch)
VB-Declaration
VB_TMC_SetAngSwitch(ByVal Switch As TMC_ANG_SWITCH)
ASCII-Request
%R1Q,2016: InclineCorr[long],StandAxisCorr[long],
CollimationCorr[long],TiltAxisCorr[long]
ASCII-Response
%R1P,0,0: RC
Remarks
With this function you can enable/disable the following angle measurement corrections. incline: The inclination will be considered for the angle measurement if enabled. stand axis: The standard axis correction will be considered for the angle measurement if enabled. collimation: tilt axis:
The collimation will be considered for the angle measurement if enabled
The tilt axis will be considered in the angle measurement if enabled.
Parameters
Switch
Return-Code Names and Return-Code Values
GRC_OK
Angle measurement corrections
GRC_TMC_BUSY 1293 TMC resource is locked respectively TMC task is busy or a distance exists.
Clear distance and try it again.
See-Also
TMC_DoMeasure
TMC_GetAngSwitch
Example
See example TMC_QuickDist
Leica TPS1200 – Version 1.50 189
GeoCOM Reference Manual Theodolite Measurement and Calculation – TMC
17.8.10
TMC_GetSlopeDistCorr – getting the total ppm and prism correction factors
TMC_GetSlopeDistCorr............................................................................................................................................................................................................................................................................
........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ 2126
2126 ................................................................................................................................................................................................................................................................TMC_GetSlopeD
istCorr
C-Declaration
TMC_GetSlopeDistCorr (double dPpmCorr,
double dPrismCorr)
VB-Declaration
VB_TMC_GetSlopeDistCorr(dPpmCorr As Double,
dPrismCorr As Double)
ASCII-Request
%R1Q,2126:
ASCII-Response
%R1P,0,0: RC,dPpmCorr[double], dPrismCorr[double]
Remarks
This function retrieves the total ppm value (atmospheric+geometric ppm) plus the current prism constant.
Parameters
Return-Code Names and Return-Code Values
See Also
TMC_GetPrismCorr,
TMC_SetPrismCorr.
Example
-
Leica TPS1200 – Version 1.50 190
GeoCOM Reference Manual
18 P
ORTING
A TPS1100 A
PPLICATION
Porting A TPS1100 Application
18.1
INTRODUCTION
The implementation of the TPS1200 theodolite series includes several new concepts compared to the firmware of
TPS1100 theodolites. To take care of the new functionality, which has been changed or removed in the implementation of TPS1200 firmware, a few changes in GeoCOM for TPS1200 theodolites were necessary.
This chapter contains all RPCs and data types, which has changed in GeoCOM. It should help the developer to port a
GeoCOM client application for TPS1100 theodolite series onto the new platform.
18.2
RPC CHANGES
The following section contains a list of all replaced, deleted and new RPCs. Refer to the RPC description in the corresponding subsystem to get further information on how to use the new RPCs.
18.2.1
Communication – COM
TPS1100 GeoCOM RPC: Changes in TPS1200 GeoCOM:
COM_SetSendDelay Deleted
COM_EnableSignOff Deleted
TPS1100 GeoCOM-DLL: Changes in TPS1200 GeoCOM-DLL:
18.2.2
Central Services - CSV
TPS1100 GeoCOM RPC: Changes in TPS1200 GeoCOM:
CSV_GetVMem Deleted
CSV_GetVBat Deleted
18.2.3
Alt User - AUS
TPS1100 GeoCOM RPC:
AUS_GetRcsSearchSwitch
AUS_SwitchRcsSearch
18.2.4
Automation – AUT
TPS1100 GeoCOM RPC:
18.2.5
Controller Task - CTL
TPS1100 GeoCOM RPC:
CTL_GetUpCounter
18.2.6
WI Registration - WIR
TPS1100 GeoCOM RPC:
WIR_SetRecFormat
WIR_GetRecFormat
Leica TPS1200 – Version 1.50
Changes in TPS1200 GeoCOM:
Deleted
Deleted
Changes in TPS1200 GeoCOM:
‘c’<Term>
Changes in TPS1200 GeoCOM:
Not supported
Changes in TPS1200 GeoCOM:
Deleted
Deleted
191
GeoCOM Reference Manual Porting A TPS1100 Application
18.2.7
Basic Application – BAP
TPS1100 GeoCOM RPC:
BAP_GetHzOrientationFlag
BAP_GetLastDisplayedError
BAP_SetHzOrientationFlag
Changes in TPS1200 GeoCOM:
Deleted
Deleted
Deleted
New:BAP_GetPrismType2
New:BAP_SetPrismType2
BAP_SetPrismDef Replaced by: BAP_SetUserPrismDef
New: BAP_GetATRSetting
New: BAP_SetATRSetting
New: BAP_GetRedATRFov
New: BAP_SetRedATRFov
18.2.8
Theodolite Measurement and Calculation – TMC
TPS1100 GeoCOM RPC: Changes in TPS1200 GeoCOM:
New: TMC_GetAtmPpm
Leica TPS1200 – Version 1.50 192
GeoCOM Reference Manual Porting A TPS1100 Application
18.3
DATA TYPES AND CONSTANTS CHANGES
The following data types and constants have changed or are new. Refer to the chapter constants and types in the corresponding subsystem to get the full description.
TPS1100 GeoCOM type definition: Changes in TPS1200 GeoCOM:
COM_BAUD_RATE
BAP_PRISMTYPE
TPS_DEVICE_CLASS
Extended
Extended
Extended
18.4
RETURN-CODES
The return code names have been harmonised. They all start with the prefix GRC and if subsystem specific followed by the triple digit subsystem name (e.g. GRC_IVRESULT, GRC_TMC_ANGLE_OK ). Please refer to Appendix A for a detailed listing.
TPS1100 return code definition: Changes in TPS1200 GeoCOM:
GMF_ Deleted
TMC_
TMC_ANGLE_NO_FULL_CORRECTION
Renamed: GRC_TMC_
GRC_TMC_ANGLE_NOT_FULL_CORR
TMC_ANGLE_ACCURACY_GUARANTEE GRC_TMC_ANGLE_NO_ACC_GUARANTY
MEM_ Deleted
LDR_ Replaced by: GRC_LOD_
New: GRC_KDM_
TXT_ Deleted
MMI_ Deleted
DPL_RC_ Deleted
WIR_ Deleted
BAP_ Deleted
SAP_ Deleted
COD_RC_ Deleted
BAS_ Deleted
IOS_ Deleted
CNF_ Deleted
Leica TPS1200 – Version 1.50 193
GeoCOM Reference Manual GeoCOM Releases
19 G
EO
COM R
ELEASES
This chapter shows the changes between the different Releases of GeoCOM
19.1
RELEASE 1.00
This GeoCOM Release 1.00 was introduced with TPS Firmware Release 1.0.
19.2
RELEASE 1.10
This GeoCOM Release 1.10 was introduced with TPS Firmware Release 4.0.
19.3
RELEASE 1.20
This GeoCOM Release 1.20 was introduced with TPS Firmware Release 5.0.
19.4
RELEASE 1.50
This GeoCOM Release 1.50 was introduced with TPS Firmware Release 7.5.
Added subsystem Imaging (IMG) and File Transfer (FTR) for TS30 and TM30 instrument.
A new EDM measurement mode (Precise Mode) as well as a new TMC command (TMC_GetFullMeas) are added
Leica TPS1200 – Version 1.50 194
GeoCOM Reference Manual Return-Code names and return-code values
20 A
PPENDIX
A R
ETURN
-C
ODE NAMES AND RETURN
-
CODE VALUES
The return codes described here are codes, which may be returned from RPC’s and GeoCOM general functions
(COMF). A successful completion will be denoted by GRC_OK. Almost all of the return codes are error codes.
Nevertheless, some of them have a more informational character. Therefore, refer also to the description of a specific function. In a special context the meaning of a return code might vary a little bit.
The list described here is organised in subsystem related categories. The RetCodeName describes the constant as it is defined for the TPS1200 series instruments. Additionally to find an error code by number they are given too
TPS 0 0x0
GRC_OK
GRC_UNDEFINED
0
1
0x0
0x1
Function successfully completed.
Unknown error, result unspecified.
GRC_TIME_OUT
GRC_SET_INCOMPL
GRC_ABORT
GRC_NOMEMORY
6
7
8
9
0x6
0x7
0x8
0x9
Function execution timed out. Result unspecified.
Parameter setup for subsystem is incomplete.
Function execution has been aborted.
Fatal error - not enough memory.
GRC_NOTINIT 10 - subsystem not initialized.
GRC_SHUT_DOWN 12 0xC Subsystem is down.
GRC_SYSBUSY 13 0xD System busy/already in use of another process.
Cannot execute function.
(SHIFT-ESC). level.
GRC_NO_EVENT
GRC_OUT_OF_TEMP
20
21
0x14
0x15 no event pending. out of temperature range
GRC_SLEEP_MODE
GRC_NOTOK
GRC_NA
GRC_STOPPED
ANG
GRC_ANG_ERROR
GRC_ANG_INCL_ERROR
GRC_ANG_BAD_ACC
GRC_ANG_BAD_ANGLE_ACC
Leica TPS1200 – Version 1.50
25
26
27
0x19
0x1A
0x1B
Instr. run into the sleep mode
Function not successfully completed.
Not available
29 0x1D
256 0x100
System or subsystem has been stopped
257
258
259
260
0x101
0x102
0x103
0x104
Angles and Inclinations not valid inclinations not valid value accuracies not reached angle-accuracies not reached
195
GeoCOM Reference Manual
GRC_ANG_BAD_INCLIN_ACC
GRC_ANG_WRITE_PROTECTED
GRC_ANG_OUT_OF_RANGE
GRC_ANG_IR_OCCURED
GRC_ANG_HZ_MOVED
261
266
267
268
269
0x105
0x10A
0x10B
0x10C
0x10D
Return-Code names and return-code values inclination accuracies not reached no write access allowed value out of range function aborted due to interrupt hz moved during incline measurement
GRC_ANG_DATA_ERROR 271 overflow at parameter values
GRC_ANG_PEAK_CNT_UFL 272 0x110 too less peaks
GRC_ANG_TOO_MANY_EXPOS 274 0x112 too many exposures wanted
GRC_ANG_MAX_POS_SKIP
GRC_ANG_MAX_NEG_SKIP
276
277
0x114
0x115 positive exposure dynamic overflow negative exposure dynamic overflow
GRC_ANG_TMANY_PEAKS
GRC_ANG_TLESS_PEAKS
GRC_ANG_PEAK_TOO_SLIM
GRC_ANG_BAD_PEAKDIFF
GRC_ANG_UNDER_EXP_PICT
GRC_ANG_NO_DECOD_POSS
GRC_ANG_UNSTABLE_DECOD
GRC_ANG_TLESS_FPEAKS
GRC_ANG_INCL_NO_PLANE
GRC_ANG_FAST_ANG_ERR_5
GRC_ANG_FAST_ANG_ERR_25
GRC_ANG_TRANS_ERR
GRC_ANG_TRANS_ERR_5
GRC_ANG_TRANS_ERR_25
ATA
307
308
309
317
300
301
302
304
305
0x12C
0x12D
0x12E
0x130
0x131
0x133
0x134
0x135
0x13D too many peaks detected too less peaks detected peak too slim bad peak difference too less peak amplitude no peak decoding possible peak decoding not stable too less valid finepeaks inclination no plane available
327
328
329
330
331
0x147
0x148
0x149
0x14A
0x14B
512 0x200 errors in 5kHz angle errors in 2.5kHz angle
LVDS transfer error detected
LVDS transfer error detected in 5kHz mode
LVDS transfer error detected in 2.5kHz mode
GRC_ATA_NO_RESULT 513 0x201 Result isn't available yet.
Several Targets detected.
GRC_ATA_BACKGROUND 516 0x204 Background is too bright.
GRC_ATA_NO_TARGETS 517 No targets detected.
GRC_ATA_NOT_BUSY
GRC_ATA_V24_FAIL
523
525
0x20B
0x20D
ATR isn't in a continuous mode.
Communication error to sensor (ATR).
Leica TPS1200 – Version 1.50 196
GeoCOM Reference Manual Return-Code names and return-code values
GRC_ATA_HZ_STRANGE_L 529 0x211 Strange light in Hz-direction.
GRC_ATA_V_STRANGE_L 530 Strange light in V-direction.
GRC_ATA_SLDR_TRANSFER_PENDING 531 0x213 On multiple ATA_SLDR_OpenTransfer.
GRC_ATA_SLDR_TRANSFER_ILLEGAL 532 0x214
GRC_ATA_SLDR_DATA_ERROR 533 0x215
GRC_ATA_SLDR_CHK_SUM_ERROR 534 0x216
GRC_ATA_SLDR_ADDRESS_ERROR
GRC_ATA_SLDR_INV_LOADFILE
GRC_ATA_SLDR_UNSUPPORTED
535
536
537
0x217
0x218
0x219
No ATA_SLDR_OpenTransfer happened.
Unexpected data format received.
Checksum error in transmitted data.
Address out of valid range.
Firmware file has invalid format.
Current (loaded) firmware doesn't support upload.
GRC_ATA_ATR_SYSTEM_ERR 539 0x21B ATR system error
EDM 768 0x300
GRC_EDM_SYSTEM_ERR
GRC_EDM_INVALID_COMMAND
GRC_EDM_SIGN_LOW_ERR
GRC_EDM_SIGN_HIGH_ERR
GRC_EDM_TIMEOUT
GRC_EDM_FLUKT_ERR
GRC_EDM_FMOT_ERR
769
770
772
774
775
776
777
0x301
0x302
0x304
0x306
0x307
0x308
0x309
Fatal EDM sensor error. See for the exact reason the original EDM sensor error number.
In the most cases a service problem.
Invalid command or unknown command, see command syntax.
Received signal to low, prism to far away, or natural barrier, bad environment, etc.
Received signal to strong, prism to near, stranger light effect.
Timeout, measuring time exceeded (signal too weak, beam interrupted,..) to much turbulences or distractions filter motor defective
GRC_EDM_MISSING_SRVPWD
GRC_EDM_INVALID_ANSWER
GRC_EDM_SEND_ERR
GRC_EDM_RECEIVE_ERR
GRC_EDM_INTERNAL_ERR
GRC_EDM_CHKSUM_ERR
GRC_EDM_SRL_NOT_AVAILABLE
781
782
783
784
785
788
790
0x30D
0x30E
0x30F
0x310
0x311
0x314
0x316
GRC_EDM_SLDR_TRANSFER_PENDING 798 0x31E
GRC_EDM_SLDR_TRANSFER_ILLEGAL 799 0x31F
GRC_EDM_SLDR_DATA_ERROR
GRC_EDM_SLDR_CHK_SUM_ERROR
800
801
0x320
0x321
GRC_EDM_SLDR_ADDR_ERROR
GRC_EDM_SLDR_INV_LOADFILE
802
803
0x322
0x323 see in the description of the called function. the EDM sensor.
No service password is set.
Communication ok, but an unexpected answer received.
Data send error, sending buffer is full.
Data receive error, like parity buffer overflow.
Internal EDM subsystem error. measuring first.
Calculated checksum, resp. received data wrong (only in binary communication mode possible). occured. It is saved in the DEL buffer.
Red laser not available on this sensor HW. the laser security)
Multiple OpenTransfer calls.
No open transfer happened.
Unexpected data format received.
Checksum error in transmitted data.
Address out of valid range.
Firmware file has invalid format.
Leica TPS1200 – Version 1.50 197
GeoCOM Reference Manual Return-Code names and return-code values
GRC_EDM_SLDR_UNSUPPORTED
GRC_EDM_UNKNOW_ERR
GRC_EDM_DISTRANGE_ERR
GRC_EDM_SIGNTONOISE_ERR
GRC_EDM_NOISEHIGH_ERR
804
808
818
819
820
0x324
0x328
0x332
0x333
0x334
Current (loaded) firmware doesn't support upload.
Undocumented error from the EDM sensor, should not occur.
Out of distance range (dist too small or large)
Signal to noise ratio too small
Noise to high
GRC_EDM_PWD_NOTSET 821 0x335 Password is not set
GRC_EDM_ACTION_NO_MORE_VALID 822 0x336 Elapsed time between prepare und start fast measurement for ATR to long
GRC_EDM_MULTRG_ERR 823 more than one target (also a sensor
GRC_EDM_MISSING_EE_CONSTS 824 0x338 error) eeprom consts are missing
GRC_EDM_NOPRECISE 825 0x339 No precise measurement possible
GRC_EDM_MEAS_DIST_NOT_ALLOWED 826 0x33A Measured distance is to big (not allowed)
TMC 1280 0x500
GRC_TMC_ANGLE_OK 1285 0x505 Warning: only angle measurement valid without full correction
GRC_TMC_ANGLE_NO_ACC_GUARANTY 1289 0x509 Info: only angle measurement valid but accuracy can not be guarantee
GRC_TMC_DIST_PPM 1291 0x50B
GRC_TMC_BUSY
GRC_TMC_SIGNAL_ERROR
1293
1294
0x50D
0x50E
Error: wrong setting of PPM or MM on EDM etc.)
Error: system is busy (no measurement done)
Error: no signal on EDM (only in signal mode)
MOT 1792 0x700
GRC_MOT_UNREADY
GRC_MOT_BUSY
GRC_MOT_NOT_OCONST
GRC_MOT_NOT_CONFIG
1792
1793
1794
1795
0x700
0x701
0x702
0x703 motorization is not ready motorization is handling another task motorization is not in velocity mode motorization is in the wrong mode or busy
GRC_MOT_NOT_SERVICE 1797 motorization is not in service mode
GRC_MOT_NOT_BUSY 1798 0x706 motorization is handling no task
GRC_MOT_NOT_LOCK
GRC_MOT_NOT_SPIRAL
1799
1800
0x707
0x708 motorization is not in tracking mode motorization is not in spiral mode
BMM
GRC_BMM_XFER_PENDING
GRC_BMM_NO_XFER_OPEN
GRC_BMM_UNKNOWN_CHARSET
GRC_BMM_NOT_INSTALLED
GRC_BMM_ALREADY_EXIST
GRC_BMM_CANT_DELETE
Leica TPS1200 – Version 1.50 horizontal and vertical encoder/motor error
2304 0x900
2305
2306
2307
2308
2309
2310
0x901
0x902
0x903
0x904
0x905
0x906
Loading process already opened
Transfer not opened
Unknown character set
Display module not present
Character set already exists
Character set cannot be deleted
198
GeoCOM Reference Manual
GRC_BMM_MEM_ERROR
GRC_BMM_CHARSET_USED
2311
2312
0x907
0x908
Return-Code names and return-code values
Memory cannot be allocated
Character set still used allocated memory
GRC_BMM_INVALID_SIZE 2316 0x90C Number of bytes specified in header does not match the bytes read
GRC_BMM_CANCELANDINVSIZE_ERROR 2317 0x90D Allocated memory could not be released
GRC_BMM_CANT_DEL_LAYERS 2319 0x90F
Max. number of character sets already loaded
Layer cannot be deleted
GRC_BMM_UNKNOWN_LAYER
GRC_BMM_INVALID_LAYERLEN
2320
2321
0x910
0x911
Required layer does not exist
Layer length exceeds maximum
COM 3072 0xC00
GRC_COM_CANT_DECODE
GRC_COM_CANT_SEND
GRC_COM_CANT_RECV
GRC_COM_CANT_DECODE_REQ
GRC_COM_PROC_UNAVAIL
3074
3075
3076
3080
3081
0xC02
0xC03
0xC04
0xC08
0xC09
Cannot decode results in client.
Hardware error while sending.
Hardware error while receiving.
Packet format error.
Cannot decode arguments in server.
Unknown RPC, procedure ID invalid.
GRC_COM_TR_ID_MISMATCH
GRC_COM_NOT_GEOCOM
GRC_COM_UNKNOWN_PORT
GRC_COM_ERO_END
GRC_COM_NO_PARTNER
3093
3094
3095
3099
3105
0xC15
0xC16
0xC17
0xC1B
0xC21
TRANSACTIONS ID mismatch error.
Protocol not recognizable.
(WIN) Invalid port address.
ERO is terminating.
GRC_COM_OVERRUN 3100
GRC_COM_SRVR_RX_CHECKSUM_ERRR 3101
0xC1C
0xC1D
Internal error: data buffer overflow.
Invalid checksum on server side received.
GRC_COM_CLNT_RX_CHECKSUM_ERRR 3102 0xC1E Invalid checksum on client side received.
(WIN) Port not available.
(WIN) Port not opened.
(WIN) Unable to find TPS.
GRC_COM_CONS_REQ 3107 0xC23 started.
Att to send cons reqs
AUT
GRC_AUT_TIMEOUT
GRC_AUT_DETENT_ERROR
Leica TPS1200 – Version 1.50
8704 0x2200
8704
8705
0x2200
0x2201
Position not reached
Positioning not possible due to mounted EDM
199
GeoCOM Reference Manual
GRC_AUT_ANGLE_ERROR
GRC_AUT_INCACC
GRC_AUT_DEV_ERROR
GRC_AUT_NO_TARGET
GRC_AUT_BAD_ENVIRONMENT
GRC_AUT_DETECTOR_ERROR
GRC_AUT_NOT_ENABLED
8706
8708
8709
8710
8712
8713
8714
0x2202
Return-Code names and return-code values
Angle measurement error
0x2204
0x2205
0x2206
Position not exactly reached
Deviation measurement error
No target detected
0x2208
0x2209
0x220A
Bad environment conditions
Error in target acquisition
Target acquisition not enabled
GRC_AUT_DIST_STARTED 8717 Info: dist. measurement has been started
GRC_AUT_SUPPLY_TOO_HIGH
GRC_AUT_SUPPLY_TOO_LOW
8718
8719
0x220E
0x220F external Supply voltage is too high int. or ext. Supply voltage is too low
GRC_AUT_NO_WORKING_AREA
GRC_AUT_ARRAY_FULL
GRC_AUT_NO_DATA
8720
8721
8722
0x2210
0x2211
0x2212 working area not set power search data array is filled no data available
KDM 12544 0x3100
GRC_KDM_NOT_AVAILABLE 12544
FTR
0x3100 KDM device is not available.
13056 0x3300
GRC_FTR_NOTENOUGHSPACE
GRC_FTR_INVALIDINPUT
GRC_FTR_MISSINGSETUP
13058
13059
13060
0x3302
0x3303
0x3304 not enough space on device to proceed uploading
Rename of file failed. invalid parameter as input
Leica TPS1200 – Version 1.50 200
GeoCOM Reference Manual Hardware interface
B H
ARDWARE INTERFACE
B-1 SERIAL INTERFACE
A RS-232 interface is used as a hardware link between the TPS1200 and an external computer.
Signal paths RxD
TxD
Signal Ground
Voltage levels Logical 0 +3V to +25V
Logical 1 -3V to -25V
Baud rate 2400
4800
9600
19200 Default
Parity
38400
57600
115200
None Fixed
Data bits
Stop bits
8 Fixed
1 Fixed
Terminator CR/LF Default
The default settings for the interface are 19200 Baud, 8 data bits, 1 stop bit, no parity. The communication terminator is set to CR/LF. The parameters marked as ‘Fixed’ may not be changed. The other parameters are variable may be changed by the user.
Leica TPS1200 – Version 1.50 201
GeoCOM Reference Manual Hardware interface
B-2 DEBUGGING UTILITY
When debugging communicating systems it may be hard to locate the source of an error. Especially in combination with radios to communicate wireless, the number of error sources increases. The following should be checked carefully therefore:
- Are all communication parameters set up properly? Do both participants share the same parameters?
- Have the serial buffer been flushed after opening the serial port? If not and you are using the ASCII protocol then use a leading <LF> to clear the receiver buffer. In the function call protocol you do not need to take care of that.
- When using the ASCII protocol: Is your implementation of the protocol flow indeed synchronous? Or are you sending requests before having received the last reply?
- Are handshake lines for the radios set correctly?
- In case of character errors check shielding of the radio wiring and potential buffer overflow. In case of
Windows on 386 and 486 computers, check the UART type. If you do not have a UART with built in buffers
(16550 type), you may loose characters too.
It may be helpful for debugging purposes to build up a special cable to monitor the data transfers.
PC-
Appl
GND
TxD
RxD
GND
RxD
TxD
TPS
1N4148 or similar
TxD GND
PC/
Monitor
Leica TPS1200 – Version 1.50 202
GeoCOM Reference Manual Provided Samples
C P
ROVIDED
S
AMPLES
C-1 PROGRAM FRAMES
C-1.1
VBA Sample Program
The sample program shows how simple it is to build an effective application with Visual Basic. The sample program represents a simple measurement task that measures and displays the Hz angle and the V angle continuously. In addition you have the possibility to perform a distance measurement with the following distance measurement programs: single distance standard, single distance fast and tracking.
In order to execute this example program, install MSVB6.0 (or later) on your hard disk and copy the following files in a directory of your choice:
\SAMPLES\VB\VBSAMPLE.VBP
\SAMPLES\VB\VBSAMPLE.FRM
Visual Basic Project of the sample.
Main form of the sample.
\SAMPLES\VB\VBSAMPLE_SETUP.FRM
\SAMPLES\VB\COM_STUBSPUB.BAS
Communication parameter setup form.
Contains the declarations of the TPS1200 system functions.
\SAMPLES\VB\GEOCOMS2K.DLL
\SAMPLES\VB\VBSAMP32.EXE
Contains the implementation of GeoCOM.
Executable of the sample.
Finally connect the TPS1200 Theodolite with the preferred serial port on your personal computer and invoke the executable file. Press the Setup button to select the communication parameters (Serial Port, Baudrate, Protocol) and start the application with the button Go online . The button Quit terminates the application.
C-1.2
C/C++ Sample Programs
The provided sample programs show simple Visual C++ MFC (Microsoft foundation classes) applications. The functionality is exactly the same as in the Visual Basic program above.
The following files have to be copied into a Visual C++ Version 6.0 (or later) working directory in order to build a
32bit application:
\SAMPLES\VC\GEOCOM_SAMPLE.DSW Work space file of the project
\SAMPLES\VC\*.CPP
\SAMPLES\VC\*.H
C++ source files
C++ header files
\SAMPLES\VC\GEOCOM_SAMPLE.RC
\SAMPLES\VC\RES\GEOCOM_SAMPLE.RC
\SAMPLES\VC\RES\GEOCOM_SAMPLE.ICO
Resource file 1
Resource file 2
Icon file
\SAMPLES\VC\COM_PUB.HPP
\SAMPLES\VC\Release\GEOCOMS2K.LIB
Header file for GeoCOM
GeoCOM Library
\SAMPLES\VC\Release\GEOCOMS2K.DLL
\SAMPLES\VC\Release\GeoCOM_SAMPLE.EXE
Contains the implementation of GeoCOM
Executable of the sample
Note : To operate successfully the geocoms2k.dll
file must be accessible for the operating system, hence it must be located in a directory, which the operating system looks up for the requested DLL file
Leica TPS1200 – Version 1.50 203
GeoCOM Reference Manual Provided Samples
C-1.3
TCC Image Grabber Sample Program
The sample program shows how to use the imaging and file transfer commands with C++ .NET. The sample program allows to take an image with the on-axis ATR camera and show it on the PC. Please note that a valid GeoCOM imaging license key is required for this feature.
In order to execute this example program, install Microsoft Visual Studio 2005 (or later) on your hard disk and copy the following files in a directory of your choice:
\SAMPLES\TCCImageGrabber\
GeoComDllSample.sln
\SAMPLES\TCCImageGrabber\GeoComDllSample\
GeoComDllSample.vcproj
\SAMPLES\TCCImageGrabber\GeoComDllSample\
*.cpp
\SAMPLES\TCCImageGrabber\GeoComDllSample\
*.h
\SAMPLES\TCCImageGrabber\GeoComDllSample\
*.resx
\SAMPLES\TCCImageGrabber\GeoComDllSample\ com_pub.hpp
Visual Studio .NET solution.
Visual Studio .NET project.
C++ source files
C++ header files
Resource files
Header file for GeoCOM
\SAMPLES\TCCImageGrabber\GeoComDllSample\ release\GeoComS2K.lib
\SAMPLES\TCCImageGrabber\release\
GeoCOM Library
Contains the implementation of GeoCOM
GeoComS2K.dll
\SAMPLES\TCCImageGrabber\release\ Executable of the sample
GeoComDllSample.exe
Connect the theodolite with the preferred serial port on your personal computer and invoke the executable file. Press the
Com Port Settings button to select the communication parameters (Port, Baudrate, Mode) and start the application with the button Grab Image. The image is stored on the external CF-Card and is subsequently transferred to the PC. Exit terminates the application.
It may be necessary to install the Microsoft Visual C++ 2005 Redistributable Package (x86) on your computer if it does not have Visual C++ 2005 installed. The Microsoft Visual C++ 2005 SP1 Redistributable Package (x86) installs runtime components of Visual C++ Libraries and can be downloaded from the Microsoft Home Page.
Leica TPS1200 – Version 1.50 204
GeoCOM Reference Manual List of Remote Procedure Calls (RPC)
D L
IST OF
R
EMOTE
P
ROCEDURE
C
ALLS
(RPC)
D-1 RPC IN ALPHABETICAL ORDER
A
AUS_GetUserAtrState: 18006.......................................................................................................................................... 39
AUS_GetUserLockState: 18008....................................................................................................................................... 41
AUS_SetUserAtrState: 18005 .......................................................................................................................................... 40
AUS_SetUserLockState: 18007 ....................................................................................................................................... 42
AUT_ChangeFace: 9028 .................................................................................................................................................. 52
AUT_FineAdjust: 9037 .................................................................................................................................................... 54
AUT_GetFineAdjustMode: 9030 ..................................................................................................................................... 58
AUT_GetSearchArea: 9042.............................................................................................................................................. 61
AUT_GetUserSpiral: 9040 ............................................................................................................................................... 63
AUT_LockIn: 9013 .......................................................................................................................................................... 60
AUT_MakePositioning: 9027........................................................................................................................................... 49
AUT_PS_EnableRange: 9048 .......................................................................................................................................... 65
AUT_PS_SearchNext: 9051 ............................................................................................................................................. 68
AUT_PS_SearchWindow: 9052 ....................................................................................................................................... 67
AUT_PS_SetRange: 9047 ................................................................................................................................................ 66
AUT_ReadTimeout: 9012 ................................................................................................................................................ 47
AUT_ReadTol: 9008 ........................................................................................................................................................ 45
AUT_Search: 9029 ........................................................................................................................................................... 56
AUT_SetFineAdjustMode: 9031...................................................................................................................................... 59
AUT_SetSearchArea: 9043 .............................................................................................................................................. 62
AUT_SetTimeout: 9011 ................................................................................................................................................... 48
AUT_SetTol: 9007 ........................................................................................................................................................... 46
AUT_SetUserSpiral: 9041................................................................................................................................................ 64
B
BAP_GetMeasPrg: 17018 ................................................................................................................................................ 80
BAP_GetPrismDef: 17023 ............................................................................................................................................... 77
BAP_GetPrismType: 17009 ............................................................................................................................................. 73
BAP_GetPrismType: 17031 ............................................................................................................................................. 75
BAP_GetTargetType: 17022 ............................................................................................................................................ 71
BAP_GetUserPrismDef: 17033........................................................................................................................................ 78
BAP_MeasDistanceAngle: 17017 .................................................................................................................................... 82
BAP_SearchTarget: 17020 ............................................................................................................................................... 84
BAP_SetMeasPrg: 17019 ................................................................................................................................................. 81
BAP_SetPrismType: 17008.............................................................................................................................................. 74
BAP_SetPrismType: 17030.............................................................................................................................................. 76
BAP_SetTargetType: 17021............................................................................................................................................. 72
BAP_SetUserPrismDef: 17032......................................................................................................................................... 79
BMM_BeepAlarm: 11004 ................................................................................................................................................ 90
BMM_BeepNormal: 11003 .............................................................................................................................................. 91
C
COM_CloseConnection.................................................................................................................................................... 27
COM_End......................................................................................................................................................................... 25
COM_GetBaudRate.......................................................................................................................................................... 28
COM_GetBinaryAvailable: 113 ....................................................................................................................................... 99
COM_GetComFormat ...................................................................................................................................................... 32
COM_GetDoublePrecision: 108....................................................................................................................................... 22
COM_GetErrorText.......................................................................................................................................................... 36
COM_GetSWVersion: 110............................................................................................................................................... 95
COM_GetTimeOut ........................................................................................................................................................... 30
COM_GetWinSWVersion ................................................................................................................................................ 37
COM_Init ......................................................................................................................................................................... 24
Leica TPS1200 – Version 1.50 D-205
GeoCOM Reference Manual List of Remote Procedure Calls (RPC)
COM_NullProc: 0............................................................................................................................................................. 98
COM_OpenConnection .................................................................................................................................................... 26
COM_SetBinaryAvailable: 114...................................................................................................................................... 100
COM_SetComFormat....................................................................................................................................................... 33
COM_SetDoublePrecision: 107 ....................................................................................................................................... 23
COM_SetTimeOut............................................................................................................................................................ 31
COM_SwitchOffTPS: 112................................................................................................................................................ 97
COM_SwitchOnTPS: 111 ................................................................................................................................................ 96
COM_UseWindow ........................................................................................................................................................... 34
COM_ViewError .............................................................................................................................................................. 35
CSV_GetDateTime: 5008............................................................................................................................................... 107
CSV_GetDateTimeCentiSec: 5117 ................................................................................................................................ 112
CSV_GetDeviceConfig: 5035 ........................................................................................................................................ 105
CSV_GetInstrumentName: 5004.................................................................................................................................... 104
CSV_GetInstrumentNo: 5003......................................................................................................................................... 103
CSV_GetIntTemp: 5011 ................................................................................................................................................. 111
CSV_GetReflectorlessClass: 5100 ................................................................................................................................. 106
CSV_GetSWVersion: 5034 ............................................................................................................................................ 109
CSV_SetDateTime: 5007 ............................................................................................................................................... 108
E
EDM_GetEglIntensity: 1058 .......................................................................................................................................... 115
EDM_Laserpointer: 1004 ............................................................................................................................................... 114
EDM_SetEglIntensity: 1059........................................................................................................................................... 116
I
IMG_GetTccConfig: 23400............................................................................................................................................ 128
IMG_SetTccConfig: 23401 ............................................................................................................................................ 129
IMG_TakeTccImage: 23402........................................................................................................................................... 130
IOS_BeepOff: 20000 ........................................................................................................................................................ 93
IOS_BeepOn: 20001......................................................................................................................................................... 92
M
MOT_ReadLockStatus: 6021 ......................................................................................................................................... 132
MOT_SetVelocity: 6004 ................................................................................................................................................ 135
MOT_StartController: 6001 ........................................................................................................................................... 133
MOT_StopController: 6002............................................................................................................................................ 134
S
SUP_GetConfig: 14001 .................................................................................................................................................. 138
SUP_SetConfig: 14002................................................................................................................................................... 139
T
TMC_DoMeasure: 2008 ................................................................................................................................................. 157
TMC_GetAngle1: 2003 .................................................................................................................................................. 148
TMC_GetAngle5: 2107 .................................................................................................................................................. 150
TMC_GetAngSwitch: 2014............................................................................................................................................ 179
TMC_GetAtmCorr: 2029 ............................................................................................................................................... 162
TMC_GetCoordinate: 2082 ............................................................................................................................................ 144
TMC_GetEdmMode: 2021 ............................................................................................................................................. 182
TMC_GetFace: 2026 ...................................................................................................................................................... 177
TMC_GetFullMeas: 2167............................................................................................................................................... 155
TMC_GetHeight: 2011................................................................................................................................................... 160
TMC_GetInclineSwitch: 2007........................................................................................................................................ 180
TMC_GetPrismCorr: 2023 ............................................................................................................................................. 166
TMC_GetRefractiveCorr: 2031...................................................................................................................................... 167
TMC_GetRefractiveMethod: 2091................................................................................................................................. 169
TMC_GetSignal: 2022.................................................................................................................................................... 178
TMC_GetSimpleCoord: 2116......................................................................................................................................... 184
TMC_GetSimpleMea: 2108 ........................................................................................................................................... 146
Leica TPS1200 – Version 1.50 D-206
GeoCOM Reference Manual List of Remote Procedure Calls (RPC)
TMC_GetSlopeDistCorr: 2126....................................................................................................................................... 190
TMC_GetStation: 2009 .................................................................................................................................................. 171
TMC_IfDataAzeCorrError: 2114 ................................................................................................................................... 186
TMC_IfDataIncCorrError: 2115..................................................................................................................................... 188
TMC_QuickDist: 2117 ................................................................................................................................................... 152
TMC_SetAngSwitch: 2016 ............................................................................................................................................ 189
TMC_SetAtmCorr: 2028 ................................................................................................................................................ 163
TMC_SetEdmMode: 2020.............................................................................................................................................. 183
TMC_SetHandDist: 2019 ............................................................................................................................................... 158
TMC_SetHeight: 2012.................................................................................................................................................... 161
TMC_SetInclineSwitch: 2006 ........................................................................................................................................ 181
TMC_SetOrientation: 2113 ............................................................................................................................................ 164
TMC_SetRefractiveCorr: 2030....................................................................................................................................... 168
TMC_SetRefractiveMethod: 2090 ................................................................................................................................. 170
TMC_SetStation: 2010 ................................................................................................................................................... 172
Leica TPS1200 – Version 1.50 D-207
ಡೌನ್ಲೋಡ್ ಮಾಡಿ
ಜಾಹಿರಾತು