Professional Documents
Culture Documents
FlexLine GeoCOM Manual en PDF
FlexLine GeoCOM Manual en PDF
GeoCOM Reference
Manual
Version 1.30
English
GeoCOM Reference Manual Contents
1 GEOCOM.................................................................................................................................................................. 4
1.1 INTRODUCTION .................................................................................................................................................... 4
1.2 FLEXLINE SYSTEM SOFTWARE ............................................................................................................................ 4
1.3 PRINCIPLES OF GEOCOM OPERATION ................................................................................................................. 5
2 GENERAL CONCEPTS OF USING GEOCOM .................................................................................................. 6
2.1 INTRODUCTION .................................................................................................................................................... 6
2.2 GENERAL CONCEPT OF OPERATION ..................................................................................................................... 6
2.3 ASCII PROTOCOL ................................................................................................................................................ 6
2.4 FUNCTION CALL PROTOCOL - C/C++ .................................................................................................................. 7
2.5 FUNCTION CALL PROTOCOL - VBA..................................................................................................................... 8
3 FUNDAMENTALS OF PROGRAMMING GEOCOM ....................................................................................... 9
3.1 INTRODUCTION .................................................................................................................................................... 9
3.2 ASCII PROTOCOL PROGRAMMING ...................................................................................................................... 9
3.3 C/C++ - PROGRAMMING .................................................................................................................................... 11
3.4 VBA - PROGRAMMING ...................................................................................................................................... 13
3.5 UNITS OF VALUES ............................................................................................................................................. 15
3.6 TPS1200 INSTRUMENT MODES OF OPERATION ................................................................................................. 15
3.7 COMMON COMMUNICATION ERRORS ................................................................................................................ 15
4 REMARKS ON THE DESCRIPTION ................................................................................................................. 18
4.1 STRUCTURE OF DESCRIPTIONS........................................................................................................................... 18
5 COMMUNICATION SETTINGS......................................................................................................................... 20
5.1 USAGE............................................................................................................................................................. 20
5.2 CONSTANTS AND TYPES .................................................................................................................................... 20
5.3 GENERAL GEOCOM FUNCTIONS ....................................................................................................................... 21
5.4 CLIENT SPECIFIC GEOCOM FUNCTIONS............................................................................................................ 23
6 BASIC APPLICATIONS BAP ........................................................................................................................... 37
6.1 USAGE............................................................................................................................................................. 37
6.2 CONSTANTS AND TYPES .................................................................................................................................... 37
6.3 FUNCTIONS ........................................................................................................................................................ 39
7 BASIC MAN MACHINE INTERFACE BMM ................................................................................................ 45
7.1 USAGE................................................................................................................................................................ 45
7.2 CONSTANTS AND TYPES .................................................................................................................................... 45
7.3 FUNCTIONS ........................................................................................................................................................ 46
8 COMMUNICATIONS COM.............................................................................................................................. 48
8.1 USAGE............................................................................................................................................................. 48
8.2 CONSTANTS AND TYPES .................................................................................................................................... 48
8.3 FUNCTIONS ........................................................................................................................................................ 49
9 CENTRAL SERVICES CSV .............................................................................................................................. 53
9.1 INTRODUCTION .................................................................................................................................................. 53
9.2 USAGE ............................................................................................................................................................... 53
9.3 CONSTANTS AND TYPES .................................................................................................................................... 53
9.4 FUNCTIONS ........................................................................................................................................................ 55
10 ELECTRONIC DISTANCE MEASUREMENT EDM ................................................................................ 64
10.1 INTRODUCTION .................................................................................................................................................. 64
10.2 USAGE ............................................................................................................................................................... 64
10.3 CONSTANTS AND TYPES .................................................................................................................................... 64
10.4 FUNCTIONS ........................................................................................................................................................ 65
11 SUPERVISOR SUP ......................................................................................................................................... 68
11.1 USAGE................................................................................................................................................................ 68
11.2 CONSTANTS AND TYPES .................................................................................................................................... 68
11.3 FUNCTIONS ........................................................................................................................................................ 69
14 APPENDIX........................................................................................................................................................ 120
A Return-Code names and return-code values................................................................................................... 120
B Hardware interface......................................................................................................................................... 126
B-1 Serial Interface........................................................................................................................................ 126
B-1.1 Serial Interface specifications ......................................................................................................... 126
B-1.2 Debugging Utility for Serial Interface ............................................................................................ 126
B-2 USB Interface ......................................................................................................................................... 128
B-3 Bluetooth Interface ................................................................................................................................. 128
C Provided Samples ........................................................................................................................................... 129
C-1 Program Frames...................................................................................................................................... 129
C-1.1 VBA Sample Program .................................................................................................................... 129
C-1.2 C/C++ Sample Programs ................................................................................................................ 129
D List of Remote Procedure Calls (RPC) .......................................................................................................D-130
D-1 rpc in Alphabetical order ....................................................................................................................D-130
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.
1 GEOCOM
1.1 INTRODUCTION
FlexLine 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 FlexLine 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.
PC application
GeoCOM
client
PC Serial Line
COMF
TPS
GeoCOM
server
BAP
AUT
MOT TMC
CTL EDM CSV BMM SUP COM
system software
The FlexLine instrument system software uses a multitasking operating system. Nevertheless, only one request can be
executed at once. This means in respect of calling RPCs 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.
request
Client reply
Server
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.
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.
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 GeoCOM reply type 1.
<RC_COM> 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.
<TrId> 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.
<RC> 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).
<P0>,<P1>,... Parameter 0, Parameter 1, These parameters will be valid only if <GRC> is
equal to 0 (GRC_OK).
<Term> 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)
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.
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
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.
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 elements 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 elements 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, // encoded as 0
TMC_AUTO_INC, // 1
TMC_PLANE_INC // 2
}
C-Declaration
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!
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).
GRC_TYPE RetCode;
BOOLE bOpenAndRunning = FALSE;
// initialize GeoCOM
RetCode = COM_Init();
if (RetCode == GRC_OK)
{
// open a connection to the FlexLine instrument
RetCode = COM_OpenConnection (COM_1, COM_BAUD_19200,
NUM_OF_RETRIES);
if (RetCode == GRC_OK)
{
bOpenAndRunning = TRUE;
}
}
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
}
}
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:
WaitTime = 1000
VB_TMC_GetSimpleMea( WaitTime,
If (bOpenAndRunning) Then
' close channel
RetCode = VB_COM_CloseConnection ()
If (RetCode <> GRC_OK) Then
' handle error
End If
End If
Dim s As String
Note: Incorrectly handled string output parameters may lead to severe runtime problems.
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.
Note: To reduce redundancy the return type has been omitted from the C- and VB-declarations of the RPCs.
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.
5 COMMUNICATION SETTINGS
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.
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 floating-
point 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
nDigits Out Number of digits to the right of the decimal point.
Return-Code Names and Return-Code Values
GRC_OK 0 Execution successful.
See Also
COM_SetDoublePrecision
Example
GRC_TYPE rc;
short nDigits, nOldDigits;
TMC_HEIGT height;
(void) COM_GetDoublePrecision(nOldDigits);
rc = COM_SetDoublePrecision(nDigits);
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
nDigits In Number of digits right to the comma.
Return-Code Names and Return-Code Values
GRC_OK 0 Execution successful.
GRC_IVPARAM 2 0 > nDigits > 15
See Also
COM_GetDoublePrecision
Example
see COM_GetDoublePrecision
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
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
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
ePort In Serial port.
eBaud InOut Baud rate.
nRetries In Number of retries.
Return-Code Names and Return-Code Values
GRC_OK 0 Execution successful.
GRC_COM_PORT_NOT_AVAILABLE 3103 Port is in use or does not exist
GRC_COM_NO_PARTNER 3105 GeoCOM failed to detect a TPS.
GRC_IVPARAM 2 Illegal parameter.
See Also
COM_CloseConnection
COM_NullProc
COM_SetComFormat
Example
see COM_Init
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
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 0 Execution successful.
See Also
COM_OpenConnection
Example
void main()
{
GRC_TYPE rc;
COM_BAUD_RATE eRate;
// init GeoCOM
...
...
// shutdown GeoCOM
} // end of main
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
nTimeOut Out Timeout value in seconds, default value is 3 sec.
Return-Code Names and Return-Code Values
GRC_OK 0 Execution successful.
See Also
COM_SetTimeOut
Example
GRC_TYPE rc;
short nTimeOut;
COM_GetTimeOut(nTimeOut);
if (nTimeOut <= 3)
{
COM_SetTimeOut(7);
}
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
nTimeOut In timeout value in seconds
Return-Code Names and Return-Code Values
GRC_OK 0 Execution successful.
See Also
COM_GetTimeOut
Example
see COM_GetTimeOut
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
eComFormat Out COM_ASCII or COM_BINARY
Return-Code Names and Return-Code Values
GRC_OK 0 Execution successful.
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");
}
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
EComFormat Out COM_ASCII or COM_BINARY
Return-Code Names and Return-Code Values
GRC_OK 0 Execution successful.
GRC_COM_PORT_NOT_OPEN 3104 Port not open for transmission.
GRC_COM_NO_BINARY 3086 TPS Firmware does not support binary data transmission
format.
See Also
COM_GetComFormat
COM_OpenConnection
Example
GRC_TYPE rc;
COM_FORMAT 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;
// continue in program
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
handle In Parent window handle.
Return-Code Names and Return-Code Values
GRC_OK 0 Execution successful.
See Also
COM_ViewError
Example
RC_TYE rc;
HWND hWnd;
rc = COM_UseWindow(hWnd);
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
Result In Error result code.
szMsgTitle In Title of the displayed dialog box.
Return-Code Names and Return-Code Values
GRC_OK 0 Execution successful.
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
}
C-Declaration
COM_GetErrorText( GRC_TYPE Result,
char *szErrText)
VB-Declaration
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
Result In Error code of a function called before
this code will be checked.
szErrText Out Error text if not equal to GRC_OK.
Return-Code Names and Return-Code Values
GRC_OK 0 Execution successful.
See Also
COM_ViewError
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
nRel Out Software Release.
nVer Out Software version.
nSubVer Out Software subversion.
Return-Code Names and Return-Code Values
GRC_OK 0 Execution successful.
See Also
COM_GetSWVersion
Example
GRC_TYPE rc;
short nRel, nSubVer, nVer;
printf("Windows GeoCOM:\n");
6.3 FUNCTIONS
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, ePrismType[long]
Remarks
Gets the current prism type.
Parameters
ePrismType Out Actual prism type
Return-Code Names and Return-Code Values
GRC_OK 0 Execution successful.
GRC_IVRESULT 3 RL EDM type is set no reflector.
See Also
BAP_SetPrismType()
Example
-
C-Declaration
BAP_SetPrismType( BAP_PRISMTYPE ePrismType )
VB-Declaration
VB_BAP_SetPrismType(byVal ePrismType As Long)
ASCII-Request
%R1Q,17008: ePrismType [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
ePrismType In Prism type.
Return-Code Names and Return-Code Values
GRC_OK 0 Execution successful.
GRC_IVPARAM 2 Prism type is not available.
See Also
BAP_GetPrismType2()
TMC_SetPrismCorr()
Example
-
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, ePrismType[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 0 Execution successful.
See Also
BAP_SetPrismType()
BAP_SetPrismType2()
Example
-
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: ePrismType [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 0 Execution successful.
GRC_IVPARAM 2 Prism type is not available, i.e. a user prism is not defined
See Also
BAP_GetPrismType2()
TMC_SetPrismCorr()
Example
-
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
szPrismName In Prism name
dAddConst Out Prism correction [m]
eReflType Out Reflector type
szCreator Out Name of creator
Return-Code Names and Return-Code Values
GRC_OK 0 Execution successful.
GRC_IVPARAM 2 Invalid prism definition
See Also
BAP_SetPrismType()
BAP_SetPrismType2()
BAP_GetPrismDef()
BAP_GetUserPrismDef()
Example
-
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
szPrismName In Prism name
dAddConst In Prism correction [m]
eReflType In Reflector type
szCreator In Name of creator
Return-Code Names and Return-Code Values
GRC_OK 0 Execution successful.
GRC_IVPARAM 2 Invalid prism definition
GRC_IVRESULT 3 Prism definition is not set
See Also
BAP_SetPrismType()
BAP_GetPrismDef()
BAP_GetUserPrismDef()
Example
-
7.3 FUNCTIONS
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
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
8 COMMUNICATIONS COM
8.1 USAGE
This subsystem contains those functions, which are subsystem COM related, but will be executed as RPCs on the
FlexLine instrument. It provides a function to check communication between the computer and the FlexLine 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 FlexLine instrument.
8.3 FUNCTIONS
C-Declaration
COM_GetSWVersion( short &nRel,
short &nVer,
short &nSubVer )
VB-Declaration
VB_COM_GetSWVersion( nRel As Integer,
nVer As 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
nRel Out Software release.
nVer Out Software version.
nSubVer Out Software subversion (reserved).
Return-Code Names and Return-Code Values
GRC_OK 0 Execution successful.
See Also
CSV_GetSWVersion
Example
GRC_TYPE rc;
short nRel, nSubVer, nVer;
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 FlexLine instrument.
Note: The FlexLine instrument can be switched on by any RPC command or even by sending a single character.
Parameters
eOnMode In Run mode.
Return-Code Names and Return-Code Values
GRC_OK 0 Execution successful.
GRC_NotImpl 5 Not implemented yet.
See Also
COM_SwitchOffTPS
COM_OpenConnection
Example
GRC_TYPE rc;
// switch on FlexLine
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
}
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 FlexLine instrument.
Parameters
eOffMode In Stop mode.
Return-Code Names and Return-Code Values
GRC_OK 0 Execution successful.
See Also
COM_SwitchOnTPS
Example
-
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
9.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.
// TPS1000 specific
TPS_DEVICE_TC1 = 0x00001, // tachymeter (TCW1)
TPS_DEVICE_TC2 = 0x00002, // tachymeter (TCW2)
// 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, //
TPS_REFLESS_R1000 = 4, //
};
General Date and Time
struct DATIME {
DATE_TYPE Date;
TIME_TYPE Time;
};
General Date
struct DATE_TYPE {
short Year; // year
BYTE Month; // month in year 1..12
BYTE Day; // day in month 1..31
};
General Time
struct TIME_TYPE {
BYTE Hour; // 24 hour per day 0..23
BYTE Minute; // minute 0..59
BYTE Second; // seconds 0..59
};
Power sources
struct CSV_POWER_PATH{
CSV_EXTERNAL_POWER = 1, // power source is external
CSV_INTERNAL_POWER = 2 // power source is the
// internal battery
};
9.4 FUNCTIONS
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 0 Execution successful.
Example
GRC_TYPE rc;
long SerialNo;
rc = CSV_GetInstrumentNo(SerialNo);
if (rc == GRC_OK)
{
// use SerialNo
}
else
{
// instrument number not yet set
}
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: TCRP1201 R300
Parameters
Name Out The instrument name
Return-Code Names and Return-Code Values
GRC_OK 0 Execution successful.
Example
GRC_TYPE rc;
rc = CSV_GetInstrumentName(szName);
if (rc == GRC_OK)
{
// use instrument name
}
else
{
// instrument name not set yet
// (incomplete calibration data)
}
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 0 Execution successful.
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)
}
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 Out RL type.
Return-Code Names and Return-Code Values
GRC_OK 0 Execution successful.
Example
GRC_TYPE rc;
TPS_REFLESS_CLASS Device;
rc = CSV_GetReflectorlessClass(reRefLessClass);
if (rc == GRC_OK)
{
// Use RL type
}
else
{
// Unknown RL type
}
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 0 Execution successful.
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);
}
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 0 Execution successful.
See Also
CSV_GetDateTime
Example
See CSV_GetDateTime.
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 Out Release
nVersion Out Version
nSubVersion Out Sub Version
Return-Code Names and Return-Code Values
GRC_OK 0 Execution successful.
Example
GRC_TYPE rc;
short nRel, nVers, nSubVers;
char szBuffer[17]
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 Out Actual power source
ePowerSuggest Out Not supported.
Return-Code Names and Return-Code Values
GRC_OK 0 Execution successful.
GRC_LOW_POWER 16 Power is low. Time remaining is about 30.
GRC_BATT_EMPTY 18 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)
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 0 Execution successful.
Example
GRC_TYPE rc;
double Temp;
rc = CSV_GetIntTemp(Temp);
// use temperature information
10.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.
10.4 FUNCTIONS
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 with R100 / R300 EDM which support distance measurement without
reflector.
Parameters
eOn In ON - switch Laserpointer on
OFF - switch Laserpointer off
Return-Code Names and Return-Code Values
GRC_OK 0 Execution successful.
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;
10.4.2 EDM_GetEglIntensity getting the value of the intensity of the electronic guide light
EDM_GetEglIntensity........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ 1058
1058 ................................................................................................................................................................................................................................................................EDM_GetEglIntensity
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 0 Execution successful.
GRC_EDM_DEV_NOT_INSTALLED 778 Electronic Guide Light not implemented
See Also
EDM_ SetEglIntensity ()
Example
See EDM_SetEglIntensity.
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 0 Execution successful.
GRC_SYSBUSY 13 EDM already busy
GRC_EDM_DEV_NOT_INSTALLED 778 Electronic Guide Light not implemented
GRC_EDM_INVALID_COMMAND 770 When an invalid intensity is entered
See Also
EDM_GetEglIntensity ()
Example
RC-TYPE rc;
EDM_EGLINTENSITY_TYPE eIntensity, eNewIntensity;
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
}
11 SUPERVISOR SUP
11.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.
11.3 FUNCTIONS
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
Reserved Out Reserved
AutoPower Out Current activated shut down mechanism
Timeout Out The timeout in ms. After this time the device switches in the
mode defined by the value of AutoPower when no user
activity (press a key, turn the device or communication via
GeoCOM) occurs.
Return-Code Names and Return-Code Values
GRC_OK 0 Execution successful.
See Also
SUP_SetConfig
Example
see 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
Reserved In Reserved
AutoPower In Defines the behaviour of the power off mode.
Timeout In The timeout in ms. After this time the device switches in the
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 60000 m/s (1 min) and 6000000 m/s (100 min).
Return-Code Names and Return-Code Values
GRC_OK 0 Execution successful.
GRC_IVPARAM 2 Timeout parameter invalid.
See Also
SUP_GetConfig
Example
GRC_TYPE rc;
ON_OFF_TYPE Reserved;
SUP_AUTO_POWER AutoPower;
SYSTIME Timeout;
rc = SUP_SetConfig (Reserved,
AutoPower,
Timeout);
12.2 USAGE
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
WaitTime In The delay to wait for the distance measurement to finish
[ms].
Coordinate Out Calculated Cartesian co-ordinates.
Mode In Inclination sensor measurement mode
Return-Code Names and Return-Code Values
GRC_OK 0 Execution successful.
GRC_TMC_ACCURACY_GUARANTEE 1284 Accuracy is not guaranteed, because the result is containing
measurement data which accuracy could not be verified by
the system. Co-ordinates are available.
GRC_TMC_NO_FULL_CORRECTION 1283 The results are not corrected by all active sensors. Co-
ordinates are available.
In order to secure which correction is missing use the both
functions TMC_IfDataAzeCorrError and
TMC_IfDataIncCorrError
GRC_TMC_ANGLE_OK 1285 Angle values okay, but no valid distance. Co-ordinates are
not available.
GRC_TMC_ANGLE_NO_ACC_ 1289 Only the angle measurement is valid but its accuracy cannot
GUARANTY be guaranteed (the tilt measurement is not available).
GRC_TMC_ANGLE_NO_FULL_ 1288 No distance data available but angle data are valid. The return
CORRECTION 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.
GRC_TMC_DIST_ERROR 1292 No measuring, because of missing target point, co-ordinates
are not available.
Aim target point and try it again
GRC_TMC_DIST_PPM 1291 No distance measurement respectively no distance data
because of wrong EDM settings. Co-ordinates are not
available.
GRC_TMC_ANGLE_ERROR 1290 Angle or inclination measurement error. Check inclination
modes in commands.
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;
}
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
WaitTime In The delay to wait for the distance measurement to finish
[ms].
Mode In Inclination sensor measurement mode.
OnlyAngle Out Result of the angle measurement [rad].
SlopeDistance Out Result of the distance measurement [m].
Return-Code Names and Return-Code Values
GRC_OK 0 Execution successful.
GRC_TMC_NO_FULL_CORRECTION 1283 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.
GRC_TMC_ACCURACY_GUARANTEE 1284 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.
GRC_TMC_ANGLE_OK 1285 Angle values okay, but no valid distance.
Perform a distance measurement previously.
GRC_TMC_ANGLE_NO_FULL_ 1288 No distance data available but angle data are valid. The return
CORRECTION 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.
GRC_TMC_ANGLE_NO_ACC_ 1289 Only the angle measurement is valid but its accuracy cannot
GUARANTY be guaranteed (the tilt measurement is not available).
GRC_TMC_DIST_ERROR 1292 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.
GRC_TMC_DIST_PPM 1291 No distance measurement respectively no distance data
because of wrong EDM settings. Angle data are available but
distance data are not available.
if (rc == GRC_OK)
{
// use distance and angle values
else
{
// something with TMC_GetSimpleMea went wrong
}
else
{
// something with dist. measurement went wrong
}
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
Mode In Inclination sensor measurement mode.
Angle Out Result of the angle measurement.
Return-Code Names and Return-Code Values
GRC_OK 0 Execution successful.
GRC_TMC_ACCURACY_GUARANTEE 1284 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.
GRC_TMC_NO_FULL_CORRECTION 1283 The results are not corrected by all active sensors. Co-
ordinates are available.
In order to secure which correction is missing use the both
functions TMC_IfDataAzeCorrError and
TMC_IfDataIncCorrError
GRC_TMC_ANGLE_OK 1285 Angle values okay, but no valid distance. Co-ordinates are
not available.
GRC_TMC_ANGLE_NO_ACC_ 1289 Only the angle measurement is valid but its accuracy cannot
GUARANTY be guaranteed (the tilt measurement is not available).
GRC_TMC_ANGLE_NO_FULL_ 1288 No distance data available but angle data are valid. The return
CORRECTION 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.
GRC_TMC_DIST_ERROR 1292 No measuring, because of missing target point, co-ordinates
are not available.
Aim target point and try it again
GRC_TMC_DIST_PPM 1291 No distance measurement respectively no distance data
because of wrong EDM settings. Co-ordinates are not
available.
GRC_TMC_ANGLE_ERROR 1290 Angle or inclination measurement error. Check inclination
modes in commands.
GRC_TMC_BUSY 1293 TMC resource is locked respectively TMC task is busy.
Repeat measurement.
GRC_ABORT 8 Measurement through customer aborted.
GRC_SHUT_DOWN 12 System power off through customer.
See Also
TMC_DoMeasure
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
Mode In Inclination sensor measurement mode.
Angle Out Result of the angle measurement.
Return-Code Names and Return-Code Values
GRC_OK 0 Execution successful.
GRC_TMC_ACCURACY_GUARANTEE 1284 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.
GRC_TMC_NO_FULL_CORRECTION 1283 The results are not corrected by all active sensors. Co-
ordinates are available.
In order to secure which correction is missing use the both
functions TMC_IfDataAzeCorrError and
TMC_IfDataIncCorrError
GRC_TMC_ANGLE_OK 1285 Angle values okay, but no valid distance. Co-ordinates are
not available.
GRC_TMC_ANGLE_NO_ACC_ 1289 Only the angle measurement is valid but its accuracy cannot
GUARANTY be guaranteed (the tilt measurement is not available).
GRC_TMC_ANGLE_NO_FULL_ 1288 No distance data available but angle data are valid. The return
CORRECTION 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.
GRC_TMC_DIST_ERROR 1292 No measuring, because of missing target point, co-ordinates
are not available.
Aim target point and try it again
GRC_TMC_DIST_PPM 1291 No distance measurement respectively no distance data
because of wrong EDM settings. Co-ordinates are not
available.
GRC_TMC_ANGLE_ERROR 1290 Angle or inclination measurement error. Check inclination
modes in commands.
GRC_TMC_BUSY 1293 TMC resource is locked respectively TMC task is busy.
Repeat measurement.
GRC_ABORT 8 Measurement through customer aborted.
GRC_SHUT_DOWN 12 System power off through customer.
See Also
TMC_DoMeasure
TMC_GetAngle5
nCnt=0;
do
{
bExit=TRUE;
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);
C-Declaration
TMC_QuickDist( TMC_HZ_V_ANG &OnlyAngle,
double &dSlopeDistance)
VB-Declaration
VB_TMC_QuickDist( OnlyAngle As
TMC_HZ_V_ANG,
dSlopeDistance As Double)
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
OnlyAngle Out measured Hz- and V- angle
dSlopeDistance Out measured slope-distance
Return-Code Names and Return-Code Values
GRC_OK 0 Execution successful.
GRC_TMC_ACCURACY_GUARANTEE 1284 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.
GRC_TMC_NO_FULL_CORRECTION 1283 The results are not corrected by all active sensors. Co-
ordinates are available.
In order to secure which correction is missing use the both
functions TMC_IfDataAzeCorrError and
TMC_IfDataIncCorrError
GRC_TMC_ANGLE_OK 1285 Angle values okay, but no valid distance. Co-ordinates are
not available.
GRC_TMC_ANGLE_NO_ACC_ 1289 Only the angle measurement is valid but its accuracy cannot
GUARANTY be guaranteed (the tilt measurement is not available).
GRC_TMC_ANGLE_NO_FULL_ 1288 No distance data available but angle data are valid. The return
CORRECTION 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.
GRC_TMC_DIST_ERROR 1292 No measuring, because of missing target point, co-ordinates
are not available.
Aim target point and try it again
GRC_TMC_DIST_PPM 1291 No distance measurement respectively no distance data
because of wrong EDM settings. Co-ordinates are not
available.
GRC_TMC_ANGLE_ERROR 1290 Angle or inclination measurement error. Check inclination
modes in commands.
GRC_TMC_BUSY 1293 TMC resource is locked respectively TMC task is busy.
Repeat measurement.
GRC_ABORT 8 Measurement through customer aborted.
GRC_SHUT_DOWN 12 System power off through customer.
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,
dact_time, dstart_time;
short nNoMeasurements;
TMC_GetAngSwitch(SwCorr);
CSV_GetDateTime(Datime);
dstart_time=Datime.Time.Minute*60+
Datime.Time.Second;
bExit=FALSE;
nNoMeasurements=0;
do
{
dLastHzAng=HzVAng.dHz;
Result=TMC_QuickDist(HzVAng, dSlopeDist);
switch(Result)
{
// distance- and angles- data available
case GRC_TMC_ACCURACY_GUARANTEE:
// perform a forced incline measurement
if(dhz_angle_diff<MAX_DIFFERENCE)
{// instrument is in static period
CSV_GetDateTime(Datime);
dact_time=Datime.Time.Minute*60+
Datime.Time.Second;
case GRC_OK:
case GRC_TMC_NO_FULL_CORRECTION:
break;
default:
bExit=TRUE;
break;
}
}
while(!bExit && nNoMeasurements<MAX);
C-Declaration
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 or
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
Command in TMC measurement mode.
Mode in Inclination sensor measurement mode.
Return-Code Names and Return-Code Values
GRC_OK 0 Execution successful.
See Also
TMC_SetEdmMode
TMC_GetCoordinate
TMC_GetSimpleMea
TMC_GetAngle1
TMC_GetAngle5
Example
GRC_TYPE Result;
short nCnt;
nCnt=0;
while(nCnt<100)
{// wait on the distance data max. 100x100ms
Result=TMC_GetCoordinate(100,Coordinate,
TMC_AUTO_INC);
nCnt++;
}
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 instruments face because of the manual
input.
After this command the previous measured distance is cleared.
Parameters
SlopeDistance In Slope distance [m]
HgtOffset In Height offset [m]
Mode In Inclination sensor measurement mode [m]
Return-Code Names and Return-Code Values
GRC_OK 0 Execution successful.
GRC_TMC_ACCURACY_GUARANTEE 1284 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.
GRC_TMC_NO_FULL_CORRECTION 1283 The results are not corrected by all active sensors. Co-
ordinates are available.
In order to secure which correction is missing use the both
functions TMC_IfDataAzeCorrError and
TMC_IfDataIncCorrError
GRC_TMC_ANGLE_OK 1285 Angle values okay, but no valid distance. Co-ordinates are
not available.
GRC_TMC_ANGLE_NO_ACC_ 1289 Only the angle measurement is valid but its accuracy cannot
GUARANTY be guaranteed (the tilt measurement is not available).
GRC_TMC_ANGLE_NO_FULL_ 1288 No distance data available but angle data are valid. The return
CORRECTION 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.
GRC_TMC_DIST_ERROR 1292 No measuring, because of missing target point, co-ordinates
are not available.
Aim target point and try it again
GRC_TMC_DIST_PPM 1291 No distance measurement respectively no distance data
because of wrong EDM settings. Co-ordinates are not
available.
GRC_TMC_ANGLE_ERROR 1290 Angle or inclination measurement error. Check inclination
modes in commands.
GRC_TMC_BUSY 1293 TMC resource is locked respectively TMC task is busy.
Repeat measurement.
GRC_ABORT 8 Measurement through customer aborted.
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
}
}
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
Height Out Current reflector height [m]
Return-Code Names and Return-Code Values
GRC_OK 0 Execution successful.
See Also
TMC_SetHeight
Example
GRC_TYPE rc;
TMC_HEIGHT Height, NewHeight;
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
}
}
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
Height In new reflector height [m]
Return-Code Names and Return-Code Values
GRC_OK 0 Execution successful.
GRC_TMC_BUSY 1293 TMC resource is locked respectively TMC task is busy. The
reflector height is not set.
Repeat measurement.
GRC_IVPAR 2 A reflector height less than 10m or greater than 100m is
entered. Invalid parameter.
See Also
TMC_GetHeight
Example
see TMC_GetHeight
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
AtmTemperature Out Atmospheric Correction Data
Return-Code Names and Return-Code Values
GRC_OK 0 Execution successful.
See Also
TMC_SetAtmCorr
Example
see TMC_SetAtmCorr
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
AtmTemperature In Atmospheric Correction Data
Return-Code Names and Return-Code Values
GRC_OK 0 Execution successful.
See Also
TMC_GetAtmCorr
Example
TMC_ATMOS_TEMPERATURE AtmCorr;
TMC_GetAtmCorr(AtmCorr);
TMC_SetAtmCorr(AtmCorr);
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
HzOrientation In Hz Orientation [rad]
Return-Code Names and Return-Code Values
GRC_OK 0 Execution successful.
GRC_TMC_ACCURACY_GUARANTEE 1284 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.
GRC_TMC_NO_FULL_CORRECTION 1283 The results are not corrected by all active sensors. Co-
ordinates are available.
In order to secure which correction is missing use the both
functions TMC_IfDataAzeCorrError and
TMC_IfDataIncCorrError
GRC_TMC_ANGLE_OK 1285 Angle values okay, but no valid distance. Co-ordinates are
not available.
GRC_TMC_ANGLE_NO_ACC_ 1289 Only the angle measurement is valid but its accuracy cannot
GUARANTY be guaranteed (the tilt measurement is not available).
GRC_TMC_ANGLE_NO_FULL_ 1288 No distance data available but angle data are valid. The return
CORRECTION 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.
GRC_TMC_DIST_ERROR 1292 No measuring, because of missing target point, co-ordinates
are not available.
Aim target point and try it again
GRC_TMC_DIST_PPM 1291 No distance measurement respectively no distance data
because of wrong EDM settings. Co-ordinates are not
available.
GRC_TMC_ANGLE_ERROR 1290 Angle or inclination measurement error. Check inclination
modes in commands.
GRC_TMC_BUSY 1293 TMC resource is locked respectively TMC task is busy.
Repeat measurement.
GRC_ABORT 8 Measurement through customer aborted.
GRC_SHUT_DOWN 12 System power off through customer.
See Also
TMC_IfDataAzeCorrError
TMC_IfDataIncCorrError
TMC_DoMeasure
Example
GRC_TYPE Result;
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
PrismCorr Out Prism constant [m]
Return-Code Names and Return-Code Values
GRC_OK 0 Execution successful.
See Also
TMC_SetPrismCorr
Example
const double Corr = 0.1;
GRC_TYPE rc;
double PrismCorr;
rc = TMC_GetPrismCorr(PrismCorr);
if (PrismCorr != Corr)
{
rc = TMC_SetPrismCorr(Corr);
if (rc == GRC_OK)
{
// set of prisma corr successful
}
else
{
// Invalid parameter
}
}
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
Refractive Out Refraction control data
Return-Code Names and Return-Code Values
GRC_OK 0 Execution successful.
See Also
TMC_SetRefractiveCorr
Example
const double EarthRadius = 6378000;
GRC_TYPE rc;
TMC_REFRACTION Refractive;
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
Refractive In Refraction control data
Return-Code Names and Return-Code Values
GRC_OK 0 Execution successful.
GRC_TMC_BUSY 1293 TMC resource is locked respectively TMC task is busy. The
refraction distortion factor is not set.
Repeat measurement.
GRC_IVRESULT 3 Wrong values entered.
GRC_SETINCOMPLETE 7 Invalid number of parameters.
See Also
TMC_GetRefractiveCorr
Example
see TMC_GetRefractiveCorr
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 instruments interface.
Parameters
Method Out Refraction data:
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 0 Execution successful.
See Also
TMC_SetRefractiveMethod
Example
const unsigned short RefractiveMethod = 1;
GRC_TYPE rc;
unsigned short Method;
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)
}
}
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 In Refraction data:
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 0 Execution successful.
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
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
Station Out Instrument station co-ordinates [m].
Return-Code Names and Return-Code Values
GRC_OK 0 Execution successful.
See Also
TMC_SetStation
Example
GRC_TYPE rc;
TMC_STATION Station, NullStation;
NullStation.dE0 = 0;
NullStation.dN0 = 0;
NullStation.dH0 = 0;
NullStation.dHi = 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)
}
}
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
Station In Instrument station co-ordinates [m].
Return-Code Names and Return-Code Values
GRC_OK 0 Execution successful.
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
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
dPpmA Out Atmospheric ppm correction factor.
Return-Code Names and Return-Code Values
GRC_OK 0 Execution successful.
See Also
TMC_SetAtmPpm
TMC_GetGeoPpm
TMC_SetGeoPpm
TMC_GetPrismCorr
TMC_SetPrismCorr
Example
see TMC_SetPrismCorr
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
dPpmA In Atmospheric ppm correction factor.
Return-Code Names and Return-Code Values
GRC_OK 0 Execution successful.
See Also
TMC_GetAtmPpm
TMC_GetGeoPpm
TMC_SetGeoPpm
TMC_GetPrismCorr
TMC_SetPrismCorr
Example
see TMC_SetPrismCorr
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
unGeomUseAutomatic Out Current state of the Geometric ppm calculation switch
(automatic or manual)
dScaleFactorCentralMeridian Out Scale factor on central meridian
dOffsetCentralMeridian Out Offset from central meridian [m]
dHeightReductionPPM Out ppm value due to height above reference
dIndividualPPM Out Individual ppm value
Return-Code Names and Return-Code Values
GRC_OK 0 Execution successful.
See Also
TMC_GetAtmPpm
TMC_SetAtmPpm
TMC_SetGeoPpm
TMC_GetPrismCorr
TMC_SetPrismCorr
Example
see TMC_SetPrismCorr
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
unGeomUseAutomatic In Current state of the Geometric ppm calculation switch
(automatic or manual)
dScaleFactorCentralMeridian In Scale factor on central meridian
dOffsetCentralMeridian In Offset from central meridian [m]
dHeightReductionPPM In ppm value due to height above reference
dIndividualPPM In Individual ppm value
Return-Code Names and Return-Code Values
GRC_OK 0 Execution successful.
See Also
TMC_GetAtmPpm
TMC_SetAtmPpm
TMC_GetGeoPpm
TMC_GetPrismCorr
TMC_SetPrismCorr
Example
see TMC_SetPrismCorr
12.7.1 TMC_GetFace - getting the face information of the current telescope position
TMC_GetFace .................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... 2026
2026 ................................................................................................................................................................................................................................................................TMC_GetFace
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
Face Out Face position.
Return-Code Names and Return-Code Values
GRC_OK 0 Execution successful.
See Also
AUT_ChangeFace
Example
GRC_TYPE rc;
TMC_FACE Face;
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
Signal Out Signal intensity information.
Return-Code Names and Return-Code Values
GRC_OK 0 Execution successful.
GRC_TMC_SIGNAL_ERROR 1294 Error within signal measurement.
At repeated occur call service.
GRC_ABORT 8 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);
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
SwCorr Out Angular corrections status.
Return-Code Names and Return-Code Values
GRC_OK 0 Execution successful.
See Also
TMC_SetAngSwitch
Example
GRC_TYPE rc;
TMC_ANG_SWITCH SwCorr;
rc = TMC_GetAngSwitch(SwCorr);
if (SwCorr.eTiltAxisCorr == ON)
{
// Tilting axis correction turned On
}
else
{
// Tilting axis correction turned Off
}
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
SwCorr Out Dual axis compensator status.
Return-Code Names and Return-Code Values
GRC_OK 0 Execution successful.
See Also
TMC_SetInclineSwitch
Example
GRC_TYPE rc;
ON_OFF_TYPE SwCorr;
rc = TMC_GetInclineSwitch(SwCorr);
if (SwCorr == ON)
{
rc = TMC_SetInclineSwitch(OFF);
if (rc == GRC_OK)
{
// successfully deactvated
}
else
{
// set not successful (subsystem busy)
}
}
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
SwCorr In Dual axis compensator status.
Return-Code Names and Return-Code Values
GRC_OK 0 Execution successful.
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
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
Mode Out EDM measurement mode.
Return-Code Names and Return-Code Values
GRC_OK 0 Execution successful.
See Also
TMC_SetEdmMode
Example
GRC_TYPE rc;
EDM_MODE 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)
}
}
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
Mode In EDM measurement mode.
Return-Code Names and Return-Code Values
GRC_OK 0 Execution successful.
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
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 In Max. wait time to get a valid distance [ms].
eProg In Inclination sensor measurement mode.
dCoordE Out Easting.
dcoordN Out Northing.
dcoordH Out Orthometric height.
Return-Code Names and Return-Code Values
GRC_OK 0 Execution successful.
GRC_TMC_ACCURACY_GUARANTEE 1284 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.
GRC_TMC_NO_FULL_CORRECTION 1283 The results are not corrected by all active sensors. Co-
ordinates are available.
In order to secure which correction is missing use the both
functions TMC_IfDataAzeCorrError and
TMC_IfDataIncCorrError
GRC_TMC_ANGLE_OK 1285 Angle values okay, but no valid distance. Co-ordinates are
not available.
GRC_TMC_ANGLE_NO_ACC_ 1289 Only the angle measurement is valid but its accuracy cannot
GUARANTY be guaranteed (the tilt measurement is not available).
GRC_TMC_ANGLE_NO_FULL_ 1288 No distance data available but angle data are valid. The return
CORRECTION 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.
GRC_TMC_DIST_ERROR 1292 No measuring, because of missing target point, co-ordinates
are not available.
Aim target point and try it again
GRC_TMC_DIST_PPM 1291 No distance measurement respectively no distance data
because of wrong EDM settings. Co-ordinates are not
available.
GRC_TMC_ANGLE_ERROR 1290 Angle or inclination measurement error. Check inclination
modes in commands.
GRC_TMC_BUSY 1293 TMC resource is locked respectively TMC task is busy.
Repeat measurement.
GRC_ABORT 8 Measurement through customer aborted.
GRC_SHUT_DOWN 12 System power off through customer.
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;
C-Declaration
TMC_IfDataAzeCorrError(BOOLE& bAtrCorrectionError)
VB-Declaration
VB_TMC_IfDataAzeCorrError
(bAtrCorrectionError As Long)
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 corrected with the ATR-
deviation
Return-Code Names and Return-Code Values
GRC_OK 0 Execution successful.
See Also
TMC_IfDataIncCorrError
C-Declaration
TMC_IfDataIncCorrError(BOOLE& bIncCorrectionError)
VB-Declaration
VB_TMC_IfDataIncCorrError
(bIncCorrectionError As Long)
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 corrected with the
incline-correction
Return-Code Names and Return-Code Values
GRC_OK 0 Execution successful.
See Also
TMC_IfDataAzeCorrError
Example
see example TMC_IfDataAzeCorrError
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: The collimation will be considered for the angle
measurement if enabled
tilt axis: The tilt axis will be considered in the angle
measurement if enabled.
Parameters
Switch Angle measurement corrections
Return-Code Names and Return-Code Values
GRC_OK 0 Execution successful.
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
12.8.10 TMC_GetSlopeDistCorr getting the total ppm and prism correction factors
TMC_GetSlopeDistCorr.................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... 2126
2126 ................................................................................................................................................................................................................................................................TMC_GetSlopeDistCorr
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
dPpmCorr Out Total ppm correction factor.
dPrismCorr Out The correction factor of the prism.
Return-Code Names and Return-Code Values
GRC_OK 0 Execution successful.
See Also
TMC_GetPrismCorr,
TMC_SetPrismCorr.
Example
-
13 GEOCOM RELEASES
This chapter shows the changes between the different Releases of GeoCOM
14 APPENDIX
TPS 0 0x0
RetCodeName Value HexVal Description
GRC_OK 0 0x0 Function successfully completed.
GRC_UNDEFINED 1 0x1 Unknown error, result unspecified.
GRC_IVPARAM 2 0x2 Invalid parameter detected. Result unspecified.
GRC_IVRESULT 3 0x3 Invalid result.
GRC_FATAL 4 0x4 Fatal error.
GRC_NOT_IMPL 5 0x5 Not implemented yet.
GRC_TIME_OUT 6 0x6 Function execution timed out. Result
unspecified.
GRC_SET_INCOMPL 7 0x7 Parameter setup for subsystem is incomplete.
GRC_ABORT 8 0x8 Function execution has been aborted.
GRC_NOMEMORY 9 0x9 Fatal error - not enough memory.
GRC_NOTINIT 10 0xA Fatal error - 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.
GRC_HWFAILURE 14 0xE Fatal error - hardware failure.
GRC_ABORT_APPL 15 0xF Execution of application has been aborted
(SHIFT-ESC).
GRC_LOW_POWER 16 0x10 Operation aborted - insufficient power supply
level.
GRC_IVVERSION 17 0x11 Invalid version of file, ...
GRC_BATT_EMPTY 18 0x12 Battery empty
GRC_NO_EVENT 20 0x14 no event pending.
GRC_OUT_OF_TEMP 21 0x15 out of temperature range
GRC_INSTRUMENT_TILT 22 0x16 instrument tilting out of range
GRC_COM_SETTING 23 0x17 communication error
GRC_NO_ACTION 24 0x18 GRC_TYPE Input 'do no action'
GRC_SLEEP_MODE 25 0x19 Instr. run into the sleep mode
GRC_NOTOK 26 0x1A Function not successfully completed.
GRC_NA 27 0x1B Not available
GRC_OVERFLOW 28 0x1C Overflow error
GRC_STOPPED 29 0x1D System or subsystem has been stopped
B HARDWARE INTERFACE
B-1 SERIAL INTERFACE
The default settings for the interface are 115200 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.
It may be helpful for debugging purposes to build up a special cable to monitor the data transfers.
PC- GND GND
TxD RxD TPS
Appl RxD TxD
1N4148
or similar
TxD GND
PC/
Monitor
C PROVIDED SAMPLES
C-1 PROGRAM FRAMES
Finally connect the FlexLine 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.
Note: To operate successfully the gcoms2k120.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
B
BMM_BeepAlarm: 11004.....................................................................................................................................................................46
BMM_BeepNormal: 11003...................................................................................................................................................................47
C
COM_CloseConnection.........................................................................................................................................................................26
COM_End .............................................................................................................................................................................................24
COM_GetBaudRate ..............................................................................................................................................................................27
COM_GetComFormat ...........................................................................................................................................................................31
COM_GetDoublePrecision: 108............................................................................................................................................................21
COM_GetErrorText ..............................................................................................................................................................................35
COM_GetSWVersion: 110....................................................................................................................................................................49
COM_GetTimeOut................................................................................................................................................................................29
COM_GetWinSWVersion.....................................................................................................................................................................36
COM_Init ..............................................................................................................................................................................................23
COM_NullProc: 0 .................................................................................................................................................................................52
COM_OpenConnection .........................................................................................................................................................................25
COM_SetComFormat............................................................................................................................................................................32
COM_SetDoublePrecision: 107 ............................................................................................................................................................22
COM_SetTimeOut ................................................................................................................................................................................30
COM_SwitchOffTPS: 112 ....................................................................................................................................................................51
COM_SwitchOnTPS: 111 .....................................................................................................................................................................50
COM_UseWindow ................................................................................................................................................................................33
COM_ViewError...................................................................................................................................................................................34
CSV_GetDateTime: 5008......................................................................................................................................................................59
CSV_GetDeviceConfig: 5035 .........................................................................................................................................................57, 58
CSV_GetInstrumentName: 5004...........................................................................................................................................................56
CSV_GetInstrumentNo: 5003 ...............................................................................................................................................................55
CSV_GetIntTemp: 5011........................................................................................................................................................................63
CSV_GetSWVersion: 5034...................................................................................................................................................................61
CSV_SetDateTime: 5007 ......................................................................................................................................................................60
E
EDM_GetEglIntensity: 1058 ............................................................................................................................. 39, 40, 41, 42, 43, 44, 66
EDM_Laserpointer: 1004 ......................................................................................................................................................................65
EDM_SetEglIntensity: 1059..................................................................................................................................................................67
S
SUP_GetConfig: 14001.........................................................................................................................................................................69
SUP_SetConfig: 14002 .........................................................................................................................................................................70
T
TMC_DoMeasure: 2008........................................................................................................................................................................86
TMC_GetAngle1: 2003.........................................................................................................................................................................79
TMC_GetAngle5: 2107.........................................................................................................................................................................81
TMC_GetAngSwitch: 2014.................................................................................................................................................................108
TMC_GetAtmCorr: 2029 ......................................................................................................................................................................91
TMC_GetCoordinate: 2082...................................................................................................................................................................75
TMC_GetEdmMode: 2021..................................................................................................................................................................111
TMC_GetFace: 2026 ...........................................................................................................................................................................106
TMC_GetHeight: 2011..........................................................................................................................................................................89
TMC_GetInclineSwitch: 2007.............................................................................................................................................................109
TMC_GetPrismCorr: 2023 ....................................................................................................................................................................95
TMC_GetRefractiveCorr: 2031.............................................................................................................................................................96
TMC_GetRefractiveMethod: 2091........................................................................................................................................................98
TMC_GetSignal: 2022 ........................................................................................................................................................................107
TMC_GetSimpleCoord: 2116 .............................................................................................................................................................113
Leica FlexLine Version 1.20 D-130
GeoCOM Reference Manual List of Remote Procedure Calls (RPC)
TMC_GetSimpleMea: 2108 ..................................................................................................................................................................77
TMC_GetSlopeDistCorr: 2126............................................................................................................................................................118
TMC_GetStation: 2009 .......................................................................................................................................................................100
TMC_IfDataAzeCorrError: 2114 ........................................................................................................................................................115
TMC_IfDataIncCorrError: 2115 .........................................................................................................................................................116
TMC_QuickDist: 2117..........................................................................................................................................................................83
TMC_SetAngSwitch: 2016 .................................................................................................................................................................117
TMC_SetAtmCorr: 2028.......................................................................................................................................................................92
TMC_SetEdmMode: 2020 ..................................................................................................................................................................112
TMC_SetHandDist: 2019 ......................................................................................................................................................................87
TMC_SetHeight: 2012 ..........................................................................................................................................................................90
TMC_SetInclineSwitch: 2006 .............................................................................................................................................................110
TMC_SetOrientation: 2113 ...................................................................................................................................................................93
TMC_SetRefractiveCorr: 2030 .............................................................................................................................................................97
TMC_SetRefractiveMethod: 2090 ........................................................................................................................................................99
TMC_SetStation: 2010........................................................................................................................................................................101