background image

AO SERIES | INSTRUCTIONS MANUAL

28

4.2.2 AutoFocus DLL

4.2.2.1 Basic Data Structure

struct 

oeImage

 

{

  

int

 w=-1;

  

int 

h=-1;

  

unsigned char

* data;

 

 int

 type=-1;

  

int

 channels=-1;

};

  •  int w - width (required field)

  •  int h - height (required field)

  •  unsigned char* data - (required field)

  •  int type - data type (required field)

0

8 bit unsigned 

1

8 bit signed

2

16 bit unsigned

3

16 bit signed

4

32 bit integer

5

32 bit float

  •  int channels - 1 (grayscale) or 3 (color)

struct 

oeRoi

{

  

int

 x =-1;

  

int

 y =-1;

  

int

 w =-1;

 

 int

 h =-1;

};

Data structure of Rectangular ROI:

  •  int x - x coordinate of upper-left pixel (required field)

  •  int y - y coordinate of upper-left pixel (required field)

  •  int w - width (required field)

  •  int h - height (required field)

4.2.2.2 Functions

DLL_EXTERN_C DLL_API

 

int

 calculateBestFocusRoi(

oeImage

 inputImages[], 

oeRoi 

inputRoi, 

unsigned int

 size, 

int 

&index, 

float 

&value);

Parameters:

  •  inputImages – input parameter, array of oeRoi structures

  •  inputRoi – input parameter, oeRoi Structure

  •  size – input value, size of inputImages array

  •  index – output value, index of best focused image

  •  value – output value, merit function output

Summary of Contents for AO series

Page 1: ...AO series Adaptive lens for fast focusing v 1 1...

Page 2: ...nization output 11 2 3 6 Analog control 13 2 3 7 Digital control 14 2 3 8 Wiring diagrams 15 3 Storage and use 17 3 1 Storage conditions 17 3 1 1 Temperature 17 3 1 2 Humidity 17 3 1 3 Vibration and p...

Page 3: ...s 32 4 4 3 Examples 34 4 5 Ethernet firmware update 35 5 Maintenance and cleaning 36 5 1 How to clean 36 5 2 How to change the mechanical adapters 36 5 2 1 AOLM27X05AR AOLM305X05AR AOLM375X05AR and AO...

Page 4: ...e customer whom this manual has been delivered to in order to install use and service the product The manufacturer will retain the right to modify or improve the manual and or the product referred to...

Page 5: ...er ring to mount the AO module on a lens with M30 5x0 5 filter thread 1 4 Overview of the product The fundamental parts of the product are listed below 1 2 3 6 4 5 Number Description 1 Focusing lens 2...

Page 6: ...ions is available via a web browser interface The lens can also be fully controlled with a dedicated dll library downloadable from the Opto Engineering website The library includes an autofocus algori...

Page 7: ...Installation Indoor use only Communication Connector 1 RJ45 12 pin Hirose Interfaces 2 Ethernet RS232 I O signal functions Analog control Digital control Ready Mechanical specifications Mount M30 5x0...

Page 8: ...tion Connector 1 RJ45 12 pin Hirose Interfaces 2 Ethernet RS232 I O signal functions Analog control Digital control Ready Mechanical specifications Mount M30 5x0 5 Length mm 116 Width mm 63 Height mm...

Page 9: ...gure 1 view of the AOL0223X connections Pinout for the 12 pin Hirose connector Figure 2 Top view of the Hirose 12 pin connector for reference pin detection RJ45 Connector Pin Reference Hirose 12 PIN C...

Page 10: ...ng leads termination The figure above is the representation of the pinout of the male connector present on the AOL0223X electronic board top view The reference for pin 1 can be seen in Figure 2 2 3 2...

Page 11: ...AOL_RS232_TX 9 Black User_RS232_RX The electrical specifications of the RS232 signals are listed in the following tables Specification min max Unit Data IN User_TX 25 25 V Data OUT User_RX 13 2 13 2 V...

Page 12: ...ectrical specification of the optoisolator are listed in the following table Specification Test condition Value Unit Collector emitter voltage VCEO 70 max V Emitter collector voltage VCEO 7 max V Coll...

Page 13: ...l 100 Ohm resistor are necessary to avoid possible transient overvoltages over 3 3V or undervoltages below 0V However since no optoisolation is present please be careful to connect well controlled sig...

Page 14: ...mages has been acquired by the camera and is available to be processed in order to find the best focus Considering the 12 bit resolution ADC better precision can be achieved by increasing the number o...

Page 15: ...y 2 3 8 Wiring diagrams This function code is used to write a block of contiguous registers in the controller register file The master specifies the starting register address the number of registers a...

Page 16: ...is connected to the power supply to the camera and to the PC The communication is based on TCP IP protocol via Ethernet to the PC In this case digital control is implemented to find the best focus MOV...

Page 17: ...onditions 3 1 1 Temperature Storage environment between 0 and 50 C Avoid thermal shock by not exposing the product to sudden changes in temperature 3 1 2 Humidity Store the product in a dry place stor...

Page 18: ...he system such as power supplies Such an enclosure would provide both mechanical and environmental protection in industrial applications 3 3 Clamping and power supply 3 3 1 Mechanical fixing After the...

Page 19: ...used by other peripherals AOL0223X included ranging from 1 to 255 Value 200 isn t a valid value since it is used for the AOL0223 Subnet mask 255 255 255 0 Default Gateway not defined The IP Address ca...

