THORLABS LabView DCU2 Series Programming Manual

THORLABS LabView DCU2 Series Programming Manual

High-resolution usb2.0 cmos and ccd cameras
Hide thumbs Also See for LabView DCU2 Series:

Advertisement

Quick Links

Programming Manual
LabView®
Thorlabs Instrumentation
High-Resolution USB2.0 CMOS and CCD
Cameras
DCU2xxx
DCC1x45x
2010

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the LabView DCU2 Series and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Summary of Contents for THORLABS LabView DCU2 Series

  • Page 1 Programming Manual LabView® Thorlabs Instrumentation High-Resolution USB2.0 CMOS and CCD Cameras DCU2xxx DCC1x45x 2010...
  • Page 2 3.5.2 Version: 22.09.2010 Date: © 2010 Thorlabs © 2010 Thorlabs...
  • Page 3: Table Of Contents

    ........................... 29 20 IsMemoryBoardConnected ........................... 30 21 IsVideoFinish ........................... 30 22 LoadParameters ........................... 31 23 LockSeqBuf ........................... 32 24 MemoryFreezeVideo ........................... 33 25 ResetToDefault ........................... 33 26 SaveParameters ........................... 34 27 SetAllocatedImageMem ........................... 35 28 SetAOI ........................... 36 © 2010 Thorlabs...
  • Page 4 ........................... 55 47 SetSubSampling ........................... 56 48 StopLiveVideo ........................... 57 49 UnlockSeqBuf ........................... 58 Part III Appendix 1 Example programs ........................... 62 2 List of error messages ........................... 63 3 Copyright ........................... 66 4 Addresses ........................... 67 © 2010 Thorlabs...
  • Page 5: Foreword

    This manual contains "WARNINGS" and "ATTENTION" label in this form, to indicate danger for persons or possible damage of equipment. Please read these advises carefully! NOTE This manual also contains "NOTES" and "HINTS" written in this form. © 2010 Thorlabs...
  • Page 7 General Information DCx camera Part...
  • Page 8: Part I General Information

    Please make sure to also read the file named WhatsNew.txt which you will find on the installation CD and in the C:\Program Files\Thorlabs\DCx camera\Help directory when the installation is completed. This file contains late-breaking information on new functions and fixed issues.
  • Page 9: Supported Operating Systems

    To use maximum bandwidth, we recommend connecting the cameras directly to the USB 2.0 ports on the mainboard. USB 2.0 ports on PCI/PCIe cards and the USB 2.0 ports on the front of the PC mostly supply lower bandwidths. © 2010 Thorlabs...
  • Page 10 DCx camera Detailed information on connecting and operating DCx cameras can be found in the Installation chapter in the DCx Operation Manual © 2010 Thorlabs...
  • Page 11 uc480 VIs DCx camera Part...
  • Page 12: Part Ii Uc480 Vis

    Functions that use an array that was created beforehand in another VI do not function properly. The array is located in a different area of memory after the VI is exited. If this can be bypassed, all functions can be used as usual. Related functions: List of similar or associated VIs. © 2010 Thorlabs...
  • Page 13: Addtosequence

    (bits per pixel). The number of image buffers for a sequence (memory ID) is limited to the integer value range. Parameters: Image buffer ID Memory ID Image buffer Image Memory Handle on camera Camera Handle In/Out Error code error in/out Related functions AllocAndAddToSequence AllocAndSetImageMem SetImageMem © 2010 Thorlabs...
  • Page 14: Arraytovision

    24-/32-bit arrays into a two-dimensional U32 ArrayToVision array. This is necessary in order to process the data further with NI Vision. Parameters: Image height Height Image width Width Color format Bits/Pixel Memory array to be converted InArray Converted memory array OutArray © 2010 Thorlabs...
  • Page 15: Capturevideo

    Function synchronizes image capture to the next IS_DONT_WAIT (0) VSYNC, but returns immediately Function synchronizes image capture to the next IS_WAIT (1) VSYNC, and only returns thereafter Handle on camera Camera Handle In/Out Error code error in/out Related functions FreezeVideo © 2010 Thorlabs...
  • Page 16: Clearsequence

    , no image buffer is set to active. To set an image ClearSequence buffer as active image buffer, must be used. SetImageMem Parameters: Handle on camera Camera Handle In/Out Error code error in/out Related functions AddToSequence AllocAndAddToSequence © 2010 Thorlabs...
  • Page 17: Exitcamera

    ExitCamera Description: logs off the passed camera handle and frees up the data structures and ExitCamera memory areas used by the uc480 camera. Parameters: Handle on camera Camera Handle In/Out Error code error in/out Related functions InitCamera © 2010 Thorlabs...
  • Page 18: Freeimagemem

    DCx camera FreeImageMem Description: frees up an allocated image buffer. FreeImageMem Parameters: Array memory Image Memory ID for this memory Memory ID Handle on camera Camera Handle In/Out Error code error in/out Related functions AllocAndSetImageMem SetImageMem © 2010 Thorlabs...
  • Page 19: Freezevideo

    VIs FreezeVideo Description: digitizes an image and stores it in the active image buffer. FreezeVideo Parameters: Handle on camera Camera Handle In/Out Error code error in/out Related functions CaptureVideo HasVideoStarted IsVideoFinish © 2010 Thorlabs...
  • Page 20: Getactimgmem

    LabVIEW array with the image information. GetActImgMem Parameters: Handle on camera Camera Handle In/Out Will contain the identification number of the Memory Number image buffer Image buffer array Image Memory Out Error code error in/out Related functions GetActSeqBuf SetImageMem © 2010 Thorlabs...
  • Page 21: Getactseqbuf

    1 to max.: Image capture to sequence image buffer N has started LabVIEW array to which the image is currently Active Image Mem being captured LabVIEW array to which an image was last Last Image Mem captured Error code error in/out Related functions GetActImgMem © 2010 Thorlabs...
  • Page 22: Getcolormode

    Description: returns the color mode currently set. GetColorMode Parameters: Handle on camera Camera Handle In/Out Number of bits per pixel Bits/Pixel Color mode: ColorMode 0 = RGB32 1 = RGB24 6 = Y8 monochrome Related functions SetColorMode © 2010 Thorlabs...
  • Page 23: Getexposurerange

    Handle on camera Camera Handle In/Out Contains the increment at which the image intervall duration can be changed Contains the maximum possible exposure time Contains the minimum possible exposure time Error code error in/out Related functions GetFrameTimeRange SetExposureTime © 2010 Thorlabs...
  • Page 24: Getframespersecond

    DCx camera 2.12 GetFramesPerSecond Description: ), GetFramesPerSecond returns the number of In live operation (CaptureVideo actually captured frames per second. Parameters: Handle on camera Camera Handle In/Out Frame rate Error code error in/out Related functions GetFrameTimeRange SetFrameRate © 2010 Thorlabs...
  • Page 25: Getframetimerange

    Contains the increment at which the image duration can intervall be changed Contains the maximum possible duration of an image Contains the minimum possible duration of an image Error code error in/out Related functions GetFramesPerSecond GetExposureRange SetPixelClock © 2010 Thorlabs...
  • Page 26: Getglobalflashdelays

    Parameters: Handle on camera Camera Handle In/Out Time by which the flash is delayed (in µs) Delay Out Time in which the flash is activated (in µs) Duration Out Error code error in/out Related functions SetFlashDelay SetFlashStrobe © 2010 Thorlabs...
  • Page 27: Getimagesize

    VIs 2.15 GetImageSize Description: returns the image size currently set. GetImageSize Parameters: Handle on camera Camera Handle In/Out Returns the image width Width Returns the image height Height Related functions SetAOI SetBinning SetSubSampling © 2010 Thorlabs...
  • Page 28: Getnumberofcameras

    DCx camera 2.16 GetNumberOfCameras Description: returns the number of uc480 cameras connected to the system. GetNumberOfCameras Parameters: Number of connected uc480 cameras Number of Cameras Error code error in/out © 2010 Thorlabs...
  • Page 29: Getpixelclockrange

    2.17 GetPixelClockRange Description: returns the range of possible pixel clock settings. GetPixelClockRange Parameters: Handle on camera Camera Handle In/Out Returns the maximum possible value Returns the minimum possible value Error code error in/out Related functions SetPixelClock GetFramesPerSecond © 2010 Thorlabs...
  • Page 30: Hasvideostarted

    Parameters: Handle on camera Camera Handle In/Out Will contain the digitization status: Video started = Image capture has not yet started FALSE = Image capture has started TRUE Error code error in/out Related functions IsVideoFinish FreezeVideo © 2010 Thorlabs...
  • Page 31: Initcamera

    VI. All subsequent VIs require this handle. Parameters: Uses the first available camera Camera ID 1 - 254: Opens the camera with this ID Handle on camera Camera Handle Out Error code Error out Related functions ExitCamera © 2010 Thorlabs...
  • Page 32: Ismemoryboardconnected

    This function is useful in combination with with the FreezeVideo parameter. IS_DONT_WAIT Parameters: Handle on camera Camera Handle In/Out = Image is not yet fully digitized Video Finish FALSE = Image is fully digitized TRUE Error code error in/out Related functions FreezeVideo HasVideoStarted © 2010 Thorlabs...
  • Page 33: Loadparameters

    Pointer to file name. Either the absolute path or the Filename relative path can be specified. For the camera's internal parameter sets, these would be "\\cam\\set1"/"/cam/set1," or "\\cam\\set2"/"/cam/set2." Passing displays the "Open File" window. ZERO Error code error in/out Related functions SaveParameters © 2010 Thorlabs...
  • Page 34: Lockseqbuf

    Parameters: Handle on camera Camera Handle In/Out Number of the image buffer to be protected Memory Number In Start address of the image buffer to be protected Image Memory In Error code error in/out Related functions UnlockSeqBuf © 2010 Thorlabs...
  • Page 35: Memoryfreezevideo

    As memory board is not supported, MemoryFreezeVideo function cannot be used. 2.25 ResetToDefault Description: sets all parameters to the default camera-specific values. ResetToDefault Parameters: Handle on camera Camera Handle In/Out Error code error in/out © 2010 Thorlabs...
  • Page 36: Saveparameters

    Pointer to file name. Either the absolute path or the Filename relative path can be specified. For the camera's internal parameter sets, these would be "\\cam\\set1"/"/cam/set1," or "\\cam\\set2"/"/cam/set2." Passing displays the "Save As" window. ZERO Error code error in/out Related functions LoadParameters © 2010 Thorlabs...
  • Page 37: Setallocatedimagemem

    Camera Handle In/Out Image width Width Image height Height Image color depth (bits per pixel) BitsPixel Allocated image buffer Image Memory Out Image buffer memory ID Memory ID Out Error code error in/out Related functions AllocAndAddToSequence AllocAndSetImageMem GetActImgMem © 2010 Thorlabs...
  • Page 38: Setaoi

    Width of the AOI Width In/Out Vertical position of the AOI YPos In/Out Horizontal position of the AOI XPos In/Out Mode Set image AOI IS_SET_IMAGE_AOI (32770) Returns current image AOI IS_GET_IMAGE_AOI (32771) Error code error in/out Related functions SetBinning SetSubSampling © 2010 Thorlabs...
  • Page 39: Setautoparameter

    Returns the current Auto Gain settings IS_GET_ENABLE_AUTO_GAIN (34817) Activates/deactivates the Auto Shutter IS_SET_ENABLE_AUTO_SHUTTER (34818) function Returns the current Auto Shutter settings IS_GET_ENABLE_AUTO_SHUTTER (34819) Activates/deactivates the Auto White Balance IS_SET_ENABLE_AUTO_WHITEBALANCE (34820) function Returns the current Auto White Balance IS_GET_ENABLE_AUTO_WHITEBALANCE (34821) settings © 2010 Thorlabs...
  • Page 40 Sets automatic deactivation of the Auto White IS_SET_AUTO_WB_ONCE (32782) Balance function Returns the status of automatic deactivation IS_GET_AUTO_WB_ONCE (32783) Activate/deactivate auto functions enable Returns the setting queried with Get Value Error code Error in/out Related functions SetExposureTime SetHardwareGain SetFrameRate © 2010 Thorlabs...
  • Page 41: Setbinning

    Activates horizontal and vertical four-pixel IS_BINNING_4X_V_4X_H (12) binning Returns the current setting IS_GET_BINNING (32768) Returns the supported binning modes IS_GET_SUPPORTED_BINNING (32769) Contains the current mode when using Value IS_GET_BINNING or IS_GET_SUPPORTED_BINNING Error code error in/out Related functions SetAOI SetSubSampling © 2010 Thorlabs...
  • Page 42: Setblcompensation

    Mode parameter is ignored IS_IGNORE_PARAMETER (-1) Contains the offset used for compensation. Possible offset values range from 0 to 255. Contains the return value when an parameter Value IS_GET is passed Error code error in/out © 2010 Thorlabs...
  • Page 43: Setcolorcorrection

    To achieve better color rendering with color sensors, color correction can be activated with SetColorCorrection Parameters: Handle on camera Camera Handle In/Out Mode Deactivates color correction IS_CCOR_DISABLE (0) Activates color correction IS_CCOR_ENABLE (1) Error code error in/out © 2010 Thorlabs...
  • Page 44: Setcolormode

    VGA card. Always ensure that the image buffer is large enough. Parameters: Handle on camera Camera Handle In/Out Mode 32-bit true-color mode; R-G-B dummy IS_SET_CM_RGB32 (0) 24-bit true-color mode; R-G-B IS_SET_CM_RGB24 (1) 8-bit monochrome images IS_SET_CM_Y8 (6) Error code error in/out © 2010 Thorlabs...
  • Page 45: Setedgeenhancement

    Using this function increases the CPU load of the system. Parameters: Handle on camera Camera Handle In/Out Mode Deactivates the edge filter IS_EDGE_EN_DISABLE (0) Activates the strong edge filter IS_EDGE_EN_ STRONG(1) Activates the weaker edge filter IS_EDGE_EN_WEAK(2) Error code error in/out © 2010 Thorlabs...
  • Page 46: Seterrorreport

    If the dialog box is closed with Cancel, the error report is also deactivated. Parameters: Handle on camera Camera Handle In/Out Mode Deactivate error reporting IS_DISABLE_ERR_REP (0) Activate error reporting IS_ENABLE_ERR_REP (1) Error code error in/out © 2010 Thorlabs...
  • Page 47: Setexposuretime

    IS_SET_EXPOSURE_TIME (32900) New desired exposure time. Exposure Time = 0.0 is passed, an exposure time of 1/frame rate will be used. Returns the actually set exposure time new exposure time Error code error in/out Related functions GetExposureRange SetAutoParameter © 2010 Thorlabs...
  • Page 48: Setexternaltrigger

    Read trigger mode setting back out IS_GET_EXTERNALTRIGGER (32768) Returns the current level at the trigger input IS_GET_TRIGGER_STATUS (32769) Returns the setting queried with Get Status Error code error in/out Related functions FreezeVideo © 2010 Thorlabs...
  • Page 49: Setflashdelay

    Time by which the flash is delayed (in µs) Duration In Time in which the flash is activated (in µs) Delay In Returns the setting queried with Value IS_GET Error code error in/out Related functions SetFlashStrobe GetGlobalFlashDelays © 2010 Thorlabs...
  • Page 50: Setflashstrobe

    IS_SET_FLASH_HI_ACTIVE (2) Sets strobe output to HIGH IS_SET_FLASH_HIGH (3) Sets strobe output to LOW IS_SET_FLASH_LOW (4) Returns the current mode IS_GET_FLASHSTROBE_MODE (32768) Returns the setting queried with Get Mode Error code error in/out Related functions SetFlashDelay GetGlobalFlashDelays SetExternalTrigger © 2010 Thorlabs...
  • Page 51: Setframerate

    FPS parameter when this function is used. Parameters: Handle on camera Camera Handle In/Out Desired number of frames per second Returns the actually set frame rate new FPS Error code error in/out Related functions SetExposureTime SetPixelClock GetFramesPerSecond GetFrameTimeRange SetAutoParameter © 2010 Thorlabs...
  • Page 52: Setgamma

    1 and Gamma 1,000 (Gamma value x 100). Parameters: Handle on camera Camera Handle In/Out Gamma value multiplied by 100. Range: [1 Gamma to 1,000] Error code error in/out © 2010 Thorlabs...
  • Page 53: Sethardwaregain

    Returns standard master gain IS_GET_DEFAULT_MASTER (32772) Returns standard red gain IS_GET_ DEFAULT_RED (32773) Returns standard green gain IS_GET_ DEFAULT_GREEN (32774) Returns standard blue gain IS_GET_ DEFAULT_BLUE (32775) Sets gains IS_SET_GAIN (34816) Error code error in/out Related functions SetAutoParameter © 2010 Thorlabs...
  • Page 54: Sethotpixelcorrection

    Activates the software correction based on the IS_BPC_ENABLE_SOFTWARE (2) hot pixel list stored in the EEPROM Returns the current mode IS_GET_BPC_MODE (32768) Contains the current mode when using Value IS_GET_BPC_MODE 0 = Disabled 1 = Enabled Error code error in/out © 2010 Thorlabs...
  • Page 55: Setimagemem

    Parameters: Handle on camera Camera Handle In/Out Pointer to start of memory area Image Memory In/Out ID for this memory Memory ID In/Out Error code error in/out Related functions AllocAndAddToSequence AllocAndSetImageMem SetAllocatedImageMem © 2010 Thorlabs...
  • Page 56: Setpixelclock

    Returns the standard pixel clock IS_GET_DEFAULT_PCLK (32769) Sets the value given under pixel frequency IS_SET_PIXEL_CLOCK (32770) Pixel frequency in MHz Pixel Clock Pixel frequency in MHz if GetClock = Value TRUE Error code error in/out Related functions SetFrameRate GetPixelClockRange © 2010 Thorlabs...
  • Page 57: Setropeffect

    IS_SET_ROP_MIRROR_LEFTRIGHT (64) function may be a hardware or a software function depending on the camera. Returns the current settings IS_GET_ROP_EFFECT (32768) Activates/deactivates Rop effect On / Off Returns the setting queried with Get Value Error code error in/out © 2010 Thorlabs...
  • Page 58: Setsubsampling

    Activates vertical and horizontal four-pixel IS_SUBSAMPLING_4X_V_4X_H (12) subsampling Returns the current setting IS_GET_SUBSAMPLING (32768) Returns the supported subsampling modes IS_GET_SUPPORTED_SUBSAMPLING (32769) Returns the setting queried with Get Value Error code error in/out Related functions SetBinning SetAOI © 2010 Thorlabs...
  • Page 59: Stoplivevideo

    (IS_DONT_WAIT) IS_FORCE_VIDEO_STOP Parameters: Handle on camera Camera Handle In/Out Wait Function returns immediately IS_DONT_WAIT (0) Function returns immediately IS_WAIT(1) Immediately stop digitizing IS_FORCE_VIDEO_STOP (16384) Error code error in/out Related functions FreezeVideo HasVideoStarted © 2010 Thorlabs...
  • Page 60: Unlockseqbuf

    UnlockSeqBuf again. Parameters: Handle on camera Camera Handle In/Out Number of the image buffer to be released Memory Number In Start address of the image buffer Image Memory In Error code error in/out Related functions LockSeqBuf © 2010 Thorlabs...
  • Page 61 VIs © 2010 Thorlabs...
  • Page 63 Appendix DCx camera Part...
  • Page 64: Part Iii Appendix

    Various camera settings can be made. Trigger_8bit Trigger_8bit captures an image from the camera in 8-bit mode and displays this image. In addition, the camera’s trigger mode can be activated and various camera settings can be made. © 2010 Thorlabs...
  • Page 65: List Of Error Messages

    Unable to lock memory. The pointer to the IS_SEQUENCE_BUF_ALREADY_LOCKED buffer is invalid. The Device ID is invalid. Possible IDs range IS_INVALID_DEVICE_ID from 0 to 255. The Board ID is invalid. Possible IDs range from IS_INVALID_BOARD_ID © 2010 Thorlabs...
  • Page 66 This setting is not possible with the currently IS_INVALID_EXPOSURE_TIME set exposure time. This setting cannot be changed as long as IS_AUTO_EXPOSURE_RUNNING automatic exposure time control is active. BackBuffer Surface cannot be created. IS_CANNOT_CREATE_BB_SURF BackBuffer Mixer Surface cannot be created. IS_CANNOT_CREATE_BB_MIX © 2010 Thorlabs...
  • Page 67 BackBuffer surface invalid. IS_INVALID_SURFACE BackBuffer surface lost. IS_SURFACE_LOST Error when releasing the Overlay Device IS_RELEASE_BB_OVL_DC Context. BackBuffer Timer could not be created. IS_BB_TIMER_NOT_CREATED BackBuffer Overlay was not activated. IS_BB_OVL_NOT_EN Only possible in BackBuffer mode. IS_ONLY_IN_BB_MODE Invalid color format. IS_INVALID_COLOR_FORMAT © 2010 Thorlabs...
  • Page 68: Copyright

    User Manual, please contact your local Thorlabs dealer or system installer. All rights reserved. This manual may not be reproduced, transmitted or translated to another language, either as a whole or in parts, without the prior written permission of Thorlabs GmbH. Status: 2010 ©...
  • Page 69: Addresses

    Phone: +1 973 579 7227 Fax: +1 973 300 3600 Email: sales@thorlabs.com Internet: http://www.thorlabs.com Japan: Thorlabs Japan, Inc. Higashi Ikebukuro Q Building 1st floor 2-23-2 Toshima-ku, Tokyo 170-0013 Japan Phone: +81 3 5979 8889 Fax: +81 3 5979 7285 Email: sales@thorlabs.jp...

Table of Contents