Z

_SetupFastAutoFocus, _Stg_SetupMouseJoystickZ, _StgCalibrateZ, _StgConfigZ, _StgInitiateZ, _StgSetupFocus, _StgSetupFocusPlane, RunAutoFocusLong, RunAutoFocusShort, RunFastAutoFocus, Stg_EnableMouseJoystickZ, Stg_IsMouseJoystickZ, Stg_ToggleMouseJoystickZ, StgEnableJoystickZ, StgFocus, StgFocusAdaptive, StgFocusAdaptiveTwoPasses, StgFocusCriteria, StgFocusInRange, StgFocusInRangeEx, StgFocusInRangeExTwoPasses, StgFocusInRangeTwoPasses, StgFocusPlane, StgFocusSetCriterion, StgFocusSetCriterionDialog, StgGetAbsPosZ, StgGetFocusPlaneType, StgGetPosZ, StgInitiateZ, StgIsFocusPlaneValid, StgMoveMainZ, StgMovePiezoZ, StgMovePiezoZToHomeKeepZ, StgMovePiezoZToHomePosition, StgMoveZ, StgMoveZNamed, StgSetFocusPlane, StgSetupFocus, StgSetupFocusAdaptiveTwoPasses, StgSetupFocusContinuousTwoPasses, StgSetupFocusEx, StgSetupFocusOffset, StgSetupFocusTwoPasses, StgToggleJoystickZ, StgZ_AutoFocus, StgZ_Escape, StgZ_GetActiveZ, StgZ_GetEscape, StgZ_GetJoystickSpeed, StgZ_GetJoystickSpeedSteps, StgZ_GetJoystickZStep, StgZ_GetLimits, StgZ_GetLimitsMultiple, StgZ_GetMotorSpeed, StgZ_GetMotorSpeedSteps, StgZ_GetPiezoDevice, StgZ_GetSpeedRamp, StgZ_GetSpeedRampSteps, StgZ_GetStepJoystickSpeed, StgZ_GetStepMotorSpeed, StgZ_IsJoystickSpeedControllable, StgZ_IsMotorSpeedControllable, StgZ_IsPresent, StgZ_IsSpeedRampControllable, StgZ_IsVirtualJoystickSupported, StgZ_MoveVirtualJoystickAtSpeed, StgZ_Refocus, StgZ_SetActiveZ, StgZ_SetJoystickSpeed, StgZ_SetJoystickZStep, StgZ_SetKeepPosition, StgZ_SetLimits, StgZ_SetMotorSpeed, StgZ_SetSpeedRamp

RunAutoFocusLong

Description 

 RunAutoFocusLong();

Starts Auto Focus on the current channel with a relatively long range (depending on the lens, up to a range of mm). It is used for initial rough sample finding and is especially useful for systems where some default Z-positions are stored for the lenses.

RunAutoFocusShort

Description 

 RunAutoFocusShort();

Starts Auto Focus on the current channel with a tiny range (maximum of hundreds of micrometers) around the current Z position. It is mainly used when switching between channels where the focus between them changes a bit or when the Z dimension drifts and you need to fine-tune it.

RunFastAutoFocus

This function runs the Devices > Fast Auto Focus command.

Description 

 RunFastAutoFocus();

Runs the Fast Auto Focus function.

StgEnableJoystickZ

Description 

 StgEnableJoystickZ(
   int  EnableJoystickZ
);

Sets the Z device joystick status (enable/disable).

Parameters

int EnableJoystickZ

Joystick status (enable/disable).

TRUE

Enable joystick.

FALSE

Disable joystick.

Return Values

DR_OK (1)

Joystick status was set

DR_NOTAVAILABLE (-4)

Z device is not connected

DR_NOTAUTOMATIC (-5)

Z device is not in automatic mode

DR_NOTSUPPORTED (-3)

Joystick status is not changeable

DR_UNKNOWNERROR (-1)

Set joystick status failed

See Also 
StgZ_IsJoystickSpeedControllable

StgFocus

This function runs the Devices > Auto Focus command.

Description 

 StgFocus();

This function runs the auto focus function.

See Also 
_StgSetupFocus

StgFocusAdaptive

Description 

 StgFocusAdaptive(
   double  Step
);

This function finds the focus using adaptive method with specified step.

Parameters

double Step

Defines Z-drive step for focusing in micrometers.

Return Values

1

The focus was successful

0

The focus failed