Page 20: ...AO SERIES INSTRUCTIONS MANUAL 20 Once the IP address is connected to the following web page will be displayed...

Page 21: ...lens by clicking the OFF button This is the correct procedure to switch off the adaptive lens properly The slider bar can be used to manually adjust the focusing of the lens This slider directly driv...

Page 22: ...e between 10 ms and 10 s Increase Decrease the time period of the loop TLOOP buttons allow 100 ms precision regulation of TLOOP to adjust this value with a finer resolution use the adjacent textbox Co...

Page 23: ...wo different control modes are possible Driving the lens through an external analog signal see section 11 6 for electrical specifications when the Enable Analog Input Control button is clicked Driving...

Page 24: ...lue int currentFocusValue Parameters device focusValue input value Adaptive lens focus value currentFocusValue output value actual Adaptive lens focus value If the device is enabled the function will...

Page 25: ...rough positions every x milliseconds defined in restTime currentRestTime output value Rest Time saved onboard Start command for the automatic loop procedure The START command is useless if the lens ha...

Page 26: ...ce int MemoryPosition int MemoryValue Parameters device MemoryPosition location in the onboard EEPROM MemoryValue Value which has to be saved in memory expressed in focus percentage DLL_EXTERN_C DLL_A...

Page 27: ...e Set_Voltage Check Focus Value Set_Position 20 Generic error Set_Voltage focusValue currentFocusValue Set_Position heck Memory Position Value Get_Position Reset_Position Start_Loop Check Rest Time Va...

Page 28: ...ruct oeRoi int x 1 int y 1 int w 1 int h 1 Data structure of Rectangular ROI int x x coordinate of upper left pixel required field int y y coordinate of upper left pixel required field int w width req...

Page 29: ...utImages array index output value index of best focused image value output value merit function output Error list Error Code Description Cause 0 OK 0 OK 0 100 Image Size Error Image size is not initia...

Page 30: ...CUS CH From A to E FOCUS Min 0 Max 100 If valid FOCUS If invalid 1 Get focusing power value from the test loop Get the actual percentage focusing power value of the position n of the test loop cgi bin...

Page 31: ...emory Get from the non volatile memory of the device the actual percentage focusing power value and actuate the piezoelectric cgi bin recall_position POS POS Min 0 Max 99 If valid FOCUS If invalid 1 I...

Page 32: ...DRESS Get the actual IP Address OPERATION 10 TURN ON THE LENS Turn on the onboard electronics OPERATION 11 TURN OFF THE LENS Turn off the onboard electronics OPERATION 12 STAR LOOP Start the automatic...

Page 33: ...the focusing percent value of the specified position of the loop 34 2 Reset the focusing power for the 2nd position of the loop CONFIGURATION 35 loop period ms SET LOOP REST TIME Set the time period...

Page 34: ...the second position of the automatic test loop equal to 60 32 3 20 set the focusing power of the third position of the automatic test loop equal to 20 35 500 set loop time rest time to 500 ms 12 star...

Page 35: ...cedure of the firmware update is the following 1 Power the adaptive lens 2 Open AOL Bootloader exe 3 Insert the MAC address of the device the local IP address and the device IP address for example a p...

Page 36: ...dust or other contaminants should be prevented whenever possible rather than cleaned Never touch the internal optical surfaces with your hands Never push or exert any pressure on the internal optical...

Page 37: ...AO SERIES INSTRUCTIONS MANUAL 37 5 2 1 AOLM27X05AR AOLM305X05AR AOLM375X05AR and AOLCM A Remove the three no head clamping screws with a screwdriver...

Page 38: ...AO SERIES INSTRUCTIONS MANUAL 38 B Remove the adapter ring C Replace it with a new one then screw again the no head screw 5 2 2 AOLCF A Remove the protective cover...

Page 39: ...RUCTIONS MANUAL 39 B Remove the screws with a proper torx screwdriver C Remove the protective window to clean or replace it with a new one D Put the AOLCF adapter ring in the same position as the prot...

Page 40: ...is broken or scratched the optical window can be replaced Please contact Opto Engineering or the local distributor to buy the spare part The instructions below must be followed to remove the protecti...

Page 41: ...AO SERIES INSTRUCTIONS MANUAL 41 A Remove the protective cover B Remove the screws with a proper torx screwdriver C Remove the protective window to clean or replace it with a new one...

Page 42: ...s is basis Opto Engineering accepts no liability for consequential loss of any kind Upon receiving your Opto Engineering product visually examine the product for any damage during shipping If the prod...

Page 43: ...or twist the power cables It may cause malfunctioning fire or electric shock possibly resulting in serious injury If the power cable is damaged or cracked please contact our assistance service and do...

Page 44: ...d directives Opto Engineering srl with registered office in Strada Circonvallazione sud 15 46100 Mantova Mn Italy states that the products described in this manual conform to the following EU directiv...

Page 45: ...ring to mount the AO module on a lens with M30 5x0 5 filter thread AOLM375X05AR Adapter ring to mount the AO module on a lens with M37 5x0 5 filter thread AOLCM Adapter ring to mount the AO module on...

Page 46: ...ering com Opto Engineering Korea official partner Far Island Corporation Ltd Seoil Building 703 353 Sapyeong daero Seocho gu Seoul Korea 06542 phone 82 70 767 86098 82 10 396 86098 kr opto engineering...

Reviews: