GeoCOM Reference Manual
Motorisation – MOT
Leica TPS1200 – Version 1.50
135
15.4.4
MOT_SetVelocity – driving the instrument with a constant speed
MOT_SetVelocity..............................................................................................................................................................................................................................................................................
ty
................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................ 6004
6004 ................................................................................................................................................................................................................................................................MOT_SetVeloci
C-Declaration
MOT_SetVelocity(MOT_COM_PAIR RefOmega)
VB-Declaration
VB_MOT_SetVelocity(RefOmega As MOT_COM_PAIR)
ASCII-Request
%R1Q,6004:
HZ-Speed[double],V-Speed[double]
ASCII-Response
%R1P,0,0:
RC
Remarks
This command is used to set up the velocity of motorization. This function is valid only if
MOT_StartController(MOT_OCONST)
has been called previously.
RefOmega[0]
denotes the horizontal and
RefOmega[1]
denotes the vertical velocity setting.
Parameters
RefOmega In
The speed in horizontal and vertical direction in rad/s. The
maximum speed is +/- 3.14 rad/s each for TM30 TS30
instruments and 0.79 rad/s each for TPS1200 instruments.
Return-Code Names and Return-Code Values
GRC_OK
0 Execution
successful.
GRC_IVPARAM 2
RefOmega.adValue[HZ]
and/or
RefOmega.adValue[V]
values are not within the boundaries.
GRC_MOT_NOT_CONFIG
1795
System is not in state
MOT_CONFIG
or
MOT_BUSY_OPEN_END
(e.g. missing ‘start controller’).
GRC_MOT_NOT_OCONST
1794
Drive is not in mode
MOT_OCONST
(set by
MOT_StartController
).
GRC_NOT_IMPL
5
No motorization available (no automated instrument).
See Also
MOT_StartController
MOT_StopController
AUS_SetUserLockState
Example
GRC_TYPE
rc;
MOT_COM_PAIR RefOmega;
// set parameter
RefOmega.adValue[0] = 0.05;
RefOmega.adValue[1] = 0.05;
// stop controller and any possible movements
(void) MOT_StopController(MOT_NORMAL);
// wait at least 5 sec.
wait(5);
// start controller; the only valid mode
// for SetVelocity is MOD_OCONST
rc = MOT_StartController(MOT_OCONST);
if (rc == GRC_OK)
{
rc = MOT_SetVelocity(RefOmega);
// insert here a time delay or a wait for user
// action; the movement stops by calling
// MOT_StopController
}
// stop controller and movements abruptly
rc = MOT_StopController(MOT_SHUTDOWN);
// restart controller with default setting
rc = MOT_StartController(MOT_MANUPOS);
if (rc != GRC_OK)