-1

Step is less than zero

StgFocusAdaptiveTwoPasses

Description 

 StgFocusAdaptiveTwoPasses(
   double  Step,
   double  Finestep
);

This function performs two-pass focus using adaptive method with specified step.

Parameters

double Step

Defines Z-drive step for focusing in micrometers.

double Finestep

Fine step in µm (second pass).

StgFocusCriteria

Description 

 StgFocusCriteria();

This function starts auto focus and saves measured focus criteria to file.

Note

Measured focus criteria are saved to file FocusCriteria.txt in format: Z coordinate, Focus criterion. Previous contents of this file are overwritten.

See Also 
StgFocus

StgFocusInRange

Description 

 StgFocusInRange(
   double  Range,
   double  Step
);

This function goes up Focus_Range/2 micrometers and the starts to find the focus plane. The differences between two consecutive planes are Step micrometers.

Parameters

double Range

Range for focusing in micrometers.

double Step

Defines Z-drive step for focusing in micrometers.

Return Values

-3

If number of focus planes are less than 3

-2

Focus_Range is less than zero

-1

Step is less than zero

0

The focus failed

1

The focus was successful

StgFocusInRangeEx

Description 

 StgFocusInRangeEx(
   double  Focus_Range,
   double  Speed
);

This function goes Focus_Range/2 microns up from the current z-position to the start position. Then it goes Focus_Range microns down and while moving down grabs images and calculates focus criteria function at different time. After reaching the end position focus criteria is evaluated and function moves to the z-position that corresponds to the focused plane.

Parameters

double Focus_Range

Defines a range for focusing.

double Speed

Focusing speed in an arbitrary units (min=0, max=90).

Return Values

1

The focus was successful

0

The focus failed

-2

Focus_Range is less than zero

-3

The focus failed (e.g. total white or black scene)

StgFocusInRangeExTwoPasses

Description 

 StgFocusInRangeExTwoPasses(
   double  FocusRange,
   int  Speed
);

Performs two-pass Continuous In Range autofocus with specified parameters.

Parameters

double FocusRange

Range in µm.

int Speed

0

Half of the optimal speed.

1

Optimal speed (with this speed it is ensured that the step size which is recommended for the current objective will be complied with).

2

Twice the optimal speed.

StgFocusInRangeTwoPasses

Description 

int StgFocusInRangeTwoPasses(
   double  FocusRange,
   double  CoarseStep,
   double  Finestep
);

Performs two-pass Steps In Range autofocus with specified parameters.

Parameters

double FocusRange

Range in µm.

double CoarseStep

Coarse step in µm (first pass).

double Finestep

Fine step in µm (second pass).

Return Values

int

1

The focus was successful

0

The focus failed

-1

CoarseStep or FineStep is less than zero

-2

FocusRange is less than zero

-3

The focus failed (e.g. total white or black scene)

StgFocusPlane

This function runs the Devices > Focus using Surface command.

Description 

 StgFocusPlane();

This function finds the focus using the planar interpolation method and moves the stage to the focus surface. At least three focus surface points have to be defined.

See Also 
View > Acquisition Controls > XYZ Overview

StgFocusSetCriterion

Description 

 StgFocusSetCriterion(
   int  FocusCriterion
);

Sets the criterion for focus calculation.

Parameters

int FocusCriterion

Use focus criterion

0

bright field - standard contrast based criterion

1

intensity - criterion independent on pixel intensity

2

fluorescence - suitable for fluorescence microscopy

3

noise-resistant - estimates the noise level in the image and ignores it

4

confocal - criterion is based only on the intensity values, can be useful in confocal microscopy

StgFocusSetCriterionDialog

Description 

 StgFocusSetCriterionDialog(
   int  FocusCriterionDialog
);

Defines which focus criterion is used for live focus indication.

Parameters

int FocusCriterionDialog

Focus criterion type.

0

Brightfield

1

Fluorescence

2

Confocal

3

Yeast, Bacteria (Ph)

StgGetAbsPosZ

Description 

 StgGetAbsPosZ(
   double *LpStgZ
);

Returns the absolute Z position.

Parameters

double *LpStgZ

z coordinate [µm] to be filled

StgGetFocusPlaneType

Description 

 StgGetFocusPlaneType();

Returns the active interpolation method from the Focus Surface and PFS Surface tab in the XYZ Overview panel. Smooth = 0, Nearest Neighbor = 1).

