THORLABS LabView DCU2 Series Owner's manual

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

Version:
Date: 3.5.2
22.09.2010
© 2010 Thorlabs
© 2010 Thorlabs

© 2010 Thorlabs
Table of Contents
Foreword 3
Part I General Information 6
................................................................................................................................... 61 At a glance
................................................................................................................................... 62 System Requirements
................................................................................................................................... 73 Supported Operating Systems
................................................................................................................................... 74 Getting Started
Part II uc480 VIs 10
................................................................................................................................... 111 AddToSequence
................................................................................................................................... 122 ArrayToVision
................................................................................................................................... 133 CaptureVideo
................................................................................................................................... 144 ClearSequence
................................................................................................................................... 155 ExitCamera
................................................................................................................................... 166 FreeImageMem
................................................................................................................................... 177 FreezeVideo
................................................................................................................................... 188 GetActImgMem
................................................................................................................................... 199 GetActSeqBuf
................................................................................................................................... 2010 GetColorMode
................................................................................................................................... 2111 GetExposureRange
................................................................................................................................... 2212 GetFramesPerSecond
................................................................................................................................... 2313 GetFrameTimeRange
................................................................................................................................... 2414 GetGlobalFlashDelays
................................................................................................................................... 2515 GetImageSize
................................................................................................................................... 2616 GetNumberOfCameras
................................................................................................................................... 2717 GetPixelClockRange
................................................................................................................................... 2818 HasVideoStarted
................................................................................................................................... 2919 InitCamera
................................................................................................................................... 3020 IsMemoryBoardConnected
................................................................................................................................... 3021 IsVideoFinish
................................................................................................................................... 3122 LoadParameters
................................................................................................................................... 3223 LockSeqBuf
................................................................................................................................... 3324 MemoryFreezeVideo
................................................................................................................................... 3325 ResetToDefault
................................................................................................................................... 3426 SaveParameters
................................................................................................................................... 3527 SetAllocatedImageMem
................................................................................................................................... 3628 SetAOI

© 2010 Thorlabs
................................................................................................................................... 3729 SetAutoParameter
................................................................................................................................... 3930 SetBinning
................................................................................................................................... 4031 SetBlCompensation
................................................................................................................................... 4132 SetColorCorrection
................................................................................................................................... 4233 SetColorMode
................................................................................................................................... 4334 SetEdgeEnhancement
................................................................................................................................... 4435 SetErrorReport
................................................................................................................................... 4536 SetExposureTime
................................................................................................................................... 4637 SetExternalTrigger
................................................................................................................................... 4738 SetFlashDelay
................................................................................................................................... 4839 SetFlashStrobe
................................................................................................................................... 4940 SetFrameRate
................................................................................................................................... 5041 SetGamma
................................................................................................................................... 5142 SetHardwareGain
................................................................................................................................... 5243 SetHotPixelCorrection
................................................................................................................................... 5344 SetImageMem
................................................................................................................................... 5445 SetPixelClock
................................................................................................................................... 5546 SetRopEffect
................................................................................................................................... 5647 SetSubSampling
................................................................................................................................... 5748 StopLiveVideo
................................................................................................................................... 5849 UnlockSeqBuf
Part III Appendix 62
................................................................................................................................... 621 Example programs
................................................................................................................................... 632 List of error messages
................................................................................................................................... 663 Copyright
................................................................................................................................... 674 Addresses

We aim to develop and produce the best solution for your application
in the field of optical measurement technique. To help us to come up
to your expectations and develop our products permanently we need
your ideas and suggestions. Therefore, please let us know about
possible criticism or ideas. We and our international partners are
looking forward to hearing from you.
Thorlabs GmbH
This part of the instruction manual contains every specific information on how
to handle and use the DCx camera. A general description is followed by
explanations of how to operate the unit via USB.
Attention
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


General Information
DCx camera
Part I

6 DCx camera
© 2010 Thorlabs
1General Information
1.1 At a glance
This LabVIEW manual contains all the information you need to program your own applications with
your DCx camera in LabVIEW.
Herinafter, uc480 stands for all Thorlabs DCx cameras:
DCU224C
DCU224M
DCU223C
DCU223M
DCC1645C
DCC1545M
The uc480 LabVIEW interface is part of the comprehensive software package included in the scope
of delivery of every DCx camera. In addition to the drivers, the software package includes the uc480
Camera Manager, the uc480 Demo, and a Software Development Kit (SDK) for creating your own
programs in Windows and Linux. Demo applications make it easier to start DCx camera
programming.
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.
We would like to wish you every success with the product.
1.2 System Requirements
The uc480 LabVIEW interface supports versions 8.x and 2009 of LabVIEW. The NI Vision module
must be installed for some examples.
To operate the uc480 camera, the system environment in which it is used must meet
the following requirements:
Minimum*)
Recommended
CPU speed
600 MHz
2 x 2.4 GHz
Memory (RAM)
256 MB
2,048 MB
For USB uEye
cameras:
USB host controller
USB 2.0 high speed (480 Mbit/s)
USB 2.0 high speed (480 Mbit/s)
Intel®or NVIDIA®nForce main board
chip set
Graphics card
On-board graphics chip
AGP/PCIe graphics card
Up-to-date version of DirectX
Runtime 9.0c
*) Some capabilities of the camera maynot be available.

