Thorlabs CMOS camera hardware trigger

21 次查看(过去 30 天)
Hi everybody
I need to use hardware trigger for a DCC3260 thorlabs camera but commands in camera's .NET library manual do not work in MATLAB.
For exampleI I get this error: "The class uc480.TriggerBurst has no Constant property or Static method named 'Set' " for this command:
uc480.TriggerBurst.Set
But when I type:
methods('uc480.TriggerBurst')
'Set' is listed among this class' methods.
Whould you please guide me how to use such commands?
Thank you
Shabnam

回答(2 个)

Birk Andreas
Birk Andreas 2019-6-7
I have a very similar problem when I try to set the exposure time for a DCC1545M. Have you already found a solution?
Best Regards,
Birk

Cory Cress
Cory Cress 2021-11-15
编辑:Cory Cress 2021-11-15
Here's an example script from Thorlabs documentation on DCX480 cameras.
It often returns an invalid response and when it does, I find that the ThorCams software also doesn't connect. The only work around for me has been to restart matlab and unplug the camera.
% Add NET assembly
% May need to change specific location of library
NET.addAssembly(['C:\Program Files\Thorlabs\Scientific Imaging\DCx Camera ...' ...
'Support\Develop\DotNet\uc480DotNet.dll']);
% Create camera object handle
cam = uc480.Camera;
% Open the 1st available camera
cam.Init(0);
% Set display mode to bitmap (DiB)
cam.Display.Mode.Set(uc480.Defines.DisplayMode.DiB);
% Set color mode to 8-bit RGB
cam.PixelFormat.Set(uc480.Defines.ColorMode.RGBA8Packed);
% Set trigger mode to software (single image acquisition)
cam.Trigger.Set(uc480.Defines.TriggerMode.Software);
% Allocate image memory
[~, MemId] = cam.Memory.Allocate(true);
% Obtain image information
[~, Width, Height, Bits, ~] = cam.Memory.Inquire(MemId);
% Acquire image
cam.Acquisition.Freeze(uc480.Defines.DeviceParameter.Wait);
% Copy image from memory
[~, tmp] = cam.Memory.CopyToArray(MemId);
% Reshape image
Data = reshape(uint8(tmp), [Bits/8, Width, Height]);
Data = Data(1:3, 1:Width, 1:Height);
Data = permute(Data, [3,2,1]);
% Display Image
himg = imshow(Data);
% Close camera
cam.Exit;
  1 个评论
Jonah Padawer-Curry
How would I change the gain and the gamma here?
I've tried "cam.Gain.Hardware.Boost = 1;" and get the error "Error setting property 'Boost' of class 'GainHardware':
Value must be 'uc480.GainBoost'."

请先登录,再进行评论。

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by