StgGetPosZ

Description 

 StgGetPosZ(
   double *LpStgZ,
   int  ZDevice
);

Retrieves the current position [microns] of the selected Z device.

Parameters

double *LpStgZ

z coordinate [µm] to be filled

int ZDevice

Insert index number of the Z device you want get the position of.

0

The primary Z device.

1

The secondary Z device.

Return Values

DR_OK (1)

Retrieved coordinate is valid

DR_NOTAVAILABLE (-4)

Z device is not connected

DR_NOTCALIBRATED (-6)

Z device is not calibrated

DR_NOTINITIALIZED (-7)

Z device is not initialized

DR_UNKNOWNERROR (-1)

Retrieving current position failed

StgInitiateZ

Description 

 StgInitiateZ(
   int  InitMethodZ,
   double  MinimalZ,
   double  InitialZ,
   double  MaximalZ,
   int  ReturnBack
);

This function initiates the Z drive.

Parameters

int InitMethodZ

Method of initialization.

0

Maximal Travel Range

1

Zero Position & Range

2

Current Position & Range

double MinimalZ

Z drive working minimal Z position in microns.

double InitialZ

Z drive working initial Z position in microns.

double MaximalZ

Z drive working maximal Z position in microns.

int ReturnBack

After the initialization is done, move the stage back to starting position?

0

stay at the last position

1

move to starting position

StgIsFocusPlaneValid

Description 

 StgIsFocusPlaneValid();

This function returns a value showing if the focus plane is valid.

StgMoveMainZ

Description 

 StgMoveMainZ(
   double  StgZ,
   int  relative
);

Moves the primary (main) Z drive to the specified position (absolute movement) or by the specified distance (relative movement).

Parameters

double StgZ

Position/distance in micrometers.

int relative

Movement type (absolute/relative).

0, MOVE_ABSOLUTE

Absolute movement

1, MOVE_RELATIVE

Relative movement

StgMovePiezoZ

Description 

 StgMovePiezoZ(
   double  StgZ,
   int  relative
);

Moves the secondary (Piezo) Z drive to the specified position (absolute movement) or by the specified distance (relative movement).

Parameters

double StgZ

Position/distance in micrometers.

int relative

Movement type (absolute/relative).

0, MOVE_ABSOLUTE

Absolute movement

1, MOVE_RELATIVE

Relative movement

StgMovePiezoZToHomeKeepZ

This function runs the Devices > Keeps Z position and centers Piezo Z command.

Description 

 StgMovePiezoZToHomeKeepZ();

Moves the piezo-Z device to its defined home position and compensate the shift by moving the second Z drive in opposite direction. The absolute Z position will remain unchanged.

StgMovePiezoZToHomePosition

This function runs the Devices > Move Piezo Z to Home Position command.

Description 

 StgMovePiezoZToHomePosition();

Moves piezo-Z logical device to its defined home position (such as the center of its physical range).

StgMoveZ

Description 

 StgMoveZ(
   double  z,
   int  relative
);

Moves Z device to the specified position [microns].

Parameters

double z

z destination coordinate [µm]

int relative

Movement type (absolute/relative).

0, MOVE_ABSOLUTE

Absolute movement

1, MOVE_RELATIVE

Relative movement

Return Values

DR_OK (1)

Z device moved to specified position

DR_NOTAVAILABLE (-4)

Z device is not connected

DR_NOTCALIBRATED (-6)

Z device is not calibrated

DR_NOTINITIALIZED (-7)

Z device is not initialized

DR_NOTAUTOMATIC (-5)

Z device is not in automatic mode

DR_UNKNOWNERROR (-1)

Z device move failed

See Also 
StgZ_IsMotorSpeedControllable, StgZ_IsSpeedRampControllable

StgMoveZNamed

This function runs the Move Z to this Position command.

Description 

 StgMoveZNamed(
   double  StgZ,
   int  relative,
   char  ZName,
   char  ZNameSeparator
);

Moves the specified stage(s) to a Z specified position.

Parameters

double StgZ

Position/distance in micrometers.

int relative

Movement type (absolute/relative).

0, MOVE_ABSOLUTE

Absolute movement

1, MOVE_RELATIVE

Relative movement

char ZName

Name of the Z device.

char ZNameSeparator

Character separating names of multiple Z devices.

StgSetFocusPlane