7General Information
© 2010 Thorlabs
The USB 2.0 interfaces located on the main board usually provide notably better performance than USB
2.0 interfaces on PCI and PCMCIAadapters.
1.3 Supported Operating Systems
Table 1 : Supported Operating Systems and Interfaces
OS
Service Packs
Required Patches
Windows 2000
SP4
-
Windows XP
SP1
KB822603
Windows XP
SP3
-
Windows Vista 32-Bit
SP1
-
Windows Vista 64-Bit
SP1
-
Windows 7 32-Bit
-
-
Windows 7 64-Bit
-
-
Linux
Kernel 2.6.9 - 2.6.30
-
Supported Interfaces
Type
Version
Host Controller
Comment
USB
2.0
EHCI
Full support
USB
1.0
OHCI/UHCI
Not supported
NOTE
We strongly recommend using PCs with USB2.0 on board. PCIor PCMCIA USB2.0
adapters may have a lower performance.
Make sure that the USB2.0 interface is ‘full powered’ and can provide 500 mA.
1.4 Getting Started
To get your camera up and running the following points are necessary:
1. Install the USB camera driver from the supplied Support CD
2. Remove the dust/lens cover to attach an objective or other optical system, if present
3. Connect your camera via the USB2.0 cable to a USB2.0 port
4. The Windows "Found new Hardware" wizard recognizes the new hardware. DCx cameras can be
connected to a USB 2.0 port either directly or via hubs and repeaters. When the camera has been
correctly installed, the LED on the back of the camera lights up green.
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.

8 DCx camera
© 2010 Thorlabs
Detailed information on connecting and operating DCx cameras can be found in the Installation
chapter in the DCx Operation Manual

uc480 VIs
DCx camera
Part II

10 DCx camera
© 2010 Thorlabs
2uc480 VIs
The driver library provides the VIs described in this manual to integrate uc480 cameras into
LabVIEW. The VIs are located in the function palette under
Own libraries->uc480.
The descriptions of the uc480 VIs are listed in alphabetical order and are structured as follows:
Description:
Description of the VI
Parameters:
Description of the inputs and outputs
VI:
Image of the VI with all inputs and outputs
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.

11uc480 VIs
© 2010 Thorlabs
2.1 AddToSequence
Description:
AddToSequence adds an image buffer to the list of image buffers used for ring buffering. The
image buffer must have been allocated beforehand with SetAllocatedImageMem .
All image buffers used for ring buffering must have been allocated for the same color depth
(bits per pixel). The number of image buffers for a sequence (memory ID) is limited to the
integer value range.
Parameters:
Memory ID
Image buffer ID
Image Memory
Image buffer
Camera Handle In/Out
Handle on camera
error in/out
Error code
VI:
Related functions
AllocAndAddToSequence
AllocAndSetImageMem
SetImageMem
35
53

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

13uc480 VIs
© 2010 Thorlabs
2.3 CaptureVideo
Description:
CaptureVideo digitizes video frames in real time and transfers them to an allocated
image buffer. If you are using ring buffering (AddToSequence ), image capture
traverses all image buffers included in the sequence in an infinite loop.
Parameters:
Wait
Image buffer ID
IS_DONT_WAIT (0)
Function synchronizes image capture to the next
VSYNC, but returns immediately
IS_WAIT (1)
Function synchronizes image capture to the next
VSYNC, and only returns thereafter
Camera Handle In/Out
Handle on camera
error in/out
Error code
VI:
Related functions
FreezeVideo
11
17

14 DCx camera
© 2010 Thorlabs
2.4 ClearSequence
Description:
ClearSequence removes all image buffers added with AddToSequence from the
sequence list. After ClearSequence, no image buffer is set to active. To set an image
buffer as active image buffer, SetImageMem must be used.
Parameters:
Camera Handle In/Out
Handle on camera
error in/out
Error code
VI:
Related functions
AddToSequence
AllocAndAddToSequence
11
53
11

18 DCx camera
© 2010 Thorlabs
2.8 GetActImgMem
Description:
GetActImgMem returns a LabVIEW array with the image information.
Parameters:
Camera Handle In/Out
Handle on camera
Memory Number
Will contain the identification number of the
image buffer
Image Memory Out
Image buffer array
error in/out
Error code
VI:
Related functions
GetActSeqBuf
SetImageMem
19
53
Other manuals for LabView DCU2 Series
1
This manual suits for next models
7
Table of contents
Other THORLABS Digital Camera manuals

THORLABS
THORLABS LP126MU User manual

THORLABS
THORLABS DCC Series User manual

THORLABS
THORLABS CC505MU User manual

THORLABS
THORLABS CC215MU User manual

THORLABS
THORLABS DCU22 Series User manual

THORLABS
THORLABS S805 User manual

THORLABS
THORLABS CS165 Series User manual

THORLABS
THORLABS 8051 User manual

THORLABS
THORLABS 1500M Series User manual

THORLABS
THORLABS DCC3260M User manual