background image

APX-3302 User's Manual (OM110000019A) 

 

 

 

-71 - 

 

6.11   

Encoder operation method   

 
APX-3302 has three kinds of encoder operation methods. Each method is explained. 
 

6.11.1  Relative position encoder 

 
Relative position encoder is the mode suitable for the Web inspection using Line camera, etc. 
It performs 1 line-scan every time the encoder proceed fixed distance. 
 
It generates a coincidence pulse by using 32-bit counter, Comparison Register 1 (delay pulse configuration) 
and Comparison Register 2 (Length between coincidence pulses). 
Coincidence pulse will be used as trigger generation factor in the internal circuit. 
 
The relationship of pulse number, count value and coincidence pulse is as follows. 

 

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

 

Figure6-29: Relative position encoder 

 
 
Configure Comparison Register 1 to the number of delay pulses from start capturing to the first scan. 
Configure Comparison Register 2 to the interval of line-scan. 
Configure trigger for starting count. (Start with external trigger or Z phase, CPU) 
 
Encoder count will be started after finishing configuration above. 
 

Value of Comparison register 1 
This value will be reset when encoder pulse 
number equal to this value. 

Value of Comparison register 2 
This  value  will  be  reset  when 
encoder  pulse  number  equal  to 
this value. 

Time 

Counter value 

Coincidence pulse 

Содержание APX-3302

Страница 1: ...APX 3302 User s Manual ...

Страница 2: ...e assurance doubly sure on the contents of this manual However if you find something questionable incorrect or omitted please contact the shop of purchase 4 Please note that AVAL DATA assumes no responsibility for any effects resulting from the application notwithstanding the article 3 above Copyright 2012 AVALDATA CORPORATION Manufacturer names and product names used in this manual are trademarks...

Страница 3: ...entially hazardous situation that can result in minor moderate injury or property damage if you do not follow instructions Indicates a potentially hazardous situation that can result in electric shock if you do not follow the instruction Indicates a potentially hazardous situation that can result in injury if you do not follow the instruction Indicates a potentially hazardous situation that can re...

Страница 4: ...nt Pull out the plug of power cord from AC outlet before installing removing peripheral device Installing removing peripheral device with power cord connected to AC outlet can cause electric shock Connect the plug of equipment s power cord to an independent AC outlet with a ground terminal No connection or loose connection of ground can cause electric shock or malfunction Many loads on one AC outl...

Страница 5: ...rty 7 1 3 Disposal Method of the Product 7 Chapter 2 General Description 8 2 1 Product Summary 8 2 2 Feature 8 2 3 Specifications 9 2 4 Block Diagram 10 2 5 Front Panel 11 2 6 Connector Pin Assignment 12 2 6 1 CameraLink connector CN1 CN2 12 2 6 2 Expansion connector CN6 13 Chapter 3 Settings and Interface 14 3 1 Hardware initial setting 14 3 1 1 SW1 setting 15 3 1 2 SW2 setting 15 3 1 3 SW3 setti...

Страница 6: ... 2 How to configure for 3TAP output cameras 44 6 2 Power Over CameraLink 45 6 3 Camera exposure control signal CC 47 6 4 Serial interface 49 6 5 External signal input 51 6 6 The noise rejection function of external input signal 56 6 7 Strobe output 57 6 8 Timing adjustment of CC output and strobe output 57 6 9 Synchronizing signal between frame grabbers SYNCLT 60 6 9 1 Configuration steps using SY...

Страница 7: ...nction 94 Chapter 7 Error codes 96 7 1 Common error codes 96 7 2 Board error code 99 7 3 Extended error code Windows 101 7 3 1 Extended error codes returned by driver 102 7 3 2 Extended error codes related to buffer 104 Firmware Update History 105 Revision History 106 Inquiry 107 ...

Страница 8: ...steam or a place of high humidity Otherwise it can cause failure of the product Use or store the product in a flat place with sufficient strength Do not apply vibration or impact on the product Do not use or store the product in a place exposed to direct sunlight or a place close to fire or heaters such as stoves Otherwise it can cause failure or deformation Do not use or store the product in a du...

Страница 9: ...ystem turn on the power of the system and check the operation Precautions for removing procedure of the product a Be sure to turn OFF the power of the system before removing the product Otherwise it can cause failure b Right after turn OFF the power of the system the product may be heated to a high temperature please handle it with care Refer to the manual for the use of the system Cautions Be sur...

Страница 10: ...maintenance service registration page is in the support homepage of our homepage A page for maintenance service registration in the support page on AVAL DATA s homepage http www avaldata co jp support regist_user html Registration by FAX Fill out a FAX registration form for maintenance service that is included with shipment FAX 042 732 1032 AVALDATA handles personal information appropriately and s...

Страница 11: ...ne E mail support avaldata co jp 1 2 3 User s manual A printed manual is not included with the shipment The manual is provided for download on the website or provided for the purchase of the Software Development Kit SDK It is based on concepts of environmental consideration and providing continuous updates in the ever changing industry AVAL DATA appreciate your understanding Download from the Webs...

Страница 12: ...aling with occurrence of failure or abnormality When the following failure or abnormality occurred on the module turn off the power of the system immediately and pull out the plug of power cord from AC outlet A When the system smokes or gives abnormal smell B When the system becomes too hot to touch by hand C When the system sounds abnormal noise D When the application that had been functioning co...

Страница 13: ...module at hand C Prepare a simple note on the state of failure or abnormality D Prepare a note on the environment where the module is used Hardware Software E Have the manual of the module at hand 1 2 7 Repair and maintenance service Warranty certificate In case of failure of the product we will repair the product in accordance with the contents of the certificate Refer to the certificate for deta...

Страница 14: ...o each software shall be satisfied The software not permitted for its transfer and alienation shall be deleted before transfer B User to whom the product is transferred Be sure to inform us of the items necessary for changing the contents of user registration for the case when we send information to our users Items necessary for registration Warranty certificate number of the main unit model name ...