Description 

 StgSetFocusPlane(
   double *StgArrayX,
   double *StgArrayY,
   double *StgArrayZ,
   int  StgArrayCount
);

Defines focus plane as set of points.

Parameters

double *StgArrayX

Pointer to array containing X-coordinates of points.

double *StgArrayY

Pointer to array containing Y-coordinates of points.

double *StgArrayZ

Pointer to array containing Z-coordinates of points.

int StgArrayCount

Count of points in the plane (elements in arrays).

StgSetupFocus

Interactive command to this function: Devices > Auto Focus Setup

Description 

 StgSetupFocus(
   int  Method,
   int  Step,
   int  Stop
);

This function sets up the focus method and step for auto focus.

Method parameter defines the type of scanning topology (0 = Adaptive in Steps, 1 = Continuous in range, 2 = Step by step in range, 3 = Interpolation).

Parameters

int Method

Selects a method.

int Step

Step of movement in z axis direction.

int Stop

If auto focus fails to find the focus plane, it can activate the manual focus if this parameter is 1.

See Also 
_StgSetupFocus

StgSetupFocusAdaptiveTwoPasses

Description 

 StgSetupFocusAdaptiveTwoPasses(
   double  Step,
   double  Finestep
);

This function sets parameters for two-pass focus using adaptive method.

Parameters

double Step

Defines Z-drive step for focusing in micrometers.

double Finestep

Fine step in µm (second pass).

StgSetupFocusContinuousTwoPasses

Description 

 StgSetupFocusContinuousTwoPasses();

Turns the Two Passes option within the Auto Focus Setup dialog window ON. See Devices > Auto Focus Setup.

StgSetupFocusEx

Description 

 StgSetupFocusEx(
   double  Focus_Range,
   int  Speed
);

This function is declared only for compatibility reasons. Use StgFocusInRangeEx(Focus_Range, Speed) for auto-focus.

Parameters

double Focus_Range

Defines a range for focusing.

int Speed

0

Half of the optimal speed.

1

Optimal speed (with this speed it is ensured that the step size which is recommended for the current objective will be complied with).

2

Twice the optimal speed.

StgSetupFocusOffset

Description 

 StgSetupFocusOffset(
   double  FocusOffset
);

Sets the Offset Z after AF value within the Devices > Auto Focus Setup dialog window.

Parameters

double FocusOffset

Z-offset compensation in micrometers.

StgSetupFocusTwoPasses

Description 

 StgSetupFocusTwoPasses(
   double  FocusRange,
   double  CoarseStep,
   double  Finestep
);

Sets parameters for two-pass autofocus.

Parameters

double FocusRange

Range in µm.

double CoarseStep

Coarse step in µm (first pass).

double Finestep

Fine step in µm (second pass).

Return Values

int - TRUE if successful otherwise FALSE.

StgToggleJoystickZ

Description 

 StgToggleJoystickZ();

Switches the Z device joystick status (enable->disable or disable->enable).

Return Values

DR_OK (1)

Joystick status was switched

DR_NOTAVAILABLE (-4)

Z device is not connected

DR_NOTAUTOMATIC (-5)

Z device is not in automatic mode

DR_NOTSUPPORTED (-3)

Joystick status is not changeable

DR_UNKNOWNERROR (-1)

Switch joystick status failed

See Also 
StgEnableJoystickZ

StgZ_AutoFocus

Description 

 StgZ_AutoFocus(
   int  CoarseAF
);

This function automatically focuses on the specimen inserted into the Coolscope.

Parameters

int CoarseAF

Coarse auto focus.

0

Performs fine focusing.

1

Performs coarse focusing.

StgZ_Escape

Description 

 StgZ_Escape();

This function moves the Z drive (objective/nosepiece) out of the way of an XY stage.

StgZ_GetActiveZ

Description 

int StgZ_GetActiveZ();

This function returns the index of the Z device which is currently selected as Devices > Mouse Joystick and Auto Focus Z.

Return Values

int

Index of the selected Z device

0

The primary Z is selected.

1

The secondary Z is selected.

Note

Two Z devices shall be connected, otherwise this function looses its purpose.

StgZ_GetEscape

Description 

 StgZ_GetEscape();

This function moves parts of the microscope to safe distance which enables maintenance of the device.

StgZ_GetJoystickSpeed

Description 

 StgZ_GetJoystickSpeed();

Returns current Z device joystick speed [microns/s]. This command should only be called if StgZ_IsJoystickSpeedControllable returns TRUE.

