GeoCOM Reference Manual
Fundamentals of Programming GeoCOM
Leica TPS1200 / TS30 / TM30 – Version 1.50
16
Dim s As String
' initialise string
s = Space(255)
Call VB_COM_GetErrorText(GRC_IVPARAM, s)
' trim string, justify string length
s = Trim$(s)
Note:
Incorrectly handled string output parameters may lead to severe runtime problems.
3.5
UNITS OF VALUES
All parameters are based on the SI unit definition, if not explicitly indicated differently. The SI units, and their
derivatives, used are:
Abbreviation
Unit Description
M
( Meters )
for lengths, co-ordinates, ...
Rad
( Radians )
for angles
Sec
( Seconds )
for time
Hpa
( Hekto Pascal )
for pressure
C (Celsius
)
for
temperature
Table 3-2: SI Units
3.6
TPS1200 INSTRUMENT MODES OF OPERATION
In respect to communication, the TPS1200 instrument knows several states in which it reacts differently. The main state
for GeoCOM is online state or mode. There it is possible to use all RPC’s, which are described in this manual.
Especially we will describe the possibilities of changing the state by the built-in RPC’s. For the ASCII protocol refer to
section 3.2.3 - Modes of Operation Concerning Communication.
The possible states can be described as follows:
Off
The instrument is switched off and can be switched on using
COM_OpenConnection
. To switch on the
instrument a single character is sufficient.
GeoCOM
The instrument accepts RPC’s. To switch into GeoCOM mode start the “Configuration” menu on the
instrument, open the submenu “Interfaces” and enable interface “GeoCOM Mode”.
RCS
The instrument accepts Remote Control sequences.
3.7
COMMON COMMUNICATION ERRORS
GeoCOM is based on calling functions remotely. Because of the additional communication layer the set of return codes
increases with return codes based on communication errors. Since all of these codes may be returned by any RPC we
will explain them here and omit them in the descriptions of the RPC’s.
Return-Code Value
Description
GRC_OK
0
Successful termination, implies also no communication error.
GRC_COM_CANT_ENCODE
3073
Can't encode arguments in client. Returned by the client to the
calling application directly, i.e. without anything being sent to
the transport layer and beyond.
GRC_COM_CANT_DECODE
3074
Can't decode results in client. Once an RPC has been sent to
the server and a reply has been sent back, this return code
states that the encoded reply could not be decoded in the
client. This is usually the result of using different versions of
GeoCOM on client and server.
GRC_COM_CANT_SEND
3075
Failure in sending calls. If the resources at the transmitting
port have been allocated previously, i.e. GeoCOM does not
have exclusive rights to the port, or if the exception or similar
routine has experienced a failure, this error code is returned.