Страница 15: ...ing PCI Express x4 bus Gen2 2 5GT s Capable connection to the line camera or area camera that support the CameraLink standard for Base Configuration Capable of connecting up to two cameras Capable of synchronous asynchronous image acquisition between camera PoCL function to supply power to the camera On board APX 3312 compatible external I O interface enables coordination with external device or g...

Страница 16: ...ose input Four RS422 encoder trigger input Two Open Collector strobe general purpose output System bus x4 PCI ExpressTM 2 0 Gen2 2 5 GT s MEGA FIFO DDR2 SDRAM 256MB Interrupt Start of acquisition End of DMA Falling edge of general purpose input Power Requirements 12V 0 7A Max PoCL OFF 3 3V 0 3A Max Environment Requirements Temperature 0ºC to 50ºC Humidity 35 to 85 non condensing Dimension 167 65mm...

Страница 17: ...oller AVAL IP DMA Controller x4 PCI ExpressTM I O Connecor Capture Controller Capture Controller SDR 26Pin SDR 26Pin Ch 1 Ch 2 AVAL IP CrossPoint BusSwitch AVAL IP FIFO Controller AVAL IP FIFO Controller AVAL IP DMA Controller Flash Controller 16MB Flash ROM Camera Controller Camera Controller Trigger Encoder Control Registers Ch 6 Figure2 1 Block Diagram ...

Страница 18: ...ure2 2 Front panel An optional PCI standard front panel is provided replace a front panel according to the type of PC Panel and board are connected with four of screw lock CameraLink connector Figure2 3 Front panel Standard Ch 2 SDR26 pin CameraLink connector HDR EC26LFDT1 SLD FROM HONDA TSUSHIN KOGYO Ch 1 ...

Страница 19: ...CN2 CameraLink connector specifications are shown below Compliant with CameraLink standard Manufacturer HONDA TSUSHIN KOGYO Model HDR EC26LFDT1 SLD Pin Signal Pin Signal 1 Inner_Shield 12V 14 Inner_Shield 2 CC4 15 CC4 3 CC3 16 CC3 4 CC2 17 CC2 5 CC1 18 CC1 6 SerTFG 19 SerTFG 7 SerTC 20 SerTC 8 X3 21 X3 9 X_CLK 22 X_CLK 10 X2 23 X2 11 X1 24 X1 12 X0 25 X0 13 Inner_Shield 26 Inner_Shield 12V Table2 ...

Страница 20: ...ncoder Z phase input RS422 or ch2 external trigger input RS422 10 Enc Z Encoder Z phase input RS422 or ch2 external trigger input RS422 11 Diff External differential trigger input RS422 12 Diff External differential trigger input RS422 13 GND Ground 14 GND Ground 15 N C 16 N C 17 N C 18 N C 19 GP_IN1 Inputs TTL in general 20 GP_OUT1 Outputs TTL in general 21 SYNCLT_OUT The synchronizing signal out...

Страница 21: ...ttings for Hardware and software of APX 3302 3 1 Hardware initial setting Set up the jumper and switch correctly before installing this product to the PC or devices Figure3 1 jumper switch layout drawing Be sure to turn OFF the power of the system before change jumper or switch settings SW2 SW1 CN7 CN8 SW3 ...

Страница 22: ... 1 4 CN7 CN8 setting Set up the validity or invalidity of PoCL function according to the channel of camera PoCL is valid in ON and is invalid in OFF CN7 corresponds to ch1 of camera and CN8 corresponds to ch2 of camera Figure3 3 CN7 CN8 setting CN7 and CN8 are set as ON and PoCL function is valid in default setting In order to use a PoCL function it is necessary to control feeding power not only b...

Страница 23: ...nector of the system are connected correctly c After insert it into PCI slot fix it with panel fixation screw tightly Turn ON the power source of the system and check the operation after checking it is mounted into the system Notes for removing APX 3302 from the system a Be sure to turn OFF the power source of the system before removing it it can cause of failure Be cautious it becomes extremely h...

Страница 24: ...ice use expansion cable CBL Z091A Refer to the cable pamphlet for the detail specification of CBL Z091A Heatsink CN51 CameraLink camera Commercially available cable for CameraLink Expansioncable CBL Z091A External trigger General purpose I O Figure3 5 Connection diagram of the power source connector and expansion cable Attention The expansion cable is compliant with PCI standard panel In the case ...

Страница 25: ...h enables control of various models of frame grabbers with a common interface Drivers for various models of frame grabbers The driver for various models of frame grabbers including APX 3302 Sample source Capture sample VC VC VB NET which supports any languages Sample for connecting various types of image processing library Tool AcapLib2Viewer virtual COM tool firmware update tool line profile tool...

Страница 26: ...r or user name authorized to install driver and others Cannot use the standby ACPI S1 S3 mode which has power saving function Turn sleeping state hibernation off by using inside CD ROM Manual Windows system standby cancellation procedure It does not support about for using 3G option in 32bit OS AVAL DATA recommends using it by removing 3G option It is not supporting Windows XP Mode and Windows XP ...

Страница 27: ...od 3 Select run on File download is displayed Figure3 8 Download of a file Method 4 Click Install NOTE If another version is already installed Uninstall becomes effective You can continue to uninstall if the same version is used However if the version is different the warning will appear at the time Figure3 9 Menu ...

Страница 28: ...installation selection Device Driver Installation Wizard starts automatically Follow instruction s and continue installing Figure3 11 Library installation Method 7 When you check Registration at installation selection AVALDATA Registration Tool starts automatically When the product key is included select Product version then input product key and select OK Refer to 3 2 4 Registration Tool for the ...

Страница 29: ...nstallation selection AVALDATA TransFlyer starts automatically Follow instruction s and continue installing It is not necessary to install this software other than CoaXPress frame grabber Figure3 13 TransFlyer installation Method 9 Finish application by clicking Finished Figure3 14 Completion ...

Страница 30: ...nction to assign each camera link port of AVALDATA s frame grabber as a virtual COM port on Windows It enables communicate from standard COM port on Windows to the camera Use virtual COM tool to assign virtual COM Execute from Start AVALDATA SDK AcapLib2 Tool VirtualCOM avdCOMmng Refer to a virtual COM tool user s manual SDK AcapLib2 VirtualComTool Manual J2OM10016 for the installation or uninstal...

Страница 31: ...hat registration is not completed will appear when the function of specific library is called Figure3 17 Unregistered message Registration method Description of the registration method is shown below Method 1 Execute Start AVALDATA SDK AcapLib2 Tool Registration AvdRegistTool Method 2 Select Product version then enter 16 digit product key indicated on the yellow seal which attached to an install d...

Страница 32: ...s the application for updating local FPGA firmware of APX 3302 It has the firmware update function as well as software switch setting function Execute Start AVALDATA SDK AcapLib2 Tool FirmwareUpdateTool FirmwareUpdateTool Refer to Firmware update tool user s manual SDK AcapLib2 FirmwareUpdateTool Manual J3OM10026 for the procedure of this application Figure3 20 Firmware update tool ...

Страница 33: ...Cancel all assignment of COM Refer to Virtual COM tool user s manual SDK AcapLib2 VirtualComTool Manual J2OM10016 for the details Method 3 Select Control Panel Management Tool Management of computer Device manager Method 4 Right click AVALDATA Virtual COM Port COM in Port COM and LPT then select delete Method 5 Click OK after check of device deletion box appeared Figure3 21 Device manager ...

Страница 34: ...delete it Figure3 22 Uninstallation of a program Method 3 Close a program above once execute a program again and uninstall if the following items remain AVALDATA Capture Library 2 Windows driver package AVAL DATA CORPORATION Aip apx AVAL DATA TransFlyer 3 2 7 Installation trouble shooting Check following points if any problem occurs during installation Check whether the hardware is connected corre...

Страница 35: ...tion images Moreover display the luminance value of specified pixels File output of acquired image Output acquired images into various image formats such as bmp csv bin jpg gif tif png Initialization file ini file output Output each settings of AcapLib2Viewer as the ini file 4 2 What is ini file An ini file is a file which stored various setting points such as capture size shutter trigger external...

Страница 36: ...dures until acquire images using AcapLib2Viewer Refer to SDK AcapLib2 Viewer Manual J2OM08014 for the detailed setting method Method 1 Select All programs from the start menu of Windows Figure4 1 Start menu Method 2 Select AcapLib2Viewer in AVALDATA SDK AcapLib2 Figure4 2 All the programs ...

Страница 37: ...rd selection Figure 4 4 Board ID number selection Figure4 5 Input channel selection Board ID number Board ID number is a number which can be identified a solid when two or more APX 3302 are mounted into one PC It is set as 0 at in the default It can be changed into any value by using Firmware Update Tool Method 4 ini file selection dialog appears when click Load Figure4 6 Check dialog for the boar...

Страница 38: ...d from ini file by some camera manufactures in the folder SDK AcapLib2 install folder AVALDATA SDK AcapLib2 Sample IniFile Figure4 7 Ini file selection dialog Method 6 Click OK after choosing ini file Click OK then initialize with ini file selected Figure4 8 Check dialog for the board ...

Страница 39: ... main window will be displayed when the initialization is successful Click a camera icon in the red frame one shot snap will be performed A camera shall be set as a factory shipments state free run and the power source shall be ON Figure4 9 Main window ...

Страница 40: ...on succeeded Figure4 10 Acquired image Error code with error dialog as below will appear when the image acquisition failed Mis setting of the frame grabber or the camera mis connecting of the cable input omission of external triggers or encoders etc can cause of failure Refer to Chapter7 Error code for the details Figure4 11 Error dialog ...

Страница 41: ... The setting specified with setting ID 3 Buffer registration 5 Setting reflection 4 Event registration Buffer registration AcapSetBufferAddress function Set up the buffer to transfer of acquired image Setting reflection AcapReflectParam function Reflect the settings from 2 4 into hardware or driver Event registration AcapSetCallbackEvent function Callback registration AcapRegistCallback function R...

Страница 42: ...ain settings of Default ini is as follows Input size 640x480 XY delay x y 0 0 Processing bit 8 bits External trigger random shutter Invalid 5 2 1 Snap one shot snap The programming example of Snap one shot snap is shown as below Sample code include stdio h include conio h include AcapLib2 h pragma comment lib AcapLib2 lib define INPUT_CH 1 define CAM_LINE 1 int main int argc char argv HANDLE hDev ...

Страница 43: ...fo hDev INPUT_CH ACL_BOARD_BIT 0 nBoardBit AcapSetInfo hDev INPUT_CH ACL_MEM_NUM 0 1 pUserBuffer PUCHAR _aligned_malloc nXSize nYSize nBoardBit 8 16 ZeroMemory pUserBuffer nXSize nYSize nBoardBit 8 AcapSetBufferAddress hDev INPUT_CH ACL_IMAGE_PTR 1 pUserBuffer printf in order to suspend an input please input some keys n do Snap AcapGrabStart hDev INPUT_CH 1 Stop capturing AcapGrabStop hDev INPUT_C...

Страница 44: ...ORD dwEventMask ACAPBOARDINFO abi Get board frame grabber information AcapGetBoardInfo abi Open device hDev AcapOpen abi BOARDINDEX 0 pBoardName abi BOARDINDEX 0 nBoardID INPUT_CH Initialize by ini file AcapSelectFile hDev INPUT_CH Default ini 0 Check camera type AcapGetInfo hDev INPUT_CH ACL_SCAN_SYSTEM 0 nCamera if nCamera CAM_LINE If the camera is Line sensor confirm that exposure setting is pe...

Страница 45: ..._FRAMEEND Frame decision interruption dwEventMask ACL_INT_FRAMEEND AcapRegistCallback hDev INPUT_CH dwEventMask GrabCallbackFunc Grab start printf in order to suspend an input please input some keys n AcapGrabStart hDev INPUT_CH 0 do Sleep 1 while kbhit Grab stop AcapGrabStop hDev INPUT_CH printf n which suspended the input Close device AcapClose hDev INPUT_CH Release the buffer for nCount 0 nCoun...