Return Values

Value > 0.0

Current joystick speed [microns/s]

DR_NOTAVAILABLE (-4)

Z device is not connected

DR_NOTSUPPORTED (-3)

Joystick speed is not controllable

DR_UNKNOWNERROR (-1)

Retrieving the current joystick speed failed

See Also 
StgZ_IsJoystickSpeedControllable, StgZ_GetJoystickSpeedSteps, StgZ_GetStepJoystickSpeed, StgZ_SetJoystickSpeed

StgZ_GetJoystickSpeedSteps

Description 

 StgZ_GetJoystickSpeedSteps();

Returns the number of available Z device joystick speed steps. This command should only be called if StgZ_IsJoystickSpeedControllable returns TRUE.

Return Values

Value > 0

The number of joystick speed steps

DR_NOTAVAILABLE (-4)

Z device is not connected

DR_NOTSUPPORTED (-3)

Joystick speed is not controllable

DR_UNKNOWNERROR (-1)

Retrieving the number of joystick speed steps failed

See Also 
StgZ_IsJoystickSpeedControllable, StgZ_GetStepJoystickSpeed, StgZ_SetJoystickSpeed, StgZ_GetJoystickSpeed

StgZ_GetJoystickZStep

Description 

 StgZ_GetJoystickZStep();

This function retrieves the current value of the Mouse Joystick setup.

See Also 
StgZ_SetJoystickZStep

StgZ_GetLimits

Description 

 StgZ_GetLimits(
   double *LpMinZ,
   double *LpMaxZ
);

This function returns limits of the Z device selected in Devices > Mouse Joystick and Auto Focus Z.

Parameters

double *LpMinZ

Minimum Z (micrometers)

double *LpMaxZ

Maximum Z (micrometers).

StgZ_GetLimitsMultiple

Description 

 StgZ_GetLimitsMultiple(
   double *LpMinZ,
   double *LpMaxZ
);

This function returns the full range of all connected Z devices.

Parameters

double *LpMinZ

Minimum Z (micrometers)

double *LpMaxZ

Maximum Z (micrometers).

StgZ_GetMotorSpeed

Description 

 StgZ_GetMotorSpeed();

Returns current Z device motor speed [microns/s]. This command should only be called if StgZ_IsMotorSpeedControllable returns TRUE.

Return Values

Value > 0.0

Current motor speed [microns/s]

DR_NOTAVAILABLE (-4)

Z device is not connected

DR_NOTSUPPORTED (-3)

Motor speed is not controllable

DR_UNKNOWNERROR (-1)

Retrieving the current motor speed failed

See Also 
StgZ_IsMotorSpeedControllable, StgZ_GetMotorSpeedSteps, StgZ_GetStepMotorSpeed, StgZ_SetMotorSpeed

StgZ_GetMotorSpeedSteps

Description 

 StgZ_GetMotorSpeedSteps();

Returns the number of available Z device motor speed steps. This command should only be called if StgZ_IsMotorSpeedControllable returns TRUE.

Return Values

Value > 0

The number of motor speed steps

DR_NOTAVAILABLE (-4)

Z device is not connected

DR_NOTSUPPORTED (-3)

Motor speed is not controllable

DR_UNKNOWNERROR (-1)

Retrieving the number of motor speed steps failed

See Also 
StgZ_IsMotorSpeedControllable, StgZ_GetStepMotorSpeed, StgZ_SetMotorSpeed, StgZ_GetMotorSpeed

StgZ_GetPiezoDevice

Description 

int StgZ_GetPiezoDevice();

If two Z devices are connected, this function returns index number of the connected Piezo Z stage.

Return Values

int

-1

No Piezo Z drive is connected.

0

0 is assigned to Piezo Z, 1 is assigned to the other Z device.

1

1 is assigned to Piezo Z, 0 is assigned to the other Z device.

StgZ_GetSpeedRamp

Description 

 StgZ_GetSpeedRamp();

Returns current Z device speed ramp [step]. This command should only be called if StgZ_IsSpeedRampControllable returns TRUE.

Return Values

Value >= 0

Current speed ramp [step]

DR_NOTAVAILABLE (-4)

Z device is not connected

DR_NOTSUPPORTED (-3)

Speed ramp is not controllable

DR_UNKNOWNERROR (-1)

Retrieving the current speed ramp failed

