Leica TPS1200 Series Reference Manual page 26

Geodetic measurement instruments
Hide thumbs Also See for TPS1200 Series:
Table of Contents

Advertisement

GeoCOM Reference Manual
5.4.3 COM_OpenConnection - opening a port for communication
COM_OpenConnection..............................................................................................................................................................................................................................................................
........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ -
C-Declaration
COM_OpenConnection( COM_PORT
VB-Declaration
VB_COM_OpenConnection( ByVal Port
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.
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
GeoCOM chooses during start-up the default transmission data-format, which is ASCII. If TPS supports binary
data format it is switched automatically to
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
eBaud
nRetries
Return-Code Names and Return-Code Values
GRC_OK
GRC_COM_PORT_NOT_AVAILABLE
GRC_COM_NO_PARTNER
GRC_IVPARAM
See Also
COM_CloseConnection
COM_NullProc
COM_SetComFormat
Example
see
COM_Init
Leica TPS1200 / TS30 / TM30 – Version 1.50
ePort,
COM_BAUD_RATE
&eRate,
Short
nRetries )
As Integer,
ByVal Baud
As Integer,
ByVal Retries
As Integer )
BINARY
In
Serial port.
InOut
Baud rate.
In
Number of retries.
0
Execution successful.
3103
Port is in use or does not exist
3105
GeoCOM failed to detect a TPS.
2
Illegal parameter.
using RPC COM_SetComFormat.
Communication Settings
denotes the number of
nRetries
to be 1-4.
nRetries
26

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Tm30Ts30Tps1200+

Table of Contents