Страница 46: ...ages using AcapLib2 It is stored in the folder as below Capturing sample using AcapLib2 SDK AcapLib2 install destination AVALDATA SDK AcapLib2 Sample SimpleApplication Figure5 2 SimpleApplication SimpleApplication Folder Sample contents VB net VB net capture sample using AcapLib2 VB6 0 VB6 0 capture sample using AcapLib2 VC VC capture sample using AcapLib2 VC VC capture sample using AcapLib2 Inclu...

Страница 47: ... for connecting AcapLib2 with various types of image processing library It is stored in the folder as below Connecting samples using various types of image processing library SDK AcapLib2 install destination AVALDATA SDK AcapLib2 Sample OtherSample Figure5 3 OtherSample ...

Страница 48: ...apLib2 then performs image processing in FVX HALCON VC sample which captures the image by AcapLib2 then performs image distribution in HALCON MIL VC sample which captures the image by AcapLib2 then performs image distribution in MIL OpenCV VC CLI sample which captures the image by AcapLib2 then performs image processing in OpenCV PSM 3318 02AD01 VC sample which performs image distribution in with ...

Страница 49: ...els like area sensor camera and line sensor camera The graphics format that can be acquired by APX 3302 is as follows 8bit x1tap Monochrome 8bit x2tap Monochrome 8bit x3tap Monochrome 10 16bit x1tap Monochrome 10 12bit x2tap Monochrome 24bitRGB x1tap Color APX 3302 has pix rearrangement function for the cameras that have two or more tap outputs camera image APX 3302 corresponds to 20 MHz 85 MHz cl...

Страница 50: ...nt Sample code Configuration of tap number AcapSetInfo hDev INPUT_CH ACL_TAP_NUM 1 2 Configure rearranging method as all taps independent AcapSetInfo hDev INPUT_CH ACL_TAP_ARRANGE 1 1 Configure the rearrangement direction as AcapSetInfo hDev INPUT_CH ACL_TAP_DIRECTION 1 0 AcapSetInfo hDev INPUT_CH ACL_TAP_DIRECTION 2 1 Disable Line reverse function AcapSetInfo hDev INPUT_CH ACL_LINE_REVERSE 1 0 Co...

Страница 51: ...gement Sample code Configuration of tap number AcapSetInfo hDev INPUT_CH ACL_TAP_NUM 1 3 Configure rearranging method as all taps independent AcapSetInfo hDev INPUT_CH ACL_TAP_ARRANGE 1 1 Configure the rearrangement direction as AcapSetInfo hDev INPUT_CH ACL_TAP_DIRECTION 1 0 AcapSetInfo hDev INPUT_CH ACL_TAP_DIRECTION 2 0 AcapSetInfo hDev INPUT_CH ACL_TAP_DIRECTION 3 0 Disable Line reverse functi...

Страница 52: ...camera after supplying power within the set time Camera stops CameraLink clock for any causes and cannot begin to start CameraLink clock with in the set time APX 3302 begins to supply power if it doesn t detect CameraLink clock when the driver starts The sequence of the power supply ON is as follows Power ON 3s Wait 3 sec after power supply start Start Output Clock 12V Cameralink Clock Clock Detec...

Страница 53: ...equence under turning on electricity The setting example for software The sample code which performs to supply 1ch side camera and to configure the set time as 3000ms is as follows Note Supplying control is possible only when setting of the jumper CN7 CN8 of APX 3302 is ON For more information of the jumper setting refer to 3 1 4 CN7 CN8 setting Sample code Clear error status of camera power suppl...

Страница 54: ...nal generation system is shown below CC Output Exposure Cycle Figure6 8 Internal generation CC The timing of an external generation system is shown below CC Output Exposure Cycle depends on external input External Factor External Signal Input Board Internal Synchronization Signal Figure6 9 External generation CC The delay time from an external signal input to CC output start should follow the foll...

Страница 55: ... up a value smaller than an output cycle CC output 30us 100us Figure6 10 CC signal output timing Sample code Enable output CC signal AcapSetInfo hDev INPUT_CH ACL_EXP_EN 1 1 CC signal is set as positive logic AcapSetInfo hDev INPUT_CH ACL_EXP_POL 1 1 CC output width is set as 30us AcapSetInfo hDev INPUT_CH ACL_EXPOSURE 1 30 CC output cycle is set as 100us AcapSetInfo hDev INPUT_CH ACL_EXP_CYCLE 1 ...

Страница 56: ...below Communication using the communicating software which a camera manufacturer offers Communication using API AcapLib2 It can communicate by the following specifications between APX 3302 and a camera Communication speed 9600bps default Change by register setting is possible Start bit 1 bit Data bit 8 bit Stop bit 1 bit Parity bit Nothing Flow control Nothing Please refer to SDK AcapLib2 virtual ...

Страница 57: ...and a final character carry out the following Communication speed 9600 bps Final character CR r character code ASCII Sample code Open serial port AcapSerialOpen hDev INPUT_CH Configure serial parameter AcapSerialSetParameter hDev INPUT_CH 9600 8 0 0 0 Send command writing AcapSerialWrite hDev INPUT_CH TRUE AVAL r NULL NULL Close serial port AcapSerialClose hDev INPUT_CH ...

Страница 58: ...vailable for three kinds of uses Encoder Z phase for Ch 1 and Ch 2 Image input start trigger for Ch 2 CC generating trigger for Ch 2 Diff RS422 level Common external trigger input terminal It is below available for three kinds of uses Image input start trigger for Ch 1 and Ch 2 CC generating trigger for Ch 1 and Ch 2 Encoder startup trigger for Ch 1 and Ch 2 A negative going edge is recognized as ...

Страница 59: ... TTL level synchronizing signal output terminal between frame grabbers Connect with the SYNCLT_IN terminal of a slave frame grabber synchronizing signal report destination OUT_RES1 It cannot be used in APX 3302 Table6 2 I F of an external signal input ...

Страница 60: ...onment which a noise generates use of a differential signal RS422 is recommended strongly When you use external trigger Input the L level stabilized more than the period of at least 25 uS s The setting example for software The sample code for using TTL signal is as follows In this example External trigger mode is set as continuation external trigger mode CC signal is outputted whenever it detects ...

Страница 61: ...ring is validated in the unfixed state a trigger may occur to unexpected timing When you do not use a RS422 input be sure to set up external triggering invalid The setting example for software The sample code for using RS 422 signal is as follows In this example External trigger mode is set as continuation external trigger mode CC signal is outputted whenever it detects external trigger Sample cod...

Страница 62: ...en collector output terminal The setting example for software The sample code for using GP_OUT1 for below as a general purpose output is as follows Sample code Configure to use GP_OUT1 as a general purpose output AcapSetInfo hDev INPUT_CH ACL_GPOUT_SEL 1 1 Reflect setting AcapReflectParam hDev INPUT_CH Configure GP_OUT1 Low output AcapSetInfo hDev INPUT_CH ACL_GPOUT_POL 0 0 Configure GP_OUT1 High ...

Страница 63: ...trigger Figure6 15 Noise rejection of external trigger Noise rejection time can be set up per uS On the specification of a digital filter Keep in mind that the delay for filter settling time occurs in an output The setting example for software The sample code that set external trigger noise removing time High and Low as 100us is as follows Sample code Configure noise rejection time as 100us AcapSe...

Страница 64: ...or software The sample code to enable strobe output is as follows Sample code 6 8 Timing adjustment of CC output and strobe output You can configure delay time of CC output and strobe output individually Basis signal Internal CC Delay CC Output Strobe Output Strobe Delay Figure6 16 CC strobe output timing CC output and strobe output are outputted as 0 they are outputted as same timing when begin t...

Страница 65: ...setting example for software The sample code to configure timing of CC output and strobe output is as follows In this code delay time and output time are as following timing Strobe delay time 100us Strobe output time 50us CC delay time 10us Sample code Strobe delay time AcapSetInfo hDev INPUT_CH ACL_STROBE_DELAY 1 100 Strobe output time AcapSetInfo hDev INPUT_CH ACL_STROBE_TIME 1 50 CC delay time ...

Страница 66: ...ing of CC output and strobe output is as follows In this code delay time and output time are as a following timing Strobe delay time 30us Strobe output time 20us CC delay time 200us Sample code Strobe delay time AcapSetInfo hDev INPUT_CH ACL_STROBE_DELAY 1 30 Strobe output time AcapSetInfo hDev INPUT_CH ACL_STROBE_TIME 1 20 CC delay time AcapSetInfo hDev INPUT_CH ACL_CC_DELAY 1 200 Reflect setting...

Страница 67: ...ng between multiple frame grabbers The connection diagram using SYNCLT to synchronize is as follows Ch 1 CC Generating Circuit CC1 CC1 SYNCLT_OUT Ch1 and Ch2 output CC at the same time Master CC1 CC1 SYNCLT_IN Slave To other frame grabber SYNCLT_IN Ch 2 CC Generating Circuit Ch 1 CC Generating Circuit Ch 2 CC Generating Circuit Figure6 19 SYNCLT connection diagram ...

Страница 68: ...normally The slave board that outputs CC by SYNCLT_IN must start capturing in first 5 Stop capturing Stop Capturing Order stopping does not have particular restriction 3 Reflect configurations Reflect configurations to Hardware 1 Open and Initialization 2 Configuration CC Output with notice 5 Start capturing with notice Open master board and slave board Initialize master board and slave board Conf...

Страница 69: ... HANDLE hDev_Slave 3 INVALID_HANDLE_VALUE int ch_1 1 int ch_2 2 int ch Open channel 1 and 2 of the master board BoardID 0 and slave board BoardID 1 respectively Configure Output CC enable for ch ch_1 ch ch_2 ch Configure channel 1 and 2 hDev_Master ch AcapOpen APX 3302 MASTER_BID ch Master board hDev_Slave ch AcapOpen APX 3302 SLAVE_BID ch Slave board Initialize basic settings by initial file Acap...

Страница 70: ...ter board output CC enable AcapSetInfo hDev_Master ch_1 ch_1 ACL_EXP_EN 1 1 AcapSetInfo hDev_Master ch_2 ch_2 ACL_EXP_EN 1 1 Configure synchronous channel master board Configure master board ch1 as the parent of master board ch2 AcapSetInfo hDev_Master ch_2 ch_2 ACL_SYNC_CH 1 ch_1 Configure outputting CC as a following timing Master board ch1 Master board ch2 Synchronous output Synchronous output ...

Страница 71: ...if SensorType 0 In the case of Area sensor enable rolling shutter AcapSetInfo hDev_Slave ch_1 ch_1 ACL_ROLLING_SHUTTER 1 1 else In the case of Line sensor use external triggering SyncLT as coincidence pulse AcapSetInfo hDev_Slave ch_1 ch_1 ACL_ENC_EN 1 1 AcapSetInfo hDev_Slave ch_1 ch_1 ACL_ENC_START 1 2 SYNCLT_OUT that master board outputs is the same wave as CC output of master board Since maste...

Страница 72: ..._Slave ch_2 ch_2 ACL_EXPOSURE 1 CCWidth_us Enable output CC AcapSetInfo hDev_Slave ch_1 ch_1 ACL_EXP_EN 1 1 AcapSetInfo hDev_Slave ch_2 ch_2 ACL_EXP_EN 1 1 Configure synchronous channel slave board Configure slave board ch1 as the parent of slave board ch2 AcapSetInfo hDev_Slave ch_2 ch_2 ACL_SYNC_CH 1 ch_1 Master board ch1 Synchronous output Output width 20 ms Output cycle 100 ms CC1 SYNCLT_OUT S...

Страница 73: ...you use it capturing will be begun when slave board starts capturing because SYNCLT is also outputted with CC There fore you have to stop output CC before start capturing when you use SYNC_LT with Line sensor This processing is not supported in AcapLib2 standard function you have to configure the register of APX 3302 directly The contents of processing In the case of CH1 Set Bit0 of the register 1...