See Also 
StgZ_IsSpeedRampControllable, StgZ_GetSpeedRampSteps, StgZ_SetSpeedRamp

StgZ_GetSpeedRampSteps

Description 

 StgZ_GetSpeedRampSteps();

Returns the number of available Z device speed ramp steps. This command should only be called if StgZ_IsSpeedRampControllable returns TRUE.

Return Values

Value > 0

The number of speed ramp steps

DR_NOTAVAILABLE (-4)

Z device is not connected

DR_NOTSUPPORTED (-3)

Speed ramp is not controllable

DR_UNKNOWNERROR (-1)

Retrieving the number of speed ramp steps failed

See Also 
StgZ_IsSpeedRampControllable, StgZ_SetSpeedRamp, StgZ_GetSpeedRamp

StgZ_GetStepJoystickSpeed

Description 

 StgZ_GetStepJoystickSpeed(
   int  step
);

Returns Z device joystick speed [microns/s] for a given step. This command should only be called if StgZ_IsJoystickSpeedControllable returns TRUE.

Parameters

int step

The joystick speed step is number between 0 and steps-1, where steps is the number of joystick speed steps returned by

Return Values

Value > 0.0

The joystick speed [microns/s] for a given step

DR_NOTAVAILABLE (-4)

Z device is not connected

DR_NOTSUPPORTED (-3)

Joystick speed is not controllable

DR_UNKNOWNERROR (-1)

Retrieving the step joystick speed failed

See Also 
StgZ_IsJoystickSpeedControllable, StgZ_GetJoystickSpeedSteps, StgZ_SetJoystickSpeed, StgZ_GetJoystickSpeed

StgZ_GetStepMotorSpeed

Description 

 StgZ_GetStepMotorSpeed(
   int  step
);

Returns Z device motor speed [microns/s] for a given step. This command should only be called if StgZ_IsMotorSpeedControllable returns TRUE.

Parameters

int step

The motor speed step is number between 0 and steps-1, where steps is the number of motor speed steps returned by

Return Values

Value > 0.0

The motor speed [microns/s] for a given step

DR_NOTAVAILABLE (-4)

Z device is not connected

DR_NOTSUPPORTED (-3)

Joystick speed is not controllable

DR_UNKNOWNERROR (-1)

Retrieving the step motor speed failed

See Also 
StgZ_IsMotorSpeedControllable, StgZ_GetMotorSpeedSteps, StgZ_SetMotorSpeed, StgZ_GetMotorSpeed

StgZ_IsJoystickSpeedControllable

Description 

 StgZ_IsJoystickSpeedControllable();

Detects if the joystick speed of the Z device can be controlled.

Return Values

TRUE (1)

Joystick speed is controllable

FALSE (0)

Joystick speed is not controllable

DR_NOTAVAILABLE (-4)

Z device is not connected

See Also 
StgZ_GetJoystickSpeedSteps, StgZ_GetStepJoystickSpeed, StgZ_SetJoystickSpeed, StgZ_GetJoystickSpeed

StgZ_IsMotorSpeedControllable

Description 

 StgZ_IsMotorSpeedControllable();

Detects if the motor speed of the Z device can be controlled.

Return Values

TRUE (1)

Motor speed is controllable

FALSE (0)

Motor speed is not controllable

DR_NOTAVAILABLE (-4)

Z device is not connected

See Also 
StgZ_GetMotorSpeedSteps, StgZ_GetStepMotorSpeed, StgZ_SetMotorSpeed, StgZ_GetMotorSpeed

StgZ_IsPresent

Description 

 StgZ_IsPresent(
   lx_int32  iNumber
);

Checks if a logical device of a Z type exists and is currently connected.

Parameters

lx_int32 iNumber

zero-based index of disserted Z-Drive

Return Values

TRUE (1) if present, FALSE (0) if not.

StgZ_IsSpeedRampControllable

Description 

 StgZ_IsSpeedRampControllable();

Detects if the speed ramp of Z device can be controlled.

Return Values

TRUE (1)

Speed ramp is controllable

FALSE (0)

Speed ramp is not controllable

DR_NOTAVAILABLE (-4)

Z device is not connected

See Also 
StgZ_GetSpeedRampSteps, StgZ_SetSpeedRamp, StgZ_GetSpeedRamp

StgZ_IsVirtualJoystickSupported

Description 

 StgZ_IsVirtualJoystickSupported();

