Index

Double focus_position()

Return the most recently reached focus position.

Arguments:
(none)

Example:
The following example tells the control system to set the focus position to 10mm, with a 0.5 mm precision. It then waits for the control system to indicate when the focusing operation completes. It then requests and prints out the focus position that was actually acquired.
 set_focus 10, 0.5
 until $acquired(focus)
 print "Ending focus position = ", $focus_position(), "mm"

Context:
At startup, and whenever a set_focus or focus command ends, the control system tells the control program where the focus mechanism actually ended up, regardless of whether or not the requested focus position was reached. The focus_position function allows this position to be queried for use within scheduling scripts.

Martin Shepherd (14-Jul-2010)