Страница 74: ...ription Sleep 100 AcapGrabStart hDev_Master ch_1 ch_1 5 Master ch1 Waiting for GRABEND event 5 frame input end if ACL_RTN_ERROR AcapWaitEvent hDev_Master ch_1 ch_1 ACL_INT_GRABEND 10000 TimeOut etc if ACL_RTN_ERROR AcapWaitEvent hDev_Master ch_2 ch_2 ACL_INT_GRABEND 10000 TimeOut etc if ACL_RTN_ERROR AcapWaitEvent hDev_Slave ch_1 ch_1 ACL_INT_GRABEND 10000 TimeOut etc if ACL_RTN_ERROR AcapWaitEven...

Страница 75: ...capGrabStop hDev_Slave ch_1 ch_1 AcapGrabStop hDev_Slave ch_2 ch_2 Cancel parent setting and Disable SYNCLT for quitting synchronization capture Cancel parent setting of slave ch2 AcapSetInfo hDev_Slave ch_2 ch_2 ACL_SYNC_CH 0 0 Cancel parent setting of master ch2 AcapSetInfo hDev_Master ch_2 ch_2 ACL_SYNC_CH 0 0 Disable SYNCLT AcapSetInfo hDev_Slave ch_1 ch_1 ACL_SYNC_LT 0 0 ...

Страница 76: ...le edge evaluation that using only encoder A phase are available Encoder Z phase is available for using as start timing of encoder Moreover it is also possible to use external trigger signal as a trigger to start encoder count up For using external trigger as a trigger to start encoder count up you need to input trigger for each frame The input frequency of encoder can be inputted to 1 MHz the max...

Страница 77: ...re6 28 Quad edge evaluation count of using A and B phase Quad edge evaluation count performs addition when A phase is located 90 degrees ahead of B phase And it performs subtraction when B phase is located 90 degrees ahead of A phase For preventing miscount by noise it checks phase when it detects each edges then it specifies the edge that should be detected As shown in the above figure if phase c...

Страница 78: ...ll be used as trigger generation factor in the internal circuit The relationship of pulse number count value and coincidence pulse is as follows Figure6 29 Relative position encoder Configure Comparison Register 1 to the number of delay pulses from start capturing to the first scan Configure Comparison Register 2 to the interval of line scan Configure trigger for starting count Start with external...

Страница 79: ... phase Encoder comparison register 1 10 Encoder comparison register 2 4 Sample code Relative position encoder AcapSetInfo hDev INPUT_CH ACL_ENC_EN 1 1 Not using external trigger AcapSetInfo hDev INPUT_CH ACL_ENC_START 1 0 Encoder scan mode AcapSetInfo hDev INPUT_CH ACL_ENC_MODE 1 0 Phase AB AcapSetInfo hDev INPUT_CH ACL_ENC_PHASE 1 0 CW AcapSetInfo hDev INPUT_CH ACL_ENC_DIRECTION 1 0 Not using Z p...

Страница 80: ...ster 1 It always keeps the value Interval counter is not reset even if it coincides with comparison register 2 Coincidence pulse is outputted when the value of comparison register 1 2 coincide with each counter value In the above mentioned figure configure comparison register 1 as start position A of proceeding direction and configure comparison register 2 as generating interval of coincidence pul...

Страница 81: ...oordinates of every point A point 5000 count B point 9900 count C point 9900 count D point 5000 count Sample code starting point Configure outward setting and start capturing Outward trip Start capturing at absolute encoder count 5000 After that capture 1 line every time counting 100 counts and capture 50 lines Configure encoder setting outward trip AcapSetEncoder hDev INPUT_CH 2 0 0 0 0 0 5000 10...

Страница 82: ...and start capturing when absolute count reaches 9900 You can check current count value by the 11 th argument of AcapGetEncoder or ACL_ENC_ABC_COUNT Get counting value ULONG ulAbsCount AcapGetEncoder hDev INPUT_CH NULL NULL NULL NULL NULL NULL NULL NULL ulAbsCount AcapGetInfo hDev INPUT_CH ACL_ENC_ABS_COUNT 0 ulAbsCount Point D Finish capturing of return trip Return trip Finish 50 line acquiring Th...

Страница 83: ...nd it can generate coincidence pulse at certain count value The setting example for software The sample code for capturing from point 1 to point 9 each by Absolute position encoder multi point is as follows The setting of encoder and the coordinate of each point that is shown at Figure6 31 Absolute position encoder multi point is shown below Encoder setting Select Encoder Absolute position encoder...

Страница 84: ...int 4 4000 count Point 5 5000 count Point 6 4000 count Point 7 3000 count Point 8 2000 count Point 9 1000 count Start capturing Finish capturing point Outward trip start point Point 1 1000 count Outward trip finish point Point 5 5000 count Return trip start point Point 6 4000 count Return trip finish point Point 9 1000 count ...

Страница 85: ...WORD dwRegOffset 0 register address DWORD dwRegVal 0 register setting value int nStartPos 0 starting position int nEndPos 0 end position int i 0 variable for loop formations Outward trip Configure comparison memory Standard functions of AcapLib2 do not support this processing so you have to configure register of APX 3302 directly CH1 Configure comparison memory from register address 5000h CH2 Conf...

Страница 86: ...h Comparison memory No Address Counter set value Comparison memory 0 5000h 1000 Comparison memory 1 5004h 2000 Comparison memory 2 5008h 3000 Comparison memory 3 500Ch 4000 Comparison memory 4 5010h 5000 Comparison memory 5 5014h 4000 Comparison memory 6 5018h 3000 Comparison memory 7 501Ch 2000 Comparison memory 8 5020h 1000 Table6 5 Starting position and end position of outward trip Outward trip...

Страница 87: ...0 Single point Table6 6 Encoder control register bit30 Enable multipoint Standard functions of AcapLib2 do not support this processing so you have to configure register of APX 3302 directly CH1 Configure bit30 of register address 1028h as 1 CH2 Configure bit30 of register address 2028h as 1 Get the value of encoder control register dwRegOffset 0x1028 INPUT_CH 1 APX3302_CH_OFFSET AcapGetReg ghDev I...

