User Tools

Site Tools


video_autofocus

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
video_autofocus [2019/04/18 19:35] – external edit 127.0.0.1video_autofocus [2023/01/25 13:57] (current) – [MANUAL CALIBRATION] Added serial focus score instructions chrisd
Line 58: Line 58:
 [{{ autofocus_microscope_limits.png?direct&300 |Fig 3:  Set objective farther than 200 microns from the sample, then set the focus drive’s position to ZERO.}}] [{{ autofocus_microscope_limits.png?direct&300 |Fig 3:  Set objective farther than 200 microns from the sample, then set the focus drive’s position to ZERO.}}]
  
-2.Insure that **DIP Switch 2** on the back of your controller to UP position (Fig. 4). Your LCD will now display the //focus value// marked as ''F:####'' on its bottom line.  This number will always be between ''0000 and 2047''.  0000 indicates that little or no video signal is getting to the auto-focus card; check your connections.  If the //focus value// reads ''2047'', then the system is saturated with too much signal; try adjusting the Video Gain, Brightness, and Contrast controls on your camera if available. If this does not help, then go to step 4.+2.Insure that **DIP Switch 2** on the back of your controller to UP position (Fig. 4). Your LCD will now display the //focus value// marked as ''F:####'' on its bottom line.  This number will always be between ''0000 and 2047''.  0000 indicates that little or no video signal is getting to the auto-focus card; check your connections.  If the //focus value// reads ''2047'', then the system is saturated with too much signal; try adjusting the Video Gain, Brightness, and Contrast controls on your camera if available. If this does not help, then go to step 4. The focus score number can be read serially using the command ''RDADC Z''.
  
 [{{ autofocus_display.png?direct&300 |Fig 4:  Shows the focus value as F:1696 on a two-line LCD display (a) and as F:1904 on a three-line LCD display (b).  Dip Switch 2 on the back of a controller in the UP position (c).}}] [{{ autofocus_display.png?direct&300 |Fig 4:  Shows the focus value as F:1696 on a two-line LCD display (a) and as F:1904 on a three-line LCD display (b).  Dip Switch 2 on the back of a controller in the UP position (c).}}]
Line 64: Line 64:
 3.By focusing through your sample, you can watch the focus value change on the LCD screen.  When the sample is held steady, the //focus value// on the LCD should remain steady; ideally, only the last digit should fluctuate by one or two counts.  This is due to slight noise in the system and is tolerable.  If the fluctuations are bigger, check the connections for any problems. 3.By focusing through your sample, you can watch the focus value change on the LCD screen.  When the sample is held steady, the //focus value// on the LCD should remain steady; ideally, only the last digit should fluctuate by one or two counts.  This is due to slight noise in the system and is tolerable.  If the fluctuations are bigger, check the connections for any problems.
  
-4. ''AFCALIB X='' defines the contrast parameter for the auto-focus system.  During an auto-focus run, if the controller finds the maximum and minimum //focus value// less than the //contrast//, it declares the run a failure and returns to the starting position.  The ''AFC X'' value should always be more then the //focus value// fluctuation that you saw in step 3.  Default value is ''10''.+4. ''AFCALIB X='' defines the contrast parameter for the auto-focus system.  During an auto-focus run, if the controller finds difference of the maximum and minimum //focus value// less than the //contrast//, it declares the run a failure and returns to the starting position.  The ''AFC X'' value should always be more then the //focus value// fluctuation that you saw in step 3.  Default value is ''10''.
  
 5.Next, using the ''AFOCUS'' command, pick the auto-focus speed and travel distance suitable for your sample type, objective, and optics.  A //"Normal"// focus on the slowest speed is often the best option – we recommend a speed less than ''20'' (% of the maximum speed of your focus controller).  If you anticipate always being near the focus position, you can set a 10 to 50 micron range and swiftly get to the best focus in that range.  The command for a 50 micron travel range would be: 5.Next, using the ''AFOCUS'' command, pick the auto-focus speed and travel distance suitable for your sample type, objective, and optics.  A //"Normal"// focus on the slowest speed is often the best option – we recommend a speed less than ''20'' (% of the maximum speed of your focus controller).  If you anticipate always being near the focus position, you can set a 10 to 50 micron range and swiftly get to the best focus in that range.  The command for a 50 micron travel range would be:
Line 80: Line 80:
 The ''AFCALIB'' (or ''AFC'') Auto Calibration routine tunes the system moderately so that the system works for most samples and objectives.  Try the following steps for better results: The ''AFCALIB'' (or ''AFC'') Auto Calibration routine tunes the system moderately so that the system works for most samples and objectives.  Try the following steps for better results:
  
-1.Manually focus the sample and insure that **DIP Switch 2** on the back of your controller is in the UP position.  It will now display the focus value marked as ''F:####'' on the bottom line of your LCD.  This number will always be between ''0000 and 2047''.+1.Manually focus the sample and insure that **DIP Switch 2** on the back of your controller is in the UP position.  It will now display the focus value marked as ''F:####'' on the bottom line of your LCD.  This number will always be between ''0000 and 2047''. Note that the focus score number can be read over serial with the command ''RDADC Z''.
  
 2.Next, set'' AFADJ X=0 Y=0 Z=0'' \\ 2.Next, set'' AFADJ X=0 Y=0 Z=0'' \\
Line 146: Line 146:
  
  
 +To simply read the focus value over serial, use the command [[commands:rdadc|RDADC Z]].
 ===== AUTO-FOCUS High Level COMMANDS ===== ===== AUTO-FOCUS High Level COMMANDS =====
 Apart from the core MS2000 commands like [[commands:move|Command:MOVE]],[[commands:movrel|Command:MOVREL]], [[commands:where|Command:WHERE]] etc , below is a list of AutoFocus module specific commands.  Apart from the core MS2000 commands like [[commands:move|Command:MOVE]],[[commands:movrel|Command:MOVREL]], [[commands:where|Command:WHERE]] etc , below is a list of AutoFocus module specific commands. 
Address: 29391 W Enid Rd. Eugene, OR 97402, USA | Phone: +1 (541) 461-8181
video_autofocus.1555630519.txt.gz · Last modified: (external edit)