This function tests whether the virtual joystick functionality is supported by the current Z drive.

StgZ_MoveVirtualJoystickAtSpeed

Description 

 StgZ_MoveVirtualJoystickAtSpeed(
   double  MotorSpeedZ
);

This function moves the active Z drive according to the defined vector.

Parameters

double MotorSpeedZ

Speed in the Z axis direction [micron/s]

Note

Using this function carelessly might cause some hardware damage. The function moves the Z drive continuously. The direction and the speed can be changed by calling it again with a different parameter. The movement can be stopped by giving the function a zero parameter - StgZ_MoveVirtualJoystickAtSpeed(0.000);.

StgZ_Refocus

Description 

 StgZ_Refocus();

This function moves parts of the microscope back from the safe distance which enables maintenance of the device.

StgZ_SetActiveZ

This function runs the Devices > Mouse Joystick and Auto Focus Z command.

Description 

 StgZ_SetActiveZ(
   int  ActiveZ
);

This function sets the active Z-Drive. There can be two Z-Drive connected, but only one can be active at a time.

Parameters

int ActiveZ

zero-based index to set the active Z-Drive

TRUE

New active Z-Drive set

FALSE

New active Z-Drive was not set

StgZ_SetJoystickSpeed

Description 

 StgZ_SetJoystickSpeed(
   double  speed
);

Sets the Z device joystick speed [microns/s]. If the speed is not valid, the closest valid speed will be chosen. This command should only be called if StgZ_IsJoystickSpeedControllable returns TRUE.

Parameters

double speed

The joystick speed [microns/s] should be number returned by

Return Values

DR_OK (1)

Joystick speed was successfully set

DR_NOTAVAILABLE (-4)

Z device is not connected

DR_NOTSUPPORTED (-3)

Joystick speed is not controllable

DR_UNKNOWNERROR (-1)

Setting the joystick speed failed

See Also 
StgZ_IsJoystickSpeedControllable, StgZ_GetJoystickSpeedSteps, StgZ_GetStepJoystickSpeed, StgZ_GetJoystickSpeed

StgZ_SetJoystickZStep

Description 

 StgZ_SetJoystickZStep(
   double  JoystickZStep
);

This function adjusts the step size for the cases when mouse wheel is used for focusing (Mouse Joystick Setup).

Parameters

double JoystickZStep

Mouse joystick step value in micrometers.

StgZ_SetKeepPosition

Description 

 StgZ_SetKeepPosition(
   int  KeepZPosition
);

This function places the table to the set position. It works only with Ti microscope.

Parameters

int KeepZPosition

Do you want to set position?

0

Off

1

On

StgZ_SetLimits

Description 

 StgZ_SetLimits(
   double  MinZ,
   double  MaxZ
);

This function retrieves the limits of the Z position.

Parameters

double MinZ

Minimum Z (micrometers)

double MaxZ

Maximum Z (micrometers)

StgZ_SetMotorSpeed

Description 

 StgZ_SetMotorSpeed(
   double  speed
);

Sets the Z device motor speed [microns/s]. If the speed is not valid, the closest valid speed will be chosen. This command should only be called if StgZ_IsMotorSpeedControllable returns TRUE.

Parameters

double speed

The motor speed [microns/s] should be number returned by

Return Values

DR_OK (1)

Motor speed was successfully set

DR_NOTAVAILABLE (-4)

Z device is not connected

DR_NOTSUPPORTED (-3)

Motor speed is not controllable

DR_UNKNOWNERROR (-1)

Setting the motor speed failed

See Also 
StgZ_IsMotorSpeedControllable, StgZ_GetMotorSpeedSteps, StgZ_GetStepMotorSpeed, StgZ_GetMotorSpeed

StgZ_SetSpeedRamp

Description 

 StgZ_SetSpeedRamp(
   int  step
);

Sets the Z device speed ramp [step]. This command should only be called if StgZ_IsSpeedRampControllable returns TRUE.

Parameters

int step

The speed ramp [step] is number between 0 and steps-1, where steps is the number of speed ramp steps returned by

Return Values

DR_OK (1)

Speed ramp was successfully set

DR_NOTAVAILABLE (-4)

Z device is not connected

DR_NOTSUPPORTED (-3)

Speed ramp is not controllable

DR_UNKNOWNERROR (-1)

Setting the speed ramp failed

See Also 
StgZ_IsSpeedRampControllable, StgZ_GetSpeedRampSteps, StgZ_GetSpeedRamp

Stg_EnableMouseJoystickZ

Description 

 Stg_EnableMouseJoystickZ(
   int  EnableMouseJoyZ
);

Sets the mouse joystick status (enable/disable).

Parameters

int EnableMouseJoyZ

Mouse joystick status.

TRUE

Enable mouse joystick.

FALSE

Disable mouse joystick.

Return Values

DR_OK (1)

Mouse joystick status was set

DR_NOTAVAILABLE (-4)

Device Z is not present

DR_NOTSUPPORTED (-3)

Mouse wheel is not present

DR_NOTINITIALIZED (-7)

Device Z is not initialized

DR_UNKNOWNERROR (-1)

Enable mouse joystick status status failed

See Also 
Stg_IsMouseJoystickZ, Stg_ToggleMouseJoystickZ

Stg_IsMouseJoystickZ

Description 

 Stg_IsMouseJoystickZ();

Detects if the mouse joystick is enabled. When is mouse joystick enabled, you can change Z position using mouse wheel.

Return Values

TRUE (1)

Mouse joystick is enabled

FALSE (0)

Mouse joystick is disabled

DR_NOTAVAILABLE (-4)

Device Z is not present

DR_NOTSUPPORTED (-3)

Mouse wheel is not present

DR_NOTINITIALIZED (-7)

Device Z is not initialized

DR_UNKNOWNERROR (-1)

Detecting mouse joystick status failed

See Also 
Stg_EnableMouseJoystickZ, Stg_ToggleMouseJoystickZ, _Stg_SetupMouseJoystickZ

Stg_ToggleMouseJoystickZ

This function runs the Devices > Enable Mouse Joystick Z in Live command.

Description 

 Stg_ToggleMouseJoystickZ();

Switches the mouse joystick status (enable->disable or disable->enable).

Return Values

DR_OK (1)

Mouse joystick status was switched

DR_NOTAVAILABLE (-4)

Device Z is not present

DR_NOTSUPPORTED (-3)

Mouse wheel is not present

DR_NOTINITIALIZED (-7)

Device Z is not initialized

DR_UNKNOWNERROR (-1)

Switch mouse joystick status status failed

See Also 
Stg_IsMouseJoystickZ, Stg_EnableMouseJoystickZ

_SetupFastAutoFocus

This function runs the Devices > Fast Auto Focus Setup command.

Description 

 _SetupFastAutoFocus();

Opens the Fast Auto Focus Setup dialog window.

See Also 
RunFastAutoFocus

_StgCalibrateZ

This function runs the Devices > Calibrate Z command.

Description 

 _StgCalibrateZ();

Displays a dialog box allowing the user to calibrate Z device.

Return Values

DR_OK (1)

Dialog was shown and Z device was calibrated

DR_CANCELED (0)

Z device calibration was canceled

DR_NOTAVAILABLE (-4)

Z device is not present

DR_UNKNOWNERROR (-1)

Z device calibration failed

_StgConfigZ

Description 

 _StgConfigZ();

Displays a dialog box allowing the user to configure Z device parameters.

Return Values

DR_OK (1)

Dialog was shown and Z device was configured

DR_NOTAVAILABLE (-4)

Z device is not present

DR_NOTSUPPORTED (-3)

Z device is not configurable

DR_UNKNOWNERROR (-1)

Z device configuration failed

_StgInitiateZ

Description 

 _StgInitiateZ();

This function initiates the Z drive. A confirmation to move the stage to its physical limits appears.

_StgSetupFocus

This function runs the Devices > Auto Focus Setup command.

Description 

 _StgSetupFocus();

The function displays Setup Auto Focus dialog box.

See Also 
StgSetupFocus

_StgSetupFocusPlane

This function runs the Devices > Focus Surface Setup command.

Description 

 _StgSetupFocusPlane();

This function displays the Auto Focus Setup window.

_Stg_SetupMouseJoystickZ

This function runs the Devices > Mouse Joystick Setup command.

Description 

 _Stg_SetupMouseJoystickZ();

Displays a dialog box allowing the user to set mouse joystick speed.

Return Values

1, DR_OK

Mouse joystick setup was confirmed

0, DR_CANCELED

Mouse joystick setup was canceled

-1, DR_UNKNOWNERROR

Mouse joystick setup failed

See Also 
Stg_IsMouseJoystickZ