Страница 88: ...er control register dwRegOffset 0x1028 INPUT_CH 1 APX3302_CH_OFFSET AcapGetReg ghDev INPUT_CH 0 dwRegOffset dwRegVal Start counting of multi point mode configure bit17 as 1 dwRegVal 0x20000 Configure encoder control register AcapSetReg ghDev INPUT_CH REGTYPE_LOCAL dwRegOffset dwRegVal Outward trip Start frame number specifying capturing Capture 5 frames AcapGrabStart ghDev INPUT_CH 5 point 1 point...

Страница 89: ...ard trip finish capturing Outward trip Finish 5 times capturing then stop capturing and configure return trip Return trip Specify comparison memory starting position and finish position Stop capturing AcapGrabStop ghDev INPUT_CH Return trip Specify comparison memory starting position and finish position nStartPos 5 nEndPos 8 dwRegVal 0x000000FF nStartPos 8 dwRegVal 0x000000FF nEndPos Configure com...

Страница 90: ... position encoder count AcapGetInfo hDev INPUT_CH ACL_ENC_ABS_COUNT 0 ulAbsCount point 9 Return trip finish capturing Return trip Finish 4 times capturing then stop capturing and configure return trip Outward trip Specify comparison memory starting position and finish position Stop capturing AcapGrabStop ghDev INPUT_CH Outward trip Specify comparison memory starting position and finish position nS...

Страница 91: ...ra image input is possible until the image input buffer becomes full As shown in the following figure store image into image buffer is configurable by parameters below TRG_DELAY Number of delay lines from FVAL to start capturing Y_TOTAL Number of lines that frame grabber acquire X_DELAY Number of pixels from LVAL to start capturing X_SIZE Number of pixels of width that frame grabber acquire FVAL L...

Страница 92: ...t ACL_X_DELAY but ACL_LVAL_DELAY for configure ID For 1TAP camera configure LVAL_DELAY as same value of X_DELAY For 2TAP camera configure LVAL_DELAY as one half value of X_DELAY For 3TAP camera configure LVAL_DELAY as one third value of X_DELAY AcapSetInfo hDev INPUT_CH ACL_LVAL_DELAY 1 20 Configure ACL_LVAL_DELAY 3 Y_TOTAL Configure Y size and Y total as the same value unless you use infinite len...

Страница 93: ... Configuration ID Setting range and Restriction ACL_X_SIZE 8bit 1tap 16 8192 multiple of 16 8bit 2tap 16 16384 multiple of 16 8bit 3tap 48 24576 multiple of 48 10 bit 16 bit 1tap 8 8192 multiple of 8 10 bit 12 bit 2tap 8 16384 multiple of 8 24bitRGB 16 8192 multiple of 16 32bitRGB 8 8192 multiple of 8 ACL_Y_SIZE 1 16777215 ACL_Y_TOTAL 0 16777215 ACL_LVAL_DELAY 0 65535 ACL_Y_DELAY 0 1023 Table6 9 S...

Страница 94: ...rupts that able to notice Interrupt Definition Meaning Input start interrupt ACL_INT_GRABSTART It notifies that starts data input of 1 frame 1 frame input completion interrupt ACL_INT_FRAMEEND It notifies that finishes transferring data of 1 frame to buffer Input end interrupt ACL_INT_GRABEND It notifies that complete capturing of specified frame number if number of input frame is specified by Inp...

Страница 95: ...s follows Sample code Open APX 3302 int rtn HANDLE hDevice int channel 1 hDevice AcapOpen APX 3302 0 channel Initialize by ini file rtn AcapSelectFile hDevice channel camera ini 0 Set Input start interrupt and 1 frame input completion interrupt rtn AcapSetEvent hDevice channel ACL_INT_GRABSTART TRUE rtn AcapSetEvent hDevice channel ACL_INT_FRAMEEND TRUE Start capturing Grab rtn AcapGrabStart hDevi...

Страница 96: ...t setting is as follows Sample code When AcapWaitEvent is under performing under standby state it becomes error since cannot cancel that In this case cancels after execute cancel standby Specify ACL_INT_ABORT and the event that will be aborted rtn AcapSetEvent hDevice channel ACL_INT_FRAMEEND ACL_INT_ABORT TRUE Thread which waits to be notified 1 frame input completion interrupt void Thread_WaitEv...

Страница 97: ... Current memory number 1 which finished input lastly Last result at stop capturing nMemoryNo the present the memory number which the input finally completed 1 result of having taken in at the end at the time of a taking in stop void CALLBACK CallbackExFunc int nChannel DWORD dwEvent int nFrameNo int nMemoryNo void pParam nChannel The channel which detected interruption dwEvent Detected interrupt A...

Страница 98: ...dwEvent d nFrameNo d nMemoryNo d n nChannel dwEvent nFrameNo nMemoryNo Process at 1 frame input completion Register callback function at main routine int rtn int channel 1 rtn AcapRegistCallback hDevice channel ACL_INT_FRAMEEND EVENT_FUNC CallbackFunc Start capturing Grab rtn AcapGrabStart hDevice channel 0 CallbackFunc is called as inputting 1 frame Output result If number of transfer destination...

Страница 99: ...ach frame Callback function of ACL_GRABEND is called when 5 frame input is completed Output result If number of transfer destination memory 3 CallbackFuncEx called nChannel 2 dwEvent 1 nFrameNo 0 nMemoryNo 3 pParam 123456 Note CallbackFuncEx called nChannel 2 dwEvent 2 nFrameNo 1 nMemoryNo 1 pParam 123456 CallbackFuncEx called nChannel 2 dwEvent 1 nFrameNo 1 nMemoryNo 1 pParam 123456 CallbackFuncE...

Страница 100: ...ing example for software The sample code to re register callback function by different interrupt is as follows Sample code Register GPIN interrupt int rtn rtn AcapRegistCallback hDevice channel ACL_INT_GPIN EVENT_FUNC CallbackFunc Cancel GPIN interrupt rtn AcapRegistCallback hDevice channel ACL_INT_GPIN NULL Register 1 frame input completion rtn AcapRegistCallback hDevice channel ACL_INT_FRAMEEND ...

Страница 101: ...llbackFunc int nChannel DWORD dwEvent int nFrameNo int nMemoryNo printf CallbackFunc called nChannel d dwEvent d nFrameNo d nMemoryNo d n nChannel dwEvent nFrameNo nMemoryNo Output result If number of transfer destination memory 3 CallbackFunc called nChannel 1 dwEvent 2 nFrameNo 1 nMemoryNo 1 CallbackFunc called nChannel 1 dwEvent 2 nFrameNo 2 nMemoryNo 2 CallbackFunc called nChannel 1 dwEvent 2 ...

Страница 102: ...stination memory Process the number of skipped frames However if skip exceeding number of transfer destination memory is occurred overwrite of transfer destination memory occurs Also it is hard to restore delay if image processing is heavy load or needs long time for performing In that situation you need to do disposals like followings Reduce CPU load Revise PC engine performance Reduce frame rate...

Страница 103: ...handle ACL_SELECT_CHANNEL_ERROR 0xF106 Invalid channel ACL_MEM_ALLOCATE_ERROR 0xF107 Failed to reserve memory ACL_INVALID_MUTEX_ERROR 0xF108 Invalid handle for exclusive control ACL_MUTEX_LOCKED_ERROR 0xF109 Function is in the exclusive state ACL_FILE_NOT_FOUND_ERROR 0xF10A Cannot find a specified file ACL_EVENT_TIMEOUT_ERROR 0xF10B Times out for waiting event ACL_OPEN_ERROR 0xF10C Failed to open ...

Страница 104: ...ERIAL_GET_PARAM_ERROR 0xF129 Failed to get the serial parameter ACL_SERIAL_HANDLE_ERROR 0xF12A Invalid serial handle ACL_SERIAL_SELECT_PORT_ERROR 0xF12B Specified port is unable to use ACL_SET_BUFFER_ADRS_ERROR 0xF12C Failed to set up the buffer address ACL_GET_BUFFER_ADRS_ERROR 0xF12D Failed to get the buffer address ACL_SET_CAMERALINK_EX_ERROR 0xF12E Failed to set up camera link expand ACL_ABORT...

Страница 105: ..._PARAM_4_ERROR 0xF204 Parameter error 4th argument ACL_PARAM_5_ERROR 0xF205 Parameter error 5th argument ACL_PARAM_6_ERROR 0xF206 Parameter error 6th argument ACL_PARAM_7_ERROR 0xF207 Parameter error 7th argument ACL_PARAM_8_ERROR 0xF208 Parameter error 8th argument ACL_PARAM_9_ERROR 0xF209 Parameter error 9th argument ACL_PARAM_10_ERROR 0xF20A Parameter error 10th argument ACL_PARAM_11_ERROR 0xF2...

Страница 106: ...F Invalid tap numbers ACL_3302_SET_BUFFER_ERROR 0xF910 Failed to register the buffer ACL_3302_CAMERA_KIND_ERROR 0xF911 Wrong camera classification area or line ACL_3302_GRAB_ABORT 0xF912 Abort grabbing ACL_3302_CH_NOT_OPENED 0xF913 Channel is not open ACL_3302_FIFO_ERROR 0xF914 FIFO error ACL_3302_DMA_ERROR 0xF915 DMA error ACL_3302_GET_REGISTRY_KEY_ER ROR 0xF916 Failed to get registry key ACL_330...

Страница 107: ..._ERROR 0xF92F Camera power state error ACL_3302_POWER_ON_TIMEOUT 0xF930 Cannot detect camera clock in designated time although camera power was turned on ACL_3302_POWER_OFF_TIMEOUT 0xF931 Detected camera clock after designated time pass although camera power was turned off ACL_3302_TAP_SEL_ERROR 0xF932 Invalid Tap or Bit or Arrange relationship ACL_3302_ARRANGE_X_ERROR 0xF933 Invalid arrangeXSize ...

Страница 108: ...rd appears ACL_3302_SET_BUFFER_ERROR Extended error code is shown as negatives of int type Mainly error code that shows setting error at buffer registration is stored Refer to Extended error codes related to buffer for more information Argument related Error If this board error cord appears ACL_3302_INVALID_PARAM Extended error code is shown as DWORD value It stores invalid argument s number if va...

Страница 109: ...0x000F0000 Cause Kernel memory is already mapped Check It is fatal error 0x00100000 Cause Cannot do mapping since MDL does not exist Check It is fatal error 0x00110000 Cause Failed for MmMapLockedPagesSpecifyCache Check Value of loaded memory is not enough 0x00120000 Cause MmMapLockedPagesSpecifyCache returns NULL Check It is fatal error 0x00130000 Cause PCI unmap error Check It is fatal error 0x0...

Страница 110: ...dress of registering buffer to 8 byte alignment 0x00390000 Cause AAE B04 is not in DMA idle state Check Do not cancel buffer during capturing 0x00410000 Cause Buffer is not registered Check Capturing is executed without registering buffer 0x00430000 Cause The other process is already registered in that channel Check Do not register same even in multiple processes 0x00440000 Cause Request is not mo...

Страница 111: ...FINFO_ERR_BITWIDTH 6 It is generated when Bit width of registering buffer is invalid ACL_BUFFINFO_ERR_PTRNULL 7 It is generated when pointer of registering buffer is NULL ACL_BUFFINFO_ERR_NO_BUFFER 8 It occurs when specified buffer does not exist Also it is occurred when buffer for storing pointer does not exist at getting buffer address ACL_BUFFINFO_ERR_REGION_SIZE 9 It occurs when rectangle size...

Страница 112: ...APX 3302 User s Manual OM110000019A 105 Firmware Update History Version Revised Date Revised Contents Ver A 0x10 2012 4 30 First edition ...

Страница 113: ...APX 3302 User s Manual OM110000019A 106 Revision History Version Revised Date Revised Contents A 2012 7 31 First edition ...

Страница 114: ...da office Sales department 1 25 10 Asahimachi Machida shi Tokyo 194 0023 TEL 042 732 1030 FAX 042 732 1032 URL http www avaldata co jp APX 3302 user s manual July 31 2012 first edition Edited and published by AVAL DATA CORPORATION 2012 AVALDATA CORPORATION OM110000019A ...

Отзывы: